diff --git a/.gitignore b/.gitignore index f5f23da655f..366842b24be 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.reject *.spec *.bak +*.dgcov *.rpm .*.swp *.ninja @@ -50,6 +51,7 @@ extra/jemalloc/build/ extra/jemalloc/tmp/ extra/my_print_defaults extra/mysql_waitpid +extra/mysqld_safe_helper extra/perror extra/replace extra/resolve_stack_dump @@ -80,6 +82,9 @@ mysql-test/lib/My/SafeProcess/my_safe_process mysql-test/mtr mysql-test/mysql-test-run mysql-test/var +mysql-test-gcov.err +mysql-test-gcov.msg +mysys/test_hash mysys/thr_lock mysys/thr_timer packaging/rpm-oel/mysql.spec @@ -223,6 +228,7 @@ support-files/mysql.spec support-files/mysqld_multi.server support-files/wsrep.cnf support-files/wsrep_notify +support-files/policy/selinux/mysqld-safe.pp tags tests/async_queries tests/bug25714 diff --git a/.travis.yml b/.travis.yml index 66bc3c51f8f..c2fa7283e9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ cache: env: matrix: + - GCC_VERSION=4.8 - GCC_VERSION=5 - GCC_VERSION=6 addons: diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh index 86085fcc593..b41c5c5139d 100644 --- a/BUILD/FINISH.sh +++ b/BUILD/FINISH.sh @@ -32,9 +32,9 @@ then configure="$configure --verbose" fi +# git clean -fdX removes all ignored (build) files commands="\ -/bin/rm -rf configure; -/bin/rm -rf CMakeCache.txt CMakeFiles/ +git clean -fdX path=`dirname $0` . \"$path/autorun.sh\"" diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index 01d654dba53..22357ce7fc8 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -42,7 +42,7 @@ Usage: $0 [-h|-n] [configure-options] Influences the debug flags. Old is default. --prefix=path Build with prefix 'path'. -Note: this script is intended for internal use by MySQL developers. +Note: this script is intended for internal use by MariaDB developers. EOF } @@ -120,10 +120,9 @@ path=`dirname $0` get_make_parallel_flag # SSL library to use.--with-ssl will select our bundled yaSSL -# implementation of SSL. To use OpenSSL you will need to specify -# the location of OpenSSL headers and libs on your system. -# Ex --with-ssl=/usr -SSL_LIBRARY=--with-ssl +# implementation of SSL. --with-ssl=yes will first try system library +# then the boundled one --with-ssl=system will use the system library. +SSL_LIBRARY=--with-ssl=system if [ "x$warning_mode" = "xpedantic" ]; then warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE" @@ -293,7 +292,7 @@ gcov_compile_flags="$gcov_compile_flags -DMYSQL_SERVER_SUFFIX=-gcov -DHAVE_gcov" # GCC4 needs -fprofile-arcs -ftest-coverage on the linker command line (as well # as on the compiler command line), and this requires setting LDFLAGS for BDB. -gcov_link_flags="-fprofile-arcs -ftest-coverage" +gcov_link_flags="-fprofile-arcs -ftest-coverage -lgcov" gcov_configs="--with-gcov" diff --git a/BUILD/compile-pentium64-gcov b/BUILD/compile-pentium64-gcov index 36d4b6192ec..9587c51b4e0 100755 --- a/BUILD/compile-pentium64-gcov +++ b/BUILD/compile-pentium64-gcov @@ -28,6 +28,6 @@ export LDFLAGS="$gcov_link_flags" extra_flags="$pentium64_cflags $max_cflags $gcov_compile_flags" c_warnings="$c_warnings $debug_extra_warnings" cxx_warnings="$cxx_warnings $debug_extra_warnings" -extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs --with-zlib-dir=bundled" +extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs" . "$path/FINISH.sh" diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a9d6079c7f..3685ed42381 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -183,18 +183,18 @@ INCLUDE(check_compiler_flag) OPTION(WITH_ASAN "Enable address sanitizer" OFF) IF (WITH_ASAN) # gcc 4.8.1 and new versions of clang - MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -O1 -Wno-error -fPIC" + MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fPIC" DEBUG RELWITHDEBINFO) - SET(HAVE_C_FSANITIZE ${HAVE_C__fsanitize_address__O1__Wno_error__fPIC}) - SET(HAVE_CXX_FSANITIZE ${HAVE_CXX__fsanitize_address__O1__Wno_error__fPIC}) + SET(HAVE_C_FSANITIZE ${have_C__fsanitize_address__fPIC}) + SET(HAVE_CXX_FSANITIZE ${have_CXX__fsanitize_address__fPIC}) IF(HAVE_C_FSANITIZE AND HAVE_CXX_FSANITIZE) SET(WITH_ASAN_OK 1) ELSE() # older versions of clang - MY_CHECK_AND_SET_COMPILER_FLAG("-faddress-sanitizer -O1 -fPIC" + MY_CHECK_AND_SET_COMPILER_FLAG("-faddress-sanitizer -fPIC" DEBUG RELWITHDEBINFO) - SET(HAVE_C_FADDRESS ${HAVE_C__faddress_sanitizer__O1__fPIC}) - SET(HAVE_CXX_FADDRESS ${HAVE_CXX__faddress_sanitizer__O1__fPIC}) + SET(HAVE_C_FADDRESS ${have_C__faddress_sanitizer__fPIC}) + SET(HAVE_CXX_FADDRESS ${have_CXX__faddress_sanitizer__fPIC}) IF(HAVE_C_FADDRESS AND HAVE_CXX_FADDRESS) SET(WITH_ASAN_OK 1) ENDIF() @@ -274,7 +274,7 @@ ENDIF() # Set commonly used variables IF(WIN32) - SET(DEFAULT_MYSQL_HOME "C:/MariaDB${MYSQL_BASE_VERSION}") + SET(DEFAULT_MYSQL_HOME "C:/Program Files/MariaDB ${MYSQL_BASE_VERSION}") SET(SHAREDIR share) ELSE() SET(DEFAULT_MYSQL_HOME ${CMAKE_INSTALL_PREFIX}) diff --git a/VERSION b/VERSION index bfea448d129..e90777ce978 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=2 -MYSQL_VERSION_PATCH=4 +MYSQL_VERSION_PATCH=5 diff --git a/client/client_priv.h b/client/client_priv.h index 1d85791fa73..e96e187fb34 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -66,6 +66,10 @@ enum options_client OPT_MYSQLDUMP_SLAVE_APPLY, OPT_MYSQLDUMP_SLAVE_DATA, OPT_MYSQLDUMP_INCLUDE_MASTER_HOST_PORT, +#ifdef WHEN_FLASHBACK_REVIEW_READY + OPT_REVIEW, + OPT_REVIEW_DBNAME, OPT_REVIEW_TABLENAME, +#endif OPT_SLAP_CSV, OPT_SLAP_CREATE_STRING, OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE, OPT_SLAP_AUTO_GENERATE_WRITE_NUM, OPT_SLAP_AUTO_GENERATE_ADD_AUTO, diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index d186a4c7fcc..e670079c99e 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -1571,8 +1571,10 @@ static my_bool get_pidfile(MYSQL *mysql, char *pidfile) if (mysql_query(mysql, "SHOW VARIABLES LIKE 'pid_file'")) { - my_printf_error(0, "query failed; error: '%s'", error_flags, - mysql_error(mysql)); + my_printf_error(mysql_errno(mysql), + "The query to get the server's pid file failed," + " error: '%s'. Continuing.", error_flags, + mysql_error(mysql)); } result = mysql_store_result(mysql); if (result) diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 558dbebc89c..e2b121c27a7 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -66,6 +66,10 @@ Rpl_filter *binlog_filter= 0; /* Needed for Rpl_filter */ CHARSET_INFO* system_charset_info= &my_charset_utf8_general_ci; +/* Needed for Flashback */ +DYNAMIC_ARRAY binlog_events; // Storing the events output string +String stop_event_string; // Storing the STOP_EVENT output string + char server_version[SERVER_VERSION_LENGTH]; ulong server_id = 0; @@ -89,7 +93,7 @@ static const char *load_groups[]= static void error(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2); static void warning(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2); -static bool one_database=0, to_last_remote_log= 0, disable_log_bin= 0; +static bool one_database=0, one_table=0, to_last_remote_log= 0, disable_log_bin= 0; static bool opt_hexdump= 0, opt_version= 0; const char *base64_output_mode_names[]= {"NEVER", "AUTO", "ALWAYS", "UNSPEC", "DECODE-ROWS", NullS}; @@ -99,6 +103,7 @@ TYPELIB base64_output_mode_typelib= static enum_base64_output_mode opt_base64_output_mode= BASE64_OUTPUT_UNSPEC; static char *opt_base64_output_mode_str= NullS; static char* database= 0; +static char* table= 0; static my_bool force_opt= 0, short_form= 0, remote_opt= 0; static my_bool debug_info_flag, debug_check_flag; static my_bool force_if_open_opt= 1; @@ -132,6 +137,12 @@ static MYSQL* mysql = NULL; static const char* dirname_for_local_load= 0; static bool opt_skip_annotate_row_events= 0; +static my_bool opt_flashback; +#ifdef WHEN_FLASHBACK_REVIEW_READY +static my_bool opt_flashback_review; +static char *flashback_review_dbname, *flashback_review_tablename; +#endif + /** Pointer to the Format_description_log_event of the currently active binlog. @@ -790,6 +801,23 @@ print_skip_replication_statement(PRINT_EVENT_INFO *pinfo, const Log_event *ev) pinfo->skip_replication= cur_val; } +/** + Indicates whether the given table should be filtered out, + according to the --table=X option. + + @param log_tblname Name of table. + + @return nonzero if the table with the given name should be + filtered out, 0 otherwise. +*/ +static bool shall_skip_table(const char *log_tblname) +{ + return one_table && + (log_tblname != NULL) && + strcmp(log_tblname, table); +} + + /** Prints the given event in base64 format. @@ -952,6 +980,12 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, Exit_status retval= OK_CONTINUE; IO_CACHE *const head= &print_event_info->head_cache; + /* Bypass flashback settings to event */ + ev->is_flashback= opt_flashback; +#ifdef WHEN_FLASHBACK_REVIEW_READY + ev->need_flashback_review= opt_flashback_review; +#endif + /* Format events are not concerned by --offset and such, we always need to read them to be able to process the wanted events. @@ -988,7 +1022,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, retval= OK_STOP; goto end; } - if (!short_form) + if (!short_form && !opt_flashback) fprintf(result_file, "# at %s\n",llstr(pos,ll_buff)); if (!opt_hexdump) @@ -1214,12 +1248,128 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, case TABLE_MAP_EVENT: { Table_map_log_event *map= ((Table_map_log_event *)ev); - if (shall_skip_database(map->get_db_name())) + if (shall_skip_database(map->get_db_name()) || + shall_skip_table(map->get_table_name())) { print_event_info->m_table_map_ignored.set_table(map->get_table_id(), map); destroy_evt= FALSE; goto end; } +#ifdef WHEN_FLASHBACK_REVIEW_READY + /* Create review table for Flashback */ + if (opt_flashback_review) + { + // Check if the table was already created? + Table_map_log_event *exist_table; + exist_table= print_event_info->m_table_map.get_table(map->get_table_id()); + + if (!exist_table) + { + + MYSQL *conn; + MYSQL_RES *res; + MYSQL_ROW row; + char tmp_sql[8096]; + int tmp_sql_offset; + + conn = mysql_init(NULL); + if (!mysql_real_connect(conn, host, user, pass, + map->get_db_name(), port, sock, 0)) + { + fprintf(stderr, "%s\n", mysql_error(conn)); + exit(1); + } + + if (mysql_query(conn, "SET group_concat_max_len=10000;")) + { + fprintf(stderr, "%s\n", mysql_error(conn)); + exit(1); + } + + memset(tmp_sql, 0, sizeof(tmp_sql)); + sprintf(tmp_sql, " " + "SELECT Group_concat(cols) " + "FROM (SELECT 'op_type char(1)' cols " + " UNION ALL " + " SELECT Concat('`', column_name, '_old` ', column_type, ' ', " + " IF(character_set_name IS NOT NULL, " + " Concat('character set ', character_set_name, ' '), ' '), " + " IF(collation_name IS NOT NULL, " + " Concat('collate ', collation_name, ' '), ' ')) cols " + " FROM information_schema.columns " + " WHERE table_schema = '%s' " + " AND table_name = '%s' " + " UNION ALL " + " SELECT Concat('`', column_name, '_new` ', column_type, ' ', " + " IF(character_set_name IS NOT NULL, " + " Concat('character set ', character_set_name, ' '), ' '), " + " IF(collation_name IS NOT NULL, " + " Concat('collate ', collation_name, ' '), ' ')) cols " + " FROM information_schema.columns " + " WHERE table_schema = '%s' " + " AND table_name = '%s') tmp;", + map->get_db_name(), map->get_table_name(), + map->get_db_name(), map->get_table_name()); + + if (mysql_query(conn, tmp_sql)) + { + fprintf(stderr, "%s\n", mysql_error(conn)); + exit(1); + } + res = mysql_use_result(conn); + if ((row = mysql_fetch_row(res)) != NULL) // only one row + { + if (flashback_review_dbname) + { + ev->set_flashback_review_dbname(flashback_review_dbname); + } + else + { + ev->set_flashback_review_dbname(map->get_db_name()); + } + if (flashback_review_tablename) + { + ev->set_flashback_review_tablename(flashback_review_tablename); + } + else + { + memset(tmp_sql, 0, sizeof(tmp_sql)); + sprintf(tmp_sql, "__%s", map->get_table_name()); + ev->set_flashback_review_tablename(tmp_sql); + } + memset(tmp_sql, 0, sizeof(tmp_sql)); + tmp_sql_offset= sprintf(tmp_sql, "CREATE TABLE IF NOT EXISTS"); + tmp_sql_offset+= sprintf(tmp_sql + tmp_sql_offset, " `%s`.`%s` (%s) %s", + ev->get_flashback_review_dbname(), + ev->get_flashback_review_tablename(), + row[0], + print_event_info->delimiter); + } + fprintf(result_file, "%s\n", tmp_sql); + mysql_free_result(res); + mysql_close(conn); + } + else + { + char tmp_str[128]; + + if (flashback_review_dbname) + ev->set_flashback_review_dbname(flashback_review_dbname); + else + ev->set_flashback_review_dbname(map->get_db_name()); + + if (flashback_review_tablename) + ev->set_flashback_review_tablename(flashback_review_tablename); + else + { + memset(tmp_str, 0, sizeof(tmp_str)); + sprintf(tmp_str, "__%s", map->get_table_name()); + ev->set_flashback_review_tablename(tmp_str); + } + } + } +#endif + /* The Table map is to be printed, so it's just the time when we may print the kept Annotate event (if there is any). @@ -1294,6 +1444,38 @@ end: */ if (ev) { + /* Holding event output if needed */ + if (!ev->output_buf.is_empty()) + { + LEX_STRING tmp_str; + + tmp_str.length= ev->output_buf.length(); + tmp_str.str= ev->output_buf.release(); + + if (opt_flashback) + { + if (ev_type == STOP_EVENT) + stop_event_string.reset(tmp_str.str, tmp_str.length, tmp_str.length, + &my_charset_bin); + else + { + if (push_dynamic(&binlog_events, (uchar *) &tmp_str)) + { + error("Out of memory: can't allocate memory to store the flashback events."); + exit(1); + } + } + } + else + { + my_fwrite(result_file, (const uchar *) tmp_str.str, tmp_str.length, + MYF(MY_NABP)); + my_free(tmp_str.str); + } + } + + if (remote_opt) + ev->temp_buf= 0; if (destroy_evt) /* destroy it later if not set (ignored table map) */ delete ev; } @@ -1352,6 +1534,13 @@ static struct my_option my_options[] = "already have. NOTE: you will need a SUPER privilege to use this option.", &disable_log_bin, &disable_log_bin, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"flashback", 'B', "Flashback feature can rollback you committed data to a special time point.", +#ifdef WHEN_FLASHBACK_REVIEW_READY + "before Flashback feature writing a row, original row can insert to review-dbname.review-tablename," + "and mysqlbinlog will login mysql by user(-u) and password(-p) and host(-h).", +#endif + &opt_flashback, &opt_flashback, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, + 0, 0}, {"force-if-open", 'F', "Force if binlog was not closed properly.", &force_if_open_opt, &force_if_open_opt, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, @@ -1395,6 +1584,19 @@ static struct my_option my_options[] = "prefix for the file names.", &result_file_name, &result_file_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#ifdef WHEN_FLASHBACK_REVIEW_READY + {"review", opt_flashback_review, "Print review sql in output file.", + &opt_flashback_review, &opt_flashback_review, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, + 0, 0}, + {"review-dbname", opt_flashback_flashback_review_dbname, + "Writing flashback original row data into this db", + &flashback_review_dbname, &flashback_review_dbname, + 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"review-tablename", opt_flashback_flashback_review_tablename, + "Writing flashback original row data into this table", + &flashback_review_tablename, &flashback_review_tablename, + 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#endif {"server-id", 0, "Extract only binlog entries created by the server having the given id.", &server_id, &server_id, 0, GET_ULONG, @@ -1458,6 +1660,9 @@ static struct my_option my_options[] = &stop_position, &stop_position, 0, GET_ULL, REQUIRED_ARG, (longlong)(~(my_off_t)0), BIN_LOG_HEADER_SIZE, (ulonglong)(~(my_off_t)0), 0, 0, 0}, + {"table", 'T', "List entries for just this table (local log only).", + &table, &table, 0, GET_STR_ALLOC, REQUIRED_ARG, + 0, 0, 0, 0, 0, 0}, {"to-last-log", 't', "Requires -R. Will not stop at the end of the \ requested binlog but rather continue printing until the end of the last \ binlog of the MySQL server. If you send the output to the same MySQL server, \ @@ -1567,6 +1772,7 @@ static void cleanup() { my_free(pass); my_free(database); + my_free(table); my_free(host); my_free(user); my_free(const_cast(dirname_for_local_load)); @@ -1637,6 +1843,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; #endif #include + case 'B': + opt_flashback= 1; + break; case 'd': one_database = 1; break; @@ -1658,10 +1867,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case 'R': remote_opt= 1; break; + case 'T': + one_table= 1; + break; case OPT_MYSQL_PROTOCOL: opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib, opt->name); break; +#ifdef WHEN_FLASHBACK_REVIEW_READY + case opt_flashback_review: + opt_flashback_review= 1; + break; +#endif case OPT_START_DATETIME: start_datetime= convert_str_to_timestamp(start_datetime_str); break; @@ -1862,7 +2079,7 @@ static Exit_status dump_log_entries(const char* logname) dump_local_log_entries(&print_event_info, logname)); /* Set delimiter back to semicolon */ - if (!opt_raw_mode) + if (!opt_raw_mode && !opt_flashback) fprintf(result_file, "DELIMITER ;\n"); strmov(print_event_info.delimiter, ";"); return rc; @@ -2697,6 +2914,10 @@ int main(int argc, char** argv) my_set_max_open_files(open_files_limit); + if (opt_flashback) + my_init_dynamic_array(&binlog_events, sizeof(LEX_STRING), 1024, 1024, + MYF(0)); + if (opt_stop_never) to_last_remote_log= TRUE; @@ -2795,6 +3016,29 @@ int main(int argc, char** argv) start_position= BIN_LOG_HEADER_SIZE; } + /* + If enable flashback, need to print the events from the end to the + beginning + */ + if (opt_flashback) + { + for (uint i= binlog_events.elements; i > 0; --i) + { + LEX_STRING *event_str= dynamic_element(&binlog_events, i - 1, + LEX_STRING*); + fprintf(result_file, "%s", event_str->str); + my_free(event_str->str); + } + fprintf(result_file, "COMMIT\n/*!*/;\n"); + delete_dynamic(&binlog_events); + } + + /* Set delimiter back to semicolon */ + if (!stop_event_string.is_empty()) + fprintf(result_file, "%s", stop_event_string.ptr()); + if (!opt_raw_mode && opt_flashback) + fprintf(result_file, "DELIMITER ;\n"); + if (!opt_raw_mode) { /* diff --git a/client/mysqldump.c b/client/mysqldump.c index c5c94e07e96..a02dbdf3845 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2010, 2016, MariaDB + Copyright (c) 2010, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -199,12 +199,12 @@ const char *compatible_mode_names[]= }; #define MASK_ANSI_QUOTES \ (\ - (1<<2) | /* POSTGRESQL */\ - (1<<3) | /* ORACLE */\ - (1<<4) | /* MSSQL */\ - (1<<5) | /* DB2 */\ - (1<<6) | /* MAXDB */\ - (1<<10) /* ANSI */\ + (1U<<2) | /* POSTGRESQL */\ + (1U<<3) | /* ORACLE */\ + (1U<<4) | /* MSSQL */\ + (1U<<5) | /* DB2 */\ + (1U<<6) | /* MAXDB */\ + (1U<<10) /* ANSI */\ ) TYPELIB compatible_mode_typelib= {array_elements(compatible_mode_names) - 1, "", compatible_mode_names, NULL}; @@ -5476,7 +5476,7 @@ static ulong find_set(TYPELIB *lib, const char *x, size_t length, *err_len= var_len; } else - found|= ((longlong) 1 << (find - 1)); + found|= 1UL << (find - 1); if (pos == end) break; start= pos + 1; diff --git a/client/mysqltest.cc b/client/mysqltest.cc index c7b049ac45d..702098fc5bc 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -5156,6 +5156,7 @@ uint get_errcode_from_name(const char *error_name, const char *error_end) handler_error_names))) return tmp; die("Unknown SQL error name '%s'", error_name); + return 0; // Keep compiler happy } const char *unknown_error= ""; @@ -5786,6 +5787,7 @@ void do_connect(struct st_command *command) my_bool con_shm __attribute__ ((unused))= 0; int read_timeout= 0; int write_timeout= 0; + int connect_timeout= 0; struct st_connection* con_slot; static DYNAMIC_STRING ds_connection_name; @@ -5892,6 +5894,11 @@ void do_connect(struct st_command *command) { write_timeout= atoi(con_options + sizeof("write_timeout=")-1); } + else if (strncasecmp(con_options, "connect_timeout=", + sizeof("connect_timeout=")-1) == 0) + { + connect_timeout= atoi(con_options + sizeof("connect_timeout=")-1); + } else die("Illegal option to connect: %.*s", (int) (end - con_options), con_options); @@ -5976,6 +5983,12 @@ void do_connect(struct st_command *command) (char*)&write_timeout); } + if (connect_timeout) + { + mysql_options(con_slot->mysql, MYSQL_OPT_CONNECT_TIMEOUT, + (char*)&connect_timeout); + } + #ifdef HAVE_SMEM if (con_shm) { diff --git a/cmake/configure.pl b/cmake/configure.pl index 68baf436c1c..c502a172a22 100644 --- a/cmake/configure.pl +++ b/cmake/configure.pl @@ -165,21 +165,26 @@ foreach my $option (@ARGV) $cmakeargs = $cmakeargs." -DWITH_LIBEVENT=bundled"; next; } - if($option =~ /with-ssl=/) + if($option =~ /with-ssl=yes/) { $cmakeargs = $cmakeargs." -DWITH_SSL=yes"; next; } + if($option =~ /with-ssl=system/) + { + $cmakeargs = $cmakeargs." -DWITH_SSL=system"; + next; + } + if($option =~ /with-ssl$/) + { + $cmakeargs = $cmakeargs." -DWITH_SSL=bundled"; + next; + } if($option =~ /with-debug/) { $cmakeargs = $cmakeargs." -DCMAKE_BUILD_TYPE=Debug -DSECURITY_HARDENED=OFF"; next; } - if($option =~ /with-ssl/) - { - $cmakeargs = $cmakeargs." -DWITH_SSL=bundled"; - next; - } if($option =~ /prefix=/) { $cmake_install_prefix= substr($option, 7); diff --git a/cmake/for_clients.cmake b/cmake/for_clients.cmake index dd79ea1039d..f6a076f9632 100644 --- a/cmake/for_clients.cmake +++ b/cmake/for_clients.cmake @@ -45,10 +45,10 @@ MACRO(EXTRACT_LINK_LIBRARIES target var) ENDIF() ENDMACRO() -EXTRACT_LINK_LIBRARIES(mysqlclient LIBS) +EXTRACT_LINK_LIBRARIES(mariadb LIBS) EXTRACT_LINK_LIBRARIES(mysqlserver EMB_LIBS) -SET(LIBS "-lmysqlclient ${ZLIB_DEPS} ${LIBS} ${openssl_libs}") +SET(LIBS "-lmariadb ${ZLIB_DEPS} ${LIBS} ${openssl_libs}") SET(EMB_LIBS "-lmysqld ${ZLIB_DEPS} ${EMB_LIBS} ${openssl_libs}") MACRO(REPLACE_FOR_CLIENTS VAR) diff --git a/cmake/lz4.cmake b/cmake/lz4.cmake index 1607c68c5fb..075904589f0 100644 --- a/cmake/lz4.cmake +++ b/cmake/lz4.cmake @@ -19,9 +19,13 @@ MACRO (MYSQL_CHECK_LZ4) IF (WITH_INNODB_LZ4 STREQUAL "ON" OR WITH_INNODB_LZ4 STREQUAL "AUTO") CHECK_INCLUDE_FILES(lz4.h HAVE_LZ4_H) CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_limitedOutput "" HAVE_LZ4_SHARED_LIB) + CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT) IF (HAVE_LZ4_SHARED_LIB AND HAVE_LZ4_H) ADD_DEFINITIONS(-DHAVE_LZ4=1) + IF (HAVE_LZ4_COMPRESS_DEFAULT) + ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1) + ENDIF() LINK_LIBRARIES(lz4) ELSE() IF (WITH_INNODB_LZ4 STREQUAL "ON") @@ -35,9 +39,13 @@ MACRO (MYSQL_CHECK_LZ4_STATIC) IF (WITH_INNODB_LZ4 STREQUAL "ON" OR WITH_INNODB_LZ4 STREQUAL "AUTO") CHECK_INCLUDE_FILES(lz4.h HAVE_LZ4_H) CHECK_LIBRARY_EXISTS(liblz4.a LZ4_compress_limitedOutput "" HAVE_LZ4_LIB) + CHECK_LIBRARY_EXISTS(liblz3.a LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT) IF(HAVE_LZ4_LIB AND HAVE_LZ4_H) ADD_DEFINITIONS(-DHAVE_LZ4=1) + IF (HAVE_LZ4_COMPRESS_DEFAULT) + ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1) + ENDIF() LINK_LIBRARIES(liblz4.a) ELSE() IF (WITH_INNODB_LZ4 STREQUAL "ON") @@ -45,4 +53,4 @@ MACRO (MYSQL_CHECK_LZ4_STATIC) ENDIF() ENDIF() ENDIF() -ENDMACRO() \ No newline at end of file +ENDMACRO() diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake index 9f2c8797d2c..d407ea3d26f 100644 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake @@ -119,55 +119,19 @@ MACRO (MYSQL_CHECK_SSL) WITH_SSL STREQUAL "yes" OR WITH_SSL_PATH ) - # First search in WITH_SSL_PATH. - FIND_PATH(OPENSSL_ROOT_DIR - NAMES include/openssl/ssl.h - NO_CMAKE_PATH - NO_CMAKE_ENVIRONMENT_PATH - HINTS ${WITH_SSL_PATH} - ) - # Then search in standard places (if not found above). - FIND_PATH(OPENSSL_ROOT_DIR - NAMES include/openssl/ssl.h - ) - - FIND_PATH(OPENSSL_INCLUDE_DIR - NAMES openssl/ssl.h - HINTS ${OPENSSL_ROOT_DIR}/include - ) - - IF (WIN32) - FIND_FILE(OPENSSL_APPLINK_C - NAMES openssl/applink.c - HINTS ${OPENSSL_ROOT_DIR}/include - ) - MESSAGE_ONCE(OPENSSL_APPLINK_C "OPENSSL_APPLINK_C ${OPENSSL_APPLINK_C}") + IF(NOT OPENSSL_ROOT_DIR) + IF(WITH_SSL_PATH) + SET(OPENSSL_ROOT_DIR ${WITH_SSL_PATH}) + ENDIF() ENDIF() - - # On mac this list is <.dylib;.so;.a> - # We prefer static libraries, so we revert it here. - IF (WITH_SSL_PATH) - LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES) - ENDIF() - FIND_LIBRARY(OPENSSL_SSL_LIBRARY - NAMES ssl ssleay32 ssleay32MD - HINTS ${OPENSSL_ROOT_DIR}/lib) - FIND_LIBRARY(OPENSSL_CRYPTO_LIBRARY - NAMES crypto libeay32 - HINTS ${OPENSSL_ROOT_DIR}/lib) - MARK_AS_ADVANCED(OPENSSL_CRYPTO_LIBRARY OPENSSL_SSL_LIBRARY OPENSSL_ROOT_DIR - OPENSSL_INCLUDE_DIR) - IF (WITH_SSL_PATH) - LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES) - ENDIF() - - INCLUDE(CheckSymbolExists) - SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) - CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h" - HAVE_SHA512_DIGEST_LENGTH) - SET(CMAKE_REQUIRED_INCLUDES) - IF(OPENSSL_INCLUDE_DIR AND OPENSSL_SSL_LIBRARY AND - OPENSSL_CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH) + FIND_PACKAGE(OpenSSL) + IF(OPENSSL_FOUND) + SET(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY}) + INCLUDE(CheckSymbolExists) + SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h" + HAVE_SHA512_DIGEST_LENGTH) + SET(CMAKE_REQUIRED_INCLUDES) SET(SSL_SOURCES "") SET(SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY}) IF(CMAKE_SYSTEM_NAME MATCHES "SunOS") @@ -177,16 +141,6 @@ MACRO (MYSQL_CHECK_SSL) SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBDL}) ENDIF() - # Verify version number. Version information looks like: - # #define OPENSSL_VERSION_NUMBER 0x1000103fL - # Encoded as MNNFFPPS: major minor fix patch status - FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" - OPENSSL_VERSION_TEXT - REGEX "^# *define[\t ]+OPENSSL_VERSION_TEXT[\t ]+") - STRING(REGEX REPLACE - "^.*OPENSSL_VERSION_TEXT[\t ]+\"OpenSSL ([-0-9a-z.]+).*$" "\\1" - OPENSSL_VERSION "${OPENSSL_VERSION_TEXT}") - MESSAGE_ONCE(OPENSSL_INCLUDE_DIR "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}") MESSAGE_ONCE(OPENSSL_SSL_LIBRARY "OPENSSL_SSL_LIBRARY = ${OPENSSL_SSL_LIBRARY}") MESSAGE_ONCE(OPENSSL_CRYPTO_LIBRARY "OPENSSL_CRYPTO_LIBRARY = ${OPENSSL_CRYPTO_LIBRARY}") diff --git a/dbug/CMakeLists.txt b/dbug/CMakeLists.txt index 014efdeb9a3..84d6f1ba723 100644 --- a/dbug/CMakeLists.txt +++ b/dbug/CMakeLists.txt @@ -58,13 +58,13 @@ IF(NOT WIN32 AND NOT CMAKE_GENERATOR MATCHES Xcode) ADD_CUSTOM_COMMAND(OUTPUT user.ps DEPENDS user.r ${OUTPUT_INC} ${SOURCE_INC} COMMAND ${GROFF} -mm ${CMAKE_CURRENT_SOURCE_DIR}/user.r > user.ps || touch user.ps) - ADD_CUSTOM_TARGET(user.ps ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/user.ps) + ADD_CUSTOM_TARGET(user_ps ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/user.ps) ENDIF(GROFF) IF(NROFF) ADD_CUSTOM_COMMAND(OUTPUT user.t DEPENDS user.r ${OUTPUT_INC} ${SOURCE_INC} COMMAND ${NROFF} -mm ${CMAKE_CURRENT_SOURCE_DIR}/user.r > user.t || touch user.t) - ADD_CUSTOM_TARGET(user.t ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/user.t) + ADD_CUSTOM_TARGET(user_t ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/user.t) ENDIF(NROFF) ENDIF() diff --git a/dbug/dbug.c b/dbug/dbug.c index b2b298beb09..f51525897e2 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -115,18 +115,18 @@ * (until we add flags to _db_stack_frame_, increasing it by 4 bytes) */ -#define DEBUG_ON (1 << 1) /* Debug enabled */ -#define FILE_ON (1 << 2) /* File name print enabled */ -#define LINE_ON (1 << 3) /* Line number print enabled */ -#define DEPTH_ON (1 << 4) /* Function nest level print enabled */ -#define PROCESS_ON (1 << 5) /* Process name print enabled */ -#define NUMBER_ON (1 << 6) /* Number each line of output */ -#define PID_ON (1 << 8) /* Identify each line with process id */ -#define TIMESTAMP_ON (1 << 9) /* timestamp every line of output */ -#define FLUSH_ON_WRITE (1 << 10) /* Flush on every write */ -#define OPEN_APPEND (1 << 11) /* Open for append */ -#define SANITY_CHECK_ON (1 << 12) /* Check memory on every DBUG_ENTER/RETURN */ -#define TRACE_ON ((uint)1 << 31) /* Trace enabled. MUST be the highest bit!*/ +#define DEBUG_ON (1U << 1) /* Debug enabled */ +#define FILE_ON (1U << 2) /* File name print enabled */ +#define LINE_ON (1U << 3) /* Line number print enabled */ +#define DEPTH_ON (1U << 4) /* Function nest level print enabled */ +#define PROCESS_ON (1U << 5) /* Process name print enabled */ +#define NUMBER_ON (1U << 6) /* Number each line of output */ +#define PID_ON (1U << 8) /* Identify each line with process id */ +#define TIMESTAMP_ON (1U << 9) /* timestamp every line of output */ +#define FLUSH_ON_WRITE (1U << 10) /* Flush on every write */ +#define OPEN_APPEND (1U << 11) /* Open for append */ +#define SANITY_CHECK_ON (1U << 12) /* Check memory on every DBUG_ENTER/RETURN */ +#define TRACE_ON (1U << 31) /* Trace enabled. MUST be the highest bit!*/ #define sf_sanity() (0) #define TRACING (cs->stack->flags & TRACE_ON) @@ -1213,7 +1213,7 @@ void _db_return_(struct _db_stack_frame_ *_stack_frame_) * * SYNOPSIS * - * VOID _db_pargs_(_line_, keyword) + * int _db_pargs_(_line_, keyword) * int _line_; * char *keyword; * @@ -1226,12 +1226,14 @@ void _db_return_(struct _db_stack_frame_ *_stack_frame_) * */ -void _db_pargs_(uint _line_, const char *keyword) +int _db_pargs_(uint _line_, const char *keyword) { CODE_STATE *cs; - get_code_state_or_return; + get_code_state_or_return 0; cs->u_line= _line_; cs->u_keyword= keyword; + + return DEBUGGING && _db_keyword_(cs, cs->u_keyword, 0); } @@ -1265,27 +1267,24 @@ void _db_doprnt_(const char *format,...) { va_list args; CODE_STATE *cs; + int save_errno; + get_code_state_or_return; va_start(args,format); if (!cs->locked) pthread_mutex_lock(&THR_LOCK_dbug); - if (_db_keyword_(cs, cs->u_keyword, 0)) - { - int save_errno=errno; - DoPrefix(cs, cs->u_line); - if (TRACING) - Indent(cs, cs->level + 1); - else - (void) fprintf(cs->stack->out_file->file, "%s: ", cs->func); - (void) fprintf(cs->stack->out_file->file, "%s: ", cs->u_keyword); - DbugVfprintf(cs->stack->out_file->file, format, args); - DbugFlush(cs); - errno=save_errno; - } - else if (!cs->locked) - pthread_mutex_unlock(&THR_LOCK_dbug); + save_errno=errno; + DoPrefix(cs, cs->u_line); + if (TRACING) + Indent(cs, cs->level + 1); + else + (void) fprintf(cs->stack->out_file->file, "%s: ", cs->func); + (void) fprintf(cs->stack->out_file->file, "%s: ", cs->u_keyword); + DbugVfprintf(cs->stack->out_file->file, format, args); + DbugFlush(cs); + errno=save_errno; va_end(args); } diff --git a/debian/mariadb-server-10.2.install b/debian/mariadb-server-10.2.install index 71aeb1f560b..7ab6ccd7c7a 100644 --- a/debian/mariadb-server-10.2.install +++ b/debian/mariadb-server-10.2.install @@ -27,6 +27,7 @@ usr/bin/mysql_tzinfo_to_sql usr/bin/mysqlbinlog usr/bin/mysqld_multi usr/bin/mysqld_safe +usr/bin/mysqld_safe_helper usr/bin/mysqlhotcopy usr/bin/perror usr/bin/replace diff --git a/debian/mariadb-server-10.2.preinst b/debian/mariadb-server-10.2.preinst index f2b8882ab8e..ed987507d18 100644 --- a/debian/mariadb-server-10.2.preinst +++ b/debian/mariadb-server-10.2.preinst @@ -50,7 +50,7 @@ stop_server() { ################################ main() ########################## this_version=10.2 -max_upgradeable_version=5.6 +max_upgradeable_version=5.7 # Check if a flag file is found that indicates a previous MariaDB or MySQL # version was installed. If multiple flags are found, check which one was diff --git a/debian/mariadb-test.install b/debian/mariadb-test.install index 5e6c3717d1f..605620dc28c 100644 --- a/debian/mariadb-test.install +++ b/debian/mariadb-test.install @@ -17,7 +17,7 @@ usr/lib/mysql/plugin/qa_auth_client.so usr/lib/mysql/plugin/qa_auth_interface.so usr/lib/mysql/plugin/qa_auth_server.so usr/share/mysql/mysql-test/README -usr/share/mysql/mysql-test/README.gcov +usr/share/mysql/mysql-test/README-gcov usr/share/mysql/mysql-test/README.stress usr/share/mysql/mysql-test/disabled.def usr/share/mysql/mysql-test/lib 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 6547e4434f1..183212ef678 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 @@ -8,8 +8,8 @@ ## DP: http://bugs.mysql.com/bug.php?id=6901 @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 +--- a/scripts/mysql_system_tables_data.sql ++++ b/scripts/mysql_system_tables_data.sql @@ -26,16 +26,6 @@ -- a plain character SELECT LOWER( REPLACE((SELECT REPLACE(@@hostname,'_','\_')),'%','\%') )INTO @current_hostname; @@ -26,14 +26,14 @@ - -- Fill "user" table with default users allowing root access -- from local machine if "user" table didn't exist before - CREATE TEMPORARY TABLE tmp_user LIKE user; -@@ -43,8 +33,6 @@ INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y',' - REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N','',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,'','','N','N','',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,'','','N','N', '', 0); --INSERT INTO tmp_user (host,user) VALUES ('localhost',''); --INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost'; - INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; - DROP TABLE tmp_user; + CREATE TEMPORARY TABLE tmp_user_nopasswd LIKE user; +@@ -48,9 +38,6 @@ REPLACE INTO tmp_user_nopasswd VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y' + REPLACE INTO tmp_user_nopasswd VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N', '', 0); + -- More secure root account using unix sucket auth. + INSERT INTO tmp_user_socket VALUES ('localhost',IFNULL(@auth_root_socket, '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,'unix_socket','','N', 'N','', 0); +--- Anonymous user with no privileges. +-INSERT INTO tmp_user_anonymous (host,user) VALUES ('localhost',''); +-INSERT INTO tmp_user_anonymous (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost'; - + INSERT INTO user SELECT * FROM tmp_user_nopasswd WHERE @had_user_table=0 AND @skip_auth_root_nopasswd IS NULL; + INSERT INTO user SELECT * FROM tmp_user_socket WHERE @had_user_table=0 AND @auth_root_socket IS NOT NULL; diff --git a/debian/rules b/debian/rules index 707857a0bac..7aa09ea988b 100755 --- a/debian/rules +++ b/debian/rules @@ -84,6 +84,10 @@ endif -DCOMPILATION_COMMENT="mariadb.org binary distribution" \ -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \ -DSYSTEM_TYPE="debian-$(DEB_BUILD_GNU_SYSTEM)" \ + $${MYSQL_BUILD_CXX:+-DCMAKE_CXX_COMPILER=$${MYSQL_BUILD_CXX}} \ + $${MYSQL_BUILD_CC:+-DCMAKE_C_COMPILER=$${MYSQL_BUILD_CC}} \ + $${MYSQL_COMPILER_LAUNCHER:+-DCMAKE_CXX_COMPILER_LAUNCHER=${MYSQL_COMPILER_LAUNCHER}} \ + $${MYSQL_COMPILER_LAUNCHER:+-DCMAKE_C_COMPILER_LAUNCHER=${MYSQL_COMPILER_LAUNCHER}} \ -DCMAKE_SYSTEM_PROCESSOR=$(DEB_BUILD_ARCH) \ -DBUILD_CONFIG=mysql_release \ -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \ @@ -158,12 +162,12 @@ override_dh_auto_install: install -D -m 644 debian/mariadb-server-10.2.py $(TMP)/usr/share/apport/package-hooks/source_mariadb-10.2.py # Install libmariadbclient18 compatibility links - ln -s $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadbclient.so.18 + ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadbclient.so.18 # Install libmysqlclientclientXX compatibility links - ln -s $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.18 - ln -s $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.19 - ln -s $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.20 + ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.18 + ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.19 + ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb.so.3 $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so.20 touch $@ diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt index ee696c156f9..9cc5e7faa86 100644 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -80,6 +80,7 @@ IF(WITH_INNOBASE_STORAGE_ENGINE OR WITH_XTRADB_STORAGE_ENGINE) ../storage/innobase/buf/buf0buf.cc ../storage/innobase/page/page0zip.cc ../storage/innobase/os/os0file.cc + ../storage/innobase/fil/fil0crypt.cc ) @@ -97,4 +98,7 @@ IF(UNIX) MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c COMPONENT Client) TARGET_LINK_LIBRARIES(mysql_waitpid mysys) + + MYSQL_ADD_EXECUTABLE(mysqld_safe_helper mysqld_safe_helper.c COMPONENT Server) + TARGET_LINK_LIBRARIES(mysqld_safe_helper mysys) ENDIF() diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc index ce631c13952..393b1af062c 100644 --- a/extra/innochecksum.cc +++ b/extra/innochecksum.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. - Copyright (c) 2014, 2016, MariaDB Corporation. + Copyright (c) 2014, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -70,6 +70,24 @@ The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */ #define PRIuMAX "llu" #endif +/********************************************************************* +Verify checksum for a page (iff it's encrypted) +NOTE: currently this function can only be run in single threaded mode +as it modifies srv_checksum_algorithm (temporarily) +@param[in] src_fame page to verify +@param[in] page_size page_size +@param[in] page_no page number of given read_buf +@param[in] strict_check true if strict-check option is enabled +@return true if page is encrypted AND OK, false otherwise */ +UNIV_INTERN +bool +fil_space_verify_crypt_checksum( +/*============================*/ + const byte* src_frame, /*!< in: page the verify */ + const page_size_t& page_size /*!< in: page size */ + ,uintmax_t page_no, + bool strict_check); + /* Global variables */ static bool verbose; static bool just_count; @@ -564,9 +582,25 @@ is_page_corrupted( } } - is_corrupted = buf_page_is_corrupted( - true, buf, page_size, false, cur_page_num, strict_verify, - is_log_enabled, log_file); + /* If page is encrypted, use different checksum calculation + as innochecksum can't decrypt pages. Note that some old InnoDB + versions did not initialize FIL_PAGE_FILE_FLUSH_LSN field + so if crypt checksum does not match we verify checksum using + normal method. + */ + if (mach_read_from_4(buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION) != 0) { + is_corrupted = fil_space_verify_crypt_checksum(buf, page_size, + cur_page_num, strict_verify); + } else { + is_corrupted = true; + } + + if (is_corrupted) { + is_corrupted = buf_page_is_corrupted( + true, buf, page_size, false, + cur_page_num, strict_verify, + is_log_enabled, log_file); + } return(is_corrupted); } @@ -1312,10 +1346,8 @@ static struct my_option innochecksum_options[] = { 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"verbose", 'v', "Verbose (prints progress every 5 seconds).", &verbose, &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, -#ifndef DBUG_OFF {"debug", '#', "Output debug log. See " REFMAN "dbug-package.html", &dbug_setting, &dbug_setting, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, -#endif /* !DBUG_OFF */ {"count", 'c', "Print the count of pages in the file and exits.", &just_count, &just_count, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"start_page", 's', "Start on this page number (0 based).", @@ -1347,7 +1379,7 @@ static struct my_option innochecksum_options[] = { {"log", 'l', "log output.", &log_filename, &log_filename, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"leaf", 'l', "Examine leaf index pages", + {"leaf", 'e', "Examine leaf index pages", &do_leaf, &do_leaf, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"merge", 'm', "leaf page count if merge given number of consecutive pages", &n_merge, &n_merge, 0, GET_ULONG, REQUIRED_ARG, 0, 0, (longlong)10L, 0, 1, 0}, @@ -1377,7 +1409,7 @@ static void usage(void) printf("Usage: %s [-c] [-s ] [-e ] " "[-p ] [-v] [-a ] [-n] " "[-C ] [-w ] [-S] [-D ] " - "[-l ] \n", my_progname); + "[-l ] [-e] \n", my_progname); printf("See " REFMAN "innochecksum.html for usage hints.\n"); my_print_help(innochecksum_options); my_print_variables(innochecksum_options); diff --git a/extra/mysqld_safe_helper.c b/extra/mysqld_safe_helper.c new file mode 100644 index 00000000000..09e507c6e1c --- /dev/null +++ b/extra/mysqld_safe_helper.c @@ -0,0 +1,77 @@ +#include +#include +#include +#include +#ifdef HAVE_PWD_H +#include +#endif +#include +#include + +void my_exit(int c) +{ + my_end(0); + exit(c); +} + +void do_usage() +{ + printf("Usage:\n" + " %s log \n" + " %s exec \n", + my_progname, my_progname); + my_exit(1); +} + +void do_log(const char *logfile) +{ + FILE *f; + uchar buf[4096]; + int size; + + if (!logfile) + do_usage(); + + f= my_fopen(logfile, O_WRONLY|O_APPEND|O_CREAT, MYF(MY_WME)); + if (!f) + my_exit(1); + + while ((size= my_fread(stdin, buf, sizeof(buf), MYF(MY_WME))) > 0) + if ((int)my_fwrite(f, buf, size, MYF(MY_WME)) != size) + my_exit(1); + + my_fclose(f, MYF(0)); + my_exit(0); +} + +void do_exec(char *args[]) +{ + if (!args[0]) + do_usage(); + + my_end(0); + execvp(args[0], args); +} + +int main(int argc, char *argv[]) +{ + struct passwd *user_info; + MY_INIT(argv[0]); + + if (argc < 3) + do_usage(argv[0]); + + user_info= my_check_user(argv[1], MYF(0)); + if (user_info ? my_set_user(argv[1], user_info, MYF(MY_WME)) + : my_errno == EINVAL) + my_exit(1); + + if (strcmp(argv[2], "log") == 0) + do_log(argv[3]); + + if (strcmp(argv[2], "exec") == 0) + do_exec(argv+3); + + my_end(0); + return 1; +} diff --git a/extra/yassl/taocrypt/include/misc.hpp b/extra/yassl/taocrypt/include/misc.hpp index cb4d26e70c6..159b63c89d7 100644 --- a/extra/yassl/taocrypt/include/misc.hpp +++ b/extra/yassl/taocrypt/include/misc.hpp @@ -1,5 +1,6 @@ /* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -599,8 +600,8 @@ inline word16 UnalignedGetWordNonTemplate(ByteOrder order, const byte* block, word16*) { return (order == BigEndianOrder) - ? block[1] | (block[0] << 8) - : block[0] | (block[1] << 8); + ? word16(block[1] | (word16(block[0]) << 8)) + : word16(block[0] | (word16(block[1]) << 8)); } inline word32 UnalignedGetWordNonTemplate(ByteOrder order, const byte* block, @@ -625,7 +626,7 @@ inline void UnalignedPutWord(ByteOrder order, byte *block, byte value, block[0] = xorBlock ? (value ^ xorBlock[0]) : value; } -#define GETBYTE(x, y) (unsigned int)byte((x)>>(8*(y))) +#define GETBYTE(x, y) byte((x)>>(8*(y))) inline void UnalignedPutWord(ByteOrder order, byte *block, word16 value, const byte *xorBlock = 0) @@ -827,7 +828,7 @@ word ShiftWordsLeftByBits(word* r, unsigned int n, unsigned int shiftBits) inline -word ShiftWordsRightByBits(word* r, unsigned int n, unsigned int shiftBits) +word ShiftWordsRightByBits(word* r, int n, unsigned int shiftBits) { word u, carry=0; if (shiftBits) diff --git a/extra/yassl/taocrypt/include/modes.hpp b/extra/yassl/taocrypt/include/modes.hpp index bfe8c6ec5d4..f65bc217947 100644 --- a/extra/yassl/taocrypt/include/modes.hpp +++ b/extra/yassl/taocrypt/include/modes.hpp @@ -1,5 +1,6 @@ /* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -57,7 +58,7 @@ class Mode_BASE : public virtual_base { public: enum { MaxBlockSz = 16 }; - explicit Mode_BASE(int sz, CipherDir dir, Mode mode) + explicit Mode_BASE(unsigned sz, CipherDir dir, Mode mode) : blockSz_(sz), reg_(reinterpret_cast(r_)), tmp_(reinterpret_cast(t_)), dir_(dir), mode_(mode) {} @@ -67,7 +68,7 @@ public: void SetIV(const byte* iv) { memcpy(reg_, iv, blockSz_); } protected: - int blockSz_; + unsigned blockSz_; byte* reg_; byte* tmp_; diff --git a/include/hash.h b/include/hash.h index 4d575fe1736..6b379cdab59 100644 --- a/include/hash.h +++ b/include/hash.h @@ -42,7 +42,7 @@ extern "C" { #define HASH_UNIQUE 1 /* hash_insert fails on duplicate key */ #define HASH_THREAD_SPECIFIC 2 /* Mark allocated memory THREAD_SPECIFIC */ -typedef uint my_hash_value_type; +typedef uint32 my_hash_value_type; typedef uchar *(*my_hash_get_key)(const uchar *,size_t*,my_bool); typedef my_hash_value_type (*my_hash_function)(CHARSET_INFO *, const uchar *, size_t); diff --git a/include/json_lib.h b/include/json_lib.h index ce7f27317bc..cdfcffad38a 100644 --- a/include/json_lib.h +++ b/include/json_lib.h @@ -219,7 +219,7 @@ typedef struct st_json_engine_t /* string constants. */ int stack[JSON_DEPTH_LIMIT]; /* Keeps the stack of nested JSON structures. */ - int *stack_p; /* The 'stack' pointer. */ + int stack_p; /* The 'stack' pointer. */ } json_engine_t; @@ -308,7 +308,7 @@ typedef const int *json_level_t; */ #define json_get_level(j) (j->stack_p) -int json_skip_to_level(json_engine_t *j, json_level_t level); +int json_skip_to_level(json_engine_t *j, int level); /* json_skip_level() works as above with just current structre. @@ -391,6 +391,32 @@ int json_append_ascii(CHARSET_INFO *json_cs, uchar *json, uchar *json_end, const uchar *ascii, const uchar *ascii_end); + +/* + Scan the JSON and return paths met one-by-one. + json_get_path_start(&p) + while (json_get_path_next(&p)) + { + handle_the_next_path(); + } +*/ + +int json_get_path_start(json_engine_t *je, CHARSET_INFO *i_cs, + const uchar *str, const uchar *end, + json_path_t *p); + + +int json_get_path_next(json_engine_t *je, json_path_t *p); + + +int json_path_parts_compare( + const json_path_step_t *a, const json_path_step_t *a_end, + const json_path_step_t *b, const json_path_step_t *b_end, + enum json_value_types vt); +int json_path_compare(const json_path_t *a, const json_path_t *b, + enum json_value_types vt); + + #ifdef __cplusplus } #endif diff --git a/include/my_base.h b/include/my_base.h index 84b2e28d340..89f5e826fd5 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2012, Oracle and/or its affiliates. - Copyright (c) 1995, 2012 Monty Program Ab + Copyright (c) 1995, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -34,25 +34,25 @@ /* The following is bits in the flag parameter to ha_open() */ -#define HA_OPEN_ABORT_IF_LOCKED 0 /* default */ -#define HA_OPEN_WAIT_IF_LOCKED 1 -#define HA_OPEN_IGNORE_IF_LOCKED 2 -#define HA_OPEN_TMP_TABLE 4 /* Table is a temp table */ -#define HA_OPEN_DELAY_KEY_WRITE 8 /* Don't update index */ -#define HA_OPEN_ABORT_IF_CRASHED 16 -#define HA_OPEN_FOR_REPAIR 32 /* open even if crashed */ -#define HA_OPEN_FROM_SQL_LAYER 64 -#define HA_OPEN_MMAP 128 /* open memory mapped */ -#define HA_OPEN_COPY 256 /* Open copy (for repair) */ +#define HA_OPEN_ABORT_IF_LOCKED 0U /* default */ +#define HA_OPEN_WAIT_IF_LOCKED 1U +#define HA_OPEN_IGNORE_IF_LOCKED 2U +#define HA_OPEN_TMP_TABLE 4U /* Table is a temp table */ +#define HA_OPEN_DELAY_KEY_WRITE 8U /* Don't update index */ +#define HA_OPEN_ABORT_IF_CRASHED 16U +#define HA_OPEN_FOR_REPAIR 32U /* open even if crashed */ +#define HA_OPEN_FROM_SQL_LAYER 64U +#define HA_OPEN_MMAP 128U /* open memory mapped */ +#define HA_OPEN_COPY 256U /* Open copy (for repair) */ /* Internal temp table, used for temporary results */ -#define HA_OPEN_INTERNAL_TABLE 512 -#define HA_OPEN_NO_PSI_CALL 1024 /* Don't call/connect PSI */ -#define HA_OPEN_MERGE_TABLE 2048 +#define HA_OPEN_INTERNAL_TABLE 512U +#define HA_OPEN_NO_PSI_CALL 1024U /* Don't call/connect PSI */ +#define HA_OPEN_MERGE_TABLE 2048U /* Allow opening even if table is incompatible as this is for ALTER TABLE which will fix the table structure. */ -#define HA_OPEN_FOR_ALTER 4096 +#define HA_OPEN_FOR_ALTER 4096U /* The following is parameter to ha_rkey() how to use key */ @@ -248,15 +248,15 @@ enum ha_base_keytype { Note that these can only be up to 16 bits! */ -#define HA_NOSAME 1 /* Set if not dupplicated records */ -#define HA_PACK_KEY 2 /* Pack string key to previous key */ -#define HA_AUTO_KEY 16 -#define HA_BINARY_PACK_KEY 32 /* Packing of all keys to prev key */ -#define HA_FULLTEXT 128 /* For full-text search */ -#define HA_UNIQUE_CHECK 256 /* Check the key for uniqueness */ -#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_NOSAME 1U /* Set if not dupplicated records */ +#define HA_PACK_KEY 2U /* Pack string key to previous key */ +#define HA_AUTO_KEY 16U +#define HA_BINARY_PACK_KEY 32U /* Packing of all keys to prev key */ +#define HA_FULLTEXT 128U /* For full-text search */ +#define HA_UNIQUE_CHECK 256U /* Check the key for uniqueness */ +#define HA_SPATIAL 1024U /* For spatial search */ +#define HA_NULL_ARE_EQUAL 2048U /* NULL in key are cmp as equal */ +#define HA_GENERATED_KEY 8192U /* Automaticly generated key */ /* The combination of the above can be used for key type comparison. */ #define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \ @@ -303,25 +303,25 @@ enum ha_base_keytype { #define HA_CAN_MEMCMP 2048 /* internal, never stored in frm */ /* optionbits for database */ -#define HA_OPTION_PACK_RECORD 1 -#define HA_OPTION_PACK_KEYS 2 -#define HA_OPTION_COMPRESS_RECORD 4 -#define HA_OPTION_LONG_BLOB_PTR 8 /* new ISAM format */ -#define HA_OPTION_TMP_TABLE 16 -#define HA_OPTION_CHECKSUM 32 -#define HA_OPTION_DELAY_KEY_WRITE 64 -#define HA_OPTION_NO_PACK_KEYS 128 /* Reserved for MySQL */ +#define HA_OPTION_PACK_RECORD 1U +#define HA_OPTION_PACK_KEYS 2U +#define HA_OPTION_COMPRESS_RECORD 4U +#define HA_OPTION_LONG_BLOB_PTR 8U /* new ISAM format */ +#define HA_OPTION_TMP_TABLE 16U +#define HA_OPTION_CHECKSUM 32U +#define HA_OPTION_DELAY_KEY_WRITE 64U +#define HA_OPTION_NO_PACK_KEYS 128U /* Reserved for MySQL */ /* unused 256 */ -#define HA_OPTION_RELIES_ON_SQL_LAYER 512 -#define HA_OPTION_NULL_FIELDS 1024 -#define HA_OPTION_PAGE_CHECKSUM 2048 +#define HA_OPTION_RELIES_ON_SQL_LAYER 512U +#define HA_OPTION_NULL_FIELDS 1024U +#define HA_OPTION_PAGE_CHECKSUM 2048U /* STATS_PERSISTENT=1 has been specified in the SQL command (either CREATE or ALTER TABLE). Table and index statistics that are collected by the storage engine and used by the optimizer for query optimization will be stored on disk and will not change after a server restart. */ -#define HA_OPTION_STATS_PERSISTENT 4096 +#define HA_OPTION_STATS_PERSISTENT 4096U /* STATS_PERSISTENT=0 has been specified in CREATE/ALTER TABLE. Statistics for the table will be wiped away on server shutdown and new ones recalculated @@ -330,31 +330,31 @@ enum ha_base_keytype { explicitly set at table level and the corresponding table will use whatever is the global server default. */ -#define HA_OPTION_NO_STATS_PERSISTENT 8192 +#define HA_OPTION_NO_STATS_PERSISTENT 8192U /* .frm has extra create options in linked-list format */ -#define HA_OPTION_TEXT_CREATE_OPTIONS_legacy (1L << 14) /* 5.2 to 5.5, unused since 10.0 */ -#define HA_OPTION_TEMP_COMPRESS_RECORD (1L << 15) /* set by isamchk */ -#define HA_OPTION_READ_ONLY_DATA (1L << 16) /* Set by isamchk */ -#define HA_OPTION_NO_CHECKSUM (1L << 17) -#define HA_OPTION_NO_DELAY_KEY_WRITE (1L << 18) +#define HA_OPTION_TEXT_CREATE_OPTIONS_legacy (1U << 14) /* 5.2 to 5.5, unused since 10.0 */ +#define HA_OPTION_TEMP_COMPRESS_RECORD (1U << 15) /* set by isamchk */ +#define HA_OPTION_READ_ONLY_DATA (1U << 16) /* Set by isamchk */ +#define HA_OPTION_NO_CHECKSUM (1U << 17) +#define HA_OPTION_NO_DELAY_KEY_WRITE (1U << 18) /* Bits in flag to create() */ -#define HA_DONT_TOUCH_DATA 1 /* Don't empty datafile (isamchk) */ -#define HA_PACK_RECORD 2 /* Request packed record format */ -#define HA_CREATE_TMP_TABLE 4 -#define HA_CREATE_CHECKSUM 8 -#define HA_CREATE_KEEP_FILES 16 /* don't overwrite .MYD and MYI */ -#define HA_CREATE_PAGE_CHECKSUM 32 -#define HA_CREATE_DELAY_KEY_WRITE 64 -#define HA_CREATE_RELIES_ON_SQL_LAYER 128 -#define HA_CREATE_INTERNAL_TABLE 256 -#define HA_PRESERVE_INSERT_ORDER 512 +#define HA_DONT_TOUCH_DATA 1U /* Don't empty datafile (isamchk) */ +#define HA_PACK_RECORD 2U /* Request packed record format */ +#define HA_CREATE_TMP_TABLE 4U +#define HA_CREATE_CHECKSUM 8U +#define HA_CREATE_KEEP_FILES 16U /* don't overwrite .MYD and MYI */ +#define HA_CREATE_PAGE_CHECKSUM 32U +#define HA_CREATE_DELAY_KEY_WRITE 64U +#define HA_CREATE_RELIES_ON_SQL_LAYER 128U +#define HA_CREATE_INTERNAL_TABLE 256U +#define HA_PRESERVE_INSERT_ORDER 512U /* Flags used by start_bulk_insert */ -#define HA_CREATE_UNIQUE_INDEX_BY_SORT 1 +#define HA_CREATE_UNIQUE_INDEX_BY_SORT 1U /* @@ -366,44 +366,44 @@ enum ha_base_keytype { */ /* this one is not used */ -#define HA_STATUS_POS 1 +#define HA_STATUS_POS 1U /* assuming the table keeps shared actual copy of the 'info' and local, possibly outdated copy, the following flag means that it should not try to get the actual data (locking the shared structure) slightly outdated version will suffice */ -#define HA_STATUS_NO_LOCK 2 +#define HA_STATUS_NO_LOCK 2U /* update the time of the last modification (in handler::update_time) */ -#define HA_STATUS_TIME 4 +#define HA_STATUS_TIME 4U /* update the 'constant' part of the info: handler::max_data_file_length, max_index_file_length, create_time sortkey, ref_length, block_size, data_file_name, index_file_name. handler::table->s->keys_in_use, keys_for_keyread, rec_per_key */ -#define HA_STATUS_CONST 8 +#define HA_STATUS_CONST 8U /* update the 'variable' part of the info: handler::records, deleted, data_file_length, index_file_length, check_time, mean_rec_length */ -#define HA_STATUS_VARIABLE 16 +#define HA_STATUS_VARIABLE 16U /* get the information about the key that caused last duplicate value error update handler::errkey and handler::dupp_ref see handler::get_dup_key() */ -#define HA_STATUS_ERRKEY 32 +#define HA_STATUS_ERRKEY 32U /* update handler::auto_increment_value */ -#define HA_STATUS_AUTO 64 +#define HA_STATUS_AUTO 64U /* Get also delete_length when HA_STATUS_VARIABLE is called. It's ok to set it also when only HA_STATUS_VARIABLE but it won't be used. */ -#define HA_STATUS_VARIABLE_EXTRA 128 +#define HA_STATUS_VARIABLE_EXTRA 128U /* Errorcodes given by handler functions @@ -521,23 +521,23 @@ typedef ulong key_part_map; /* Intern constants in databases */ /* bits in _search */ -#define SEARCH_FIND 1 -#define SEARCH_NO_FIND 2 -#define SEARCH_SAME 4 -#define SEARCH_BIGGER 8 -#define SEARCH_SMALLER 16 -#define SEARCH_SAVE_BUFF 32 -#define SEARCH_UPDATE 64 -#define SEARCH_PREFIX 128 -#define SEARCH_LAST 256 -#define MBR_CONTAIN 512 -#define MBR_INTERSECT 1024 -#define MBR_WITHIN 2048 -#define MBR_DISJOINT 4096 -#define MBR_EQUAL 8192 -#define MBR_DATA 16384 -#define SEARCH_NULL_ARE_EQUAL 32768 /* NULL in keys are equal */ -#define SEARCH_NULL_ARE_NOT_EQUAL 65536 /* NULL in keys are not equal */ +#define SEARCH_FIND 1U +#define SEARCH_NO_FIND 2U +#define SEARCH_SAME 4U +#define SEARCH_BIGGER 8U +#define SEARCH_SMALLER 16U +#define SEARCH_SAVE_BUFF 32U +#define SEARCH_UPDATE 64U +#define SEARCH_PREFIX 128U +#define SEARCH_LAST 256U +#define MBR_CONTAIN 512U +#define MBR_INTERSECT 1024U +#define MBR_WITHIN 2048U +#define MBR_DISJOINT 4096U +#define MBR_EQUAL 8192U +#define MBR_DATA 16384U +#define SEARCH_NULL_ARE_EQUAL 32768U /* NULL in keys are equal */ +#define SEARCH_NULL_ARE_NOT_EQUAL 65536U/* NULL in keys are not equal */ /* Use this when inserting a key in position order */ #define SEARCH_INSERT (SEARCH_NULL_ARE_NOT_EQUAL*2) /* Only part of the key is specified while reading */ @@ -548,27 +548,27 @@ typedef ulong key_part_map; #define SEARCH_PAGE_KEY_HAS_TRANSID (SEARCH_USER_KEY_HAS_TRANSID*2) /* bits in opt_flag */ -#define QUICK_USED 1 -#define READ_CACHE_USED 2 -#define READ_CHECK_USED 4 -#define KEY_READ_USED 8 -#define WRITE_CACHE_USED 16 -#define OPT_NO_ROWS 32 +#define QUICK_USED 1U +#define READ_CACHE_USED 2U +#define READ_CHECK_USED 4U +#define KEY_READ_USED 8U +#define WRITE_CACHE_USED 16U +#define OPT_NO_ROWS 32U /* bits in update */ -#define HA_STATE_CHANGED 1 /* Database has changed */ -#define HA_STATE_AKTIV 2 /* Has a current record */ -#define HA_STATE_WRITTEN 4 /* Record is written */ -#define HA_STATE_DELETED 8 -#define HA_STATE_NEXT_FOUND 16 /* Next found record (record before) */ -#define HA_STATE_PREV_FOUND 32 /* Prev found record (record after) */ -#define HA_STATE_NO_KEY 64 /* Last read didn't find record */ -#define HA_STATE_KEY_CHANGED 128 -#define HA_STATE_WRITE_AT_END 256 /* set in _ps_find_writepos */ -#define HA_STATE_BUFF_SAVED 512 /* If current keybuff is info->buff */ -#define HA_STATE_ROW_CHANGED 1024 /* To invalidate ROW cache */ -#define HA_STATE_EXTEND_BLOCK 2048 -#define HA_STATE_RNEXT_SAME 4096 /* rnext_same occupied lastkey2 */ +#define HA_STATE_CHANGED 1U /* Database has changed */ +#define HA_STATE_AKTIV 2U /* Has a current record */ +#define HA_STATE_WRITTEN 4U /* Record is written */ +#define HA_STATE_DELETED 8U +#define HA_STATE_NEXT_FOUND 16U /* Next found record (record before) */ +#define HA_STATE_PREV_FOUND 32U /* Prev found record (record after) */ +#define HA_STATE_NO_KEY 64U /* Last read didn't find record */ +#define HA_STATE_KEY_CHANGED 128U +#define HA_STATE_WRITE_AT_END 256U /* set in _ps_find_writepos */ +#define HA_STATE_BUFF_SAVED 512U /* If current keybuff is info->buff */ +#define HA_STATE_ROW_CHANGED 1024U /* To invalidate ROW cache */ +#define HA_STATE_EXTEND_BLOCK 2048U +#define HA_STATE_RNEXT_SAME 4096U /* rnext_same occupied lastkey2 */ /* myisampack expects no more than 32 field types. */ enum en_fieldtype { @@ -584,15 +584,15 @@ enum data_file_type { /* For key ranges */ -#define NO_MIN_RANGE 1 -#define NO_MAX_RANGE 2 -#define NEAR_MIN 4 -#define NEAR_MAX 8 -#define UNIQUE_RANGE 16 -#define EQ_RANGE 32 -#define NULL_RANGE 64 -#define GEOM_FLAG 128 -#define SKIP_RANGE 256 +#define NO_MIN_RANGE 1U +#define NO_MAX_RANGE 2U +#define NEAR_MIN 4U +#define NEAR_MAX 8U +#define UNIQUE_RANGE 16U +#define EQ_RANGE 32U +#define NULL_RANGE 64U +#define GEOM_FLAG 128U +#define SKIP_RANGE 256U typedef struct st_key_range { diff --git a/include/my_bit.h b/include/my_bit.h index 218829ba747..01cad95792c 100644 --- a/include/my_bit.h +++ b/include/my_bit.h @@ -1,5 +1,5 @@ /* Copyright (c) 2007, 2011, Oracle and/or its affiliates. - Copyright (c) 2009-2011, Monty Program Ab + Copyright (c) 2009, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -108,7 +108,7 @@ static inline uint32 my_clear_highest_bit(uint32 v) static inline uint32 my_reverse_bits(uint32 key) { - return + return (uint32) (_my_bits_reverse_table[ key & 255] << 24) | (_my_bits_reverse_table[(key>> 8) & 255] << 16) | (_my_bits_reverse_table[(key>>16) & 255] << 8) | diff --git a/include/my_dbug.h b/include/my_dbug.h index d56033ab025..ba9e8a025d7 100644 --- a/include/my_dbug.h +++ b/include/my_dbug.h @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. - Copyright (C) 2000-2011 Monty Program Ab + Copyright (C) 2000, 2017, MariaDB Corporation Ab This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ extern void _db_set_init_(const char *control); extern void _db_enter_(const char *_func_, const char *_file_, uint _line_, struct _db_stack_frame_ *_stack_frame_); extern void _db_return_(struct _db_stack_frame_ *_stack_frame_); -extern void _db_pargs_(uint _line_,const char *keyword); +extern int _db_pargs_(uint _line_,const char *keyword); extern void _db_doprnt_(const char *format,...) ATTRIBUTE_FORMAT(printf, 1, 2); extern void _db_dump_(uint _line_,const char *keyword, @@ -91,7 +91,7 @@ extern const char* _db_get_func_(void); #define DBUG_EVALUATE_IF(keyword,a1,a2) \ (_db_keyword_(0,(keyword), 1) ? (a1) : (a2)) #define DBUG_PRINT(keyword,arglist) \ - do {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;} while(0) + do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0) #define DBUG_PUSH(a1) _db_push_ (a1) #define DBUG_POP() _db_pop_ () #define DBUG_SET(a1) _db_set_ (a1) @@ -193,8 +193,18 @@ void debug_sync_point(const char* lock_name, uint lock_timeout); #define DBUG_SYNC_POINT(lock_name,lock_timeout) #endif /* EXTRA_DEBUG */ -#ifdef __cplusplus +#ifdef __cplusplus } +# ifdef DBUG_OFF +# define DBUG_LOG(keyword, v) do {} while (0) +# else +# include +# define DBUG_LOG(keyword, v) do { \ + if (_db_pargs_(__LINE__, keyword)) { \ + std::ostringstream _db_s; _db_s << v; \ + _db_doprnt_("%s", _db_s.str().c_str()); \ + }} while (0) +# endif #endif #endif /* _my_dbug_h */ diff --git a/include/my_global.h b/include/my_global.h index 4f40d3e0615..e4ca562772e 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1,6 +1,6 @@ /* Copyright (c) 2001, 2013, Oracle and/or its affiliates. - Copyright (c) 2010, 2013, Monty Program Ab. + Copyright (c) 2010, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -677,7 +677,7 @@ typedef SOCKET_SIZE_TYPE size_socket; smaller what the disk page size. This influences the speed of the isam btree library. eg to big to slow. */ -#define IO_SIZE 4096 +#define IO_SIZE 4096U /* How much overhead does malloc have. The code often allocates something like 1024-MALLOC_OVERHEAD bytes diff --git a/include/my_pthread.h b/include/my_pthread.h index bf61a024390..a38636af87d 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2014, Oracle and/or its affiliates. - Copyright (c) 2009, 2014, MariaDB + Copyright (c) 2009, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -651,7 +651,7 @@ extern pthread_mutexattr_t my_errorcheck_mutexattr; #define ESRCH 1 #endif -typedef int64 my_thread_id; +typedef uint64 my_thread_id; extern void my_threadattr_global_init(void); extern my_bool my_thread_global_init(void); diff --git a/include/my_sys.h b/include/my_sys.h index c8f3e1bf3a4..6834bbd8dc2 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2010, 2016, Monty Program Ab. + Copyright (c) 2010, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -60,75 +60,75 @@ typedef struct my_aio_result { #define MY_FILE_ERROR ((size_t) -1) /* General bitmaps for my_func's */ -#define MY_FFNF 1 /* Fatal if file not found */ -#define MY_FNABP 2 /* Fatal if not all bytes read/writen */ -#define MY_NABP 4 /* Error if not all bytes read/writen */ -#define MY_FAE 8 /* Fatal if any error */ -#define MY_WME 16 /* Write message on error */ -#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */ -#define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */ -#define MY_ENCRYPT 64 /* Encrypt IO_CACHE temporary files */ -#define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */ -#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */ -#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */ -#define MY_COPYTIME 64 /* my_redel() copys time */ -#define MY_DELETE_OLD 256 /* my_create_with_symlink() */ -#define MY_RESOLVE_LINK 128 /* my_realpath(); Only resolve links */ -#define MY_HOLD_ORIGINAL_MODES 128 /* my_copy() holds to file modes */ -#define MY_REDEL_MAKE_BACKUP 256 -#define MY_SEEK_NOT_DONE 32 /* my_lock may have to do a seek */ -#define MY_SHORT_WAIT 64 /* my_lock() don't wait if can't lock */ -#define MY_FORCE_LOCK 128 /* use my_lock() even if disable_locking */ -#define MY_NO_WAIT 256 /* my_lock() don't wait at all */ +#define MY_FFNF 1U /* Fatal if file not found */ +#define MY_FNABP 2U /* Fatal if not all bytes read/writen */ +#define MY_NABP 4U /* Error if not all bytes read/writen */ +#define MY_FAE 8U /* Fatal if any error */ +#define MY_WME 16U /* Write message on error */ +#define MY_WAIT_IF_FULL 32U /* Wait and try again if disk full error */ +#define MY_IGNORE_BADFD 32U /* my_sync: ignore 'bad descriptor' errors */ +#define MY_ENCRYPT 64U /* Encrypt IO_CACHE temporary files */ +#define MY_FULL_IO 512U /* For my_read - loop intil I/O is complete */ +#define MY_DONT_CHECK_FILESIZE 128U /* Option to init_io_cache() */ +#define MY_LINK_WARNING 32U /* my_redel() gives warning if links */ +#define MY_COPYTIME 64U /* my_redel() copys time */ +#define MY_DELETE_OLD 256U /* my_create_with_symlink() */ +#define MY_RESOLVE_LINK 128U /* my_realpath(); Only resolve links */ +#define MY_HOLD_ORIGINAL_MODES 128U /* my_copy() holds to file modes */ +#define MY_REDEL_MAKE_BACKUP 256U +#define MY_SEEK_NOT_DONE 32U /* my_lock may have to do a seek */ +#define MY_SHORT_WAIT 64U /* my_lock() don't wait if can't lock */ +#define MY_FORCE_LOCK 128U /* use my_lock() even if disable_locking */ +#define MY_NO_WAIT 256U /* my_lock() don't wait at all */ /* init_dynamic_array() has init buffer; Internal flag, not to be used by caller. */ -#define MY_INIT_BUFFER_USED 256 -#define MY_ZEROFILL 32 /* my_malloc(), fill array with zero */ -#define MY_ALLOW_ZERO_PTR 64 /* my_realloc() ; zero ptr -> malloc */ -#define MY_FREE_ON_ERROR 128 /* my_realloc() ; Free old ptr on error */ -#define MY_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */ -#define MY_DONT_OVERWRITE_FILE 2048 /* my_copy: Don't overwrite file */ -#define MY_THREADSAFE 2048 /* my_seek(): lock fd mutex */ -#define MY_SYNC 4096 /* my_copy(): sync dst file */ -#define MY_SYNC_DIR 32768 /* my_create/delete/rename: sync directory */ -#define MY_SYNC_FILESIZE 65536 /* my_sync(): safe sync when file is extended */ -#define MY_THREAD_SPECIFIC 0x10000 /* my_malloc(): thread specific */ -#define MY_THREAD_MOVE 0x20000 /* realloc(); Memory can move */ -/* Tree that should delete things automaticly */ -#define MY_TREE_WITH_DELETE 0x40000 +#define MY_INIT_BUFFER_USED 256U +#define MY_ZEROFILL 32U /* my_malloc(), fill array with zero */ +#define MY_ALLOW_ZERO_PTR 64U /* my_realloc() ; zero ptr -> malloc */ +#define MY_FREE_ON_ERROR 128U /* my_realloc() ; Free old ptr on error */ +#define MY_HOLD_ON_ERROR 256U /* my_realloc() ; Return old ptr on error */ +#define MY_DONT_OVERWRITE_FILE 2048U /* my_copy: Don't overwrite file */ +#define MY_THREADSAFE 2048U /* my_seek(): lock fd mutex */ +#define MY_SYNC 4096U /* my_copy(): sync dst file */ +#define MY_SYNC_DIR 32768U /* my_create/delete/rename: sync directory */ +#define MY_SYNC_FILESIZE 65536U /* my_sync(): safe sync when file is extended */ +#define MY_THREAD_SPECIFIC 0x10000U /* my_malloc(): thread specific */ +#define MY_THREAD_MOVE 0x20000U /* realloc(); Memory can move */ +/* Tree that should delete things automaticly */ +#define MY_TREE_WITH_DELETE 0x40000U -#define MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */ -#define MY_GIVE_INFO 2 /* Give time info about process*/ -#define MY_DONT_FREE_DBUG 4 /* Do not call DBUG_END() in my_end() */ +#define MY_CHECK_ERROR 1U /* Params to my_end; Check open-close */ +#define MY_GIVE_INFO 2U /* Give time info about process*/ +#define MY_DONT_FREE_DBUG 4U /* Do not call DBUG_END() in my_end() */ -#define ME_HIGHBYTE 8 /* Shift for colours */ -#define ME_NOCUR 1 /* Don't use curses message */ -#define ME_OLDWIN 2 /* Use old window */ -#define ME_BELL 4 /* Ring bell then printing message */ -#define ME_HOLDTANG 8 /* Don't delete last keys */ -#define ME_WAITTOT 16 /* Wait for errtime secs of for a action */ -#define ME_WAITTANG 32 /* Wait for a user action */ -#define ME_NOREFRESH 64 /* Write the error message to error log */ -#define ME_NOINPUT 128 /* Dont use the input libary */ -#define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */ -#define ME_COLOUR2 ((2 << ME_HIGHBYTE)) -#define ME_COLOUR3 ((3 << ME_HIGHBYTE)) -#define ME_JUST_INFO 1024 /**< not error but just info */ -#define ME_JUST_WARNING 2048 /**< not error but just warning */ -#define ME_FATALERROR 4096 /* Fatal statement error */ +#define ME_HIGHBYTE 8U /* Shift for colours */ +#define ME_NOCUR 1U /* Don't use curses message */ +#define ME_OLDWIN 2U /* Use old window */ +#define ME_BELL 4U /* Ring bell then printing message */ +#define ME_HOLDTANG 8U /* Don't delete last keys */ +#define ME_WAITTOT 16U /* Wait for errtime secs of for a action */ +#define ME_WAITTANG 32U /* Wait for a user action */ +#define ME_NOREFRESH 64U /* Write the error message to error log */ +#define ME_NOINPUT 128U /* Dont use the input libary */ +#define ME_COLOUR1 ((1U << ME_HIGHBYTE)) /* Possibly error-colours */ +#define ME_COLOUR2 ((2U << ME_HIGHBYTE)) +#define ME_COLOUR3 ((3U << ME_HIGHBYTE)) +#define ME_JUST_INFO 1024U /**< not error but just info */ +#define ME_JUST_WARNING 2048U /**< not error but just warning */ +#define ME_FATALERROR 4096U /* Fatal statement error */ /* Bits in last argument to fn_format */ -#define MY_REPLACE_DIR 1 /* replace dir in name with 'dir' */ -#define MY_REPLACE_EXT 2 /* replace extension with 'ext' */ -#define MY_UNPACK_FILENAME 4 /* Unpack name (~ -> home) */ -#define MY_PACK_FILENAME 8 /* Pack name (home -> ~) */ -#define MY_RESOLVE_SYMLINKS 16 /* Resolve all symbolic links */ -#define MY_RETURN_REAL_PATH 32 /* return full path for file */ -#define MY_SAFE_PATH 64 /* Return NULL if too long path */ -#define MY_RELATIVE_PATH 128 /* name is relative to 'dir' */ -#define MY_APPEND_EXT 256 /* add 'ext' as additional extension*/ +#define MY_REPLACE_DIR 1U /* replace dir in name with 'dir' */ +#define MY_REPLACE_EXT 2U /* replace extension with 'ext' */ +#define MY_UNPACK_FILENAME 4U /* Unpack name (~ -> home) */ +#define MY_PACK_FILENAME 8U /* Pack name (home -> ~) */ +#define MY_RESOLVE_SYMLINKS 16U /* Resolve all symbolic links */ +#define MY_RETURN_REAL_PATH 32U /* return full path for file */ +#define MY_SAFE_PATH 64U /* Return NULL if too long path */ +#define MY_RELATIVE_PATH 128U /* name is relative to 'dir' */ +#define MY_APPEND_EXT 256U /* add 'ext' as additional extension*/ /* My seek flags */ @@ -143,19 +143,19 @@ typedef struct my_aio_result { #define DFLT_INIT_HITS 3 /* root_alloc flags */ -#define MY_KEEP_PREALLOC 1 -#define MY_MARK_BLOCKS_FREE 2 /* move used to free list and reuse them */ +#define MY_KEEP_PREALLOC 1U +#define MY_MARK_BLOCKS_FREE 2U /* move used to free list and reuse them */ /* Internal error numbers (for assembler functions) */ #define MY_ERRNO_EDOM 33 #define MY_ERRNO_ERANGE 34 /* Bits for get_date timeflag */ -#define GETDATE_DATE_TIME 1 -#define GETDATE_SHORT_DATE 2 -#define GETDATE_HHMMSSTIME 4 -#define GETDATE_GMT 8 -#define GETDATE_FIXEDLENGTH 16 +#define GETDATE_DATE_TIME 1U +#define GETDATE_SHORT_DATE 2U +#define GETDATE_HHMMSSTIME 4U +#define GETDATE_GMT 8U +#define GETDATE_FIXEDLENGTH 16U /* Extra length needed for filename if one calls my_create_backup_name */ #define MY_BACKUP_NAME_EXTRA_LENGTH 17 @@ -192,6 +192,14 @@ extern void my_large_free(uchar *ptr); #define my_large_free(A) my_free_lock((A)) #endif /* HAVE_LARGE_PAGES */ +void my_init_atomic_write(void); +#ifdef __linux__ +my_bool my_test_if_atomic_write(File handle, int pagesize); +#else +#define my_test_if_atomic_write(A, B) 0 +#endif /* __linux__ */ +extern my_bool my_may_have_atomic_write; + #if defined(HAVE_ALLOCA) && !defined(HAVE_valgrind) #if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43) #pragma alloca @@ -670,8 +678,12 @@ extern void *my_memmem(const void *haystack, size_t haystacklen, #ifdef _WIN32 extern int my_access(const char *path, int amode); +#define my_check_user(A,B) (NULL) +#define my_set_user(A,B,C) (0) #else #define my_access access +struct passwd *my_check_user(const char *user, myf MyFlags); +int my_set_user(const char *user, struct passwd *user_info, myf MyFlags); #endif extern int check_if_legal_filename(const char *path); diff --git a/include/my_time.h b/include/my_time.h index 8dc1f09ba0f..90d19c8861a 100644 --- a/include/my_time.h +++ b/include/my_time.h @@ -1,5 +1,6 @@ /* Copyright (c) 2004, 2011, Oracle and/or its affiliates. + Copyright (c) 2017, Monty Program Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -61,16 +62,16 @@ extern uchar days_in_month[]; TIME_FUZZY_DATES is used for the result will only be used for comparison purposes. Conversion is as relaxed as possible. */ -#define TIME_FUZZY_DATES 1 -#define TIME_DATETIME_ONLY 2 -#define TIME_TIME_ONLY 4 +#define TIME_FUZZY_DATES 1U +#define TIME_DATETIME_ONLY 2U +#define TIME_TIME_ONLY 4U #define TIME_NO_ZERO_IN_DATE (1UL << 23) /* == MODE_NO_ZERO_IN_DATE */ #define TIME_NO_ZERO_DATE (1UL << 24) /* == MODE_NO_ZERO_DATE */ #define TIME_INVALID_DATES (1UL << 25) /* == MODE_INVALID_DATES */ -#define MYSQL_TIME_WARN_TRUNCATED 1 -#define MYSQL_TIME_WARN_OUT_OF_RANGE 2 -#define MYSQL_TIME_NOTE_TRUNCATED 16 +#define MYSQL_TIME_WARN_TRUNCATED 1U +#define MYSQL_TIME_WARN_OUT_OF_RANGE 2U +#define MYSQL_TIME_NOTE_TRUNCATED 16U #define MYSQL_TIME_WARN_WARNINGS (MYSQL_TIME_WARN_TRUNCATED|MYSQL_TIME_WARN_OUT_OF_RANGE) #define MYSQL_TIME_WARN_NOTES (MYSQL_TIME_NOTE_TRUNCATED) diff --git a/include/my_valgrind.h b/include/my_valgrind.h index 9ceb49c1094..3519d7bb757 100644 --- a/include/my_valgrind.h +++ b/include/my_valgrind.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Monty Program Ab +/* Copyright (C) 2010, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -38,7 +38,7 @@ #define TRASH_FILL(A,B,C) do{ const size_t trash_tmp __attribute__((unused)) = (B) ; MEM_CHECK_ADDRESSABLE(A,trash_tmp);MEM_UNDEFINED(A,trash_tmp);} while (0) #endif #define TRASH_ALLOC(A,B) TRASH_FILL(A,B,0xA5) -#define TRASH_FREE(A,B) TRASH_FILL(A,B,0x8F) +#define TRASH_FREE(A,B) TRASH_FILL(A,(size_t) (B),0x8F) #define TRASH(A,B) TRASH_FREE(A,B) # define DBUG_ASSERT_DEFINED(x) \ diff --git a/include/myisamchk.h b/include/myisamchk.h index 643241d84e5..40aa0b19d49 100644 --- a/include/myisamchk.h +++ b/include/myisamchk.h @@ -1,4 +1,5 @@ /* Copyright (C) 2006 MySQL AB + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,13 +25,13 @@ to xxxcheck.c follows: */ -#define TT_USEFRM 1 -#define TT_FOR_UPGRADE 2 -#define TT_FROM_MYSQL 4 +#define TT_USEFRM 1U +#define TT_FOR_UPGRADE 2U +#define TT_FROM_MYSQL 4U /* Bits set in out_flag */ -#define O_NEW_DATA 2 -#define O_DATA_LOST 4 +#define O_NEW_DATA 2U +#define O_DATA_LOST 4U typedef struct st_sort_key_blocks /* Used when sorting */ { diff --git a/include/mysql.h.pp b/include/mysql.h.pp index 9d93b9ad325..517516aeb30 100644 --- a/include/mysql.h.pp +++ b/include/mysql.h.pp @@ -9,6 +9,8 @@ enum enum_server_command COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE, COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE, COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, COM_DAEMON, + COM_UNIMPLEMENTED, + COM_RESET_CONNECTION, COM_MDB_GAP_BEG, COM_MDB_GAP_END=250, COM_SLAVE_WORKER=251, diff --git a/include/mysql/psi/mysql_idle.h b/include/mysql/psi/mysql_idle.h index 5c72b715b7a..b623edce108 100644 --- a/include/mysql/psi/mysql_idle.h +++ b/include/mysql/psi/mysql_idle.h @@ -1,4 +1,5 @@ /* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -67,7 +68,7 @@ */ static inline struct PSI_idle_locker * inline_mysql_start_idle_wait(PSI_idle_locker_state *state, - const char *src_file, int src_line) + const char *src_file, uint src_line) { struct PSI_idle_locker *locker; locker= PSI_IDLE_CALL(start_idle_wait)(state, src_file, src_line); diff --git a/include/mysql/psi/mysql_socket.h b/include/mysql/psi/mysql_socket.h index 619f600a776..64531e5c35e 100644 --- a/include/mysql/psi/mysql_socket.h +++ b/include/mysql/psi/mysql_socket.h @@ -1,4 +1,5 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -241,7 +242,7 @@ inline_mysql_start_socket_wait(PSI_socket_locker_state *state, MYSQL_SOCKET mysql_socket, enum PSI_socket_operation op, size_t byte_count, - const char *src_file, int src_line) + const char *src_file, uint src_line) { struct PSI_socket_locker *locker; if (mysql_socket.m_psi != NULL) @@ -744,8 +745,7 @@ inline_mysql_socket_send /* Instrumentation end */ if (locker != NULL) { - size_t bytes_written; - bytes_written= (result > -1) ? result : 0; + size_t bytes_written= (result > 0) ? (size_t) result : 0; PSI_SOCKET_CALL(end_socket_wait)(locker, bytes_written); } @@ -786,8 +786,7 @@ inline_mysql_socket_recv /* Instrumentation end */ if (locker != NULL) { - size_t bytes_read; - bytes_read= (result > -1) ? result : 0; + size_t bytes_read= (result > 0) ? (size_t) result : 0; PSI_SOCKET_CALL(end_socket_wait)(locker, bytes_read); } @@ -828,8 +827,7 @@ inline_mysql_socket_sendto /* Instrumentation end */ if (locker != NULL) { - size_t bytes_written; - bytes_written = (result > -1) ? result : 0; + size_t bytes_written = (result > 0) ? (size_t) result : 0; PSI_SOCKET_CALL(end_socket_wait)(locker, bytes_written); } @@ -871,8 +869,7 @@ inline_mysql_socket_recvfrom /* Instrumentation end */ if (locker != NULL) { - size_t bytes_read; - bytes_read = (result > -1) ? result : 0; + size_t bytes_read= (result > 0) ? (size_t) result : 0; PSI_SOCKET_CALL(end_socket_wait)(locker, bytes_read); } diff --git a/include/mysql/psi/mysql_statement.h b/include/mysql/psi/mysql_statement.h index 3d5943fa55a..05016130af7 100644 --- a/include/mysql/psi/mysql_statement.h +++ b/include/mysql/psi/mysql_statement.h @@ -1,4 +1,5 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -146,7 +147,7 @@ inline_mysql_start_statement(PSI_statement_locker_state *state, PSI_statement_key key, const char *db, uint db_len, const CHARSET_INFO *charset, - const char *src_file, int src_line) + const char *src_file, uint src_line) { PSI_statement_locker *locker; locker= PSI_STATEMENT_CALL(get_thread_statement_locker)(state, key, charset); diff --git a/include/mysql/psi/mysql_table.h b/include/mysql/psi/mysql_table.h index 74217a32b13..5b4b64a8e48 100644 --- a/include/mysql/psi/mysql_table.h +++ b/include/mysql/psi/mysql_table.h @@ -1,4 +1,5 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -183,7 +184,7 @@ static inline struct PSI_table_locker * inline_mysql_start_table_lock_wait(PSI_table_locker_state *state, struct PSI_table *psi, enum PSI_table_lock_operation op, - ulong flags, const char *src_file, int src_line) + ulong flags, const char *src_file, uint src_line) { if (psi != NULL) { diff --git a/include/mysql_com.h b/include/mysql_com.h index c399520022d..2cb4656ceef 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2010, 2013, Monty Program Ab + Copyright (c) 2010, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,8 +25,8 @@ #define HOSTNAME_LENGTH 60 #define SYSTEM_CHARSET_MBMAXLEN 3 -#define NAME_CHAR_LEN 64 /* Field/table name length */ -#define USERNAME_CHAR_LENGTH 128 +#define NAME_CHAR_LEN 64U /* Field/table name length */ +#define USERNAME_CHAR_LENGTH 128U #define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN) #define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN) #define DEFINER_CHAR_LENGTH (USERNAME_CHAR_LENGTH + HOSTNAME_LENGTH + 1) @@ -111,6 +111,8 @@ enum enum_server_command COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE, COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE, COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, COM_DAEMON, + COM_UNIMPLEMENTED, // COM_BINLOG_DUMP_GTID in MySQL + COM_RESET_CONNECTION, /* don't forget to update const char *command_name[] in sql_parse.cc */ COM_MDB_GAP_BEG, COM_MDB_GAP_END=250, @@ -147,40 +149,40 @@ enum enum_indicator_type #define SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2) -#define NOT_NULL_FLAG 1 /* Field can't be NULL */ -#define PRI_KEY_FLAG 2 /* Field is part of a primary key */ -#define UNIQUE_KEY_FLAG 4 /* Field is part of a unique key */ -#define MULTIPLE_KEY_FLAG 8 /* Field is part of a key */ -#define BLOB_FLAG 16 /* Field is a blob */ -#define UNSIGNED_FLAG 32 /* Field is unsigned */ -#define ZEROFILL_FLAG 64 /* Field is zerofill */ -#define BINARY_FLAG 128 /* Field is binary */ +#define NOT_NULL_FLAG 1U /* Field can't be NULL */ +#define PRI_KEY_FLAG 2U /* Field is part of a primary key */ +#define UNIQUE_KEY_FLAG 4U /* Field is part of a unique key */ +#define MULTIPLE_KEY_FLAG 8U /* Field is part of a key */ +#define BLOB_FLAG 16U /* Field is a blob */ +#define UNSIGNED_FLAG 32U /* Field is unsigned */ +#define ZEROFILL_FLAG 64U /* Field is zerofill */ +#define BINARY_FLAG 128U /* Field is binary */ /* The following are only sent to new clients */ -#define ENUM_FLAG 256 /* field is an enum */ -#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */ -#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */ -#define SET_FLAG 2048 /* field is a set */ -#define NO_DEFAULT_VALUE_FLAG 4096 /* Field doesn't have default value */ -#define ON_UPDATE_NOW_FLAG 8192 /* Field is set to NOW on UPDATE */ -#define NUM_FLAG 32768 /* Field is num (for clients) */ -#define PART_KEY_FLAG 16384 /* Intern; Part of some key */ -#define GROUP_FLAG 32768 /* Intern: Group field */ -#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */ -#define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */ -#define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */ +#define ENUM_FLAG 256U /* field is an enum */ +#define AUTO_INCREMENT_FLAG 512U /* field is a autoincrement field */ +#define TIMESTAMP_FLAG 1024U /* Field is a timestamp */ +#define SET_FLAG 2048U /* field is a set */ +#define NO_DEFAULT_VALUE_FLAG 4096U /* Field doesn't have default value */ +#define ON_UPDATE_NOW_FLAG 8192U /* Field is set to NOW on UPDATE */ +#define NUM_FLAG 32768U /* Field is num (for clients) */ +#define PART_KEY_FLAG 16384U /* Intern; Part of some key */ +#define GROUP_FLAG 32768U /* Intern: Group field */ +#define BINCMP_FLAG 131072U /* Intern: Used by sql_yacc */ +#define GET_FIXED_FIELDS_FLAG (1U << 18) /* Used to get fields in item tree */ +#define FIELD_IN_PART_FUNC_FLAG (1U << 19)/* Field part of partition func */ /** Intern: Field in TABLE object for new version of altered table, which participates in a newly added index. */ -#define FIELD_IN_ADD_INDEX (1 << 20) -#define FIELD_IS_RENAMED (1<< 21) /* Intern: Field is being renamed */ +#define FIELD_IN_ADD_INDEX (1U << 20) +#define FIELD_IS_RENAMED (1U << 21) /* Intern: Field is being renamed */ #define FIELD_FLAGS_STORAGE_MEDIA 22 /* Field storage media, bit 22-23 */ -#define FIELD_FLAGS_STORAGE_MEDIA_MASK (3 << FIELD_FLAGS_STORAGE_MEDIA) +#define FIELD_FLAGS_STORAGE_MEDIA_MASK (3U << FIELD_FLAGS_STORAGE_MEDIA) #define FIELD_FLAGS_COLUMN_FORMAT 24 /* Field column format, bit 24-25 */ -#define FIELD_FLAGS_COLUMN_FORMAT_MASK (3 << FIELD_FLAGS_COLUMN_FORMAT) -#define FIELD_IS_DROPPED (1<< 26) /* Intern: Field is being dropped */ +#define FIELD_FLAGS_COLUMN_FORMAT_MASK (3U << FIELD_FLAGS_COLUMN_FORMAT) +#define FIELD_IS_DROPPED (1U << 26) /* Intern: Field is being dropped */ #define REFRESH_GRANT (1ULL << 0) /* Refresh grant tables */ #define REFRESH_LOG (1ULL << 1) /* Start on new log file */ @@ -333,36 +335,36 @@ enum enum_indicator_type implicitly, by the first transactional statement, when autocommit=off. */ -#define SERVER_STATUS_IN_TRANS 1 -#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */ -#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */ -#define SERVER_QUERY_NO_GOOD_INDEX_USED 16 -#define SERVER_QUERY_NO_INDEX_USED 32 +#define SERVER_STATUS_IN_TRANS 1U +#define SERVER_STATUS_AUTOCOMMIT 2U /* Server in auto_commit mode */ +#define SERVER_MORE_RESULTS_EXISTS 8U /* Multi query - next query exists */ +#define SERVER_QUERY_NO_GOOD_INDEX_USED 16U +#define SERVER_QUERY_NO_INDEX_USED 32U /** The server was able to fulfill the clients request and opened a read-only non-scrollable cursor for a query. This flag comes in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands. */ -#define SERVER_STATUS_CURSOR_EXISTS 64 +#define SERVER_STATUS_CURSOR_EXISTS 64U /** This flag is sent when a read-only cursor is exhausted, in reply to COM_STMT_FETCH command. */ -#define SERVER_STATUS_LAST_ROW_SENT 128 -#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */ -#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512 +#define SERVER_STATUS_LAST_ROW_SENT 128U +#define SERVER_STATUS_DB_DROPPED 256U /* A database was dropped */ +#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512U /** Sent to the client if after a prepared statement reprepare we discovered that the new statement returns a different number of result set columns. */ -#define SERVER_STATUS_METADATA_CHANGED 1024 -#define SERVER_QUERY_WAS_SLOW 2048 +#define SERVER_STATUS_METADATA_CHANGED 1024U +#define SERVER_QUERY_WAS_SLOW 2048U /** To mark ResultSet containing output parameter values. */ -#define SERVER_PS_OUT_PARAMS 4096 +#define SERVER_PS_OUT_PARAMS 4096U /** Set at the same time as SERVER_STATUS_IN_TRANS if the started @@ -371,7 +373,7 @@ enum enum_indicator_type to clients in OK and EOF packets, the flag indicates the transaction status at the end of command execution. */ -#define SERVER_STATUS_IN_TRANS_READONLY 8192 +#define SERVER_STATUS_IN_TRANS_READONLY 8192U /** This status flag, when on, implies that one of the state information has @@ -453,7 +455,7 @@ typedef struct st_net { } NET; -#define packet_error (~(unsigned long) 0) +#define packet_error ~0UL enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG, @@ -704,9 +706,9 @@ void my_thread_end(void); } #endif -#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */ -#define MYSQL_STMT_HEADER 4 -#define MYSQL_LONG_DATA_HEADER 6 +#define NULL_LENGTH ~0UL /* For net_store_length */ +#define MYSQL_STMT_HEADER 4U +#define MYSQL_LONG_DATA_HEADER 6U /* If a float or double field have more than this number of decimals, diff --git a/include/thr_lock.h b/include/thr_lock.h index fb69d8a693e..e6451bf21c4 100644 --- a/include/thr_lock.h +++ b/include/thr_lock.h @@ -1,4 +1,5 @@ /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -76,10 +77,10 @@ enum enum_thr_lock_result { THR_LOCK_SUCCESS= 0, THR_LOCK_ABORTED= 1, /* Priority for locks */ -#define THR_LOCK_LATE_PRIV 1 /* For locks to be merged with org lock */ -#define THR_LOCK_MERGE_PRIV 2 /* For merge tables */ +#define THR_LOCK_LATE_PRIV 1U /* For locks to be merged with org lock */ +#define THR_LOCK_MERGE_PRIV 2U /* For merge tables */ -#define THR_UNLOCK_UPDATE_STATUS 1 +#define THR_UNLOCK_UPDATE_STATUS 1U extern ulong max_write_lock_count; extern my_bool thr_lock_inited; diff --git a/include/typelib.h b/include/typelib.h index 4504bea4ff7..eba32167c4e 100644 --- a/include/typelib.h +++ b/include/typelib.h @@ -1,4 +1,5 @@ /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This 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,13 +34,13 @@ extern int find_type_or_exit(const char *x, TYPELIB *typelib, const char *option); #define FIND_TYPE_BASIC 0 /** makes @c find_type() require the whole name, no prefix */ -#define FIND_TYPE_NO_PREFIX (1 << 0) +#define FIND_TYPE_NO_PREFIX (1U << 0) /** always implicitely on, so unused, but old code may pass it */ #define FIND_TYPE_NO_OVERWRITE 0 /** makes @c find_type() accept a number. Not used either */ #define FIND_TYPE_ALLOW_NUMBER 0 /** makes @c find_type() treat ',' and '=' as terminators */ -#define FIND_TYPE_COMMA_TERM (1 << 3) +#define FIND_TYPE_COMMA_TERM (1U << 3) extern int find_type(const char *x, const TYPELIB *typelib, unsigned int flags); extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); diff --git a/include/violite.h b/include/violite.h index 8be9859ceb4..6047c7c8fd4 100644 --- a/include/violite.h +++ b/include/violite.h @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2012, Oracle and/or its affiliates. - Copyright (c) 2012 Monty Program Ab + Copyright (c) 2012, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,9 +51,9 @@ enum enum_vio_io_event VIO_IO_EVENT_CONNECT }; -#define VIO_LOCALHOST 1 /* a localhost connection */ -#define VIO_BUFFERED_READ 2 /* use buffered read */ -#define VIO_READ_BUFFER_SIZE 16384 /* size of read buffer */ +#define VIO_LOCALHOST 1U /* a localhost connection */ +#define VIO_BUFFERED_READ 2U /* use buffered read */ +#define VIO_READ_BUFFER_SIZE 16384U /* size of read buffer */ #define VIO_DESCRIPTION_SIZE 30 /* size of description */ Vio* vio_new(my_socket sd, enum enum_vio_type type, uint flags); diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index 19522042e87..71e9d67dee4 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -1,6 +1,6 @@ '\" t .\" -.TH "\FBMYSQL_SECURE_INST" "1" "22/3/2016" "MariaDB 10\&.2" "MariaDB Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "3 January 2017" "MariaDB 10\&.2" "MariaDB Database System" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- @@ -71,9 +71,8 @@ test database, which by default can be accessed by anonymous users\&. .RE .PP -Invoke \fBmysql_secure_installation\fR -without arguments: +can be invoked without arguments: .sp .if n \{\ .RS 4 @@ -86,10 +85,75 @@ shell> \fBmysql_secure_installation\fR .\} .PP The script will prompt you to determine which actions to perform\&. +.PP +\fBmysql_secure_installation\fR +accepts some options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_secure_installation: basedir option +.\" basedir option: mysql_secure_installation +\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR +.sp +Base directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_secure_installation: defaults-extra-file option +.\" defaults-extra-file option: mysql_secure_installation +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +.sp +Additional option file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_secure_installation: defaults-file option +.\" defaults-file option: mysql_secure_installation +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Option file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_secure_installation: no-defaults option +.\" no-defaults option: mysql_secure_installation +\fB\-\-no\-defaults\fR +.sp +Don't read any defaults file\&. +.RE +.sp +Other unrecognized options will be passed on to the server\&. .SH "COPYRIGHT" .br .PP -Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation +Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2017 MariaDB Foundation .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/mysql-test/README b/mysql-test/README index 0fba1cc07e3..28b8203b2dc 100644 --- a/mysql-test/README +++ b/mysql-test/README @@ -76,3 +76,9 @@ then put your .test file and .result file(s) into a tar.gz archive, add a README that explains the problem, ftp the archive to ftp://ftp.askmonty.org/private and submit a report to http://mariadb.org/jira about it. + +The latest information about mysql-test-run can be found at: +https://mariadb.com/kb/en/mariadb/mysqltest/ + +If you want to create .rdiff files, check +https://mariadb.com/kb/en/mariadb/mysql-test-auxiliary-files/ diff --git a/mysql-test/README.gcov b/mysql-test/README-gcov similarity index 56% rename from mysql-test/README.gcov rename to mysql-test/README-gcov index 6d2852e8ca0..ba22a796423 100644 --- a/mysql-test/README.gcov +++ b/mysql-test/README-gcov @@ -2,12 +2,14 @@ To be able to see the level of coverage with the current test suite, do the following: - Make sure gcov is installed - - Compile the MySQL distribution with BUILD/compile-pentium-gcov (if your + - Compile the MySQL distribution with BUILD/compile-pentium64-gcov (if your machine does not have a pentium CPU, hack this script, or just live with the pentium-specific stuff) - In the mysql-test directory, run this command: ./mysql-test-run -gcov - To see the level of coverage for a given source file: - grep source_file_name /tmp/gcov.out + grep -1 source_file_name ../mysql-test-gcov.msg - To see which lines are not yet covered, look at source_file_name.gcov in - the source tree. Then think hard about a test case that will cover those - lines, and write one! + the source tree. You can find this by doing something like: + find source-directory -name "mysqld.cc.gcov" + Then think hard about a test case that will cover those lines, and write + one! diff --git a/mysql-test/dgcov.pl b/mysql-test/dgcov.pl new file mode 100755 index 00000000000..27647eed056 --- /dev/null +++ b/mysql-test/dgcov.pl @@ -0,0 +1,198 @@ +#! /usr/bin/perl + +# Copyright (C) 2003,2008 MySQL AB +# Copyright (C) 2010,2017 Sergei Golubchik and MariaDB Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# Run gcov and report test coverage on only those code lines touched by +# a given list of commits. + +use strict; +use warnings; + +use Getopt::Long; +use File::Find; +use Cwd qw/realpath/; + +my $opt_verbose=0; +my $opt_generate; +my $opt_help; +my $opt_purge; +my $opt_only_gcov; +my $opt_skip_gcov; + +my %cov; +my $file_no=0; + +GetOptions + ("v|verbose+" => \$opt_verbose, + "h|help" => \$opt_help, + "p|purge" => \$opt_purge, + "g|generate" => \$opt_generate, + "o|only-gcov" => \$opt_only_gcov, + "s|skip-gcov" => \$opt_skip_gcov, + ) or usage(); + +usage() if $opt_help; + +sub logv(@) { print STDERR @_,"\n" if $opt_verbose; } +sub gcov_prefix($) { defined($_[0]) ? $_[0] || '#####' : '-' } + +my $root= `git rev-parse --show-toplevel`; +chomp $root; + +die "Failed to find tree root" unless $root; +$root=realpath($root).'/'; +logv "Chdir $root"; +chdir $root or die "chdir($root): $!"; + +my $res; +my $cmd; +if ($opt_purge) +{ + $cmd= "find . -name '*.da' -o -name '*.gcda' -o -name '*.gcov' -o ". + "-name '*.dgcov' | grep -v 'README\.gcov' | xargs rm -f ''"; + logv "Running: $cmd"; + system($cmd)==0 or die "system($cmd): $? $!"; + exit 0; +} + +find(\&gcov_one_file, $root); +find(\&write_coverage, $root) if $opt_generate; +exit 0 if $opt_only_gcov; + +if (@ARGV) { + print_gcov_for_diff(@ARGV); +} else { + print_gcov_for_diff('HEAD') or print_gcov_for_diff('HEAD^'); +} +exit 0; + +sub print_gcov_for_diff { + $cmd="git diff --no-prefix --ignore-space-change @_"; + logv "Running: $cmd"; + open PIPE, '-|', $cmd or die "Failed to popen '$cmd': $!: $?"; + my ($lnum, $cnt, $fcov, $acc, $printme, $fname); + while () { + if (/^diff --git (.*) \1\n/) { + print $acc if $printme; + $fname=$1; + $acc="dgcov $fname"; + $acc=('*' x length($acc)) . "\n$acc\n" . ('*' x length($acc)); + $lnum=undef; + $fcov=$cov{realpath($fname)}; + $printme=0; + logv "File: $fname"; + next; + } + if (/^@@ -\d+,\d+ \+(\d+),(\d+) @@/ and $fcov) { + $lnum=$1; + $cnt=$2; + $acc.="\n@@ +$lnum,$cnt @\@$'"; + logv " lines: $lnum,",$lnum+$cnt; + next; + } + next unless $lnum and $cnt; + $acc.=sprintf '%9s:%5s:%s', '', $lnum, $' if /^ /; + ++$printme, $acc.=sprintf '%9s:%5s:%s', gcov_prefix($fcov->{$lnum}), $lnum, $' if /^\+/; + die "$_^^^ dying", unless /^[- +]/; + ++$lnum; + --$cnt; + } + print $acc if $printme; + close PIPE or die "command '$cmd' failed: $!: $?"; + return defined($fname); +} + +sub usage { + print <^ + +If no arguments are specified, it prints the coverage for all uncommitted +changes, if any, otherwise for the last commit. + +Options: + + -h --help This help. + -v --verbose Show commands run. + -p --purge Delete all test coverage information, to prepare for a + new coverage test. + -o --only-gcov Stop after running gcov, don't run git + -s --skip-gcov Do not run gcov, assume .gcov files are already in place + -g --generate Create .dgcov files for all source files + +Prior to running this tool, MariaDB should be built with + + cmake -DENABLE_GCOV=ON + +and the testsuite should be run. dgcov will report the coverage +for all lines modified in the specified commits. +END + + exit 1; +} + +sub gcov_one_file { + return unless /\.gcda$/; + unless ($opt_skip_gcov) { + $cmd= "gcov -i '$_' 2>/dev/null >/dev/null"; + print STDERR ++$file_no,"\r" if not $opt_verbose and -t STDERR; + logv "Running: $cmd"; + system($cmd)==0 or die "system($cmd): $? $!"; + } + + # now, read the generated file + open FH, '<', "$_.gcov" or die "open(<$_.gcov): $!"; + my $fname; + while () { + chomp; + if (/^function:/) { + next; + } + if (/^file:/) { + $fname=realpath($'); + next; + } + next if /^lcount:\d+,-\d+/; # whatever that means + unless (/^lcount:(\d+),(\d+)/ and $fname) { + warn "unknown line '$_' after running '$cmd'"; + next; + } + $cov{$fname}->{$1}+=$2; + } + close(FH); +} + +sub write_coverage { + my $fn=$File::Find::name; + my $h=$cov{$fn}; + return unless $h and $root eq substr $fn, 0, length($root); + open I, '<', $fn or die "open(<$fn): $!"; + open O, '>', "$fn.dgcov" or die "open(>$fn.dgcov): $!"; + logv "Annotating: ", substr $fn, length($root); + while () { + printf O '%9s:%5s:%s', gcov_prefix($h->{$.}), $., $_; + } + close I; + close O; +} diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test index 831c6c886d5..810a402580c 100644 --- a/mysql-test/extra/binlog_tests/binlog.test +++ b/mysql-test/extra/binlog_tests/binlog.test @@ -272,7 +272,7 @@ create table if not exists t3 like tt1; --disable_warnings USE mysql; -INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test'); +INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test'); UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'; DELETE FROM user WHERE host='localhost' AND user='@#@'; --enable_warnings diff --git a/mysql-test/extra/binlog_tests/binlog_write_error.inc b/mysql-test/extra/binlog_tests/binlog_write_error.inc index da66dbf5a95..fa3ba087a7e 100644 --- a/mysql-test/extra/binlog_tests/binlog_write_error.inc +++ b/mysql-test/extra/binlog_tests/binlog_write_error.inc @@ -71,7 +71,7 @@ source include/binlog_inject_error.inc; let $query= DROP VIEW v1; source include/binlog_inject_error.inc; -let $query= CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1; +let $query= CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; source include/binlog_inject_error.inc; let $query= DROP PROCEDURE p1; diff --git a/mysql-test/extra/binlog_tests/ctype_cp932.test b/mysql-test/extra/binlog_tests/ctype_cp932.test index 33247550d62..f42bffd30df 100644 --- a/mysql-test/extra/binlog_tests/ctype_cp932.test +++ b/mysql-test/extra/binlog_tests/ctype_cp932.test @@ -436,9 +436,9 @@ drop table t2; # create table t1 (col1 varchar(1)) character set cp932; insert into t1 values ('a'); -insert into t1 values ('ab'); +insert ignore into t1 values ('ab'); select * from t1; -insert into t1 values ('abc'); +insert ignore into t1 values ('abc'); select * from t1; drop table t1; diff --git a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test index bc94c9df5e8..8a4df14d4b3 100644 --- a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test +++ b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test @@ -53,7 +53,7 @@ SELECT * FROM t1; DROP TABLE t1; FLUSH LOGS; let $MYSQLD_DATADIR= `select @@datadir`; ---replace_regex /TIMESTAMP=[0-9]*/TIMESTAMP=XXX/ /# at [0-9]*/# at #/ /(exec_time=|end_log_pos |Xid = |thread_id=|server id |table id |mapped to number )[0-9]+/\1#/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/ /Gtid list [[][0-9]+-[0-9]+-[0-9]+[\]]/Gtid list [#-#-#]/ /session[.](gtid_domain_id|server_id|gtid_seq_no)=[0-9]+/session.\1=#/ +--replace_regex /TIMESTAMP=[0-9]*/TIMESTAMP=XXX/ /# at [0-9]*/# at #/ /(exec_time=|end_log_pos |Xid = |thread_id=|server id |table id |mapped to number )[0-9]+/\1#/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/ /Gtid list [[][0-9]+-[0-9]+-[0-9]+[\]]/Gtid list [#-#-#]/ /session[.](gtid_domain_id|server_id|gtid_seq_no)=[0-9]+/session.\1=#/ /(^#|created )[0-9]{6} [ 1][0-9]:[0-9]{2}:[0-9]{2}/\1YYMMDD HH:MM:SS/ --exec $MYSQL_BINLOG --base64-output=decode-rows -vv $MYSQLD_DATADIR/master-bin.000003 SET TIMESTAMP=DEFAULT; diff --git a/mysql-test/extra/rpl_tests/create_recursive_construct.inc b/mysql-test/extra/rpl_tests/create_recursive_construct.inc index 67d0311fb72..b7405aa4c7f 100644 --- a/mysql-test/extra/rpl_tests/create_recursive_construct.inc +++ b/mysql-test/extra/rpl_tests/create_recursive_construct.inc @@ -346,7 +346,7 @@ if ($CRC_RET_stmt_sidef) { SHOW BINLOG EVENTS; --die Warnings printed } - --let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 5) + --let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 6) # The first event is format_description, the second is Gtid list, the # third is Binlog_checkpoint, the fourth Gtid, and the fifth should be # our Query for 'INSERT DELAYED' unsafe_type 3, which is safe after @@ -357,12 +357,13 @@ if ($CRC_RET_stmt_sidef) { SHOW BINLOG EVENTS; --die Wrong events in binlog. } - # The first event is format_description, the second is Binlog_checkpoint, - # the third is Query_event('BEGIN'), and the fourth should be our Table_map + # The first event is format_description, the second is Gtid list, + # the third is Binlog_checkpoint, the fourth is Query_event('BEGIN'), + # the fifth is Annotate_rows, and the sixth should be our Table_map # for unsafe statement. if (`SELECT $unsafe_type != 3 AND '$event_type' != 'Table_map'`) { --enable_query_log - --echo ******** Failure! Event number 4 was a '$event_type', not a 'Table_map'. ******** + --echo ******** Failure! Event number 6 was a '$event_type', not a 'Table_map'. ******** SHOW BINLOG EVENTS; --die Wrong events in binlog. } diff --git a/mysql-test/extra/rpl_tests/rpl_binlog_errors.inc b/mysql-test/extra/rpl_tests/rpl_binlog_errors.inc index c595d70daa1..49ab4f386bf 100644 --- a/mysql-test/extra/rpl_tests/rpl_binlog_errors.inc +++ b/mysql-test/extra/rpl_tests/rpl_binlog_errors.inc @@ -50,7 +50,7 @@ call mtr.add_suppression("Can't generate a unique log-filename"); call mtr.add_suppression("Writing one row to the row-based binary log failed.*"); call mtr.add_suppression("Error writing file .*"); -SET @old_debug= @@global.debug; +SET @old_debug= @@global.debug_dbug; ### ACTION: create a large file (> 4096 bytes) that will be later used ### in LOAD DATA INFILE to check binlog errors in its vacinity @@ -192,6 +192,11 @@ RESET MASTER; ### is written to the current binary log. SET GLOBAL debug_dbug="+d,error_unique_log_filename"; + +# Disable logging Annotate_rows events to preserve events count. +let $binlog_annotate_row_events_saved= `SELECT @@binlog_annotate_row_events`; +SET @@binlog_annotate_row_events= 0; + SELECT count(*) FROM t4; -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -- error ER_NO_UNIQUE_LOGFILE @@ -210,6 +215,11 @@ if (!$binlog_limit) # clean up and move to next test DELETE FROM t4; + +--disable_query_log +eval SET @@binlog_annotate_row_events= $binlog_annotate_row_events_saved; +--enable_query_log + RESET MASTER; -- echo ###################### TEST #8 @@ -286,7 +296,7 @@ SET GLOBAL debug_dbug="+d,fault_injection_registering_index"; -- replace_regex /\.[\\\/]master/master/ -- error ER_CANT_OPEN_FILE FLUSH LOGS; -SET GLOBAL debug_dbug="-d,fault_injection_registering_index"; +SET GLOBAL debug_dbug=@old_debug; -- error ER_NO_BINARY_LOGGING SHOW BINARY LOGS; @@ -298,6 +308,7 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +flush tables; -- echo ###################### TEST #11 @@ -314,7 +325,7 @@ SET GLOBAL debug_dbug="+d,fault_injection_openning_index"; -- replace_regex /\.[\\\/]master/master/ -- error ER_CANT_OPEN_FILE FLUSH LOGS; -SET GLOBAL debug_dbug="-d,fault_injection_openning_index"; +SET GLOBAL debug_dbug=@old_debug; -- error ER_FLUSH_MASTER_BINLOG_CLOSED RESET MASTER; @@ -326,6 +337,7 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +flush tables; # restart the server so that we have binlog again --let $rpl_server_number= 1 @@ -341,7 +353,7 @@ DROP TABLE t5; SET GLOBAL debug_dbug="+d,fault_injection_new_file_rotate_event"; -- error ER_ERROR_ON_WRITE FLUSH LOGS; -SET GLOBAL debug_dbug="-d,fault_injection_new_file_rotate_event"; +SET GLOBAL debug_dbug=@old_debug; -- error ER_FLUSH_MASTER_BINLOG_CLOSED RESET MASTER; @@ -353,6 +365,7 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +flush tables; # restart the server so that we have binlog again --let $rpl_server_number= 1 diff --git a/mysql-test/extra/rpl_tests/rpl_checksum_cache.inc b/mysql-test/extra/rpl_tests/rpl_checksum_cache.inc index a10c9721f70..e04f618b81e 100644 --- a/mysql-test/extra/rpl_tests/rpl_checksum_cache.inc +++ b/mysql-test/extra/rpl_tests/rpl_checksum_cache.inc @@ -8,8 +8,8 @@ -- source include/master-slave.inc --disable_warnings -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t2 set data=repeat.*'a', @act_size.*"); -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*"); +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. .*Statement: insert into t2 set data=repeat.*'a', @act_size.*"); +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. .*Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*"); --enable_warnings connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_extra_col_master.test b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test index 0559e93676b..02645a577f5 100644 --- a/mysql-test/extra/rpl_tests/rpl_extra_col_master.test +++ b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test @@ -253,9 +253,9 @@ some var char'; INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: binary data'; INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; - INSERT into t31 set f1=1, f2=1, f3=2, f4='second', + insert ignore into t31 set f1=1, f2=1, f3=2, f4='second', f9=2.2, f10='seven samurai', f28=222.222, f35='222'; - INSERT into t31 values (1, 1, 3, 'third', + insert ignore into t31 values (1, 1, 3, 'third', /* f5 BIGINT, */ 333333333333333333333333, /* f6 BLOB, */ '3333333333333333333333', /* f7 DATE, */ '2007-07-18', @@ -289,7 +289,7 @@ binary data'; /*f35 VARCHAR(257),*/ 'three times three' ); - INSERT into t31 values (1, 1, 4, 'fourth', + insert ignore into t31 values (1, 1, 4, 'fourth', /* f5 BIGINT, */ 333333333333333333333333, /* f6 BLOB, */ '3333333333333333333333', /* f7 DATE, */ '2007-07-18', @@ -408,7 +408,7 @@ connection master; update t31 set f5=555555555555555 where f3=6; update t31 set f2=2 where f3=2; update t31 set f1=NULL where f3=1; - update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; + update ignore t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; --echo --echo ** Delete from Master ** diff --git a/mysql-test/extra/rpl_tests/rpl_gtid_basic.inc b/mysql-test/extra/rpl_tests/rpl_gtid_basic.inc index ab7d23f70ac..68a5d05ffe9 100644 --- a/mysql-test/extra/rpl_tests/rpl_gtid_basic.inc +++ b/mysql-test/extra/rpl_tests/rpl_gtid_basic.inc @@ -455,9 +455,13 @@ SELECT IF(LOCATE("2-1-1022", @@GLOBAL.gtid_slave_pos)>0, "Ok", CONCAT("ERROR! ex --connection server_1 SET gtid_domain_id=2; SET gtid_seq_no=1030; +# Disable logging Annotate_rows events to preserve events count. +let $binlog_annotate_row_events_saved= `SELECT @@binlog_annotate_row_events`; +SET @@binlog_annotate_row_events= 0; INSERT INTO t1 VALUES (17); INSERT INTO t1 VALUES (18); INSERT INTO t1 VALUES (19); +eval SET @@binlog_annotate_row_events= $binlog_annotate_row_events_saved; --save_master_pos --connection server_2 diff --git a/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test b/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test index ed758313770..0b6402308ce 100644 --- a/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test +++ b/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test @@ -62,7 +62,7 @@ while ($ddl_cases >= 1) # if (`select @@binlog_format = 'ROW'`) { - let $commit_event_row_number= 4; + let $commit_event_row_number= 5; } let $first_binlog_position= query_get_value("SHOW MASTER STATUS", Position, 1); @@ -164,7 +164,7 @@ while ($ddl_cases >= 1) # if (`select @@binlog_format = 'ROW'`) { - let $commit_event_row_number= 5; + let $commit_event_row_number= 6; } } if ($ddl_cases == 22) @@ -250,7 +250,7 @@ while ($ddl_cases >= 1) # if (`select @@binlog_format = 'MIXED'`) { - let $commit_event_row_number= 4; + let $commit_event_row_number= 5; } } if ($ddl_cases == 9) @@ -267,7 +267,7 @@ while ($ddl_cases >= 1) # if (`select @@binlog_format = 'MIXED'`) { - let $commit_event_row_number= 4; + let $commit_event_row_number= 5; } } if ($ddl_cases == 8) @@ -293,10 +293,14 @@ while ($ddl_cases >= 1) # 3: ROW EVENT # 4: COMMIT # - if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'ROW'`) + if (`select @@binlog_format = 'STATEMENT'`) { let $commit_event_row_number= 4; } + if (`select @@binlog_format = 'ROW'`) + { + let $commit_event_row_number= 5; + } # In MIXED mode, the changes are logged as rows and we have what follows: # # 1: BEGIN @@ -307,7 +311,7 @@ while ($ddl_cases >= 1) # if (`select @@binlog_format = 'MIXED'`) { - let $commit_event_row_number= 5; + let $commit_event_row_number= 6; } } if ($ddl_cases == 7) diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test index 01e8497e4de..d2f605e0f96 100644 --- a/mysql-test/extra/rpl_tests/rpl_log.test +++ b/mysql-test/extra/rpl_tests/rpl_log.test @@ -43,7 +43,7 @@ source include/show_binlog_events.inc; let $binlog_limit= 3; source include/show_binlog_events.inc; -let $binlog_limit= 2,4; +let $binlog_limit= 2,5; source include/show_binlog_events.inc; let $binlog_limit=; flush logs; diff --git a/mysql-test/extra/rpl_tests/rpl_record_compare.test b/mysql-test/extra/rpl_tests/rpl_record_compare.test index b674b76dfdf..2bc088d17b4 100644 --- a/mysql-test/extra/rpl_tests/rpl_record_compare.test +++ b/mysql-test/extra/rpl_tests/rpl_record_compare.test @@ -12,7 +12,7 @@ INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); -- disable_warnings -UPDATE t1 SET c5 = 'a'; +UPDATE IGNORE t1 SET c5 = 'a'; -- enable_warnings -- sync_slave_with_master @@ -33,7 +33,7 @@ DROP TABLE t1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); -- disable_warnings -UPDATE t1 SET c5 = 'a'; +UPDATE IGNORE t1 SET c5 = 'a'; -- enable_warnings -- sync_slave_with_master diff --git a/mysql-test/extra/rpl_tests/rpl_row_annotate.test b/mysql-test/extra/rpl_tests/rpl_row_annotate.test index 0614ca97f1d..317a9c86539 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_annotate.test +++ b/mysql-test/extra/rpl_tests/rpl_row_annotate.test @@ -123,7 +123,7 @@ source include/wait_for_slave_sql_error.inc; --disable_query_log --eval SELECT "$err" as 'Last_SQL_Error (expected "Delete_rows_v1 event on table test1.t3; Can\'t find record in \'t3\'" error)' --enable_query_log -call mtr.add_suppression("Slave: Can't find record in 't3' Error_code: 1032"); +call mtr.add_suppression("Can't find record in 't3'"); SET GLOBAL sql_slave_skip_counter=1; START SLAVE; diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test index f45c8824b10..33d5dd328f3 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_basic.test +++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test @@ -411,6 +411,7 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* error.* 1535"); call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* error.* 1032"); call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, error.* 1677"); +call mtr.add_suppression("Can't find record in 't1'"); --let $rpl_only_running_threads= 1 --source include/rpl_reset.inc @@ -622,33 +623,33 @@ eval CREATE TABLE t1 (a bit) ENGINE=$type; INSERT IGNORE INTO t1 VALUES (NULL); INSERT INTO t1 ( a ) VALUES ( 0 ); UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3; -INSERT INTO t1 ( a ) VALUES ( 5 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); DELETE FROM t1 WHERE a < 2 LIMIT 4; DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 9 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 9 ); UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 8 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 8 ); UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0; -INSERT INTO t1 ( a ) VALUES ( 4 ); -INSERT INTO t1 ( a ) VALUES ( 3 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 4 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6; DELETE FROM t1 WHERE a = 4 LIMIT 7; -UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9; +UPDATE IGNORE t1 SET a = 9 WHERE a < 2 LIMIT 9; UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2; DELETE FROM t1 WHERE a < 0 LIMIT 5; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8; +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); +UPDATE IGNORE t1 SET a = 4 WHERE a < 6 LIMIT 4; +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); +UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 8; DELETE FROM t1 WHERE a < 8 LIMIT 8; -INSERT INTO t1 ( a ) VALUES ( 6 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 6 ); DELETE FROM t1 WHERE a < 6 LIMIT 7; UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7; UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 7 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 7 ); DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 7 ); -INSERT INTO t1 ( a ) VALUES ( 6 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 7 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 6 ); UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4; DELETE FROM t1 WHERE a = 2 LIMIT 9; DELETE FROM t1 WHERE a = 1 LIMIT 4; @@ -657,7 +658,7 @@ INSERT INTO t1 ( a ) VALUES ( 0 ); DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; +UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 3; --enable_warnings sync_slave_with_master; diff --git a/mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc b/mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc index 4e68a1560f8..988ffcc1bc1 100644 --- a/mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc +++ b/mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc @@ -4,7 +4,7 @@ --source extra/rpl_tests/rpl_show_binlog_events.inc --let $binlog_limit= 2 --source extra/rpl_tests/rpl_show_binlog_events.inc ---let $binlog_limit= 2,3 +--let $binlog_limit= 2,4 --source extra/rpl_tests/rpl_show_binlog_events.inc --let $binlog_limit= --let $binlog_file= diff --git a/mysql-test/extra/rpl_tests/rpl_special_charset.inc b/mysql-test/extra/rpl_tests/rpl_special_charset.inc index 51119b319d7..641aa483d32 100644 --- a/mysql-test/extra/rpl_tests/rpl_special_charset.inc +++ b/mysql-test/extra/rpl_tests/rpl_special_charset.inc @@ -20,7 +20,7 @@ # then set default's client character set(latin1) as client's character set. ############################################################################### --source include/master-slave.inc -call mtr.add_suppression("Cannot use utf16 as character_set_client"); +call mtr.add_suppression("'utf16' can not be used as client character set"); CREATE TABLE t1(i VARCHAR(20)); INSERT INTO t1 VALUES (0xFFFF); --sync_slave_with_master diff --git a/mysql-test/extra/rpl_tests/rpl_switch_stm_row_mixed.inc b/mysql-test/extra/rpl_tests/rpl_switch_stm_row_mixed.inc index e74fd6828c6..31b80732c60 100644 --- a/mysql-test/extra/rpl_tests/rpl_switch_stm_row_mixed.inc +++ b/mysql-test/extra/rpl_tests/rpl_switch_stm_row_mixed.inc @@ -156,12 +156,14 @@ insert into t1 select "yesterday_24_"; create table t2 ENGINE=MyISAM select rpad(UUID(),100,' '); create table t3 select 1 union select UUID(); --disable_warnings +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3); --enable_warnings +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); # what if UUID() is first: --disable_warnings -insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); +insert ignore into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); --enable_warnings # inside a stored procedure diff --git a/mysql-test/include/add_anonymous_users.inc b/mysql-test/include/add_anonymous_users.inc index a59aa971d59..635a80e3dee 100644 --- a/mysql-test/include/add_anonymous_users.inc +++ b/mysql-test/include/add_anonymous_users.inc @@ -1,7 +1,7 @@ # Allow anonymous users to connect disable_warnings; disable_query_log; -INSERT INTO mysql.user (host, user) VALUES ('localhost',''); +INSERT IGNORE INTO mysql.user (host, user) VALUES ('localhost',''); FLUSH PRIVILEGES; enable_query_log; enable_warnings; diff --git a/mysql-test/include/alter_table_mdev539.inc b/mysql-test/include/alter_table_mdev539.inc index a246434b779..66b32473961 100644 --- a/mysql-test/include/alter_table_mdev539.inc +++ b/mysql-test/include/alter_table_mdev539.inc @@ -2,6 +2,8 @@ --echo # mdev-539: fast build of unique/primary indexes for MyISAM/Aria --echo # +call mtr.add_suppression("Can't find record in '.*'"); + --disable_warnings DROP DATABASE IF EXISTS dbt3_s001; --enable_warnings diff --git a/mysql-test/include/analyze-format.inc b/mysql-test/include/analyze-format.inc new file mode 100644 index 00000000000..65e61b81582 --- /dev/null +++ b/mysql-test/include/analyze-format.inc @@ -0,0 +1,3 @@ +# The time on ANALYSE FORMAT=JSON is rather variable + +--replace_regex /("(r_total_time_ms|r_buffer_size)": )[^, \n]*/\1"REPLACED"/ diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc index 830ffb52c02..a28d3e5f3d1 100644 --- a/mysql-test/include/commit.inc +++ b/mysql-test/include/commit.inc @@ -267,7 +267,7 @@ select * from t2; insert into t2 (a) values (1026); --replace_result $MYSQLTEST_VARDIR .. --error ER_DUP_ENTRY -eval load data infile "../../std_data/words.dat" into table t1 (a) set a:=f2(26); +eval load data infile "../../std_data/words.dat" ignore into table t1 (a) set a:=f2(26); select * from t2; rollback; diff --git a/mysql-test/include/ctype_common.inc b/mysql-test/include/ctype_common.inc index 4cb04599679..a39c25f2cc8 100644 --- a/mysql-test/include/ctype_common.inc +++ b/mysql-test/include/ctype_common.inc @@ -58,7 +58,7 @@ DROP TABLE t1; # Bug #32726: crash with cast in order by clause and cp932 charset # create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); select cast(a as char(1)) from t1; select a sounds like a from t1; select 1 from t1 order by cast(a as char(1)); diff --git a/mysql-test/include/ctype_numconv.inc b/mysql-test/include/ctype_numconv.inc index 6bda2205c0e..07298b1d47b 100644 --- a/mysql-test/include/ctype_numconv.inc +++ b/mysql-test/include/ctype_numconv.inc @@ -739,6 +739,7 @@ show create table t1; drop table t1; select hex(concat(period_diff(200902, 200802))); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 as select concat(period_add(200902, 200802)) as c1; show create table t1; drop table t1; diff --git a/mysql-test/include/ctype_unescape.inc b/mysql-test/include/ctype_unescape.inc index 5d67bf8d189..171843ff66a 100644 --- a/mysql-test/include/ctype_unescape.inc +++ b/mysql-test/include/ctype_unescape.inc @@ -1,5 +1,7 @@ --echo # Start of ctype_unescape.inc +SET sql_mode = ''; + # # Testing how string literals with backslash and quote-quote are unescaped. # The tests assume that single quote (') is used as a delimiter. @@ -323,5 +325,6 @@ DROP FUNCTION wellformedness; DROP FUNCTION mysql_real_escape_string_generated; DROP FUNCTION iswellformed; DROP TABLE allbytes; +SET sql_mode = DEFAULT; --echo # End of ctype_backslash.inc diff --git a/mysql-test/include/ctype_utf8mb4.inc b/mysql-test/include/ctype_utf8mb4.inc index 71993a946b3..2d48f9373f6 100644 --- a/mysql-test/include/ctype_utf8mb4.inc +++ b/mysql-test/include/ctype_utf8mb4.inc @@ -124,7 +124,7 @@ set LC_TIME_NAMES='en_US'; # set names koi8r; eval create table t1 (s1 char(1) character set utf8mb4) engine $engine; -insert into t1 values (_koi8r'ÁÂ'); +insert ignore into t1 values (_koi8r'ÁÂ'); select s1,hex(s1),char_length(s1),octet_length(s1) from t1; drop table t1; @@ -136,11 +136,11 @@ if ($is_heap) { eval create table t1 (s1 varchar(255) character set utf8mb4) engine $engine; } -insert into t1 select repeat('a',300); -insert into t1 select repeat('Ñ',300); -insert into t1 select repeat('aÑ',300); -insert into t1 select repeat('Ña',300); -insert into t1 select repeat('ÑÑ',300); +insert ignore into t1 select repeat('a',300); +insert ignore into t1 select repeat('Ñ',300); +insert ignore into t1 select repeat('aÑ',300); +insert ignore into t1 select repeat('Ña',300); +insert ignore into t1 select repeat('ÑÑ',300); --sorted_result select hex(s1) from t1; --sorted_result @@ -155,11 +155,11 @@ if ($is_heap) { eval create table t1 (s1 varchar(255) character set utf8mb4) engine $engine; } -insert into t1 select repeat('a',66000); -insert into t1 select repeat('Ñ',66000); -insert into t1 select repeat('aÑ',66000); -insert into t1 select repeat('Ña',66000); -insert into t1 select repeat('ÑÑ',66000); +insert ignore into t1 select repeat('a',66000); +insert ignore into t1 select repeat('Ñ',66000); +insert ignore into t1 select repeat('aÑ',66000); +insert ignore into t1 select repeat('Ña',66000); +insert ignore into t1 select repeat('ÑÑ',66000); --sorted_result select length(s1),char_length(s1) from t1; drop table t1; @@ -168,19 +168,19 @@ drop table t1; # Bug #2368 Multibyte charsets do not check that incoming data is well-formed # eval create table t1 (s1 char(10) character set utf8mb4) engine $engine; -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); select hex(s1) from t1; drop table t1; eval create table t1 (s1 varchar(10) character set utf8mb4) engine $engine; -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); select hex(s1) from t1; drop table t1; if (!$is_heap) { eval create table t1 (s1 text character set utf8mb4) engine $engine; -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); select hex(s1) from t1; drop table t1; } @@ -895,6 +895,7 @@ DROP TABLE t1,t2; # eval create table t1 (a char(20) character set utf8mb4) engine $engine; insert into t1 values ('123456'),('андрей'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify a char(2) character set utf8mb4; select char_length(a), length(a), a from t1 order by a; drop table t1; @@ -1282,15 +1283,19 @@ eval create table t1 ( insert into t1 (a) values ('abcdefghijklmnopqrstuvwxyz'); select * from t1; # varchar to varchar +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(20) character set utf8mb4 not null; select * from t1; # varchar to char +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(15) character set utf8mb4 not null; select * from t1; # char to char +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(10) character set utf8mb4 not null; select * from t1; # char to varchar +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(5) character set utf8mb4 not null; select * from t1; drop table t1; @@ -1302,6 +1307,7 @@ eval create table t1 ( a varchar(4000) not null ) default character set utf8mb4 engine $engine; insert into t1 values (repeat('a',4000)); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(3000) character set utf8mb4 not null; select length(a) from t1; drop table t1; @@ -1552,7 +1558,7 @@ eval create table t1 (utf8mb4 char(1) character set utf8mb4) engine $engine; --echo Testing [F0][90..BF][80..BF][80..BF] insert into t1 values (0xF0908080); insert into t1 values (0xF0BFBFBF); -insert into t1 values (0xF08F8080); +insert ignore into t1 values (0xF08F8080); --sorted_result select hex(utf8mb4) from t1; delete from t1; @@ -1567,7 +1573,7 @@ delete from t1; --echo Testing [F4][80..8F][80..BF][80..BF] insert into t1 values (0xF4808080); insert into t1 values (0xF48F8080); -insert into t1 values (0xF4908080); +insert ignore into t1 values (0xF4908080); --sorted_result select hex(utf8mb4) from t1; drop table t1; @@ -1648,13 +1654,13 @@ INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859 # Mix of 3-byte and 4-byte chars INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab'); # All from musical chars, but 11 instead of 10 chars. truncated -INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); +INSERT IGNORE INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); --sorted_result SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding; # First invalid 4 byte value -INSERT INTO t1 VALUES (1114111, x'f5808080'); +INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080'); --sorted_result SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE @@ -1672,14 +1678,14 @@ INSERT INTO t2 VALUES (42856, x'ea9da8'); # SMALL COMMERCIAL AT INSERT INTO t2 VALUES (65131, x'efb9ab'); # (last 4 byte character) -INSERT INTO t2 VALUES (1114111, x'f48fbfbf'); +INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf'); --sorted_result SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE table_name= 't2' AND column_name= 'utf8mb3_encoding'; # Update a 3-byte char col with a 4-byte char, error -UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; +UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; # Update to a 3-byte char casted to 4-byte, error? UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856; @@ -1700,6 +1706,7 @@ SELECT count(*) FROM t1, t2 # Alter from 4-byte charset to 3-byte charset, error --disable_warnings +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 CONVERT TO CHARACTER SET utf8; --enable_warnings SHOW CREATE TABLE t1; diff --git a/mysql-test/include/func_hybrid_type.inc b/mysql-test/include/func_hybrid_type.inc index 854c7ebd34e..0eed936db38 100644 --- a/mysql-test/include/func_hybrid_type.inc +++ b/mysql-test/include/func_hybrid_type.inc @@ -62,6 +62,7 @@ SELECT FROM t1; SHOW CREATE TABLE t2; DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, diff --git a/mysql-test/include/function_defaults.inc b/mysql-test/include/function_defaults.inc index 7c5d43b6e74..23822aa24dc 100644 --- a/mysql-test/include/function_defaults.inc +++ b/mysql-test/include/function_defaults.inc @@ -835,10 +835,10 @@ SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; --echo # Mon Aug 1 15:11:19 2011 UTC SET TIMESTAMP = 1312211479.918273; -LOAD DATA INFILE 't3.dat' INTO TABLE t1; +LOAD DATA INFILE 't3.dat' IGNORE INTO TABLE t1; --query_vertical SELECT * FROM t1 -LOAD DATA INFILE 't4.dat' INTO TABLE t2; +LOAD DATA INFILE 't4.dat' IGNORE INTO TABLE t2; SELECT a FROM t2; SELECT b FROM t2; SELECT c FROM t2; @@ -866,7 +866,7 @@ DELETE FROM t2; --echo # (read_fixed_length()) than under the LOAD ... INTO TABLE t1 command --echo # above. The code in this path is copy-pasted code from the path taken --echo # under the syntax used in the previous LOAD command. -LOAD DATA INFILE 't3.dat' INTO TABLE t1 +LOAD DATA INFILE 't3.dat' IGNORE INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY ''; SELECT b FROM t1; @@ -954,7 +954,7 @@ CREATE TABLE t1 ( --echo # There is no promotion SHOW CREATE TABLE t1; -LOAD DATA INFILE "file1.dat" INTO table t1; +LOAD DATA INFILE "file1.dat" IGNORE INTO table t1; --echo # It is strange that "like_b" gets NULL when "b" gets 0. But --echo # this is consistent with how "a" gets NULL when "b" gets 0, @@ -971,7 +971,7 @@ modify f TIMESTAMP NULL default CURRENT_TIMESTAMP; --echo # There is no promotion SHOW CREATE TABLE t1; -LOAD DATA INFILE "file1.dat" INTO table t1; +LOAD DATA INFILE "file1.dat" IGNORE INTO table t1; --query_vertical SELECT * FROM t1 delete from t1; @@ -1007,7 +1007,7 @@ CREATE TABLE t1 ( --echo # There is no promotion SHOW CREATE TABLE t1; -LOAD DATA INFILE "file2.dat" INTO table t1; +LOAD DATA INFILE "file2.dat" IGNORE INTO table t1; --query_vertical SELECT * FROM t1 delete from t1; @@ -1018,7 +1018,7 @@ modify f TIMESTAMP NULL default CURRENT_TIMESTAMP; --echo # There is no promotion SHOW CREATE TABLE t1; -LOAD DATA INFILE "file2.dat" INTO table t1; +LOAD DATA INFILE "file2.dat" IGNORE INTO table t1; --query_vertical SELECT * FROM t1 delete from t1; diff --git a/mysql-test/include/icp_tests.inc b/mysql-test/include/icp_tests.inc index 88d6923d8f9..f29088887d0 100644 --- a/mysql-test/include/icp_tests.inc +++ b/mysql-test/include/icp_tests.inc @@ -509,7 +509,7 @@ CREATE TABLE t2 ( ); --disable_warnings -INSERT INTO t2 VALUES (); +INSERT IGNORE INTO t2 VALUES (); INSERT INTO t1 VALUES (); --enable_warnings @@ -610,7 +610,7 @@ CREATE TABLE t1 ( KEY idx4267 (col1000, col1003) ); -INSERT INTO t1 VALUES (),(); +INSERT IGNORE INTO t1 VALUES (),(); SELECT col999 FROM t1 WHERE col1000 = "3" AND col1003 <=> sysdate(); DROP TABLE t1; @@ -888,7 +888,7 @@ DROP TABLE t1; # MDEV-308 lp:1008516 - Failing assertion: templ->mysql_col_len == len # create table t1 (a int,b char(5),primary key (a), key (b(1))); -insert into t1 values ('a','b'); +insert ignore into t1 values ('a','b'); select 1 from t1 where a and b >= 'aa'; drop table t1; diff --git a/mysql-test/include/loaddata_autocom.inc b/mysql-test/include/loaddata_autocom.inc index 3bf88fefa6d..7b0c67d2ca8 100644 --- a/mysql-test/include/loaddata_autocom.inc +++ b/mysql-test/include/loaddata_autocom.inc @@ -11,13 +11,13 @@ let $load_file= $MYSQLTEST_VARDIR/std_data/loaddata2.dat; create table t1 (id int unsigned not null auto_increment primary key, a text, b text); start transaction; --replace_result $load_file LOAD_FILE -eval load data infile '$load_file' into table t1 fields terminated by ',' enclosed by '''' (a, b); +eval load data infile '$load_file' ignore into table t1 fields terminated by ',' enclosed by '''' (a, b); commit; select count(*) from t1; truncate table t1; start transaction; --replace_result $load_file LOAD_FILE -eval load data infile '$load_file' into table t1 fields terminated by ',' enclosed by '''' (a, b); +eval load data infile '$load_file' ignore into table t1 fields terminated by ',' enclosed by '''' (a, b); rollback; select count(*) from t1; diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index ea7bc3f5327..6a47b39e5bc 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -573,14 +573,14 @@ INSERT INTO t1(stat_id,acct_id) VALUES INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; UPDATE t1 SET acct_id=785 WHERE MOD(stat_id,2)=0 AND MOD(id,stat_id)=MOD(acct_id,stat_id); OPTIMIZE TABLE t1; @@ -987,6 +987,7 @@ DROP TABLE t1; # create table t1(a text) engine=innodb default charset=utf8; insert into t1 values('aaa'); +set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for alter table t1 add index(a(1024)); show create table t1; drop table t1; @@ -1558,6 +1559,7 @@ if ($test_foreign_keys) # auto_increment keys # create table t1 (a int auto_increment primary key) engine=innodb; +set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for alter table t1 order by a; drop table t1; diff --git a/mysql-test/include/mix2.inc b/mysql-test/include/mix2.inc index 24097514c21..53c1ffd36a3 100644 --- a/mysql-test/include/mix2.inc +++ b/mysql-test/include/mix2.inc @@ -1470,9 +1470,11 @@ source include/varchar.inc; --replace_result \\ / $MYSQL_TEST_DIR . /var/mysqld.1/data/ / t1.frm t1 create table t1 (v varchar(65530), key(v)); drop table t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 (v varchar(65536)); show create table t1; drop table t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 (v varchar(65530) character set utf8); show create table t1; drop table t1; diff --git a/mysql-test/include/ps_conv.inc b/mysql-test/include/ps_conv.inc index 2e42542d19a..d31f41ef39d 100644 --- a/mysql-test/include/ps_conv.inc +++ b/mysql-test/include/ps_conv.inc @@ -576,6 +576,7 @@ prepare my_delete from "delete from t9 where c21 = 'O' "; # # Use the maximum BIGINT from the manual set @arg00= 9223372036854775807 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; --vertical_results @@ -585,6 +586,7 @@ execute my_select ; --replace_result e+0 e+ execute my_delete ; set @arg00= '9223372036854775807' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; --vertical_results @@ -596,6 +598,7 @@ execute my_delete ; # Use the minimum BIGINT from the manual # set @arg00= -9223372036854775808 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; --vertical_results @@ -605,6 +608,7 @@ execute my_select ; --replace_result e+0 e+ execute my_delete ; set @arg00= '-9223372036854775808' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; --vertical_results @@ -618,6 +622,7 @@ execute my_delete ; # (FLOAT,REAL,DOUBLE) during insert # set @arg00= 1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; --vertical_results @@ -630,6 +635,7 @@ execute my_delete ; # because the string is treated as written integer and # '.11111111111111111111e+50' is cut away. set @arg00= '1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; --vertical_results @@ -639,6 +645,7 @@ execute my_select ; --replace_result e+0 e+ execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; --vertical_results @@ -651,6 +658,7 @@ execute my_delete ; # because the string is treated as written integer and # '.11111111111111111111e+50' is cut away. set @arg00= '-1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; --vertical_results @@ -672,6 +680,7 @@ select '-- insert into string columns --' as test_sequence ; --enable_query_log ######## INSERT into .. string columns values(CHAR(n),LONGTEXT) ######## +set sql_mode = ''; insert into t9 ( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 ) values @@ -803,6 +812,7 @@ values ( 57, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; +set sql_mode = default; ######## INSERT into .. string columns values(LONGBLOB,NULL) ######## @@ -984,6 +994,7 @@ delete from t9 ; select '-- insert into date/time columns --' as test_sequence ; --enable_query_log ######## INSERT into .. date/time columns values(VARCHAR(19),LONGTEXT) ######## +set sql_mode = ''; set @arg00= '1991-01-01 01:01:01' ; insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -1079,6 +1090,7 @@ prepare stmt2 from "insert into t9 values ( 53, ?, ?, ?, ?, ? )" ; execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00 ; +set sql_mode = default; ######## INSERT into .. date/time columns values(LONGBLOB,NULL) ######## diff --git a/mysql-test/include/ps_modify.inc b/mysql-test/include/ps_modify.inc index f66f888261d..d4cd4dbe346 100644 --- a/mysql-test/include/ps_modify.inc +++ b/mysql-test/include/ps_modify.inc @@ -108,7 +108,9 @@ execute stmt1 using @arg00, @arg01; select a,b from t1 where a=@arg00; set @arg00=NULL; set @arg01=2; +set sql_mode = ''; execute stmt1 using @arg00, @arg01; +set sql_mode = default; select a,b from t1 order by a; set @arg00=0; execute stmt1 using @arg01, @arg00; diff --git a/mysql-test/include/rpl_stop_server.inc b/mysql-test/include/rpl_stop_server.inc index e1f8839dd69..978cfec1885 100644 --- a/mysql-test/include/rpl_stop_server.inc +++ b/mysql-test/include/rpl_stop_server.inc @@ -47,8 +47,8 @@ if ($rpl_debug) --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect # Send shutdown to the connected server and give -# it 10 seconds to die before zapping it -shutdown_server 10; +# it 60 seconds to die before zapping it +shutdown_server 60; --source include/wait_until_disconnected.inc diff --git a/mysql-test/include/search_pattern_in_file.inc b/mysql-test/include/search_pattern_in_file.inc index 3280dbfd574..f77a7c60916 100644 --- a/mysql-test/include/search_pattern_in_file.inc +++ b/mysql-test/include/search_pattern_in_file.inc @@ -82,8 +82,14 @@ perl; } $ENV{'SEARCH_FILE'} =~ s{^.*?([^/\\]+)$}{$1}; if ($content =~ m{$search_pattern}) { + die "FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n" + if $ENV{SEARCH_ABORT} eq 'FOUND'; print "FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n" + unless defined $ENV{SEARCH_ABORT}; } else { + die "NOT FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n" + if $ENV{SEARCH_ABORT} eq 'NOT FOUND'; print "NOT FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n" + unless defined $ENV{SEARCH_ABORT}; } EOF diff --git a/mysql-test/include/start_mysqld.inc b/mysql-test/include/start_mysqld.inc index 983c566821e..e31f26aad8c 100644 --- a/mysql-test/include/start_mysqld.inc +++ b/mysql-test/include/start_mysqld.inc @@ -1,7 +1,14 @@ # Include this script only after using shutdown_mysqld.inc # where $_expect_file_name was initialized. # Write file to make mysql-test-run.pl start up the server again ---exec echo "restart" > $_expect_file_name +if ($restart_parameters) +{ + --exec echo "restart: $restart_parameters" > $_expect_file_name +} +if (!$restart_parameters) +{ + --exec echo "restart" > $_expect_file_name +} # Turn on reconnect --enable_reconnect diff --git a/mysql-test/include/type_hrtime.inc b/mysql-test/include/type_hrtime.inc index 071dc7b161d..55fd3d665fe 100644 --- a/mysql-test/include/type_hrtime.inc +++ b/mysql-test/include/type_hrtime.inc @@ -15,7 +15,7 @@ insert t1 values ('2010-12-11 00:20:03.1234'); insert t1 values ('2010-12-11 15:47:11.1234'); insert t1 values (20101211010203.45678); insert t1 values (20101211030405.789e0); -insert t1 values (99991231235959e1); +insert ignore t1 values (99991231235959e1); select * from t1; --replace_regex /121000/121094/ /457000/457031/ /789000/789062/ select truncate(a, 6) from t1; # Field::val_real() @@ -50,7 +50,7 @@ select a, a+interval 9876543 microsecond from t1; update t1 set a=a+interval 9876543 microsecond; select * from t1; select a, a + interval 2 year from t1; -insert t1 select a + interval 2 year from t1; +insert ignore t1 select a + interval 2 year from t1; select * from t1; delete from t1 where a < 20110101; select * from t1; diff --git a/mysql-test/include/wait_innodb_all_purged.inc b/mysql-test/include/wait_innodb_all_purged.inc index 97b038acc44..a77e6ec1573 100644 --- a/mysql-test/include/wait_innodb_all_purged.inc +++ b/mysql-test/include/wait_innodb_all_purged.inc @@ -9,8 +9,8 @@ # --source include/wait_innodb_all_purged.inc # --source include/have_innodb.inc ---source include/have_debug.inc +if (`select version() like '%debug%'`) { --disable_query_log let $wait_counter_init= 300; @@ -57,3 +57,4 @@ if (!$success) } --enable_query_log +} diff --git a/mysql-test/include/world.inc b/mysql-test/include/world.inc index eae6556c422..1e81c5c1aa7 100644 --- a/mysql-test/include/world.inc +++ b/mysql-test/include/world.inc @@ -4,7 +4,7 @@ # Table Country -INSERT INTO Country VALUES +INSERT IGNORE INTO Country VALUES ('AFG','Afghanistan',652090.00,22720000,1), ('NLD','Netherlands',41526.00,15864000,5), ('ANT','Netherlands Antilles',800.00,217000,33), @@ -649,7 +649,7 @@ INSERT INTO City VALUES (398,'Franco da Rocha','BRA',108964), (399,'Teixeira de Freitas','BRA',108441), (400,'Varginha','BRA',108314); -INSERT INTO City VALUES +INSERT IGNORE INTO City VALUES (401,'Ribeirão Pires','BRA',108121), (402,'Sabará','BRA',107781), (403,'Catanduva','BRA',107761), @@ -1855,7 +1855,7 @@ INSERT INTO City VALUES (1598,'Aomori','JPN',295969), (1599,'Hakodate','JPN',294788), (1600,'Akashi','JPN',292253); -INSERT INTO City VALUES +INSERT IGNORE INTO City VALUES (1601,'Yokkaichi','JPN',288173), (1602,'Fukushima','JPN',287525), (1603,'Morioka','JPN',287353), @@ -2056,7 +2056,7 @@ INSERT INTO City VALUES (1798,'Subotica','YUG',100386), (1799,'Prizren','YUG',92303), (1800,'Phnom Penh','KHM',570155); -INSERT INTO City VALUES +INSERT IGNORE INTO City VALUES (1801,'Battambang','KHM',129800), (1802,'Siem Reap','KHM',105100), (1803,'Douala','CMR',1448300), @@ -2659,7 +2659,7 @@ INSERT INTO City VALUES (2398,'Namwon','KOR',103544), (2399,'Tonghae','KOR',95472), (2400,'Mun-gyong','KOR',92239); -INSERT INTO City VALUES +INSERT IGNORE INTO City VALUES (2401,'Athenai','GRC',772072), (2402,'Thessaloniki','GRC',383967), (2403,'Pireus','GRC',182671), @@ -3463,7 +3463,7 @@ INSERT INTO City VALUES (3198,'Dakar','SEN',785071), (3199,'Thiès','SEN',248000), (3200,'Kaolack','SEN',199000); -INSERT INTO City VALUES +INSERT IGNORE INTO City VALUES (3201,'Ziguinchor','SEN',192000), (3202,'Rufisque','SEN',150000), (3203,'Saint-Louis','SEN',132400), @@ -3664,7 +3664,7 @@ INSERT INTO City VALUES (3398,'Çorlu','TUR',123300), (3399,'Isparta','TUR',121911), (3400,'Karabük','TUR',118285); -INSERT INTO City VALUES +INSERT IGNORE INTO City VALUES (3401,'Kilis','TUR',118245), (3402,'Alanya','TUR',117300), (3403,'Kiziltepe','TUR',112000), @@ -3865,7 +3865,7 @@ INSERT INTO City VALUES (3598,'Izevsk','RUS',652800), (3599,'Krasnodar','RUS',639000), (3600,'Jaroslavl','RUS',616700); -INSERT INTO City VALUES +INSERT IGNORE INTO City VALUES (3601,'Habarovsk','RUS',609400), (3602,'Vladivostok','RUS',606200), (3603,'Irkutsk','RUS',593700), @@ -4350,7 +4350,7 @@ INSERT INTO City VALUES # Table CountryLanguage -INSERT INTO CountryLanguage VALUES +INSERT IGNORE INTO CountryLanguage VALUES ('AFG','Pashto',52.4), ('NLD','Dutch',95.6), ('ANT','Papiamento',86.2), @@ -4551,7 +4551,7 @@ INSERT INTO CountryLanguage VALUES ('TJK','Tadzhik',62.2), ('TWN','Min',66.7), ('TZA','Nyamwesi',21.1); -INSERT INTO CountryLanguage VALUES +INSERT IGNORE INTO CountryLanguage VALUES ('DNK','Danish',93.5), ('THA','Thai',52.6), ('TGO','Ewe',23.2), @@ -4752,7 +4752,7 @@ INSERT INTO CountryLanguage VALUES ('WSM','Samoan',47.5), ('STP','French',0.7), ('SEN','Ful',21.7); -INSERT INTO CountryLanguage VALUES +INSERT IGNORE INTO CountryLanguage VALUES ('SYC','English',3.8), ('SLE','Temne',31.8), ('SGP','Malay',14.1), @@ -4953,7 +4953,7 @@ INSERT INTO CountryLanguage VALUES ('AGO','Luimbe-nganguela',5.4), ('ABW','Dutch',5.3), ('AUS','Canton Chinese',1.1); -INSERT INTO CountryLanguage VALUES +INSERT IGNORE INTO CountryLanguage VALUES ('AZE','Armenian',2.0), ('BGD','Garo',0.1), ('BEL','Arabic',1.6), diff --git a/mysql-test/lib/mtr_gcov.pl b/mysql-test/lib/mtr_gcov.pl deleted file mode 100644 index a6e1f8efd5f..00000000000 --- a/mysql-test/lib/mtr_gcov.pl +++ /dev/null @@ -1,71 +0,0 @@ -# -*- cperl -*- -# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# This is a library file used by the Perl version of mysql-test-run, -# and is part of the translation of the Bourne shell script with the -# same name. - -use strict; - -our $basedir; - -sub gcov_prepare ($) { - my ($dir)= @_; - print "Purging gcov information from '$dir'...\n"; - - system("find $dir -name \*.gcov -o -name \*.da" - . " -o -name \*.gcda | grep -v 'README.gcov\$' | xargs rm"); -} - -# -# Collect gcov statistics. -# Arguments: -# $dir basedir, normally build directory -# $gcov gcov utility program [path] name -# $gcov_msg message file name -# $gcov_err error file name -# -sub gcov_collect ($$$) { - my ($dir, $gcov, $gcov_msg, $gcov_err)= @_; - - # Get current directory to return to later. - my $start_dir= cwd(); - - print "Collecting source coverage info using '$gcov'...$basedir\n"; - -f "$dir/$gcov_msg" and unlink("$dir/$gcov_msg"); - -f "$dir/$gcov_err" and unlink("$dir/$gcov_err"); - - my @dirs= `find "$dir" -type d -print | sort`; - #print "List of directories:\n@dirs\n"; - - foreach my $d ( @dirs ) { - chomp($d); - chdir($d) or next; - - my @flist= glob("*.*.gcno"); - print ("Collecting in '$d'...\n") if @flist; - - foreach my $f (@flist) { - system("$gcov $f 2>>$dir/$gcov_err >>$dir/$gcov_msg"); - system("perl", "$basedir/mysql-test/lib/process-purecov-annotations.pl", "$f.gcov"); - } - chdir($start_dir); - } - print "gcov info in $dir/$gcov_msg, errors in $dir/$gcov_err\n"; -} - - -1; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 58aedf169d8..4fe0c253a78 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -104,7 +104,6 @@ use IO::Select; require "mtr_process.pl"; require "mtr_io.pl"; -require "mtr_gcov.pl"; require "mtr_gprof.pl"; require "mtr_misc.pl"; @@ -183,6 +182,7 @@ my @DEFAULT_SUITES= qw( innodb_fts- innodb_gis- innodb_zip- + json- maria- multi_source- optimizer_unfixed_bugs- @@ -248,11 +248,6 @@ our $opt_mem= $ENV{'MTR_MEM'}; our $opt_clean_vardir= $ENV{'MTR_CLEAN_VARDIR'}; our $opt_gcov; -our $opt_gcov_src_dir; -our $opt_gcov_exe= "gcov"; -our $opt_gcov_err= "mysql-test-gcov.err"; -our $opt_gcov_msg= "mysql-test-gcov.msg"; - our $opt_gprof; our %gprof_dirs; @@ -383,11 +378,6 @@ sub main { # --help will not reach here, so now it's safe to assume we have binaries My::SafeProcess::find_bin(); - if ( $opt_gcov ) { - gcov_prepare($basedir . "/" . $opt_gcov_src_dir); - } - - print "vardir: $opt_vardir\n"; initialize_servers(); init_timers(); @@ -431,6 +421,10 @@ sub main { exit 0; } + if ($opt_gcov) { + system './dgcov.pl --purge'; + } + ####################################################################### my $num_tests= @$tests; if ( $opt_parallel eq "auto" ) { @@ -555,15 +549,15 @@ sub main { mtr_print_line(); - if ( $opt_gcov ) { - gcov_collect($basedir . "/" . $opt_gcov_src_dir, $opt_gcov_exe, - $opt_gcov_msg, $opt_gcov_err); - } - print_total_times($opt_parallel) if $opt_report_times; mtr_report_stats($prefix, $fail, $completed, $extra_warnings); + if ($opt_gcov) { + mtr_report("Running dgcov"); + system "./dgcov.pl --generate > $opt_vardir/last_changes.dgcov"; + } + if ( @$completed != $num_tests) { mtr_error("Not all tests completed (only ". scalar(@$completed) . @@ -1148,7 +1142,6 @@ sub command_line_setup { # Coverage, profiling etc 'gcov' => \$opt_gcov, - 'gcov-src-dir=s' => \$opt_gcov_src_dir, 'gprof' => \$opt_gprof, 'valgrind|valgrind-all' => \$opt_valgrind, 'valgrind-mysqltest' => \$opt_valgrind_mysqltest, @@ -1840,6 +1833,9 @@ sub collect_mysqld_features { mtr_add_arg($args, "--lc-messages-dir=%s", $path_language); mtr_add_arg($args, "--skip-grant-tables"); mtr_add_arg($args, "--log-warnings=0"); + mtr_add_arg($args, "--log-slow-admin-statements=0"); + mtr_add_arg($args, "--log-queries-not-using-indexes=0"); + mtr_add_arg($args, "--log-slow-slave-statements=0"); mtr_add_arg($args, "--verbose"); mtr_add_arg($args, "--help"); @@ -4349,10 +4345,7 @@ sub extract_warning_lines ($$) { qr/error .*connecting to master/, qr/InnoDB: Error: in ALTER TABLE `test`.`t[12]`/, qr/InnoDB: Error: table `test`.`t[12]` .*does not exist in the InnoDB internal/, - qr/InnoDB: Warning: Setting innodb_use_sys_malloc/, qr/InnoDB: Warning: a long semaphore wait:/, - qr/InnoDB: Disabling redo log encryption/, - qr/InnoDB: Redo log crypto: Can't initialize to key version -1u/, qr/InnoDB: Dumping buffer pool.*/, qr/InnoDB: Buffer pool.*/, qr/InnoDB: Warning: Writer thread is waiting this semaphore/, @@ -4389,6 +4382,7 @@ sub extract_warning_lines ($$) { qr|Checking table: '\..mtr.test_suppressions'|, qr|Table \./test/bug53592 has a primary key in InnoDB data dictionary, but not in MySQL|, qr|Table '\..mtr.test_suppressions' is marked as crashed and should be repaired|, + qr|Table 'test_suppressions' is marked as crashed and should be repaired|, qr|Can't open shared library|, qr|Couldn't load plugin named .*EXAMPLE.*|, qr|InnoDB: Error: table 'test/bug39438'|, @@ -4425,9 +4419,6 @@ sub extract_warning_lines ($$) { qr|InnoDB: TABLE to scan your table for corruption|, qr/InnoDB: See also */, qr/InnoDB: Cannot open .*ib_buffer_pool.* for reading: No such file or directory*/, - qr/InnoDB: Upgrading redo log:*/, - qr|InnoDB: Starting to delete and rewrite log files.|, - qr/InnoDB: New log files created, LSN=*/, qr|InnoDB: Creating foreign key constraint system tables.|, qr/InnoDB: Table .*mysql.*innodb_table_stats.* not found./, qr/InnoDB: User stopword table .* does not exist./ @@ -6180,9 +6171,6 @@ Misc options actions. Disable facility with NUM=0. gcov Collect coverage information after the test. The result is a gcov file per source and header file. - gcov-src-dir=subdir Collect coverage only within the given subdirectory. - For example, if you're only developing the SQL layer, - it makes sense to use --gcov-src-dir=sql gprof Collect profiling information using gprof. experimental= Refer to list of tests considered experimental; failures will be marked exp-fail instead of fail. diff --git a/mysql-test/r/adddate_454.result b/mysql-test/r/adddate_454.result index 8b7c17cd47e..851292121f2 100644 --- a/mysql-test/r/adddate_454.result +++ b/mysql-test/r/adddate_454.result @@ -3,7 +3,7 @@ insert into t1 values ('2012-00-00'); select * from t1; d 2012-00-00 -update t1 set d = adddate(d, interval 1 day); +update ignore t1 set d = adddate(d, interval 1 day); Warnings: Warning 1292 Incorrect datetime value: '2012-00-00' select * from t1; diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 4cccf861807..7cdd042e0a6 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -292,7 +292,7 @@ t2 CREATE TABLE `t2` ( ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`) drop table if exists t1, t2; create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM; -insert into t1 (a) values(1); +insert ignore into t1 (a) values(1); Warnings: Warning 1364 Field 'b' doesn't have a default value Warning 1364 Field 'c' doesn't have a default value @@ -311,7 +311,7 @@ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length I t1 MyISAM 10 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL drop table t1; create table t1 (a int not null, b int not null, c int not null, d int not null, e int not null, f int not null, g int not null, h int not null,i int not null, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM; -insert into t1 (a) values(1); +insert ignore into t1 (a) values(1); Warnings: Warning 1364 Field 'b' doesn't have a default value Warning 1364 Field 'c' doesn't have a default value @@ -2089,6 +2089,21 @@ tab1 CREATE TABLE `tab1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE `tab1`; # +# MDEV-11548 Reproducible server crash after the 2nd ALTER TABLE ADD FOREIGN KEY IF NOT EXISTS +# +CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY); +CREATE TABLE t2 (id1 INT UNSIGNED NOT NULL); +ALTER TABLE t2 +ADD FOREIGN KEY IF NOT EXISTS (id1) +REFERENCES t1 (id); +ALTER TABLE t2 +ADD FOREIGN KEY IF NOT EXISTS (id1) +REFERENCES t1 (id); +Warnings: +Note 1061 Duplicate key name 'id1' +DROP TABLE t2; +DROP TABLE t1; +# # Start of 10.1 tests # # diff --git a/mysql-test/r/alter_table_mdev539_maria.result b/mysql-test/r/alter_table_mdev539_maria.result index 769c8b11b00..0206f4070a0 100644 --- a/mysql-test/r/alter_table_mdev539_maria.result +++ b/mysql-test/r/alter_table_mdev539_maria.result @@ -3,6 +3,7 @@ set @@storage_engine= Aria; # # mdev-539: fast build of unique/primary indexes for MyISAM/Aria # +call mtr.add_suppression("Can't find record in '.*'"); DROP DATABASE IF EXISTS dbt3_s001; CREATE DATABASE dbt3_s001; use dbt3_s001; diff --git a/mysql-test/r/alter_table_mdev539_myisam.result b/mysql-test/r/alter_table_mdev539_myisam.result index bf2a3f49203..0339a64c9c7 100644 --- a/mysql-test/r/alter_table_mdev539_myisam.result +++ b/mysql-test/r/alter_table_mdev539_myisam.result @@ -3,6 +3,7 @@ set @@storage_engine= MyISAM; # # mdev-539: fast build of unique/primary indexes for MyISAM/Aria # +call mtr.add_suppression("Can't find record in '.*'"); DROP DATABASE IF EXISTS dbt3_s001; CREATE DATABASE dbt3_s001; use dbt3_s001; diff --git a/mysql-test/r/analyze_format_json.result b/mysql-test/r/analyze_format_json.result index db28a2748aa..6ac23c6ce80 100644 --- a/mysql-test/r/analyze_format_json.result +++ b/mysql-test/r/analyze_format_json.result @@ -491,15 +491,15 @@ ANALYZE "query_block": { "select_id": 1, "r_loops": 1, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "having_condition": "TOP > t2.a", "filesort": { "sort_key": "t2.a", "r_loops": 1, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "r_used_priority_queue": false, "r_output_rows": 0, - "volatile parameter": "REPLACED", + "r_buffer_size": "REPLACED", "temporary_table": { "table": { "table_name": "t2", @@ -507,7 +507,7 @@ ANALYZE "r_loops": 1, "rows": 256, "r_rows": 256, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "filtered": 100, "r_filtered": 100 } @@ -522,14 +522,14 @@ ANALYZE "query_block": { "select_id": 1, "r_loops": 1, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "filesort": { "sort_key": "t2.a", "r_loops": 1, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "r_used_priority_queue": false, "r_output_rows": 256, - "volatile parameter": "REPLACED", + "r_buffer_size": "REPLACED", "temporary_table": { "table": { "table_name": "t2", @@ -537,7 +537,7 @@ ANALYZE "r_loops": 1, "rows": 256, "r_rows": 256, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "filtered": 100, "r_filtered": 100 } @@ -563,14 +563,14 @@ ANALYZE "query_block": { "select_id": 1, "r_loops": 1, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "filesort": { "sort_key": "t2.a", "r_loops": 1, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "r_used_priority_queue": false, "r_output_rows": 256, - "volatile parameter": "REPLACED", + "r_buffer_size": "REPLACED", "temporary_table": { "table": { "table_name": "t2", @@ -578,7 +578,7 @@ ANALYZE "r_loops": 1, "rows": 256, "r_rows": 256, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "filtered": 100, "r_filtered": 100 } @@ -600,14 +600,14 @@ ANALYZE "query_block": { "select_id": 1, "r_loops": 1, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "table": { "table_name": "t1", "access_type": "ALL", "r_loops": 1, "rows": 2, "r_rows": 2, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "filtered": 100, "r_filtered": 100 }, @@ -619,7 +619,7 @@ ANALYZE "r_loops": 1, "rows": 2, "r_rows": 2, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "filtered": 100, "r_filtered": 100 }, @@ -632,14 +632,14 @@ ANALYZE "query_block": { "select_id": 2, "r_loops": 1, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "table": { "table_name": "t1", "access_type": "ALL", "r_loops": 1, "rows": 2, "r_rows": 2, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "filtered": 100, "r_filtered": 100 } @@ -653,7 +653,7 @@ ANALYZE "r_loops": 1, "rows": 2, "r_rows": 2, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "filtered": 100, "r_filtered": 100 }, @@ -685,22 +685,22 @@ ANALYZE "query_block": { "select_id": 1, "r_loops": 1, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "filesort": { "sort_key": "group_concat(t3.f3 separator ',')", "r_loops": 1, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "r_used_priority_queue": false, "r_output_rows": 0, - "volatile parameter": "REPLACED", + "r_buffer_size": "REPLACED", "temporary_table": { "filesort": { "sort_key": "(subquery#2)", "r_loops": 1, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "r_used_priority_queue": false, "r_output_rows": 0, - "volatile parameter": "REPLACED", + "r_buffer_size": "REPLACED", "temporary_table": { "table": { "table_name": "t2", @@ -708,7 +708,7 @@ ANALYZE "r_loops": 1, "rows": 2, "r_rows": 2, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "filtered": 100, "r_filtered": 100 }, @@ -719,7 +719,7 @@ ANALYZE "r_loops": 1, "rows": 2, "r_rows": 2, - "volatile parameter": "REPLACED", + "r_total_time_ms": "REPLACED", "filtered": 100, "r_filtered": 0, "attached_condition": "t3.f3 in (1,2)" diff --git a/mysql-test/r/auto_increment_ranges_innodb.result b/mysql-test/r/auto_increment_ranges_innodb.result index fb936ddfd2b..1d827a5a166 100644 --- a/mysql-test/r/auto_increment_ranges_innodb.result +++ b/mysql-test/r/auto_increment_ranges_innodb.result @@ -25,7 +25,7 @@ truncate table t1; insert into t1 values(32767-1),(NULL),(NULL); ERROR 22003: Out of range value for column 'a' at row 3 truncate table t1; -insert into t1 values(32767+1); +insert ignore into t1 values(32767+1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -59,7 +59,7 @@ truncate table t1; insert into t1 values(65535-1),(NULL),(NULL); ERROR 22003: Out of range value for column 'a' at row 3 truncate table t1; -insert into t1 values(65535+1); +insert ignore into t1 values(65535+1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -93,7 +93,7 @@ truncate table t1; insert into t1 values(2147483647-1),(NULL),(NULL); ERROR 22003: Out of range value for column 'a' at row 3 truncate table t1; -insert into t1 values(2147483647+1); +insert ignore into t1 values(2147483647+1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -127,7 +127,7 @@ truncate table t1; insert into t1 values(4294967295-1),(NULL),(NULL); ERROR 22003: Out of range value for column 'a' at row 3 truncate table t1; -insert into t1 values(4294967295+1); +insert ignore into t1 values(4294967295+1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -161,7 +161,7 @@ truncate table t1; insert into t1 values(cast(9223372036854775807 as unsigned)-1),(NULL),(NULL); ERROR 22003: Out of range value for column 'a' at row 3 truncate table t1; -insert into t1 values(cast(9223372036854775807 as unsigned)+1); +insert ignore into t1 values(cast(9223372036854775807 as unsigned)+1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -245,7 +245,7 @@ DROP TABLE t1; # CREATE TABLE t1 (a smallint AUTO_INCREMENT, PRIMARY KEY (a)); INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (32768); +INSERT IGNORE INTO t1 VALUES (32768); Warnings: Warning 1264 Out of range value for column 'a' at row 1 INSERT INTO t1 VALUES (NULL); diff --git a/mysql-test/r/auto_increment_ranges_myisam.result b/mysql-test/r/auto_increment_ranges_myisam.result index 5101321c864..e849e980083 100644 --- a/mysql-test/r/auto_increment_ranges_myisam.result +++ b/mysql-test/r/auto_increment_ranges_myisam.result @@ -26,7 +26,7 @@ truncate table t1; insert into t1 values(32767-1),(NULL),(NULL); ERROR 22003: Out of range value for column 'a' at row 3 truncate table t1; -insert into t1 values(32767+1); +insert ignore into t1 values(32767+1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -61,7 +61,7 @@ truncate table t1; insert into t1 values(65535-1),(NULL),(NULL); ERROR 22003: Out of range value for column 'a' at row 3 truncate table t1; -insert into t1 values(65535+1); +insert ignore into t1 values(65535+1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -96,7 +96,7 @@ truncate table t1; insert into t1 values(2147483647-1),(NULL),(NULL); ERROR 22003: Out of range value for column 'a' at row 3 truncate table t1; -insert into t1 values(2147483647+1); +insert ignore into t1 values(2147483647+1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -131,7 +131,7 @@ truncate table t1; insert into t1 values(4294967295-1),(NULL),(NULL); ERROR 22003: Out of range value for column 'a' at row 3 truncate table t1; -insert into t1 values(4294967295+1); +insert ignore into t1 values(4294967295+1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -166,7 +166,7 @@ truncate table t1; insert into t1 values(cast(9223372036854775807 as unsigned)-1),(NULL),(NULL); ERROR 22003: Out of range value for column 'a' at row 3 truncate table t1; -insert into t1 values(cast(9223372036854775807 as unsigned)+1); +insert ignore into t1 values(cast(9223372036854775807 as unsigned)+1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -251,7 +251,7 @@ DROP TABLE t1; # CREATE TABLE t1 (a smallint AUTO_INCREMENT, PRIMARY KEY (a)); INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (32768); +INSERT IGNORE INTO t1 VALUES (32768); Warnings: Warning 1264 Out of range value for column 'a' at row 1 INSERT INTO t1 VALUES (NULL); diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index e58cce67d6a..8f4b287ab21 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -60,6 +60,7 @@ min(big) max(big) max(big)-1 select min(big),max(big),max(big)-1 from t1 group by a; min(big) max(big) max(big)-1 -1 9223372036854775807 9223372036854775806 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify big bigint unsigned not null; Warnings: Warning 1264 Out of range value for column 'big' at row 1 @@ -90,6 +91,7 @@ min(big) max(big) max(big)-1 select min(big),max(big),max(big)-1 from t1 group by a; min(big) max(big) max(big)-1 0 18446744073709551615 18446744073709551614 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify big bigint not null; Warnings: Warning 1264 Out of range value for column 'big' at row 5 @@ -208,7 +210,7 @@ a b c d 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615 drop table t1; create table t1 ( quantity decimal(2) unsigned); -insert into t1 values (500), (-500), (~0), (-1); +insert ignore into t1 values (500), (-500), (~0), (-1); Warnings: Warning 1264 Out of range value for column 'quantity' at row 1 Warning 1264 Out of range value for column 'quantity' at row 2 diff --git a/mysql-test/r/bootstrap.result b/mysql-test/r/bootstrap.result index bb80cf28b56..5cefc281996 100644 --- a/mysql-test/r/bootstrap.result +++ b/mysql-test/r/bootstrap.result @@ -3,7 +3,7 @@ drop table t1; drop table t1; ERROR 42S02: Unknown table 'test.t1' set @my_max_allowed_packet= @@max_allowed_packet; -set global max_allowed_packet=100*@@max_allowed_packet; +set global max_allowed_packet=64*@@max_allowed_packet; set global max_allowed_packet=@my_max_allowed_packet; drop table t1; End of 5.1 tests diff --git a/mysql-test/r/bug39022.result b/mysql-test/r/bug39022.result index 3cdda9eeca4..599808ca7d7 100644 --- a/mysql-test/r/bug39022.result +++ b/mysql-test/r/bug39022.result @@ -1,6 +1,7 @@ # # Bug #39022: Mysql randomly crashing in lock_sec_rec_cons_read_sees # +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); CREATE TABLE t1(a TINYINT NOT NULL,b TINYINT,PRIMARY KEY(b)) ENGINE=innodb; CREATE TABLE t2(d TINYINT NOT NULL,UNIQUE KEY(d)) ENGINE=innodb; INSERT INTO t1 VALUES (13,0),(8,1),(9,2),(6,3), diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index 5a02ca22392..ab6ae5e6a5a 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -40,15 +40,23 @@ select (CASE "two" when "one" then 1.00 WHEN "two" then 2.00 END) +0.0; select case 1/0 when "a" then "true" else "false" END; case 1/0 when "a" then "true" else "false" END false +Warnings: +Warning 1365 Division by 0 select case 1/0 when "a" then "true" END; case 1/0 when "a" then "true" END NULL +Warnings: +Warning 1365 Division by 0 select (case 1/0 when "a" then "true" END) | 0; (case 1/0 when "a" then "true" END) | 0 NULL +Warnings: +Warning 1365 Division by 0 select (case 1/0 when "a" then "true" END) + 0.0; (case 1/0 when "a" then "true" END) + 0.0 NULL +Warnings: +Warning 1365 Division by 0 select case when 1>0 then "TRUE" else "FALSE" END; case when 1>0 then "TRUE" else "FALSE" END TRUE @@ -99,8 +107,8 @@ CASE WHEN 1 THEN 0.1e1 else '1' END AS c12 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL, - `c2` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL, + `c1` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci DEFAULT NULL, + `c2` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci DEFAULT NULL, `c3` varchar(1) NOT NULL, `c4` varchar(1) NOT NULL, `c5` varchar(4) NOT NULL, @@ -157,7 +165,7 @@ t1 CREATE TABLE `t1` ( `COALESCE(1,1.0)` decimal(2,1) NOT NULL, `COALESCE(1,'1')` varchar(1) NOT NULL, `COALESCE(1.1,'1')` varchar(4) NOT NULL, - `COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL + `COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1 SELECT IFNULL('a' COLLATE latin1_swedish_ci, 'b' COLLATE latin1_bin); diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 2edacb6c7e9..13ce2e53367 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -43,6 +43,8 @@ cast(5 as unsigned) -6.0 select cast(NULL as signed), cast(1/0 as signed); cast(NULL as signed) cast(1/0 as signed) NULL NULL +Warnings: +Warning 1365 Division by 0 select cast(1 as double(5,2)); cast(1 as double(5,2)) 1.00 @@ -160,6 +162,8 @@ cast(cast("2011-04-05 8:46:06.123456" AS datetime(6)) as time(6)) select cast(NULL as unsigned), cast(1/0 as unsigned); cast(NULL as unsigned) cast(1/0 as unsigned) NULL NULL +Warnings: +Warning 1365 Division by 0 select cast("A" as binary) = "a", cast(BINARY "a" as CHAR) = "A"; cast("A" as binary) = "a" cast(BINARY "a" as CHAR) = "A" 0 1 @@ -404,7 +408,7 @@ create table t1 select cast(_koi8r' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `t` varchar(4) CHARACTER SET cp1251 NOT NULL + `t` varchar(4) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select @@ -423,6 +427,7 @@ cast(1000 as CHAR(3)) 100 Warnings: Warning 1292 Truncated incorrect BINARY(3) value: '1000' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 select cast(_latin1'ab' AS char) as c1, cast(_latin1'a ' AS char) as c2, @@ -456,6 +461,7 @@ c1 c2 c3 c4 c5 Warnings: Warning 1292 Truncated incorrect CHAR(2) value: 'фгх' Warning 1292 Truncated incorrect CHAR(2) value: 'Ñ„ ' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 select cast(_koi8r'ÆÇ' AS nchar) as c1, cast(_koi8r'Æ ' AS nchar) as c2, @@ -583,11 +589,11 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `cast(1 as unsigned)` int(1) unsigned NOT NULL, - `cast(1 as signed)` int(1) NOT NULL, + `cast(1 as signed)` int(2) NOT NULL, `cast(1 as double(5,2))` double(5,2) DEFAULT NULL, `cast(1 as decimal(5,3))` decimal(5,3) NOT NULL, - `cast("A" as binary)` varbinary(1) NOT NULL, - `cast("A" as char(100))` varbinary(100) NOT NULL, + `cast("A" as binary)` varbinary(1) DEFAULT NULL, + `cast("A" as char(100))` varbinary(100) DEFAULT NULL, `cast("2001-1-1" as DATE)` date DEFAULT NULL, `cast("2001-1-1" as DATETIME)` datetime DEFAULT NULL, `cast("1:2:3" as TIME)` time DEFAULT NULL @@ -746,6 +752,7 @@ DROP TABLE t1; # LONGTEXT, UNION, USER VARIABLE # Bug#14096619 UNABLE TO RESTORE DATABASE DUMP # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT CONCAT(CAST(REPEAT('9', 1000) AS SIGNED)), CONCAT(CAST(REPEAT('9', 1000) AS UNSIGNED)); Warnings: @@ -822,3 +829,74 @@ utf8_bin select collation(cast("a" as char(10) binary ascii)); collation(cast("a" as char(10) binary ascii)) latin1_bin +# +# MDEV-11030 Assertion `precision > 0' failed in decimal_bin_size +# +SELECT * FROM (SELECT IFNULL(CONVERT(NULL, UNSIGNED), NULL)) sq; +IFNULL(CONVERT(NULL, UNSIGNED), NULL) +NULL +CREATE TABLE t1 AS SELECT IFNULL(CONVERT(NULL, UNSIGNED), NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `IFNULL(CONVERT(NULL, UNSIGNED), NULL)` decimal(1,0) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT COALESCE(CONVERT(NULL, UNSIGNED), NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `COALESCE(CONVERT(NULL, UNSIGNED), NULL)` decimal(1,0) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT CASE WHEN TRUE THEN CONVERT(NULL, UNSIGNED) ELSE NULL END; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `CASE WHEN TRUE THEN CONVERT(NULL, UNSIGNED) ELSE NULL END` decimal(1,0) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT IFNULL(CONVERT(NULL,SIGNED),CONVERT(NULL,UNSIGNED)) AS a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` decimal(1,0) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT +-1, +CONVERT(NULL,SIGNED), +CONCAT(CONVERT(NULL,SIGNED)), +1, +CONVERT(NULL,UNSIGNED), +CONCAT(CONVERT(NULL,UNSIGNED)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `-1` int(2) NOT NULL, + `CONVERT(NULL,SIGNED)` int(2) DEFAULT NULL, + `CONCAT(CONVERT(NULL,SIGNED))` varchar(2) DEFAULT NULL, + `1` int(1) NOT NULL, + `CONVERT(NULL,UNSIGNED)` int(1) unsigned DEFAULT NULL, + `CONCAT(CONVERT(NULL,UNSIGNED))` varchar(1) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT +CONVERT('',SIGNED), +CONCAT(CONVERT('',SIGNED)), +CONVERT('',UNSIGNED), +CONCAT(CONVERT('',UNSIGNED)); +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect INTEGER value: '' +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `CONVERT('',SIGNED)` int(2) NOT NULL, + `CONCAT(CONVERT('',SIGNED))` varchar(2) NOT NULL, + `CONVERT('',UNSIGNED)` int(1) unsigned NOT NULL, + `CONCAT(CONVERT('',UNSIGNED))` varchar(1) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; diff --git a/mysql-test/r/comment_column.result b/mysql-test/r/comment_column.result index 552a83da472..a270b30573f 100644 --- a/mysql-test/r/comment_column.result +++ b/mysql-test/r/comment_column.result @@ -236,6 +236,7 @@ t1 CREATE TABLE `t1` ( `c10` int(11) DEFAULT NULL COMMENT 'ABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd', KEY `i2` (`c2`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT='ABCDEFGHIJabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 ADD COLUMN c11 INTEGER COMMENT 'ABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'; Warnings: Warning 1629 Comment for field 'c11' is too long (max = 1024) diff --git a/mysql-test/r/comment_index.result b/mysql-test/r/comment_index.result index 599bf563ca4..82412871377 100644 --- a/mysql-test/r/comment_index.result +++ b/mysql-test/r/comment_index.result @@ -265,6 +265,7 @@ t1 CREATE TABLE `t1` ( KEY `i10` (`c10`) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd', KEY `i1_3` (`c1`,`c2`,`c3`) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd' ) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT='ABCDEFGHIJabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE INDEX i11 ON t1(c11) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'; Warnings: Warning 1688 Comment for index 'i11' is too long (max = 1024) @@ -317,6 +318,7 @@ t1 CREATE TABLE `t1` ( KEY `i1_3` (`c1`,`c2`,`c3`) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd', KEY `i11` (`c11`) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd' ) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT='ABCDEFGHIJabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 ADD INDEX (c13) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'; Warnings: Warning 1688 Comment for index 'c13' is too long (max = 1024) diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result index 514f0a67c7f..1adba7b4c4c 100644 --- a/mysql-test/r/commit_1innodb.result +++ b/mysql-test/r/commit_1innodb.result @@ -264,7 +264,7 @@ rollback; select * from t2; a insert into t2 (a) values (1026); -load data infile "../../std_data/words.dat" into table t1 (a) set a:=f2(26); +load data infile "../../std_data/words.dat" ignore into table t1 (a) set a:=f2(26); ERROR 23000: Duplicate entry '26' for key 'a' select * from t2; a diff --git a/mysql-test/r/compound.result b/mysql-test/r/compound.result index 1d412e671a4..49ad567a055 100644 --- a/mysql-test/r/compound.result +++ b/mysql-test/r/compound.result @@ -155,7 +155,7 @@ drop function fn| drop table t1| begin not atomic select @@sql_mode; end| @@sql_mode -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION create table t1 (a int)| select a from t1 having a > 1| a diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index f9ac0dd4c7f..81b65c420cd 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -70,6 +70,7 @@ insert into t1 values(); select * from t1; a abcde +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 alter column a set default 'abcdef'; ERROR 42000: Invalid default value for 'a' drop table t1; @@ -484,10 +485,10 @@ a int(11) YES NULL b bigint(11) NO NULL c bigint(10) unsigned NO NULL d date YES NULL -e varchar(1) NO NULL +e varchar(1) YES NULL f datetime YES NULL g time YES NULL -h longblob NO NULL +h longblob YES NULL dd time YES NULL select * from t2; a b c d e f g h dd @@ -544,10 +545,12 @@ name varchar(10) YES NULL age smallint(6) YES -1 drop table t1, t2; create table t1(cenum enum('a'), cset set('b')); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t2(cenum enum('a','a'), cset set('b','b')); Warnings: Note 1291 Column 'cenum' has duplicated value 'a' in ENUM Note 1291 Column 'cset' has duplicated value 'b' in SET +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t3(cenum enum('a','A','a','c','c'), cset set('b','B','b','d','d')); Warnings: Note 1291 Column 'cenum' has duplicated value 'a' in ENUM @@ -720,6 +723,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 ( a varchar(12) charset utf8 collate utf8_bin not null, b int not null, primary key (a) @@ -1892,6 +1896,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; set @@session.collation_server=filename; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1(a enum('','')); Warnings: Note 1291 Column 'a' has duplicated value '' in ENUM @@ -1912,6 +1917,13 @@ end| create table t1 as select f1(); ERROR 42S02: Table 'test.t1' doesn't exist drop function f1; +# +# MDEV-10274 Bundling insert with create statement +# for table with unsigned Decimal primary key issues warning 1194 +# +create table t1(ID decimal(2,1) unsigned NOT NULL, PRIMARY KEY (ID))engine=memory +select 2.1 ID; +drop table t1; End of 5.5 tests create table t1; ERROR 42000: A table must have at least 1 column diff --git a/mysql-test/r/create_drop_function.result b/mysql-test/r/create_drop_function.result index e9db636ab87..8e529a587fa 100644 --- a/mysql-test/r/create_drop_function.result +++ b/mysql-test/r/create_drop_function.result @@ -4,7 +4,7 @@ RETURNS CHAR(100) RETURN CONCAT('Hello, ', str, '!'); SELECT * FROM mysql.proc WHERE name like 'f1'; db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 -test f1 FUNCTION f1 SQL CONTAINS_SQL NO DEFINER str char(20) char(100) CHARSET latin1 RETURN CONCAT('Hello, ', str, '!') root@localhost 2014-09-30 08:00:00 2014-09-30 08:00:00 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci RETURN CONCAT('Hello, ', str, '!') +test f1 FUNCTION f1 SQL CONTAINS_SQL NO DEFINER str char(20) char(100) CHARSET latin1 RETURN CONCAT('Hello, ', str, '!') root@localhost 2014-09-30 08:00:00 2014-09-30 08:00:00 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci RETURN CONCAT('Hello, ', str, '!') SELECT f1('world'); f1('world') Hello, world! diff --git a/mysql-test/r/cte_nonrecursive.result b/mysql-test/r/cte_nonrecursive.result index 71bf617df0a..54184f8aba1 100644 --- a/mysql-test/r/cte_nonrecursive.result +++ b/mysql-test/r/cte_nonrecursive.result @@ -927,3 +927,37 @@ Sergei Golubchik Development DE Claudio Nanni Support ES Sergei Petrunia Development RU drop table employees; +# +# MDEV-11818: EXPLAIN EXTENDED for a query with optimized away CTE table +# +CREATE TABLE t1 (i INT, c VARCHAR(3)); +INSERT INTO t1 VALUES (1,'foo'); +EXPLAIN EXTENDED +WITH cte AS ( SELECT * FROM t1 ) SELECT i FROM cte; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 +Warnings: +Note 1003 with cte as (select `test`.`t1`.`i` AS `i`,`test`.`t1`.`c` AS `c` from `test`.`t1`)select 1 AS `i` from dual +DROP TABLE t1; +# +# MDEV-12185: view defintion contains WITH clause with +# several specifications of CTE +# +with +alias1 as (select 1 as one), +alias2 as (select 2 as two) +select one, two from alias1, alias2; +one two +1 2 +create view v1 as +with +alias1 as (select 1 as one), +alias2 as (select 2 as two) +select one, two from alias1, alias2; +select * from v1; +one two +1 2 +show create view v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with alias1 as (select 1 AS `one`), alias2 as (select 2 AS `two`)select `alias1`.`one` AS `one`,`alias2`.`two` AS `two` from (`alias1` join `alias2`) latin1 latin1_swedish_ci +drop view v1; diff --git a/mysql-test/r/cte_recursive.result b/mysql-test/r/cte_recursive.result index 0cc88d27e23..ed4fb7c61f1 100644 --- a/mysql-test/r/cte_recursive.result +++ b/mysql-test/r/cte_recursive.result @@ -699,7 +699,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra NULL UNION RESULT ALL NULL NULL NULL NULL NULL NULL 2 UNCACHEABLE SUBQUERY ALL NULL NULL NULL NULL 12 100.00 Using where Warnings: -Note 1003 with recursive ancestor_couple_ids as (select `a`.`father` AS `h_id`,`a`.`mother` AS `w_id` from `coupled_ancestors` `a` where `a`.`father` is not null and `a`.`mother` is not null)coupled_ancestors as (select `test`.`folks`.`id` AS `id`,`test`.`folks`.`name` AS `name`,`test`.`folks`.`dob` AS `dob`,`test`.`folks`.`father` AS `father`,`test`.`folks`.`mother` AS `mother` from `test`.`folks` where `test`.`folks`.`name` = 'Me' union all select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `fa` where `test`.`p`.`id` = `fa`.`h_id` union all select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `ma` where `test`.`p`.`id` = `ma`.`w_id`), select `h`.`name` AS `name`,`h`.`dob` AS `dob`,`w`.`name` AS `name`,`w`.`dob` AS `dob` from `ancestor_couple_ids` `c` join `coupled_ancestors` `h` join `coupled_ancestors` `w` where `h`.`id` = `c`.`h_id` and `w`.`id` = `c`.`w_id` +Note 1003 with recursive ancestor_couple_ids as (select `a`.`father` AS `h_id`,`a`.`mother` AS `w_id` from `coupled_ancestors` `a` where `a`.`father` is not null and `a`.`mother` is not null), coupled_ancestors as (select `test`.`folks`.`id` AS `id`,`test`.`folks`.`name` AS `name`,`test`.`folks`.`dob` AS `dob`,`test`.`folks`.`father` AS `father`,`test`.`folks`.`mother` AS `mother` from `test`.`folks` where `test`.`folks`.`name` = 'Me' union all select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `fa` where `test`.`p`.`id` = `fa`.`h_id` union all select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `ma` where `test`.`p`.`id` = `ma`.`w_id`)select `h`.`name` AS `name`,`h`.`dob` AS `dob`,`w`.`name` AS `name`,`w`.`dob` AS `dob` from `ancestor_couple_ids` `c` join `coupled_ancestors` `h` join `coupled_ancestors` `w` where `h`.`id` = `c`.`h_id` and `w`.`id` = `c`.`w_id` # simple mutual recursion with recursive ancestor_couple_ids(h_id, w_id) @@ -955,7 +955,7 @@ where folks.id = ma.id and (mother not in (select id from ancestor_ids)) select generation, name from ancestor_ids a, folks where a.id = folks.id; ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'ancestor_ids' -set standards_compliant_cte=0; +set standard_compliant_cte=0; with recursive ancestor_ids (id, generation) as @@ -999,7 +999,7 @@ generation name 2 Grandma Sally 2 Grandpa Ben 3 Grandgrandma Martha -set standards_compliant_cte=1; +set standard_compliant_cte=1; with recursive coupled_ancestor_ids (id) as @@ -1023,7 +1023,7 @@ n.father is not null and n.mother is not null select p.* from coupled_ancestor_ids a, folks p where a.id = p.id; ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'coupled_ancestor_ids' -set statement standards_compliant_cte=0 for +set statement standard_compliant_cte=0 for with recursive coupled_ancestor_ids (id) as @@ -1073,7 +1073,7 @@ where p.id = a.id ) select * from ancestors; ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'ancestor_ids' -set statement standards_compliant_cte=0 for +set statement standard_compliant_cte=0 for with recursive ancestor_ids (id) as @@ -1156,7 +1156,7 @@ where p.id = a.id ) select * from ancestors; ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'ancestor_ids' -set statement standards_compliant_cte=0 for +set statement standard_compliant_cte=0 for with recursive ancestor_ids (id, generation) as @@ -2327,3 +2327,84 @@ a b dist 7 6 3 DROP VIEW edges2; DROP TABLE edges; +# +# MDEV-11674: recursive CTE table that cannot be stored +# in a heap table +# +create table t1 (id int, test_data varchar(36)); +insert into t1(id, test_data) +select id, test_data +from ( +with recursive data_generator(id, test_data) as ( +select 1 as id, uuid() as test_data +union all +select id + 1, uuid() from data_generator where id < 150000 +) +select * from data_generator +) as a; +drop table t1; +# +# MDEV-10773: ANALYZE for query with recursive CTE +# +analyze format=json +with recursive src(counter) as +(select 1 +union +select counter+1 from src where counter<10 +) select * from src; +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "", + "access_type": "ALL", + "r_loops": 1, + "rows": 2, + "r_rows": 10, + "r_total_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100, + "materialized": { + "query_block": { + "recursive_union": { + "table_name": "", + "access_type": "ALL", + "r_loops": 0, + "r_rows": null, + "query_specifications": [ + { + "query_block": { + "select_id": 2, + "table": { + "message": "No tables used" + } + } + }, + { + "query_block": { + "select_id": 3, + "r_loops": 10, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "", + "access_type": "ALL", + "r_loops": 10, + "rows": 2, + "r_rows": 1, + "r_total_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 90, + "attached_condition": "src.counter < 10" + } + } + } + ] + } + } + } + } + } +} diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result index 43cac266bf3..3c184c8aec9 100644 --- a/mysql-test/r/ctype_big5.result +++ b/mysql-test/r/ctype_big5.result @@ -55,7 +55,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -224,30 +224,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; drop table if exists t1; create table t1 select repeat('a',10) as c1; @@ -466,30 +454,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; SELECT strcmp('a','a '), strcmp('a ','a'); strcmp('a','a ') strcmp('a ','a') @@ -540,7 +516,7 @@ E5ABBA drop table t1; select hex(convert(_big5 0xC84041 using ucs2)); hex(convert(_big5 0xC84041 using ucs2)) -003F0041 +NULL Warnings: Warning 1977 Cannot convert 'big5' character 0xC840 to 'ucs2' End of 4.1 tests @@ -587,7 +563,7 @@ t1 CREATE TABLE `t1` ( SELECT COUNT(*) FROM t1; COUNT(*) 28672 -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; Warnings: Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1 Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2 @@ -820,69 +796,69 @@ A2C1 â…¨ A2C2 â…© Warnings: Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E0 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E1 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E2 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E3 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E4 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E5 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E6 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E7 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E8 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E9 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3EA to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3EB to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3EC to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3ED to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3EE to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3EF to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F0 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F1 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F2 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F3 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F4 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F5 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F6 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F7 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F8 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F9 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3FA to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3FB to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3FC to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3FD to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3FE to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xC7FD to 'utf8' SELECT * FROM t1 WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; @@ -899,69 +875,69 @@ C7DA Ñ C7DB Ñ‚ Warnings: Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8' -Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8' Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E0 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E1 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E2 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E3 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E4 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E5 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E6 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E7 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E8 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3E9 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3EA to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3EB to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3EC to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3ED to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3EE to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3EF to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F0 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F1 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F2 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F3 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F4 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F5 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F6 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F7 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F8 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3F9 to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3FA to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3FB to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3FC to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3FD to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xA3FE to 'utf8' +Warning 1977 Cannot convert 'big5' character 0xC7FD to 'utf8' DROP TABLE t1; # # End of 5.5 tests @@ -1000,7 +976,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET big5 NOT NULL + `a` varchar(5) CHARACTER SET big5 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -1259,7 +1235,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET big5 COLLATE big5_bin NOT NULL + `a` varchar(5) CHARACTER SET big5 COLLATE big5_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -1497,6 +1473,7 @@ A1A1A1A1A1A120202020202020202020202020202020202020 # Start of 10.0 tests # # Start of ctype_unescape.inc +SET sql_mode = ''; SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; PREPARE stmt FROM @query; EXECUTE stmt; @@ -4559,6 +4536,7 @@ DROP FUNCTION wellformedness; DROP FUNCTION mysql_real_escape_string_generated; DROP FUNCTION iswellformed; DROP TABLE allbytes; +SET sql_mode = DEFAULT; # End of ctype_backslash.inc SET NAMES big5; # Start of ctype_E05C.inc @@ -4602,7 +4580,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET big5 NOT NULL + `a` varchar(10) CHARACTER SET big5 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('à\'),('à\t'); INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t'); @@ -4641,7 +4619,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET big5 NOT NULL + `a` varchar(10) CHARACTER SET big5 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t')); INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t')); @@ -4680,7 +4658,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET big5 NOT NULL + `a` varchar(10) CHARACTER SET big5 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t'); INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t'); @@ -4726,7 +4704,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET big5 NOT NULL + `a` varchar(10) CHARACTER SET big5 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('à\['),('\à\['); SELECT HEX(a) FROM t1; @@ -4746,7 +4724,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10) NOT NULL + `a` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('à\['),('\à\['); SELECT HEX(a) FROM t1; diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result index 7fefa5754c3..976c3df6e0e 100644 --- a/mysql-test/r/ctype_binary.result +++ b/mysql-test/r/ctype_binary.result @@ -13,7 +13,7 @@ create table t1 as select concat(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -26,7 +26,7 @@ create table t1 as select concat(18446744073709551615) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(20) NOT NULL + `c1` varbinary(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -39,7 +39,7 @@ create table t1 as select concat(1.1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(4) NOT NULL + `c1` varbinary(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -52,7 +52,7 @@ create table t1 as select concat(1+2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(3) NOT NULL + `c1` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1-2)); @@ -62,7 +62,7 @@ create table t1 as select concat(1-2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(3) NOT NULL + `c1` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1*2)); @@ -72,7 +72,7 @@ create table t1 as select concat(1*2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(3) NOT NULL + `c1` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1/2)); @@ -112,7 +112,7 @@ create table t1 as select concat(-1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(-(1+2))); @@ -122,7 +122,7 @@ create table t1 as select concat(-(1+2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(4) NOT NULL + `c1` varbinary(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1|2)); @@ -132,7 +132,7 @@ create table t1 as select concat(1|2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1&2)); @@ -142,7 +142,7 @@ create table t1 as select concat(1&2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(bit_count(12))); @@ -152,7 +152,7 @@ create table t1 as select concat(bit_count(12)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(2<<1)); @@ -162,7 +162,7 @@ create table t1 as select concat(2<<1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(2>>1)); @@ -172,7 +172,7 @@ create table t1 as select concat(2>>1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(~0)); @@ -182,7 +182,7 @@ create table t1 as select concat(~0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(3^2)); @@ -192,7 +192,7 @@ create table t1 as select concat(3^2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(abs(-2))); @@ -202,7 +202,7 @@ create table t1 as select concat(abs(-2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(left(concat(exp(2)),1)); @@ -332,7 +332,7 @@ create table t1 as select concat(degrees(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(23) NOT NULL + `c1` varbinary(23) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(radians(0))); @@ -342,7 +342,7 @@ create table t1 as select concat(radians(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(23) NOT NULL + `c1` varbinary(23) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ceiling(0.5))); @@ -352,7 +352,7 @@ create table t1 as select concat(ceiling(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(4) NOT NULL + `c1` varbinary(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(floor(0.5))); @@ -362,7 +362,7 @@ create table t1 as select concat(floor(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(4) NOT NULL + `c1` varbinary(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(round(0.5))); @@ -372,7 +372,7 @@ create table t1 as select concat(round(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(3) NOT NULL + `c1` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sign(0.5))); @@ -382,14 +382,14 @@ create table t1 as select concat(sign(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(rand()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(23) NOT NULL + `c1` varbinary(23) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(length('a'))); @@ -399,7 +399,7 @@ create table t1 as select concat(length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(char_length('a'))); @@ -409,7 +409,7 @@ create table t1 as select concat(char_length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(bit_length('a'))); @@ -419,7 +419,7 @@ create table t1 as select concat(bit_length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(coercibility('a'))); @@ -429,7 +429,7 @@ create table t1 as select concat(coercibility('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(locate('a','a'))); @@ -439,7 +439,7 @@ create table t1 as select concat(locate('a','a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(11) NOT NULL + `c1` varbinary(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(field('c','a','b','c'))); @@ -449,7 +449,7 @@ create table t1 as select concat(field('c','a','b','c')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(3) NOT NULL + `c1` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ascii(61))); @@ -459,7 +459,7 @@ create table t1 as select concat(ascii(61)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(3) NOT NULL + `c1` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ord(61))); @@ -469,7 +469,7 @@ create table t1 as select concat(ord(61)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(find_in_set('b','a,b,c,d'))); @@ -479,7 +479,7 @@ create table t1 as select concat(find_in_set('b','a,b,c,d')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(3) NOT NULL + `c1` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select md5('a'), hex(md5('a')); @@ -489,7 +489,7 @@ create table t1 as select md5('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(32) NOT NULL + `c1` varbinary(32) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select old_password('a'), hex(old_password('a')); @@ -499,7 +499,7 @@ create table t1 as select old_password('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(16) NOT NULL + `c1` varbinary(16) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select password('a'), hex(password('a')); @@ -509,7 +509,7 @@ create table t1 as select password('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(41) NOT NULL + `c1` varbinary(41) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select sha('a'), hex(sha('a')); @@ -519,7 +519,7 @@ create table t1 as select sha('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(40) NOT NULL + `c1` varbinary(40) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select sha1('a'), hex(sha1('a')); @@ -529,7 +529,7 @@ create table t1 as select sha1('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(40) NOT NULL + `c1` varbinary(40) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast('-1' as signed))); @@ -539,7 +539,7 @@ create table t1 as select concat(cast('-1' as signed)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast('1' as unsigned))); @@ -549,7 +549,7 @@ create table t1 as select concat(cast('1' as unsigned)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast(1/2 as decimal(5,5)))); @@ -608,7 +608,7 @@ create table t1 as select concat(least(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(greatest(1,2))); @@ -618,7 +618,7 @@ create table t1 as select concat(greatest(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(case when 11 then 22 else 33 end)); @@ -628,7 +628,7 @@ create table t1 as select concat(case when 11 then 22 else 33 end) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(coalesce(1,2))); @@ -638,7 +638,7 @@ create table t1 as select concat(coalesce(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat_ws(1,2,3)); @@ -648,7 +648,7 @@ create table t1 as select concat_ws(1,2,3) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(3) NOT NULL + `c1` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(group_concat(1,2,3)); @@ -658,7 +658,7 @@ create table t1 as select group_concat(1,2,3) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` blob DEFAULT NULL + `c1` mediumblob DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select 1 as c1 union select 'a'; @@ -676,7 +676,7 @@ create table t1 as select concat(last_insert_id()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(benchmark(0,0))); @@ -686,7 +686,7 @@ create table t1 as select concat(benchmark(0,0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sleep(0))); @@ -696,7 +696,7 @@ create table t1 as select concat(sleep(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(is_free_lock('xxxx'))); @@ -730,7 +730,7 @@ create table t1 as select concat(crc32('')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(uncompressed_length(''))); @@ -747,7 +747,7 @@ create table t1 as select concat(connection_id()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(inet_aton('127.1.1.1'))); @@ -783,7 +783,7 @@ create table t1 as select concat(row_count()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(found_rows())); @@ -793,21 +793,21 @@ create table t1 as select concat(found_rows()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(uuid_short()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(21) NOT NULL + `c1` varbinary(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(uuid()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(36) CHARACTER SET utf8 NOT NULL + `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select coercibility(uuid()), coercibility(cast('a' as char character set latin1)); @@ -820,7 +820,7 @@ create table t1 as select concat(uuid(), cast('a' as char character set latin1)) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(37) NOT NULL + `c1` varchar(37) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(master_pos_wait('non-existent',0,2)) as c1; @@ -840,7 +840,7 @@ hex(c1) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL, + `c1` varbinary(1) DEFAULT NULL, `c2` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -898,7 +898,7 @@ hex(c1) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(4) NOT NULL, + `c1` varbinary(4) DEFAULT NULL, `c2` decimal(2,1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -937,7 +937,7 @@ create table t1 as select concat('a'='a' IS TRUE) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a'='a' IS NOT TRUE)); @@ -947,7 +947,7 @@ create table t1 as select concat('a'='a' IS NOT TRUE) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(NOT 'a'='a')); @@ -957,7 +957,7 @@ create table t1 as select concat(NOT 'a'='a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' IS NULL)); @@ -967,7 +967,7 @@ create table t1 as select concat('a' IS NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' IS NOT NULL)); @@ -977,7 +977,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' rlike 'a')); @@ -987,7 +987,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(strcmp('a','b'))); @@ -997,7 +997,7 @@ create table t1 as select concat(strcmp('a','b')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' like 'a')); @@ -1007,7 +1007,7 @@ create table t1 as select concat('a' like 'b') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' between 'b' and 'c')); @@ -1017,7 +1017,7 @@ create table t1 as select concat('a' between 'b' and 'c') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' in ('a','b'))); @@ -1027,7 +1027,7 @@ create table t1 as select concat('a' in ('a','b')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(interval(23, 1, 15, 17, 30, 44, 200))); @@ -1037,7 +1037,7 @@ create table t1 as select concat(interval(23, 1, 15, 17, 30, 44, 200)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a varchar(10), fulltext key(a)); @@ -1069,7 +1069,7 @@ create table t1 as select concat(ifnull(1,1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ifnull(1.1,1.1))); @@ -1079,7 +1079,7 @@ create table t1 as select concat(ifnull(1.1,1.1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(4) NOT NULL + `c1` varbinary(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(if(1,'b',1)); @@ -1109,7 +1109,7 @@ create table t1 as select concat(if(1,1,1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(nullif(1,2))); @@ -1274,12 +1274,13 @@ create table t1 as select concat(period_add(200902, 2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(6) NOT NULL + `c1` varbinary(6) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(period_diff(200902, 200802))); hex(concat(period_diff(200902, 200802))) 3132 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 as select concat(period_add(200902, 200802)) as c1; Warnings: Warning 1265 Data truncated for column 'c1' at row 1 @@ -1483,21 +1484,21 @@ create table t1 as select concat(curdate()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(utc_date()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(curtime()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select repeat('a',20) as c1 limit 0; @@ -1513,7 +1514,7 @@ create table t1 as select concat(utc_time()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sec_to_time(2378))); @@ -1606,21 +1607,21 @@ create table t1 as select concat(now()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(19) NOT NULL + `c1` varbinary(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(utc_timestamp()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(19) NOT NULL + `c1` varbinary(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(sysdate()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(19) NOT NULL + `c1` varbinary(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(addtime('00:00:00','11:22:33'))); @@ -1660,7 +1661,7 @@ create table t1 as select export_set(1,2,3,4,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(127) NOT NULL + `c1` varbinary(127) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(insert(1133,3,0,22)); @@ -1670,7 +1671,7 @@ create table t1 as select insert(1133,3,0,22) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(6) NOT NULL + `c1` varbinary(6) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lcase(123)); @@ -1680,7 +1681,7 @@ create table t1 as select lcase(123) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(3) NOT NULL + `c1` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(left(123,1)); @@ -1690,7 +1691,7 @@ create table t1 as select left(123,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lower(123)); @@ -1700,7 +1701,7 @@ create table t1 as select lower(123) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(3) NOT NULL + `c1` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lpad(1,2,0)); @@ -1710,7 +1711,7 @@ create table t1 as select lpad(1,2,0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(ltrim(1)); @@ -1720,7 +1721,7 @@ create table t1 as select ltrim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(mid(1,1,1)); @@ -1730,7 +1731,7 @@ create table t1 as select mid(1,1,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(repeat(1,2)); @@ -1740,7 +1741,7 @@ create table t1 as select repeat(1,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(replace(1,1,2)); @@ -1750,7 +1751,7 @@ create table t1 as select replace(1,1,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(reverse(12)); @@ -1760,7 +1761,7 @@ create table t1 as select reverse(12) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(right(123,1)); @@ -1770,7 +1771,7 @@ create table t1 as select right(123,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(rpad(1,2,0)); @@ -1780,7 +1781,7 @@ create table t1 as select rpad(1,2,0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(rtrim(1)); @@ -1790,7 +1791,7 @@ create table t1 as select rtrim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(soundex(1)); @@ -1800,7 +1801,7 @@ create table t1 as select soundex(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(4) NOT NULL + `c1` varbinary(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(substring(1,1,1)); @@ -1810,7 +1811,7 @@ create table t1 as select substring(1,1,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(trim(1)); @@ -1820,7 +1821,7 @@ create table t1 as select trim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(ucase(1)); @@ -1830,7 +1831,7 @@ create table t1 as select ucase(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(upper(1)); @@ -1840,14 +1841,14 @@ create table t1 as select upper(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) NOT NULL + `c1` varbinary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select repeat(' ', 64) as a limit 0; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(64) NOT NULL + `a` varbinary(64) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ("1.1"), ("2.1"); select a, hex(a) from t1; @@ -2097,7 +2098,7 @@ create table t2 as select concat(a) from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `concat(a)` varbinary(19) NOT NULL + `concat(a)` varbinary(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1, t2; create table t1 (a date); @@ -2396,7 +2397,7 @@ insert into t1 values ('2001-02-03 04:05:06'); create view v1(a) as select concat(a) from t1; show columns from v1; Field Type Null Key Default Extra -a varbinary(19) NO +a varbinary(19) YES NULL select hex(a) from v1; hex(a) 303030302D30302D30302030303A30303A3030 @@ -2647,14 +2648,14 @@ CREATE TABLE t2 AS SELECT CONCAT_WS(1,2,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `CONCAT_WS(1,2,3)` varbinary(3) NOT NULL + `CONCAT_WS(1,2,3)` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT INSERT(1133,3,0,22) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `INSERT(1133,3,0,22)` varbinary(6) NOT NULL + `INSERT(1133,3,0,22)` varbinary(6) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LCASE(a) FROM t1; @@ -2675,35 +2676,35 @@ CREATE TABLE t2 AS SELECT REPEAT(1,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `REPEAT(1,2)` varbinary(2) NOT NULL + `REPEAT(1,2)` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LEFT(123,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `LEFT(123,2)` varbinary(2) NOT NULL + `LEFT(123,2)` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT RIGHT(123,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `RIGHT(123,2)` varbinary(2) NOT NULL + `RIGHT(123,2)` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LTRIM(123) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `LTRIM(123)` varbinary(3) NOT NULL + `LTRIM(123)` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT RTRIM(123) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `RTRIM(123)` varbinary(3) NOT NULL + `RTRIM(123)` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT ELT(1,111,222,333) FROM t1; @@ -2717,35 +2718,35 @@ CREATE TABLE t2 AS SELECT REPLACE(111,2,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `REPLACE(111,2,3)` varbinary(3) NOT NULL + `REPLACE(111,2,3)` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT SUBSTRING_INDEX(111,111,1) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `SUBSTRING_INDEX(111,111,1)` varbinary(3) NOT NULL + `SUBSTRING_INDEX(111,111,1)` varbinary(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT MAKE_SET(111,222,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `MAKE_SET(111,222,3)` varbinary(5) NOT NULL + `MAKE_SET(111,222,3)` varbinary(5) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT SOUNDEX(1) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `SOUNDEX(1)` varbinary(4) NOT NULL + `SOUNDEX(1)` varbinary(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT EXPORT_SET(1,'Y','N','',8); SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `EXPORT_SET(1,'Y','N','',8)` varbinary(64) NOT NULL + `EXPORT_SET(1,'Y','N','',8)` varbinary(64) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; DROP TABLE t1; @@ -2935,7 +2936,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -2956,7 +2957,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -2977,7 +2978,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -2998,7 +2999,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(10) NOT NULL + `c1` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -3023,7 +3024,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10) NOT NULL + `a` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; diff --git a/mysql-test/r/ctype_collate.result b/mysql-test/r/ctype_collate.result index 3cc405937ae..5e8c5adac8f 100644 --- a/mysql-test/r/ctype_collate.result +++ b/mysql-test/r/ctype_collate.result @@ -649,7 +649,7 @@ select least(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci) as f1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` varchar(1) CHARACTER SET latin5 NOT NULL + `f1` varchar(1) CHARACTER SET latin5 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select case _latin1'a' when _latin2'b' then 1 when _latin5'c' collate diff --git a/mysql-test/r/ctype_cp1250_ch.result b/mysql-test/r/ctype_cp1250_ch.result index 173fcccb873..d4f75778ace 100644 --- a/mysql-test/r/ctype_cp1250_ch.result +++ b/mysql-test/r/ctype_cp1250_ch.result @@ -59,7 +59,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -112,7 +112,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -135,7 +135,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -158,7 +158,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -181,7 +181,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -207,7 +207,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf8 NOT NULL + `a` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; @@ -281,7 +281,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -510,7 +510,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET cp1250 COLLATE cp1250_czech_cs NOT NULL + `a` varchar(5) CHARACTER SET cp1250 COLLATE cp1250_czech_cs DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result index 8902a30934f..037f3cb07e3 100644 --- a/mysql-test/r/ctype_cp1251.result +++ b/mysql-test/r/ctype_cp1251.result @@ -281,7 +281,7 @@ chr upper lower utf8 roundtrip issafe 95 95 95 E280A2 95 96 96 96 E28093 96 97 97 97 E28094 97 -98 98 98 3F 3F Round trip unsafe +98 98 98 NULL NULL Round trip unsafe 99 99 99 E284A2 99 9A 9A 9A D199 9A 9B 9B 9B E280BA 9B @@ -422,7 +422,7 @@ create table t1 as select concat(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -435,7 +435,7 @@ create table t1 as select concat(18446744073709551615) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(20) CHARACTER SET cp1251 NOT NULL + `c1` varchar(20) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -448,7 +448,7 @@ create table t1 as select concat(1.1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET cp1251 NOT NULL + `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -461,7 +461,7 @@ create table t1 as select concat(1+2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET cp1251 NOT NULL + `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1-2)); @@ -471,7 +471,7 @@ create table t1 as select concat(1-2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET cp1251 NOT NULL + `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1*2)); @@ -481,7 +481,7 @@ create table t1 as select concat(1*2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET cp1251 NOT NULL + `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1/2)); @@ -521,7 +521,7 @@ create table t1 as select concat(-1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(-(1+2))); @@ -531,7 +531,7 @@ create table t1 as select concat(-(1+2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET cp1251 NOT NULL + `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1|2)); @@ -541,7 +541,7 @@ create table t1 as select concat(1|2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1&2)); @@ -551,7 +551,7 @@ create table t1 as select concat(1&2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(bit_count(12))); @@ -561,7 +561,7 @@ create table t1 as select concat(bit_count(12)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(2<<1)); @@ -571,7 +571,7 @@ create table t1 as select concat(2<<1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(2>>1)); @@ -581,7 +581,7 @@ create table t1 as select concat(2>>1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(~0)); @@ -591,7 +591,7 @@ create table t1 as select concat(~0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(3^2)); @@ -601,7 +601,7 @@ create table t1 as select concat(3^2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(abs(-2))); @@ -611,7 +611,7 @@ create table t1 as select concat(abs(-2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(left(concat(exp(2)),1)); @@ -741,7 +741,7 @@ create table t1 as select concat(degrees(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(23) CHARACTER SET cp1251 NOT NULL + `c1` varchar(23) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(radians(0))); @@ -751,7 +751,7 @@ create table t1 as select concat(radians(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(23) CHARACTER SET cp1251 NOT NULL + `c1` varchar(23) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ceiling(0.5))); @@ -761,7 +761,7 @@ create table t1 as select concat(ceiling(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET cp1251 NOT NULL + `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(floor(0.5))); @@ -771,7 +771,7 @@ create table t1 as select concat(floor(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET cp1251 NOT NULL + `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(round(0.5))); @@ -781,7 +781,7 @@ create table t1 as select concat(round(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET cp1251 NOT NULL + `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sign(0.5))); @@ -791,14 +791,14 @@ create table t1 as select concat(sign(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(rand()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(23) CHARACTER SET cp1251 NOT NULL + `c1` varchar(23) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(length('a'))); @@ -808,7 +808,7 @@ create table t1 as select concat(length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET cp1251 NOT NULL + `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(char_length('a'))); @@ -818,7 +818,7 @@ create table t1 as select concat(char_length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET cp1251 NOT NULL + `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(bit_length('a'))); @@ -828,7 +828,7 @@ create table t1 as select concat(bit_length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET cp1251 NOT NULL + `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(coercibility('a'))); @@ -838,7 +838,7 @@ create table t1 as select concat(coercibility('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET cp1251 NOT NULL + `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(locate('a','a'))); @@ -848,7 +848,7 @@ create table t1 as select concat(locate('a','a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(11) CHARACTER SET cp1251 NOT NULL + `c1` varchar(11) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(field('c','a','b','c'))); @@ -858,7 +858,7 @@ create table t1 as select concat(field('c','a','b','c')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET cp1251 NOT NULL + `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ascii(61))); @@ -868,7 +868,7 @@ create table t1 as select concat(ascii(61)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET cp1251 NOT NULL + `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ord(61))); @@ -878,7 +878,7 @@ create table t1 as select concat(ord(61)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(find_in_set('b','a,b,c,d'))); @@ -888,7 +888,7 @@ create table t1 as select concat(find_in_set('b','a,b,c,d')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET cp1251 NOT NULL + `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select md5('a'), hex(md5('a')); @@ -898,7 +898,7 @@ create table t1 as select md5('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(32) CHARACTER SET cp1251 NOT NULL + `c1` varchar(32) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select old_password('a'), hex(old_password('a')); @@ -908,7 +908,7 @@ create table t1 as select old_password('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(16) CHARACTER SET cp1251 NOT NULL + `c1` varchar(16) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select password('a'), hex(password('a')); @@ -918,7 +918,7 @@ create table t1 as select password('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(41) CHARACTER SET cp1251 NOT NULL + `c1` varchar(41) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select sha('a'), hex(sha('a')); @@ -928,7 +928,7 @@ create table t1 as select sha('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(40) CHARACTER SET cp1251 NOT NULL + `c1` varchar(40) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select sha1('a'), hex(sha1('a')); @@ -938,7 +938,7 @@ create table t1 as select sha1('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(40) CHARACTER SET cp1251 NOT NULL + `c1` varchar(40) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast('-1' as signed))); @@ -948,7 +948,7 @@ create table t1 as select concat(cast('-1' as signed)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast('1' as unsigned))); @@ -958,7 +958,7 @@ create table t1 as select concat(cast('1' as unsigned)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast(1/2 as decimal(5,5)))); @@ -1017,7 +1017,7 @@ create table t1 as select concat(least(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(greatest(1,2))); @@ -1027,7 +1027,7 @@ create table t1 as select concat(greatest(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(case when 11 then 22 else 33 end)); @@ -1037,7 +1037,7 @@ create table t1 as select concat(case when 11 then 22 else 33 end) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(coalesce(1,2))); @@ -1047,7 +1047,7 @@ create table t1 as select concat(coalesce(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat_ws(1,2,3)); @@ -1057,7 +1057,7 @@ create table t1 as select concat_ws(1,2,3) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET cp1251 NOT NULL + `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(group_concat(1,2,3)); @@ -1067,7 +1067,7 @@ create table t1 as select group_concat(1,2,3) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` text CHARACTER SET cp1251 DEFAULT NULL + `c1` mediumtext CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select 1 as c1 union select 'a'; @@ -1085,7 +1085,7 @@ create table t1 as select concat(last_insert_id()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(benchmark(0,0))); @@ -1095,7 +1095,7 @@ create table t1 as select concat(benchmark(0,0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sleep(0))); @@ -1105,7 +1105,7 @@ create table t1 as select concat(sleep(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(is_free_lock('xxxx'))); @@ -1139,7 +1139,7 @@ create table t1 as select concat(crc32('')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET cp1251 NOT NULL + `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(uncompressed_length(''))); @@ -1156,7 +1156,7 @@ create table t1 as select concat(connection_id()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET cp1251 NOT NULL + `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(inet_aton('127.1.1.1'))); @@ -1192,7 +1192,7 @@ create table t1 as select concat(row_count()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(found_rows())); @@ -1202,21 +1202,21 @@ create table t1 as select concat(found_rows()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(uuid_short()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET cp1251 NOT NULL + `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(uuid()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(36) CHARACTER SET utf8 NOT NULL + `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select coercibility(uuid()), coercibility(cast('a' as char character set latin1)); @@ -1229,7 +1229,7 @@ create table t1 as select concat(uuid(), cast('a' as char character set latin1)) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(37) NOT NULL + `c1` varchar(37) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(master_pos_wait('non-existent',0,2)) as c1; @@ -1249,7 +1249,7 @@ hex(c1) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL, + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL, `c2` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -1307,7 +1307,7 @@ hex(c1) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET cp1251 NOT NULL, + `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL, `c2` decimal(2,1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -1346,7 +1346,7 @@ create table t1 as select concat('a'='a' IS TRUE) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a'='a' IS NOT TRUE)); @@ -1356,7 +1356,7 @@ create table t1 as select concat('a'='a' IS NOT TRUE) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(NOT 'a'='a')); @@ -1366,7 +1366,7 @@ create table t1 as select concat(NOT 'a'='a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' IS NULL)); @@ -1376,7 +1376,7 @@ create table t1 as select concat('a' IS NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' IS NOT NULL)); @@ -1386,7 +1386,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' rlike 'a')); @@ -1396,7 +1396,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(strcmp('a','b'))); @@ -1406,7 +1406,7 @@ create table t1 as select concat(strcmp('a','b')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' like 'a')); @@ -1416,7 +1416,7 @@ create table t1 as select concat('a' like 'b') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' between 'b' and 'c')); @@ -1426,7 +1426,7 @@ create table t1 as select concat('a' between 'b' and 'c') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' in ('a','b'))); @@ -1436,7 +1436,7 @@ create table t1 as select concat('a' in ('a','b')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(interval(23, 1, 15, 17, 30, 44, 200))); @@ -1446,7 +1446,7 @@ create table t1 as select concat(interval(23, 1, 15, 17, 30, 44, 200)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a varchar(10), fulltext key(a)); @@ -1478,7 +1478,7 @@ create table t1 as select concat(ifnull(1,1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ifnull(1.1,1.1))); @@ -1488,7 +1488,7 @@ create table t1 as select concat(ifnull(1.1,1.1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET cp1251 NOT NULL + `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(if(1,'b',1)); @@ -1518,7 +1518,7 @@ create table t1 as select concat(if(1,1,1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(nullif(1,2))); @@ -1683,12 +1683,13 @@ create table t1 as select concat(period_add(200902, 2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(6) CHARACTER SET cp1251 NOT NULL + `c1` varchar(6) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(period_diff(200902, 200802))); hex(concat(period_diff(200902, 200802))) 3132 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 as select concat(period_add(200902, 200802)) as c1; Warnings: Warning 1265 Data truncated for column 'c1' at row 1 @@ -1892,21 +1893,21 @@ create table t1 as select concat(curdate()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET cp1251 NOT NULL + `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(utc_date()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET cp1251 NOT NULL + `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(curtime()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET cp1251 NOT NULL + `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select repeat('a',20) as c1 limit 0; @@ -1922,7 +1923,7 @@ create table t1 as select concat(utc_time()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET cp1251 NOT NULL + `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sec_to_time(2378))); @@ -2015,21 +2016,21 @@ create table t1 as select concat(now()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(19) CHARACTER SET cp1251 NOT NULL + `c1` varchar(19) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(utc_timestamp()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(19) CHARACTER SET cp1251 NOT NULL + `c1` varchar(19) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(sysdate()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(19) CHARACTER SET cp1251 NOT NULL + `c1` varchar(19) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(addtime('00:00:00','11:22:33'))); @@ -2069,7 +2070,7 @@ create table t1 as select export_set(1,2,3,4,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(127) CHARACTER SET cp1251 NOT NULL + `c1` varchar(127) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(insert(1133,3,0,22)); @@ -2079,7 +2080,7 @@ create table t1 as select insert(1133,3,0,22) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(6) CHARACTER SET cp1251 NOT NULL + `c1` varchar(6) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lcase(123)); @@ -2089,7 +2090,7 @@ create table t1 as select lcase(123) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET cp1251 NOT NULL + `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(left(123,1)); @@ -2099,7 +2100,7 @@ create table t1 as select left(123,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lower(123)); @@ -2109,7 +2110,7 @@ create table t1 as select lower(123) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET cp1251 NOT NULL + `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lpad(1,2,0)); @@ -2119,7 +2120,7 @@ create table t1 as select lpad(1,2,0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(ltrim(1)); @@ -2129,7 +2130,7 @@ create table t1 as select ltrim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(mid(1,1,1)); @@ -2139,7 +2140,7 @@ create table t1 as select mid(1,1,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(repeat(1,2)); @@ -2149,7 +2150,7 @@ create table t1 as select repeat(1,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(replace(1,1,2)); @@ -2159,7 +2160,7 @@ create table t1 as select replace(1,1,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(reverse(12)); @@ -2169,7 +2170,7 @@ create table t1 as select reverse(12) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(right(123,1)); @@ -2179,7 +2180,7 @@ create table t1 as select right(123,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(rpad(1,2,0)); @@ -2189,7 +2190,7 @@ create table t1 as select rpad(1,2,0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET cp1251 NOT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(rtrim(1)); @@ -2199,7 +2200,7 @@ create table t1 as select rtrim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(soundex(1)); @@ -2209,7 +2210,7 @@ create table t1 as select soundex(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET cp1251 NOT NULL + `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(substring(1,1,1)); @@ -2219,7 +2220,7 @@ create table t1 as select substring(1,1,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(trim(1)); @@ -2229,7 +2230,7 @@ create table t1 as select trim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(ucase(1)); @@ -2239,7 +2240,7 @@ create table t1 as select ucase(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(upper(1)); @@ -2249,14 +2250,14 @@ create table t1 as select upper(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 NOT NULL + `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select repeat(' ', 64) as a limit 0; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(64) CHARACTER SET cp1251 NOT NULL + `a` varchar(64) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ("1.1"), ("2.1"); select a, hex(a) from t1; @@ -2506,7 +2507,7 @@ create table t2 as select concat(a) from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `concat(a)` varchar(19) CHARACTER SET cp1251 NOT NULL + `concat(a)` varchar(19) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1, t2; create table t1 (a date); @@ -2805,7 +2806,7 @@ insert into t1 values ('2001-02-03 04:05:06'); create view v1(a) as select concat(a) from t1; show columns from v1; Field Type Null Key Default Extra -a varchar(19) NO +a varchar(19) YES NULL select hex(a) from v1; hex(a) 303030302D30302D30302030303A30303A3030 @@ -3056,14 +3057,14 @@ CREATE TABLE t2 AS SELECT CONCAT_WS(1,2,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `CONCAT_WS(1,2,3)` varchar(3) CHARACTER SET cp1251 NOT NULL + `CONCAT_WS(1,2,3)` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT INSERT(1133,3,0,22) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `INSERT(1133,3,0,22)` varchar(6) CHARACTER SET cp1251 NOT NULL + `INSERT(1133,3,0,22)` varchar(6) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LCASE(a) FROM t1; @@ -3084,35 +3085,35 @@ CREATE TABLE t2 AS SELECT REPEAT(1,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `REPEAT(1,2)` varchar(2) CHARACTER SET cp1251 NOT NULL + `REPEAT(1,2)` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LEFT(123,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `LEFT(123,2)` varchar(2) CHARACTER SET cp1251 NOT NULL + `LEFT(123,2)` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT RIGHT(123,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `RIGHT(123,2)` varchar(2) CHARACTER SET cp1251 NOT NULL + `RIGHT(123,2)` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LTRIM(123) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `LTRIM(123)` varchar(3) CHARACTER SET cp1251 NOT NULL + `LTRIM(123)` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT RTRIM(123) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `RTRIM(123)` varchar(3) CHARACTER SET cp1251 NOT NULL + `RTRIM(123)` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT ELT(1,111,222,333) FROM t1; @@ -3126,35 +3127,35 @@ CREATE TABLE t2 AS SELECT REPLACE(111,2,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `REPLACE(111,2,3)` varchar(3) CHARACTER SET cp1251 NOT NULL + `REPLACE(111,2,3)` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT SUBSTRING_INDEX(111,111,1) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `SUBSTRING_INDEX(111,111,1)` varchar(3) CHARACTER SET cp1251 NOT NULL + `SUBSTRING_INDEX(111,111,1)` varchar(3) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT MAKE_SET(111,222,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `MAKE_SET(111,222,3)` varchar(5) CHARACTER SET cp1251 NOT NULL + `MAKE_SET(111,222,3)` varchar(5) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT SOUNDEX(1) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `SOUNDEX(1)` varchar(4) CHARACTER SET cp1251 NOT NULL + `SOUNDEX(1)` varchar(4) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT EXPORT_SET(1,'Y','N','',8); SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `EXPORT_SET(1,'Y','N','',8)` varchar(64) CHARACTER SET cp1251 NOT NULL + `EXPORT_SET(1,'Y','N','',8)` varchar(64) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; DROP TABLE t1; diff --git a/mysql-test/r/ctype_cp932_binlog_row.result b/mysql-test/r/ctype_cp932_binlog_row.result index 6eebea87928..b42489677f0 100644 --- a/mysql-test/r/ctype_cp932_binlog_row.result +++ b/mysql-test/r/ctype_cp932_binlog_row.result @@ -11,6 +11,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1(f1 blob) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES(X'8300') master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/r/ctype_cp932_binlog_stm.result b/mysql-test/r/ctype_cp932_binlog_stm.result index 75d05aa9f0a..b958933cd12 100644 --- a/mysql-test/r/ctype_cp932_binlog_stm.result +++ b/mysql-test/r/ctype_cp932_binlog_stm.result @@ -86,7 +86,7 @@ FROM head, tail WHERE (head BETWEEN '80' AND 'FF') AND (head NOT BETWEEN 'A1' AND 'DF') AND (tail BETWEEN '20' AND 'FF') ORDER BY head, tail; -INSERT t1 (code) SELECT head FROM head +INSERT IGNORE t1 (code) SELECT head FROM head WHERE (head BETWEEN 'A1' AND 'DF') ORDER BY head; DROP TEMPORARY TABLE head, tail; @@ -96,7 +96,7 @@ t1 CREATE TABLE `t1` ( `code` varchar(8) DEFAULT NULL, `a` varchar(1) CHARACTER SET cp932 NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; Warnings: Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1 Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2 @@ -388,138 +388,138 @@ code a 81F0 â„« Warnings: Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81EB to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81EC to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81ED to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81EE to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81EF to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81F8 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81F9 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81FA to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81FB to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8240 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8241 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8242 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8243 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8244 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8245 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8246 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8247 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8248 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8249 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x824A to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x824B to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x824C to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x824D to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x824E to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8259 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x825A to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x825B to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x825C to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x825D to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x825E to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x825F to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x827A to 'utf8' SELECT * FROM t1 WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; code a Warnings: Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8' -Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8' Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81EB to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81EC to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81ED to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81EE to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81EF to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81F8 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81F9 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81FA to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x81FB to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8240 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8241 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8242 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8243 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8244 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8245 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8246 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8247 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8248 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8249 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x824A to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x824B to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x824C to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x824D to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x824E to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x8259 to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x825A to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x825B to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x825C to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x825D to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x825E to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x825F to 'utf8' +Warning 1977 Cannot convert 'cp932' character 0x827A to 'utf8' # # WL#3090 Japanese Character Set adjustments # Test cp932->Unicode conversion @@ -19762,7 +19762,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET cp932 NOT NULL + `a` varchar(5) CHARACTER SET cp932 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -20021,7 +20021,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET cp932 COLLATE cp932_bin NOT NULL + `a` varchar(5) CHARACTER SET cp932 COLLATE cp932_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -20300,7 +20300,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET cp932 NOT NULL + `a` varchar(10) CHARACTER SET cp932 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('à\'),('à\t'); INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t'); @@ -20339,7 +20339,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET cp932 NOT NULL + `a` varchar(10) CHARACTER SET cp932 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t')); INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t')); @@ -20378,7 +20378,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET cp932 NOT NULL + `a` varchar(10) CHARACTER SET cp932 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t'); INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t'); @@ -20424,7 +20424,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET cp932 NOT NULL + `a` varchar(10) CHARACTER SET cp932 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('à\['),('\à\['); SELECT HEX(a) FROM t1; @@ -20444,7 +20444,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10) NOT NULL + `a` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('à\['),('\à\['); SELECT HEX(a) FROM t1; diff --git a/mysql-test/r/ctype_eucjpms.result b/mysql-test/r/ctype_eucjpms.result index b40787992bf..afca918abc1 100644 --- a/mysql-test/r/ctype_eucjpms.result +++ b/mysql-test/r/ctype_eucjpms.result @@ -9881,30 +9881,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; SET collation_connection='eucjpms_bin'; create table t1 select repeat('a',4000) a; @@ -9988,39 +9976,27 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; select hex(convert(_eucjpms 0xA5FE41 using ucs2)); hex(convert(_eucjpms 0xA5FE41 using ucs2)) -003F0041 +NULL Warnings: Warning 1977 Cannot convert 'eucjpms' character 0xA5FE to 'ucs2' select hex(convert(_eucjpms 0x8FABF841 using ucs2)); hex(convert(_eucjpms 0x8FABF841 using ucs2)) -003F0041 +NULL Warnings: Warning 1977 Cannot convert 'eucjpms' character 0x8FABF8 to 'ucs2' set global LC_TIME_NAMES=convert((convert((0x63) using eucjpms)) using utf8); @@ -10040,18 +10016,18 @@ CREATE TEMPORARY TABLE head AS SELECT concat(b1.b, b2.b) AS head FROM t1 b1, t1 CREATE TEMPORARY TABLE tail AS SELECT concat(b1.b, b2.b) AS tail FROM t1 b1, t1 b2; DROP TABLE t1; CREATE TABLE t1 AS SELECT 'XXXXXX' AS code, ' ' AS a LIMIT 0; -INSERT INTO t1 (code) SELECT concat('8E', head) FROM head +INSERT IGNORE INTO t1 (code) SELECT concat('8E', head) FROM head WHERE (head BETWEEN 'A1' AND 'DF') ORDER BY head; Warnings: Warning 1364 Field 'a' doesn't have a default value -INSERT INTO t1 (code) SELECT concat(head, tail) +INSERT IGNORE INTO t1 (code) SELECT concat(head, tail) FROM head, tail WHERE (head BETWEEN '80' AND 'FF') AND (head NOT BETWEEN '8E' AND '8F') AND (tail BETWEEN '20' AND 'FF') ORDER BY head, tail; Warnings: Warning 1364 Field 'a' doesn't have a default value -INSERT INTO t1 (code) SELECT concat('8F', head, tail) +INSERT IGNORE INTO t1 (code) SELECT concat('8F', head, tail) FROM head, tail WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '20' AND 'FF') ORDER BY head, tail; @@ -10064,7 +10040,7 @@ t1 CREATE TABLE `t1` ( `code` varchar(6) CHARACTER SET eucjpms NOT NULL, `a` varchar(1) CHARACTER SET eucjpms NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; Warnings: Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1 Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2 @@ -10590,69 +10566,69 @@ code a 8FAABC Ä¢ Warnings: Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2ED to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2EE to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2EF to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2F0 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2F1 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2FA to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2FB to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2FC to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2FD to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A1 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A2 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A3 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A4 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A5 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A6 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A7 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A8 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A9 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3AA to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3AB to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3AC to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3AD to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3AE to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3AF to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3BA to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3BB to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3BC to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3BD to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3BE to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3BF to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3C0 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3DB to 'utf8' SELECT * FROM t1 WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; @@ -10661,69 +10637,69 @@ code a 8FABB9 ǵ Warnings: Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8' -Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8' Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2ED to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2EE to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2EF to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2F0 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2F1 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2FA to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2FB to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2FC to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA2FD to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A1 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A2 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A3 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A4 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A5 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A6 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A7 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A8 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3A9 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3AA to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3AB to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3AC to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3AD to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3AE to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3AF to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3BA to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3BB to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3BC to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3BD to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3BE to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3BF to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3C0 to 'utf8' +Warning 1977 Cannot convert 'eucjpms' character 0xA3DB to 'utf8' # # WL#3090 Japanese Character Set adjustments # Test sjis->Unicode conversion @@ -33013,7 +32989,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET eucjpms NOT NULL + `a` varchar(5) CHARACTER SET eucjpms DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -33446,7 +33422,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET eucjpms COLLATE eucjpms_bin NOT NULL + `a` varchar(5) CHARACTER SET eucjpms COLLATE eucjpms_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -33861,7 +33837,7 @@ hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0)) # MDEV-6776 ujis and eucjmps erroneously accept 0x8EA0 as a valid byte sequence # CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET eucjpms); -INSERT INTO t1 VALUES (0x8EA0); +INSERT IGNORE INTO t1 VALUES (0x8EA0); SELECT HEX(a), CHAR_LENGTH(a) FROM t1; HEX(a) CHAR_LENGTH(a) 3F3F 2 @@ -33920,7 +33896,7 @@ DROP TABLE t1; # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis # CREATE TABLE t1 (a TEXT CHARACTER SET eucjpms); -LOAD DATA INFILE '../../std_data/loaddata/mdev9823.ujis.txt' INTO TABLE t1 CHARACTER SET eucjpms IGNORE 4 LINES; +LOAD DATA INFILE '../../std_data/loaddata/mdev9823.ujis.txt' IGNORE INTO TABLE t1 CHARACTER SET eucjpms IGNORE 4 LINES; SELECT HEX(a) FROM t1; HEX(a) 3F diff --git a/mysql-test/r/ctype_euckr.result b/mysql-test/r/ctype_euckr.result index 359984d1e51..8069ef54bb1 100644 --- a/mysql-test/r/ctype_euckr.result +++ b/mysql-test/r/ctype_euckr.result @@ -55,7 +55,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -224,30 +224,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; SET collation_connection='euckr_bin'; create table t1 select repeat('a',4000) a; @@ -371,30 +359,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; SET NAMES euckr; CREATE TABLE t1 (a text) character set euckr; @@ -411,22 +387,22 @@ insert into t1 values (0xA161); insert into t1 values (0xA17A); insert into t1 values (0xA181); insert into t1 values (0xA1FE); -insert into t1 values (0xA140); +insert ignore into t1 values (0xA140); Warnings: Warning 1366 Incorrect string value: '\xA1@' for column 's1' at row 1 -insert into t1 values (0xA15B); +insert ignore into t1 values (0xA15B); Warnings: Warning 1366 Incorrect string value: '\xA1[' for column 's1' at row 1 -insert into t1 values (0xA160); +insert ignore into t1 values (0xA160); Warnings: Warning 1366 Incorrect string value: '\xA1`' for column 's1' at row 1 -insert into t1 values (0xA17B); +insert ignore into t1 values (0xA17B); Warnings: Warning 1366 Incorrect string value: '\xA1{' for column 's1' at row 1 -insert into t1 values (0xA180); +insert ignore into t1 values (0xA180); Warnings: Warning 1366 Incorrect string value: '\xA1\x80' for column 's1' at row 1 -insert into t1 values (0xA1FF); +insert ignore into t1 values (0xA1FF); Warnings: Warning 1366 Incorrect string value: '\xA1\xFF' for column 's1' at row 1 select hex(s1), hex(convert(s1 using utf8)) from t1 order by binary s1; @@ -1985,7 +1961,7 @@ FE7F FE80 DELETE FROM t2 WHERE a='?'; ALTER TABLE t2 ADD u VARCHAR(1) CHARACTER SET utf8, ADD a2 VARCHAR(1) CHARACTER SET euckr; -UPDATE t2 SET u=a, a2=u; +UPDATE IGNORE t2 SET u=a, a2=u; SELECT s as unassigned_code FROM t2 WHERE u='?'; unassigned_code A2E8 @@ -24450,7 +24426,7 @@ t1 CREATE TABLE `t1` ( `code` varchar(8) DEFAULT NULL, `a` varchar(1) CHARACTER SET euckr NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; Warnings: Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1 Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2 @@ -24738,69 +24714,69 @@ code a A1CA â„« Warnings: Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5BE to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5BF to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5C0 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5D9 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5DA to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5DB to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5DC to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5DD to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5DE to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5DF to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5E0 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5F9 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5FA to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5FB to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5FC to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5FD to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5FE to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6E5 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6E6 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6E7 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6E8 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6E9 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6EA to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6EB to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6EC to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6ED to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6EE to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6EF to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6F0 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6F1 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6F2 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6F3 to 'utf8' SELECT * FROM t1 WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; @@ -24834,69 +24810,69 @@ A8E6 â“© A9A2 Ä‘ Warnings: Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8' -Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8' Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5BE to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5BF to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5C0 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5D9 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5DA to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5DB to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5DC to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5DD to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5DE to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5DF to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5E0 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5F9 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5FA to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5FB to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5FC to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5FD to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA5FE to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6E5 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6E6 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6E7 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6E8 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6E9 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6EA to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6EB to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6EC to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6ED to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6EE to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6EF to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6F0 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6F1 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6F2 to 'utf8' +Warning 1977 Cannot convert 'euckr' character 0xA6F3 to 'utf8' DROP TABLE t1; # # End of 5.5 tests @@ -24935,7 +24911,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET euckr NOT NULL + `a` varchar(5) CHARACTER SET euckr DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -25194,7 +25170,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET euckr COLLATE euckr_bin NOT NULL + `a` varchar(5) CHARACTER SET euckr COLLATE euckr_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; diff --git a/mysql-test/r/ctype_gb2312.result b/mysql-test/r/ctype_gb2312.result index 4702eac6b6b..cef286b0aab 100644 --- a/mysql-test/r/ctype_gb2312.result +++ b/mysql-test/r/ctype_gb2312.result @@ -55,7 +55,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -224,30 +224,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; drop table if exists t1; create table t1 select repeat('a',10) as c1; @@ -452,30 +440,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; SET NAMES gb2312; CREATE TABLE t1 (a text) character set gb2312; @@ -511,7 +487,7 @@ t1 CREATE TABLE `t1` ( `code` varchar(8) DEFAULT NULL, `a` varchar(1) CHARACTER SET gb2312 NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; Warnings: Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1 Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2 @@ -766,69 +742,69 @@ A2FB â…ª A2FC â…« Warnings: Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA4FE to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5F7 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5F8 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5F9 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5FA to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5FB to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5FC to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5FD to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5FE to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6B9 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6BA to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6BB to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6BC to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6BD to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6BE to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6BF to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6C0 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6D9 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6DA to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6DB to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6DC to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6DD to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6DE to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6DF to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E0 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E1 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E2 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E3 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E4 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E5 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E6 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E7 to 'utf8' SELECT * FROM t1 WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; @@ -861,69 +837,69 @@ A8B9 ü A8BA ê Warnings: Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8' -Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8' Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA4FE to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5F7 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5F8 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5F9 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5FA to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5FB to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5FC to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5FD to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA5FE to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6B9 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6BA to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6BB to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6BC to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6BD to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6BE to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6BF to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6C0 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6D9 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6DA to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6DB to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6DC to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6DD to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6DE to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6DF to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E0 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E1 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E2 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E3 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E4 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E5 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E6 to 'utf8' +Warning 1977 Cannot convert 'gb2312' character 0xA6E7 to 'utf8' DROP TABLE t1; # # End of 5.5 tests @@ -962,7 +938,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET gb2312 NOT NULL + `a` varchar(5) CHARACTER SET gb2312 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -1221,7 +1197,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET gb2312 COLLATE gb2312_bin NOT NULL + `a` varchar(5) CHARACTER SET gb2312 COLLATE gb2312_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -1459,6 +1435,7 @@ A1A1A1A1A1A120202020202020202020202020202020202020 # Start of 10.0 tests # # Start of ctype_unescape.inc +SET sql_mode = ''; SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; PREPARE stmt FROM @query; EXECUTE stmt; @@ -4521,6 +4498,7 @@ DROP FUNCTION wellformedness; DROP FUNCTION mysql_real_escape_string_generated; DROP FUNCTION iswellformed; DROP TABLE allbytes; +SET sql_mode = DEFAULT; # End of ctype_backslash.inc # # End of 10.0 tests diff --git a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result index 34c3f6c7486..8e16320b9df 100644 --- a/mysql-test/r/ctype_gbk.result +++ b/mysql-test/r/ctype_gbk.result @@ -55,7 +55,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -224,30 +224,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; drop table if exists t1; create table t1 select repeat('a',10) as c1; @@ -452,30 +440,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; SET NAMES gbk; CREATE TABLE t1 (a text) character set gbk; @@ -487,7 +463,7 @@ A3A0 DROP TABLE t1; select hex(convert(_gbk 0xA14041 using ucs2)); hex(convert(_gbk 0xA14041 using ucs2)) -003F0041 +NULL Warnings: Warning 1977 Cannot convert 'gbk' character 0xA140 to 'ucs2' create table t1 (c1 text not null, c2 text not null) character set gbk; @@ -533,7 +509,7 @@ t1 CREATE TABLE `t1` ( `code` varchar(8) DEFAULT NULL, `a` varchar(1) CHARACTER SET gbk NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; Warnings: Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1 Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2 @@ -798,69 +774,69 @@ A2FB â…ª A2FC â…« Warnings: Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA160 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA161 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA162 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA163 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA164 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA165 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA166 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA167 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA168 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA169 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA16A to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA16B to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA16C to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA16D to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA16E to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA16F to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA170 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA171 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA172 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA173 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA174 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA175 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA176 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA177 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA178 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA179 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA17A to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA17B to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA17C to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA17D to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA17E to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA180 to 'utf8' SELECT * FROM t1 WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; @@ -895,69 +871,69 @@ A8BD Å„ A8BE ň Warnings: Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8' -Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8' Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA160 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA161 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA162 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA163 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA164 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA165 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA166 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA167 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA168 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA169 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA16A to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA16B to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA16C to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA16D to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA16E to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA16F to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA170 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA171 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA172 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA173 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA174 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA175 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA176 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA177 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA178 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA179 to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA17A to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA17B to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA17C to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA17D to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA17E to 'utf8' +Warning 1977 Cannot convert 'gbk' character 0xA180 to 'utf8' DROP TABLE t1; # # End of 5.5 tests @@ -996,7 +972,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET gbk NOT NULL + `a` varchar(5) CHARACTER SET gbk DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -1429,7 +1405,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET gbk COLLATE gbk_bin NOT NULL + `a` varchar(5) CHARACTER SET gbk COLLATE gbk_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -1841,6 +1817,7 @@ hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0)) # Start of 10.0 tests # # Start of ctype_unescape.inc +SET sql_mode = ''; SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; PREPARE stmt FROM @query; EXECUTE stmt; @@ -4903,6 +4880,7 @@ DROP FUNCTION wellformedness; DROP FUNCTION mysql_real_escape_string_generated; DROP FUNCTION iswellformed; DROP TABLE allbytes; +SET sql_mode = DEFAULT; # End of ctype_backslash.inc SET NAMES gbk; # Start of ctype_E05C.inc @@ -4946,7 +4924,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET gbk NOT NULL + `a` varchar(10) CHARACTER SET gbk DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('à\'),('à\t'); INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t'); @@ -4985,7 +4963,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET gbk NOT NULL + `a` varchar(10) CHARACTER SET gbk DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t')); INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t')); @@ -5024,7 +5002,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET gbk NOT NULL + `a` varchar(10) CHARACTER SET gbk DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t'); INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t'); @@ -5070,7 +5048,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET gbk NOT NULL + `a` varchar(10) CHARACTER SET gbk DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('à\['),('\à\['); SELECT HEX(a) FROM t1; @@ -5090,7 +5068,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10) NOT NULL + `a` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('à\['),('\à\['); SELECT HEX(a) FROM t1; @@ -5169,7 +5147,7 @@ DELETE FROM t3; # Sequences that start with a tail or a bad byte, # or end with a bad byte, all should be fixed. # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 WHERE type1='tail' OR type1='bad' OR type2='bad' ORDER BY b; Warnings: @@ -5224,7 +5202,7 @@ DELETE FROM t3; # Sequences that start with an ASCII or an MB2 character, # followed by a non-ASCII tail, all should be fixed. # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 WHERE (FIND_IN_SET('mb2',type1) OR FIND_IN_SET('ascii',type1)) AND (FIND_IN_SET('tail',type2) AND NOT FIND_IN_SET('ascii',type2)) ORDER BY b; @@ -5378,7 +5356,7 @@ DELETE FROM t3; # Sequences that start with a tail or a bad byte, # or have a bad byte, all should be fixed. # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 WHERE type1='tail' OR type1='bad' OR type2='bad' OR type3='bad' ORDER BY b; Warnings: @@ -5622,7 +5600,7 @@ DELETE FROM t3; # Sequences that start with an ASCII or an MB2 character, # followed by a pure non-ASCII tail, all should be fixed. # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 WHERE (FIND_IN_SET('mb2',type1) OR FIND_IN_SET('ascii',type1)) AND type2='tail' ORDER BY b; @@ -5688,7 +5666,7 @@ DELETE FROM t3; # Sequences that consist of two ASCII or MB2 characters, # followed by a pure non-ASCII tail, all should be fixed. # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 WHERE (FIND_IN_SET('mb2',type1) OR FIND_IN_SET('ascii',type1)) AND (FIND_IN_SET('mb2',type2) OR FIND_IN_SET('ascii',type2)) AND type3='tail' @@ -5739,7 +5717,7 @@ DELETE FROM t3; # Sequences that consist of two MB2 characters, # followed by a non-ASCII head or tail, all should be fixed. # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 WHERE FIND_IN_SET('mb2',type1) AND FIND_IN_SET('mb2',type2) AND NOT FIND_IN_SET('ascii',type3) AND NOT FIND_IN_SET('mb2',type3) @@ -5827,7 +5805,7 @@ SELECT HEX(c),HEX(b),comment FROM t3 WHERE b<>c ORDER BY b; HEX(c) HEX(b) comment DELETE FROM t2 WHERE b IN (SELECT b FROM t3); DELETE FROM t3; -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 ORDER BY b; +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 ORDER BY b; Warnings: Warning 1366 Incorrect string value: '\x81' for column 'c' at row 1 Warning 1366 Incorrect string value: '\xA3' for column 'c' at row 3 @@ -5913,6 +5891,7 @@ DROP TABLE t1; # # MDEV-7661 Unexpected result for: CAST(0xHHHH AS CHAR CHARACTER SET xxx) for incorrect byte sequences # +set sql_mode=''; SELECT HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312)); HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312)) 3F41 @@ -5923,6 +5902,7 @@ HEX(CONVERT(CAST(0xA341 AS CHAR CHARACTER SET gb2312) USING utf8)) 3F41 Warnings: Warning 1300 Invalid gb2312 character string: '\xA3A' +set sql_mode=default; # # End of 10.1 tests # diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result index ddd2ecdbd95..fc37dcfda8b 100644 --- a/mysql-test/r/ctype_latin1.result +++ b/mysql-test/r/ctype_latin1.result @@ -364,7 +364,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -518,8 +518,8 @@ STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR)) CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0; SHOW COLUMNS FROM t1; Field Type Null Key Default Extra -subject varchar(64) NO NULL -pattern varchar(64) NO NULL +subject varchar(64) YES NULL +pattern varchar(64) YES NULL INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d'); SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1; HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern) @@ -719,7 +719,7 @@ create table t1 as select concat(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -732,7 +732,7 @@ create table t1 as select concat(18446744073709551615) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(20) NOT NULL + `c1` varchar(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -745,7 +745,7 @@ create table t1 as select concat(1.1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) NOT NULL + `c1` varchar(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -758,7 +758,7 @@ create table t1 as select concat(1+2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) NOT NULL + `c1` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1-2)); @@ -768,7 +768,7 @@ create table t1 as select concat(1-2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) NOT NULL + `c1` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1*2)); @@ -778,7 +778,7 @@ create table t1 as select concat(1*2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) NOT NULL + `c1` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1/2)); @@ -818,7 +818,7 @@ create table t1 as select concat(-1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(-(1+2))); @@ -828,7 +828,7 @@ create table t1 as select concat(-(1+2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) NOT NULL + `c1` varchar(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1|2)); @@ -838,7 +838,7 @@ create table t1 as select concat(1|2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1&2)); @@ -848,7 +848,7 @@ create table t1 as select concat(1&2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(bit_count(12))); @@ -858,7 +858,7 @@ create table t1 as select concat(bit_count(12)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(2<<1)); @@ -868,7 +868,7 @@ create table t1 as select concat(2<<1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(2>>1)); @@ -878,7 +878,7 @@ create table t1 as select concat(2>>1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(~0)); @@ -888,7 +888,7 @@ create table t1 as select concat(~0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(3^2)); @@ -898,7 +898,7 @@ create table t1 as select concat(3^2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(abs(-2))); @@ -908,7 +908,7 @@ create table t1 as select concat(abs(-2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(left(concat(exp(2)),1)); @@ -1038,7 +1038,7 @@ create table t1 as select concat(degrees(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(23) NOT NULL + `c1` varchar(23) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(radians(0))); @@ -1048,7 +1048,7 @@ create table t1 as select concat(radians(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(23) NOT NULL + `c1` varchar(23) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ceiling(0.5))); @@ -1058,7 +1058,7 @@ create table t1 as select concat(ceiling(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) NOT NULL + `c1` varchar(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(floor(0.5))); @@ -1068,7 +1068,7 @@ create table t1 as select concat(floor(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) NOT NULL + `c1` varchar(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(round(0.5))); @@ -1078,7 +1078,7 @@ create table t1 as select concat(round(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) NOT NULL + `c1` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sign(0.5))); @@ -1088,14 +1088,14 @@ create table t1 as select concat(sign(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(rand()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(23) NOT NULL + `c1` varchar(23) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(length('a'))); @@ -1105,7 +1105,7 @@ create table t1 as select concat(length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(char_length('a'))); @@ -1115,7 +1115,7 @@ create table t1 as select concat(char_length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(bit_length('a'))); @@ -1125,7 +1125,7 @@ create table t1 as select concat(bit_length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(coercibility('a'))); @@ -1135,7 +1135,7 @@ create table t1 as select concat(coercibility('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(locate('a','a'))); @@ -1145,7 +1145,7 @@ create table t1 as select concat(locate('a','a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(11) NOT NULL + `c1` varchar(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(field('c','a','b','c'))); @@ -1155,7 +1155,7 @@ create table t1 as select concat(field('c','a','b','c')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) NOT NULL + `c1` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ascii(61))); @@ -1165,7 +1165,7 @@ create table t1 as select concat(ascii(61)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) NOT NULL + `c1` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ord(61))); @@ -1175,7 +1175,7 @@ create table t1 as select concat(ord(61)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(find_in_set('b','a,b,c,d'))); @@ -1185,7 +1185,7 @@ create table t1 as select concat(find_in_set('b','a,b,c,d')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) NOT NULL + `c1` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select md5('a'), hex(md5('a')); @@ -1195,7 +1195,7 @@ create table t1 as select md5('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(32) NOT NULL + `c1` varchar(32) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select old_password('a'), hex(old_password('a')); @@ -1205,7 +1205,7 @@ create table t1 as select old_password('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(16) NOT NULL + `c1` varchar(16) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select password('a'), hex(password('a')); @@ -1215,7 +1215,7 @@ create table t1 as select password('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(41) NOT NULL + `c1` varchar(41) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select sha('a'), hex(sha('a')); @@ -1225,7 +1225,7 @@ create table t1 as select sha('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(40) NOT NULL + `c1` varchar(40) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select sha1('a'), hex(sha1('a')); @@ -1235,7 +1235,7 @@ create table t1 as select sha1('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(40) NOT NULL + `c1` varchar(40) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast('-1' as signed))); @@ -1245,7 +1245,7 @@ create table t1 as select concat(cast('-1' as signed)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast('1' as unsigned))); @@ -1255,7 +1255,7 @@ create table t1 as select concat(cast('1' as unsigned)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast(1/2 as decimal(5,5)))); @@ -1314,7 +1314,7 @@ create table t1 as select concat(least(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(greatest(1,2))); @@ -1324,7 +1324,7 @@ create table t1 as select concat(greatest(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(case when 11 then 22 else 33 end)); @@ -1334,7 +1334,7 @@ create table t1 as select concat(case when 11 then 22 else 33 end) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(coalesce(1,2))); @@ -1344,7 +1344,7 @@ create table t1 as select concat(coalesce(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat_ws(1,2,3)); @@ -1354,7 +1354,7 @@ create table t1 as select concat_ws(1,2,3) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) NOT NULL + `c1` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(group_concat(1,2,3)); @@ -1364,7 +1364,7 @@ create table t1 as select group_concat(1,2,3) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` text DEFAULT NULL + `c1` mediumtext DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select 1 as c1 union select 'a'; @@ -1382,7 +1382,7 @@ create table t1 as select concat(last_insert_id()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(benchmark(0,0))); @@ -1392,7 +1392,7 @@ create table t1 as select concat(benchmark(0,0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sleep(0))); @@ -1402,7 +1402,7 @@ create table t1 as select concat(sleep(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(is_free_lock('xxxx'))); @@ -1436,7 +1436,7 @@ create table t1 as select concat(crc32('')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(uncompressed_length(''))); @@ -1453,7 +1453,7 @@ create table t1 as select concat(connection_id()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(inet_aton('127.1.1.1'))); @@ -1489,7 +1489,7 @@ create table t1 as select concat(row_count()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(found_rows())); @@ -1499,21 +1499,21 @@ create table t1 as select concat(found_rows()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(uuid_short()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) NOT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(uuid()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(36) CHARACTER SET utf8 NOT NULL + `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select coercibility(uuid()), coercibility(cast('a' as char character set latin1)); @@ -1526,7 +1526,7 @@ create table t1 as select concat(uuid(), cast('a' as char character set latin1)) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(37) NOT NULL + `c1` varchar(37) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(master_pos_wait('non-existent',0,2)) as c1; @@ -1546,7 +1546,7 @@ hex(c1) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL, + `c1` varchar(1) DEFAULT NULL, `c2` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -1604,7 +1604,7 @@ hex(c1) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) NOT NULL, + `c1` varchar(4) DEFAULT NULL, `c2` decimal(2,1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -1643,7 +1643,7 @@ create table t1 as select concat('a'='a' IS TRUE) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a'='a' IS NOT TRUE)); @@ -1653,7 +1653,7 @@ create table t1 as select concat('a'='a' IS NOT TRUE) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(NOT 'a'='a')); @@ -1663,7 +1663,7 @@ create table t1 as select concat(NOT 'a'='a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' IS NULL)); @@ -1673,7 +1673,7 @@ create table t1 as select concat('a' IS NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' IS NOT NULL)); @@ -1683,7 +1683,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' rlike 'a')); @@ -1693,7 +1693,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(strcmp('a','b'))); @@ -1703,7 +1703,7 @@ create table t1 as select concat(strcmp('a','b')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' like 'a')); @@ -1713,7 +1713,7 @@ create table t1 as select concat('a' like 'b') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' between 'b' and 'c')); @@ -1723,7 +1723,7 @@ create table t1 as select concat('a' between 'b' and 'c') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' in ('a','b'))); @@ -1733,7 +1733,7 @@ create table t1 as select concat('a' in ('a','b')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(interval(23, 1, 15, 17, 30, 44, 200))); @@ -1743,7 +1743,7 @@ create table t1 as select concat(interval(23, 1, 15, 17, 30, 44, 200)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a varchar(10), fulltext key(a)); @@ -1775,7 +1775,7 @@ create table t1 as select concat(ifnull(1,1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ifnull(1.1,1.1))); @@ -1785,7 +1785,7 @@ create table t1 as select concat(ifnull(1.1,1.1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) NOT NULL + `c1` varchar(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(if(1,'b',1)); @@ -1815,7 +1815,7 @@ create table t1 as select concat(if(1,1,1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(nullif(1,2))); @@ -1980,12 +1980,13 @@ create table t1 as select concat(period_add(200902, 2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(6) NOT NULL + `c1` varchar(6) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(period_diff(200902, 200802))); hex(concat(period_diff(200902, 200802))) 3132 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 as select concat(period_add(200902, 200802)) as c1; Warnings: Warning 1265 Data truncated for column 'c1' at row 1 @@ -2189,21 +2190,21 @@ create table t1 as select concat(curdate()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(utc_date()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(curtime()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select repeat('a',20) as c1 limit 0; @@ -2219,7 +2220,7 @@ create table t1 as select concat(utc_time()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sec_to_time(2378))); @@ -2312,21 +2313,21 @@ create table t1 as select concat(now()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(19) NOT NULL + `c1` varchar(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(utc_timestamp()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(19) NOT NULL + `c1` varchar(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(sysdate()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(19) NOT NULL + `c1` varchar(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(addtime('00:00:00','11:22:33'))); @@ -2366,7 +2367,7 @@ create table t1 as select export_set(1,2,3,4,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(127) NOT NULL + `c1` varchar(127) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(insert(1133,3,0,22)); @@ -2376,7 +2377,7 @@ create table t1 as select insert(1133,3,0,22) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(6) NOT NULL + `c1` varchar(6) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lcase(123)); @@ -2386,7 +2387,7 @@ create table t1 as select lcase(123) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) NOT NULL + `c1` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(left(123,1)); @@ -2396,7 +2397,7 @@ create table t1 as select left(123,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lower(123)); @@ -2406,7 +2407,7 @@ create table t1 as select lower(123) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) NOT NULL + `c1` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lpad(1,2,0)); @@ -2416,7 +2417,7 @@ create table t1 as select lpad(1,2,0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(ltrim(1)); @@ -2426,7 +2427,7 @@ create table t1 as select ltrim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(mid(1,1,1)); @@ -2436,7 +2437,7 @@ create table t1 as select mid(1,1,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(repeat(1,2)); @@ -2446,7 +2447,7 @@ create table t1 as select repeat(1,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(replace(1,1,2)); @@ -2456,7 +2457,7 @@ create table t1 as select replace(1,1,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(reverse(12)); @@ -2466,7 +2467,7 @@ create table t1 as select reverse(12) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(right(123,1)); @@ -2476,7 +2477,7 @@ create table t1 as select right(123,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(rpad(1,2,0)); @@ -2486,7 +2487,7 @@ create table t1 as select rpad(1,2,0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) NOT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(rtrim(1)); @@ -2496,7 +2497,7 @@ create table t1 as select rtrim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(soundex(1)); @@ -2506,7 +2507,7 @@ create table t1 as select soundex(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) NOT NULL + `c1` varchar(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(substring(1,1,1)); @@ -2516,7 +2517,7 @@ create table t1 as select substring(1,1,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(trim(1)); @@ -2526,7 +2527,7 @@ create table t1 as select trim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(ucase(1)); @@ -2536,7 +2537,7 @@ create table t1 as select ucase(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(upper(1)); @@ -2546,14 +2547,14 @@ create table t1 as select upper(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) NOT NULL + `c1` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select repeat(' ', 64) as a limit 0; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(64) NOT NULL + `a` varchar(64) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ("1.1"), ("2.1"); select a, hex(a) from t1; @@ -2803,7 +2804,7 @@ create table t2 as select concat(a) from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `concat(a)` varchar(19) NOT NULL + `concat(a)` varchar(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1, t2; create table t1 (a date); @@ -3102,7 +3103,7 @@ insert into t1 values ('2001-02-03 04:05:06'); create view v1(a) as select concat(a) from t1; show columns from v1; Field Type Null Key Default Extra -a varchar(19) NO +a varchar(19) YES NULL select hex(a) from v1; hex(a) 303030302D30302D30302030303A30303A3030 @@ -3353,14 +3354,14 @@ CREATE TABLE t2 AS SELECT CONCAT_WS(1,2,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `CONCAT_WS(1,2,3)` varchar(3) NOT NULL + `CONCAT_WS(1,2,3)` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT INSERT(1133,3,0,22) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `INSERT(1133,3,0,22)` varchar(6) NOT NULL + `INSERT(1133,3,0,22)` varchar(6) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LCASE(a) FROM t1; @@ -3381,35 +3382,35 @@ CREATE TABLE t2 AS SELECT REPEAT(1,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `REPEAT(1,2)` varchar(2) NOT NULL + `REPEAT(1,2)` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LEFT(123,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `LEFT(123,2)` varchar(2) NOT NULL + `LEFT(123,2)` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT RIGHT(123,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `RIGHT(123,2)` varchar(2) NOT NULL + `RIGHT(123,2)` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LTRIM(123) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `LTRIM(123)` varchar(3) NOT NULL + `LTRIM(123)` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT RTRIM(123) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `RTRIM(123)` varchar(3) NOT NULL + `RTRIM(123)` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT ELT(1,111,222,333) FROM t1; @@ -3423,35 +3424,35 @@ CREATE TABLE t2 AS SELECT REPLACE(111,2,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `REPLACE(111,2,3)` varchar(3) NOT NULL + `REPLACE(111,2,3)` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT SUBSTRING_INDEX(111,111,1) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `SUBSTRING_INDEX(111,111,1)` varchar(3) NOT NULL + `SUBSTRING_INDEX(111,111,1)` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT MAKE_SET(111,222,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `MAKE_SET(111,222,3)` varchar(5) NOT NULL + `MAKE_SET(111,222,3)` varchar(5) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT SOUNDEX(1) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `SOUNDEX(1)` varchar(4) NOT NULL + `SOUNDEX(1)` varchar(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT EXPORT_SET(1,'Y','N','',8); SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `EXPORT_SET(1,'Y','N','',8)` varchar(64) NOT NULL + `EXPORT_SET(1,'Y','N','',8)` varchar(64) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; DROP TABLE t1; @@ -3679,7 +3680,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) NOT NULL + `a` varchar(5) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -3923,7 +3924,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL + `a` varchar(5) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -4167,7 +4168,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL + `a` varchar(5) CHARACTER SET latin1 COLLATE latin1_general_cs DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -4411,7 +4412,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(5) NOT NULL + `a` varbinary(5) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -4635,6 +4636,7 @@ set names latin1; # Start of 10.0 tests # # Start of ctype_unescape.inc +SET sql_mode = ''; SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; PREPARE stmt FROM @query; EXECUTE stmt; @@ -7697,6 +7699,7 @@ DROP FUNCTION wellformedness; DROP FUNCTION mysql_real_escape_string_generated; DROP FUNCTION iswellformed; DROP TABLE allbytes; +SET sql_mode = DEFAULT; # End of ctype_backslash.inc SET NAMES latin1; # @@ -7706,7 +7709,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -7729,7 +7732,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -7752,7 +7755,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -7775,7 +7778,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) NOT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -7801,7 +7804,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) NOT NULL + `a` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; @@ -7827,7 +7830,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL + `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -7850,7 +7853,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL + `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -7873,7 +7876,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL + `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -7896,7 +7899,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL + `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -7922,7 +7925,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL + `a` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; @@ -7982,7 +7985,7 @@ HEX(CONVERT(' 3F78 SET NAMES utf8; CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1); -INSERT INTO t1 VALUES ('Â'),('Â#'); +INSERT IGNORE INTO t1 VALUES ('Â'),('Â#'); Warnings: Warning 1366 Incorrect string value: '\xC2' for column 'a' at row 1 Warning 1366 Incorrect string value: '\xC2#' for column 'a' at row 2 diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result index d34d132e3a9..2d3803fba18 100644 --- a/mysql-test/r/ctype_latin1_de.result +++ b/mysql-test/r/ctype_latin1_de.result @@ -490,7 +490,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) COLLATE latin1_german2_ci NOT NULL, + `a` varchar(1) COLLATE latin1_german2_ci DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -565,7 +565,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) COLLATE latin1_german2_ci NOT NULL + `a` varchar(5) COLLATE latin1_german2_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; diff --git a/mysql-test/r/ctype_latin2.result b/mysql-test/r/ctype_latin2.result index 634640cab1d..d8fd22b5322 100644 --- a/mysql-test/r/ctype_latin2.result +++ b/mysql-test/r/ctype_latin2.result @@ -416,7 +416,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET latin2 NOT NULL + `a` varchar(5) CHARACTER SET latin2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -626,7 +626,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(64) CHARACTER SET latin2 NOT NULL + `a` varchar(64) CHARACTER SET latin2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (''); SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; @@ -697,7 +697,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET latin2 COLLATE latin2_bin NOT NULL + `a` varchar(5) CHARACTER SET latin2 COLLATE latin2_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; diff --git a/mysql-test/r/ctype_latin2_ch.result b/mysql-test/r/ctype_latin2_ch.result index e559689fdd0..87357a49197 100644 --- a/mysql-test/r/ctype_latin2_ch.result +++ b/mysql-test/r/ctype_latin2_ch.result @@ -52,7 +52,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL + `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -75,7 +75,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL + `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -98,7 +98,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL + `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -121,7 +121,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL + `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -147,7 +147,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL + `a` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; @@ -530,7 +530,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL + `a` varchar(5) CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; diff --git a/mysql-test/r/ctype_ldml.result b/mysql-test/r/ctype_ldml.result index 237646ade77..3ce50331ed0 100644 --- a/mysql-test/r/ctype_ldml.result +++ b/mysql-test/r/ctype_ldml.result @@ -165,7 +165,7 @@ DROP TABLE t1; # Bug#43827 Server closes connections and restarts # CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci); -INSERT INTO t1 SELECT REPEAT('a',11); +INSERT IGNORE INTO t1 SELECT REPEAT('a',11); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 DROP TABLE t1; diff --git a/mysql-test/r/ctype_many.result b/mysql-test/r/ctype_many.result index 59443a3a2d5..d73a478b0c0 100644 --- a/mysql-test/r/ctype_many.result +++ b/mysql-test/r/ctype_many.result @@ -1302,6 +1302,7 @@ CYR SMALL YA CYR CAPIT YA CYR SMALL YA CYR SMALL YA SET CHARACTER SET utf8; ALTER TABLE t1 ADD ucs2_f CHAR(32) CHARACTER SET ucs2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 CHANGE ucs2_f ucs2_f CHAR(32) UNICODE NOT NULL; INSERT INTO t1 (ucs2_f,comment) VALUES (0x0391,'GREEK CAPIT ALPHA'); INSERT INTO t1 (ucs2_f,comment) VALUES (0x0392,'GREEK CAPIT BETA'); @@ -1764,7 +1765,7 @@ DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf32); CREATE TABLE t2 (a VARCHAR(10) CHARACTER SET ucs2); INSERT INTO t1 VALUES (0x10082), (0x12345); -INSERT INTO t2 SELECT * FROM t1; +INSERT IGNORE INTO t2 SELECT * FROM t1; Warnings: Warning 1366 Incorrect string value: '\x00\x01\x00\x82' for column 'a' at row 1 Warning 1366 Incorrect string value: '\x00\x01\x23\x45' for column 'a' at row 2 diff --git a/mysql-test/r/ctype_mb.result b/mysql-test/r/ctype_mb.result index b6e93bae65a..015457cc1b3 100644 --- a/mysql-test/r/ctype_mb.result +++ b/mysql-test/r/ctype_mb.result @@ -15,7 +15,7 @@ t1 CREATE TABLE `t1` ( `c2` varchar(4) CHARACTER SET utf8 NOT NULL, `c3` char(4) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd'); +INSERT IGNORE INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd'); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 diff --git a/mysql-test/r/ctype_recoding.result b/mysql-test/r/ctype_recoding.result index 93f1639e88d..806d9dc6997 100644 --- a/mysql-test/r/ctype_recoding.result +++ b/mysql-test/r/ctype_recoding.result @@ -169,7 +169,7 @@ ERROR HY000: Invalid utf8 character string: 'good\xD0\xCC\xCF\xC8\xCF' set names latin1; create table t1 (a char(10) character set koi8r, b text character set koi8r); insert into t1 values ('test','test'); -insert into t1 values ('ÊÃÕË','ÊÃÕË'); +insert ignore into t1 values ('ÊÃÕË','ÊÃÕË'); Warnings: Warning 1366 Incorrect string value: '\xCA\xC3\xD5\xCB' for column 'a' at row 1 Warning 1366 Incorrect string value: '\xCA\xC3\xD5\xCB' for column 'b' at row 1 diff --git a/mysql-test/r/ctype_sjis.result b/mysql-test/r/ctype_sjis.result index 50938fada63..756e7a11d93 100644 --- a/mysql-test/r/ctype_sjis.result +++ b/mysql-test/r/ctype_sjis.result @@ -193,30 +193,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; # # MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32 @@ -230,8 +218,8 @@ STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR)) CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0; SHOW COLUMNS FROM t1; Field Type Null Key Default Extra -subject varchar(64) NO NULL -pattern varchar(64) NO NULL +subject varchar(64) YES NULL +pattern varchar(64) YES NULL INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d'); SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1; HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern) @@ -359,30 +347,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; SET NAMES sjis; SELECT HEX('²“‘@Œ\') FROM DUAL; @@ -424,7 +400,7 @@ FROM head, tail WHERE (head BETWEEN '80' AND 'FF') AND (head NOT BETWEEN 'A1' AND 'DF') AND (tail BETWEEN '20' AND 'FF') ORDER BY head, tail; -INSERT t1 (code) SELECT head FROM head WHERE (head BETWEEN 'A1' AND 'DF'); +INSERT IGNORE t1 (code) SELECT head FROM head WHERE (head BETWEEN 'A1' AND 'DF'); Warnings: Warning 1364 Field 'a' doesn't have a default value DROP TEMPORARY TABLE head, tail; @@ -434,7 +410,7 @@ t1 CREATE TABLE `t1` ( `code` varchar(8) DEFAULT NULL, `a` varchar(1) CHARACTER SET sjis NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; Warnings: Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1 Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2 @@ -687,138 +663,138 @@ code a 81F0 â„« Warnings: Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81EB to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81EC to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81ED to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81EE to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81EF to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81F8 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81F9 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81FA to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81FB to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8240 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8241 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8242 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8243 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8244 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8245 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8246 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8247 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8248 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8249 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x824A to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x824B to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x824C to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x824D to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x824E to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8259 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x825A to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x825B to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x825C to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x825D to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x825E to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x825F to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x827A to 'utf8' SELECT * FROM t1 WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; code a Warnings: Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8' -Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8' Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81EB to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81EC to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81ED to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81EE to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81EF to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81F8 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81F9 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81FA to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x81FB to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8240 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8241 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8242 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8243 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8244 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8245 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8246 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8247 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8248 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8249 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x824A to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x824B to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x824C to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x824D to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x824E to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x8259 to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x825A to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x825B to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x825C to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x825D to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x825E to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x825F to 'utf8' +Warning 1977 Cannot convert 'sjis' character 0x827A to 'utf8' # # WL#3090 Japanese Character Set adjustments # Test sjis->Unicode conversion @@ -14972,7 +14948,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET sjis NOT NULL + `a` varchar(5) CHARACTER SET sjis DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -15231,7 +15207,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET sjis COLLATE sjis_bin NOT NULL + `a` varchar(5) CHARACTER SET sjis COLLATE sjis_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -15469,6 +15445,7 @@ hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0)) # Start of 10.0 tests # # Start of ctype_unescape.inc +SET sql_mode = ''; SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; PREPARE stmt FROM @query; EXECUTE stmt; @@ -18531,6 +18508,7 @@ DROP FUNCTION wellformedness; DROP FUNCTION mysql_real_escape_string_generated; DROP FUNCTION iswellformed; DROP TABLE allbytes; +SET sql_mode = DEFAULT; # End of ctype_backslash.inc SET NAMES sjis; # Start of ctype_E05C.inc @@ -18574,7 +18552,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET sjis NOT NULL + `a` varchar(10) CHARACTER SET sjis DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('à\'),('à\t'); INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t'); @@ -18613,7 +18591,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET sjis NOT NULL + `a` varchar(10) CHARACTER SET sjis DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t')); INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t')); @@ -18652,7 +18630,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET sjis NOT NULL + `a` varchar(10) CHARACTER SET sjis DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t'); INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t'); @@ -18698,7 +18676,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET sjis NOT NULL + `a` varchar(10) CHARACTER SET sjis DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('à\['),('\à\['); SELECT HEX(a) FROM t1; @@ -18718,7 +18696,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10) NOT NULL + `a` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('à\['),('\à\['); SELECT HEX(a) FROM t1; diff --git a/mysql-test/r/ctype_swe7.result b/mysql-test/r/ctype_swe7.result index 8aeb05eaa3b..63da7d362ca 100644 --- a/mysql-test/r/ctype_swe7.result +++ b/mysql-test/r/ctype_swe7.result @@ -3,6 +3,7 @@ # SET NAMES swe7; # Start of ctype_unescape.inc +SET sql_mode = ''; SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; PREPARE stmt FROM @query; EXECUTE stmt; @@ -3065,6 +3066,7 @@ DROP FUNCTION wellformedness; DROP FUNCTION mysql_real_escape_string_generated; DROP FUNCTION iswellformed; DROP TABLE allbytes; +SET sql_mode = DEFAULT; # End of ctype_backslash.inc # # End of 10.0 tests diff --git a/mysql-test/r/ctype_tis620.result b/mysql-test/r/ctype_tis620.result index 3dbccf9ccb0..d5b4c632c31 100644 --- a/mysql-test/r/ctype_tis620.result +++ b/mysql-test/r/ctype_tis620.result @@ -3122,7 +3122,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET tis620 NOT NULL + `c1` varchar(10) CHARACTER SET tis620 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -3145,7 +3145,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET tis620 NOT NULL + `c1` varchar(10) CHARACTER SET tis620 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -3168,7 +3168,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET tis620 NOT NULL + `c1` varchar(10) CHARACTER SET tis620 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -3191,7 +3191,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET tis620 NOT NULL + `c1` varchar(10) CHARACTER SET tis620 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -3217,7 +3217,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET tis620 NOT NULL + `a` varchar(10) CHARACTER SET tis620 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; @@ -3338,7 +3338,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL + `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -3361,7 +3361,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL + `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -3384,7 +3384,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL + `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -3407,7 +3407,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL + `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -3433,7 +3433,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL + `a` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; @@ -3486,7 +3486,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET tis620 NOT NULL + `a` varchar(5) CHARACTER SET tis620 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -3679,7 +3679,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL + `a` varchar(5) CHARACTER SET tis620 COLLATE tis620_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result index 3d93d7f201e..6c6dceba9cb 100644 --- a/mysql-test/r/ctype_uca.result +++ b/mysql-test/r/ctype_uca.result @@ -6080,7 +6080,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -6326,7 +6326,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, + `a` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -6520,30 +6520,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F20025 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; set names utf8; End for 5.0 tests @@ -6746,7 +6734,7 @@ ADD KEY(ch); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, + `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), KEY `ch` (`ch`) @@ -6834,7 +6822,7 @@ aÖ€ EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; @@ -6861,7 +6849,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; @@ -6894,7 +6882,7 @@ z EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; @@ -6905,7 +6893,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; @@ -6990,7 +6978,7 @@ ADD KEY(ch); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, + `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), KEY `ch` (`ch`) @@ -7245,7 +7233,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci NOT NULL + `a` varchar(5) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -7489,7 +7477,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL + `a` varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -8117,7 +8105,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL, + `a` varchar(1) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -8147,7 +8135,7 @@ CREATE TABLE t1 AS SELECT repeat('a', 10) as c LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL + `c` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_utf32 0x0180),(_utf32 0x023A); INSERT INTO t1 VALUES (_utf32 0x023B),(_utf32 0x023C); @@ -8420,7 +8408,7 @@ F09090A8 30D2 ð¨ ALTER TABLE t1 ADD KEY(c); EXPLAIN SELECT hex(c) FROM t1 WHERE c LIKE 'a%' ORDER BY c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 42 NULL 3 Using where; Using index +1 SIMPLE t1 range c c 43 NULL 3 Using where; Using index SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c; hex(c) hex(weight_string(c)) 61 120F @@ -8451,7 +8439,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -8474,7 +8462,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -8497,7 +8485,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -8520,7 +8508,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -8546,7 +8534,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL + `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; @@ -8571,7 +8559,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('ae'),('ä'); SELECT * FROM t1 WHERE c1='ä'; @@ -8609,7 +8597,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -8632,7 +8620,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -8655,7 +8643,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -8678,7 +8666,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -8704,7 +8692,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL + `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; @@ -8729,7 +8717,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('ae'),('ä'); SELECT * FROM t1 WHERE c1='ä'; @@ -8782,7 +8770,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `s1` varchar(64) CHARACTER SET utf8 COLLATE utf8_myanmar_ci NOT NULL, + `s1` varchar(64) CHARACTER SET utf8 COLLATE utf8_myanmar_ci DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 (s1) VALUES @@ -11358,7 +11346,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `s1` varchar(64) CHARACTER SET ucs2 COLLATE ucs2_myanmar_ci NOT NULL, + `s1` varchar(64) CHARACTER SET ucs2 COLLATE ucs2_myanmar_ci DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 (s1) VALUES @@ -13998,7 +13986,7 @@ CREATE TABLE t1 AS SELECT SPACE(3) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(3) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 NOT NULL + `a` varchar(3) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (SPACE(0)),(SPACE(1)),(SPACE(2)); SELECT HEX(a), HEX(WEIGHT_STRING(a AS CHAR(8))) FROM t1; @@ -14031,7 +14019,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_ucs2 0x3400); INSERT INTO t1 VALUES (_ucs2 0xF001); @@ -14044,7 +14032,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('A'),('À'),('Ã'),('Â'),('Ã'),('Ä'),('Ã…'); SELECT a, HEX(WEIGHT_STRING(a LEVEL 2)) FROM t1 ORDER BY a; @@ -14103,7 +14091,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('cota'),('cote'),('cotz'); INSERT INTO t1 VALUES ('coté'),('côte'),('côté'),('cotë'),('côtë'); @@ -14692,7 +14680,7 @@ CREATE TABLE t1 AS SELECT SPACE(3) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(3) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 NOT NULL + `a` varchar(3) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (SPACE(0)),(SPACE(1)),(SPACE(2)); SELECT HEX(a), HEX(WEIGHT_STRING(a AS CHAR(8))) FROM t1; @@ -14725,7 +14713,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_ucs2 0x3400); INSERT INTO t1 VALUES (_ucs2 0xF001); @@ -14738,7 +14726,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('A'),('À'),('Ã'),('Â'),('Ã'),('Ä'),('Ã…'); SELECT a, HEX(WEIGHT_STRING(a LEVEL 2)) FROM t1 ORDER BY a; @@ -14797,7 +14785,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('cota'),('cote'),('cotz'); INSERT INTO t1 VALUES ('coté'),('côte'),('côté'),('cotë'),('côtë'); diff --git a/mysql-test/r/ctype_uca_innodb.result b/mysql-test/r/ctype_uca_innodb.result index f189e698da1..c04a99c8cd3 100644 --- a/mysql-test/r/ctype_uca_innodb.result +++ b/mysql-test/r/ctype_uca_innodb.result @@ -15,7 +15,7 @@ ADD KEY(ch); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, + `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), KEY `ch` (`ch`) @@ -103,7 +103,7 @@ aÖ€ EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; @@ -130,7 +130,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; @@ -163,7 +163,7 @@ z EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; @@ -174,7 +174,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 0ac76e91c21..389a5d3850a 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -55,7 +55,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -196,8 +196,8 @@ RPAD(_ucs2 X'0420',10,_ucs2 X'0421') r; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `l` varchar(10) CHARACTER SET ucs2 NOT NULL, - `r` varchar(10) CHARACTER SET ucs2 NOT NULL + `l` varchar(10) CHARACTER SET ucs2 DEFAULT NULL, + `r` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; # @@ -933,7 +933,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET ucs2 NOT NULL, + `a` varchar(1) CHARACTER SET ucs2 DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -959,30 +959,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F20025 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; # # MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32 @@ -996,8 +984,8 @@ STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR)) CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0; SHOW COLUMNS FROM t1; Field Type Null Key Default Extra -subject varchar(64) NO NULL -pattern varchar(64) NO NULL +subject varchar(64) YES NULL +pattern varchar(64) YES NULL INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d'); SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1; HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern) @@ -1104,30 +1092,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F20025 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; select hex(substr(_ucs2 0x00e400e50068,1)); hex(substr(_ucs2 0x00e400e50068,1)) @@ -1156,7 +1132,7 @@ Field1 -1 DROP TABLE t1; CREATE TABLE t1 (Field1 int(10) unsigned default '0'); -INSERT INTO t1 VALUES ('-1'); +INSERT IGNORE INTO t1 VALUES ('-1'); Warnings: Warning 1264 Out of range value for column 'Field1' at row 1 DROP TABLE t1; @@ -1622,7 +1598,7 @@ create table t1 as select concat(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -1635,7 +1611,7 @@ create table t1 as select concat(18446744073709551615) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(20) CHARACTER SET ucs2 NOT NULL + `c1` varchar(20) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -1648,7 +1624,7 @@ create table t1 as select concat(1.1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET ucs2 NOT NULL + `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -1661,7 +1637,7 @@ create table t1 as select concat(1+2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET ucs2 NOT NULL + `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1-2)); @@ -1671,7 +1647,7 @@ create table t1 as select concat(1-2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET ucs2 NOT NULL + `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1*2)); @@ -1681,7 +1657,7 @@ create table t1 as select concat(1*2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET ucs2 NOT NULL + `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1/2)); @@ -1721,7 +1697,7 @@ create table t1 as select concat(-1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(-(1+2))); @@ -1731,7 +1707,7 @@ create table t1 as select concat(-(1+2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET ucs2 NOT NULL + `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1|2)); @@ -1741,7 +1717,7 @@ create table t1 as select concat(1|2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1&2)); @@ -1751,7 +1727,7 @@ create table t1 as select concat(1&2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(bit_count(12))); @@ -1761,7 +1737,7 @@ create table t1 as select concat(bit_count(12)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(2<<1)); @@ -1771,7 +1747,7 @@ create table t1 as select concat(2<<1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(2>>1)); @@ -1781,7 +1757,7 @@ create table t1 as select concat(2>>1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(~0)); @@ -1791,7 +1767,7 @@ create table t1 as select concat(~0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(3^2)); @@ -1801,7 +1777,7 @@ create table t1 as select concat(3^2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(abs(-2))); @@ -1811,7 +1787,7 @@ create table t1 as select concat(abs(-2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(left(concat(exp(2)),1)); @@ -1941,7 +1917,7 @@ create table t1 as select concat(degrees(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(23) CHARACTER SET ucs2 NOT NULL + `c1` varchar(23) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(radians(0))); @@ -1951,7 +1927,7 @@ create table t1 as select concat(radians(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(23) CHARACTER SET ucs2 NOT NULL + `c1` varchar(23) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ceiling(0.5))); @@ -1961,7 +1937,7 @@ create table t1 as select concat(ceiling(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET ucs2 NOT NULL + `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(floor(0.5))); @@ -1971,7 +1947,7 @@ create table t1 as select concat(floor(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET ucs2 NOT NULL + `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(round(0.5))); @@ -1981,7 +1957,7 @@ create table t1 as select concat(round(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET ucs2 NOT NULL + `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sign(0.5))); @@ -1991,14 +1967,14 @@ create table t1 as select concat(sign(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(rand()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(23) CHARACTER SET ucs2 NOT NULL + `c1` varchar(23) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(length('a'))); @@ -2008,7 +1984,7 @@ create table t1 as select concat(length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(char_length('a'))); @@ -2018,7 +1994,7 @@ create table t1 as select concat(char_length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(bit_length('a'))); @@ -2028,7 +2004,7 @@ create table t1 as select concat(bit_length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(coercibility('a'))); @@ -2038,7 +2014,7 @@ create table t1 as select concat(coercibility('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(locate('a','a'))); @@ -2048,7 +2024,7 @@ create table t1 as select concat(locate('a','a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(11) CHARACTER SET ucs2 NOT NULL + `c1` varchar(11) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(field('c','a','b','c'))); @@ -2058,7 +2034,7 @@ create table t1 as select concat(field('c','a','b','c')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET ucs2 NOT NULL + `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ascii(61))); @@ -2068,7 +2044,7 @@ create table t1 as select concat(ascii(61)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET ucs2 NOT NULL + `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ord(61))); @@ -2078,7 +2054,7 @@ create table t1 as select concat(ord(61)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(find_in_set('b','a,b,c,d'))); @@ -2088,7 +2064,7 @@ create table t1 as select concat(find_in_set('b','a,b,c,d')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET ucs2 NOT NULL + `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select md5('a'), hex(md5('a')); @@ -2098,7 +2074,7 @@ create table t1 as select md5('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(32) CHARACTER SET ucs2 NOT NULL + `c1` varchar(32) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select old_password('a'), hex(old_password('a')); @@ -2108,7 +2084,7 @@ create table t1 as select old_password('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(16) CHARACTER SET ucs2 NOT NULL + `c1` varchar(16) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select password('a'), hex(password('a')); @@ -2118,7 +2094,7 @@ create table t1 as select password('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(41) CHARACTER SET ucs2 NOT NULL + `c1` varchar(41) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select sha('a'), hex(sha('a')); @@ -2128,7 +2104,7 @@ create table t1 as select sha('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(40) CHARACTER SET ucs2 NOT NULL + `c1` varchar(40) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select sha1('a'), hex(sha1('a')); @@ -2138,7 +2114,7 @@ create table t1 as select sha1('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(40) CHARACTER SET ucs2 NOT NULL + `c1` varchar(40) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast('-1' as signed))); @@ -2148,7 +2124,7 @@ create table t1 as select concat(cast('-1' as signed)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast('1' as unsigned))); @@ -2158,7 +2134,7 @@ create table t1 as select concat(cast('1' as unsigned)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast(1/2 as decimal(5,5)))); @@ -2217,7 +2193,7 @@ create table t1 as select concat(least(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(greatest(1,2))); @@ -2227,7 +2203,7 @@ create table t1 as select concat(greatest(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(case when 11 then 22 else 33 end)); @@ -2237,7 +2213,7 @@ create table t1 as select concat(case when 11 then 22 else 33 end) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(coalesce(1,2))); @@ -2247,7 +2223,7 @@ create table t1 as select concat(coalesce(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat_ws(1,2,3)); @@ -2257,7 +2233,7 @@ create table t1 as select concat_ws(1,2,3) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET ucs2 NOT NULL + `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(group_concat(1,2,3)); @@ -2267,7 +2243,7 @@ create table t1 as select group_concat(1,2,3) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(512) CHARACTER SET ucs2 DEFAULT NULL + `c1` mediumtext CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select 1 as c1 union select 'a'; @@ -2285,7 +2261,7 @@ create table t1 as select concat(last_insert_id()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(benchmark(0,0))); @@ -2295,7 +2271,7 @@ create table t1 as select concat(benchmark(0,0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sleep(0))); @@ -2305,7 +2281,7 @@ create table t1 as select concat(sleep(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(is_free_lock('xxxx'))); @@ -2339,7 +2315,7 @@ create table t1 as select concat(crc32('')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(uncompressed_length(''))); @@ -2356,7 +2332,7 @@ create table t1 as select concat(connection_id()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(inet_aton('127.1.1.1'))); @@ -2392,7 +2368,7 @@ create table t1 as select concat(row_count()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(found_rows())); @@ -2402,21 +2378,21 @@ create table t1 as select concat(found_rows()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(uuid_short()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET ucs2 NOT NULL + `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(uuid()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(36) CHARACTER SET utf8 NOT NULL + `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select coercibility(uuid()), coercibility(cast('a' as char character set latin1)); @@ -2429,7 +2405,7 @@ create table t1 as select concat(uuid(), cast('a' as char character set latin1)) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(37) NOT NULL + `c1` varchar(37) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(master_pos_wait('non-existent',0,2)) as c1; @@ -2449,7 +2425,7 @@ hex(c1) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL, + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL, `c2` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -2507,7 +2483,7 @@ hex(c1) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET ucs2 NOT NULL, + `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL, `c2` decimal(2,1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -2546,7 +2522,7 @@ create table t1 as select concat('a'='a' IS TRUE) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a'='a' IS NOT TRUE)); @@ -2556,7 +2532,7 @@ create table t1 as select concat('a'='a' IS NOT TRUE) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(NOT 'a'='a')); @@ -2566,7 +2542,7 @@ create table t1 as select concat(NOT 'a'='a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' IS NULL)); @@ -2576,7 +2552,7 @@ create table t1 as select concat('a' IS NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' IS NOT NULL)); @@ -2586,7 +2562,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' rlike 'a')); @@ -2596,7 +2572,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(strcmp('a','b'))); @@ -2606,7 +2582,7 @@ create table t1 as select concat(strcmp('a','b')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' like 'a')); @@ -2616,7 +2592,7 @@ create table t1 as select concat('a' like 'b') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' between 'b' and 'c')); @@ -2626,7 +2602,7 @@ create table t1 as select concat('a' between 'b' and 'c') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' in ('a','b'))); @@ -2636,7 +2612,7 @@ create table t1 as select concat('a' in ('a','b')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(interval(23, 1, 15, 17, 30, 44, 200))); @@ -2646,7 +2622,7 @@ create table t1 as select concat(interval(23, 1, 15, 17, 30, 44, 200)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a varchar(10), fulltext key(a)); @@ -2678,7 +2654,7 @@ create table t1 as select concat(ifnull(1,1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ifnull(1.1,1.1))); @@ -2688,7 +2664,7 @@ create table t1 as select concat(ifnull(1.1,1.1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET ucs2 NOT NULL + `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(if(1,'b',1)); @@ -2718,7 +2694,7 @@ create table t1 as select concat(if(1,1,1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(nullif(1,2))); @@ -2883,12 +2859,13 @@ create table t1 as select concat(period_add(200902, 2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(6) CHARACTER SET ucs2 NOT NULL + `c1` varchar(6) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(period_diff(200902, 200802))); hex(concat(period_diff(200902, 200802))) 00310032 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 as select concat(period_add(200902, 200802)) as c1; Warnings: Warning 1265 Data truncated for column 'c1' at row 1 @@ -3092,21 +3069,21 @@ create table t1 as select concat(curdate()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(utc_date()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(curtime()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select repeat('a',20) as c1 limit 0; @@ -3122,7 +3099,7 @@ create table t1 as select concat(utc_time()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sec_to_time(2378))); @@ -3215,21 +3192,21 @@ create table t1 as select concat(now()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(19) CHARACTER SET ucs2 NOT NULL + `c1` varchar(19) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(utc_timestamp()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(19) CHARACTER SET ucs2 NOT NULL + `c1` varchar(19) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(sysdate()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(19) CHARACTER SET ucs2 NOT NULL + `c1` varchar(19) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(addtime('00:00:00','11:22:33'))); @@ -3269,7 +3246,7 @@ create table t1 as select export_set(1,2,3,4,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(127) CHARACTER SET ucs2 NOT NULL + `c1` varchar(127) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(insert(1133,3,0,22)); @@ -3279,7 +3256,7 @@ create table t1 as select insert(1133,3,0,22) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(6) CHARACTER SET ucs2 NOT NULL + `c1` varchar(6) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lcase(123)); @@ -3289,7 +3266,7 @@ create table t1 as select lcase(123) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET ucs2 NOT NULL + `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(left(123,1)); @@ -3299,7 +3276,7 @@ create table t1 as select left(123,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lower(123)); @@ -3309,7 +3286,7 @@ create table t1 as select lower(123) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET ucs2 NOT NULL + `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lpad(1,2,0)); @@ -3319,7 +3296,7 @@ create table t1 as select lpad(1,2,0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(ltrim(1)); @@ -3329,7 +3306,7 @@ create table t1 as select ltrim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(mid(1,1,1)); @@ -3339,7 +3316,7 @@ create table t1 as select mid(1,1,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(repeat(1,2)); @@ -3349,7 +3326,7 @@ create table t1 as select repeat(1,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(replace(1,1,2)); @@ -3359,7 +3336,7 @@ create table t1 as select replace(1,1,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(reverse(12)); @@ -3369,7 +3346,7 @@ create table t1 as select reverse(12) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(right(123,1)); @@ -3379,7 +3356,7 @@ create table t1 as select right(123,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(rpad(1,2,0)); @@ -3389,7 +3366,7 @@ create table t1 as select rpad(1,2,0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET ucs2 NOT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(rtrim(1)); @@ -3399,7 +3376,7 @@ create table t1 as select rtrim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(soundex(1)); @@ -3409,7 +3386,7 @@ create table t1 as select soundex(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET ucs2 NOT NULL + `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(substring(1,1,1)); @@ -3419,7 +3396,7 @@ create table t1 as select substring(1,1,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(trim(1)); @@ -3429,7 +3406,7 @@ create table t1 as select trim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(ucase(1)); @@ -3439,7 +3416,7 @@ create table t1 as select ucase(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(upper(1)); @@ -3449,14 +3426,14 @@ create table t1 as select upper(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 NOT NULL + `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select repeat(' ', 64) as a limit 0; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(64) CHARACTER SET ucs2 NOT NULL + `a` varchar(64) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ("1.1"), ("2.1"); select a, hex(a) from t1; @@ -3706,7 +3683,7 @@ create table t2 as select concat(a) from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `concat(a)` varchar(19) CHARACTER SET ucs2 NOT NULL + `concat(a)` varchar(19) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1, t2; create table t1 (a date); @@ -4005,7 +3982,7 @@ insert into t1 values ('2001-02-03 04:05:06'); create view v1(a) as select concat(a) from t1; show columns from v1; Field Type Null Key Default Extra -a varchar(19) NO +a varchar(19) YES NULL select hex(a) from v1; hex(a) 0030003000300030002D00300030002D00300030002000300030003A00300030003A00300030 @@ -4256,14 +4233,14 @@ CREATE TABLE t2 AS SELECT CONCAT_WS(1,2,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `CONCAT_WS(1,2,3)` varchar(3) CHARACTER SET ucs2 NOT NULL + `CONCAT_WS(1,2,3)` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT INSERT(1133,3,0,22) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `INSERT(1133,3,0,22)` varchar(6) CHARACTER SET ucs2 NOT NULL + `INSERT(1133,3,0,22)` varchar(6) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LCASE(a) FROM t1; @@ -4284,35 +4261,35 @@ CREATE TABLE t2 AS SELECT REPEAT(1,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `REPEAT(1,2)` varchar(2) CHARACTER SET ucs2 NOT NULL + `REPEAT(1,2)` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LEFT(123,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `LEFT(123,2)` varchar(2) CHARACTER SET ucs2 NOT NULL + `LEFT(123,2)` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT RIGHT(123,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `RIGHT(123,2)` varchar(2) CHARACTER SET ucs2 NOT NULL + `RIGHT(123,2)` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LTRIM(123) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `LTRIM(123)` varchar(3) CHARACTER SET ucs2 NOT NULL + `LTRIM(123)` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT RTRIM(123) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `RTRIM(123)` varchar(3) CHARACTER SET ucs2 NOT NULL + `RTRIM(123)` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT ELT(1,111,222,333) FROM t1; @@ -4326,35 +4303,35 @@ CREATE TABLE t2 AS SELECT REPLACE(111,2,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `REPLACE(111,2,3)` varchar(3) CHARACTER SET ucs2 NOT NULL + `REPLACE(111,2,3)` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT SUBSTRING_INDEX(111,111,1) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `SUBSTRING_INDEX(111,111,1)` varchar(3) CHARACTER SET ucs2 NOT NULL + `SUBSTRING_INDEX(111,111,1)` varchar(3) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT MAKE_SET(111,222,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `MAKE_SET(111,222,3)` varchar(5) CHARACTER SET ucs2 NOT NULL + `MAKE_SET(111,222,3)` varchar(5) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT SOUNDEX(1) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `SOUNDEX(1)` varchar(4) CHARACTER SET ucs2 NOT NULL + `SOUNDEX(1)` varchar(4) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT EXPORT_SET(1,'Y','N','',8); SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `EXPORT_SET(1,'Y','N','',8)` varchar(64) CHARACTER SET ucs2 NOT NULL + `EXPORT_SET(1,'Y','N','',8)` varchar(64) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; DROP TABLE t1; @@ -4534,6 +4511,7 @@ SET NAMES latin1; # # Bug #13832953 MY_STRNXFRM_UNICODE: ASSERTION `SRC' FAILED # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (c1 SET('','') CHARACTER SET ucs2); Warnings: Note 1291 Column 'c1' has duplicated value '' in SET @@ -4576,6 +4554,16 @@ SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061)); CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061)) 1 # +# MDEV-11685: sql_mode can't be set with non-ascii connection charset +# +SET character_set_connection=ucs2; +SET sql_mode='NO_ENGINE_SUBSTITUTION'; +SELECT @@sql_mode; +@@sql_mode +NO_ENGINE_SUBSTITUTION +SET sql_mode=DEFAULT; +SET NAMES utf8; +# # End of 5.5 tests # # @@ -4612,7 +4600,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET ucs2 NOT NULL + `a` varchar(5) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -4856,7 +4844,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL + `a` varchar(5) CHARACTER SET ucs2 COLLATE ucs2_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -5165,7 +5153,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(64) CHARACTER SET ucs2 NOT NULL + `a` varchar(64) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (''); SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; @@ -5308,7 +5296,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET ucs2 COLLATE ucs2_german2_ci NOT NULL, + `a` varchar(1) CHARACTER SET ucs2 COLLATE ucs2_german2_ci DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -5351,7 +5339,7 @@ SET sql_mode='strict_all_tables'; INSERT INTO t1 VALUES (CONVERT('9e99999999' USING ucs2)); ERROR 22003: Out of range value for column 'a' at row 1 SET sql_mode=DEFAULT; -INSERT INTO t1 VALUES (CONVERT('aaa' USING ucs2)); +INSERT IGNORE INTO t1 VALUES (CONVERT('aaa' USING ucs2)); Warnings: Warning 1366 Incorrect decimal value: 'aaa' for column 'a' at row 1 DROP TABLE t1; @@ -5369,7 +5357,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -5392,7 +5380,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -5415,7 +5403,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -5438,7 +5426,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -5464,7 +5452,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL + `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; @@ -5490,7 +5478,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -5513,7 +5501,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -5536,7 +5524,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -5559,7 +5547,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET ucs2 NOT NULL + `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -5585,7 +5573,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET ucs2 NOT NULL + `a` varchar(10) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; diff --git a/mysql-test/r/ctype_ucs2_def.result b/mysql-test/r/ctype_ucs2_def.result index 5ca7d1689d2..9d8f5181103 100644 --- a/mysql-test/r/ctype_ucs2_def.result +++ b/mysql-test/r/ctype_ucs2_def.result @@ -1,4 +1,4 @@ -call mtr.add_suppression("Cannot use ucs2 as character_set_client"); +call mtr.add_suppression("'ucs2' can not be used as client character set"); show variables like 'collation_server'; Variable_name Value collation_server ucs2_unicode_ci diff --git a/mysql-test/r/ctype_ucs2_query_cache.result b/mysql-test/r/ctype_ucs2_query_cache.result index 9a7580324c1..eba7f2fb0fc 100644 --- a/mysql-test/r/ctype_ucs2_query_cache.result +++ b/mysql-test/r/ctype_ucs2_query_cache.result @@ -1,4 +1,4 @@ -call mtr.add_suppression("Cannot use ucs2 as character_set_client"); +call mtr.add_suppression("'ucs2' can not be used as client character set"); # # Start of 5.5 tests # diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result index 90db3474cef..93a31a2818c 100644 --- a/mysql-test/r/ctype_ujis.result +++ b/mysql-test/r/ctype_ujis.result @@ -2331,30 +2331,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; SET collation_connection='ujis_bin'; create table t1 select repeat('a',4000) a; @@ -2478,39 +2466,27 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; select hex(convert(_ujis 0xA5FE41 using ucs2)); hex(convert(_ujis 0xA5FE41 using ucs2)) -003F0041 +NULL Warnings: Warning 1977 Cannot convert 'ujis' character 0xA5FE to 'ucs2' select hex(convert(_ujis 0x8FABF841 using ucs2)); hex(convert(_ujis 0x8FABF841 using ucs2)) -003F0041 +NULL Warnings: Warning 1977 Cannot convert 'ujis' character 0x8FABF8 to 'ucs2' DROP TABLE IF EXISTS t1, t2; @@ -2569,18 +2545,18 @@ CREATE TEMPORARY TABLE head AS SELECT concat(b1.b, b2.b) AS head FROM t1 b1, t1 CREATE TEMPORARY TABLE tail AS SELECT concat(b1.b, b2.b) AS tail FROM t1 b1, t1 b2; DROP TABLE t1; CREATE TABLE t1 AS SELECT 'XXXXXX' AS code, ' ' AS a LIMIT 0; -INSERT INTO t1 (code) SELECT concat('8E', head) FROM head +INSERT IGNORE INTO t1 (code) SELECT concat('8E', head) FROM head WHERE (head BETWEEN 'A1' AND 'DF') ORDER BY head; Warnings: Warning 1364 Field 'a' doesn't have a default value -INSERT INTO t1 (code) SELECT concat(head, tail) +INSERT IGNORE INTO t1 (code) SELECT concat(head, tail) FROM head, tail WHERE (head BETWEEN '80' AND 'FF') AND (head NOT BETWEEN '8E' AND '8F') AND (tail BETWEEN '20' AND 'FF') ORDER BY head, tail; Warnings: Warning 1364 Field 'a' doesn't have a default value -INSERT INTO t1 (code) SELECT concat('8F', head, tail) +INSERT IGNORE INTO t1 (code) SELECT concat('8F', head, tail) FROM head, tail WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '80' AND 'FF') ORDER BY head, tail; @@ -2593,7 +2569,7 @@ t1 CREATE TABLE `t1` ( `code` varchar(6) CHARACTER SET ujis NOT NULL, `a` varchar(1) CHARACTER SET ujis NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; Warnings: Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1 Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2 @@ -3084,69 +3060,69 @@ code a 8FAABC Ä¢ Warnings: Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2ED to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2EE to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2EF to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2F0 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2F1 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2FA to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2FB to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2FC to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2FD to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A1 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A2 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A3 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A4 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A5 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A6 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A7 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A8 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A9 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3AA to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3AB to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3AC to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3AD to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3AE to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3AF to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3BA to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3BB to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3BC to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3BD to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3BE to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3BF to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3C0 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3DB to 'utf8' SELECT * FROM t1 WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <> HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code; @@ -3155,69 +3131,69 @@ code a 8FABB9 ǵ Warnings: Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8' -Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8' Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2ED to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2EE to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2EF to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2F0 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2F1 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2FA to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2FB to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2FC to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA2FD to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A1 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A2 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A3 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A4 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A5 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A6 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A7 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A8 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3A9 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3AA to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3AB to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3AC to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3AD to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3AE to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3AF to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3BA to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3BB to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3BC to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3BD to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3BE to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3BF to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3C0 to 'utf8' +Warning 1977 Cannot convert 'ujis' character 0xA3DB to 'utf8' # # WL#3090 Japanese Character Set adjustments # Test sjis->Unicode conversion @@ -25318,7 +25294,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET ujis NOT NULL + `a` varchar(5) CHARACTER SET ujis DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -25751,7 +25727,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET ujis COLLATE ujis_bin NOT NULL + `a` varchar(5) CHARACTER SET ujis COLLATE ujis_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -26166,7 +26142,7 @@ hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0)) # MDEV-6776 ujis and eucjmps erroneously accept 0x8EA0 as a valid byte sequence # CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ujis); -INSERT INTO t1 VALUES (0x8EA0); +INSERT IGNORE INTO t1 VALUES (0x8EA0); SELECT HEX(a), CHAR_LENGTH(a) FROM t1; HEX(a) CHAR_LENGTH(a) 3F3F 2 @@ -26225,7 +26201,7 @@ DROP TABLE t1; # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis # CREATE TABLE t1 (a TEXT CHARACTER SET ujis); -LOAD DATA INFILE '../../std_data/loaddata/mdev9823.ujis.txt' INTO TABLE t1 CHARACTER SET ujis IGNORE 4 LINES; +LOAD DATA INFILE '../../std_data/loaddata/mdev9823.ujis.txt' IGNORE INTO TABLE t1 CHARACTER SET ujis IGNORE 4 LINES; SELECT HEX(a) FROM t1; HEX(a) 3F diff --git a/mysql-test/r/ctype_ujis_ucs2.result b/mysql-test/r/ctype_ujis_ucs2.result index 3c63e7c0441..77961046346 100644 --- a/mysql-test/r/ctype_ujis_ucs2.result +++ b/mysql-test/r/ctype_ujis_ucs2.result @@ -1138,7 +1138,7 @@ update t1 set name='U+9FA3 ' where ujis=0x8FEDE2; update t1 set name='U+9FA5 ' where ujis=0x8FEDE3; update t1 set name='User defined range #2' where ujis >= 0x8FF5A1 and ujis <= 0x8FFEFE; update t1 set name='UNASSIGNED' where name=''; -update t1 set ucs2=ujis, ujis2=ucs2; +update ignore t1 set ucs2=ujis, ujis2=ucs2; Warnings: Warning 1366 Incorrect string value: '\xA2\xAF' for column 'ucs2' at row 237 Warning 1366 Incorrect string value: '\xA2\xB0' for column 'ucs2' at row 238 @@ -19129,7 +19129,7 @@ insert into t1 (ucs2,name) values (0xFFE0,'U+FFE0 FULLWIDTH CENT SIGN'); insert into t1 (ucs2,name) values (0xFFE1,'U+FFE1 FULLWIDTH POUND SIGN'); insert into t1 (ucs2,name) values (0xFFE2,'U+FFE2 FULLWIDTH NOT SIGN'); insert into t1 (ucs2,name) values (0xFFE4,'U+FFE4 FULLWIDTH BROKEN BAR'); -update t1 set ujis=ucs2; +update ignore t1 set ujis=ucs2; Warnings: Warning 1366 Incorrect string value: '\x00\xA5' for column 'ujis' at row 1 Warning 1366 Incorrect string value: '\x20\x14' for column 'ujis' at row 2 diff --git a/mysql-test/r/ctype_utf16.result b/mysql-test/r/ctype_utf16.result index 09ba94bd12d..8de21a14bd9 100644 --- a/mysql-test/r/ctype_utf16.result +++ b/mysql-test/r/ctype_utf16.result @@ -101,8 +101,8 @@ RPAD(_utf16 X'0420',10,_utf16 X'0421') r; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `l` varchar(10) CHARACTER SET utf16 NOT NULL, - `r` varchar(10) CHARACTER SET utf16 NOT NULL + `l` varchar(10) CHARACTER SET utf16 DEFAULT NULL, + `r` varchar(10) CHARACTER SET utf16 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(l), hex(r) from t1; hex(l) hex(r) @@ -755,7 +755,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_bin NOT NULL + `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84); INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080); @@ -1012,6 +1012,7 @@ DBFFDCFF drop table t1; create table t1 (s1 varchar(50) character set ucs2); insert into t1 values (0xdf84); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify column s1 varchar(50) character set utf16; Warnings: Warning 1366 Incorrect string value: '\xDF\x84' for column 's1' at row 1 @@ -1021,7 +1022,7 @@ hex(s1) drop table t1; create table t1 (s1 varchar(5) character set ucs2, s2 varchar(5) character set utf16); insert into t1 (s1) values (0xdf84); -update t1 set s2 = s1; +update ignore t1 set s2 = s1; Warnings: Warning 1366 Incorrect string value: '\xDF\x84' for column 's2' at row 1 select hex(s2) from t1; @@ -1250,7 +1251,7 @@ Warnings: Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123x' create table t1 (a int); insert into t1 values ('-1234.1e2'); -insert into t1 values ('-1234.1e2xxxx'); +insert ignore into t1 values ('-1234.1e2xxxx'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 insert into t1 values ('-1234.1e2 '); @@ -1266,7 +1267,7 @@ create table t1 (a int); insert into t1 values ('1 '); Warnings: Note 1265 Data truncated for column 'a' at row 1 -insert into t1 values ('1 x'); +insert ignore into t1 values ('1 x'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; @@ -1274,6 +1275,7 @@ a 1 1 drop table t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 (a varchar(17000) character set utf16); Warnings: Note 1246 Converting column 'a' from VARCHAR to TEXT @@ -1419,7 +1421,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(64) CHARACTER SET utf16 NOT NULL + `a` varchar(64) CHARACTER SET utf16 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (''); SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; @@ -1468,7 +1470,7 @@ CREATE TABLE t1 AS SELECT repeat('a',2) as s1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `s1` varchar(2) CHARACTER SET utf16 NOT NULL + `s1` varchar(2) CHARACTER SET utf16 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('ab'),('AE'),('ab'),('AE'); SELECT * FROM t1 ORDER BY s1; @@ -1553,11 +1555,12 @@ SELECT space(date_add(101, INTERVAL CHAR('1' USING utf16) hour_second)); space(date_add(101, INTERVAL CHAR('1' USING utf16) hour_second)) NULL Warnings: -Warning 1301 Result of space() was larger than max_allowed_packet (4194304) - truncated +Warning 1301 Result of space() was larger than max_allowed_packet (16777216) - truncated # # Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT # SET NAMES utf8, @@character_set_connection=utf16; +SET STATEMENT group_concat_max_len=1024 FOR SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body UNION ALL @@ -1568,6 +1571,7 @@ id l a 512 Warnings: Warning 1260 Row 1 was cut by GROUP_CONCAT() +SET STATEMENT group_concat_max_len=1024 FOR SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body UNION ALL @@ -1584,6 +1588,16 @@ ERROR HY000: Invalid utf16 character string: 'DE9899' DO LPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999); ERROR HY000: Invalid utf16 character string: 'DE9899' # +# MDEV-11685: sql_mode can't be set with non-ascii connection charset +# +SET character_set_connection=utf16; +SET sql_mode='NO_ENGINE_SUBSTITUTION'; +SELECT @@sql_mode; +@@sql_mode +NO_ENGINE_SUBSTITUTION +SET sql_mode=DEFAULT; +SET NAMES utf8; +# # End of 5.5 tests # # @@ -1620,7 +1634,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf16 NOT NULL + `a` varchar(5) CHARACTER SET utf16 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -1870,7 +1884,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf16 COLLATE utf16_bin NOT NULL + `a` varchar(5) CHARACTER SET utf16 COLLATE utf16_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; diff --git a/mysql-test/r/ctype_utf16_def.result b/mysql-test/r/ctype_utf16_def.result index 9d3d110fc99..98b6f7d913d 100644 --- a/mysql-test/r/ctype_utf16_def.result +++ b/mysql-test/r/ctype_utf16_def.result @@ -1,4 +1,4 @@ -call mtr.add_suppression("Cannot use utf16 as character_set_client"); +call mtr.add_suppression("'utf16' can not be used as client character set"); SHOW VARIABLES LIKE 'collation_server'; Variable_name Value collation_server utf16_general_ci diff --git a/mysql-test/r/ctype_utf16_uca.result b/mysql-test/r/ctype_utf16_uca.result index 0c478222650..1105225ed87 100644 --- a/mysql-test/r/ctype_utf16_uca.result +++ b/mysql-test/r/ctype_utf16_uca.result @@ -2810,7 +2810,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -3045,7 +3045,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_unicode_ci NOT NULL, + `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_unicode_ci DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -3228,7 +3228,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf16 COLLATE utf16_unicode_ci NOT NULL + `a` varchar(5) CHARACTER SET utf16 COLLATE utf16_unicode_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -3695,7 +3695,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_german2_ci NOT NULL, + `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_german2_ci DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -3726,7 +3726,7 @@ CREATE TABLE t1 AS SELECT repeat('a', 10) as c LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` varchar(10) CHARACTER SET utf16 COLLATE utf16_unicode_520_ci NOT NULL + `c` varchar(10) CHARACTER SET utf16 COLLATE utf16_unicode_520_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_utf32 0x0180),(_utf32 0x023A); INSERT INTO t1 VALUES (_utf32 0x023B),(_utf32 0x023C); @@ -3999,7 +3999,7 @@ D801DC28 30D2 ð¨ ALTER TABLE t1 ADD KEY(c); EXPLAIN SELECT hex(c) FROM t1 WHERE c LIKE 'a%' ORDER BY c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 42 NULL 2 Using where; Using index +1 SIMPLE t1 range c c 43 NULL 2 Using where; Using index SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c; hex(c) hex(weight_string(c)) 0061 120F @@ -4042,7 +4042,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `s1` varchar(64) CHARACTER SET utf16 COLLATE utf16_myanmar_ci NOT NULL, + `s1` varchar(64) CHARACTER SET utf16 COLLATE utf16_myanmar_ci DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 (s1) VALUES @@ -6628,7 +6628,7 @@ CREATE TABLE t1 AS SELECT SPACE(3) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(3) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 NOT NULL + `a` varchar(3) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (SPACE(0)),(SPACE(1)),(SPACE(2)); SELECT HEX(a), HEX(WEIGHT_STRING(a AS CHAR(8))) FROM t1; @@ -6661,7 +6661,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_ucs2 0x3400); INSERT INTO t1 VALUES (_ucs2 0xF001); @@ -6674,7 +6674,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('A'),('À'),('Ã'),('Â'),('Ã'),('Ä'),('Ã…'); SELECT a, HEX(WEIGHT_STRING(a LEVEL 2)) FROM t1 ORDER BY a; @@ -6733,7 +6733,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('cota'),('cote'),('cotz'); INSERT INTO t1 VALUES ('coté'),('côte'),('côté'),('cotë'),('côtë'); diff --git a/mysql-test/r/ctype_utf16le.result b/mysql-test/r/ctype_utf16le.result index 1ba2cf600a4..0fedff7d3bf 100644 --- a/mysql-test/r/ctype_utf16le.result +++ b/mysql-test/r/ctype_utf16le.result @@ -82,7 +82,7 @@ CREATE TABLE t1 (a VARCHAR(10), pad INT, b VARCHAR(10)) CHARACTER SET utf16le; INSERT INTO t1 VALUES (_ucs2 X'0420', 10, _ucs2 X'0421'); INSERT INTO t1 VALUES (_ucs2 X'0420', 10, _ucs2 X'04210422'); INSERT INTO t1 VALUES (_ucs2 X'0420', 10, _ucs2 X'042104220423'); -INSERT INTO t1 VALUES (_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423'); +INSERT IGNORE INTO t1 VALUES (_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 INSERT INTO t1 VALUES (_utf32 X'010000', 10, _ucs2 X'0421'); @@ -102,8 +102,8 @@ RPAD(_utf16le X'2004',10,_utf16le X'2104') r; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `l` varchar(10) CHARACTER SET utf16le NOT NULL, - `r` varchar(10) CHARACTER SET utf16le NOT NULL + `l` varchar(10) CHARACTER SET utf16le DEFAULT NULL, + `r` varchar(10) CHARACTER SET utf16le DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT HEX(l), HEX(r) FROM t1; HEX(l) HEX(r) @@ -798,7 +798,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf16le COLLATE utf16le_bin NOT NULL + `a` varchar(1) CHARACTER SET utf16le COLLATE utf16le_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84); INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080); @@ -1121,6 +1121,7 @@ DROP TABLE t1; # CREATE TABLE t1 (s1 VARCHAR(50) CHARACTER SET ucs2); INSERT INTO t1 VALUES (0xDF84); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY column s1 VARCHAR(50) CHARACTER SET utf16le; Warnings: Warning 1366 Incorrect string value: '\xDF\x84' for column 's1' at row 1 @@ -1133,7 +1134,7 @@ DROP TABLE t1; # CREATE TABLE t1 (s1 VARCHAR(5) CHARACTER SET ucs2, s2 VARCHAR(5) CHARACTER SET utf16le); INSERT INTO t1 (s1) VALUES (0xdf84); -UPDATE t1 set s2 = s1; +UPDATE IGNORE t1 set s2 = s1; Warnings: Warning 1366 Incorrect string value: '\xDF\x84' for column 's2' at row 1 SELECT HEX(s2) FROM t1; @@ -1470,7 +1471,7 @@ Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123x' # CREATE TABLE t1 (a int); INSERT INTO t1 VALUES ('-1234.1e2'); -INSERT INTO t1 VALUES ('-1234.1e2xxxx'); +INSERT IGNORE INTO t1 VALUES ('-1234.1e2xxxx'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 INSERT INTO t1 VALUES ('-1234.1e2 '); @@ -1524,7 +1525,7 @@ CREATE TABLE t1 (a int); INSERT INTO t1 VALUES ('1 '); Warnings: Note 1265 Data truncated for column 'a' at row 1 -INSERT INTO t1 VALUES ('1 x'); +INSERT IGNORE INTO t1 VALUES ('1 x'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 SELECT * FROM t1; @@ -1535,6 +1536,7 @@ DROP TABLE t1; # # Testing auto-conversion to TEXT # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (a VARCHAR(17000) CHARACTER SET utf16le); Warnings: Note 1246 Converting column 'a' from VARCHAR to TEXT @@ -1690,7 +1692,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(64) CHARACTER SET utf16le NOT NULL + `a` varchar(64) CHARACTER SET utf16le DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (''); SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; @@ -1741,7 +1743,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',2) as s1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `s1` varchar(2) CHARACTER SET utf16le NOT NULL + `s1` varchar(2) CHARACTER SET utf16le DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('ab'),('AE'),('ab'),('AE'); SELECT * FROM t1 ORDER BY s1; @@ -1854,7 +1856,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf16le NOT NULL + `a` varchar(5) CHARACTER SET utf16le DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -2104,7 +2106,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf16le COLLATE utf16le_bin NOT NULL + `a` varchar(5) CHARACTER SET utf16le COLLATE utf16le_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result index f5365dd0c31..37cda220db0 100644 --- a/mysql-test/r/ctype_utf32.result +++ b/mysql-test/r/ctype_utf32.result @@ -100,8 +100,8 @@ RPAD(_utf32 X'0420',10,_utf32 X'0421') r; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `l` varchar(10) CHARACTER SET utf32 NOT NULL, - `r` varchar(10) CHARACTER SET utf32 NOT NULL + `l` varchar(10) CHARACTER SET utf32 DEFAULT NULL, + `r` varchar(10) CHARACTER SET utf32 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(l), hex(r) from t1; hex(l) hex(r) @@ -754,7 +754,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_bin NOT NULL + `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84); INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080); @@ -983,31 +983,31 @@ hex(a) drop table t1; create table t1 (utf32 varchar(2) character set utf32); Wrong character with pad -insert into t1 values (0x110000); +insert ignore into t1 values (0x110000); Warnings: Warning 1366 Incorrect string value: '\x11\x00\x00' for column 'utf32' at row 1 Wrong chsaracter without pad -insert into t1 values (0x00110000); +insert ignore into t1 values (0x00110000); Warnings: Warning 1366 Incorrect string value: '\x00\x11\x00\x00' for column 'utf32' at row 1 Wrong character with pad followed by another wrong character -insert into t1 values (0x11000000110000); +insert ignore into t1 values (0x11000000110000); Warnings: Warning 1366 Incorrect string value: '\x11\x00\x00\x00\x11\x00...' for column 'utf32' at row 1 Good character with pad followed by bad character -insert into t1 values (0x10000000110000); +insert ignore into t1 values (0x10000000110000); Warnings: Warning 1366 Incorrect string value: '\x00\x11\x00\x00' for column 'utf32' at row 1 Good character without pad followed by bad character -insert into t1 values (0x0010000000110000); +insert ignore into t1 values (0x0010000000110000); Warnings: Warning 1366 Incorrect string value: '\x00\x11\x00\x00' for column 'utf32' at row 1 Wrong character with the second byte higher than 0x10 -insert into t1 values (0x00800037); +insert ignore into t1 values (0x00800037); Warnings: Warning 1366 Incorrect string value: '\x00\x80\x007' for column 'utf32' at row 1 Wrong character with pad with the second byte higher than 0x10 -insert into t1 values (0x00800037); +insert ignore into t1 values (0x00800037); Warnings: Warning 1366 Incorrect string value: '\x00\x80\x007' for column 'utf32' at row 1 drop table t1; @@ -1248,7 +1248,7 @@ Warnings: Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123x' create table t1 (a int); insert into t1 values ('-1234.1e2'); -insert into t1 values ('-1234.1e2xxxx'); +insert ignore into t1 values ('-1234.1e2xxxx'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 insert into t1 values ('-1234.1e2 '); @@ -1264,7 +1264,7 @@ create table t1 (a int); insert into t1 values ('1 '); Warnings: Note 1265 Data truncated for column 'a' at row 1 -insert into t1 values ('1 x'); +insert ignore into t1 values ('1 x'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; @@ -1272,6 +1272,7 @@ a 1 1 drop table t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 (a varchar(17000) character set utf32); Warnings: Note 1246 Converting column 'a' from VARCHAR to TEXT @@ -1367,7 +1368,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(64) CHARACTER SET utf32 NOT NULL + `a` varchar(64) CHARACTER SET utf32 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (''); SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1; @@ -1467,7 +1468,7 @@ hex(char(0x010203 using utf32)) 00010203 select hex(char(0x01020304 using utf32)); hex(char(0x01020304 using utf32)) - +NULL Warnings: Warning 1300 Invalid utf32 character string: '010203' create table t1 (s1 varchar(1) character set utf32, s2 text character set utf32); @@ -1482,7 +1483,7 @@ CREATE TABLE t1 AS SELECT repeat('a',2) as s1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `s1` varchar(2) CHARACTER SET utf32 NOT NULL + `s1` varchar(2) CHARACTER SET utf32 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('ab'),('AE'),('ab'),('AE'); SELECT * FROM t1 ORDER BY s1; @@ -1558,12 +1559,12 @@ DROP TABLE t1; # CREATE TABLE t1 (utf32 CHAR(5) CHARACTER SET utf32, latin1 CHAR(5) CHARACTER SET latin1); INSERT INTO t1 (utf32) VALUES (0xc581); -UPDATE t1 SET latin1 = utf32; +UPDATE IGNORE t1 SET latin1 = utf32; Warnings: Warning 1366 Incorrect string value: '\x00\x00\xC5\x81' for column 'latin1' at row 1 DELETE FROM t1; INSERT INTO t1 (utf32) VALUES (0x100cc); -UPDATE t1 SET latin1 = utf32; +UPDATE IGNORE t1 SET latin1 = utf32; Warnings: Warning 1366 Incorrect string value: '\x00\x01\x00\xCC' for column 'latin1' at row 1 DROP TABLE t1; @@ -1575,7 +1576,7 @@ CREATE TABLE t1 AS SELECT format(123,2,'no_NO'); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `format(123,2,'no_NO')` varchar(45) CHARACTER SET utf32 NOT NULL + `format(123,2,'no_NO')` varchar(45) CHARACTER SET utf32 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT * FROM t1; format(123,2,'no_NO') @@ -1613,6 +1614,7 @@ DROP TABLE t1; # Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT # SET NAMES utf8, @@character_set_connection=utf32; +SET STATEMENT group_concat_max_len=1024 FOR SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body UNION ALL @@ -1664,10 +1666,20 @@ CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061)) 1 select hex(lower(cast(0xffff0000 as char character set utf32))) as c; c -0000003F0000003F0000003F0000003F +NULL Warnings: Warning 1300 Invalid utf32 character string: '\xFF\xFF\x00\x00' # +# MDEV-11685: sql_mode can't be set with non-ascii connection charset +# +SET character_set_connection=utf32; +SET sql_mode='NO_ENGINE_SUBSTITUTION'; +SELECT @@sql_mode; +@@sql_mode +NO_ENGINE_SUBSTITUTION +SET sql_mode=DEFAULT; +SET NAMES utf8; +# # End of 5.5 tests # # @@ -1704,7 +1716,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf32 NOT NULL + `a` varchar(5) CHARACTER SET utf32 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -1954,7 +1966,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf32 COLLATE utf32_bin NOT NULL + `a` varchar(5) CHARACTER SET utf32 COLLATE utf32_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; diff --git a/mysql-test/r/ctype_utf32_uca.result b/mysql-test/r/ctype_utf32_uca.result index 08b0dbe999a..097da3d7c16 100644 --- a/mysql-test/r/ctype_utf32_uca.result +++ b/mysql-test/r/ctype_utf32_uca.result @@ -2810,7 +2810,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -3045,7 +3045,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_unicode_ci NOT NULL, + `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_unicode_ci DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -3248,7 +3248,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf32 COLLATE utf32_unicode_ci NOT NULL + `a` varchar(5) CHARACTER SET utf32 COLLATE utf32_unicode_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -3715,7 +3715,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_german2_ci NOT NULL, + `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_german2_ci DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -3746,7 +3746,7 @@ CREATE TABLE t1 AS SELECT repeat('a', 10) as c LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` varchar(10) CHARACTER SET utf32 COLLATE utf32_unicode_520_ci NOT NULL + `c` varchar(10) CHARACTER SET utf32 COLLATE utf32_unicode_520_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_utf32 0x0180),(_utf32 0x023A); INSERT INTO t1 VALUES (_utf32 0x023B),(_utf32 0x023C); @@ -4019,7 +4019,7 @@ hex(c) hex(weight_string(c)) c ALTER TABLE t1 ADD KEY(c); EXPLAIN SELECT hex(c) FROM t1 WHERE c LIKE 'a%' ORDER BY c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 42 NULL 2 Using where; Using index +1 SIMPLE t1 range c c 43 NULL 2 Using where; Using index SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c; hex(c) hex(weight_string(c)) 00000061 120F @@ -4062,7 +4062,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `s1` varchar(64) CHARACTER SET utf32 COLLATE utf32_myanmar_ci NOT NULL, + `s1` varchar(64) CHARACTER SET utf32 COLLATE utf32_myanmar_ci DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 (s1) VALUES @@ -6648,7 +6648,7 @@ CREATE TABLE t1 AS SELECT SPACE(3) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(3) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 NOT NULL + `a` varchar(3) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (SPACE(0)),(SPACE(1)),(SPACE(2)); SELECT HEX(a), HEX(WEIGHT_STRING(a AS CHAR(8))) FROM t1; @@ -6681,7 +6681,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_ucs2 0x3400); INSERT INTO t1 VALUES (_ucs2 0xF001); @@ -6694,7 +6694,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('A'),('À'),('Ã'),('Â'),('Ã'),('Ä'),('Ã…'); SELECT a, HEX(WEIGHT_STRING(a LEVEL 2)) FROM t1 ORDER BY a; @@ -6753,7 +6753,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('cota'),('cote'),('cotz'); INSERT INTO t1 VALUES ('coté'),('côte'),('côté'),('cotë'),('côtë'); diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 5410d803a3c..0a4898ff0b9 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -157,7 +157,7 @@ drop table t1; set LC_TIME_NAMES='en_US'; set names koi8r; create table t1 (s1 char(1) character set utf8); -insert into t1 values (_koi8r'ÁÂ'); +insert ignore into t1 values (_koi8r'ÁÂ'); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select s1,hex(s1),char_length(s1),octet_length(s1) from t1; @@ -165,19 +165,19 @@ s1 hex(s1) char_length(s1) octet_length(s1) Á D0B0 1 2 drop table t1; create table t1 (s1 tinytext character set utf8); -insert into t1 select repeat('a',300); +insert ignore into t1 select repeat('a',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',300); +insert ignore into t1 select repeat('Ñ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',300); +insert ignore into t1 select repeat('aÑ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',300); +insert ignore into t1 select repeat('Ña',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',300); +insert ignore into t1 select repeat('ÑÑ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select hex(s1) from t1; @@ -196,19 +196,19 @@ length(s1) char_length(s1) 254 127 drop table t1; create table t1 (s1 text character set utf8); -insert into t1 select repeat('a',66000); +insert ignore into t1 select repeat('a',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',66000); +insert ignore into t1 select repeat('Ñ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',66000); +insert ignore into t1 select repeat('aÑ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',66000); +insert ignore into t1 select repeat('Ña',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',66000); +insert ignore into t1 select repeat('ÑÑ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select length(s1),char_length(s1) from t1; @@ -220,7 +220,7 @@ length(s1) char_length(s1) 65534 32767 drop table t1; create table t1 (s1 char(10) character set utf8); -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -228,7 +228,7 @@ hex(s1) 413F drop table t1; create table t1 (s1 varchar(10) character set utf8); -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -236,7 +236,7 @@ hex(s1) 413F drop table t1; create table t1 (s1 text character set utf8); -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -901,8 +901,8 @@ create table t2 select concat(a,_utf8'') as a, concat(b,_utf8'')as b from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(5) CHARACTER SET utf8 NOT NULL, - `b` varchar(15) CHARACTER SET utf8 NOT NULL + `a` varchar(5) CHARACTER SET utf8 DEFAULT NULL, + `b` varchar(15) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2; drop table t1; @@ -1126,7 +1126,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf8 NOT NULL, + `a` varchar(1) CHARACTER SET utf8 DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -1160,8 +1160,8 @@ STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR)) CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0; SHOW COLUMNS FROM t1; Field Type Null Key Default Extra -subject varchar(64) NO NULL -pattern varchar(64) NO NULL +subject varchar(64) YES NULL +pattern varchar(64) YES NULL INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d'); SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1; HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern) @@ -1387,6 +1387,7 @@ ERR Имри.Ðфимим.Ðеимимримдмримрмрирор имрим DROP TABLE t1,t2; create table t1 (a char(20) character set utf8); insert into t1 values ('123456'),('андрей'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify a char(2) character set utf8; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1863,24 +1864,28 @@ insert into t1 (a) values ('abcdefghijklmnopqrstuvwxyz'); select * from t1; a abcdefghijklmnopqrstuvwxyz +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(20) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmnopqrst +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(15) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmno +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(10) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghij +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(5) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1892,6 +1897,7 @@ create table t1 ( a varchar(4000) not null ) default character set utf8; insert into t1 values (repeat('a',4000)); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(3000) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1914,12 +1920,12 @@ char(53647 using utf8) Ñ select char(0xff,0x8f using utf8); char(0xff,0x8f using utf8) - +NULL Warnings: Warning 1300 Invalid utf8 character string: 'FF8F' select convert(char(0xff,0x8f) using utf8); convert(char(0xff,0x8f) using utf8) -?? +NULL Warnings: Warning 1300 Invalid utf8 character string: '\xFF\x8F' set sql_mode=traditional; @@ -2128,12 +2134,12 @@ ERROR HY000: Invalid utf8 character string: 'FF' set sql_mode=default; select hex(char(0xFF using utf8)); hex(char(0xFF using utf8)) - +NULL Warnings: Warning 1300 Invalid utf8 character string: 'FF' select hex(convert(0xFF using utf8)); hex(convert(0xFF using utf8)) -3F +NULL Warnings: Warning 1300 Invalid utf8 character string: '\xFF' select hex(_utf8 0x616263FF); @@ -2464,7 +2470,7 @@ create table t1 as select concat(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -2477,7 +2483,7 @@ create table t1 as select concat(18446744073709551615) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(20) CHARACTER SET utf8 NOT NULL + `c1` varchar(20) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -2490,7 +2496,7 @@ create table t1 as select concat(1.1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET utf8 NOT NULL + `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select hex(c1) from t1; hex(c1) @@ -2503,7 +2509,7 @@ create table t1 as select concat(1+2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET utf8 NOT NULL + `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1-2)); @@ -2513,7 +2519,7 @@ create table t1 as select concat(1-2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET utf8 NOT NULL + `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1*2)); @@ -2523,7 +2529,7 @@ create table t1 as select concat(1*2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET utf8 NOT NULL + `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1/2)); @@ -2563,7 +2569,7 @@ create table t1 as select concat(-1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(-(1+2))); @@ -2573,7 +2579,7 @@ create table t1 as select concat(-(1+2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET utf8 NOT NULL + `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1|2)); @@ -2583,7 +2589,7 @@ create table t1 as select concat(1|2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(1&2)); @@ -2593,7 +2599,7 @@ create table t1 as select concat(1&2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(bit_count(12))); @@ -2603,7 +2609,7 @@ create table t1 as select concat(bit_count(12)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(2<<1)); @@ -2613,7 +2619,7 @@ create table t1 as select concat(2<<1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(2>>1)); @@ -2623,7 +2629,7 @@ create table t1 as select concat(2>>1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(~0)); @@ -2633,7 +2639,7 @@ create table t1 as select concat(~0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(3^2)); @@ -2643,7 +2649,7 @@ create table t1 as select concat(3^2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(abs(-2))); @@ -2653,7 +2659,7 @@ create table t1 as select concat(abs(-2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(left(concat(exp(2)),1)); @@ -2783,7 +2789,7 @@ create table t1 as select concat(degrees(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(23) CHARACTER SET utf8 NOT NULL + `c1` varchar(23) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(radians(0))); @@ -2793,7 +2799,7 @@ create table t1 as select concat(radians(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(23) CHARACTER SET utf8 NOT NULL + `c1` varchar(23) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ceiling(0.5))); @@ -2803,7 +2809,7 @@ create table t1 as select concat(ceiling(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET utf8 NOT NULL + `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(floor(0.5))); @@ -2813,7 +2819,7 @@ create table t1 as select concat(floor(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET utf8 NOT NULL + `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(round(0.5))); @@ -2823,7 +2829,7 @@ create table t1 as select concat(round(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET utf8 NOT NULL + `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sign(0.5))); @@ -2833,14 +2839,14 @@ create table t1 as select concat(sign(0.5)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(rand()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(23) CHARACTER SET utf8 NOT NULL + `c1` varchar(23) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(length('a'))); @@ -2850,7 +2856,7 @@ create table t1 as select concat(length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(char_length('a'))); @@ -2860,7 +2866,7 @@ create table t1 as select concat(char_length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(bit_length('a'))); @@ -2870,7 +2876,7 @@ create table t1 as select concat(bit_length('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(coercibility('a'))); @@ -2880,7 +2886,7 @@ create table t1 as select concat(coercibility('a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(locate('a','a'))); @@ -2890,7 +2896,7 @@ create table t1 as select concat(locate('a','a')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(11) CHARACTER SET utf8 NOT NULL + `c1` varchar(11) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(field('c','a','b','c'))); @@ -2900,7 +2906,7 @@ create table t1 as select concat(field('c','a','b','c')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET utf8 NOT NULL + `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ascii(61))); @@ -2910,7 +2916,7 @@ create table t1 as select concat(ascii(61)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET utf8 NOT NULL + `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ord(61))); @@ -2920,7 +2926,7 @@ create table t1 as select concat(ord(61)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(find_in_set('b','a,b,c,d'))); @@ -2930,7 +2936,7 @@ create table t1 as select concat(find_in_set('b','a,b,c,d')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET utf8 NOT NULL + `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select md5('a'), hex(md5('a')); @@ -2940,7 +2946,7 @@ create table t1 as select md5('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(32) CHARACTER SET utf8 NOT NULL + `c1` varchar(32) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select old_password('a'), hex(old_password('a')); @@ -2950,7 +2956,7 @@ create table t1 as select old_password('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(16) CHARACTER SET utf8 NOT NULL + `c1` varchar(16) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select password('a'), hex(password('a')); @@ -2960,7 +2966,7 @@ create table t1 as select password('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(41) CHARACTER SET utf8 NOT NULL + `c1` varchar(41) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select sha('a'), hex(sha('a')); @@ -2970,7 +2976,7 @@ create table t1 as select sha('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(40) CHARACTER SET utf8 NOT NULL + `c1` varchar(40) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select sha1('a'), hex(sha1('a')); @@ -2980,7 +2986,7 @@ create table t1 as select sha1('a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(40) CHARACTER SET utf8 NOT NULL + `c1` varchar(40) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast('-1' as signed))); @@ -2990,7 +2996,7 @@ create table t1 as select concat(cast('-1' as signed)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast('1' as unsigned))); @@ -3000,7 +3006,7 @@ create table t1 as select concat(cast('1' as unsigned)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(cast(1/2 as decimal(5,5)))); @@ -3059,7 +3065,7 @@ create table t1 as select concat(least(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(greatest(1,2))); @@ -3069,7 +3075,7 @@ create table t1 as select concat(greatest(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(case when 11 then 22 else 33 end)); @@ -3079,7 +3085,7 @@ create table t1 as select concat(case when 11 then 22 else 33 end) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(coalesce(1,2))); @@ -3089,7 +3095,7 @@ create table t1 as select concat(coalesce(1,2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat_ws(1,2,3)); @@ -3099,7 +3105,7 @@ create table t1 as select concat_ws(1,2,3) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET utf8 NOT NULL + `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(group_concat(1,2,3)); @@ -3109,7 +3115,7 @@ create table t1 as select group_concat(1,2,3) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` text CHARACTER SET utf8 DEFAULT NULL + `c1` mediumtext CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select 1 as c1 union select 'a'; @@ -3127,7 +3133,7 @@ create table t1 as select concat(last_insert_id()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(benchmark(0,0))); @@ -3137,7 +3143,7 @@ create table t1 as select concat(benchmark(0,0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sleep(0))); @@ -3147,7 +3153,7 @@ create table t1 as select concat(sleep(0)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(is_free_lock('xxxx'))); @@ -3181,7 +3187,7 @@ create table t1 as select concat(crc32('')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(uncompressed_length(''))); @@ -3198,7 +3204,7 @@ create table t1 as select concat(connection_id()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(inet_aton('127.1.1.1'))); @@ -3234,7 +3240,7 @@ create table t1 as select concat(row_count()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(found_rows())); @@ -3244,21 +3250,21 @@ create table t1 as select concat(found_rows()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(uuid_short()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(21) CHARACTER SET utf8 NOT NULL + `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(uuid()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(36) CHARACTER SET utf8 NOT NULL + `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select coercibility(uuid()), coercibility(cast('a' as char character set latin1)); @@ -3271,7 +3277,7 @@ create table t1 as select concat(uuid(), cast('a' as char character set latin1)) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(37) NOT NULL + `c1` varchar(37) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(master_pos_wait('non-existent',0,2)) as c1; @@ -3291,7 +3297,7 @@ hex(c1) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL, + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL, `c2` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -3349,7 +3355,7 @@ hex(c1) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET utf8 NOT NULL, + `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL, `c2` decimal(2,1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -3388,7 +3394,7 @@ create table t1 as select concat('a'='a' IS TRUE) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a'='a' IS NOT TRUE)); @@ -3398,7 +3404,7 @@ create table t1 as select concat('a'='a' IS NOT TRUE) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(NOT 'a'='a')); @@ -3408,7 +3414,7 @@ create table t1 as select concat(NOT 'a'='a') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' IS NULL)); @@ -3418,7 +3424,7 @@ create table t1 as select concat('a' IS NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' IS NOT NULL)); @@ -3428,7 +3434,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' rlike 'a')); @@ -3438,7 +3444,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(strcmp('a','b'))); @@ -3448,7 +3454,7 @@ create table t1 as select concat(strcmp('a','b')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' like 'a')); @@ -3458,7 +3464,7 @@ create table t1 as select concat('a' like 'b') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' between 'b' and 'c')); @@ -3468,7 +3474,7 @@ create table t1 as select concat('a' between 'b' and 'c') as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat('a' in ('a','b'))); @@ -3478,7 +3484,7 @@ create table t1 as select concat('a' in ('a','b')) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(interval(23, 1, 15, 17, 30, 44, 200))); @@ -3488,7 +3494,7 @@ create table t1 as select concat(interval(23, 1, 15, 17, 30, 44, 200)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a varchar(10), fulltext key(a)); @@ -3520,7 +3526,7 @@ create table t1 as select concat(ifnull(1,1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(ifnull(1.1,1.1))); @@ -3530,7 +3536,7 @@ create table t1 as select concat(ifnull(1.1,1.1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET utf8 NOT NULL + `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(if(1,'b',1)); @@ -3560,7 +3566,7 @@ create table t1 as select concat(if(1,1,1)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(nullif(1,2))); @@ -3725,12 +3731,13 @@ create table t1 as select concat(period_add(200902, 2)) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(6) CHARACTER SET utf8 NOT NULL + `c1` varchar(6) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(period_diff(200902, 200802))); hex(concat(period_diff(200902, 200802))) 3132 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 as select concat(period_add(200902, 200802)) as c1; Warnings: Warning 1265 Data truncated for column 'c1' at row 1 @@ -3934,21 +3941,21 @@ create table t1 as select concat(curdate()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(utc_date()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(curtime()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select repeat('a',20) as c1 limit 0; @@ -3964,7 +3971,7 @@ create table t1 as select concat(utc_time()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(sec_to_time(2378))); @@ -4057,21 +4064,21 @@ create table t1 as select concat(now()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(19) CHARACTER SET utf8 NOT NULL + `c1` varchar(19) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(utc_timestamp()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(19) CHARACTER SET utf8 NOT NULL + `c1` varchar(19) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select concat(sysdate()) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(19) CHARACTER SET utf8 NOT NULL + `c1` varchar(19) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(addtime('00:00:00','11:22:33'))); @@ -4111,7 +4118,7 @@ create table t1 as select export_set(1,2,3,4,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(127) CHARACTER SET utf8 NOT NULL + `c1` varchar(127) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(insert(1133,3,0,22)); @@ -4121,7 +4128,7 @@ create table t1 as select insert(1133,3,0,22) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(6) CHARACTER SET utf8 NOT NULL + `c1` varchar(6) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lcase(123)); @@ -4131,7 +4138,7 @@ create table t1 as select lcase(123) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET utf8 NOT NULL + `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(left(123,1)); @@ -4141,7 +4148,7 @@ create table t1 as select left(123,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lower(123)); @@ -4151,7 +4158,7 @@ create table t1 as select lower(123) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(3) CHARACTER SET utf8 NOT NULL + `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(lpad(1,2,0)); @@ -4161,7 +4168,7 @@ create table t1 as select lpad(1,2,0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(ltrim(1)); @@ -4171,7 +4178,7 @@ create table t1 as select ltrim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(mid(1,1,1)); @@ -4181,7 +4188,7 @@ create table t1 as select mid(1,1,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(repeat(1,2)); @@ -4191,7 +4198,7 @@ create table t1 as select repeat(1,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(replace(1,1,2)); @@ -4201,7 +4208,7 @@ create table t1 as select replace(1,1,2) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(reverse(12)); @@ -4211,7 +4218,7 @@ create table t1 as select reverse(12) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(right(123,1)); @@ -4221,7 +4228,7 @@ create table t1 as select right(123,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(rpad(1,2,0)); @@ -4231,7 +4238,7 @@ create table t1 as select rpad(1,2,0) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) CHARACTER SET utf8 NOT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(rtrim(1)); @@ -4241,7 +4248,7 @@ create table t1 as select rtrim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(soundex(1)); @@ -4251,7 +4258,7 @@ create table t1 as select soundex(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) CHARACTER SET utf8 NOT NULL + `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(substring(1,1,1)); @@ -4261,7 +4268,7 @@ create table t1 as select substring(1,1,1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(trim(1)); @@ -4271,7 +4278,7 @@ create table t1 as select trim(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(ucase(1)); @@ -4281,7 +4288,7 @@ create table t1 as select ucase(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(upper(1)); @@ -4291,14 +4298,14 @@ create table t1 as select upper(1) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 NOT NULL + `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select repeat(' ', 64) as a limit 0; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(64) CHARACTER SET utf8 NOT NULL + `a` varchar(64) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ("1.1"), ("2.1"); select a, hex(a) from t1; @@ -4548,7 +4555,7 @@ create table t2 as select concat(a) from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `concat(a)` varchar(19) CHARACTER SET utf8 NOT NULL + `concat(a)` varchar(19) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1, t2; create table t1 (a date); @@ -4847,7 +4854,7 @@ insert into t1 values ('2001-02-03 04:05:06'); create view v1(a) as select concat(a) from t1; show columns from v1; Field Type Null Key Default Extra -a varchar(19) NO +a varchar(19) YES NULL select hex(a) from v1; hex(a) 303030302D30302D30302030303A30303A3030 @@ -5098,14 +5105,14 @@ CREATE TABLE t2 AS SELECT CONCAT_WS(1,2,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `CONCAT_WS(1,2,3)` varchar(3) CHARACTER SET utf8 NOT NULL + `CONCAT_WS(1,2,3)` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT INSERT(1133,3,0,22) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `INSERT(1133,3,0,22)` varchar(6) CHARACTER SET utf8 NOT NULL + `INSERT(1133,3,0,22)` varchar(6) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LCASE(a) FROM t1; @@ -5126,35 +5133,35 @@ CREATE TABLE t2 AS SELECT REPEAT(1,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `REPEAT(1,2)` varchar(2) CHARACTER SET utf8 NOT NULL + `REPEAT(1,2)` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LEFT(123,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `LEFT(123,2)` varchar(2) CHARACTER SET utf8 NOT NULL + `LEFT(123,2)` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT RIGHT(123,2) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `RIGHT(123,2)` varchar(2) CHARACTER SET utf8 NOT NULL + `RIGHT(123,2)` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT LTRIM(123) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `LTRIM(123)` varchar(3) CHARACTER SET utf8 NOT NULL + `LTRIM(123)` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT RTRIM(123) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `RTRIM(123)` varchar(3) CHARACTER SET utf8 NOT NULL + `RTRIM(123)` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT ELT(1,111,222,333) FROM t1; @@ -5168,35 +5175,35 @@ CREATE TABLE t2 AS SELECT REPLACE(111,2,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `REPLACE(111,2,3)` varchar(3) CHARACTER SET utf8 NOT NULL + `REPLACE(111,2,3)` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT SUBSTRING_INDEX(111,111,1) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `SUBSTRING_INDEX(111,111,1)` varchar(3) CHARACTER SET utf8 NOT NULL + `SUBSTRING_INDEX(111,111,1)` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT MAKE_SET(111,222,3) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `MAKE_SET(111,222,3)` varchar(5) CHARACTER SET utf8 NOT NULL + `MAKE_SET(111,222,3)` varchar(5) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT SOUNDEX(1) FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `SOUNDEX(1)` varchar(4) CHARACTER SET utf8 NOT NULL + `SOUNDEX(1)` varchar(4) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; CREATE TABLE t2 AS SELECT EXPORT_SET(1,'Y','N','',8); SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `EXPORT_SET(1,'Y','N','',8)` varchar(64) CHARACTER SET utf8 NOT NULL + `EXPORT_SET(1,'Y','N','',8)` varchar(64) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; DROP TABLE t1; @@ -5411,17 +5418,13 @@ SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1 GROUP BY id ORDER BY l DESC; id l -a 1024 -Warnings: -Warning 1260 Row 2 was cut by GROUP_CONCAT() +a 1401 SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body UNION ALL SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1; id l -a 1024 -Warnings: -Warning 1260 Row 2 was cut by GROUP_CONCAT() +a 1401 # # MDEV-7814 Assertion `args[0]->fixed' fails in Item_func_conv_charset::Item_func_conv_charset # @@ -5444,7 +5447,7 @@ ADD KEY(ch); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `ch` varchar(60) CHARACTER SET utf8 NOT NULL, + `ch` varchar(60) CHARACTER SET utf8 DEFAULT NULL, `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), KEY `ch` (`ch`) @@ -5532,7 +5535,7 @@ aÖ€ EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; @@ -5559,7 +5562,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; @@ -5592,7 +5595,7 @@ z EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; @@ -5603,7 +5606,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; @@ -5688,7 +5691,7 @@ ADD KEY(ch); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `ch` varchar(60) CHARACTER SET utf8 NOT NULL, + `ch` varchar(60) CHARACTER SET utf8 DEFAULT NULL, `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), KEY `ch` (`ch`) @@ -5776,7 +5779,7 @@ aÖ€ EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; @@ -5803,7 +5806,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; @@ -5836,7 +5839,7 @@ z EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; @@ -5847,7 +5850,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index +1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; @@ -5932,7 +5935,7 @@ ADD KEY(ch); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `ch` varchar(60) CHARACTER SET utf8 NOT NULL, + `ch` varchar(60) CHARACTER SET utf8 DEFAULT NULL, `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), KEY `ch` (`ch`) @@ -6201,6 +6204,7 @@ INSERT INTO t1 VALUES (REPEAT('A',100)); SELECT OCTET_LENGTH(a) FROM t1; OCTET_LENGTH(a) 300 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a TINYTEXT CHARACTER SET utf8; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -6254,7 +6258,7 @@ CREATE TABLE t1 (i INT, KEY(i)); INSERT INTO t1 VALUES (20081205),(20050327); SELECT HEX(i), HEX(CHAR(i USING utf8)) FROM t1; HEX(i) HEX(CHAR(i USING utf8)) -131F197 0131 +131F197 NULL 1326A35 01326A35 Warnings: Warning 1300 Invalid utf8 character string: 'F197' @@ -6310,7 +6314,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf8 NOT NULL + `a` varchar(5) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -6554,7 +6558,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL + `a` varchar(5) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -6806,7 +6810,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -6829,7 +6833,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -6852,7 +6856,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -6875,7 +6879,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL + `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -6901,7 +6905,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL + `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; @@ -6927,7 +6931,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE CONCAT(c1)='a'; @@ -6950,7 +6954,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT * FROM t1 WHERE 'a'=CONCAT(c1); @@ -6973,7 +6977,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '% '=CONCAT(c1); @@ -6996,7 +7000,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('%'),('% '); SELECT * FROM t1 WHERE '%'=CONCAT(c1); @@ -7022,7 +7026,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf8 NOT NULL + `a` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('a'),('a '); SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a '; @@ -7047,7 +7051,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(10) CHARACTER SET utf8 NOT NULL + `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('ae'),('ä'); SELECT * FROM t1 WHERE c1='ä'; @@ -7178,6 +7182,7 @@ SELECT _utf8 0x7E, _utf8 X'7E', _utf8 B'01111110'; _utf8 0x7E _utf8 X'7E' _utf8 B'01111110' ~ ~ ~ # Start of ctype_unescape.inc +SET sql_mode = ''; SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection'; PREPARE stmt FROM @query; EXECUTE stmt; @@ -10240,6 +10245,7 @@ DROP FUNCTION wellformedness; DROP FUNCTION mysql_real_escape_string_generated; DROP FUNCTION iswellformed; DROP TABLE allbytes; +SET sql_mode = DEFAULT; # End of ctype_backslash.inc # # End of 10.0 tests @@ -10494,7 +10500,7 @@ DELETE FROM t1; LOAD DATA INFILE '../../std_data/loaddata/mdev9824.txt' INTO TABLE t1 CHARACTER SET utf8 LINES TERMINATED BY 'ёё' IGNORE 1 LINES; Warnings: Warning 1638 Non-ASCII separator arguments are not fully supported -SELECT c1 FROM t1; +SELECT c1 FROM t1 ORDER BY c1; c1 b c @@ -10503,7 +10509,7 @@ DROP TABLE t1; # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis # CREATE TABLE t1 (a TEXT CHARACTER SET utf8); -LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' INTO TABLE t1 CHARACTER SET utf8 IGNORE 4 LINES; +LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' IGNORE INTO TABLE t1 CHARACTER SET utf8 IGNORE 4 LINES; Warnings: Warning 1366 Incorrect string value: '\xD0' for column 'a' at row 1 Warning 1366 Incorrect string value: '\xE1\x80' for column 'a' at row 3 @@ -10525,7 +10531,7 @@ DROP TABLE t1; # MDEV-9874 LOAD XML INFILE does not handle well broken multi-byte characters # CREATE TABLE t1 (a TEXT CHARACTER SET utf8); -LOAD XML INFILE '../../std_data/loaddata/mdev9874.xml' INTO TABLE t1 CHARACTER SET utf8 ROWS IDENTIFIED BY ''; +LOAD XML INFILE '../../std_data/loaddata/mdev9874.xml' IGNORE INTO TABLE t1 CHARACTER SET utf8 ROWS IDENTIFIED BY ''; Warnings: Warning 1366 Incorrect string value: '\xD0' for column 'a' at row 1 SELECT HEX(a) FROM t1; diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result index 23e6f0aec26..cb2f93dec30 100644 --- a/mysql-test/r/ctype_utf8mb4.result +++ b/mysql-test/r/ctype_utf8mb4.result @@ -157,7 +157,7 @@ drop table t1; set LC_TIME_NAMES='en_US'; set names koi8r; create table t1 (s1 char(1) character set utf8mb4); -insert into t1 values (_koi8r'ÁÂ'); +insert ignore into t1 values (_koi8r'ÁÂ'); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select s1,hex(s1),char_length(s1),octet_length(s1) from t1; @@ -165,19 +165,19 @@ s1 hex(s1) char_length(s1) octet_length(s1) Á D0B0 1 2 drop table t1; create table t1 (s1 tinytext character set utf8mb4); -insert into t1 select repeat('a',300); +insert ignore into t1 select repeat('a',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',300); +insert ignore into t1 select repeat('Ñ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',300); +insert ignore into t1 select repeat('aÑ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',300); +insert ignore into t1 select repeat('Ña',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',300); +insert ignore into t1 select repeat('ÑÑ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select hex(s1) from t1; @@ -196,19 +196,19 @@ length(s1) char_length(s1) 254 127 drop table t1; create table t1 (s1 text character set utf8mb4); -insert into t1 select repeat('a',66000); +insert ignore into t1 select repeat('a',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',66000); +insert ignore into t1 select repeat('Ñ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',66000); +insert ignore into t1 select repeat('aÑ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',66000); +insert ignore into t1 select repeat('Ña',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',66000); +insert ignore into t1 select repeat('ÑÑ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select length(s1),char_length(s1) from t1; @@ -220,7 +220,7 @@ length(s1) char_length(s1) 65534 32767 drop table t1; create table t1 (s1 char(10) character set utf8mb4); -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -228,7 +228,7 @@ hex(s1) 413F drop table t1; create table t1 (s1 varchar(10) character set utf8mb4); -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -236,7 +236,7 @@ hex(s1) 413F drop table t1; create table t1 (s1 text character set utf8mb4); -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -901,8 +901,8 @@ create table t2 select concat(a,_utf8mb4'') as a, concat(b,_utf8mb4'')as b from show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL, - `b` varchar(15) CHARACTER SET utf8mb4 NOT NULL + `a` varchar(5) CHARACTER SET utf8mb4 DEFAULT NULL, + `b` varchar(15) CHARACTER SET utf8mb4 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2; drop table t1; @@ -1126,7 +1126,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL, + `a` varchar(1) CHARACTER SET utf8mb4 DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -1233,7 +1233,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL + `a` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84); INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080); @@ -1408,6 +1408,7 @@ ERR Имри.Ðфимим.Ðеимимримдмримрмрирор имрим DROP TABLE t1,t2; create table t1 (a char(20) character set utf8mb4); insert into t1 values ('123456'),('андрей'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify a char(2) character set utf8mb4; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1888,24 +1889,28 @@ insert into t1 (a) values ('abcdefghijklmnopqrstuvwxyz'); select * from t1; a abcdefghijklmnopqrstuvwxyz +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(20) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmnopqrst +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(15) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmno +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(10) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghij +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(5) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1917,6 +1922,7 @@ create table t1 ( a varchar(4000) not null ) default character set utf8mb4; insert into t1 values (repeat('a',4000)); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(3000) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1939,12 +1945,12 @@ char(53647 using utf8mb4) Ñ select char(0xff,0x8f using utf8mb4); char(0xff,0x8f using utf8mb4) - +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: 'FF8F' select convert(char(0xff,0x8f) using utf8mb4); convert(char(0xff,0x8f) using utf8mb4) -?? +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F' set sql_mode=traditional; @@ -2153,12 +2159,12 @@ ERROR HY000: Invalid utf8mb4 character string: 'FF' set sql_mode=default; select hex(char(0xFF using utf8mb4)); hex(char(0xFF using utf8mb4)) - +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: 'FF' select hex(convert(0xFF using utf8mb4)); hex(convert(0xFF using utf8mb4)) -3F +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: '\xFF' select hex(_utf8mb4 0x616263FF); @@ -2320,19 +2326,19 @@ create table t1 (utf8mb4 char(1) character set utf8mb4); Testing [F0][90..BF][80..BF][80..BF] insert into t1 values (0xF0908080); insert into t1 values (0xF0BFBFBF); -insert into t1 values (0xF08F8080); +insert ignore into t1 values (0xF08F8080); Warnings: Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1 -select hex(utf8mb4) from t1; +select hex(utf8mb4) from t1 order by binary utf8mb4; hex(utf8mb4) +3F F0908080 F0BFBFBF -3F delete from t1; Testing [F2..F3][80..BF][80..BF][80..BF] insert into t1 values (0xF2808080); insert into t1 values (0xF2BFBFBF); -select hex(utf8mb4) from t1; +select hex(utf8mb4) from t1 order by binary utf8mb4; hex(utf8mb4) F2808080 F2BFBFBF @@ -2340,14 +2346,14 @@ delete from t1; Testing [F4][80..8F][80..BF][80..BF] insert into t1 values (0xF4808080); insert into t1 values (0xF48F8080); -insert into t1 values (0xF4908080); +insert ignore into t1 values (0xF4908080); Warnings: Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1 -select hex(utf8mb4) from t1; +select hex(utf8mb4) from t1 order by binary utf8mb4; hex(utf8mb4) +3F F4808080 F48F8080 -3F drop table t1; # # Check strnxfrm() with odd length @@ -2418,7 +2424,7 @@ INSERT INTO t1 VALUES (119040, x'f09d8480'), (917999, x'f3a087af'); INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480'); INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab'); -INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); +INSERT IGNORE INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); Warnings: Warning 1265 Data truncated for column 'utf8mb4_encoding' at row 1 SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding; @@ -2434,7 +2440,7 @@ u_decimal hex(utf8mb4_encoding) 1114111 F48FBFBF 119070 F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480 119070 F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480 -INSERT INTO t1 VALUES (1114111, x'f5808080'); +INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080'); Warnings: Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1 SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE @@ -2448,14 +2454,14 @@ utf8mb3_encoding VARCHAR(10) NOT NULL ) CHARACTER SET utf8mb3; INSERT INTO t2 VALUES (42856, x'ea9da8'); INSERT INTO t2 VALUES (65131, x'efb9ab'); -INSERT INTO t2 VALUES (1114111, x'f48fbfbf'); +INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf'); Warnings: Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1 SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE table_name= 't2' AND column_name= 'utf8mb3_encoding'; character_maximum_length character_octet_length 10 30 -UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; +UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; Warnings: Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1 UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856; @@ -2515,6 +2521,7 @@ SELECT count(*) FROM t1, t2 WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding; count(*) 33 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 CONVERT TO CHARACTER SET utf8; Warnings: Warning 1366 Incorrect string value: '\xF0\x9D\x84\x80' for column 'utf8mb4_encoding' at row 1 @@ -2667,7 +2674,7 @@ Table Create Table t3 CREATE TEMPORARY TABLE `t3` ( `utf8mb4` varchar(10) CHARACTER SET utf8mb4 NOT NULL, `utf8mb3` varchar(10) CHARACTER SET utf8 NOT NULL, - `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 NOT NULL + `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TEMPORARY TABLE t3; SELECT * FROM t1, t2 WHERE t1.utf8mb4 > t2.utf8mb3; @@ -2700,6 +2707,7 @@ subject varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci, p VARCHAR(15) CHARACTER SET utf8 ) DEFAULT CHARSET=latin1; ALTER TABLE t1 ADD INDEX (subject); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 DEFAULT CHARACTER SET utf8, MODIFY subject varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, @@ -2817,6 +2825,7 @@ INSERT INTO t1 VALUES (REPEAT('😎',100)); SELECT OCTET_LENGTH(a) FROM t1; OCTET_LENGTH(a) 400 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a TINYTEXT CHARACTER SET utf8mb4; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -2892,7 +2901,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL + `a` varchar(5) CHARACTER SET utf8mb4 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -3136,7 +3145,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL + `a` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1; SHOW CREATE TABLE t2; @@ -3393,7 +3402,7 @@ CREATE TABLE t1 ( a VARCHAR(32) CHARACTER SET utf8mb4, b VARCHAR(32) CHARACTER SET utf8 ); -INSERT INTO t1 SELECT 'a 😠b', 'a 😠b'; +INSERT IGNORE INTO t1 SELECT 'a 😠b', 'a 😠b'; Warnings: Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81 b' for column 'a' at row 1 Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81 b' for column 'b' at row 1 @@ -3413,7 +3422,7 @@ CREATE TABLE t1 ( a VARCHAR(32) CHARACTER SET utf8mb4, b VARCHAR(32) CHARACTER SET utf8 ); -INSERT INTO t1 SELECT 'a 😠b', 'a 😠b'; +INSERT IGNORE INTO t1 SELECT 'a 😠b', 'a 😠b'; Warnings: Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81 b' for column 'b' at row 1 SELECT * FROM t1; @@ -3456,7 +3465,7 @@ DROP FUNCTION f1; # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis # CREATE TABLE t1 (a TEXT CHARACTER SET utf8mb4); -LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' INTO TABLE t1 CHARACTER SET utf8mb4 IGNORE 4 LINES; +LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' IGNORE INTO TABLE t1 CHARACTER SET utf8mb4 IGNORE 4 LINES; Warnings: Warning 1366 Incorrect string value: '\xD0' for column 'a' at row 1 Warning 1366 Incorrect string value: '\xE1\x80' for column 'a' at row 3 diff --git a/mysql-test/r/ctype_utf8mb4_heap.result b/mysql-test/r/ctype_utf8mb4_heap.result index d70e009228e..859ceff864e 100644 --- a/mysql-test/r/ctype_utf8mb4_heap.result +++ b/mysql-test/r/ctype_utf8mb4_heap.result @@ -157,7 +157,7 @@ drop table t1; set LC_TIME_NAMES='en_US'; set names koi8r; create table t1 (s1 char(1) character set utf8mb4) engine heap; -insert into t1 values (_koi8r'ÁÂ'); +insert ignore into t1 values (_koi8r'ÁÂ'); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select s1,hex(s1),char_length(s1),octet_length(s1) from t1; @@ -165,19 +165,19 @@ s1 hex(s1) char_length(s1) octet_length(s1) Á D0B0 1 2 drop table t1; create table t1 (s1 varchar(255) character set utf8mb4) engine heap; -insert into t1 select repeat('a',300); +insert ignore into t1 select repeat('a',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',300); +insert ignore into t1 select repeat('Ñ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',300); +insert ignore into t1 select repeat('aÑ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',300); +insert ignore into t1 select repeat('Ña',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',300); +insert ignore into t1 select repeat('ÑÑ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select hex(s1) from t1; @@ -196,19 +196,19 @@ length(s1) char_length(s1) 510 255 drop table t1; create table t1 (s1 varchar(255) character set utf8mb4) engine heap; -insert into t1 select repeat('a',66000); +insert ignore into t1 select repeat('a',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',66000); +insert ignore into t1 select repeat('Ñ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',66000); +insert ignore into t1 select repeat('aÑ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',66000); +insert ignore into t1 select repeat('Ña',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',66000); +insert ignore into t1 select repeat('ÑÑ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select length(s1),char_length(s1) from t1; @@ -220,7 +220,7 @@ length(s1) char_length(s1) 510 255 drop table t1; create table t1 (s1 char(10) character set utf8mb4) engine heap; -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -228,7 +228,7 @@ hex(s1) 413F drop table t1; create table t1 (s1 varchar(10) character set utf8mb4) engine heap; -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -840,8 +840,8 @@ create table t2 engine heap select concat(a,_utf8mb4'') as a, concat(b,_utf8mb4' show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL, - `b` varchar(15) CHARACTER SET utf8mb4 NOT NULL + `a` varchar(5) CHARACTER SET utf8mb4 DEFAULT NULL, + `b` varchar(15) CHARACTER SET utf8mb4 DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 drop table t2; drop table t1; @@ -1065,7 +1065,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL, + `a` varchar(1) CHARACTER SET utf8mb4 DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -1307,6 +1307,7 @@ ERR Имри.Ðфимим.Ðеимимримдмримрмрирор имрим DROP TABLE t1,t2; create table t1 (a char(20) character set utf8mb4) engine heap; insert into t1 values ('123456'),('андрей'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify a char(2) character set utf8mb4; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1720,24 +1721,28 @@ insert into t1 (a) values ('abcdefghijklmnopqrstuvwxyz'); select * from t1; a abcdefghijklmnopqrstuvwxyz +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(20) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmnopqrst +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(15) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmno +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(10) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghij +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(5) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1749,6 +1754,7 @@ create table t1 ( a varchar(4000) not null ) default character set utf8mb4 engine heap; insert into t1 values (repeat('a',4000)); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(3000) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1771,12 +1777,12 @@ char(53647 using utf8mb4) Ñ select char(0xff,0x8f using utf8mb4); char(0xff,0x8f using utf8mb4) - +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: 'FF8F' select convert(char(0xff,0x8f) using utf8mb4); convert(char(0xff,0x8f) using utf8mb4) -?? +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F' set sql_mode=traditional; @@ -1985,12 +1991,12 @@ ERROR HY000: Invalid utf8mb4 character string: 'FF' set sql_mode=default; select hex(char(0xFF using utf8mb4)); hex(char(0xFF using utf8mb4)) - +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: 'FF' select hex(convert(0xFF using utf8mb4)); hex(convert(0xFF using utf8mb4)) -3F +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: '\xFF' select hex(_utf8mb4 0x616263FF); @@ -2152,7 +2158,7 @@ create table t1 (utf8mb4 char(1) character set utf8mb4) engine heap; Testing [F0][90..BF][80..BF][80..BF] insert into t1 values (0xF0908080); insert into t1 values (0xF0BFBFBF); -insert into t1 values (0xF08F8080); +insert ignore into t1 values (0xF08F8080); Warnings: Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1 select hex(utf8mb4) from t1; @@ -2172,7 +2178,7 @@ delete from t1; Testing [F4][80..8F][80..BF][80..BF] insert into t1 values (0xF4808080); insert into t1 values (0xF48F8080); -insert into t1 values (0xF4908080); +insert ignore into t1 values (0xF4908080); Warnings: Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1 select hex(utf8mb4) from t1; @@ -2231,7 +2237,7 @@ INSERT INTO t1 VALUES (119040, x'f09d8480'), (917999, x'f3a087af'); INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480'); INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab'); -INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); +INSERT IGNORE INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); Warnings: Warning 1265 Data truncated for column 'utf8mb4_encoding' at row 1 SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding; @@ -2247,7 +2253,7 @@ u_decimal hex(utf8mb4_encoding) 120735 F09D9E9F 65131 EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9AB 917999 F3A087AF -INSERT INTO t1 VALUES (1114111, x'f5808080'); +INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080'); Warnings: Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1 SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE @@ -2261,14 +2267,14 @@ utf8mb3_encoding VARCHAR(10) NOT NULL ) CHARACTER SET utf8mb3 ENGINE heap; INSERT INTO t2 VALUES (42856, x'ea9da8'); INSERT INTO t2 VALUES (65131, x'efb9ab'); -INSERT INTO t2 VALUES (1114111, x'f48fbfbf'); +INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf'); Warnings: Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1 SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE table_name= 't2' AND column_name= 'utf8mb3_encoding'; character_maximum_length character_octet_length 10 30 -UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; +UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; Warnings: Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1 UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856; @@ -2328,6 +2334,7 @@ SELECT count(*) FROM t1, t2 WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding; count(*) 33 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 CONVERT TO CHARACTER SET utf8; SHOW CREATE TABLE t1; Table Create Table @@ -2468,7 +2475,7 @@ Table Create Table t3 CREATE TEMPORARY TABLE `t3` ( `utf8mb4` varchar(10) CHARACTER SET utf8mb4 NOT NULL, `utf8mb3` varchar(10) CHARACTER SET utf8 NOT NULL, - `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 NOT NULL + `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 DROP TEMPORARY TABLE t3; SELECT * FROM t1, t2 WHERE t1.utf8mb4 > t2.utf8mb3; diff --git a/mysql-test/r/ctype_utf8mb4_innodb.result b/mysql-test/r/ctype_utf8mb4_innodb.result index 28b566c19eb..28ed7ed313d 100644 --- a/mysql-test/r/ctype_utf8mb4_innodb.result +++ b/mysql-test/r/ctype_utf8mb4_innodb.result @@ -157,7 +157,7 @@ drop table t1; set LC_TIME_NAMES='en_US'; set names koi8r; create table t1 (s1 char(1) character set utf8mb4) engine InnoDB; -insert into t1 values (_koi8r'ÁÂ'); +insert ignore into t1 values (_koi8r'ÁÂ'); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select s1,hex(s1),char_length(s1),octet_length(s1) from t1; @@ -165,19 +165,19 @@ s1 hex(s1) char_length(s1) octet_length(s1) Á D0B0 1 2 drop table t1; create table t1 (s1 tinytext character set utf8mb4) engine InnoDB; -insert into t1 select repeat('a',300); +insert ignore into t1 select repeat('a',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',300); +insert ignore into t1 select repeat('Ñ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',300); +insert ignore into t1 select repeat('aÑ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',300); +insert ignore into t1 select repeat('Ña',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',300); +insert ignore into t1 select repeat('ÑÑ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select hex(s1) from t1; @@ -196,19 +196,19 @@ length(s1) char_length(s1) 255 255 drop table t1; create table t1 (s1 text character set utf8mb4) engine InnoDB; -insert into t1 select repeat('a',66000); +insert ignore into t1 select repeat('a',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',66000); +insert ignore into t1 select repeat('Ñ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',66000); +insert ignore into t1 select repeat('aÑ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',66000); +insert ignore into t1 select repeat('Ña',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',66000); +insert ignore into t1 select repeat('ÑÑ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select length(s1),char_length(s1) from t1; @@ -220,7 +220,7 @@ length(s1) char_length(s1) 65535 65535 drop table t1; create table t1 (s1 char(10) character set utf8mb4) engine InnoDB; -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -228,7 +228,7 @@ hex(s1) 413F drop table t1; create table t1 (s1 varchar(10) character set utf8mb4) engine InnoDB; -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -236,7 +236,7 @@ hex(s1) 413F drop table t1; create table t1 (s1 text character set utf8mb4) engine InnoDB; -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -901,8 +901,8 @@ create table t2 engine InnoDB select concat(a,_utf8mb4'') as a, concat(b,_utf8mb show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL, - `b` varchar(15) CHARACTER SET utf8mb4 NOT NULL + `a` varchar(5) CHARACTER SET utf8mb4 DEFAULT NULL, + `b` varchar(15) CHARACTER SET utf8mb4 DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t2; drop table t1; @@ -1126,7 +1126,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL, + `a` varchar(1) CHARACTER SET utf8mb4 DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -1368,6 +1368,7 @@ ERR Имри.Ðфимим.Ðеимимримдмримрмрирор имрим DROP TABLE t1,t2; create table t1 (a char(20) character set utf8mb4) engine InnoDB; insert into t1 values ('123456'),('андрей'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify a char(2) character set utf8mb4; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1848,24 +1849,28 @@ insert into t1 (a) values ('abcdefghijklmnopqrstuvwxyz'); select * from t1; a abcdefghijklmnopqrstuvwxyz +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(20) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmnopqrst +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(15) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmno +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(10) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghij +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(5) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1877,6 +1882,7 @@ create table t1 ( a varchar(4000) not null ) default character set utf8mb4 engine InnoDB; insert into t1 values (repeat('a',4000)); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(3000) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1899,12 +1905,12 @@ char(53647 using utf8mb4) Ñ select char(0xff,0x8f using utf8mb4); char(0xff,0x8f using utf8mb4) - +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: 'FF8F' select convert(char(0xff,0x8f) using utf8mb4); convert(char(0xff,0x8f) using utf8mb4) -?? +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F' set sql_mode=traditional; @@ -2113,12 +2119,12 @@ ERROR HY000: Invalid utf8mb4 character string: 'FF' set sql_mode=default; select hex(char(0xFF using utf8mb4)); hex(char(0xFF using utf8mb4)) - +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: 'FF' select hex(convert(0xFF using utf8mb4)); hex(convert(0xFF using utf8mb4)) -3F +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: '\xFF' select hex(_utf8mb4 0x616263FF); @@ -2280,7 +2286,7 @@ create table t1 (utf8mb4 char(1) character set utf8mb4) engine InnoDB; Testing [F0][90..BF][80..BF][80..BF] insert into t1 values (0xF0908080); insert into t1 values (0xF0BFBFBF); -insert into t1 values (0xF08F8080); +insert ignore into t1 values (0xF08F8080); Warnings: Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1 select hex(utf8mb4) from t1; @@ -2300,7 +2306,7 @@ delete from t1; Testing [F4][80..8F][80..BF][80..BF] insert into t1 values (0xF4808080); insert into t1 values (0xF48F8080); -insert into t1 values (0xF4908080); +insert ignore into t1 values (0xF4908080); Warnings: Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1 select hex(utf8mb4) from t1; @@ -2378,7 +2384,7 @@ INSERT INTO t1 VALUES (119040, x'f09d8480'), (917999, x'f3a087af'); INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480'); INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab'); -INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); +INSERT IGNORE INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); Warnings: Warning 1265 Data truncated for column 'utf8mb4_encoding' at row 1 SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding; @@ -2394,7 +2400,7 @@ u_decimal hex(utf8mb4_encoding) 120735 F09D9E9F 65131 EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9AB 917999 F3A087AF -INSERT INTO t1 VALUES (1114111, x'f5808080'); +INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080'); Warnings: Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1 SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE @@ -2408,14 +2414,14 @@ utf8mb3_encoding VARCHAR(10) NOT NULL ) CHARACTER SET utf8mb3 ENGINE InnoDB; INSERT INTO t2 VALUES (42856, x'ea9da8'); INSERT INTO t2 VALUES (65131, x'efb9ab'); -INSERT INTO t2 VALUES (1114111, x'f48fbfbf'); +INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf'); Warnings: Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1 SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE table_name= 't2' AND column_name= 'utf8mb3_encoding'; character_maximum_length character_octet_length 10 30 -UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; +UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; Warnings: Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1 UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856; @@ -2475,6 +2481,7 @@ SELECT count(*) FROM t1, t2 WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding; count(*) 33 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 CONVERT TO CHARACTER SET utf8; SHOW CREATE TABLE t1; Table Create Table @@ -2615,7 +2622,7 @@ Table Create Table t3 CREATE TEMPORARY TABLE `t3` ( `utf8mb4` varchar(10) CHARACTER SET utf8mb4 NOT NULL, `utf8mb3` varchar(10) CHARACTER SET utf8 NOT NULL, - `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 NOT NULL + `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TEMPORARY TABLE t3; SELECT * FROM t1, t2 WHERE t1.utf8mb4 > t2.utf8mb3; diff --git a/mysql-test/r/ctype_utf8mb4_myisam.result b/mysql-test/r/ctype_utf8mb4_myisam.result index 34145417966..2c798102e50 100644 --- a/mysql-test/r/ctype_utf8mb4_myisam.result +++ b/mysql-test/r/ctype_utf8mb4_myisam.result @@ -157,7 +157,7 @@ drop table t1; set LC_TIME_NAMES='en_US'; set names koi8r; create table t1 (s1 char(1) character set utf8mb4) engine MyISAM; -insert into t1 values (_koi8r'ÁÂ'); +insert ignore into t1 values (_koi8r'ÁÂ'); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select s1,hex(s1),char_length(s1),octet_length(s1) from t1; @@ -165,19 +165,19 @@ s1 hex(s1) char_length(s1) octet_length(s1) Á D0B0 1 2 drop table t1; create table t1 (s1 tinytext character set utf8mb4) engine MyISAM; -insert into t1 select repeat('a',300); +insert ignore into t1 select repeat('a',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',300); +insert ignore into t1 select repeat('Ñ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',300); +insert ignore into t1 select repeat('aÑ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',300); +insert ignore into t1 select repeat('Ña',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',300); +insert ignore into t1 select repeat('ÑÑ',300); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select hex(s1) from t1; @@ -196,19 +196,19 @@ length(s1) char_length(s1) 255 255 drop table t1; create table t1 (s1 text character set utf8mb4) engine MyISAM; -insert into t1 select repeat('a',66000); +insert ignore into t1 select repeat('a',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ñ',66000); +insert ignore into t1 select repeat('Ñ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('aÑ',66000); +insert ignore into t1 select repeat('aÑ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('Ña',66000); +insert ignore into t1 select repeat('Ña',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 -insert into t1 select repeat('ÑÑ',66000); +insert ignore into t1 select repeat('ÑÑ',66000); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select length(s1),char_length(s1) from t1; @@ -220,7 +220,7 @@ length(s1) char_length(s1) 65535 65535 drop table t1; create table t1 (s1 char(10) character set utf8mb4) engine MyISAM; -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -228,7 +228,7 @@ hex(s1) 413F drop table t1; create table t1 (s1 varchar(10) character set utf8mb4) engine MyISAM; -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -236,7 +236,7 @@ hex(s1) 413F drop table t1; create table t1 (s1 text character set utf8mb4) engine MyISAM; -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); Warnings: Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1 select hex(s1) from t1; @@ -901,8 +901,8 @@ create table t2 engine MyISAM select concat(a,_utf8mb4'') as a, concat(b,_utf8mb show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL, - `b` varchar(15) CHARACTER SET utf8mb4 NOT NULL + `a` varchar(5) CHARACTER SET utf8mb4 DEFAULT NULL, + `b` varchar(15) CHARACTER SET utf8mb4 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2; drop table t1; @@ -1126,7 +1126,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL, + `a` varchar(1) CHARACTER SET utf8mb4 DEFAULT NULL, `b` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1); @@ -1368,6 +1368,7 @@ ERR Имри.Ðфимим.Ðеимимримдмримрмрирор имрим DROP TABLE t1,t2; create table t1 (a char(20) character set utf8mb4) engine MyISAM; insert into t1 values ('123456'),('андрей'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify a char(2) character set utf8mb4; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1848,24 +1849,28 @@ insert into t1 (a) values ('abcdefghijklmnopqrstuvwxyz'); select * from t1; a abcdefghijklmnopqrstuvwxyz +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(20) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmnopqrst +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(15) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmno +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(10) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghij +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(5) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1877,6 +1882,7 @@ create table t1 ( a varchar(4000) not null ) default character set utf8mb4 engine MyISAM; insert into t1 values (repeat('a',4000)); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(3000) character set utf8mb4 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -1899,12 +1905,12 @@ char(53647 using utf8mb4) Ñ select char(0xff,0x8f using utf8mb4); char(0xff,0x8f using utf8mb4) - +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: 'FF8F' select convert(char(0xff,0x8f) using utf8mb4); convert(char(0xff,0x8f) using utf8mb4) -?? +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F' set sql_mode=traditional; @@ -2113,12 +2119,12 @@ ERROR HY000: Invalid utf8mb4 character string: 'FF' set sql_mode=default; select hex(char(0xFF using utf8mb4)); hex(char(0xFF using utf8mb4)) - +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: 'FF' select hex(convert(0xFF using utf8mb4)); hex(convert(0xFF using utf8mb4)) -3F +NULL Warnings: Warning 1300 Invalid utf8mb4 character string: '\xFF' select hex(_utf8mb4 0x616263FF); @@ -2280,7 +2286,7 @@ create table t1 (utf8mb4 char(1) character set utf8mb4) engine MyISAM; Testing [F0][90..BF][80..BF][80..BF] insert into t1 values (0xF0908080); insert into t1 values (0xF0BFBFBF); -insert into t1 values (0xF08F8080); +insert ignore into t1 values (0xF08F8080); Warnings: Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1 select hex(utf8mb4) from t1; @@ -2300,7 +2306,7 @@ delete from t1; Testing [F4][80..8F][80..BF][80..BF] insert into t1 values (0xF4808080); insert into t1 values (0xF48F8080); -insert into t1 values (0xF4908080); +insert ignore into t1 values (0xF4908080); Warnings: Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1 select hex(utf8mb4) from t1; @@ -2378,7 +2384,7 @@ INSERT INTO t1 VALUES (119040, x'f09d8480'), (917999, x'f3a087af'); INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480'); INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab'); -INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); +INSERT IGNORE INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); Warnings: Warning 1265 Data truncated for column 'utf8mb4_encoding' at row 1 SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding; @@ -2394,7 +2400,7 @@ u_decimal hex(utf8mb4_encoding) 120735 F09D9E9F 65131 EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9AB 917999 F3A087AF -INSERT INTO t1 VALUES (1114111, x'f5808080'); +INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080'); Warnings: Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1 SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE @@ -2408,14 +2414,14 @@ utf8mb3_encoding VARCHAR(10) NOT NULL ) CHARACTER SET utf8mb3 ENGINE MyISAM; INSERT INTO t2 VALUES (42856, x'ea9da8'); INSERT INTO t2 VALUES (65131, x'efb9ab'); -INSERT INTO t2 VALUES (1114111, x'f48fbfbf'); +INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf'); Warnings: Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1 SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE table_name= 't2' AND column_name= 'utf8mb3_encoding'; character_maximum_length character_octet_length 10 30 -UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; +UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; Warnings: Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1 UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856; @@ -2475,6 +2481,7 @@ SELECT count(*) FROM t1, t2 WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding; count(*) 33 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 CONVERT TO CHARACTER SET utf8; SHOW CREATE TABLE t1; Table Create Table @@ -2615,7 +2622,7 @@ Table Create Table t3 CREATE TEMPORARY TABLE `t3` ( `utf8mb4` varchar(10) CHARACTER SET utf8mb4 NOT NULL, `utf8mb3` varchar(10) CHARACTER SET utf8 NOT NULL, - `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 NOT NULL + `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TEMPORARY TABLE t3; SELECT * FROM t1, t2 WHERE t1.utf8mb4 > t2.utf8mb3; diff --git a/mysql-test/r/ctype_utf8mb4_uca.result b/mysql-test/r/ctype_utf8mb4_uca.result index c03aaef387a..ca7f1a3d7d4 100644 --- a/mysql-test/r/ctype_utf8mb4_uca.result +++ b/mysql-test/r/ctype_utf8mb4_uca.result @@ -2752,7 +2752,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `s1` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_myanmar_ci NOT NULL, + `s1` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_myanmar_ci DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 (s1) VALUES @@ -5338,7 +5338,7 @@ CREATE TABLE t1 AS SELECT SPACE(3) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 NOT NULL + `a` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (SPACE(0)),(SPACE(1)),(SPACE(2)); SELECT HEX(a), HEX(WEIGHT_STRING(a AS CHAR(8))) FROM t1; @@ -5371,7 +5371,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES (_ucs2 0x3400); INSERT INTO t1 VALUES (_ucs2 0xF001); @@ -5384,7 +5384,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('A'),('À'),('Ã'),('Â'),('Ã'),('Ä'),('Ã…'); SELECT a, HEX(WEIGHT_STRING(a LEVEL 2)) FROM t1 ORDER BY a; @@ -5443,7 +5443,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 NOT NULL + `a` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('cota'),('cote'),('cotz'); INSERT INTO t1 VALUES ('coté'),('côte'),('côté'),('cotë'),('côtë'); diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result index dc7a33d6b9c..39202f5eabb 100644 --- a/mysql-test/r/default.result +++ b/mysql-test/r/default.result @@ -107,11 +107,11 @@ a b c d e f g h i j k l m n o p q r s t u v w x y z a1 b1 drop table t1; drop table t2; create table bug20691 (i int, d datetime NOT NULL, dn datetime not null default '0000-00-00 00:00:00'); -insert into bug20691 values (1, DEFAULT, DEFAULT), (1, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (1, DEFAULT, DEFAULT); +insert ignore into bug20691 values (1, DEFAULT, DEFAULT), (1, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (1, DEFAULT, DEFAULT); Warnings: Warning 1364 Field 'd' doesn't have a default value Warning 1364 Field 'd' doesn't have a default value -insert into bug20691 (i) values (2); +insert ignore into bug20691 (i) values (2); Warnings: Warning 1364 Field 'd' doesn't have a default value desc bug20691; @@ -119,14 +119,14 @@ Field Type Null Key Default Extra i int(11) YES NULL d datetime NO NULL dn datetime NO 0000-00-00 00:00:00 -insert into bug20691 values (3, DEFAULT, DEFAULT), (3, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (3, DEFAULT, DEFAULT); +insert ignore into bug20691 values (3, DEFAULT, DEFAULT), (3, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (3, DEFAULT, DEFAULT); Warnings: Warning 1364 Field 'd' doesn't have a default value Warning 1364 Field 'd' doesn't have a default value -insert into bug20691 (i) values (4); +insert ignore into bug20691 (i) values (4); Warnings: Warning 1364 Field 'd' doesn't have a default value -insert into bug20691 values (5, DEFAULT, DEFAULT), (5, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (5, DEFAULT, DEFAULT); +insert ignore into bug20691 values (5, DEFAULT, DEFAULT), (5, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (5, DEFAULT, DEFAULT); Warnings: Warning 1364 Field 'd' doesn't have a default value Warning 1364 Field 'd' doesn't have a default value @@ -480,6 +480,10 @@ a b 2 2 3 4 drop table t1; +CREATE OR REPLACE TABLE t1 (a INT DEFAULT @v); +drop table t1; +CREATE TABLE t1 (a INT DEFAULT @v:=1); +drop table t1; # # Error handling # @@ -516,10 +520,6 @@ CREATE TABLE t1 (a INT DEFAULT(?)); Got one of the listed errors CREATE TABLE t1 (a INT DEFAULT (b), b INT DEFAULT(a)); ERROR 01000: Expression for field `a` is refering to uninitialized field `b` -CREATE TABLE t1 (a INT DEFAULT @v); -ERROR HY000: Function or expression '@v' cannot be used in the DEFAULT clause of `a` -CREATE TABLE t1 (a INT DEFAULT @v:=1); -ERROR HY000: Function or expression '@v' cannot be used in the DEFAULT clause of `a` CREATE TABLE t1 (a INT DEFAULT(NAME_CONST('xxx', 'yyy')); ERROR HY000: Function or expression 'name_const()' cannot be used in the DEFAULT clause of `a` CREATE TABLE t1 (a INT DEFAULT COUNT(*)); @@ -1054,7 +1054,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` decimal(30,6) DEFAULT coalesce(curtime(6)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES(); +INSERT IGNORE INTO t1 VALUES(); Warnings: Warning 1265 Data truncated for column 'a' at row 1 DROP TABLE t1; @@ -1067,7 +1067,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` decimal(30,6) DEFAULT coalesce(curdate()) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES(); +INSERT IGNORE INTO t1 VALUES(); Warnings: Warning 1265 Data truncated for column 'a' at row 1 DROP TABLE t1; @@ -1123,7 +1123,7 @@ t1 CREATE TABLE `t1` ( `a` decimal(30,0) DEFAULT current_timestamp(6), `b` decimal(30,0) DEFAULT coalesce(current_timestamp(6)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES (); +INSERT IGNORE INTO t1 VALUES (); Warnings: Note 1265 Data truncated for column 'a' at row 1 Warning 1265 Data truncated for column 'b' at row 1 @@ -1553,7 +1553,7 @@ t1 CREATE TABLE `t1` ( `s` int(11) DEFAULT NULL, `b` timestamp(6) NOT NULL DEFAULT sysdate(6) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES (DEFAULT, SLEEP(0.1), DEFAULT); +INSERT INTO t1 VALUES (DEFAULT(a), SLEEP(0.1), DEFAULT(b)); SELECT b>a FROM t1; b>a 1 @@ -2181,7 +2181,7 @@ t1 CREATE TABLE `t1` ( `b` varchar(10) DEFAULT (cast(`a` as char(10) charset latin1)), `c` varchar(10) DEFAULT (cast(`a` as char(4) charset latin1)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -INSERT INTO t1 (a) VALUES (123.456); +INSERT IGNORE INTO t1 (a) VALUES (123.456); Warnings: Warning 1292 Truncated incorrect CHAR(4) value: '123.456' SELECT * FROM t1; @@ -2195,7 +2195,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` int(10) unsigned DEFAULT (cast(`a` as unsigned)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -INSERT INTO t1 (a) VALUES (-1); +INSERT IGNORE INTO t1 (a) VALUES (-1); Warnings: Note 1105 Cast to unsigned converted negative integer to it's positive complement Warning 1264 Out of range value for column 'b' at row 1 @@ -2644,7 +2644,7 @@ t1 CREATE TABLE `t1` ( `number_of_bits` int(11) DEFAULT NULL, `x` varchar(30) DEFAULT export_set(`bits`,`v_on`,`v_off`,`v_separator`,`number_of_bits`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES (0x50006,'Y','N','',64,DEFAULT); +INSERT IGNORE INTO t1 VALUES (0x50006,'Y','N','',64,DEFAULT); Warnings: Warning 1265 Data truncated for column 'x' at row 1 SELECT * FROM t1; @@ -3278,7 +3278,44 @@ INSERT INTO t1 VALUES (1),(2),(3); EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING DEFAULT,DEFAULT; ERROR HY000: Default/ignore value is not supported for such parameter usage DROP TABLE t1; -# end of 10.2 test +# +# MDEV-11134 Assertion `fixed' failed in Item::const_charset_converter(THD*, CHARSET_INFO*, bool, const char*) +# +SET NAMES utf8; +PREPARE stmt FROM "CREATE OR REPLACE TABLE t1 (c CHAR(8) DEFAULT ?)"; +SET @a=''; +EXECUTE stmt USING @a; +EXECUTE stmt USING @a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(8) DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET @a='A'; +EXECUTE stmt USING @a; +EXECUTE stmt USING @a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(8) DEFAULT 'A' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET @a=_utf8 0xC380; +EXECUTE stmt USING @a; +EXECUTE stmt USING @a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(8) DEFAULT 'À' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET @a=_utf8 0xD18F; +EXECUTE stmt USING @a; +ERROR 42000: Invalid default value for 'c' +EXECUTE stmt USING @a; +ERROR 42000: Invalid default value for 'c' +DEALLOCATE PREPARE stmt; set sql_mode=ansi_quotes; create table t1 (a int, b int default (a+1)); show create table t1; @@ -3311,3 +3348,20 @@ a b 30 31 drop table t1; set sql_mode=default; +create table t1 (a int default b, b int default 4, t text); +insert into t1 (b, t) values (5, '1 column is omitted'); +insert into t1 values (default, 5, '2 column gets DEFAULT, keyword'); +insert into t1 values (default(a), 5, '3 column gets DEFAULT(a), expression'); +insert into t1 values (default(a)+0, 5, '4 also expression DEFAULT(0)+0'); +insert into t1 values (b, 5, '5 the value of the DEFAULT(a), that is b'); +select * from t1 order by t; +a b t +5 5 1 column is omitted +5 5 2 column gets DEFAULT, keyword +4 5 3 column gets DEFAULT(a), expression +4 5 4 also expression DEFAULT(0)+0 +4 5 5 the value of the DEFAULT(a), that is b +drop table t1; +create table t1 (col1 int default(-(default(col1)))); +ERROR 01000: Expression for field `col1` is refering to uninitialized field `col1` +# end of 10.2 test diff --git a/mysql-test/r/default_debug.result b/mysql-test/r/default_debug.result new file mode 100644 index 00000000000..3f5b0b7896c --- /dev/null +++ b/mysql-test/r/default_debug.result @@ -0,0 +1,21 @@ +create table t1 (a int, b int default (a+1)); +insert t1 values (1,10), (2,20), (3,30); +connect con1, localhost, root; +select a,b,default(b) from t1; +a b default(b) +1 10 2 +2 20 3 +3 30 4 +set debug_sync='after_Item_default_value_calculate WAIT_FOR go'; +select a,b,default(b) from t1; +connection default; +set debug_sync='ha_write_row_start SIGNAL go'; +insert t1 values (100,default(b)); +connection con1; +a b default(b) +1 10 2 +2 20 3 +3 30 4 +connection default; +drop table t1; +set debug_sync='RESET'; diff --git a/mysql-test/r/default_session.result b/mysql-test/r/default_session.result index b00bf27dcf3..6c0bcad0cb3 100644 --- a/mysql-test/r/default_session.result +++ b/mysql-test/r/default_session.result @@ -89,6 +89,6 @@ insert t1 () values (); set sql_mode=default; select * from t1; a -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI drop table t1; diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result index 251ee4ab947..ed3683d52f9 100644 --- a/mysql-test/r/delete.result +++ b/mysql-test/r/delete.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Sort aborted.*"); drop table if exists t1,t2,t3,t11,t12; CREATE TABLE t1 (a tinyint(3), b tinyint(5)); INSERT INTO t1 VALUES (1,1); diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 9e550284163..d0ac61493c2 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -1064,3 +1064,37 @@ DROP TABLE t1; # # End of 10.1 tests # +# +# MDEV-10554: Assertion `!derived->first_select()-> +# exclude_from_table_unique_test || derived->outer_select()-> +# exclude_from_table_unique_test' +# failed in TABLE_LIST::set_check_merged() +# +CREATE TABLE t1 (f INT); +CREATE ALGORITHM = TEMPTABLE VIEW v1 AS SELECT * FROM ( SELECT * FROM t1 ) AS sq; +PREPARE stmt FROM 'SELECT * FROM v1'; +EXECUTE stmt; +f +EXECUTE stmt; +f +drop view v1; +drop table t1; +# +# MDEV-11363: Assertion `!derived->first_sel ect()->first_inner_unit() || +# derived->first_select()->first_inner_unit()->first_select()-> +# exclude_from_table_unique_test' failed in +# TABLE_LIST::set_check_materialized() +# +CREATE TABLE t1 (f1 INT); +CREATE TABLE t2 (f2 INT); +CREATE TABLE t3 (f3 INT); +CREATE VIEW v1 AS ( SELECT f1 AS f FROM t1 ) UNION ( SELECT f2 AS f FROM t2 ); +CREATE VIEW v2 AS SELECT f3 AS f FROM t3; +CREATE VIEW v3 AS SELECT f FROM ( SELECT f3 AS f FROM v1, t3 ) AS sq; +CREATE VIEW v4 AS SELECT COUNT(*) as f FROM v3; +REPLACE INTO v2 ( SELECT * FROM v4 ) UNION ( SELECT f FROM v2 ); +drop view v1,v2,v3,v4; +drop table t1,t2,t3; +# +# End of 10.2 tests +# diff --git a/mysql-test/r/derived_cond_pushdown.result b/mysql-test/r/derived_cond_pushdown.result index 0be577a9f64..fd58ee038c7 100644 --- a/mysql-test/r/derived_cond_pushdown.result +++ b/mysql-test/r/derived_cond_pushdown.result @@ -8241,3 +8241,112 @@ SELECT * FROM v1 WHERE v1.d IN ( SELECT MIN(d) FROM t2 WHERE 0 ); d DROP VIEW v1; DROP TABLE t1,t2; +# +# MDEV-11820: second execution of PS for query +# with false subquery predicate in WHERE +# +CREATE TABLE t1 (c VARCHAR(3)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('foo'),('bar'); +CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; +CREATE TABLE t2 (a INT); +INSERT INTO t2 VALUES (3), (4); +PREPARE stmt1 FROM +" SELECT * FROM v1 WHERE 1 IN (SELECT a FROM t2) OR c = 'foo'"; +PREPARE stmt2 FROM +"EXPLAIN FORMAT=JSON + SELECT * FROM v1 WHERE 1 IN (SELECT a FROM t2) OR c = 'foo'"; +EXECUTE stmt1; +c +foo +EXECUTE stmt2; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "v1.c = 'foo'", + "materialized": { + "query_block": { + "select_id": 3, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t1.c = 'foo'" + } + } + } + }, + "subqueries": [ + { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "1 = t2.a" + } + } + } + ] + } +} +INSERT INTO t2 SELECT a+1 FROM t2; +INSERT INTO t2 SELECT a+1 FROM t2; +INSERT INTO t2 SELECT a+1 FROM t2; +INSERT INTO t2 SELECT a+1 FROM t2; +INSERT INTO t2 SELECT a+1 FROM t2; +INSERT INTO t2 SELECT a+1 FROM t2; +EXECUTE stmt1; +c +foo +EXECUTE stmt2; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "(1,(subquery#2)) or v1.c = 'foo'", + "materialized": { + "query_block": { + "select_id": 3, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + } + } + } + }, + "subqueries": [ + { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 128, + "filtered": 100, + "attached_condition": "1 = t2.a" + } + } + } + ] + } +} +DEALLOCATE PREPARE stmt1; +DEALLOCATE PREPARE stmt2; +DROP VIEW v1; +DROP TABLE t1,t2; diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result index 07fa646d558..cf3e738395a 100644 --- a/mysql-test/r/errors.result +++ b/mysql-test/r/errors.result @@ -32,6 +32,8 @@ set sql_mode=default; CREATE TABLE t1 (a INT); SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); a +Warnings: +Warning 1365 Division by 0 INSERT INTO t1 VALUES(1); SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); a @@ -40,6 +42,8 @@ INSERT INTO t1 VALUES(2),(3); SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); a 1 +Warnings: +Warning 1365 Division by 0 DROP TABLE t1; CREATE TABLE t1( a INT ); SELECT b FROM t1; diff --git a/mysql-test/r/events_slowlog.result b/mysql-test/r/events_slowlog.result new file mode 100644 index 00000000000..7de5925bc0f --- /dev/null +++ b/mysql-test/r/events_slowlog.result @@ -0,0 +1,13 @@ +set @event_scheduler_save= @@global.event_scheduler; +set @slow_query_log_save= @@global.slow_query_log; +set global event_scheduler= on; +set global slow_query_log= on; +set global long_query_time=0.2; +create table t1 (i int); +insert into t1 values (0); +create event ev on schedule at CURRENT_TIMESTAMP + INTERVAL 1 second do update t1 set i=1+sleep(0.5); +FOUND /update t1 set i=1/ in mysqld-slow.log +drop table t1; +set global event_scheduler= @event_scheduler_save; +set global slow_query_log= @slow_query_log_save; +set global long_query_time= @@session.long_query_time; diff --git a/mysql-test/r/failed_auth_3909.result b/mysql-test/r/failed_auth_3909.result index 8b41ef4618a..d0fd2c41221 100644 --- a/mysql-test/r/failed_auth_3909.result +++ b/mysql-test/r/failed_auth_3909.result @@ -1,7 +1,7 @@ optimize table mysql.user; Table Op Msg_type Msg_text mysql.user optimize status OK -insert mysql.user (user,plugin) values ('foo','bar'),('bar','bar'),('baz','bar'); +insert ignore mysql.user (user,plugin) values ('foo','bar'),('bar','bar'),('baz','bar'); Warnings: Warning 1364 Field 'ssl_cipher' doesn't have a default value Warning 1364 Field 'x509_issuer' doesn't have a default value diff --git a/mysql-test/r/filesort_debug.result b/mysql-test/r/filesort_debug.result index 3eced35d58b..4aa40592be7 100644 --- a/mysql-test/r/filesort_debug.result +++ b/mysql-test/r/filesort_debug.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Sort aborted.*"); SET @old_debug= @@session.debug; # # Bug#36022 please log more information about "Sort aborted" queries diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index a81faeebaf2..7ee5a68ca90 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -379,6 +379,7 @@ t collation(t) SELECT t, collation(t),FORMAT(MATCH t AGAINST ('Osnabruck'),6) FROM t1 WHERE MATCH t AGAINST ('Osnabruck'); t collation(t) FORMAT(MATCH t AGAINST ('Osnabruck'),6) aus Osnabrück utf8_general_ci 1.591140 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify t varchar(200) collate latin1_german2_ci not null; Warnings: Warning 1366 Incorrect string value: '\xD0\xAD\xD1\x82\xD0\xBE...' for column 't' at row 3 diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 17d0baa0f01..0c3d649a6bb 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -810,7 +810,7 @@ LENGTH( GROUP_CONCAT( DISTINCT a ) ) CREATE TABLE t3( a TEXT, b INT ); INSERT INTO t3 VALUES( REPEAT( 'a', 65534 ), 1 ); INSERT INTO t3 VALUES( REPEAT( 'a', 65535 ), 2 ); -INSERT INTO t3 VALUES( REPEAT( 'a', 65536 ), 3 ); +INSERT IGNORE INTO t3 VALUES( REPEAT( 'a', 65536 ), 3 ); Warnings: Warning 1265 Data truncated for column 'a' at row 1 SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 1; @@ -834,7 +834,7 @@ id group_concat(b.name) 2 óra,óra drop table t1; create table t1(a bit not null); -insert into t1 values (), (), (); +insert ignore into t1 values (), (), (); Warnings: Warning 1364 Field 'a' doesn't have a default value select group_concat(distinct a) from t1; @@ -1164,7 +1164,7 @@ t2 CREATE TABLE `t2` ( `GROUP_CONCAT(UPPER(f1) ORDER BY f2)` mediumtext DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -SET group_concat_max_len= DEFAULT; +SET group_concat_max_len= 1024; SELECT LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) FROM t1; LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) 1024 diff --git a/mysql-test/r/func_hybrid_type.result b/mysql-test/r/func_hybrid_type.result index 746bc55ef85..324db452f9b 100644 --- a/mysql-test/r/func_hybrid_type.result +++ b/mysql-test/r/func_hybrid_type.result @@ -209,6 +209,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` int(10) unsigned DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -416,6 +417,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -623,6 +625,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` bigint(20) unsigned DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -830,6 +833,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` bigint(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -1006,6 +1010,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` int(8) unsigned DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -1182,6 +1187,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` int(8) unsigned DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -1358,6 +1364,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` int(8) unsigned DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -1534,6 +1541,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` int(6) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -1710,6 +1718,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -1886,6 +1895,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` int(4) unsigned DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -2062,6 +2072,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` int(4) unsigned DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -2239,6 +2250,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` time DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -2417,6 +2429,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` time DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -2595,6 +2608,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` time DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -2773,6 +2787,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` date DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, @@ -2965,6 +2980,7 @@ t2 CREATE TABLE `t2` ( `greatest_b_b` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b, diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index aaf1d981e59..d18681bc80d 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -487,6 +487,8 @@ CREATE TABLE t1 (id int not null); INSERT INTO t1 VALUES (1),(2); SELECT id FROM t1 WHERE id IN(4564, (SELECT IF(1=0,1,1/0)) ); id +Warnings: +Warning 1365 Division by 0 DROP TABLE t1; End of 5.0 tests create table t1(f1 char(1)); @@ -627,9 +629,9 @@ c_char CHAR(10) NOT NULL, INDEX(c_int), INDEX(c_decimal), INDEX(c_float), INDEX(c_bit), INDEX(c_date), INDEX(c_datetime), INDEX(c_timestamp), INDEX(c_time), INDEX(c_year), INDEX(c_char)); -INSERT INTO t1 (c_int) VALUES (1), (2), (3), (4), (5); -INSERT INTO t1 (c_int) SELECT 0 FROM t1; -INSERT INTO t1 (c_int) SELECT 0 FROM t1; +INSERT IGNORE INTO t1 (c_int) VALUES (1), (2), (3), (4), (5); +INSERT IGNORE INTO t1 (c_int) SELECT 0 FROM t1; +INSERT IGNORE INTO t1 (c_int) SELECT 0 FROM t1; EXPLAIN SELECT * FROM t1 WHERE c_int IN (1, 2, 3); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range c_int c_int 4 NULL 3 Using index condition diff --git a/mysql-test/r/func_json.result b/mysql-test/r/func_json.result index 6c1987cc3e7..91640974b22 100644 --- a/mysql-test/r/func_json.result +++ b/mysql-test/r/func_json.result @@ -57,7 +57,7 @@ json_array_append('["a", "b"]', '$', FALSE) ["a", "b", false] select json_array_append('{"k1":1, "k2":["a", "b"]}', '$.k2', 2); json_array_append('{"k1":1, "k2":["a", "b"]}', '$.k2', 2) -{"k1":1, "k2":["a", "b", 2]} +{"k1": 1, "k2": ["a", "b", 2]} select json_array_append('["a", ["b", "c"], "d"]', '$[0]', 2); json_array_append('["a", ["b", "c"], "d"]', '$[0]', 2) [["a", 2], ["b", "c"], "d"] @@ -190,10 +190,10 @@ json_extract('{"key1":"asd", "key2":[2,3]}', "$.keyX", "$.keyY") NULL select json_extract('{"key1":"asd", "key2":[2,3]}', "$.key1", "$.key2"); json_extract('{"key1":"asd", "key2":[2,3]}', "$.key1", "$.key2") -["asd", [2,3]] +["asd", [2, 3]] select json_extract('{"key1":5, "key2":[2,3]}', "$.key1", "$.key2"); json_extract('{"key1":5, "key2":[2,3]}', "$.key1", "$.key2") -[5, [2,3]] +[5, [2, 3]] select json_extract('{"key0":true, "key1":"qwe"}', "$.key1"); json_extract('{"key0":true, "key1":"qwe"}', "$.key1") "qwe" @@ -205,38 +205,44 @@ json_extract('[10, 20, [30, 40]]', '$[2][*]') [30, 40] select json_extract('[10, 20, [{"a":3}, 30, 40]]', '$[2][*]'); json_extract('[10, 20, [{"a":3}, 30, 40]]', '$[2][*]') -[{"a":3}, 30, 40] +[{"a": 3}, 30, 40] select json_extract('1', '$'); json_extract('1', '$') 1 select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]'); json_extract('[10, 20, [30, 40], 1, 10]', '$[1]') 20 +select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]', '$[25]'); +json_extract('[10, 20, [30, 40], 1, 10]', '$[1]', '$[25]') +[20] +select json_extract( '[{"a": [3, 4]}, {"b": 2}]', '$[0].a', '$[1].a'); +json_extract( '[{"a": [3, 4]}, {"b": 2}]', '$[0].a', '$[1].a') +[[3, 4]] select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.k1', 'word'); json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.k1', 'word') -{"a":1, "b":{"c":1, "k1":"word"}, "d":[1, 2]} +{"a": 1, "b": {"c": 1, "k1": "word"}, "d": [1, 2]} select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.d[3]', 3); json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.d[3]', 3) -{"a":1, "b":{"c":1}, "d":[1, 2, 3]} +{"a": 1, "b": {"c": 1}, "d": [1, 2, 3]} select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.a[2]', 2); json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.a[2]', 2) -{"a":[1, 2], "b":{"c":1}, "d":[1, 2]} +{"a": [1, 2], "b": {"c": 1}, "d": [1, 2]} select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.c', 'word'); json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.c', 'word') -{"a":1, "b":{"c":1}, "d":[1, 2]} +{"a": 1, "b": {"c": 1}, "d": [1, 2]} select json_set('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.c', '[true, false]'); json_set('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.c', '[true, false]') -{ "a": 10, "b": [2, 3], "c":"[true, false]"} +{"a": 10, "b": [2, 3], "c": "[true, false]"} select json_replace('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.c', '[true, false]'); json_replace('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.c', '[true, false]') -{ "a": 10, "b": [2, 3]} +{"a": 10, "b": [2, 3]} select json_replace('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.b', '[true, false]'); json_replace('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.b', '[true, false]') -{ "a": 10, "b": "[true, false]"} +{"a": 10, "b": "[true, false]"} set @j = '["a", ["b", "c"], "d"]'; select json_remove(@j, '$[0]'); json_remove(@j, '$[0]') -[ ["b", "c"], "d"] +[["b", "c"], "d"] select json_remove(@j, '$[1]'); json_remove(@j, '$[1]') ["a", "d"] @@ -260,7 +266,7 @@ create table t1 as select json_object('id', 87, 'name', 'carrot') as f; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `f` varchar(32) NOT NULL + `f` varchar(32) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t1; f @@ -285,7 +291,7 @@ json_quote('foo') show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `json_quote('foo')` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL + `json_quote('foo')` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select json_merge('string'); @@ -317,7 +323,7 @@ Warnings: Warning 4038 Syntax error in JSON text in argument 1 to function 'json_merge' at position 1 select json_merge('{"a":"b"}','{"c":"d"}'); json_merge('{"a":"b"}','{"c":"d"}') -{"a":"b", "c":"d"} +{"a": "b", "c": "d"} SELECT JSON_MERGE('[1, 2]', '{"id": 47}'); JSON_MERGE('[1, 2]', '{"id": 47}') [1, 2, {"id": 47}] @@ -396,14 +402,14 @@ json_object("a", json_object("b", "abcd")) select json_object("a", '{"b": "abcd"}'); json_object("a", '{"b": "abcd"}') {"a": "{\"b\": \"abcd\"}"} -select json_object("a", cast('{"b": "abcd"}' as json)); -json_object("a", cast('{"b": "abcd"}' as json)) +select json_object("a", json_compact('{"b": "abcd"}')); +json_object("a", json_compact('{"b": "abcd"}')) {"a": {"b": "abcd"}} -select cast(NULL AS JSON); -cast(NULL AS JSON) +select json_compact(NULL); +json_compact(NULL) NULL -select json_depth(cast(NULL as JSON)); -json_depth(cast(NULL as JSON)) +select json_depth(json_compact(NULL)); +json_depth(json_compact(NULL)) NULL select json_depth('[[], {}]'); json_depth('[[], {}]') @@ -438,3 +444,148 @@ json CREATE TABLE `json` ( `j` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table json; +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2]' ); +json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2]' ) +1 +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0]' ); +json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0]' ) +1 +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0][0]' ); +json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0][0]' ) +1 +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0][0][0]' ); +json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0][0][0]' ) +1 +select json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2]' ); +json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2]' ) +2 +select json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0]' ); +json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0]' ) +2 +select json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0][0]' ); +json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0][0]' ) +2 +select json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0][0][0]' ); +json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0][0][0]' ) +2 +select json_length( '{"a":{"b":{"d":1}}, "a":{"c":{"d":1, "j":2}}}', '$.a[0][0][0].c' ); +json_length( '{"a":{"b":{"d":1}}, "a":{"c":{"d":1, "j":2}}}', '$.a[0][0][0].c' ) +2 +select json_set('1', '$[0]', 100); +json_set('1', '$[0]', 100) +100 +select json_set('1', '$[0][0]', 100); +json_set('1', '$[0][0]', 100) +100 +select json_set('1', '$[1]', 100); +json_set('1', '$[1]', 100) +[1, 100] +select json_set('{"a":12}', '$[0]', 100); +json_set('{"a":12}', '$[0]', 100) +100 +select json_set('{"a":12}', '$[0].a', 100); +json_set('{"a":12}', '$[0].a', 100) +{"a": 100} +select json_set('{"a":12}', '$[0][0].a', 100); +json_set('{"a":12}', '$[0][0].a', 100) +{"a": 100} +select json_set('{"a":12}', '$[0][1].a', 100); +json_set('{"a":12}', '$[0][1].a', 100) +{"a": 12} +select json_value('{"\\"key1":123}', '$."\\"key1"'); +json_value('{"\\"key1":123}', '$."\\"key1"') +123 +select json_value('{"\\"key1\\"":123}', '$."\\"key1\\""'); +json_value('{"\\"key1\\"":123}', '$."\\"key1\\""') +123 +select json_value('{"key 1":123}', '$."key 1"'); +json_value('{"key 1":123}', '$."key 1"') +123 +select json_contains_path('{"a":[{"c":[1,{"a":[0,1,2]},3]}], "b":[1,2,3]}', 'one', "$**.a[2]"); +json_contains_path('{"a":[{"c":[1,{"a":[0,1,2]},3]}], "b":[1,2,3]}', 'one', "$**.a[2]") +1 +select json_contains_path('{"a":[{"c":[1,{"a":[0,1,2]},3]}], "b":[1,2,3]}', 'one', "$**.a[3]"); +json_contains_path('{"a":[{"c":[1,{"a":[0,1,2]},3]}], "b":[1,2,3]}', 'one', "$**.a[3]") +0 +select json_extract( '[1]', '$[0][0]' ); +json_extract( '[1]', '$[0][0]' ) +1 +select json_extract( '[1]', '$[1][0]' ); +json_extract( '[1]', '$[1][0]' ) +NULL +select json_extract( '[1]', '$**[0]' ); +json_extract( '[1]', '$**[0]' ) +[1] +select json_extract( '[1]', '$**[0][0]' ); +json_extract( '[1]', '$**[0][0]' ) +[1] +select json_insert('1', '$[0]', 4); +json_insert('1', '$[0]', 4) +1 +select json_replace('1', '$[0]', 4); +json_replace('1', '$[0]', 4) +4 +select json_set('1', '$[0]', 4); +json_set('1', '$[0]', 4) +4 +select json_set('1', '$[1]', 4); +json_set('1', '$[1]', 4) +[1, 4] +select json_replace('1', '$[1]', 4); +json_replace('1', '$[1]', 4) +1 +SELECT json_insert('[]', '$[0][0]', 100); +json_insert('[]', '$[0][0]', 100) +[] +SELECT json_insert('1', '$[0][0]', 100); +json_insert('1', '$[0][0]', 100) +1 +SELECT json_replace('1', '$[0][0]', 100); +json_replace('1', '$[0][0]', 100) +100 +SELECT json_replace('[]', '$[0][0]', 100); +json_replace('[]', '$[0][0]', 100) +[] +SELECT json_set('[]', '$[0][0]', 100); +json_set('[]', '$[0][0]', 100) +[] +SELECT json_set('[]', '$[0][0][0]', 100); +json_set('[]', '$[0][0][0]', 100) +[] +SELECT JSON_search( '{"": "a"}', "one", 'a'); +JSON_search( '{"": "a"}', "one", 'a') +"$." +select json_merge('{"a":"b"}', '{"a":"c"}') ; +json_merge('{"a":"b"}', '{"a":"c"}') +{"a": ["b", "c"]} +select json_merge('{"a":{"x":"b"}}', '{"a":"c"}') ; +json_merge('{"a":{"x":"b"}}', '{"a":"c"}') +{"a": [{"x": "b"}, "c"]} +select json_merge('{"a":{"u":12, "x":"b"}}', '{"a":{"x":"c"}}') ; +json_merge('{"a":{"u":12, "x":"b"}}', '{"a":{"x":"c"}}') +{"a": {"u": 12, "x": ["b", "c"]}} +select json_merge('{"a":{"u":12, "x":"b", "r":1}}', '{"a":{"x":"c", "r":2}}') ; +json_merge('{"a":{"u":12, "x":"b", "r":1}}', '{"a":{"x":"c", "r":2}}') +{"a": {"u": 12, "x": ["b", "c"], "r": [1, 2]}} +select json_compact('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}'); +json_compact('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}') +{"a":1,"b":[1,2,3],"c":{"aa":"v1","bb":"v2"}} +select json_loose('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}'); +json_loose('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}') +{"a": 1, "b": [1, 2, 3], "c": {"aa": "v1", "bb": "v2"}} +select json_detailed('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}'); +json_detailed('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}') +{ + "a": 1, + "b": + [ + 1, + 2, + 3 + ], + "c": + { + "aa": "v1", + "bb": "v2" + } +} diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result index 0a309bcfab6..0ba8e41f164 100644 --- a/mysql-test/r/func_like.result +++ b/mysql-test/r/func_like.result @@ -175,7 +175,7 @@ End of 4.1 tests # CREATE TABLE t1(a SET('a') NOT NULL, UNIQUE KEY(a)); CREATE TABLE t2(b INT PRIMARY KEY); -INSERT INTO t1 VALUES (); +INSERT IGNORE INTO t1 VALUES (); Warnings: Warning 1364 Field 'a' doesn't have a default value INSERT INTO t2 VALUES (1), (2), (3); diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index f02776d4448..8ca10203add 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -45,6 +45,10 @@ Note 1003 select abs(-10) AS `abs(-10)`,sign(-5) AS `sign(-5)`,sign(5) AS `sign( select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2); log(exp(10)) exp(log(sqrt(10))*2) log(-1) log(NULL) log(1,1) log(3,9) log(-1,2) log(NULL,2) 10 10.000000000000002 NULL NULL NULL 2 NULL NULL +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 explain extended select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used @@ -53,6 +57,9 @@ Note 1003 select log(exp(10)) AS `log(exp(10))`,exp(log(sqrt(10)) * 2) AS `exp(l select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL); ln(exp(10)) exp(ln(sqrt(10))*2) ln(-1) ln(0) ln(NULL) 10 10.000000000000002 NULL NULL NULL +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 explain extended select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used @@ -61,6 +68,9 @@ Note 1003 select ln(exp(10)) AS `ln(exp(10))`,exp(ln(sqrt(10)) * 2) AS `exp(ln(s select log2(8),log2(15),log2(-2),log2(0),log2(NULL); log2(8) log2(15) log2(-2) log2(0) log2(NULL) 3 3.9068905956085187 NULL NULL NULL +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 explain extended select log2(8),log2(15),log2(-2),log2(0),log2(NULL); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used @@ -69,6 +79,9 @@ Note 1003 select log2(8) AS `log2(8)`,log2(15) AS `log2(15)`,log2(-2) AS `log2(- select log10(100),log10(18),log10(-4),log10(0),log10(NULL); log10(100) log10(18) log10(-4) log10(0) log10(NULL) 2 1.255272505103306 NULL NULL NULL +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used @@ -688,6 +701,8 @@ ERROR 22003: DECIMAL value is out of range in '@`a` / 0.5' SELECT COT(1/0); COT(1/0) NULL +Warnings: +Warning 1365 Division by 0 SELECT -1 + 9223372036854775808; -1 + 9223372036854775808 9223372036854775807 @@ -697,6 +712,9 @@ SELECT 2 DIV -2; SELECT -(1 DIV 0); -(1 DIV 0) NULL +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 SELECT -9223372036854775808 MOD -1; -9223372036854775808 MOD -1 0 @@ -715,7 +733,7 @@ Warning 1292 Truncated incorrect DOUBLE value: '179,769,313,486,231,570,000,000, # my_gcvt: Assertion `width > 0 && to != ((void *)0)' failed # CREATE TABLE t1(a char(0)); -INSERT INTO t1 (SELECT -pi()); +INSERT IGNORE INTO t1 (SELECT -pi()); Warnings: Warning 1265 Data truncated for column 'a' at row 1 DROP TABLE t1; @@ -728,6 +746,7 @@ SELECT ((@a:=@b:=1.0) div (@b:=@a:=get_format(datetime, 'usa'))); NULL Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL +Warning 1365 Division by 0 # # Bug #59498 div function broken in mysql-trunk # @@ -767,6 +786,8 @@ foo select 999999999999999999999999999999999999999999999999999999999999999999999999999999999 % 0.0 as foo; foo NULL +Warnings: +Warning 1365 Division by 0 # # Bug#12711164 - 61676: # RESULT OF DIV WITH DECIMAL AND INTEGER DOES NOT MAKE SENSE diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 10423a4b105..bbc7f1a0a0a 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -107,8 +107,8 @@ create table t1 as select uuid(), length(uuid()); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `uuid()` varchar(36) CHARACTER SET utf8 NOT NULL, - `length(uuid())` int(10) NOT NULL + `uuid()` varchar(36) CHARACTER SET utf8 DEFAULT NULL, + `length(uuid())` int(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 select INET_ATON('255.255.0.1') as `a`; diff --git a/mysql-test/r/func_regexp_pcre.result b/mysql-test/r/func_regexp_pcre.result index fcff0484b65..18aa7ed8379 100644 --- a/mysql-test/r/func_regexp_pcre.result +++ b/mysql-test/r/func_regexp_pcre.result @@ -436,7 +436,7 @@ CREATE TABLE t1 AS SELECT REGEXP_REPLACE('abc','b','x'); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `REGEXP_REPLACE('abc','b','x')` longtext CHARACTER SET utf8 NOT NULL + `REGEXP_REPLACE('abc','b','x')` longtext CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; EXPLAIN EXTENDED SELECT REGEXP_REPLACE('abc','b','x'); @@ -444,6 +444,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select regexp_replace('abc','b','x') AS `REGEXP_REPLACE('abc','b','x')` +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT REGEXP_REPLACE('abc','b','x')+0; Warnings: Warning 1292 Truncated incorrect DOUBLE value: 'axc' @@ -738,7 +739,7 @@ CREATE TABLE t1 AS SELECT REGEXP_SUBSTR('abc','b'); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `REGEXP_SUBSTR('abc','b')` varchar(3) CHARACTER SET utf8 NOT NULL + `REGEXP_SUBSTR('abc','b')` varchar(3) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; EXPLAIN EXTENDED SELECT REGEXP_SUBSTR('abc','b'); @@ -746,6 +747,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select regexp_substr('abc','b') AS `REGEXP_SUBSTR('abc','b')` +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT REGEXP_SUBSTR('abc','b')+0; Warnings: Warning 1292 Truncated incorrect DOUBLE value: 'b' diff --git a/mysql-test/r/func_set.result b/mysql-test/r/func_set.result index 3ffbe275fb9..46be54ca6a4 100644 --- a/mysql-test/r/func_set.result +++ b/mysql-test/r/func_set.result @@ -148,7 +148,7 @@ NULL drop table t1; CREATE TABLE t1( a SET('a', 'b', 'c') ); CREATE TABLE t2( a SET('a', 'b', 'c') ); -INSERT INTO t1 VALUES ('d'); +INSERT IGNORE INTO t1 VALUES ('d'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 INSERT INTO t2 VALUES (''); diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index ac7ab2bede6..8ca0d8c0297 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -318,6 +318,8 @@ quote(concat('abc\'', '\\cba')) select quote(1/0), quote('\0\Z'); quote(1/0) quote('\0\Z') NULL '\0\Z' +Warnings: +Warning 1365 Division by 0 select length(quote(concat(char(0),"test"))); length(quote(concat(char(0),"test"))) 8 @@ -729,34 +731,34 @@ t1 CREATE TABLE `t1` ( `bin(130)` varchar(64) DEFAULT NULL, `oct(130)` varchar(64) DEFAULT NULL, `conv(130,16,10)` varchar(64) DEFAULT NULL, - `hex(130)` varchar(6) NOT NULL, - `char(130)` varbinary(4) NOT NULL, - `format(130,10)` varchar(45) NOT NULL, - `left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL, - `right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL, - `lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL, - `ucase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL, - `substring(_latin2'a',1,1)` varchar(1) CHARACTER SET latin2 NOT NULL, - `concat(_latin2'a',_latin2'b')` varchar(2) CHARACTER SET latin2 NOT NULL, - `lpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 NOT NULL, - `rpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 NOT NULL, - `concat_ws(_latin2'a',_latin2'b')` varchar(1) CHARACTER SET latin2 NOT NULL, - `make_set(255,_latin2'a',_latin2'b',_latin2'c')` varchar(5) CHARACTER SET latin2 NOT NULL, - `export_set(255,_latin2'y',_latin2'n',_latin2' ')` varchar(127) CHARACTER SET latin2 NOT NULL, - `trim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL, - `ltrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL, - `rtrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL, - `trim(LEADING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL, - `trim(TRAILING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL, - `trim(BOTH _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL, - `repeat(_latin2'a',10)` varchar(10) CHARACTER SET latin2 NOT NULL, - `reverse(_latin2'ab')` varchar(2) CHARACTER SET latin2 NOT NULL, - `quote(_latin2'ab')` varchar(6) CHARACTER SET latin2 NOT NULL, - `soundex(_latin2'ab')` varchar(4) CHARACTER SET latin2 NOT NULL, - `substring(_latin2'ab',1)` varchar(2) CHARACTER SET latin2 NOT NULL, - `insert(_latin2'abcd',2,3,_latin2'ef')` varchar(6) CHARACTER SET latin2 NOT NULL, - `replace(_latin2'abcd',_latin2'b',_latin2'B')` varchar(4) CHARACTER SET latin2 NOT NULL, - `encode('abcd','ab')` varbinary(4) NOT NULL + `hex(130)` varchar(6) DEFAULT NULL, + `char(130)` varbinary(4) DEFAULT NULL, + `format(130,10)` varchar(45) DEFAULT NULL, + `left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 DEFAULT NULL, + `right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 DEFAULT NULL, + `lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 DEFAULT NULL, + `ucase(_latin2'a')` varchar(1) CHARACTER SET latin2 DEFAULT NULL, + `substring(_latin2'a',1,1)` varchar(1) CHARACTER SET latin2 DEFAULT NULL, + `concat(_latin2'a',_latin2'b')` varchar(2) CHARACTER SET latin2 DEFAULT NULL, + `lpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 DEFAULT NULL, + `rpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 DEFAULT NULL, + `concat_ws(_latin2'a',_latin2'b')` varchar(1) CHARACTER SET latin2 DEFAULT NULL, + `make_set(255,_latin2'a',_latin2'b',_latin2'c')` varchar(5) CHARACTER SET latin2 DEFAULT NULL, + `export_set(255,_latin2'y',_latin2'n',_latin2' ')` varchar(127) CHARACTER SET latin2 DEFAULT NULL, + `trim(_latin2' a ')` varchar(3) CHARACTER SET latin2 DEFAULT NULL, + `ltrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 DEFAULT NULL, + `rtrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 DEFAULT NULL, + `trim(LEADING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 DEFAULT NULL, + `trim(TRAILING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 DEFAULT NULL, + `trim(BOTH _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 DEFAULT NULL, + `repeat(_latin2'a',10)` varchar(10) CHARACTER SET latin2 DEFAULT NULL, + `reverse(_latin2'ab')` varchar(2) CHARACTER SET latin2 DEFAULT NULL, + `quote(_latin2'ab')` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `soundex(_latin2'ab')` varchar(4) CHARACTER SET latin2 DEFAULT NULL, + `substring(_latin2'ab',1)` varchar(2) CHARACTER SET latin2 DEFAULT NULL, + `insert(_latin2'abcd',2,3,_latin2'ef')` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `replace(_latin2'abcd',_latin2'b',_latin2'B')` varchar(4) CHARACTER SET latin2 DEFAULT NULL, + `encode('abcd','ab')` varbinary(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a char character set latin2); @@ -1062,11 +1064,11 @@ aaaaaaaaaaccccc bbbbbbbbbbddddd drop table t1, t2; create table t1 (c1 INT, c2 INT UNSIGNED); -insert into t1 values ('21474836461','21474836461'); +insert ignore into t1 values ('21474836461','21474836461'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 -insert into t1 values ('-21474836461','-21474836461'); +insert ignore into t1 values ('-21474836461','-21474836461'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -2855,7 +2857,7 @@ CREATE TABLE t1 AS SELECT format(123,2,'no_NO'); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `format(123,2,'no_NO')` varchar(45) NOT NULL + `format(123,2,'no_NO')` varchar(45) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT * FROM t1; format(123,2,'no_NO') @@ -2997,7 +2999,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',63)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(85) NOT NULL + `to_base64` varchar(85) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3019,7 +3021,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',62)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(85) NOT NULL + `to_base64` varchar(85) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3041,7 +3043,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',61)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(85) NOT NULL + `to_base64` varchar(85) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3063,7 +3065,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',60)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(81) NOT NULL + `to_base64` varchar(81) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3085,7 +3087,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',59)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(81) NOT NULL + `to_base64` varchar(81) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3107,7 +3109,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',58)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(81) NOT NULL + `to_base64` varchar(81) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3129,7 +3131,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',57)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(76) NOT NULL + `to_base64` varchar(76) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3150,7 +3152,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',56)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(76) NOT NULL + `to_base64` varchar(76) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3171,7 +3173,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',55)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(76) NOT NULL + `to_base64` varchar(76) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3192,7 +3194,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',54)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(72) NOT NULL + `to_base64` varchar(72) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3213,7 +3215,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',53)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(72) NOT NULL + `to_base64` varchar(72) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3234,7 +3236,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',52)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(72) NOT NULL + `to_base64` varchar(72) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3255,7 +3257,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',51)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(68) NOT NULL + `to_base64` varchar(68) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3276,7 +3278,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',50)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(68) NOT NULL + `to_base64` varchar(68) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3297,7 +3299,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',49)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(68) NOT NULL + `to_base64` varchar(68) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3318,7 +3320,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',48)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(64) NOT NULL + `to_base64` varchar(64) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3339,7 +3341,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',47)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(64) NOT NULL + `to_base64` varchar(64) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3360,7 +3362,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',46)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(64) NOT NULL + `to_base64` varchar(64) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3381,7 +3383,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',45)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(60) NOT NULL + `to_base64` varchar(60) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3402,7 +3404,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',44)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(60) NOT NULL + `to_base64` varchar(60) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3423,7 +3425,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',43)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(60) NOT NULL + `to_base64` varchar(60) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3444,7 +3446,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',42)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(56) NOT NULL + `to_base64` varchar(56) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3465,7 +3467,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',41)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(56) NOT NULL + `to_base64` varchar(56) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3486,7 +3488,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',40)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(56) NOT NULL + `to_base64` varchar(56) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3507,7 +3509,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',39)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(52) NOT NULL + `to_base64` varchar(52) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3528,7 +3530,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',38)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(52) NOT NULL + `to_base64` varchar(52) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3549,7 +3551,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',37)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(52) NOT NULL + `to_base64` varchar(52) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3570,7 +3572,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',36)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(48) NOT NULL + `to_base64` varchar(48) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3591,7 +3593,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',35)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(48) NOT NULL + `to_base64` varchar(48) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3612,7 +3614,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',34)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(48) NOT NULL + `to_base64` varchar(48) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3633,7 +3635,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',33)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(44) NOT NULL + `to_base64` varchar(44) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3654,7 +3656,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',32)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(44) NOT NULL + `to_base64` varchar(44) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3675,7 +3677,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',31)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(44) NOT NULL + `to_base64` varchar(44) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3696,7 +3698,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',30)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(40) NOT NULL + `to_base64` varchar(40) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3717,7 +3719,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',29)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(40) NOT NULL + `to_base64` varchar(40) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3738,7 +3740,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',28)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(40) NOT NULL + `to_base64` varchar(40) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3759,7 +3761,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',27)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(36) NOT NULL + `to_base64` varchar(36) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3780,7 +3782,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',26)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(36) NOT NULL + `to_base64` varchar(36) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3801,7 +3803,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',25)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(36) NOT NULL + `to_base64` varchar(36) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3822,7 +3824,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',24)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(32) NOT NULL + `to_base64` varchar(32) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3843,7 +3845,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',23)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(32) NOT NULL + `to_base64` varchar(32) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3864,7 +3866,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',22)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(32) NOT NULL + `to_base64` varchar(32) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3885,7 +3887,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',21)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(28) NOT NULL + `to_base64` varchar(28) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3906,7 +3908,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',20)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(28) NOT NULL + `to_base64` varchar(28) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3927,7 +3929,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',19)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(28) NOT NULL + `to_base64` varchar(28) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3948,7 +3950,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',18)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(24) NOT NULL + `to_base64` varchar(24) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3969,7 +3971,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',17)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(24) NOT NULL + `to_base64` varchar(24) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -3990,7 +3992,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',16)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(24) NOT NULL + `to_base64` varchar(24) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4011,7 +4013,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',15)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(20) NOT NULL + `to_base64` varchar(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4032,7 +4034,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',14)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(20) NOT NULL + `to_base64` varchar(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4053,7 +4055,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',13)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(20) NOT NULL + `to_base64` varchar(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4074,7 +4076,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',12)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(16) NOT NULL + `to_base64` varchar(16) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4095,7 +4097,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',11)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(16) NOT NULL + `to_base64` varchar(16) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4116,7 +4118,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',10)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(16) NOT NULL + `to_base64` varchar(16) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4137,7 +4139,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',9)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(12) NOT NULL + `to_base64` varchar(12) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4158,7 +4160,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',8)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(12) NOT NULL + `to_base64` varchar(12) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4179,7 +4181,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',7)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(12) NOT NULL + `to_base64` varchar(12) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4200,7 +4202,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',6)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(8) NOT NULL + `to_base64` varchar(8) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4221,7 +4223,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',5)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(8) NOT NULL + `to_base64` varchar(8) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4242,7 +4244,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',4)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(8) NOT NULL + `to_base64` varchar(8) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4263,7 +4265,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',3)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(4) NOT NULL + `to_base64` varchar(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4284,7 +4286,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',2)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(4) NOT NULL + `to_base64` varchar(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4305,7 +4307,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',1)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` varchar(4) NOT NULL + `to_base64` varchar(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) @@ -4326,7 +4328,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',0)) AS to_base64; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `to_base64` char(0) NOT NULL + `to_base64` char(0) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT to_base64, LENGTH(to_base64) FROM t1; to_base64 LENGTH(to_base64) diff --git a/mysql-test/r/func_system.result b/mysql-test/r/func_system.result index 2fc0a59f5d2..06fb7e44cf0 100644 --- a/mysql-test/r/func_system.result +++ b/mysql-test/r/func_system.result @@ -47,7 +47,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `database()` varchar(34) CHARACTER SET utf8 DEFAULT NULL, - `user()` varchar(141) CHARACTER SET utf8 NOT NULL, + `user()` varchar(141) CHARACTER SET utf8 DEFAULT NULL, `version` char(60) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -61,8 +61,8 @@ create table t1 select charset(_utf8'a'), collation(_utf8'a'); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `charset(_utf8'a')` varchar(64) CHARACTER SET utf8 NOT NULL, - `collation(_utf8'a')` varchar(64) CHARACTER SET utf8 NOT NULL + `charset(_utf8'a')` varchar(64) CHARACTER SET utf8 DEFAULT NULL, + `collation(_utf8'a')` varchar(64) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select TRUE,FALSE,NULL; diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index f999061e2e7..8f175a6805b 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -185,12 +185,18 @@ select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3; select (12%0) <=> null as '1'; 1 1 +Warnings: +Warning 1365 Division by 0 select (12%0) is null as '1'; 1 1 +Warnings: +Warning 1365 Division by 0 select 12%0 as 'NULL'; NULL NULL +Warnings: +Warning 1365 Division by 0 select 12%2 as '0'; 0 0 @@ -215,12 +221,18 @@ NULL select (12 mod 0) <=> null as '1'; 1 1 +Warnings: +Warning 1365 Division by 0 select (12 mod 0) is null as '1'; 1 1 +Warnings: +Warning 1365 Division by 0 select 12 mod 0 as 'NULL'; NULL NULL +Warnings: +Warning 1365 Division by 0 select 12 mod 2 as '0'; 0 0 @@ -242,9 +254,13 @@ NULL select mod(12.0, 0) as 'NULL'; NULL NULL +Warnings: +Warning 1365 Division by 0 select mod(12, 0.0) as 'NULL'; NULL NULL +Warnings: +Warning 1365 Division by 0 select mod(12, NULL) as 'NULL'; NULL NULL diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 4d0a2a021f9..54da823c439 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1031,7 +1031,7 @@ EXTRACT(HOUR FROM '10000:02:03') Warnings: Warning 1292 Truncated incorrect time value: '10000:02:03' CREATE TABLE t1(f1 TIME); -INSERT INTO t1 VALUES('916:00:00 a'); +INSERT IGNORE INTO t1 VALUES('916:00:00 a'); Warnings: Warning 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 @@ -2145,6 +2145,7 @@ f2 Warnings: Warning 1292 Truncated incorrect DECIMAL value: '2005-05-0410' Warning 1292 Truncated incorrect DECIMAL value: '2005-05-0410' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10'))) AS f2 FROM t1; Warnings: Warning 1292 Truncated incorrect DECIMAL value: '2005-05-0410' @@ -2765,6 +2766,12 @@ id date1 date2 DATE_ADD(a.date1,INTERVAL -10 DAY) TO_DAYS(a.date1)-10 18 2010-10-13 2010-10-03 2010-10-03 734413 DROP TABLE t1; # +# MDEV-10524 Assertion `arg1_int >= 0' failed in Item_func_additive_op::result_precision() +# +SELECT 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2; +1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2 +3 +# # Start of 10.0 tests # # diff --git a/mysql-test/r/function_defaults.result b/mysql-test/r/function_defaults.result index 4b8694ec838..62422752e17 100644 --- a/mysql-test/r/function_defaults.result +++ b/mysql-test/r/function_defaults.result @@ -1040,7 +1040,7 @@ FROM dual; SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; # Mon Aug 1 15:11:19 2011 UTC SET TIMESTAMP = 1312211479.918273; -LOAD DATA INFILE 't3.dat' INTO TABLE t1; +LOAD DATA INFILE 't3.dat' IGNORE INTO TABLE t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -1060,7 +1060,7 @@ f NULL g NULL h NULL i NULL -LOAD DATA INFILE 't4.dat' INTO TABLE t2; +LOAD DATA INFILE 't4.dat' IGNORE INTO TABLE t2; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'e' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'f' at row 1 @@ -1110,7 +1110,7 @@ DELETE FROM t2; # (read_fixed_length()) than under the LOAD ... INTO TABLE t1 command # above. The code in this path is copy-pasted code from the path taken # under the syntax used in the previous LOAD command. -LOAD DATA INFILE 't3.dat' INTO TABLE t1 +LOAD DATA INFILE 't3.dat' IGNORE INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY ''; Warnings: Warning 1261 Row 1 doesn't contain data for all columns @@ -1234,7 +1234,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file1.dat" INTO table t1; +LOAD DATA INFILE "file1.dat" IGNORE INTO table t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -1286,7 +1286,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file1.dat" INTO table t1; +LOAD DATA INFILE "file1.dat" IGNORE INTO table t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -1353,7 +1353,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file2.dat" INTO table t1; +LOAD DATA INFILE "file2.dat" IGNORE INTO table t1; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 @@ -1391,7 +1391,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file2.dat" INTO table t1; +LOAD DATA INFILE "file2.dat" IGNORE INTO table t1; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 @@ -2586,7 +2586,7 @@ FROM dual; SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; # Mon Aug 1 15:11:19 2011 UTC SET TIMESTAMP = 1312211479.918273; -LOAD DATA INFILE 't3.dat' INTO TABLE t1; +LOAD DATA INFILE 't3.dat' IGNORE INTO TABLE t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -2606,7 +2606,7 @@ f NULL g NULL h NULL i NULL -LOAD DATA INFILE 't4.dat' INTO TABLE t2; +LOAD DATA INFILE 't4.dat' IGNORE INTO TABLE t2; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'e' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'f' at row 1 @@ -2656,7 +2656,7 @@ DELETE FROM t2; # (read_fixed_length()) than under the LOAD ... INTO TABLE t1 command # above. The code in this path is copy-pasted code from the path taken # under the syntax used in the previous LOAD command. -LOAD DATA INFILE 't3.dat' INTO TABLE t1 +LOAD DATA INFILE 't3.dat' IGNORE INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY ''; Warnings: Warning 1261 Row 1 doesn't contain data for all columns @@ -2780,7 +2780,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file1.dat" INTO table t1; +LOAD DATA INFILE "file1.dat" IGNORE INTO table t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -2832,7 +2832,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file1.dat" INTO table t1; +LOAD DATA INFILE "file1.dat" IGNORE INTO table t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -2899,7 +2899,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file2.dat" INTO table t1; +LOAD DATA INFILE "file2.dat" IGNORE INTO table t1; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 @@ -2937,7 +2937,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file2.dat" INTO table t1; +LOAD DATA INFILE "file2.dat" IGNORE INTO table t1; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 diff --git a/mysql-test/r/function_defaults_innodb.result b/mysql-test/r/function_defaults_innodb.result index fe97870ab88..dd769f8577a 100644 --- a/mysql-test/r/function_defaults_innodb.result +++ b/mysql-test/r/function_defaults_innodb.result @@ -1041,7 +1041,7 @@ FROM dual; SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; # Mon Aug 1 15:11:19 2011 UTC SET TIMESTAMP = 1312211479.918273; -LOAD DATA INFILE 't3.dat' INTO TABLE t1; +LOAD DATA INFILE 't3.dat' IGNORE INTO TABLE t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -1061,7 +1061,7 @@ f NULL g NULL h NULL i NULL -LOAD DATA INFILE 't4.dat' INTO TABLE t2; +LOAD DATA INFILE 't4.dat' IGNORE INTO TABLE t2; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'e' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'f' at row 1 @@ -1111,7 +1111,7 @@ DELETE FROM t2; # (read_fixed_length()) than under the LOAD ... INTO TABLE t1 command # above. The code in this path is copy-pasted code from the path taken # under the syntax used in the previous LOAD command. -LOAD DATA INFILE 't3.dat' INTO TABLE t1 +LOAD DATA INFILE 't3.dat' IGNORE INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY ''; Warnings: Warning 1261 Row 1 doesn't contain data for all columns @@ -1235,7 +1235,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file1.dat" INTO table t1; +LOAD DATA INFILE "file1.dat" IGNORE INTO table t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -1287,7 +1287,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file1.dat" INTO table t1; +LOAD DATA INFILE "file1.dat" IGNORE INTO table t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -1354,7 +1354,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file2.dat" INTO table t1; +LOAD DATA INFILE "file2.dat" IGNORE INTO table t1; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 @@ -1392,7 +1392,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file2.dat" INTO table t1; +LOAD DATA INFILE "file2.dat" IGNORE INTO table t1; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 @@ -2587,7 +2587,7 @@ FROM dual; SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; # Mon Aug 1 15:11:19 2011 UTC SET TIMESTAMP = 1312211479.918273; -LOAD DATA INFILE 't3.dat' INTO TABLE t1; +LOAD DATA INFILE 't3.dat' IGNORE INTO TABLE t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -2607,7 +2607,7 @@ f NULL g NULL h NULL i NULL -LOAD DATA INFILE 't4.dat' INTO TABLE t2; +LOAD DATA INFILE 't4.dat' IGNORE INTO TABLE t2; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'e' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'f' at row 1 @@ -2657,7 +2657,7 @@ DELETE FROM t2; # (read_fixed_length()) than under the LOAD ... INTO TABLE t1 command # above. The code in this path is copy-pasted code from the path taken # under the syntax used in the previous LOAD command. -LOAD DATA INFILE 't3.dat' INTO TABLE t1 +LOAD DATA INFILE 't3.dat' IGNORE INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY ''; Warnings: Warning 1261 Row 1 doesn't contain data for all columns @@ -2781,7 +2781,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file1.dat" INTO table t1; +LOAD DATA INFILE "file1.dat" IGNORE INTO table t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -2833,7 +2833,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file1.dat" INTO table t1; +LOAD DATA INFILE "file1.dat" IGNORE INTO table t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -2900,7 +2900,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file2.dat" INTO table t1; +LOAD DATA INFILE "file2.dat" IGNORE INTO table t1; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 @@ -2938,7 +2938,7 @@ t1 CREATE TABLE `t1` ( `h` int(11) DEFAULT NULL, `i` int(11) NOT NULL DEFAULT 42 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -LOAD DATA INFILE "file2.dat" INTO table t1; +LOAD DATA INFILE "file2.dat" IGNORE INTO table t1; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'like_c' at row 1 diff --git a/mysql-test/r/get_diagnostics.result b/mysql-test/r/get_diagnostics.result index 6ea2d150185..fbe3a02ee88 100644 --- a/mysql-test/r/get_diagnostics.result +++ b/mysql-test/r/get_diagnostics.result @@ -625,9 +625,10 @@ END| CREATE TABLE t1 (a INT); CALL p1(); v -T +NULL Warnings: Note 1050 Table 't1' already exists +Error 1406 Data too long for column 'v' at row 1 DROP TABLE t1; DROP PROCEDURE p1; diff --git a/mysql-test/r/gis-json.result b/mysql-test/r/gis-json.result new file mode 100644 index 00000000000..8625a5bfb74 --- /dev/null +++ b/mysql-test/r/gis-json.result @@ -0,0 +1,66 @@ +select st_asgeojson(geomfromtext('POINT(1 1)')); +st_asgeojson(geomfromtext('POINT(1 1)')) +{"type": "Point", "coordinates": [1, 1]} +select st_asgeojson(geomfromtext('LINESTRING(10 10,20 10,20 20,10 20,10 10)')); +st_asgeojson(geomfromtext('LINESTRING(10 10,20 10,20 20,10 20,10 10)')) +{"type": "LineString", "coordinates": [[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]} +select st_asgeojson(geomfromtext('POLYGON((10 10,20 10,20 20,10 20,10 10))')); +st_asgeojson(geomfromtext('POLYGON((10 10,20 10,20 20,10 20,10 10))')) +{"type": "Polygon", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]} +select st_asgeojson(geomfromtext('MULTIPOLYGON(((10 10,20 10,20 20,10 20,10 10)))')); +st_asgeojson(geomfromtext('MULTIPOLYGON(((10 10,20 10,20 20,10 20,10 10)))')) +{"type": "MultiPolygon", "coordinates": [[[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]]} +select st_asgeojson(geomfromtext('multilinestring((10 10,20 10,20 20,10 20,10 10))')); +st_asgeojson(geomfromtext('multilinestring((10 10,20 10,20 20,10 20,10 10))')) +{"type": "MultiLineString", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]} +select st_asgeojson(geomfromtext('multipoint(10 10,20 10,20 20,10 20,10 10)')); +st_asgeojson(geomfromtext('multipoint(10 10,20 10,20 20,10 20,10 10)')) +{"type": "MultiPoint", "coordinates": [[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]} +select st_asgeojson(st_geomfromtext('GEOMETRYCOLLECTION(POINT(100 0),LINESTRING(101 0,102 1))')); +st_asgeojson(st_geomfromtext('GEOMETRYCOLLECTION(POINT(100 0),LINESTRING(101 0,102 1))')) +{"type": "GeometryCollection", "geometries": [{"type": "Point", "coordinates": [100, 0]}, {"type": "LineString", "coordinates": [[101, 0], [102, 1]]}]} +SELECT st_astext(st_geomfromgeojson('{"type":"point","coordinates":[1,2]}')); +st_astext(st_geomfromgeojson('{"type":"point","coordinates":[1,2]}')) +POINT(1 2) +SELECT st_astext(st_geomfromgeojson('{"type":"LineString","coordinates":[[1,2],[4,5],[7,8]]}')); +st_astext(st_geomfromgeojson('{"type":"LineString","coordinates":[[1,2],[4,5],[7,8]]}')) +LINESTRING(1 2,4 5,7 8) +SELECT st_astext(st_geomfromgeojson('{"type": "polygon", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}')); +st_astext(st_geomfromgeojson('{"type": "polygon", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}')) +POLYGON((10 10,20 10,20 20,10 20,10 10)) +SELECT st_astext(st_geomfromgeojson('{"type":"multipoint","coordinates":[[1,2],[4,5],[7,8]]}')); +st_astext(st_geomfromgeojson('{"type":"multipoint","coordinates":[[1,2],[4,5],[7,8]]}')) +MULTIPOINT(1 2,4 5,7 8) +SELECT st_astext(st_geomfromgeojson('{"type": "multilinestring", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}')); +st_astext(st_geomfromgeojson('{"type": "multilinestring", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}')) +MULTILINESTRING((10 10,20 10,20 20,10 20,10 10)) +SELECT st_astext(st_geomfromgeojson('{"type": "multipolygon", "coordinates": [[[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]]}')); +st_astext(st_geomfromgeojson('{"type": "multipolygon", "coordinates": [[[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]]}')) +MULTIPOLYGON(((10 10,20 10,20 20,10 20,10 10))) +SELECT st_astext(st_geomfromgeojson('{"type": "GeometryCollection", "geometries": [{"type": "Point","coordinates": [100.0, 0.0]}, {"type": "LineString","coordinates": [[101.0, 0.0],[102.0, 1.0]]}]}')); +st_astext(st_geomfromgeojson('{"type": "GeometryCollection", "geometries": [{"type": "Point","coordinates": [100.0, 0.0]}, {"type": "LineString","coordinates": [[101.0, 0.0],[102.0, 1.0]]}]}')) +GEOMETRYCOLLECTION(POINT(100 0),LINESTRING(101 0,102 1)) +SELECT st_astext(st_geomfromgeojson('{"type":"point"}')); +st_astext(st_geomfromgeojson('{"type":"point"}')) +NULL +Warnings: +Warning 4048 Incorrect GeoJSON format specified for st_geomfromgeojson function. +SELECT st_astext(st_geomfromgeojson('{"type":"point"')); +st_astext(st_geomfromgeojson('{"type":"point"')) +NULL +Warnings: +Warning 4037 Unexpected end of JSON text in argument 1 to function 'st_geomfromgeojson' +SELECT st_astext(st_geomfromgeojson('{"type""point"}')); +st_astext(st_geomfromgeojson('{"type""point"}')) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'st_geomfromgeojson' at position 7 +SELECT st_astext(st_geomfromgeojson('{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] } }')); +st_astext(st_geomfromgeojson('{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] } }')) +POINT(102 0.5) +SELECT st_astext(st_geomfromgeojson('{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }]}')); +st_astext(st_geomfromgeojson('{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }]}')) +GEOMETRYCOLLECTION(POINT(102 0.5)) +# +# End of 10.2 tests +# diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result index 43c51b838e2..b76d02ef1d7 100644 --- a/mysql-test/r/gis-rtree.result +++ b/mysql-test/r/gis-rtree.result @@ -800,7 +800,7 @@ drop table t1; CREATE TABLE t1 (st varchar(100)); INSERT INTO t1 VALUES ("Fake string"); CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom)); -INSERT INTO t2 SELECT GeomFromText(st) FROM t1; +INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1; ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -1453,7 +1453,7 @@ drop table t1; CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ); INSERT INTO t1(foo) VALUES (NULL); ERROR 23000: Column 'foo' cannot be null -INSERT INTO t1() VALUES (); +INSERT IGNORE INTO t1() VALUES (); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field INSERT INTO t1(foo) VALUES (''); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index ed0d8f540a0..005b4239e9c 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -807,7 +807,7 @@ drop procedure if exists fn3; create function fn3 () returns point deterministic return GeomFromText("point(1 1)"); show create function fn3; Function sql_mode Create Function character_set_client collation_connection Database Collation -fn3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS point +fn3 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS point DETERMINISTIC return GeomFromText("point(1 1)") latin1 latin1_swedish_ci latin1_swedish_ci select astext(fn3()); @@ -1616,8 +1616,8 @@ insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)")); select equals(`a`,convert(`a` using utf8)) from `t1`; equals(`a`,convert(`a` using utf8)) 1 -0 -0 +NULL +NULL Warnings: Warning 1300 Invalid utf8 character string: '\xE0C' Warning 1300 Invalid utf8 character string: '\xE0C' diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 8788114583d..bd5f4bc1efd 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -2771,3 +2771,12 @@ SELECT 1 IN ( SELECT COUNT( DISTINCT f2 ) FROM t1 WHERE f1 <= 4 ); 1 IN ( SELECT COUNT( DISTINCT f2 ) FROM t1 WHERE f1 <= 4 ) 0 drop table t1; +# +# MDEV-10694 - SIGFPE and/or huge memory allocation in maria_create with distinct/group by/ rollup +# +create table t1 (a int,b int) ; +insert into t1 values(-126,7),(1,1),(0,0),(-1,1),(351,65534); +select distinct 1 from t1 group by a,b with rollup limit 1; +1 +1 +drop table t1; diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result index c008f6b4d13..18fb5e2de72 100644 --- a/mysql-test/r/having.result +++ b/mysql-test/r/having.result @@ -370,7 +370,7 @@ select * from t1 a, t1 b group by a.s1 having s1 is null; ERROR 23000: Column 's1' in having clause is ambiguous drop table t1; create table t1 (s1 char character set latin1 collate latin1_german1_ci); -insert into t1 values ('ü'),('y'); +insert ignore into t1 values ('ü'),('y'); Warnings: Warning 1265 Data truncated for column 's1' at row 1 select s1,count(s1) from t1 diff --git a/mysql-test/r/help.result b/mysql-test/r/help.result index aefe6f8381e..66850e75dc1 100644 --- a/mysql-test/r/help.result +++ b/mysql-test/r/help.result @@ -1,46 +1,46 @@ -insert into mysql.help_category(help_category_id,name)values(10001,'impossible_category_1'); +insert ignore into mysql.help_category(help_category_id,name)values(10001,'impossible_category_1'); Warnings: Warning 1364 Field 'url' doesn't have a default value select @category1_id:= 10001; @category1_id:= 10001 10001 -insert into mysql.help_category(help_category_id,name)values(10002,'impossible_category_2'); +insert ignore into mysql.help_category(help_category_id,name)values(10002,'impossible_category_2'); Warnings: Warning 1364 Field 'url' doesn't have a default value select @category2_id:= 10002; @category2_id:= 10002 10002 -insert into mysql.help_category(help_category_id,name,parent_category_id)values(10003,'impossible_category_3',@category2_id); +insert ignore into mysql.help_category(help_category_id,name,parent_category_id)values(10003,'impossible_category_3',@category2_id); Warnings: Warning 1364 Field 'url' doesn't have a default value select @category3_id:= 10003; @category3_id:= 10003 10003 -insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10101,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1'); +insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10101,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1'); Warnings: Warning 1364 Field 'url' doesn't have a default value select @topic1_id:= 10101; @topic1_id:= 10101 10101 -insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10102,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2'); +insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10102,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2'); Warnings: Warning 1364 Field 'url' doesn't have a default value select @topic2_id:= 10102; @topic2_id:= 10102 10102 -insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10103,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3'); +insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10103,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3'); Warnings: Warning 1364 Field 'url' doesn't have a default value select @topic3_id:= 10103; @topic3_id:= 10103 10103 -insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10104,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4'); +insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10104,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4'); Warnings: Warning 1364 Field 'url' doesn't have a default value select @topic4_id:= 10104; @topic4_id:= 10104 10104 -insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10105,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7'); +insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10105,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7'); Warnings: Warning 1364 Field 'url' doesn't have a default value select @topic5_id:= 10105; diff --git a/mysql-test/r/index_merge_innodb.result b/mysql-test/r/index_merge_innodb.result index 0450622411a..6a3ea839535 100644 --- a/mysql-test/r/index_merge_innodb.result +++ b/mysql-test/r/index_merge_innodb.result @@ -799,3 +799,32 @@ a b c 9 d d DROP TABLE t1; set optimizer_switch= @optimizer_switch_save; +# +# MDEV-10927: Crash When Using sort_union Optimization +# +set @tmp_optimizer_switch=@@optimizer_switch; +SET optimizer_switch='index_merge_sort_intersection=on'; +SET SESSION sort_buffer_size = 1024; +create table t1 ( +pk int(11) NOT NULL AUTO_INCREMENT, +col1 int(11) NOT NULL, +col2 int(11) NOT NULL, +col3 int(11) NOT NULL, +key2 int(11) NOT NULL, +col4 int(11) NOT NULL, +key1 int(11) NOT NULL, +PRIMARY KEY (pk), +KEY key1 (key1), +KEY key2 (key2) +) ENGINE=InnoDB AUTO_INCREMENT=12860259 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; +create table t2(a int); +insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t3(a int); +insert into t3 select A.a + B.a* 10 + C.a * 100 + D.a*1000 from t2 A, t2 B, t2 C, t2 D; +insert into t1 (key1, key2, col1,col2,col3,col4) +select a,a, a,a,a,a from t3; +SELECT sum(col1) FROM t1 FORCE INDEX (key1,key2) WHERE (key1 between 10 and 8191+10) or (key2= 5); +sum(col1) +33632261 +drop table t1,t2,t3; +set optimizer_switch=@tmp_optimizer_switch; diff --git a/mysql-test/r/information_schema_part.result b/mysql-test/r/information_schema_part.result index e0a0f28dec6..91720d12ac4 100644 --- a/mysql-test/r/information_schema_part.result +++ b/mysql-test/r/information_schema_part.result @@ -151,3 +151,11 @@ select create_options from information_schema.tables where table_schema="test"; create_options partitioned drop table t1; +# +# MDEV-11353 - Identical logical conditions +# +CREATE TABLE t1(a INT) CHECKSUM=1 SELECT 1; +SELECT CHECKSUM FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'; +CHECKSUM +3036305396 +DROP TABLE t1; diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result index abc41244c7d..207317c1add 100644 --- a/mysql-test/r/innodb_icp.result +++ b/mysql-test/r/innodb_icp.result @@ -474,7 +474,7 @@ CREATE TABLE t2 ( t2_int int PRIMARY KEY, t2_int2 INT ); -INSERT INTO t2 VALUES (); +INSERT IGNORE INTO t2 VALUES (); INSERT INTO t1 VALUES (); SELECT * FROM t1 AS t1a WHERE NOT EXISTS (SELECT * FROM t1 AS t1b @@ -568,7 +568,7 @@ COL1000 VARBINARY(179) NOT NULL, col1003 DATE DEFAULT NULL, KEY idx4267 (col1000, col1003) ); -INSERT INTO t1 VALUES (),(); +INSERT IGNORE INTO t1 VALUES (),(); Warnings: Warning 1364 Field 'col999' doesn't have a default value Warning 1364 Field 'COL1000' doesn't have a default value @@ -849,7 +849,7 @@ Handler_icp_attempts 2 Handler_icp_match 1 DROP TABLE t1; create table t1 (a int,b char(5),primary key (a), key (b(1))); -insert into t1 values ('a','b'); +insert ignore into t1 values ('a','b'); Warnings: Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1 select 1 from t1 where a and b >= 'aa'; diff --git a/mysql-test/r/innodb_mysql_lock.result b/mysql-test/r/innodb_mysql_lock.result index 110fa50d544..584ab19b2ee 100644 --- a/mysql-test/r/innodb_mysql_lock.result +++ b/mysql-test/r/innodb_mysql_lock.result @@ -1,6 +1,7 @@ set @old_innodb_lock_wait_timeout=@@global.innodb_lock_wait_timeout; set global innodb_lock_wait_timeout=300; set session innodb_lock_wait_timeout=300; +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); # # Bug #22876 Four-way deadlock # diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 22d514f2df2..c9e3dc7b253 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -90,7 +90,7 @@ drop database mysqltest; use test; create table t1(number int auto_increment primary key, original_value varchar(50), f_double double, f_float float, f_double_7_2 double(7,2), f_float_4_3 float (4,3), f_double_u double unsigned, f_float_u float unsigned, f_double_15_1_u double(15,1) unsigned, f_float_3_1_u float (3,1) unsigned); set @value= "aa"; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: Warning 1366 Incorrect double value: 'aa' for column 'f_double' at row 1 Warning 1366 Incorrect double value: 'aa' for column 'f_float' at row 1 @@ -112,7 +112,7 @@ f_float_u 0 f_double_15_1_u 0.0 f_float_3_1_u 0.0 set @value= "1aa"; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: Warning 1265 Data truncated for column 'f_double' at row 1 Warning 1265 Data truncated for column 'f_float' at row 1 @@ -134,7 +134,7 @@ f_float_u 1 f_double_15_1_u 1.0 f_float_3_1_u 1.0 set @value= "aa1"; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: Warning 1366 Incorrect double value: 'aa1' for column 'f_double' at row 1 Warning 1366 Incorrect double value: 'aa1' for column 'f_float' at row 1 @@ -156,7 +156,7 @@ f_float_u 0 f_double_15_1_u 0.0 f_float_3_1_u 0.0 set @value= "1e+1111111111a"; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: Warning 1264 Out of range value for column 'f_double' at row 1 Warning 1264 Out of range value for column 'f_float' at row 1 @@ -184,7 +184,7 @@ f_float_u 3.40282e38 f_double_15_1_u 99999999999999.9 f_float_3_1_u 99.9 set @value= "-1e+1111111111a"; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: Warning 1264 Out of range value for column 'f_double' at row 1 Warning 1264 Out of range value for column 'f_float' at row 1 @@ -217,7 +217,7 @@ ERROR 22007: Illegal double '1e+1111111111' value found during parsing set @value= -1e+1111111111; ERROR 22007: Illegal double '1e+1111111111' value found during parsing set @value= 1e+111; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: Warning 1264 Out of range value for column 'f_float' at row 1 Warning 1264 Out of range value for column 'f_double_7_2' at row 1 @@ -237,7 +237,7 @@ f_float_u 3.40282e38 f_double_15_1_u 99999999999999.9 f_float_3_1_u 99.9 set @value= -1e+111; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: Warning 1264 Out of range value for column 'f_float' at row 1 Warning 1264 Out of range value for column 'f_double_7_2' at row 1 @@ -271,7 +271,7 @@ f_float_u 1 f_double_15_1_u 1.0 f_float_3_1_u 1.0 set @value= -1; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: Warning 1264 Out of range value for column 'f_double_u' at row 1 Warning 1264 Out of range value for column 'f_float_u' at row 1 @@ -515,7 +515,7 @@ b char(7) DEFAULT NULL, c char(4) DEFAULT NULL ); INSERT INTO t1(a,b,c) VALUES (9.999999e+0, 9.999999e+0, 9.999e+0); -INSERT INTO t1(a,b,c) VALUES (1.225e-05, 1.225e-05, 1.225e-05); +INSERT IGNORE INTO t1(a,b,c) VALUES (1.225e-05, 1.225e-05, 1.225e-05); Warnings: Warning 1265 Data truncated for column 'c' at row 1 INSERT INTO t1(a,b) VALUES (1.225e-04, 1.225e-04); @@ -534,7 +534,7 @@ INSERT INTO t1(a,b) VALUES (1.25e-175, 1.25e-175); INSERT INTO t1(a,c) VALUES (1.225e+0, 1.225e+0); INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0); INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0); -INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3); +INSERT IGNORE INTO t1(a,c) VALUES (1.87e-3, 1.87e-3); Warnings: Warning 1265 Data truncated for column 'c' at row 1 INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2); diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 3f4a26a728e..1a3a38b1f35 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -608,7 +608,7 @@ NULL Field Count NULL 1 100 NULL 2 100 create table t2(No int not null, Field int not null, Count int not null); -insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2; +insert ignore into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2; Warnings: Warning 1048 Column 'No' cannot be null Warning 1048 Column 'No' cannot be null @@ -772,11 +772,13 @@ f1 f2 101 1 2 2 DROP TABLE t1, t2; +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1 ( a INT KEY, b INT ); INSERT INTO t1 VALUES ( 0, 1 ); INSERT INTO t1 ( b ) SELECT MAX( b ) FROM t1 WHERE b = 2; ERROR 23000: Duplicate entry '0' for key 'PRIMARY' DROP TABLE t1; +SET sql_mode = DEFAULT; SET SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1 (c VARCHAR(30), INDEX ix_c (c(10))); CREATE TABLE t2 (d VARCHAR(10)); diff --git a/mysql-test/r/insert_update.result b/mysql-test/r/insert_update.result index 1987c5c0559..e8e6e16fe5a 100644 --- a/mysql-test/r/insert_update.result +++ b/mysql-test/r/insert_update.result @@ -242,14 +242,16 @@ ERROR 42S22: Unknown column 'a' in 'field list' DROP TABLE t1,t2; SET SQL_MODE = 'TRADITIONAL'; CREATE TABLE t1 (a INT PRIMARY KEY, b INT NOT NULL); +INSERT INTO t1 VALUES (1,1); INSERT INTO t1 (a) VALUES (1); ERROR HY000: Field 'b' doesn't have a default value INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE a = b; ERROR HY000: Field 'b' doesn't have a default value +INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE b = a; INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE b = b; -ERROR HY000: Field 'b' doesn't have a default value SELECT * FROM t1; a b +1 1 DROP TABLE t1; CREATE TABLE t1 (f1 INT AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(5) NOT NULL UNIQUE); diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index 61a78e65610..17e48ae329c 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -168,6 +168,8 @@ SELECT * FROM t1 WHERE 1/0 IS NULL; d 2001-08-01 0000-00-00 +Warnings: +Warning 1365 Division by 0 DROP TABLE t1,t2; CREATE TABLE t1 ( Document_ID varchar(50) NOT NULL default '', diff --git a/mysql-test/r/join_cache.result b/mysql-test/r/join_cache.result index 74e64d92856..5cb76a93d9a 100644 --- a/mysql-test/r/join_cache.result +++ b/mysql-test/r/join_cache.result @@ -4450,7 +4450,7 @@ EXPLAIN SELECT t2.i FROM t1,t2 WHERE t1.cu = t2.cl ; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 -1 SIMPLE t1 hash_index cu #hash#cu:cu 33:33 func 10 Using where; Using join buffer (flat, BNLH join) +1 SIMPLE t1 hash_index cu #hash#cu:cu 33:33 func 10 Using where; Using index; Using join buffer (flat, BNLH join) SELECT t2.i FROM t1,t2 WHERE t1.cu = t2.cl ; i 6 @@ -5242,7 +5242,7 @@ EXPLAIN SELECT * FROM t1 WHERE (t1.b) IN (SELECT c FROM t2); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where -1 PRIMARY t2 hash_index c #hash#c:c 5:5 test.t1.b 8 Start temporary; End temporary; Using join buffer (flat, BNLH join) +1 PRIMARY t2 hash_index c #hash#c:c 5:5 test.t1.b 8 Using index; Start temporary; End temporary; Using join buffer (flat, BNLH join) SELECT * FROM t1 WHERE (t1.b) IN (SELECT c FROM t2); a b 3914 17 @@ -5609,8 +5609,8 @@ set join_cache_level = default; set optimizer_switch=@tmp_optimizer_switch; DROP TABLE t1,t2,t3; # -# Bug #925985: LEFT JOIN with optimize_join_buffer_size=off + -# join_buffer_size > join_buffer_space_limit +# lp:925985 LEFT JOIN with optimize_join_buffer_size=off + +# join_buffer_size > join_buffer_space_limit # CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (5), (3); @@ -5755,11 +5755,13 @@ LEFT JOIN t2 c1 ON c1.parent_id = t.id AND c1.col2 = "val" LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val" LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val" LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val" + LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val" + LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val" ORDER BY col1; id col1 -select timestampdiff(second, @init_time, now()) <= 1; -timestampdiff(second, @init_time, now()) <= 1 +select timestampdiff(second, @init_time, now()) <= 5; +timestampdiff(second, @init_time, now()) <= 5 1 set join_cache_level=2; set @init_time:=now(); @@ -5791,11 +5793,13 @@ LEFT JOIN t2 c1 ON c1.parent_id = t.id AND c1.col2 = "val" LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val" LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val" LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val" + LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val" + LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val" ORDER BY col1; id col1 -select timestampdiff(second, @init_time, now()) <= 1; -timestampdiff(second, @init_time, now()) <= 1 +select timestampdiff(second, @init_time, now()) <= 5; +timestampdiff(second, @init_time, now()) <= 5 1 EXPLAIN SELECT t.* @@ -5826,6 +5830,8 @@ LEFT JOIN t2 c1 ON c1.parent_id = t.id AND c1.col2 = "val" LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val" LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val" LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val" + LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val" + LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val" ORDER BY col1; id select_type table type possible_keys key key_len ref rows Extra @@ -5855,6 +5861,8 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE c23 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join) 1 SIMPLE c24 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join) 1 SIMPLE c25 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join) +1 SIMPLE c26 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join) +1 SIMPLE c27 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join) set join_buffer_size=default; set join_cache_level = default; DROP TABLE t1,t2; diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 7fb3517ecb7..ffeddc989ec 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -2006,7 +2006,7 @@ SELECT * FROM (t2 LEFT JOIN t1 ON t1.b = t2.b) JOIN t3 ON t1.b = t3.b; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 1 SIMPLE t3 hash_ALL PRIMARY #hash#PRIMARY 4 test.t1.b 10 10.00 Using join buffer (flat, BNLH join) -1 SIMPLE t2 hash_index PRIMARY #hash#PRIMARY:PRIMARY 4:4 test.t1.b 27 3.70 Using join buffer (incremental, BNLH join) +1 SIMPLE t2 hash_index PRIMARY #hash#PRIMARY:PRIMARY 4:4 test.t1.b 27 3.70 Using index; Using join buffer (incremental, BNLH join) Warnings: Note 1003 select `test`.`t2`.`b` AS `b`,`test`.`t1`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t2` join `test`.`t1` join `test`.`t3` where `test`.`t3`.`b` = `test`.`t1`.`b` and `test`.`t2`.`b` = `test`.`t1`.`b` PREPARE stmt FROM diff --git a/mysql-test/r/join_outer_innodb.result b/mysql-test/r/join_outer_innodb.result index 339cc59ed69..6f3fb09329d 100644 --- a/mysql-test/r/join_outer_innodb.result +++ b/mysql-test/r/join_outer_innodb.result @@ -196,7 +196,7 @@ a8 smallint(6) DEFAULT NULL, a9 smallint(6) DEFAULT NULL, a10 tinyint NOT NULL, PRIMARY KEY (a1), KEY a2 (a2), KEY a3 (a3), KEY a4 (a4), KEY a6 (a6), KEY a5 (a5), KEY a7 (a7), KEY a8 (a8), KEY a9 (a9) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -INSERT INTO t1 VALUES +INSERT IGNORE INTO t1 VALUES (3360,5684,2219,1,316832,1,0,NULL,NULL,NULL), (3362,2754,597,2,316844,1,0,NULL,NULL,NULL), (3363,369,NULL,1,317295,1,0,NULL,NULL,NULL); diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result index ef749768d4c..4ffca891061 100644 --- a/mysql-test/r/join_outer_jcl6.result +++ b/mysql-test/r/join_outer_jcl6.result @@ -2017,7 +2017,7 @@ SELECT * FROM (t2 LEFT JOIN t1 ON t1.b = t2.b) JOIN t3 ON t1.b = t3.b; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 1 SIMPLE t3 hash_ALL PRIMARY #hash#PRIMARY 4 test.t1.b 10 10.00 Using join buffer (flat, BNLH join) -1 SIMPLE t2 hash_index PRIMARY #hash#PRIMARY:PRIMARY 4:4 test.t1.b 27 3.70 Using join buffer (incremental, BNLH join) +1 SIMPLE t2 hash_index PRIMARY #hash#PRIMARY:PRIMARY 4:4 test.t1.b 27 3.70 Using index; Using join buffer (incremental, BNLH join) Warnings: Note 1003 select `test`.`t2`.`b` AS `b`,`test`.`t1`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t2` join `test`.`t1` join `test`.`t3` where `test`.`t3`.`b` = `test`.`t1`.`b` and `test`.`t2`.`b` = `test`.`t1`.`b` PREPARE stmt FROM diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index 913e39ee140..ba1124aaa14 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -32,7 +32,7 @@ KEY price (price,area,type,transityes,shopsyes,schoolsyes,petsyes) ); INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','N','N','N','N'); INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','N','N','N','N'); -INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','','','',''); +INSERT IGNORE INTO t1 VALUES (900,'Vancouver','Shared/Roomate','','','',''); Warnings: Warning 1265 Data truncated for column 'transityes' at row 1 Warning 1265 Data truncated for column 'shopsyes' at row 1 @@ -157,7 +157,7 @@ t1 1 c 1 c A NULL NULL NULL YES BTREE drop table t1; CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT, UNIQUE (c,i)); -INSERT INTO t1 (c) VALUES (NULL),(NULL); +INSERT IGNORE INTO t1 (c) VALUES (NULL),(NULL); Warnings: Warning 1048 Column 'c' cannot be null Warning 1048 Column 'c' cannot be null @@ -189,10 +189,10 @@ a 1 a 2 drop table t1; create table t1 (i int, a char(200), b text, unique (a), unique (b(300))) charset utf8; -insert t1 values (1, repeat('a',210), repeat('b', 310)); +insert ignore t1 values (1, repeat('a',210), repeat('b', 310)); Warnings: Warning 1265 Data truncated for column 'a' at row 1 -insert t1 values (2, repeat(0xD0B1,215), repeat(0xD0B1, 310)); +insert ignore t1 values (2, repeat(0xD0B1,215), repeat(0xD0B1, 310)); Warnings: Warning 1265 Data truncated for column 'a' at row 1 select i, length(a), length(b), char_length(a), char_length(b) from t1; diff --git a/mysql-test/r/keywords.result b/mysql-test/r/keywords.result index f5bf600dc40..8c510b712ce 100644 --- a/mysql-test/r/keywords.result +++ b/mysql-test/r/keywords.result @@ -276,6 +276,57 @@ ERROR HY000: Unknown system variable 'option' set option option=1; ERROR HY000: Unknown system variable 'option' # +# MDEV-9979 Keywords UNBOUNDED, PRECEDING, FOLLOWING, TIES, OTHERS should be non-reserved +# +CREATE TABLE EXCLUDE (EXCLUDE INT); +SELECT EXCLUDE FROM EXCLUDE; +EXCLUDE +SELECT EXCLUDE EXCLUDE FROM EXCLUDE; +EXCLUDE +SELECT EXCLUDE AS EXCLUDE FROM EXCLUDE; +EXCLUDE +DROP TABLE EXCLUDE; +CREATE TABLE UNBOUNDED (UNBOUNDED INT); +SELECT UNBOUNDED FROM UNBOUNDED; +UNBOUNDED +SELECT UNBOUNDED UNBOUNDEX FROM UNBOUNDED; +UNBOUNDEX +SELECT UNBOUNDED AS UNBOUNDEX FROM UNBOUNDED; +UNBOUNDEX +DROP TABLE UNBOUNDED; +CREATE TABLE PRECEDING (PRECEDING INT); +SELECT PRECEDING FROM PRECEDING; +PRECEDING +SELECT PRECEDING PRECEDING FROM PRECEDING; +PRECEDING +SELECT PRECEDING AS PRECEDING FROM PRECEDING; +PRECEDING +DROP TABLE PRECEDING; +CREATE TABLE FOLLOWING (FOLLOWING INT); +SELECT FOLLOWING FROM FOLLOWING; +FOLLOWING +SELECT FOLLOWING FOLLOWING FROM FOLLOWING; +FOLLOWING +SELECT FOLLOWING AS FOLLOWING FROM FOLLOWING; +FOLLOWING +DROP TABLE FOLLOWING; +CREATE TABLE TIES (TIES INT); +SELECT TIES FROM TIES; +TIES +SELECT TIES TIES FROM TIES; +TIES +SELECT TIES AS TIES FROM TIES; +TIES +DROP TABLE TIES; +CREATE TABLE OTHERS (OTHERS INT); +SELECT OTHERS FROM OTHERS; +OTHERS +SELECT OTHERS OTHERS FROM OTHERS; +OTHERS +SELECT OTHERS AS OTHERS FROM OTHERS; +OTHERS +DROP TABLE OTHERS; +# # MDEV-10585 EXECUTE IMMEDIATE statement # CREATE TABLE immediate (immediate int); diff --git a/mysql-test/r/limit_rows_examined.result b/mysql-test/r/limit_rows_examined.result index f22b4813050..157d10ae76a 100644 --- a/mysql-test/r/limit_rows_examined.result +++ b/mysql-test/r/limit_rows_examined.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Sort aborted.*"); set @save_join_cache_level = @@join_cache_level; create table t1 (c1 char(2)); create table t2 (c2 char(2)); @@ -627,7 +628,7 @@ INSERT/DELETE/UPDATE INSERT ... SELECT CREATE TABLE t4 (a int); INSERT INTO t4 values (1), (2); -INSERT INTO t4 SELECT a + 2 FROM t4 LIMIT ROWS EXAMINED 0; +INSERT IGNORE INTO t4 SELECT a + 2 FROM t4 LIMIT ROWS EXAMINED 0; Warnings: Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete select * from t4; @@ -751,15 +752,15 @@ LIMIT ROWS EXAMINED 120; ERROR HY000: Sort aborted: SHOW STATUS LIKE 'Handler_read%'; Variable_name Value -Handler_read_first 0 +Handler_read_first 1 Handler_read_key 5 Handler_read_last 0 -Handler_read_next 0 +Handler_read_next 7 Handler_read_prev 0 Handler_read_retry 0 Handler_read_rnd 0 Handler_read_rnd_deleted 0 -Handler_read_rnd_next 46 +Handler_read_rnd_next 38 SHOW STATUS LIKE 'Handler_tmp%'; Variable_name Value Handler_tmp_update 0 @@ -776,15 +777,15 @@ Warnings: Warning 1931 Query execution was interrupted. The query examined at least 125 rows, which exceeds LIMIT ROWS EXAMINED (124). The query result may be incomplete SHOW STATUS LIKE 'Handler_read%'; Variable_name Value -Handler_read_first 0 +Handler_read_first 1 Handler_read_key 5 Handler_read_last 0 -Handler_read_next 0 +Handler_read_next 7 Handler_read_prev 0 Handler_read_retry 0 Handler_read_rnd 2 Handler_read_rnd_deleted 1 -Handler_read_rnd_next 47 +Handler_read_rnd_next 39 SHOW STATUS LIKE 'Handler_tmp%'; Variable_name Value Handler_tmp_update 0 diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index d21402a336a..b91dd1b87ae 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -1,6 +1,6 @@ drop table if exists t1, t2; create table t1 (a date, b date, c date not null, d date); -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ','; Warnings: Warning 1265 Data truncated for column 'a' at row 1 Warning 1265 Data truncated for column 'c' at row 1 @@ -16,7 +16,7 @@ a b c d 2003-03-03 2003-03-03 2003-03-03 NULL 2003-03-03 2003-03-03 2003-03-03 NULL truncate table t1; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); Warnings: Warning 1265 Data truncated for column 'c' at row 1 Warning 1265 Data truncated for column 'd' at row 1 @@ -178,7 +178,7 @@ select @a, @b; @a @b NULL 15 truncate table t1; -load data infile '../../std_data/rpl_loaddata.dat' into table t1 set c=b; +load data infile '../../std_data/rpl_loaddata.dat' ignore into table t1 set c=b; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 2 doesn't contain data for all columns @@ -537,7 +537,7 @@ disconnect con1; # Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U # CREATE TABLE t1(f1 INT); -SELECT 0xE1C330 INTO OUTFILE 't1.dat'; +SELECT 0xE1BB30 INTO OUTFILE 't1.dat'; LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8; DROP TABLE t1; # @@ -562,34 +562,21 @@ FIELDS TERMINATED BY 't' LINES TERMINATED BY ''; Got one of the listed errors SET @@sql_mode= @old_mode; DROP TABLE t1; - # -# Bug#23080148 - Backport of Bug#20683959. -# Bug#20683959 LOAD DATA INFILE IGNORES A SPECIFIC ROW SILENTLY -# UNDER DB CHARSET IS UTF8. +# MDEV-11079 Regression: LOAD DATA INFILE lost BLOB support using utf8 load files # -CREATE DATABASE d1 CHARSET latin1; -USE d1; -CREATE TABLE t1 (val TEXT); -LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1; -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT HEX(val) FROM t1; -HEX(val) -C38322525420406E696F757A656368756E3A20E98198E2889AF58081AEE7B99DE4B88AE383A3E7B99DE69690F58087B3E7B9A7EFBDA8E7B99DEFBDB3E7B99DE78999E880B3E7B8BAEFBDAAE7B9A7E89699E296A1E7B8BAE4BBA3EFBD8CE7B8BAEFBDA9E7B8B2E2889AE38184E7B99DEFBDB3E7B99DE4B88AE383A3E7B99DE69690F58087B3E7B9A7EFBDA8E7B99DEFBDB3E7B99DE5B3A8EFBD84E8ABA0EFBDA8E89C89F580948EE599AAE7B8BAEFBDAAE7B8BAE9A198EFBDA9EFBDB1E7B9A7E581B5E289A0E7B8BAEFBDBEE7B9A7E9A194EFBDA9E882B4EFBDA5EFBDB5E980A7F5808B96E28693E99EABE38287E58F99E7B8BAE58AB1E28691E7B8BAF5808B9AE7828AE98095EFBDB1E7B8BAEFBDAFE7B8B2E288ABE6A89FE89EB3E6BA98F58081ADE88EA0EFBDBAE98095E6BA98F58081AEE89D93EFBDBAE8AD9BEFBDACE980A7F5808B96E28693E7B8BAF580918EE288AAE7B8BAE4B88AEFBC9EE7B8BAE4B99DE28691E7B8BAF5808B96EFBCA0E88DB3E6A68AEFBDB9EFBDB3E981B2E5B3A8E296A1E7B8BAE7A4BCE7828AE88DB3E6A68AEFBDB0EFBDBDE7B8BAA0E7B8BAE88B93EFBDBEE5B899EFBC9E -CREATE DATABASE d2 CHARSET utf8; -USE d2; -CREATE TABLE t1 (val TEXT); -LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1; -Warnings: -Warning 1366 Incorrect string value: '\xF5\x80\x81\xAE\xE7\xB9...' for column 'val' at row 1 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT HEX(val) FROM t1; -HEX(val) -C38322525420406E696F757A656368756E3A20E98198E2889A3F3F3F3FE7B99DE4B88AE383A3E7B99DE696903F3F3F3FE7B9A7EFBDA8E7B99DEFBDB3E7B99DE78999E880B3E7B8BAEFBDAAE7B9A7E89699E296A1E7B8BAE4BBA3EFBD8CE7B8BAEFBDA9E7B8B2E2889AE38184E7B99DEFBDB3E7B99DE4B88AE383A3E7B99DE696903F3F3F3FE7B9A7EFBDA8E7B99DEFBDB3E7B99DE5B3A8EFBD84E8ABA0EFBDA8E89C893F3F3F3FE599AAE7B8BAEFBDAAE7B8BAE9A198EFBDA9EFBDB1E7B9A7E581B5E289A0E7B8BAEFBDBEE7B9A7E9A194EFBDA9E882B4EFBDA5EFBDB5E980A73F3F3F3FE28693E99EABE38287E58F99E7B8BAE58AB1E28691E7B8BA3F3F3F3FE7828AE98095EFBDB1E7B8BAEFBDAFE7B8B2E288ABE6A89FE89EB3E6BA983F3F3F3FE88EA0EFBDBAE98095E6BA983F3F3F3FE89D93EFBDBAE8AD9BEFBDACE980A73F3F3F3FE28693E7B8BA3F3F3F3FE288AAE7B8BAE4B88AEFBC9EE7B8BAE4B99DE28691E7B8BA3F3F3F3FEFBCA0E88DB3E6A68AEFBDB9EFBDB3E981B2E5B3A8E296A1E7B8BAE7A4BCE7828AE88DB3E6A68AEFBDB0EFBDBDE7B8BA3FE7B8BAE88B93EFBDBEE5B899EFBC9E -DROP TABLE d1.t1, d2.t1; -DROP DATABASE d1; -DROP DATABASE d2; +CREATE TABLE t1 (a mediumblob NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +LOAD DATA INFILE '../../std_data/loaddata/mdev-11079.txt' INTO TABLE t1 CHARSET utf8 FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n'; +SELECT HEX(a) FROM t1; +HEX(a) +25AAABAC +DROP TABLE t1; +# +# MDEV-11631 LOAD DATA INFILE fails to load data with an escape character followed by a multi-byte character +# +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8); +LOAD DATA INFILE '../../std_data/loaddata/mdev-11631.txt' INTO TABLE t1 CHARACTER SET utf8; +SELECT HEX(a) FROM t1; +HEX(a) +C3A4 +DROP TABLE t1; diff --git a/mysql-test/r/loaddata_autocom_innodb.result b/mysql-test/r/loaddata_autocom_innodb.result index c1e6b7f2fba..9f5a0809f2a 100644 --- a/mysql-test/r/loaddata_autocom_innodb.result +++ b/mysql-test/r/loaddata_autocom_innodb.result @@ -2,7 +2,7 @@ SET SESSION STORAGE_ENGINE = InnoDB; drop table if exists t1; create table t1 (id int unsigned not null auto_increment primary key, a text, b text); start transaction; -load data infile 'LOAD_FILE' into table t1 fields terminated by ',' enclosed by '''' (a, b); +load data infile 'LOAD_FILE' ignore into table t1 fields terminated by ',' enclosed by '''' (a, b); Warnings: Warning 1261 Row 3 doesn't contain data for all columns commit; @@ -11,7 +11,7 @@ count(*) 4 truncate table t1; start transaction; -load data infile 'LOAD_FILE' into table t1 fields terminated by ',' enclosed by '''' (a, b); +load data infile 'LOAD_FILE' ignore into table t1 fields terminated by ',' enclosed by '''' (a, b); Warnings: Warning 1261 Row 3 doesn't contain data for all columns rollback; diff --git a/mysql-test/r/log_slow.result b/mysql-test/r/log_slow.result index 383ad10ba66..510bb929d84 100644 --- a/mysql-test/r/log_slow.result +++ b/mysql-test/r/log_slow.result @@ -9,10 +9,10 @@ select @@log_slow_verbosity; show variables like "log_slow%"; Variable_name Value -log_slow_admin_statements OFF +log_slow_admin_statements ON log_slow_filter admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk log_slow_rate_limit 1 -log_slow_slave_statements OFF +log_slow_slave_statements ON log_slow_verbosity set @org_slow_query_log= @@global.slow_query_log; set @@log_slow_filter= "filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk,admin"; @@ -70,9 +70,9 @@ sleep(0.5) select count(*) FROM mysql.slow_log; count(*) 1 -truncate mysql.slow_log; set @@long_query_time=default; set global slow_query_log= @org_slow_query_log; set @@log_slow_filter=default; set @@log_slow_verbosity=default; set global log_output= default; +truncate mysql.slow_log; diff --git a/mysql-test/r/log_state.result b/mysql-test/r/log_state.result index 8d79601d954..d4f98a6bde9 100644 --- a/mysql-test/r/log_state.result +++ b/mysql-test/r/log_state.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("options .* --log_slow_queries is not set"); SET @old_general_log= @@global.general_log; SET @old_general_log_file= @@global.general_log_file; SET @old_slow_query_log= @@global.slow_query_log; diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index eadc56ec267..da194c7e11c 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -2290,7 +2290,7 @@ CREATE TABLE t3(a int) ENGINE = MERGE UNION(t1, t2); CREATE TRIGGER tr1 AFTER INSERT ON t3 FOR EACH ROW CALL foo(); SHOW CREATE TRIGGER tr1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -tr1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER INSERT ON t3 FOR EACH ROW CALL foo() latin1 latin1_swedish_ci latin1_swedish_ci # +tr1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER INSERT ON t3 FOR EACH ROW CALL foo() latin1 latin1_swedish_ci latin1_swedish_ci # DROP TRIGGER tr1; DROP TABLE t1, t2, t3; # diff --git a/mysql-test/r/mix2_myisam.result b/mysql-test/r/mix2_myisam.result index 2971abb8a35..b282be15a56 100644 --- a/mysql-test/r/mix2_myisam.result +++ b/mysql-test/r/mix2_myisam.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Can't find record in .*"); SET SESSION STORAGE_ENGINE = MEMORY; drop table if exists t1,t2,t3,t4; drop database if exists mysqltest; @@ -1987,6 +1988,7 @@ create table t1 (v varchar(65530), key(v)); Warnings: Warning 1071 Specified key was too long; max key length is 1000 bytes drop table t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 (v varchar(65536)); Warnings: Note 1246 Converting column 'v' from VARCHAR to TEXT @@ -1996,6 +1998,7 @@ t1 CREATE TABLE `t1` ( `v` mediumtext DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 (v varchar(65530) character set utf8); Warnings: Note 1246 Converting column 'v' from VARCHAR to TEXT diff --git a/mysql-test/r/mrr_icp_extra.result b/mysql-test/r/mrr_icp_extra.result index b27413a1a21..5706bf21895 100644 --- a/mysql-test/r/mrr_icp_extra.result +++ b/mysql-test/r/mrr_icp_extra.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Can't find record in .*"); set @mrr_icp_extra_tmp=@@optimizer_switch; set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on'; SET NAMES latin1; diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 1ae05a8cff9..634b3897ba0 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -589,6 +589,7 @@ a b include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE t2,t1 SET t2.a=t1.a+2 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -602,6 +603,7 @@ ERROR 23000: Duplicate entry '4' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -660,11 +662,11 @@ SET SESSION sql_safe_updates = DEFAULT; CREATE FUNCTION f1 () RETURNS BLOB RETURN 1; CREATE TABLE t1 (f1 DATE); INSERT INTO t1 VALUES('2001-01-01'); -UPDATE (SELECT 1 FROM t1 WHERE f1 = (SELECT f1() FROM t1)) x, t1 SET f1 = 1; +UPDATE IGNORE (SELECT 1 FROM t1 WHERE f1 = (SELECT f1() FROM t1)) x, t1 SET f1 = 1; Warnings: Warning 1292 Incorrect datetime value: '1' CREATE view v1 as SELECT f1() FROM t1; -UPDATE (SELECT 1 FROM t1 WHERE f1 = (select * from v1)) x, t1 SET f1 = 1; +UPDATE IGNORE (SELECT 1 FROM t1 WHERE f1 = (select * from v1)) x, t1 SET f1 = 1; Warnings: Warning 1292 Incorrect datetime value: '1' DROP VIEW v1; diff --git a/mysql-test/r/myisam-blob.result b/mysql-test/r/myisam-blob.result index 6b41a244621..46be1bdbd49 100644 --- a/mysql-test/r/myisam-blob.result +++ b/mysql-test/r/myisam-blob.result @@ -28,6 +28,7 @@ INSERT INTO t1 set data=repeat('a',18*1024*1024); select length(data) from t1; length(data) 18874368 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify data blob; Warnings: Warning 1265 Data truncated for column 'data' at row 1 @@ -37,7 +38,7 @@ length(data) drop table t1; CREATE TABLE t1 (data BLOB) ENGINE=myisam; INSERT INTO t1 (data) VALUES (NULL); -UPDATE t1 set data=repeat('a',18*1024*1024); +UPDATE IGNORE t1 set data=repeat('a',18*1024*1024); Warnings: Warning 1265 Data truncated for column 'data' at row 1 select length(data) from t1; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index e0c7bb7c64e..f7eb5db6468 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1,3 +1,5 @@ +call mtr.add_suppression("Can't find record in '.*'"); +call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); drop table if exists t1,t2,t3; SET SQL_WARNINGS=1; CREATE TABLE t1 ( @@ -297,6 +299,7 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE `t1` ( `post_id` mediumint(8) unsigned NOT NULL auto_increment, `topic_id` mediumint(8) unsigned NOT NULL default '0', @@ -314,7 +317,7 @@ KEY `poster_login` (`poster_login`), KEY `topic_id` (`topic_id`), FULLTEXT KEY `post_text` (`post_text`) ) ENGINE=MyISAM; -INSERT INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'); +INSERT IGNORE INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'); REPAIR TABLE t1; Table Op Msg_type Msg_text test.t1 repair status OK @@ -1691,6 +1694,7 @@ create table t1 (v varchar(65530), key(v)); Warnings: Warning 1071 Specified key was too long; max key length is 1000 bytes drop table if exists t1; +set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for create table t1 (v varchar(65536)); Warnings: Note 1246 Converting column 'v' from VARCHAR to TEXT @@ -1700,6 +1704,7 @@ t1 CREATE TABLE `t1` ( `v` mediumtext DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for create table t1 (v varchar(65530) character set utf8); Warnings: Note 1246 Converting column 'v' from VARCHAR to TEXT diff --git a/mysql-test/r/myisam_enable_keys-10506.result b/mysql-test/r/myisam_enable_keys-10506.result index e7ffba787f0..77a5ba8a6ea 100644 --- a/mysql-test/r/myisam_enable_keys-10506.result +++ b/mysql-test/r/myisam_enable_keys-10506.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Can't find record in '.*'"); CREATE TABLE t1 ( pk INT AUTO_INCREMENT, i INT, diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result index 374d4e45139..458d0195a19 100644 --- a/mysql-test/r/myisam_icp.result +++ b/mysql-test/r/myisam_icp.result @@ -472,7 +472,7 @@ CREATE TABLE t2 ( t2_int int PRIMARY KEY, t2_int2 INT ); -INSERT INTO t2 VALUES (); +INSERT IGNORE INTO t2 VALUES (); INSERT INTO t1 VALUES (); SELECT * FROM t1 AS t1a WHERE NOT EXISTS (SELECT * FROM t1 AS t1b @@ -566,7 +566,7 @@ COL1000 VARBINARY(179) NOT NULL, col1003 DATE DEFAULT NULL, KEY idx4267 (col1000, col1003) ); -INSERT INTO t1 VALUES (),(); +INSERT IGNORE INTO t1 VALUES (),(); Warnings: Warning 1364 Field 'col999' doesn't have a default value Warning 1364 Field 'COL1000' doesn't have a default value @@ -847,7 +847,7 @@ Handler_icp_attempts 2 Handler_icp_match 1 DROP TABLE t1; create table t1 (a int,b char(5),primary key (a), key (b(1))); -insert into t1 values ('a','b'); +insert ignore into t1 values ('a','b'); Warnings: Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1 select 1 from t1 where a and b >= 'aa'; diff --git a/mysql-test/r/myisam_recover.result b/mysql-test/r/myisam_recover.result index 2e239cfc392..12184ad0ca6 100644 --- a/mysql-test/r/myisam_recover.result +++ b/mysql-test/r/myisam_recover.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); # # Tests for corrupted MyISAM tables and MyISAMMRG tables with corrupted # children.. diff --git a/mysql-test/r/mysqlbinlog-innodb.result b/mysql-test/r/mysqlbinlog-innodb.result index 9508f725ec4..2971a69fb4d 100644 --- a/mysql-test/r/mysqlbinlog-innodb.result +++ b/mysql-test/r/mysqlbinlog-innodb.result @@ -30,7 +30,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -61,7 +61,7 @@ use `foo`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 108e03e5a47..5ee31bbe227 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -23,7 +23,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -103,7 +103,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -139,7 +139,7 @@ BEGIN SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -190,7 +190,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -217,7 +217,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -297,7 +297,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -333,7 +333,7 @@ BEGIN SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -384,7 +384,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -493,7 +493,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -545,7 +545,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; diff --git a/mysql-test/r/mysqlbinlog_row_big.result b/mysql-test/r/mysqlbinlog_row_big.result index 32c6b4d40ed..a90ba9d79b6 100644 --- a/mysql-test/r/mysqlbinlog_row_big.result +++ b/mysql-test/r/mysqlbinlog_row_big.result @@ -96,6 +96,6 @@ FLUSH LOGS; # Cleanup. # # reset variable value to pass testcase checks -SET @@global.max_allowed_packet = 4194304; +SET @@global.max_allowed_packet = 16777216; DROP TABLE t1; remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_big_1.out diff --git a/mysql-test/r/mysqlbinlog_row_compressed.result b/mysql-test/r/mysqlbinlog_row_compressed.result index a612433fc2f..0583ee354df 100644 --- a/mysql-test/r/mysqlbinlog_row_compressed.result +++ b/mysql-test/r/mysqlbinlog_row_compressed.result @@ -34,7 +34,7 @@ use `test`/*!*/; SET TIMESTAMP=X/*!*/; SET @@session.pseudo_thread_id=4/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -56,9 +56,12 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN BEGIN /*!*/; # at 769 -# server id 1 end_log_pos 825 CRC32 XXX Table_map: `test`.`t1` mapped to number num -# at 825 -# server id 1 end_log_pos 893 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F +# at 843 +# server id 1 end_log_pos 843 CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "") +# server id 1 end_log_pos 899 CRC32 XXX Table_map: `test`.`t1` mapped to number num +# at 899 +# server id 1 end_log_pos 967 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1=10 /* INT meta=0 nullable=0 is_null=0 */ @@ -70,20 +73,23 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */ -# at 893 -# server id 1 end_log_pos 966 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 967 +# server id 1 end_log_pos 1040 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 966 -# server id 1 end_log_pos 1008 CRC32 XXX GTID 0-1-4 +# at 1040 +# server id 1 end_log_pos 1082 CRC32 XXX GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; BEGIN /*!*/; -# at 1008 -# server id 1 end_log_pos 1064 CRC32 XXX Table_map: `test`.`t1` mapped to number num -# at 1064 -# server id 1 end_log_pos 1131 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F +# at 1082 +# at 1158 +# server id 1 end_log_pos 1158 CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL) +# server id 1 end_log_pos 1214 CRC32 XXX Table_map: `test`.`t1` mapped to number num +# at 1214 +# server id 1 end_log_pos 1281 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1=11 /* INT meta=0 nullable=0 is_null=0 */ @@ -95,20 +101,23 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */ -# at 1131 -# server id 1 end_log_pos 1204 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 1281 +# server id 1 end_log_pos 1354 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 1204 -# server id 1 end_log_pos 1246 CRC32 XXX GTID 0-1-5 +# at 1354 +# server id 1 end_log_pos 1396 CRC32 XXX GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; BEGIN /*!*/; -# at 1246 -# server id 1 end_log_pos 1302 CRC32 XXX Table_map: `test`.`t1` mapped to number num -# at 1302 -# server id 1 end_log_pos 1368 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F +# at 1396 +# at 1474 +# server id 1 end_log_pos 1474 CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A") +# server id 1 end_log_pos 1530 CRC32 XXX Table_map: `test`.`t1` mapped to number num +# at 1530 +# server id 1 end_log_pos 1596 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1=12 /* INT meta=0 nullable=0 is_null=0 */ @@ -120,20 +129,23 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */ -# at 1368 -# server id 1 end_log_pos 1441 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 1596 +# server id 1 end_log_pos 1669 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 1441 -# server id 1 end_log_pos 1483 CRC32 XXX GTID 0-1-6 +# at 1669 +# server id 1 end_log_pos 1711 CRC32 XXX GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; BEGIN /*!*/; -# at 1483 -# server id 1 end_log_pos 1539 CRC32 XXX Table_map: `test`.`t1` mapped to number num -# at 1539 -# server id 1 end_log_pos 1606 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F +# at 1711 +# at 1786 +# server id 1 end_log_pos 1786 CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A") +# server id 1 end_log_pos 1842 CRC32 XXX Table_map: `test`.`t1` mapped to number num +# at 1842 +# server id 1 end_log_pos 1909 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1=13 /* INT meta=0 nullable=0 is_null=0 */ @@ -145,20 +157,23 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */ -# at 1606 -# server id 1 end_log_pos 1679 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 1909 +# server id 1 end_log_pos 1982 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 1679 -# server id 1 end_log_pos 1721 CRC32 XXX GTID 0-1-7 +# at 1982 +# server id 1 end_log_pos 2024 CRC32 XXX GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; BEGIN /*!*/; -# at 1721 -# server id 1 end_log_pos 1777 CRC32 XXX Table_map: `test`.`t2` mapped to number num -# at 1777 -# server id 1 end_log_pos 1868 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F +# at 2024 +# at 2078 +# server id 1 end_log_pos 2078 CRC32 XXX Annotate_rows: +#Q> INSERT INTO t2 SELECT * FROM t1 +# server id 1 end_log_pos 2134 CRC32 XXX Table_map: `test`.`t2` mapped to number num +# at 2134 +# server id 1 end_log_pos 2225 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F ### INSERT INTO `test`.`t2` ### SET ### @1=10 /* INT meta=0 nullable=0 is_null=0 */ @@ -203,20 +218,23 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */ -# at 1868 -# server id 1 end_log_pos 1941 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 2225 +# server id 1 end_log_pos 2298 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 1941 -# server id 1 end_log_pos 1983 CRC32 XXX GTID 0-1-8 +# at 2298 +# server id 1 end_log_pos 2340 CRC32 XXX GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; BEGIN /*!*/; -# at 1983 -# server id 1 end_log_pos 2039 CRC32 XXX Table_map: `test`.`t2` mapped to number num -# at 2039 -# server id 1 end_log_pos 2138 CRC32 XXX Update_compressed_rows: table id 31 flags: STMT_END_F +# at 2340 +# at 2406 +# server id 1 end_log_pos 2406 CRC32 XXX Annotate_rows: +#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL +# server id 1 end_log_pos 2462 CRC32 XXX Table_map: `test`.`t2` mapped to number num +# at 2462 +# server id 1 end_log_pos 2561 CRC32 XXX Update_compressed_rows: table id 31 flags: STMT_END_F ### UPDATE `test`.`t2` ### WHERE ### @1=10 /* INT meta=0 nullable=0 is_null=0 */ @@ -280,20 +298,23 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */ -# at 2138 -# server id 1 end_log_pos 2211 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 2561 +# server id 1 end_log_pos 2634 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 2211 -# server id 1 end_log_pos 2253 CRC32 XXX GTID 0-1-9 +# at 2634 +# server id 1 end_log_pos 2676 CRC32 XXX GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; BEGIN /*!*/; -# at 2253 -# server id 1 end_log_pos 2309 CRC32 XXX Table_map: `test`.`t1` mapped to number num -# at 2309 -# server id 1 end_log_pos 2401 CRC32 XXX Delete_compressed_rows: table id 30 flags: STMT_END_F +# at 2676 +# at 2713 +# server id 1 end_log_pos 2713 CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 +# server id 1 end_log_pos 2769 CRC32 XXX Table_map: `test`.`t1` mapped to number num +# at 2769 +# server id 1 end_log_pos 2861 CRC32 XXX Delete_compressed_rows: table id 30 flags: STMT_END_F ### DELETE FROM `test`.`t1` ### WHERE ### @1=10 /* INT meta=0 nullable=0 is_null=0 */ @@ -338,20 +359,23 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */ -# at 2401 -# server id 1 end_log_pos 2474 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 2861 +# server id 1 end_log_pos 2934 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 2474 -# server id 1 end_log_pos 2516 CRC32 XXX GTID 0-1-10 +# at 2934 +# server id 1 end_log_pos 2976 CRC32 XXX GTID 0-1-10 /*!100001 SET @@session.gtid_seq_no=10*//*!*/; BEGIN /*!*/; -# at 2516 -# server id 1 end_log_pos 2572 CRC32 XXX Table_map: `test`.`t2` mapped to number num -# at 2572 -# server id 1 end_log_pos 2657 CRC32 XXX Delete_compressed_rows: table id 31 flags: STMT_END_F +# at 2976 +# at 3013 +# server id 1 end_log_pos 3013 CRC32 XXX Annotate_rows: +#Q> DELETE FROM t2 +# server id 1 end_log_pos 3069 CRC32 XXX Table_map: `test`.`t2` mapped to number num +# at 3069 +# server id 1 end_log_pos 3154 CRC32 XXX Delete_compressed_rows: table id 31 flags: STMT_END_F ### DELETE FROM `test`.`t2` ### WHERE ### @1=10 /* INT meta=0 nullable=0 is_null=0 */ @@ -396,13 +420,13 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */ -# at 2657 -# server id 1 end_log_pos 2730 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 3154 +# server id 1 end_log_pos 3227 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 2730 -# server id 1 end_log_pos 2778 CRC32 XXX Rotate to master-bin.000002 pos: 4 +# at 3227 +# server id 1 end_log_pos 3275 CRC32 XXX Rotate to master-bin.000002 pos: 4 DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; diff --git a/mysql-test/r/mysqlbinlog_row_minimal.result b/mysql-test/r/mysqlbinlog_row_minimal.result index 2fb721d4103..6d36ec0e82f 100644 --- a/mysql-test/r/mysqlbinlog_row_minimal.result +++ b/mysql-test/r/mysqlbinlog_row_minimal.result @@ -32,7 +32,7 @@ use `test`/*!*/; SET TIMESTAMP=X/*!*/; SET @@session.pseudo_thread_id=4/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -54,9 +54,12 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN BEGIN /*!*/; # at 816 -# server id 1 end_log_pos 872 CRC32 XXX Table_map: `test`.`t1` mapped to number num -# at 872 -# server id 1 end_log_pos 941 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F +# at 890 +# server id 1 end_log_pos 890 CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "") +# server id 1 end_log_pos 946 CRC32 XXX Table_map: `test`.`t1` mapped to number num +# at 946 +# server id 1 end_log_pos 1015 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1=10 /* INT meta=0 nullable=0 is_null=0 */ @@ -68,20 +71,23 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */ -# at 941 -# server id 1 end_log_pos 1014 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 1015 +# server id 1 end_log_pos 1088 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 1014 -# server id 1 end_log_pos 1056 CRC32 XXX GTID 0-1-4 +# at 1088 +# server id 1 end_log_pos 1130 CRC32 XXX GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; BEGIN /*!*/; -# at 1056 -# server id 1 end_log_pos 1112 CRC32 XXX Table_map: `test`.`t1` mapped to number num -# at 1112 -# server id 1 end_log_pos 1180 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F +# at 1130 +# at 1206 +# server id 1 end_log_pos 1206 CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL) +# server id 1 end_log_pos 1262 CRC32 XXX Table_map: `test`.`t1` mapped to number num +# at 1262 +# server id 1 end_log_pos 1330 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1=11 /* INT meta=0 nullable=0 is_null=0 */ @@ -93,20 +99,23 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */ -# at 1180 -# server id 1 end_log_pos 1253 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 1330 +# server id 1 end_log_pos 1403 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 1253 -# server id 1 end_log_pos 1295 CRC32 XXX GTID 0-1-5 +# at 1403 +# server id 1 end_log_pos 1445 CRC32 XXX GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; BEGIN /*!*/; -# at 1295 -# server id 1 end_log_pos 1351 CRC32 XXX Table_map: `test`.`t1` mapped to number num -# at 1351 -# server id 1 end_log_pos 1418 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F +# at 1445 +# at 1523 +# server id 1 end_log_pos 1523 CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A") +# server id 1 end_log_pos 1579 CRC32 XXX Table_map: `test`.`t1` mapped to number num +# at 1579 +# server id 1 end_log_pos 1646 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1=12 /* INT meta=0 nullable=0 is_null=0 */ @@ -118,20 +127,23 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */ -# at 1418 -# server id 1 end_log_pos 1491 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 1646 +# server id 1 end_log_pos 1719 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 1491 -# server id 1 end_log_pos 1533 CRC32 XXX GTID 0-1-6 +# at 1719 +# server id 1 end_log_pos 1761 CRC32 XXX GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; BEGIN /*!*/; -# at 1533 -# server id 1 end_log_pos 1589 CRC32 XXX Table_map: `test`.`t1` mapped to number num -# at 1589 -# server id 1 end_log_pos 1659 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F +# at 1761 +# at 1836 +# server id 1 end_log_pos 1836 CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A") +# server id 1 end_log_pos 1892 CRC32 XXX Table_map: `test`.`t1` mapped to number num +# at 1892 +# server id 1 end_log_pos 1962 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1=13 /* INT meta=0 nullable=0 is_null=0 */ @@ -143,20 +155,23 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */ -# at 1659 -# server id 1 end_log_pos 1732 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 1962 +# server id 1 end_log_pos 2035 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 1732 -# server id 1 end_log_pos 1774 CRC32 XXX GTID 0-1-7 +# at 2035 +# server id 1 end_log_pos 2077 CRC32 XXX GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; BEGIN /*!*/; -# at 1774 -# server id 1 end_log_pos 1830 CRC32 XXX Table_map: `test`.`t2` mapped to number num -# at 1830 -# server id 1 end_log_pos 1997 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F +# at 2077 +# at 2131 +# server id 1 end_log_pos 2131 CRC32 XXX Annotate_rows: +#Q> INSERT INTO t2 SELECT * FROM t1 +# server id 1 end_log_pos 2187 CRC32 XXX Table_map: `test`.`t2` mapped to number num +# at 2187 +# server id 1 end_log_pos 2354 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F ### INSERT INTO `test`.`t2` ### SET ### @1=10 /* INT meta=0 nullable=0 is_null=0 */ @@ -201,20 +216,23 @@ BEGIN ### @7=6 /* INT meta=0 nullable=1 is_null=0 */ ### @8=7 /* INT meta=0 nullable=1 is_null=0 */ ### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */ -# at 1997 -# server id 1 end_log_pos 2070 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 2354 +# server id 1 end_log_pos 2427 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 2070 -# server id 1 end_log_pos 2112 CRC32 XXX GTID 0-1-8 +# at 2427 +# server id 1 end_log_pos 2469 CRC32 XXX GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; BEGIN /*!*/; -# at 2112 -# server id 1 end_log_pos 2168 CRC32 XXX Table_map: `test`.`t2` mapped to number num -# at 2168 -# server id 1 end_log_pos 2242 CRC32 XXX Update_rows: table id 31 flags: STMT_END_F +# at 2469 +# at 2535 +# server id 1 end_log_pos 2535 CRC32 XXX Annotate_rows: +#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL +# server id 1 end_log_pos 2591 CRC32 XXX Table_map: `test`.`t2` mapped to number num +# at 2591 +# server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 31 flags: STMT_END_F ### UPDATE `test`.`t2` ### WHERE ### @1=10 /* INT meta=0 nullable=0 is_null=0 */ @@ -233,20 +251,23 @@ BEGIN ### @5=NULL /* INT meta=0 nullable=1 is_null=1 */ ### SET ### @5=5 /* INT meta=0 nullable=1 is_null=0 */ -# at 2242 -# server id 1 end_log_pos 2315 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 2665 +# server id 1 end_log_pos 2738 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 2315 -# server id 1 end_log_pos 2357 CRC32 XXX GTID 0-1-9 +# at 2738 +# server id 1 end_log_pos 2780 CRC32 XXX GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; BEGIN /*!*/; -# at 2357 -# server id 1 end_log_pos 2413 CRC32 XXX Table_map: `test`.`t1` mapped to number num -# at 2413 -# server id 1 end_log_pos 2467 CRC32 XXX Delete_rows: table id 30 flags: STMT_END_F +# at 2780 +# at 2817 +# server id 1 end_log_pos 2817 CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 +# server id 1 end_log_pos 2873 CRC32 XXX Table_map: `test`.`t1` mapped to number num +# at 2873 +# server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 30 flags: STMT_END_F ### DELETE FROM `test`.`t1` ### WHERE ### @1=10 /* INT meta=0 nullable=0 is_null=0 */ @@ -259,20 +280,23 @@ BEGIN ### DELETE FROM `test`.`t1` ### WHERE ### @1=13 /* INT meta=0 nullable=0 is_null=0 */ -# at 2467 -# server id 1 end_log_pos 2540 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 2927 +# server id 1 end_log_pos 3000 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 2540 -# server id 1 end_log_pos 2582 CRC32 XXX GTID 0-1-10 +# at 3000 +# server id 1 end_log_pos 3042 CRC32 XXX GTID 0-1-10 /*!100001 SET @@session.gtid_seq_no=10*//*!*/; BEGIN /*!*/; -# at 2582 -# server id 1 end_log_pos 2638 CRC32 XXX Table_map: `test`.`t2` mapped to number num -# at 2638 -# server id 1 end_log_pos 2692 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F +# at 3042 +# at 3079 +# server id 1 end_log_pos 3079 CRC32 XXX Annotate_rows: +#Q> DELETE FROM t2 +# server id 1 end_log_pos 3135 CRC32 XXX Table_map: `test`.`t2` mapped to number num +# at 3135 +# server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F ### DELETE FROM `test`.`t2` ### WHERE ### @1=10 /* INT meta=0 nullable=0 is_null=0 */ @@ -285,13 +309,13 @@ BEGIN ### DELETE FROM `test`.`t2` ### WHERE ### @1=13 /* INT meta=0 nullable=0 is_null=0 */ -# at 2692 -# server id 1 end_log_pos 2765 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 +# at 3189 +# server id 1 end_log_pos 3262 CRC32 XXX Query thread_id=4 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; COMMIT /*!*/; -# at 2765 -# server id 1 end_log_pos 2813 CRC32 XXX Rotate to master-bin.000002 pos: 4 +# at 3262 +# server id 1 end_log_pos 3310 CRC32 XXX Rotate to master-bin.000002 pos: 4 DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; diff --git a/mysql-test/r/mysqlbinlog_stmt_compressed.result b/mysql-test/r/mysqlbinlog_stmt_compressed.result index 99f9c7e9914..cb268cac0d4 100644 --- a/mysql-test/r/mysqlbinlog_stmt_compressed.result +++ b/mysql-test/r/mysqlbinlog_stmt_compressed.result @@ -34,7 +34,7 @@ use `test`/*!*/; SET TIMESTAMP=X/*!*/; SET @@session.pseudo_thread_id=4/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; diff --git a/mysql-test/r/mysqld--help,win.rdiff b/mysql-test/r/mysqld--help,win.rdiff index 4d66e8bad60..b1544862a59 100644 --- a/mysql-test/r/mysqld--help,win.rdiff +++ b/mysql-test/r/mysqld--help,win.rdiff @@ -1,5 +1,5 @@ ---- mysqld--help.result 2016-09-21 13:50:58.682767100 +0000 -+++ mysqld--help,win.reject 2016-09-21 13:57:57.494626000 +0000 +--- mysqld--help.result 2016-11-04 13:35:06.665881700 +0000 ++++ mysqld--help,win.reject 2016-11-04 13:58:39.030512500 +0000 @@ -318,7 +318,6 @@ The number of segments in a key cache -L, --language=name Client error messages in given language. May be given as @@ -8,7 +8,7 @@ --lc-messages=name Set the language used for the error messages. -L, --lc-messages-dir=name Directory where error messages are -@@ -517,6 +516,7 @@ +@@ -521,6 +520,7 @@ Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME, DATETIME, TIMESTAMP columns. (Defaults to on; use --skip-mysql56-temporal-format to disable.) @@ -16,7 +16,7 @@ --net-buffer-length=# Buffer length for TCP/IP and socket communication --net-read-timeout=# -@@ -924,6 +924,9 @@ +@@ -931,6 +931,9 @@ characteristics (isolation level, read only/read write,snapshot - but not any work done / data modified within the transaction). @@ -26,7 +26,7 @@ --show-slave-auth-info Show user and password in SHOW SLAVE HOSTS on this master. -@@ -1036,6 +1039,10 @@ +@@ -1043,6 +1046,10 @@ Log slow queries to given log file. Defaults logging to 'hostname'-slow.log. Must be enabled to activate other slow log options @@ -37,15 +37,15 @@ --socket=name Socket file to use for connection --sort-buffer-size=# Each thread that needs to do a sort allocates a buffer of -@@ -1054,6 +1061,7 @@ +@@ -1061,6 +1068,7 @@ NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH --stack-trace Print a symbolic stack trace on failure (Defaults to on; use --skip-stack-trace to disable.) + --standalone Dummy option to start as a standalone program (NT). - --standards-compliant-cte + --standard-compliant-cte Allow only standards compiant CTE (Defaults to on; use --skip-standards-compliant-cte to disable.) -@@ -1102,6 +1110,11 @@ +@@ -1109,6 +1117,11 @@ --thread-pool-max-threads=# Maximum allowed number of worker threads in the thread pool @@ -57,7 +57,7 @@ --thread-pool-oversubscribe=# How many additional active worker threads in a group are allowed. -@@ -1132,8 +1145,8 @@ +@@ -1139,8 +1152,8 @@ size, MySQL will automatically convert it to an on-disk MyISAM or Aria table -t, --tmpdir=name Path for temporary files. Several paths may be specified, @@ -68,7 +68,7 @@ --transaction-alloc-block-size=# Allocation block size for transactions to be stored in binary log -@@ -1257,7 +1270,6 @@ +@@ -1264,7 +1277,6 @@ key-cache-division-limit 100 key-cache-file-hash-size 512 key-cache-segments 0 @@ -76,7 +76,7 @@ lc-messages en_US lc-messages-dir MYSQL_SHAREDIR/ lc-time-names en_US -@@ -1324,6 +1336,7 @@ +@@ -1333,6 +1345,7 @@ myisam-stats-method NULLS_UNEQUAL myisam-use-mmap FALSE mysql56-temporal-format TRUE @@ -84,7 +84,7 @@ net-buffer-length 16384 net-read-timeout 30 net-retry-count 10 -@@ -1424,6 +1437,8 @@ +@@ -1434,6 +1447,8 @@ session-track-state-change FALSE session-track-system-variables session-track-transaction-info OFF @@ -93,7 +93,7 @@ show-slave-auth-info FALSE silent-startup FALSE skip-grant-tables TRUE -@@ -1448,6 +1463,7 @@ +@@ -1458,6 +1473,7 @@ slave-type-conversions slow-launch-time 2 slow-query-log FALSE @@ -101,7 +101,7 @@ sort-buffer-size 2097152 sql-mode NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION stack-trace TRUE -@@ -1461,14 +1477,16 @@ +@@ -1471,14 +1487,16 @@ sync-relay-log 10000 sync-relay-log-info 10000 sysdate-is-now FALSE @@ -114,7 +114,7 @@ tc-heuristic-recover OFF thread-cache-size 151 thread-pool-idle-timeout 60 - thread-pool-max-threads 1000 + thread-pool-max-threads 65536 +thread-pool-min-threads 1 +thread-pool-mode windows thread-pool-oversubscribe 3 diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index 203921ce08f..2541687a729 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -33,6 +33,7 @@ The following options may be given as the first argument: --binlog-annotate-row-events Tells the master to annotate RBR events with the statement that caused these events + (Defaults to on; use --skip-binlog-annotate-row-events to disable.) --binlog-cache-size=# The size of the transactional cache for updates to transactional engines for the binary log. If you often @@ -208,6 +209,9 @@ The following options may be given as the first argument: --extra-port=# Extra port number to use for tcp connections in a one-thread-per-connection manner. 0 means don't use another port + --flashback Setup the server to use flashback. This enables binary + log in row mode and will enable extra logging for DDL's + needed by flashback feature --flush Flush MyISAM tables to disk between SQL commands --flush-time=# A dedicated thread is created to flush all tables at the given interval @@ -235,7 +239,7 @@ The following options may be given as the first argument: prefixes. (Defaults to on; use --skip-getopt-prefix-matching to disable.) --group-concat-max-len=# - The maximum length of the result of function + The maximum length of the result of function GROUP_CONCAT() --gtid-domain-id=# Used with global transaction ID to identify logically independent replication streams. When events can @@ -376,6 +380,7 @@ The following options may be given as the first argument: --log-slow-admin-statements Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open. + (Defaults to on; use --skip-log-slow-admin-statements to disable.) --log-slow-filter=name Log only certain types of queries. Any combination of: admin, filesort, filesort_on_disk, full_join, full_scan, @@ -388,6 +393,7 @@ The following options may be given as the first argument: --log-slow-slave-statements Log slow statements executed by slave thread to the slow log if it is open. + (Defaults to on; use --skip-log-slow-slave-statements to disable.) --log-slow-verbosity=name Verbosity level for the slow log. Any combination of: innodb, query_plan, explain @@ -461,16 +467,20 @@ The following options may be given as the first argument: --max-seeks-for-key=# Limit assumed max number of seeks when looking up rows based on a key + --max-session-mem-used=# + Amount of memory a single user session is allowed to + allocate. This limits the value of the session variable + MEM_USED --max-sort-length=# The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored) --max-sp-recursion-depth[=#] Maximum stored procedure recursion depth --max-statement-time=# - A SELECT query that have taken more than - max_statement_time seconds will be aborted. The argument - will be treated as a decimal value with microsecond - precision. A value of 0 (default) means no timeout + A query that has taken more than max_statement_time + seconds will be aborted. The argument will be treated as + a decimal value with microsecond precision. A value of 0 + (default) means no timeout --max-tmp-tables=# Unused, will be removed. --max-user-connections=# The maximum number of active connections for a single @@ -813,6 +823,7 @@ The following options may be given as the first argument: Tells the slave to write annotate rows events received from the master to its own binary log. Ignored if log_slave_updates is not set + (Defaults to on; use --skip-replicate-annotate-row-events to disable.) --replicate-do-db=name Tells the slave thread to restrict replication to the specified database. To specify more than one database, @@ -1061,9 +1072,9 @@ The following options may be given as the first argument: NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH --stack-trace Print a symbolic stack trace on failure (Defaults to on; use --skip-stack-trace to disable.) - --standards-compliant-cte - Allow only standards compiant CTE - (Defaults to on; use --skip-standards-compliant-cte to disable.) + --standard-compliant-cte + Allow only CTEs compliant to SQL standard + (Defaults to on; use --skip-standard-compliant-cte to disable.) --stored-program-cache=# The soft upper limit for number of cached stored routines for one connection. @@ -1183,15 +1194,15 @@ automatic-sp-privileges TRUE back-log 80 big-tables FALSE bind-address (No default value) -binlog-annotate-row-events FALSE +binlog-annotate-row-events TRUE binlog-cache-size 32768 binlog-checksum CRC32 binlog-commit-wait-count 0 binlog-commit-wait-usec 100000 binlog-direct-non-transactional-updates FALSE -binlog-format STATEMENT +binlog-format MIXED binlog-optimize-thread-scheduling TRUE -binlog-row-event-max-size 1024 +binlog-row-event-max-size 8192 binlog-row-image FULL binlog-stmt-cache-size 32768 bulk-insert-buffer-size 8388608 @@ -1229,6 +1240,7 @@ explicit-defaults-for-timestamp FALSE external-locking FALSE extra-max-connections 1 extra-port 0 +flashback FALSE flush FALSE flush-time 0 ft-boolean-syntax + -><()~*:""&| @@ -1239,7 +1251,7 @@ ft-stopword-file (No default value) gdb FALSE general-log FALSE getopt-prefix-matching TRUE -group-concat-max-len 1024 +group-concat-max-len 1048576 gtid-domain-id 0 gtid-ignore-duplicates FALSE gtid-strict-mode FALSE @@ -1269,7 +1281,7 @@ lc-messages en_US lc-messages-dir MYSQL_SHAREDIR/ lc-time-names en_US local-infile TRUE -lock-wait-timeout 31536000 +lock-wait-timeout 86400 log-bin (No default value) log-bin-compress FALSE log-bin-compress-min-len 256 @@ -1281,20 +1293,20 @@ log-output FILE log-queries-not-using-indexes FALSE log-short-format FALSE log-slave-updates FALSE -log-slow-admin-statements FALSE +log-slow-admin-statements TRUE log-slow-filter admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk log-slow-rate-limit 1 -log-slow-slave-statements FALSE +log-slow-slave-statements TRUE log-slow-verbosity log-tc tc.log -log-warnings 1 +log-warnings 2 long-query-time 10 low-priority-updates FALSE lower-case-table-names 1 master-info-file master.info master-retry-count 86400 master-verify-checksum FALSE -max-allowed-packet 4194304 +max-allowed-packet 16777216 max-binlog-cache-size 18446744073709547520 max-binlog-size 1073741824 max-binlog-stmt-cache-size 18446744073709547520 @@ -1306,11 +1318,12 @@ max-error-count 64 max-heap-table-size 16777216 max-join-size 18446744073709551615 max-length-for-sort-data 1024 -max-long-data-size 4194304 +max-long-data-size 16777216 max-prepared-stmt-count 16382 max-recursive-iterations 18446744073709551615 max-relay-log-size 1073741824 max-seeks-for-key 18446744073709551615 +max-session-mem-used 9223372036854775807 max-sort-length 1024 max-sp-recursion-depth 0 max-statement-time 0 @@ -1327,7 +1340,7 @@ myisam-block-size 1024 myisam-data-pointer-size 6 myisam-max-sort-file-size 9223372036853727232 myisam-mmap-size 18446744073709551615 -myisam-recover-options DEFAULT +myisam-recover-options BACKUP,QUICK myisam-repair-threads 1 myisam-sort-buffer-size 134216704 myisam-stats-method NULLS_UNEQUAL @@ -1383,7 +1396,7 @@ performance-schema-max-rwlock-instances -1 performance-schema-max-socket-classes 10 performance-schema-max-socket-instances -1 performance-schema-max-stage-classes 150 -performance-schema-max-statement-classes 185 +performance-schema-max-statement-classes 187 performance-schema-max-table-handles -1 performance-schema-max-table-instances -1 performance-schema-max-thread-classes 50 @@ -1418,7 +1431,7 @@ relay-log-info-file relay-log.info relay-log-purge TRUE relay-log-recovery FALSE relay-log-space-limit 0 -replicate-annotate-row-events FALSE +replicate-annotate-row-events TRUE replicate-events-marked-for-skip REPLICATE replicate-same-server-id FALSE report-host (No default value) @@ -1446,7 +1459,7 @@ slave-ddl-exec-mode IDEMPOTENT slave-domain-parallel-threads 0 slave-exec-mode STRICT slave-max-allowed-packet 1073741824 -slave-net-timeout 3600 +slave-net-timeout 60 slave-parallel-max-queued 131072 slave-parallel-mode conservative slave-parallel-threads 0 @@ -1459,9 +1472,9 @@ slave-type-conversions slow-launch-time 2 slow-query-log FALSE sort-buffer-size 2097152 -sql-mode NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +sql-mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION stack-trace TRUE -standards-compliant-cte TRUE +standard-compliant-cte TRUE stored-program-cache 256 strict-password-validation TRUE symbolic-links FALSE @@ -1478,7 +1491,7 @@ table-open-cache-instances 8 tc-heuristic-recover OFF thread-cache-size 151 thread-pool-idle-timeout 60 -thread-pool-max-threads 1000 +thread-pool-max-threads 65536 thread-pool-oversubscribe 3 thread-pool-prio-kickup-timer 1000 thread-pool-priority auto diff --git a/mysql-test/r/mysqldump-nl.result b/mysql-test/r/mysqldump-nl.result index 829bf980103..db327736551 100644 --- a/mysql-test/r/mysqldump-nl.result +++ b/mysql-test/r/mysqldump-nl.result @@ -71,7 +71,7 @@ SET character_set_client = @saved_cs_client; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `sp`() select * from `v1 diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index dae6aaf776f..277c7ab64dc 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -47,7 +47,7 @@ DROP TABLE t1; # Bug#2055 mysqldump should replace "-inf" numeric field values with "NULL" # CREATE TABLE t1 (a double); -INSERT INTO t1 VALUES ('-9e999999'); +INSERT IGNORE INTO t1 VALUES ('-9e999999'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2468,10 +2468,10 @@ if new.a > 10 then set new.a := 10; set new.a := 11; end if; -end BEFORE 0000-00-00 00:00:00 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +end BEFORE 0000-00-00 00:00:00 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci trg2 UPDATE t1 begin if old.a % 2 = 0 then set new.b := 12; end if; -end BEFORE 0000-00-00 00:00:00 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +end BEFORE 0000-00-00 00:00:00 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci trg3 UPDATE t1 begin if new.a = -1 then set @fired:= "Yes"; @@ -2515,7 +2515,7 @@ UNLOCK TABLES; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 trigger trg1 before insert on t1 for each row begin @@ -2536,7 +2536,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 trigger trg2 before update on t1 for each row begin if old.a % 2 = 0 then set new.b := 12; end if; @@ -2671,10 +2671,10 @@ if new.a > 10 then set new.a := 10; set new.a := 11; end if; -end BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +end BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci trg2 UPDATE t1 begin if old.a % 2 = 0 then set new.b := 12; end if; -end BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +end BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci trg3 UPDATE t1 begin if new.a = -1 then set @fired:= "Yes"; @@ -2717,7 +2717,7 @@ a2 SHOW TRIGGERS; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation testref INSERT test1 BEGIN -INSERT INTO test2 SET a2 = NEW.a1; END BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +INSERT INTO test2 SET a2 = NEW.a1; END BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci SELECT * FROM `test1`; a1 1 @@ -2789,7 +2789,7 @@ UNLOCK TABLES; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` FUNCTION `bug9056_func1`(a INT, b INT) RETURNS int(11) RETURN a+b ;; @@ -2806,7 +2806,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` FUNCTION `bug9056_func2`(f1 char binary) RETURNS char(1) CHARSET latin1 begin @@ -2843,7 +2843,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug9056_proc1`(IN a INT, IN b INT, OUT c INT) BEGIN SELECT a+b INTO c; end ;; @@ -2860,7 +2860,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug9056_proc2`(OUT a INT) BEGIN @@ -3861,7 +3861,7 @@ create procedure mysqldump_test_db.sp1() select 'hello'; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`user1`@`%` PROCEDURE `sp1`() select 'hello' ;; diff --git a/mysql-test/r/mysqlhotcopy_myisam.result b/mysql-test/r/mysqlhotcopy_myisam.result index 52aeffce5cf..6080697a7a1 100644 --- a/mysql-test/r/mysqlhotcopy_myisam.result +++ b/mysql-test/r/mysqlhotcopy_myisam.result @@ -6,13 +6,13 @@ CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=MyISAM; CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb'); Warnings: -Warning 1265 Data truncated for column 'c2' at row 2 +Warning 1406 Data too long for column 'c2' at row 2 INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb'); Warnings: -Warning 1265 Data truncated for column 'c2' at row 2 +Warning 1406 Data too long for column 'c2' at row 2 INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb'); Warnings: -Warning 1265 Data truncated for column 'c2' at row 2 +Warning 1406 Data too long for column 'c2' at row 2 db.opt t1.MYD t1.MYI diff --git a/mysql-test/r/no_password_column-mdev-11170.result b/mysql-test/r/no_password_column-mdev-11170.result new file mode 100644 index 00000000000..81eecc95558 --- /dev/null +++ b/mysql-test/r/no_password_column-mdev-11170.result @@ -0,0 +1,168 @@ +# +# MDEV-11170: MariaDB 10.2 cannot start on MySQL 5.7 datadir: +# Fatal error: mysql.user table is damaged or in +# unsupported 3.20 format +# +create table backup_user like mysql.user; +insert into backup_user select * from mysql.user; +# +# Original mysql.user table +# +describe mysql.user; +Field Type Null Key Default Extra +Host char(60) NO PRI +User char(80) NO PRI +Password char(41) NO +Select_priv enum('N','Y') NO N +Insert_priv enum('N','Y') NO N +Update_priv enum('N','Y') NO N +Delete_priv enum('N','Y') NO N +Create_priv enum('N','Y') NO N +Drop_priv enum('N','Y') NO N +Reload_priv enum('N','Y') NO N +Shutdown_priv enum('N','Y') NO N +Process_priv enum('N','Y') NO N +File_priv enum('N','Y') NO N +Grant_priv enum('N','Y') NO N +References_priv enum('N','Y') NO N +Index_priv enum('N','Y') NO N +Alter_priv enum('N','Y') NO N +Show_db_priv enum('N','Y') NO N +Super_priv enum('N','Y') NO N +Create_tmp_table_priv enum('N','Y') NO N +Lock_tables_priv enum('N','Y') NO N +Execute_priv enum('N','Y') NO N +Repl_slave_priv enum('N','Y') NO N +Repl_client_priv enum('N','Y') NO N +Create_view_priv enum('N','Y') NO N +Show_view_priv enum('N','Y') NO N +Create_routine_priv enum('N','Y') NO N +Alter_routine_priv enum('N','Y') NO N +Create_user_priv enum('N','Y') NO N +Event_priv enum('N','Y') NO N +Trigger_priv enum('N','Y') NO N +Create_tablespace_priv enum('N','Y') NO N +ssl_type enum('','ANY','X509','SPECIFIED') NO +ssl_cipher blob NO NULL +x509_issuer blob NO NULL +x509_subject blob NO NULL +max_questions int(11) unsigned NO 0 +max_updates int(11) unsigned NO 0 +max_connections int(11) unsigned NO 0 +max_user_connections int(11) NO 0 +plugin char(64) NO +authentication_string text NO NULL +password_expired enum('N','Y') NO N +is_role enum('N','Y') NO N +default_role char(80) NO +max_statement_time decimal(12,6) NO 0.000000 +# +# Drop the password column. +# +alter table mysql.user drop column password; +flush privileges; +# +# Create users without the password column present. +# +create user foo; +create user goo identified by "foo"; +select OLD_PASSWORD("ioo"); +OLD_PASSWORD("ioo") +7a8f886d28473e85 +create user ioo identified with "mysql_old_password" as "7a8f886d28473e85"; +# +# Check if users have grants loaded correctly. +# +show grants for foo; +Grants for foo@% +GRANT USAGE ON *.* TO 'foo'@'%' +show grants for goo; +Grants for goo@% +GRANT USAGE ON *.* TO 'goo'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' +show grants for ioo; +Grants for ioo@% +GRANT USAGE ON *.* TO 'ioo'@'%' IDENTIFIED BY PASSWORD '7a8f886d28473e85' +select user, host, select_priv, plugin, authentication_string from mysql.user +where user like "%oo" +order by user; +user host select_priv plugin authentication_string +foo % N +goo % N mysql_native_password *F3A2A51A9B0F2BE2468926B4132313728C250DBF +ioo % N mysql_old_password 7a8f886d28473e85 +# +# Test setting password. +# +SET PASSWORD FOR foo=PASSWORD("bar"); +show grants for foo; +Grants for foo@% +GRANT USAGE ON *.* TO 'foo'@'%' IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' +show grants for goo; +Grants for goo@% +GRANT USAGE ON *.* TO 'goo'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' +show grants for ioo; +Grants for ioo@% +GRANT USAGE ON *.* TO 'ioo'@'%' IDENTIFIED BY PASSWORD '7a8f886d28473e85' +select user, host, select_priv, plugin, authentication_string from mysql.user +where user like "%oo" +order by user; +user host select_priv plugin authentication_string +foo % N mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB +goo % N mysql_native_password *F3A2A51A9B0F2BE2468926B4132313728C250DBF +ioo % N mysql_old_password 7a8f886d28473e85 +# +# Test flush privileges without password column. +# +flush privileges; +show grants for foo; +Grants for foo@% +GRANT USAGE ON *.* TO 'foo'@'%' IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' +show grants for goo; +Grants for goo@% +GRANT USAGE ON *.* TO 'goo'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' +show grants for ioo; +Grants for ioo@% +GRANT USAGE ON *.* TO 'ioo'@'%' IDENTIFIED BY PASSWORD '7a8f886d28473e85' +# +# Test granting of privileges. +# +grant select on *.* to foo; +grant select on *.* to goo; +grant select on *.* to ioo; +show grants for foo; +Grants for foo@% +GRANT SELECT ON *.* TO 'foo'@'%' IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' +show grants for goo; +Grants for goo@% +GRANT SELECT ON *.* TO 'goo'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' +show grants for ioo; +Grants for ioo@% +GRANT SELECT ON *.* TO 'ioo'@'%' IDENTIFIED BY PASSWORD '7a8f886d28473e85' +# +# Check to see if grants are stable on flush. +# +flush privileges; +show grants for foo; +Grants for foo@% +GRANT SELECT ON *.* TO 'foo'@'%' IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' +show grants for goo; +Grants for goo@% +GRANT SELECT ON *.* TO 'goo'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' +show grants for ioo; +Grants for ioo@% +GRANT SELECT ON *.* TO 'ioo'@'%' IDENTIFIED BY PASSWORD '7a8f886d28473e85' +# +# Check internal table representation. +# +select user, host, select_priv, plugin, authentication_string from mysql.user +where user like "%oo" +order by user; +user host select_priv plugin authentication_string +foo % Y mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB +goo % Y mysql_native_password *F3A2A51A9B0F2BE2468926B4132313728C250DBF +ioo % Y mysql_old_password 7a8f886d28473e85 +# +# Reset to final original state. +# +drop table mysql.user; +rename table backup_user to mysql.user; +flush privileges; diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 1c88a607541..0ff5c3243d8 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -2,6 +2,10 @@ drop table if exists t1, t2; select null,\N,isnull(null),isnull(1/0),isnull(1/0 = null),ifnull(null,1),ifnull(null,"TRUE"),ifnull("TRUE","ERROR"),1/0 is null,1 is not null; NULL NULL isnull(null) isnull(1/0) isnull(1/0 = null) ifnull(null,1) ifnull(null,"TRUE") ifnull("TRUE","ERROR") 1/0 is null 1 is not null NULL NULL 1 1 1 1 TRUE TRUE 1 1 +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 explain extended select null,\N,isnull(null),isnull(1/0),isnull(1/0 = null),ifnull(null,1),ifnull(null,"TRUE"),ifnull("TRUE","ERROR"),1/0 is null,1 is not null; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used @@ -92,20 +96,20 @@ NULL this is null NULL this is null drop table t1; CREATE TABLE t1 (a varchar(16) NOT NULL default '', b smallint(6) NOT NULL default 0, c datetime NOT NULL default '0000-00-00 00:00:00', d smallint(6) NOT NULL default 0); -INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55"; +INSERT IGNORE INTO t1 SET a = "", d= "2003-01-14 03:54:55"; Warnings: Warning 1265 Data truncated for column 'd' at row 1 -UPDATE t1 SET d=1/NULL; +UPDATE IGNORE t1 SET d=1/NULL; Warnings: Warning 1048 Column 'd' cannot be null -UPDATE t1 SET d=NULL; +UPDATE IGNORE t1 SET d=NULL; Warnings: Warning 1048 Column 'd' cannot be null INSERT INTO t1 (a) values (null); ERROR 23000: Column 'a' cannot be null INSERT INTO t1 (a) values (1/null); ERROR 23000: Column 'a' cannot be null -INSERT INTO t1 (a) values (null),(null); +INSERT IGNORE INTO t1 (a) values (null),(null); Warnings: Warning 1048 Column 'a' cannot be null Warning 1048 Column 'a' cannot be null @@ -113,7 +117,7 @@ INSERT INTO t1 (b) values (null); ERROR 23000: Column 'b' cannot be null INSERT INTO t1 (b) values (1/null); ERROR 23000: Column 'b' cannot be null -INSERT INTO t1 (b) values (null),(null); +INSERT IGNORE INTO t1 (b) values (null),(null); Warnings: Warning 1048 Column 'b' cannot be null Warning 1048 Column 'b' cannot be null @@ -121,7 +125,7 @@ INSERT INTO t1 (c) values (null); ERROR 23000: Column 'c' cannot be null INSERT INTO t1 (c) values (1/null); ERROR 23000: Column 'c' cannot be null -INSERT INTO t1 (c) values (null),(null); +INSERT IGNORE INTO t1 (c) values (null),(null); Warnings: Warning 1048 Column 'c' cannot be null Warning 1048 Column 'c' cannot be null @@ -129,7 +133,7 @@ INSERT INTO t1 (d) values (null); ERROR 23000: Column 'd' cannot be null INSERT INTO t1 (d) values (1/null); ERROR 23000: Column 'd' cannot be null -INSERT INTO t1 (d) values (null),(null); +INSERT IGNORE INTO t1 (d) values (null),(null); Warnings: Warning 1048 Column 'd' cannot be null Warning 1048 Column 'd' cannot be null @@ -177,6 +181,7 @@ id select_type table type possible_keys key key_len ref rows Extra select count(*) from t1 where i=2 or i is null; count(*) 10 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change i i int not null; Warnings: Warning 1265 Data truncated for column 'i' at row 513 @@ -354,7 +359,7 @@ INSERT INTO t1 VALUES (NOW()),(NOW()); EXPLAIN SELECT * FROM t1 WHERE concat( dt, '2012-12-21 12:12:12' ) IS NULL; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where SELECT * FROM t1 WHERE concat( dt, '2012-12-21 12:12:12' ) IS NULL; dt DROP TABLE t1; @@ -363,7 +368,7 @@ INSERT INTO t1 VALUES (1),(2); EXPLAIN SELECT * FROM t1 WHERE concat( dt, '1' ) IS NULL; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where SELECT * FROM t1 WHERE concat( dt, '1' ) IS NULL; dt DROP TABLE t1; @@ -372,7 +377,7 @@ INSERT INTO t1 VALUES (1),(2); EXPLAIN SELECT * FROM t1 WHERE NOT (concat( dt, '1' ) IS NOT NULL); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where SELECT * FROM t1 WHERE NOT (concat( dt, '1' ) IS NOT NULL); dt DROP TABLE t1; @@ -429,6 +434,7 @@ t2 CREATE TABLE `t2` ( DROP TABLE t1,t2; SELECT NULLIF(_latin1'a' COLLATE latin1_general_ci, _latin1'a' COLLATE latin1_bin); ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'nullif' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT NULLIF(1,1), NULLIF(1,1.0), @@ -447,6 +453,7 @@ t1 CREATE TABLE `t1` ( `NULLIF(1,TIME'00:00:00')` int(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT NULLIF(1.0,1), NULLIF(1.0,1.0), @@ -465,6 +472,7 @@ t1 CREATE TABLE `t1` ( `NULLIF(1.0,TIME'00:00:00')` decimal(2,1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT NULLIF(1e0,1), NULLIF(1e0,1.0), @@ -499,6 +507,7 @@ t1 CREATE TABLE `t1` ( `NULLIF('1',TIME'00:00:00')` varchar(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT NULLIF(TIMESTAMP'2001-01-01 00:00:00',1), NULLIF(TIMESTAMP'2001-01-01 00:00:00',1.0), @@ -519,6 +528,7 @@ t1 CREATE TABLE `t1` ( `NULLIF(TIMESTAMP'2001-01-01 00:00:00',TIME'00:00:00')` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT NULLIF(DATE'2001-01-01',1), NULLIF(DATE'2001-01-01',1.0), @@ -1383,6 +1393,7 @@ Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 2010 DROP TABLE t1; # Two warnings expected +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT NULLIF(TIMESTAMP'2001-01-01 00:00:00',1) AS a, CASE WHEN TIMESTAMP'2001-01-01 00:00:00'=1 THEN NULL diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index 81bfa1ac994..4b4a4b80dee 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -342,7 +342,7 @@ id2 integer not null, index (id), index (id2) ); -insert into t1 values(null,null),(1,1); +insert ignore into t1 values(null,null),(1,1); Warnings: Warning 1048 Column 'id2' cannot be null select * from t1; diff --git a/mysql-test/r/old-mode.result b/mysql-test/r/old-mode.result index c2ee3324ede..c61e30ef85c 100644 --- a/mysql-test/r/old-mode.result +++ b/mysql-test/r/old-mode.result @@ -35,7 +35,7 @@ SELECT CAST(TIME'830:20:30' AS DATETIME); CAST(TIME'830:20:30' AS DATETIME) 0000-01-03 14:20:30 CREATE TABLE t1 (a DATETIME); -INSERT INTO t1 VALUES (TIME'-10:20:30'); +INSERT IGNORE INTO t1 VALUES (TIME'-10:20:30'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 INSERT INTO t1 VALUES (TIME'10:20:30'); @@ -47,13 +47,13 @@ a 0000-01-03 14:20:30 DROP TABLE t1; CREATE TABLE t1 (a TIMESTAMP); -INSERT INTO t1 VALUES (TIME'-10:20:30'); +INSERT IGNORE INTO t1 VALUES (TIME'-10:20:30'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 -INSERT INTO t1 VALUES (TIME'10:20:30'); +INSERT IGNORE INTO t1 VALUES (TIME'10:20:30'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 -INSERT INTO t1 VALUES (TIME'830:20:30'); +INSERT IGNORE INTO t1 VALUES (TIME'830:20:30'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 SELECT * FROM t1; diff --git a/mysql-test/r/order_by-mdev-10122.result b/mysql-test/r/order_by-mdev-10122.result new file mode 100644 index 00000000000..57c0ecdd970 --- /dev/null +++ b/mysql-test/r/order_by-mdev-10122.result @@ -0,0 +1,127 @@ +# +# MariaDB does not support group functions in some contexts where MySQL does +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (10),(20),(30); +# All these queries must pass, not returning "Invalid use of group function". +(SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)); +a +10 +20 +30 +(SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) LIMIT 1; +a +10 +(SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)); +a +10 +20 +30 +(SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)) LIMIT 1; +a +10 +(SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) ORDER BY a; +a +10 +20 +30 +(SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) ORDER BY a LIMIT 1; +a +10 +(SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)) ORDER BY a; +a +10 +20 +30 +(SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)) ORDER BY a LIMIT 1; +a +10 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)); +a +1 +10 +20 +30 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) LIMIT 1; +a +1 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) ORDER BY a; +a +1 +10 +20 +30 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) ORDER BY a LIMIT 1; +a +1 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)); +a +1 +10 +20 +30 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)) LIMIT 1; +a +1 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)) ORDER BY a; +a +1 +10 +20 +30 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)) ORDER BY a LIMIT 1; +a +1 +(SELECT a FROM t1 GROUP BY a ORDER BY MAX(a)) ORDER BY a; +a +10 +20 +30 +(SELECT a FROM t1 GROUP BY a ORDER BY MAX(a)) ORDER BY a LIMIT 1; +a +10 +(SELECT a FROM t1 GROUP BY a ORDER BY a,MAX(a)) ORDER BY a; +a +10 +20 +30 +(SELECT a FROM t1 GROUP BY a ORDER BY a,MAX(a)) ORDER BY a LIMIT 1; +a +10 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY MAX(a)); +a +1 +10 +20 +30 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY MAX(a)) LIMIT 1; +a +1 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY MAX(a)) ORDER BY a; +a +1 +10 +20 +30 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY MAX(a)) ORDER BY a LIMIT 1; +a +1 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,MAX(a)); +a +1 +10 +20 +30 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,MAX(a)) LIMIT 1; +a +1 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,MAX(a)) ORDER BY a; +a +1 +10 +20 +30 +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,MAX(a)) ORDER BY a LIMIT 1; +a +1 +drop table t1; diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index b4d78ac8347..02381ebeed5 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Sort aborted.*"); drop table if exists t1,t2,t3; call mtr.add_suppression("Out of sort memory; increase server sort buffer size"); CREATE TABLE t1 ( @@ -369,6 +370,7 @@ a b c 1 1 NULL 1 NULL b 1 NULL NULL +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify b int not null, modify c varchar(10) not null; Warnings: Warning 1265 Data truncated for column 'b' at row 1 @@ -2935,6 +2937,17 @@ t2 A, t2 B where A.b = B.b order by A.col2, B.col2 limit 10, 1000000; drop table t1,t2,t3; +# +# mdev-10705 : long order by list that can be skipped +# +SELECT 1 +UNION +( SELECT 2 +ORDER BY NULL, @a0 := 3, @a1 := 3, @a2 := 3, @a3 := 3, @a4 := 3, +@a5 := 3, @a6 := 3, @a7 := 3, @a8 := 3, @a9 := 3, @a10 := 3 ); +1 +1 +2 End of 5.5 tests # # MDEV-5884: EXPLAIN UPDATE ... ORDER BY LIMIT shows wrong #rows diff --git a/mysql-test/r/order_by_zerolength-4285.result b/mysql-test/r/order_by_zerolength-4285.result index f60ce7d90c7..e6902105f20 100644 --- a/mysql-test/r/order_by_zerolength-4285.result +++ b/mysql-test/r/order_by_zerolength-4285.result @@ -3,6 +3,7 @@ insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); select * from t1 order by now(), cast(pk as char(0)); pk 1 +10 2 3 4 @@ -11,8 +12,8 @@ pk 7 8 9 -10 -Warnings: +show warnings; +Level Code Message Warning 1292 Truncated incorrect CHAR(0) value: '1' Warning 1292 Truncated incorrect CHAR(0) value: '2' Warning 1292 Truncated incorrect CHAR(0) value: '3' diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result index 7a0a8667350..6029a976ba3 100644 --- a/mysql-test/r/parser.result +++ b/mysql-test/r/parser.result @@ -951,13 +951,23 @@ a 10 20 SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)); -ERROR HY000: Invalid use of group function +a +1 +10 +20 +30 SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) LIMIT 1; -ERROR HY000: Invalid use of group function +a +1 SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) ORDER BY a; -ERROR HY000: Invalid use of group function +a +1 +10 +20 +30 SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) ORDER BY a LIMIT 1; -ERROR HY000: Invalid use of group function +a +1 DROP TABLE t1; # UNION with a parenthesized term with ROLLUP CREATE TABLE t1 (a INT); @@ -1289,3 +1299,23 @@ SELECT 1; 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 'UNION SELECT 1' at line 2 DROP TABLE t1; +create table t1 (a serial null); +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 'null)' at line 1 +create table t1 (a serial auto_increment); +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 'auto_increment)' at line 1 +create table t1 (a serial serial default value); +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 'serial default value)' at line 1 +create table t1 (a serial collate binary); +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 'collate binary)' at line 1 +create table t1 (i int, vc serial as (i)); +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 'as (i))' at line 1 +create function fs() returns serial return 1; +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 'serial return 1' at line 1 +create table t1 ( id serial ); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + UNIQUE KEY `id` (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/r/partition_datatype.result b/mysql-test/r/partition_datatype.result index 31d265d95ee..5f7590b5a3a 100644 --- a/mysql-test/r/partition_datatype.result +++ b/mysql-test/r/partition_datatype.result @@ -363,16 +363,16 @@ PARTITION `pMax` VALUES LESS THAN MAXVALUE); INSERT INTO t1 VALUES (NULL, 'UTC'); INSERT INTO t1 VALUES ('0000-00-00 00:00:00', 'UTC'); # Test invalid values -INSERT INTO t1 VALUES ('1901-01-01 00:00:00', 'UTCI'); +INSERT IGNORE INTO t1 VALUES ('1901-01-01 00:00:00', 'UTCI'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 -INSERT INTO t1 VALUES ('1969-12-31 23:59:59', 'UTCI'); +INSERT IGNORE INTO t1 VALUES ('1969-12-31 23:59:59', 'UTCI'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 -INSERT INTO t1 VALUES ('2038-01-19 03:14:08', 'UTCI'); +INSERT IGNORE INTO t1 VALUES ('2038-01-19 03:14:08', 'UTCI'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 -INSERT INTO t1 VALUES ('1970-01-01 00:00:00', 'UTCI'); +INSERT IGNORE INTO t1 VALUES ('1970-01-01 00:00:00', 'UTCI'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 # Test start range @@ -399,32 +399,32 @@ SET @@session.time_zone = 'Europe/Moscow'; INSERT INTO t1 VALUES (NULL, 'Moscow'); INSERT INTO t1 VALUES ('0000-00-00 00:00:00', 'Moscow'); # Test invalid values -INSERT INTO t1 VALUES ('0000-00-00 03:00:00', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('0000-00-00 03:00:00', 'MoscowI'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 -INSERT INTO t1 VALUES ('1901-01-01 00:00:00', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('1901-01-01 00:00:00', 'MoscowI'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 -INSERT INTO t1 VALUES ('1969-12-31 23:59:59', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('1969-12-31 23:59:59', 'MoscowI'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 -INSERT INTO t1 VALUES ('1970-01-01 02:29:29', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('1970-01-01 02:29:29', 'MoscowI'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 -INSERT INTO t1 VALUES ('2038-01-19 06:14:08', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('2038-01-19 06:14:08', 'MoscowI'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 -INSERT INTO t1 VALUES ('1970-01-01 03:00:00', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('1970-01-01 03:00:00', 'MoscowI'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 # values truncated to 03:00:00 due to daylight saving shift -INSERT INTO t1 VALUES ('2011-03-27 02:00:00', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('2011-03-27 02:00:00', 'MoscowI'); Warnings: Warning 1299 Invalid TIMESTAMP value in column 'a' at row 1 -INSERT INTO t1 VALUES ('2011-03-27 02:00:01', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('2011-03-27 02:00:01', 'MoscowI'); Warnings: Warning 1299 Invalid TIMESTAMP value in column 'a' at row 1 -INSERT INTO t1 VALUES ('2011-03-27 02:59:59', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('2011-03-27 02:59:59', 'MoscowI'); Warnings: Warning 1299 Invalid TIMESTAMP value in column 'a' at row 1 # Test start range @@ -678,7 +678,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t2 p-2012-MSK-1,p-2012-MSK-2 ALL NULL NULL NULL NULL 7 Using where; Using filesort # Test end range changes DELETE FROM t2 WHERE a = 0; -INSERT INTO t2 VALUES ('1970-01-01 00:00:00', 'UTC'); +INSERT IGNORE INTO t2 VALUES ('1970-01-01 00:00:00', 'UTC'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 SELECT COUNT(*) FROM t2; @@ -697,7 +697,7 @@ a tz 2038-01-19 03:14:07 Moscow 2038-01-19 03:14:07 UTC 2038-01-19 03:14:06 Moscow -UPDATE t2 SET a = TIMESTAMPADD(SECOND, 1, a); +UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, 1, a); Warnings: Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' Warning 1264 Out of range value for column 'a' at row 34 @@ -761,7 +761,7 @@ NULL UTC 2038-01-19 03:14:07 Moscow 2038-01-19 03:14:07 UTC # Test start range changes -INSERT INTO t2 VALUES ('1970-01-01 00:00:00', 'UTC'); +INSERT IGNORE INTO t2 VALUES ('1970-01-01 00:00:00', 'UTC'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 SELECT COUNT(*) FROM t2; @@ -780,7 +780,7 @@ a tz 2038-01-19 03:14:07 Moscow 2038-01-19 03:14:07 UTC 2011-10-30 00:00:02 Moscow -UPDATE t2 SET a = TIMESTAMPADD(SECOND, -1, a); +UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, -1, a); Warnings: Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' @@ -1158,7 +1158,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t2 p-2011-MSD-1,p-2011-MSD-2,p-2012-MSK-1,p-2012-MSK-2 ALL NULL NULL NULL NULL 22 Using where; Using filesort # Test end range changes DELETE FROM t2 WHERE a = 0; -INSERT INTO t2 VALUES ('1970-01-01 00:00:00', 'Moscow'); +INSERT IGNORE INTO t2 VALUES ('1970-01-01 00:00:00', 'Moscow'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 SELECT COUNT(*) FROM t2; @@ -1177,7 +1177,7 @@ a tz 2038-01-19 06:14:07 Moscow 2038-01-19 06:14:07 UTC 2038-01-19 06:14:06 Moscow -UPDATE t2 SET a = TIMESTAMPADD(SECOND, 1, a); +UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, 1, a); Warnings: Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' Warning 1299 Invalid TIMESTAMP value in column 'a' at row 8 @@ -1243,7 +1243,7 @@ NULL UTC 2038-01-19 06:14:07 Moscow 2038-01-19 06:14:07 UTC # Test start range changes -INSERT INTO t2 VALUES ('1970-01-01 00:00:00', 'Moscow'); +INSERT IGNORE INTO t2 VALUES ('1970-01-01 00:00:00', 'Moscow'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 SELECT COUNT(*) FROM t2; @@ -1262,7 +1262,7 @@ a tz 2038-01-19 06:14:07 Moscow 2038-01-19 06:14:07 UTC 2011-10-30 03:00:02 Moscow -UPDATE t2 SET a = TIMESTAMPADD(SECOND, -1, a); +UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, -1, a); Warnings: Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result index eeea5215218..e52c1ef7df5 100644 --- a/mysql-test/r/partition_error.result +++ b/mysql-test/r/partition_error.result @@ -71,7 +71,7 @@ ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitio CREATE TABLE t1 (a DATE) PARTITION BY RANGE (DAYOFWEEK(a)) (PARTITION a1 VALUES LESS THAN (60)); -INSERT INTO t1 VALUES ('test'),('a'),('5'); +INSERT IGNORE INTO t1 VALUES ('test'),('a'),('5'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 Warning 1265 Data truncated for column 'a' at row 2 @@ -85,7 +85,7 @@ DROP TABLE t1; CREATE TABLE t1 (a DATETIME) PARTITION BY RANGE (DAYOFWEEK(a)) (PARTITION a1 VALUES LESS THAN (60)); -INSERT INTO t1 VALUES ('test'),('a'),('5'); +INSERT IGNORE INTO t1 VALUES ('test'),('a'),('5'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 Warning 1265 Data truncated for column 'a' at row 2 @@ -1829,6 +1829,7 @@ p1 p1spSecond p2 p2spFirst Comment in p2 p2 p2spSecond SubPartition comment in p2spSecond DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (a INT , KEY inx_a (a) ) diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index c40669fd17b..c1eff91de53 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); set global default_storage_engine='innodb'; set session default_storage_engine='innodb'; drop table if exists t1, t2; diff --git a/mysql-test/r/partition_innodb_plugin.result b/mysql-test/r/partition_innodb_plugin.result index cd5dfade0ab..60cea8496b0 100644 --- a/mysql-test/r/partition_innodb_plugin.result +++ b/mysql-test/r/partition_innodb_plugin.result @@ -1,4 +1,5 @@ call mtr.add_suppression("InnoDB: Table .* does not exist in the InnoDB internal data dictionary .*"); +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); # # Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB, # PARTITONING, ON INDEX CREATE @@ -37,14 +38,10 @@ call mtr.add_suppression("InnoDB: Error: table `test`.`t1` .* InnoDB internal"); # # Bug#55091: Server crashes on ADD PARTITION after a failed attempt # -SET @old_innodb_file_format = @@global.innodb_file_format; SET @old_innodb_file_per_table = @@global.innodb_file_per_table; SET @old_innodb_strict_mode = @@global.innodb_strict_mode; -SET @@global.innodb_file_format = Barracuda, -@@global.innodb_file_per_table = ON, +SET @@global.innodb_file_per_table = ON, @@global.innodb_strict_mode = ON; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html connect con1,localhost,root,,; CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, @@ -106,9 +103,6 @@ DROP TABLE t1; disconnect con2; connection default; SET @@global.innodb_strict_mode = @old_innodb_strict_mode; -SET @@global.innodb_file_format = @old_innodb_file_format; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET @@global.innodb_file_per_table = @old_innodb_file_per_table; SET NAMES utf8; CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a)) @@ -160,4 +154,3 @@ ROLLBACK; disconnect con1; connection default; DROP TABLE `t``\""e`; -SET NAMES DEFAULT; diff --git a/mysql-test/r/partition_list.result b/mysql-test/r/partition_list.result index e22fc11e5bb..2e95f882217 100644 --- a/mysql-test/r/partition_list.result +++ b/mysql-test/r/partition_list.result @@ -310,3 +310,27 @@ create table t1 (a char(1)) partition by list (ascii(ucase(a))) (partition p1 values in (2)); ERROR HY000: This partition function is not allowed +# +# MDEV-11681: PARTITION BY LIST COLUMNS with default partition: +# Assertion `part_info->num_list_values' failed in +# get_part_iter_for_interval_cols_via_map +# +CREATE TABLE t1 (f int) PARTITION BY LIST COLUMNS (f) (PARTITION pdef DEFAULT); +insert into t1 values (1),(2); +select * from t1 where f = 1; +f +1 +drop table t1; +CREATE TABLE t1 (f int, d int) PARTITION BY LIST COLUMNS (f,d) (PARTITION pdef DEFAULT); +insert into t1 values (1,1),(2,2); +select * from t1 where f = 1 and d = 1 ; +f d +1 1 +drop table t1; +CREATE TABLE t1 (f int) PARTITION BY LIST (f) (PARTITION pdef DEFAULT); +insert into t1 values (1),(2); +select * from t1 where f = 1; +f +1 +drop table t1; +#end of 10.2 tests diff --git a/mysql-test/r/plugin_auth.result b/mysql-test/r/plugin_auth.result index 8bb360e96ae..e470cc010c0 100644 --- a/mysql-test/r/plugin_auth.result +++ b/mysql-test/r/plugin_auth.result @@ -365,7 +365,7 @@ DROP USER uplain@localhost; # # Bug #59038 : mysql.user.authentication_string column # causes configuration wizard to fail -INSERT INTO mysql.user( +INSERT IGNORE INTO mysql.user( Host, User, Password, diff --git a/mysql-test/r/pool_of_threads.result b/mysql-test/r/pool_of_threads.result index f5cef38a904..b25d8d1e50e 100644 --- a/mysql-test/r/pool_of_threads.result +++ b/mysql-test/r/pool_of_threads.result @@ -2158,35 +2158,31 @@ Warning 1052 Column 'kundentyp' in group statement is ambiguous drop table t1; SET optimizer_switch=@save_optimizer_switch; connection default; -SELECT sleep(5.5); +SELECT sleep(50); connect con2,localhost,root,,; -connection con2; -SELECT sleep(5); +SELECT sleep(50); # -- Success: more than --thread_pool_max_threads normal connections not possible -connection default; -sleep(5.5) -0 -connection con2; -sleep(5) -0 -connection default; -SELECT sleep(5); -connection con2; -SELECT sleep(5); connect extracon,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,; connection extracon; SELECT 'Connection on extra port ok'; Connection on extra port ok Connection on extra port ok +SELECT sleep(5.5); connect extracon2,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,; connection extracon2; SELECT 'Connection on extra port 2 ok'; Connection on extra port 2 ok Connection on extra port 2 ok # -- Success: more than --extra-max-connections + 1 normal connections not possible +connection extracon2; +KILL QUERY ; +KILL QUERY ; connection default; -sleep(5) -0 +sleep(50) +1 connection con2; -sleep(5) +sleep(50) +1 +connection extracon; +sleep(5.5) 0 diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 5b7d4b6fa7f..eb21f8ed7ea 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -768,13 +768,13 @@ deallocate prepare stmt; drop table t1; prepare stmt from 'create table t1 (a varchar(10) character set utf8)'; execute stmt; -insert into t1 (a) values (repeat('a', 20)); +insert ignore into t1 (a) values (repeat('a', 20)); select length(a) from t1; length(a) 10 drop table t1; execute stmt; -insert into t1 (a) values (repeat('a', 20)); +insert ignore into t1 (a) values (repeat('a', 20)); select length(a) from t1; length(a) 10 @@ -2395,15 +2395,15 @@ create procedure a() select 42; create procedure proc_1(a char(2)) show create procedure a; call proc_1("bb"); Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`() +a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`() select 42 latin1 latin1_swedish_ci latin1_swedish_ci call proc_1("bb"); Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`() +a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`() select 42 latin1 latin1_swedish_ci latin1_swedish_ci call proc_1("bb"); Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`() +a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`() select 42 latin1 latin1_swedish_ci latin1_swedish_ci drop procedure proc_1; create function func_1() returns int begin show create procedure a; return 1; end| @@ -2415,15 +2415,15 @@ ERROR 42000: FUNCTION test.func_1 does not exist prepare abc from "show create procedure a"; execute abc; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`() +a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`() select 42 latin1 latin1_swedish_ci latin1_swedish_ci execute abc; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`() +a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`() select 42 latin1 latin1_swedish_ci latin1_swedish_ci execute abc; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`() +a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`() select 42 latin1 latin1_swedish_ci latin1_swedish_ci deallocate prepare abc; drop procedure a; @@ -2432,15 +2432,15 @@ create function a() returns int return 42+13; create procedure proc_1(a char(2)) show create function a; call proc_1("bb"); Function sql_mode Create Function character_set_client collation_connection Database Collation -a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11) +a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11) return 42+13 latin1 latin1_swedish_ci latin1_swedish_ci call proc_1("bb"); Function sql_mode Create Function character_set_client collation_connection Database Collation -a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11) +a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11) return 42+13 latin1 latin1_swedish_ci latin1_swedish_ci call proc_1("bb"); Function sql_mode Create Function character_set_client collation_connection Database Collation -a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11) +a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11) return 42+13 latin1 latin1_swedish_ci latin1_swedish_ci drop procedure proc_1; create function func_1() returns int begin show create function a; return 1; end| @@ -2452,15 +2452,15 @@ ERROR 42000: FUNCTION test.func_1 does not exist prepare abc from "show create function a"; execute abc; Function sql_mode Create Function character_set_client collation_connection Database Collation -a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11) +a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11) return 42+13 latin1 latin1_swedish_ci latin1_swedish_ci execute abc; Function sql_mode Create Function character_set_client collation_connection Database Collation -a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11) +a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11) return 42+13 latin1 latin1_swedish_ci latin1_swedish_ci execute abc; Function sql_mode Create Function character_set_client collation_connection Database Collation -a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11) +a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11) return 42+13 latin1 latin1_swedish_ci latin1_swedish_ci deallocate prepare abc; drop function a; @@ -4747,3 +4747,26 @@ INSERT INTO t1 VALUES (1),(2),(3); EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING DEFAULT,DEFAULT; ERROR HY000: Default/ignore value is not supported for such parameter usage DROP TABLE t1; +# +# MDEV-11780 Crash with PREPARE + SP out parameter + literal +# +CREATE OR REPLACE PROCEDURE p1(OUT a INT) +BEGIN +SET a=10; +END; +$$ +PREPARE stmt FROM 'CALL p1(?)'; +EXECUTE stmt USING 10; +ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger +EXECUTE stmt USING DEFAULT; +ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger +EXECUTE stmt USING IGNORE; +ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger +DEALLOCATE PREPARE stmt; +EXECUTE IMMEDIATE 'CALL p1(?)' USING 10; +ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger +EXECUTE IMMEDIATE 'CALL p1(?)' USING DEFAULT; +ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger +EXECUTE IMMEDIATE 'CALL p1(?)' USING IGNORE; +ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger +DROP PROCEDURE p1; diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index e34855eee62..fef15b89f26 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -309,7 +309,7 @@ Threads_running # prepare stmt4 from ' show variables like ''sql_mode'' '; execute stmt4; Variable_name Value -sql_mode NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION prepare stmt4 from ' show engine myisam logs '; execute stmt4; Type Name Status diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index 5ed5fa727fb..127fb4c7124 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -1303,9 +1303,11 @@ a b 2 two set @arg00=NULL; set @arg01=2; +set sql_mode = ''; execute stmt1 using @arg00, @arg01; Warnings: Warning 1048 Column 'a' cannot be null +set sql_mode = default; select a,b from t1 order by a; a b 0 two @@ -1784,7 +1786,7 @@ t5 CREATE TABLE `t5` ( `param03` double DEFAULT NULL, `const04` varchar(3) NOT NULL, `param04` longtext DEFAULT NULL, - `const05` varbinary(3) NOT NULL, + `const05` varbinary(3) DEFAULT NULL, `param05` longblob DEFAULT NULL, `const06` varchar(10) NOT NULL, `param06` longtext DEFAULT NULL, @@ -1814,7 +1816,7 @@ def test t5 t5 const03 const03 5 17 1 N 36865 31 63 def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 def test t5 t5 const04 const04 253 3 3 N 4097 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 253 3 3 N 4225 0 63 +def test t5 t5 const05 const05 253 3 3 Y 128 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 4097 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -2570,6 +2572,7 @@ prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 from t9 where c21 = 'O' "; prepare my_delete from "delete from t9 where c21 = 'O' "; set @arg00= 9223372036854775807 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2593,6 +2596,7 @@ c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2616,6 +2620,7 @@ c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2639,6 +2644,7 @@ c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= '-9223372036854775808' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2662,6 +2668,7 @@ c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= 1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2687,6 +2694,7 @@ c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2712,6 +2720,7 @@ c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2737,6 +2746,7 @@ c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; set @arg00= '-1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2763,6 +2773,7 @@ c12 -9999.9999 execute my_delete ; test_sequence -- insert into string columns -- +set sql_mode = ''; insert into t9 ( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 ) values @@ -2921,6 +2932,7 @@ execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: Warning 1265 Data truncated for column 'c20' at row 1 +set sql_mode = default; set @arg00= 'abc' ; set @arg00= NULL ; insert into t9 @@ -3127,6 +3139,7 @@ true delete from t9 ; test_sequence -- insert into date/time columns -- +set sql_mode = ''; set @arg00= '1991-01-01 01:01:01' ; insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3285,6 +3298,7 @@ Warnings: Warning 1265 Data truncated for column 'c15' at row 1 Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 +set sql_mode = default; set @arg00= 'abc' ; set @arg00= NULL ; insert into t9 diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index eac8e5d4efd..d341323b0b2 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -1286,9 +1286,11 @@ a b 2 two set @arg00=NULL; set @arg01=2; +set sql_mode = ''; execute stmt1 using @arg00, @arg01; Warnings: Warning 1048 Column 'a' cannot be null +set sql_mode = default; select a,b from t1 order by a; a b 0 two @@ -1767,7 +1769,7 @@ t5 CREATE TABLE `t5` ( `param03` double DEFAULT NULL, `const04` varchar(3) NOT NULL, `param04` longtext DEFAULT NULL, - `const05` varbinary(3) NOT NULL, + `const05` varbinary(3) DEFAULT NULL, `param05` longblob DEFAULT NULL, `const06` varchar(10) NOT NULL, `param06` longtext DEFAULT NULL, @@ -1797,7 +1799,7 @@ def test t5 t5 const03 const03 5 17 1 N 36865 31 63 def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 def test t5 t5 const04 const04 253 3 3 N 4097 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 253 3 3 N 4225 0 63 +def test t5 t5 const05 const05 253 3 3 Y 128 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 4097 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -2553,6 +2555,7 @@ prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 from t9 where c21 = 'O' "; prepare my_delete from "delete from t9 where c21 = 'O' "; set @arg00= 9223372036854775807 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2576,6 +2579,7 @@ c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2599,6 +2603,7 @@ c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2622,6 +2627,7 @@ c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= '-9223372036854775808' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2645,6 +2651,7 @@ c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= 1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2670,6 +2677,7 @@ c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2695,6 +2703,7 @@ c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2720,6 +2729,7 @@ c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; set @arg00= '-1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2746,6 +2756,7 @@ c12 -9999.9999 execute my_delete ; test_sequence -- insert into string columns -- +set sql_mode = ''; insert into t9 ( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 ) values @@ -2904,6 +2915,7 @@ execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: Warning 1265 Data truncated for column 'c20' at row 1 +set sql_mode = default; set @arg00= 'abc' ; set @arg00= NULL ; insert into t9 @@ -3110,6 +3122,7 @@ true delete from t9 ; test_sequence -- insert into date/time columns -- +set sql_mode = ''; set @arg00= '1991-01-01 01:01:01' ; insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3268,6 +3281,7 @@ Warnings: Warning 1265 Data truncated for column 'c15' at row 1 Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 +set sql_mode = default; set @arg00= 'abc' ; set @arg00= NULL ; insert into t9 diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index d1ee954bbba..ea3cf21e804 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -1287,9 +1287,11 @@ a b 2 two set @arg00=NULL; set @arg01=2; +set sql_mode = ''; execute stmt1 using @arg00, @arg01; Warnings: Warning 1048 Column 'a' cannot be null +set sql_mode = default; select a,b from t1 order by a; a b 0 two @@ -1768,7 +1770,7 @@ t5 CREATE TABLE `t5` ( `param03` double DEFAULT NULL, `const04` varchar(3) NOT NULL, `param04` longtext DEFAULT NULL, - `const05` varbinary(3) NOT NULL, + `const05` varbinary(3) DEFAULT NULL, `param05` longblob DEFAULT NULL, `const06` varchar(10) NOT NULL, `param06` longtext DEFAULT NULL, @@ -1798,7 +1800,7 @@ def test t5 t5 const03 const03 5 17 1 N 36865 31 63 def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 def test t5 t5 const04 const04 253 3 3 N 4097 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 253 3 3 N 4225 0 63 +def test t5 t5 const05 const05 253 3 3 Y 128 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 4097 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -2554,6 +2556,7 @@ prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 from t9 where c21 = 'O' "; prepare my_delete from "delete from t9 where c21 = 'O' "; set @arg00= 9223372036854775807 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2577,6 +2580,7 @@ c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2600,6 +2604,7 @@ c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2623,6 +2628,7 @@ c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= '-9223372036854775808' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2646,6 +2652,7 @@ c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= 1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2671,6 +2678,7 @@ c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2696,6 +2704,7 @@ c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2721,6 +2730,7 @@ c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; set @arg00= '-1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2747,6 +2757,7 @@ c12 -9999.9999 execute my_delete ; test_sequence -- insert into string columns -- +set sql_mode = ''; insert into t9 ( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 ) values @@ -2905,6 +2916,7 @@ execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: Warning 1265 Data truncated for column 'c20' at row 1 +set sql_mode = default; set @arg00= 'abc' ; set @arg00= NULL ; insert into t9 @@ -3111,6 +3123,7 @@ true delete from t9 ; test_sequence -- insert into date/time columns -- +set sql_mode = ''; set @arg00= '1991-01-01 01:01:01' ; insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3269,6 +3282,7 @@ Warnings: Warning 1265 Data truncated for column 'c15' at row 1 Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 +set sql_mode = default; set @arg00= 'abc' ; set @arg00= NULL ; insert into t9 diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index a0baa842e4a..4c4aaa325aa 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -1330,9 +1330,11 @@ a b 2 two set @arg00=NULL; set @arg01=2; +set sql_mode = ''; execute stmt1 using @arg00, @arg01; Warnings: Warning 1048 Column 'a' cannot be null +set sql_mode = default; select a,b from t1 order by a; a b 0 two @@ -1705,7 +1707,7 @@ t5 CREATE TABLE `t5` ( `param03` double DEFAULT NULL, `const04` varchar(3) NOT NULL, `param04` longtext DEFAULT NULL, - `const05` varbinary(3) NOT NULL, + `const05` varbinary(3) DEFAULT NULL, `param05` longblob DEFAULT NULL, `const06` varchar(10) NOT NULL, `param06` longtext DEFAULT NULL, @@ -1735,7 +1737,7 @@ def test t5 t5 const03 const03 5 17 1 N 36865 31 63 def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 def test t5 t5 const04 const04 253 3 3 N 4097 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 253 3 3 N 4225 0 63 +def test t5 t5 const05 const05 253 3 3 Y 128 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 4097 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -2491,6 +2493,7 @@ prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 from t9 where c21 = 'O' "; prepare my_delete from "delete from t9 where c21 = 'O' "; set @arg00= 9223372036854775807 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2514,6 +2517,7 @@ c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2537,6 +2541,7 @@ c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2560,6 +2565,7 @@ c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= '-9223372036854775808' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2583,6 +2589,7 @@ c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= 1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2608,6 +2615,7 @@ c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2633,6 +2641,7 @@ c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2658,6 +2667,7 @@ c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; set @arg00= '-1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2684,6 +2694,7 @@ c12 -9999.9999 execute my_delete ; test_sequence -- insert into string columns -- +set sql_mode = ''; insert into t9 ( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 ) values @@ -2842,6 +2853,7 @@ execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: Warning 1265 Data truncated for column 'c20' at row 1 +set sql_mode = default; set @arg00= 'abc' ; set @arg00= NULL ; insert into t9 @@ -3048,6 +3060,7 @@ true delete from t9 ; test_sequence -- insert into date/time columns -- +set sql_mode = ''; set @arg00= '1991-01-01 01:01:01' ; insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3206,6 +3219,7 @@ Warnings: Warning 1265 Data truncated for column 'c15' at row 1 Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 +set sql_mode = default; set @arg00= 'abc' ; set @arg00= NULL ; insert into t9 @@ -4684,9 +4698,11 @@ a b 2 two set @arg00=NULL; set @arg01=2; +set sql_mode = ''; execute stmt1 using @arg00, @arg01; Warnings: Warning 1048 Column 'a' cannot be null +set sql_mode = default; select a,b from t1 order by a; a b 0 two @@ -5059,7 +5075,7 @@ t5 CREATE TABLE `t5` ( `param03` double DEFAULT NULL, `const04` varchar(3) NOT NULL, `param04` longtext DEFAULT NULL, - `const05` varbinary(3) NOT NULL, + `const05` varbinary(3) DEFAULT NULL, `param05` longblob DEFAULT NULL, `const06` varchar(10) NOT NULL, `param06` longtext DEFAULT NULL, @@ -5089,7 +5105,7 @@ def test t5 t5 const03 const03 5 17 1 N 36865 31 63 def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 def test t5 t5 const04 const04 253 3 3 N 4097 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 253 3 3 N 4225 0 63 +def test t5 t5 const05 const05 253 3 3 Y 128 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 4097 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -5845,6 +5861,7 @@ prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 from t9 where c21 = 'O' "; prepare my_delete from "delete from t9 where c21 = 'O' "; set @arg00= 9223372036854775807 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -5868,6 +5885,7 @@ c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -5891,6 +5909,7 @@ c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -5914,6 +5933,7 @@ c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= '-9223372036854775808' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -5937,6 +5957,7 @@ c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= 1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -5962,6 +5983,7 @@ c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -5987,6 +6009,7 @@ c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -6012,6 +6035,7 @@ c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; set @arg00= '-1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -6038,6 +6062,7 @@ c12 -9999.9999 execute my_delete ; test_sequence -- insert into string columns -- +set sql_mode = ''; insert into t9 ( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 ) values @@ -6196,6 +6221,7 @@ execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: Warning 1265 Data truncated for column 'c20' at row 1 +set sql_mode = default; set @arg00= 'abc' ; set @arg00= NULL ; insert into t9 @@ -6402,6 +6428,7 @@ true delete from t9 ; test_sequence -- insert into date/time columns -- +set sql_mode = ''; set @arg00= '1991-01-01 01:01:01' ; insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -6560,6 +6587,7 @@ Warnings: Warning 1265 Data truncated for column 'c15' at row 1 Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 +set sql_mode = default; set @arg00= 'abc' ; set @arg00= NULL ; insert into t9 diff --git a/mysql-test/r/round.result b/mysql-test/r/round.result index 49a00885f34..a3e9f18843d 100644 --- a/mysql-test/r/round.result +++ b/mysql-test/r/round.result @@ -3,7 +3,7 @@ CREATE TABLE t1 (sint8 tinyint not null); INSERT INTO t1 VALUES ('0.1'); INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('127.4'); -INSERT INTO t1 VALUES ('127.5'); +INSERT IGNORE INTO t1 VALUES ('127.5'); Warnings: Warning 1264 Out of range value for column 'sint8' at row 1 INSERT INTO t1 VALUES ('-0.1'); @@ -11,7 +11,7 @@ INSERT INTO t1 VALUES ('-0.5'); INSERT INTO t1 VALUES ('-127.4'); INSERT INTO t1 VALUES ('-127.5'); INSERT INTO t1 VALUES ('-128.4'); -INSERT INTO t1 VALUES ('-128.5'); +INSERT IGNORE INTO t1 VALUES ('-128.5'); Warnings: Warning 1264 Out of range value for column 'sint8' at row 1 SELECT * FROM t1; @@ -33,11 +33,11 @@ INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('127.4'); INSERT INTO t1 VALUES ('127.5'); INSERT INTO t1 VALUES ('-0.1'); -INSERT INTO t1 VALUES ('-0.5'); +INSERT IGNORE INTO t1 VALUES ('-0.5'); Warnings: Warning 1264 Out of range value for column 'uint8' at row 1 INSERT INTO t1 VALUES ('255.4'); -INSERT INTO t1 VALUES ('255.5'); +INSERT IGNORE INTO t1 VALUES ('255.5'); Warnings: Warning 1264 Out of range value for column 'uint8' at row 1 SELECT * FROM t1; @@ -55,7 +55,7 @@ CREATE TABLE t1 (sint16 smallint not null); INSERT INTO t1 VALUES ('0.1'); INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('32767.4'); -INSERT INTO t1 VALUES ('32767.5'); +INSERT IGNORE INTO t1 VALUES ('32767.5'); Warnings: Warning 1264 Out of range value for column 'sint16' at row 1 INSERT INTO t1 VALUES ('-0.1'); @@ -63,7 +63,7 @@ INSERT INTO t1 VALUES ('-0.5'); INSERT INTO t1 VALUES ('-32767.4'); INSERT INTO t1 VALUES ('-32767.5'); INSERT INTO t1 VALUES ('-32768.4'); -INSERT INTO t1 VALUES ('-32768.5'); +INSERT IGNORE INTO t1 VALUES ('-32768.5'); Warnings: Warning 1264 Out of range value for column 'sint16' at row 1 SELECT * FROM t1; @@ -85,11 +85,11 @@ INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('32767.4'); INSERT INTO t1 VALUES ('32767.5'); INSERT INTO t1 VALUES ('-0.1'); -INSERT INTO t1 VALUES ('-0.5'); +INSERT IGNORE INTO t1 VALUES ('-0.5'); Warnings: Warning 1264 Out of range value for column 'uint16' at row 1 INSERT INTO t1 VALUES ('65535.4'); -INSERT INTO t1 VALUES ('65535.5'); +INSERT IGNORE INTO t1 VALUES ('65535.5'); Warnings: Warning 1264 Out of range value for column 'uint16' at row 1 SELECT * FROM t1; @@ -107,7 +107,7 @@ CREATE TABLE t1 (sint24 mediumint not null); INSERT INTO t1 VALUES ('0.1'); INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('8388607.4'); -INSERT INTO t1 VALUES ('8388607.5'); +INSERT IGNORE INTO t1 VALUES ('8388607.5'); Warnings: Warning 1264 Out of range value for column 'sint24' at row 1 INSERT INTO t1 VALUES ('-0.1'); @@ -115,7 +115,7 @@ INSERT INTO t1 VALUES ('-0.5'); INSERT INTO t1 VALUES ('-8388607.4'); INSERT INTO t1 VALUES ('-8388607.5'); INSERT INTO t1 VALUES ('-8388608.4'); -INSERT INTO t1 VALUES ('-8388608.5'); +INSERT IGNORE INTO t1 VALUES ('-8388608.5'); Warnings: Warning 1264 Out of range value for column 'sint24' at row 1 SELECT * FROM t1; @@ -137,11 +137,11 @@ INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('8388607.4'); INSERT INTO t1 VALUES ('8388607.5'); INSERT INTO t1 VALUES ('-0.1'); -INSERT INTO t1 VALUES ('-0.5'); +INSERT IGNORE INTO t1 VALUES ('-0.5'); Warnings: Warning 1264 Out of range value for column 'uint24' at row 1 INSERT INTO t1 VALUES ('16777215.4'); -INSERT INTO t1 VALUES ('16777215.5'); +INSERT IGNORE INTO t1 VALUES ('16777215.5'); Warnings: Warning 1264 Out of range value for column 'uint24' at row 1 SELECT * FROM t1; @@ -159,7 +159,7 @@ CREATE TABLE t1 (sint64 bigint not null); INSERT INTO t1 VALUES ('0.1'); INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('9223372036854775807.4'); -INSERT INTO t1 VALUES ('9223372036854775807.5'); +INSERT IGNORE INTO t1 VALUES ('9223372036854775807.5'); Warnings: Warning 1264 Out of range value for column 'sint64' at row 1 INSERT INTO t1 VALUES ('-0.1'); @@ -167,7 +167,7 @@ INSERT INTO t1 VALUES ('-0.5'); INSERT INTO t1 VALUES ('-9223372036854775807.4'); INSERT INTO t1 VALUES ('-9223372036854775807.5'); INSERT INTO t1 VALUES ('-9223372036854775808.4'); -INSERT INTO t1 VALUES ('-9223372036854775808.5'); +INSERT IGNORE INTO t1 VALUES ('-9223372036854775808.5'); Warnings: Warning 1264 Out of range value for column 'sint64' at row 1 SELECT * FROM t1; @@ -189,11 +189,11 @@ INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('9223372036854775807.4'); INSERT INTO t1 VALUES ('9223372036854775807.5'); INSERT INTO t1 VALUES ('-0.1'); -INSERT INTO t1 VALUES ('-0.5'); +INSERT IGNORE INTO t1 VALUES ('-0.5'); Warnings: Warning 1264 Out of range value for column 'uint64' at row 1 INSERT INTO t1 VALUES ('18446744073709551615.4'); -INSERT INTO t1 VALUES ('18446744073709551615.5'); +INSERT IGNORE INTO t1 VALUES ('18446744073709551615.5'); Warnings: Warning 1264 Out of range value for column 'uint64' at row 1 INSERT INTO t1 VALUES ('1844674407370955161.0'); diff --git a/mysql-test/r/row-checksum-old.result b/mysql-test/r/row-checksum-old.result index 5789fc64c68..87cd1cc89ed 100644 --- a/mysql-test/r/row-checksum-old.result +++ b/mysql-test/r/row-checksum-old.result @@ -71,17 +71,15 @@ checksum table t1 extended; Table Checksum test.t1 4108368782 drop table if exists t1; -create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=fixed; -Warnings: -Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=compact; insert into t1 values(null, null), (1, "hello"); checksum table t1; Table Checksum -test.t1 4108368782 +test.t1 452555338 checksum table t1 quick; Table Checksum test.t1 NULL checksum table t1 extended; Table Checksum -test.t1 4108368782 +test.t1 452555338 drop table t1; diff --git a/mysql-test/r/row-checksum.result b/mysql-test/r/row-checksum.result index 0fbebba073b..f2e687f8b6e 100644 --- a/mysql-test/r/row-checksum.result +++ b/mysql-test/r/row-checksum.result @@ -71,17 +71,15 @@ checksum table t1 extended; Table Checksum test.t1 3885665021 drop table if exists t1; -create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=fixed; -Warnings: -Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=compact; insert into t1 values(null, null), (1, "hello"); checksum table t1; Table Checksum -test.t1 3885665021 +test.t1 229851577 checksum table t1 quick; Table Checksum test.t1 NULL checksum table t1 extended; Table Checksum -test.t1 3885665021 +test.t1 229851577 drop table t1; diff --git a/mysql-test/r/row.result b/mysql-test/r/row.result index 9b796c24354..7483f37970f 100644 --- a/mysql-test/r/row.result +++ b/mysql-test/r/row.result @@ -354,12 +354,12 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a 1 Using index SELECT * FROM t1,t2 WHERE t1.a=1 and t1.b=t2.b; a b a b c -1 1 1 1 2 -1 1 3 1 3 -1 2 1 2 2 1 1 1 1 1 +1 1 1 1 2 1 1 3 1 1 +1 1 3 1 3 1 2 1 2 1 +1 2 1 2 2 SELECT * FROM t1,t2 WHERE (t1.a,t1.b)=(t2.a,2); a b a b c 1 2 1 1 1 @@ -388,10 +388,10 @@ Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` - 1 = `test`.`t2`.`a` - 1 and `test`.`t1`.`b` = `test`.`t2`.`b` + 1 SELECT * FROM t1,t2 WHERE (t1.a-1,t1.b)=(t2.a-1,t2.b+1); a b a b c -1 2 1 1 2 -3 2 3 1 3 1 2 1 1 1 +1 2 1 1 2 3 2 3 1 1 +3 2 3 1 3 EXPLAIN SELECT * FROM t2 WHERE a=3 AND b=2; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref PRIMARY PRIMARY 8 const,const 1 Using index diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index a7c4c76dc8c..a39ca3379c6 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2817,7 +2817,7 @@ i='1e+01' i=1e+01 i in (1e+01,1e+01) i in ('1e+01','1e+01') 1 1 1 1 DROP TABLE t1; create table t1(a bigint unsigned, b bigint); -insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), +insert ignore into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), (0x10000000000000000, 0x10000000000000000), (0x8fffffffffffffff, 0x8fffffffffffffff); Warnings: @@ -4448,7 +4448,7 @@ DROP TABLE t1; # memory # CREATE TABLE t1(a INT NOT NULL, b YEAR); -INSERT INTO t1 VALUES (); +INSERT IGNORE INTO t1 VALUES (); Warnings: Warning 1364 Field 'a' doesn't have a default value CREATE TABLE t2(c INT); @@ -4549,7 +4549,7 @@ DROP TABLE t1; SET @old_sort_buffer_size= @@session.sort_buffer_size; SET @@sort_buffer_size= 40000; CREATE TABLE t1(a CHAR(0) NOT NULL); -INSERT INTO t1 VALUES (0), (0), (0); +INSERT IGNORE INTO t1 VALUES (0), (0), (0); INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; @@ -4559,7 +4559,7 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT a FROM t1 ORDER BY a; DROP TABLE t1; CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int); -INSERT INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1); +INSERT IGNORE INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1); INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; @@ -4870,7 +4870,7 @@ CREATE TABLE t1(a ENUM('') NOT NULL); INSERT INTO t1 VALUES (), (), (); EXPLAIN SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci; 1 1 diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result index 19d1733c52e..482fca0d530 100644 --- a/mysql-test/r/select_jcl6.result +++ b/mysql-test/r/select_jcl6.result @@ -2828,7 +2828,7 @@ i='1e+01' i=1e+01 i in (1e+01,1e+01) i in ('1e+01','1e+01') 1 1 1 1 DROP TABLE t1; create table t1(a bigint unsigned, b bigint); -insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), +insert ignore into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), (0x10000000000000000, 0x10000000000000000), (0x8fffffffffffffff, 0x8fffffffffffffff); Warnings: @@ -4459,7 +4459,7 @@ DROP TABLE t1; # memory # CREATE TABLE t1(a INT NOT NULL, b YEAR); -INSERT INTO t1 VALUES (); +INSERT IGNORE INTO t1 VALUES (); Warnings: Warning 1364 Field 'a' doesn't have a default value CREATE TABLE t2(c INT); @@ -4560,7 +4560,7 @@ DROP TABLE t1; SET @old_sort_buffer_size= @@session.sort_buffer_size; SET @@sort_buffer_size= 40000; CREATE TABLE t1(a CHAR(0) NOT NULL); -INSERT INTO t1 VALUES (0), (0), (0); +INSERT IGNORE INTO t1 VALUES (0), (0), (0); INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; @@ -4570,7 +4570,7 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT a FROM t1 ORDER BY a; DROP TABLE t1; CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int); -INSERT INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1); +INSERT IGNORE INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1); INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; @@ -4881,7 +4881,7 @@ CREATE TABLE t1(a ENUM('') NOT NULL); INSERT INTO t1 VALUES (), (), (); EXPLAIN SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci; 1 1 diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result index a7c4c76dc8c..a39ca3379c6 100644 --- a/mysql-test/r/select_pkeycache.result +++ b/mysql-test/r/select_pkeycache.result @@ -2817,7 +2817,7 @@ i='1e+01' i=1e+01 i in (1e+01,1e+01) i in ('1e+01','1e+01') 1 1 1 1 DROP TABLE t1; create table t1(a bigint unsigned, b bigint); -insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), +insert ignore into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), (0x10000000000000000, 0x10000000000000000), (0x8fffffffffffffff, 0x8fffffffffffffff); Warnings: @@ -4448,7 +4448,7 @@ DROP TABLE t1; # memory # CREATE TABLE t1(a INT NOT NULL, b YEAR); -INSERT INTO t1 VALUES (); +INSERT IGNORE INTO t1 VALUES (); Warnings: Warning 1364 Field 'a' doesn't have a default value CREATE TABLE t2(c INT); @@ -4549,7 +4549,7 @@ DROP TABLE t1; SET @old_sort_buffer_size= @@session.sort_buffer_size; SET @@sort_buffer_size= 40000; CREATE TABLE t1(a CHAR(0) NOT NULL); -INSERT INTO t1 VALUES (0), (0), (0); +INSERT IGNORE INTO t1 VALUES (0), (0), (0); INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; @@ -4559,7 +4559,7 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT a FROM t1 ORDER BY a; DROP TABLE t1; CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int); -INSERT INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1); +INSERT IGNORE INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1); INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; @@ -4870,7 +4870,7 @@ CREATE TABLE t1(a ENUM('') NOT NULL); INSERT INTO t1 VALUES (), (), (); EXPLAIN SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci; 1 1 diff --git a/mysql-test/r/set_statement.result b/mysql-test/r/set_statement.result index 4cb143f6ba5..406ca99a5ea 100644 --- a/mysql-test/r/set_statement.result +++ b/mysql-test/r/set_statement.result @@ -642,7 +642,7 @@ SELECT @@myisam_sort_buffer_size, '# Pre-STATEMENT variable value SELECT @@sql_mode; @@sql_mode -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION '' '' SET STATEMENT sql_mode='ansi' FOR PREPARE stmt FROM 'SELECT "t1".* FROM t1'; @@ -652,14 +652,16 @@ v1 v2 3 4 ALTER TABLE t1 ADD COLUMN v3 int; execute stmt; -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 '.* FROM t1' at line 1 +v1 v2 v3 +1 2 NULL +3 4 NULL ALTER TABLE t1 drop COLUMN v3; deallocate prepare stmt; '' '# Post-STATEMENT SELECT @@sql_mode; @@sql_mode -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION check the same behaviour in normal set SET sql_mode='ansi'; PREPARE stmt FROM 'SELECT "t1".* FROM t1'; @@ -670,12 +672,14 @@ v1 v2 3 4 ALTER TABLE t1 ADD COLUMN v3 int; execute stmt; -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 '.* FROM t1' at line 1 +v1 v2 v3 +1 2 NULL +3 4 NULL ALTER TABLE t1 drop COLUMN v3; deallocate prepare stmt; SELECT @@sql_mode; @@sql_mode -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SET sql_mode='ansi'; SELECT @@sql_mode; @@sql_mode @@ -704,7 +708,7 @@ ALTER TABLE t1 drop COLUMN v3; drop procedure p6; SELECT @@sql_mode; @@sql_mode -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION # SET and the statement parsed as one unit before the SET takes effect SET STATEMENT sql_mode='ansi' FOR CREATE PROCEDURE p6() BEGIN @@ -715,7 +719,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp END' at line 4 SELECT @@sql_mode; @@sql_mode -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SET sql_mode='ansi'; SELECT @@sql_mode; @@sql_mode @@ -732,7 +736,7 @@ v1 v2 SET sql_mode=default; SELECT @@sql_mode; @@sql_mode -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION # SET and the statement parsed as one unit before the SET takes effect SET STATEMENT sql_mode='ansi' FOR BEGIN NOT ATOMIC diff --git a/mysql-test/r/set_statement_debug.result b/mysql-test/r/set_statement_debug.result index bf873a6e824..39c5af2c623 100644 --- a/mysql-test/r/set_statement_debug.result +++ b/mysql-test/r/set_statement_debug.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Sort aborted.*"); set @save_debug_dbug= @@debug_dbug; set statement debug_dbug="d,something" for select @@debug_dbug; @@debug_dbug diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 7ef480a6019..bf4627f6f68 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1010,13 +1010,13 @@ def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_TABLE Table 253 192 2 N 1 def information_schema TRIGGERS TRIGGERS ACTION_STATEMENT Statement 252 589815 10 N 17 0 33 def information_schema TRIGGERS TRIGGERS ACTION_TIMING Timing 253 18 6 N 1 0 33 def information_schema TRIGGERS TRIGGERS CREATED Created 12 22 22 Y 128 2 63 -def information_schema TRIGGERS TRIGGERS SQL_MODE sql_mode 253 24576 42 N 1 0 33 +def information_schema TRIGGERS TRIGGERS SQL_MODE sql_mode 253 24576 89 N 1 0 33 def information_schema TRIGGERS TRIGGERS DEFINER Definer 253 567 14 N 1 0 33 def information_schema TRIGGERS TRIGGERS CHARACTER_SET_CLIENT character_set_client 253 96 6 N 1 0 33 def information_schema TRIGGERS TRIGGERS COLLATION_CONNECTION collation_connection 253 96 6 N 1 0 33 def information_schema TRIGGERS TRIGGERS DATABASE_COLLATION Database Collation 253 96 17 N 1 0 33 Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -t1_bi INSERT t1 SET @a = 1 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost binary binary latin1_swedish_ci +t1_bi INSERT t1 SET @a = 1 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost binary binary latin1_swedish_ci ---------------------------------------------------------------- SELECT TRIGGER_CATALOG, @@ -1054,10 +1054,10 @@ def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_TABLE ACTION_REFER def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_NEW_TABLE 253 192 0 Y 0 0 33 def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_OLD_ROW 253 9 3 N 1 0 33 def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_ROW ACTION_REFERENCE_NEW_ROW 253 9 3 N 1 0 33 -def information_schema TRIGGERS TRIGGERS SQL_MODE SQL_MODE 253 24576 42 N 1 0 33 +def information_schema TRIGGERS TRIGGERS SQL_MODE SQL_MODE 253 24576 89 N 1 0 33 def information_schema TRIGGERS TRIGGERS DEFINER DEFINER 253 567 14 N 1 0 33 TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW SQL_MODE DEFINER -def test t1_bi INSERT def test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost +def test t1_bi INSERT def test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost SELECT CREATED FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name='t1_bi'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def information_schema TRIGGERS TRIGGERS CREATED CREATED 12 22 22 Y 128 2 63 @@ -1094,13 +1094,13 @@ def test v1 select 1 AS `1` NONE NO root@localhost DEFINER binary binary UNDEFIN SHOW CREATE PROCEDURE p1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def Procedure 253 192 2 N 1 39 33 -def sql_mode 253 126 42 N 1 39 33 +def sql_mode 253 267 89 N 1 39 33 def Create Procedure 253 3072 59 Y 0 39 33 def character_set_client 253 96 6 N 1 39 33 def collation_connection 253 96 6 N 1 39 33 def Database Collation 253 96 17 N 1 39 33 Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +p1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() SELECT 1 binary binary latin1_swedish_ci ---------------------------------------------------------------- SELECT @@ -1140,22 +1140,22 @@ def information_schema ROUTINES ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9 def information_schema ROUTINES ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 1 0 33 def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33 def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33 -def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 42 N 1 0 33 +def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 89 N 1 0 33 def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 252 589815 0 N 17 0 33 def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 567 14 N 1 0 33 SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER -p1 def test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost +p1 def test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost ---------------------------------------------------------------- SHOW CREATE FUNCTION f1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def Function 253 192 2 N 1 39 33 -def sql_mode 253 126 42 N 1 39 33 +def sql_mode 253 267 89 N 1 39 33 def Create Function 253 3072 74 Y 0 39 33 def character_set_client 253 96 6 N 1 39 33 def collation_connection 253 96 6 N 1 39 33 def Database Collation 253 96 17 N 1 39 33 Function sql_mode Create Function character_set_client collation_connection Database Collation -f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) +f1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) RETURN 1 binary binary latin1_swedish_ci ---------------------------------------------------------------- SELECT @@ -1195,11 +1195,11 @@ def information_schema ROUTINES ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9 def information_schema ROUTINES ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 1 0 33 def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33 def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33 -def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 42 N 1 0 33 +def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 89 N 1 0 33 def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 252 589815 0 N 17 0 33 def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 567 14 N 1 0 33 SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER -f1 def test f1 FUNCTION int(11) SQL RETURN 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost +f1 def test f1 FUNCTION int(11) SQL RETURN 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost ---------------------------------------------------------------- DROP DATABASE mysqltest1; DROP TABLE t1; @@ -1369,69 +1369,69 @@ CREATE TABLE t1(c1 INT); CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1; SHOW CREATE TRIGGER t1_bi; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # CREATE PROCEDURE p1() SHOW CREATE TRIGGER t1_bi; CALL p1(); Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # CALL p1(); Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # CALL p1(); Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # CALL p1(); Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # CALL p1(); Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # CALL p1(); Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # CALL p1(); Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # CALL p1(); Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # CALL p1(); Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # CALL p1(); Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # PREPARE stmt1 FROM 'SHOW CREATE TRIGGER t1_bi'; EXECUTE stmt1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # EXECUTE stmt1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # EXECUTE stmt1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # EXECUTE stmt1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # EXECUTE stmt1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # EXECUTE stmt1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # EXECUTE stmt1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # EXECUTE stmt1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # EXECUTE stmt1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # EXECUTE stmt1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci # DROP TABLE t1; DROP PROCEDURE p1; DEALLOCATE PREPARE stmt1; @@ -1455,20 +1455,20 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 'теÑÑ‚' AS `test` koi8r koi8r_general_ci SHOW CREATE PROCEDURE p1; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +p1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() SELECT 'теÑÑ‚' AS test koi8r koi8r_general_ci latin1_swedish_ci SHOW CREATE FUNCTION f1; Function sql_mode Create Function character_set_client collation_connection Database Collation -f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS char(10) CHARSET latin1 +f1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS char(10) CHARSET latin1 RETURN 'теÑÑ‚' koi8r koi8r_general_ci latin1_swedish_ci SHOW CREATE TRIGGER t1_bi; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET NEW.c1 = 'теÑÑ‚' koi8r koi8r_general_ci latin1_swedish_ci # SHOW CREATE EVENT ev1; Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation -ev1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 'теÑÑ‚' AS test koi8r koi8r_general_ci latin1_swedish_ci +ev1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 'теÑÑ‚' AS test koi8r koi8r_general_ci latin1_swedish_ci DROP VIEW v1; DROP PROCEDURE p1; DROP FUNCTION f1; @@ -1538,7 +1538,7 @@ LOCK TABLE t1 WRITE; connection default; SHOW CREATE TRIGGER t1_bi; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a = 1 utf8 utf8_general_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a = 1 utf8 utf8_general_ci latin1_swedish_ci # connection con1; UNLOCK TABLES; # Test 2: ALTER TABLE with SHOW CREATE TRIGGER in transaction @@ -1546,7 +1546,7 @@ connection default; START TRANSACTION; SHOW CREATE TRIGGER t1_bi; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a = 1 utf8 utf8_general_ci latin1_swedish_ci # +t1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a = 1 utf8 utf8_general_ci latin1_swedish_ci # connection con1; ALTER TABLE t1 CHARACTER SET = utf8; disconnect con1; diff --git a/mysql-test/r/signal.result b/mysql-test/r/signal.result index a5eb24442b4..f05e357104d 100644 --- a/mysql-test/r/signal.result +++ b/mysql-test/r/signal.result @@ -1118,6 +1118,7 @@ end $$ call test_signal() $$ ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '999999999999999999999999999999999999999999999999999' drop procedure test_signal $$ +SET sql_mode= '' $$ create procedure test_signal() begin DECLARE aaax VARCHAR(65); @@ -1177,6 +1178,7 @@ Warning 1647 Data truncated for condition item 'CURSOR_NAME' Warning 1647 Data truncated for condition item 'MESSAGE_TEXT' Warning 10000 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222288888888 drop procedure test_signal $$ +set sql_mode = DEFAULT $$ create procedure test_signal() begin DECLARE warn CONDITION FOR SQLSTATE "01234"; @@ -1501,7 +1503,7 @@ select "before RESIGNAL"; RESIGNAL; select "after RESIGNAL"; end; -insert into t_warn set a= 9999999999999999; +insert ignore into t_warn set a= 9999999999999999; end $$ call test_resignal() $$ before RESIGNAL @@ -1618,7 +1620,7 @@ MESSAGE_TEXT = "RESIGNAL of a warning", MYSQL_ERRNO = 5555 ; select "after RESIGNAL"; end; -insert into t_warn set a= 9999999999999999; +insert ignore into t_warn set a= 9999999999999999; end $$ call test_resignal() $$ before RESIGNAL @@ -1892,7 +1894,7 @@ MESSAGE_TEXT = "RESIGNAL to a warning", MYSQL_ERRNO = 5555 ; select "after RESIGNAL"; end; -insert into t_warn set a= 9999999999999999; +insert ignore into t_warn set a= 9999999999999999; end $$ call test_resignal() $$ before RESIGNAL @@ -1913,7 +1915,7 @@ MESSAGE_TEXT = "RESIGNAL to a not found", MYSQL_ERRNO = 5555 ; select "after RESIGNAL"; end; -insert into t_warn set a= 9999999999999999; +insert ignore into t_warn set a= 9999999999999999; end $$ call test_resignal() $$ before RESIGNAL @@ -1934,7 +1936,7 @@ MESSAGE_TEXT = "RESIGNAL to an error", MYSQL_ERRNO = 5555 ; select "after RESIGNAL"; end; -insert into t_warn set a= 9999999999999999; +insert ignore into t_warn set a= 9999999999999999; end $$ call test_resignal() $$ before RESIGNAL diff --git a/mysql-test/r/skip_grants.result b/mysql-test/r/skip_grants.result index b167a197e50..1c055ef7385 100644 --- a/mysql-test/r/skip_grants.result +++ b/mysql-test/r/skip_grants.result @@ -39,11 +39,11 @@ View Create View character_set_client collation_connection v3 CREATE ALGORITHM=UNDEFINED DEFINER=`a`@`%` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`c` AS `c` from `t1` latin1 latin1_swedish_ci SHOW CREATE PROCEDURE p3; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a`@`%` PROCEDURE `p3`() +p3 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a`@`%` PROCEDURE `p3`() SELECT 3 latin1 latin1_swedish_ci latin1_swedish_ci SHOW CREATE FUNCTION f3; Function sql_mode Create Function character_set_client collation_connection Database Collation -f3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a`@`%` FUNCTION `f3`() RETURNS int(11) +f3 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a`@`%` FUNCTION `f3`() RETURNS int(11) RETURN 3 latin1 latin1_swedish_ci latin1_swedish_ci DROP TRIGGER t1_bi; DROP TRIGGER ti_ai; diff --git a/mysql-test/r/sp-dynamic.result b/mysql-test/r/sp-dynamic.result index 7309ba4c765..9fa3bea1108 100644 --- a/mysql-test/r/sp-dynamic.result +++ b/mysql-test/r/sp-dynamic.result @@ -220,6 +220,7 @@ id name call p1()| ERROR HY000: Unknown prepared statement handler (stmt) given to EXECUTE drop procedure p1| +set sql_mode= ''| create procedure p1() begin declare a char(10); @@ -232,6 +233,7 @@ call p1()| ERROR 42S22: Unknown column 'a' in 'field list' call p1()| ERROR 42S22: Unknown column 'a' in 'field list' +set sql_mode= DEFAULT| drop procedure p1| create procedure p1() begin diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index 9b7d84dfdc4..6fbe2d62fd7 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -1879,6 +1879,7 @@ DROP PROCEDURE p1; # # Bug#5889: Exit handler for a warning doesn't hide the warning in trigger # +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1(a INT, b INT); INSERT INTO t1 VALUES (1, 2); CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW @@ -1895,6 +1896,7 @@ a b 10 20 DROP TRIGGER t1_bu; DROP TABLE t1; +SET sql_mode = DEFAULT; # # Bug#9857: Stored procedures: handler for sqlwarning ignored # @@ -1940,11 +1942,11 @@ CREATE TABLE t1(x SMALLINT, y SMALLINT, z SMALLINT); CREATE TABLE t2(a SMALLINT, b SMALLINT, c SMALLINT, d SMALLINT, e SMALLINT, f SMALLINT); CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW -INSERT INTO t2(a, b, c) VALUES(99999, 99999, 99999); +INSERT IGNORE INTO t2(a, b, c) VALUES(99999, 99999, 99999); CREATE TRIGGER t1_ai AFTER INSERT ON t1 FOR EACH ROW -INSERT INTO t2(d, e, f) VALUES(99999, 99999, 99999); +INSERT IGNORE INTO t2(d, e, f) VALUES(99999, 99999, 99999); CREATE PROCEDURE p1() -INSERT INTO t1 VALUES(99999, 99999, 99999); +INSERT IGNORE INTO t1 VALUES(99999, 99999, 99999); CALL p1(); Warnings: @@ -1962,6 +1964,7 @@ DROP TABLE t1; DROP TABLE t2; DROP PROCEDURE p1; # ---------------------------------------------------------------------- +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1(x SMALLINT, y SMALLINT, z SMALLINT); CREATE TABLE t2(a SMALLINT, b SMALLINT, c SMALLINT NOT NULL); CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW @@ -1991,6 +1994,7 @@ Error 1048 Column 'c' cannot be null DROP TABLE t1; DROP TABLE t2; DROP PROCEDURE p1; +SET sql_mode = DEFAULT; ################################################################### # Tests for the following bugs: @@ -2614,7 +2618,7 @@ SELECT 'Warning caught' AS msg; # The INSERT below raises 3 SQL-conditions (warnings). The EXIT HANDLER # above must be invoked once (for one condition), but all three conditions # must be cleared from the Diagnostics Area. -INSERT INTO t1 VALUES('qqqq', 'ww', 'eee'); +INSERT IGNORE INTO t1 VALUES('qqqq', 'ww', 'eee'); # The following INSERT will not be executed, because of the EXIT HANDLER. INSERT INTO t1 VALUES('zzz', 'xx', 'yyyy'); END| @@ -2638,7 +2642,7 @@ SELECT 'Warning 1292 caught' AS msg; # and 3 SQL-warnings with code 1264. The CONTINUE HANDLER above must be # invoked once, and all nine SQL-warnings must be cleared from # the Diagnostics Area. -INSERT INTO t2 +INSERT IGNORE INTO t2 SELECT CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), @@ -2708,7 +2712,7 @@ SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1234; SHOW WARNINGS; SELECT 'Handler for 1292 (2)' AS Msg; END; -INSERT INTO t2 +INSERT IGNORE INTO t2 SELECT CAST(999999 AS SIGNED INTEGER), CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), @@ -2735,7 +2739,7 @@ BEGIN SHOW WARNINGS; SELECT 'Handler for 1292' Msg; END; -INSERT INTO t2 +INSERT IGNORE INTO t2 SELECT CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), @@ -2771,6 +2775,7 @@ DROP TABLE t2; DROP PROCEDURE IF EXISTS p1; DROP PROCEDURE IF EXISTS p2; +SET sql_mode = ''; CREATE PROCEDURE p1() BEGIN DECLARE var1 INTEGER DEFAULT 'string'; @@ -2781,6 +2786,7 @@ CALL p1()| Warnings: Warning 1366 Incorrect integer value: 'string' for column 'var1' at row 1 +SET sql_mode = DEFAULT; CREATE PROCEDURE p2() BEGIN DECLARE EXIT HANDLER FOR SQLWARNING SELECT 'H2'; diff --git a/mysql-test/r/sp-lock.result b/mysql-test/r/sp-lock.result index 25982522163..acf951f6676 100644 --- a/mysql-test/r/sp-lock.result +++ b/mysql-test/r/sp-lock.result @@ -735,7 +735,7 @@ connection con2; get_lock("test", 10) 1 Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +p1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() BEGIN SELECT get_lock("test", 10); SHOW CREATE PROCEDURE p1; diff --git a/mysql-test/r/sp-prelocking.result b/mysql-test/r/sp-prelocking.result index 5b594e9ea55..eb47cc21f41 100644 --- a/mysql-test/r/sp-prelocking.result +++ b/mysql-test/r/sp-prelocking.result @@ -340,3 +340,26 @@ f1() DROP FUNCTION f1; DROP VIEW v1; DROP TABLE t1,t2; +# +# Bug #16672723 "CAN'T FIND TEMPORARY TABLE". +# +CREATE FUNCTION f1() RETURNS INT RETURN 1; +CREATE TEMPORARY TABLE tmp1(a INT); +PREPARE stmt1 FROM "CREATE TEMPORARY TABLE tmp2 AS SELECT b FROM (SELECT f1() AS b FROM tmp1) AS t"; +# The below statement failed before the fix. +EXECUTE stmt1; +DROP TEMPORARY TABLES tmp1, tmp2; +DEALLOCATE PREPARE stmt1; +DROP FUNCTION f1; +create procedure sp1() +begin +drop table if exists t1, t2; +create temporary table t1 select 1 v; +create table t2 (col varchar(45)) select distinct col from (select sf1() as col from t1) t; +end$$ +create function sf1() returns text return 'blah'; +call test.sp1(); +call test.sp1(); +drop procedure sp1; +drop function sf1; +drop table t2; diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result index 22172bf18fc..cd5e6a16967 100644 --- a/mysql-test/r/sp-security.result +++ b/mysql-test/r/sp-security.result @@ -442,19 +442,19 @@ connection con1root; USE mysqltest; SHOW CREATE PROCEDURE wl2897_p1; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -wl2897_p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`mysqltest_2`@`localhost` PROCEDURE `wl2897_p1`() +wl2897_p1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`mysqltest_2`@`localhost` PROCEDURE `wl2897_p1`() SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci SHOW CREATE PROCEDURE wl2897_p3; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -wl2897_p3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a @ b @ c`@`localhost` PROCEDURE `wl2897_p3`() +wl2897_p3 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a @ b @ c`@`localhost` PROCEDURE `wl2897_p3`() SELECT 3 latin1 latin1_swedish_ci latin1_swedish_ci SHOW CREATE FUNCTION wl2897_f1; Function sql_mode Create Function character_set_client collation_connection Database Collation -wl2897_f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`mysqltest_2`@`localhost` FUNCTION `wl2897_f1`() RETURNS int(11) +wl2897_f1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`mysqltest_2`@`localhost` FUNCTION `wl2897_f1`() RETURNS int(11) RETURN 1 latin1 latin1_swedish_ci latin1_swedish_ci SHOW CREATE FUNCTION wl2897_f3; Function sql_mode Create Function character_set_client collation_connection Database Collation -wl2897_f3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a @ b @ c`@`localhost` FUNCTION `wl2897_f3`() RETURNS int(11) +wl2897_f3 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a @ b @ c`@`localhost` FUNCTION `wl2897_f3`() RETURNS int(11) RETURN 3 latin1 latin1_swedish_ci latin1_swedish_ci DROP USER mysqltest_1@localhost; DROP USER mysqltest_2@localhost; @@ -520,7 +520,7 @@ SELECT a; END // SHOW CREATE PROCEDURE test.sp19857; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -sp19857 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user19857`@`localhost` PROCEDURE `sp19857`() +sp19857 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user19857`@`localhost` PROCEDURE `sp19857`() DETERMINISTIC BEGIN DECLARE a INT; @@ -704,7 +704,7 @@ connection con2; # This should work SHOW CREATE PROCEDURE db1.p1; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +p1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci connection default; disconnect con2; diff --git a/mysql-test/r/sp-ucs2.result b/mysql-test/r/sp-ucs2.result index 3c444ad97de..b8cc5dfd73d 100644 --- a/mysql-test/r/sp-ucs2.result +++ b/mysql-test/r/sp-ucs2.result @@ -40,7 +40,7 @@ BEGIN RETURN ''; END| Function sql_mode Create Function character_set_client collation_connection Database Collation -f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET ucs2 COLLATE ucs2_bin +f STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET ucs2 COLLATE ucs2_bin BEGIN RETURN ''; END latin1 latin1_swedish_ci latin1_swedish_ci @@ -55,7 +55,7 @@ BEGIN RETURN ''; END| Function sql_mode Create Function character_set_client collation_connection Database Collation -f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET ucs2 COLLATE ucs2_bin +f STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET ucs2 COLLATE ucs2_bin BEGIN RETURN ''; END latin1 latin1_swedish_ci latin1_swedish_ci @@ -67,7 +67,7 @@ BEGIN RETURN ''; END| Function sql_mode Create Function character_set_client collation_connection Database Collation -f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET latin1 COLLATE latin1_bin +f STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET latin1 COLLATE latin1_bin BEGIN RETURN ''; END latin1 latin1_swedish_ci latin1_swedish_ci @@ -83,7 +83,7 @@ SET f2= f1; SET f2= concat(collation(f1), ' ', collation(f2)); END| Function sql_mode Create Function character_set_client collation_connection Database Collation -f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET latin1 COLLATE latin1_bin +f STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET latin1 COLLATE latin1_bin BEGIN RETURN ''; END latin1 latin1_swedish_ci latin1_swedish_ci @@ -127,7 +127,7 @@ RETURNS ENUM( 'w' ) CHARACTER SET ucs2 RETURN 0; SHOW CREATE FUNCTION bug48766; Function sql_mode Create Function character_set_client collation_connection Database Collation -bug48766 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `bug48766`() RETURNS enum('w') CHARSET ucs2 +bug48766 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `bug48766`() RETURNS enum('w') CHARSET ucs2 RETURN 0 utf8 utf8_general_ci latin1_swedish_ci SELECT DTD_IDENTIFIER FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME='bug48766'; @@ -139,7 +139,7 @@ RETURNS ENUM('а','б','в','г') CHARACTER SET ucs2 RETURN 0; SHOW CREATE FUNCTION bug48766; Function sql_mode Create Function character_set_client collation_connection Database Collation -bug48766 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `bug48766`() RETURNS enum('а','б','в','г') CHARSET ucs2 +bug48766 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `bug48766`() RETURNS enum('а','б','в','г') CHARSET ucs2 RETURN 0 utf8 utf8_general_ci latin1_swedish_ci SELECT DTD_IDENTIFIER FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME='bug48766'; diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 02cca6b7284..a843b9a5f95 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -791,7 +791,7 @@ comment 'Characteristics procedure test' insert into t1 values ("chistics", 1)| show create procedure chistics| Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -chistics NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `chistics`() +chistics STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `chistics`() MODIFIES SQL DATA COMMENT 'Characteristics procedure test' insert into t1 values ("chistics", 1) latin1 latin1_swedish_ci latin1_swedish_ci @@ -803,7 +803,7 @@ delete from t1| alter procedure chistics sql security invoker| show create procedure chistics| Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -chistics NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `chistics`() +chistics STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `chistics`() MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'Characteristics procedure test' @@ -818,7 +818,7 @@ comment 'Characteristics procedure test' return 42| show create function chistics| Function sql_mode Create Function character_set_client collation_connection Database Collation -chistics NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `chistics`() RETURNS int(11) +chistics STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `chistics`() RETURNS int(11) DETERMINISTIC SQL SECURITY INVOKER COMMENT 'Characteristics procedure test' @@ -831,7 +831,7 @@ no sql comment 'Characteristics function test'| show create function chistics| Function sql_mode Create Function character_set_client collation_connection Database Collation -chistics NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `chistics`() RETURNS int(11) +chistics STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `chistics`() RETURNS int(11) NO SQL DETERMINISTIC SQL SECURITY INVOKER diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result index 73cc4f154c7..190f8f78d23 100644 --- a/mysql-test/r/sp_notembedded.result +++ b/mysql-test/r/sp_notembedded.result @@ -56,6 +56,7 @@ return prm * bug10100f(prm - 1); end if; return 1; end| +set statement sql_mode = '' for create procedure bug10100p(prm int, inout res int) begin set res = res * prm; @@ -63,6 +64,7 @@ if prm > 1 then call bug10100p(prm - 1, res); end if; end| +set statement sql_mode = '' for create procedure bug10100t(prm int) begin declare res int; @@ -210,7 +212,7 @@ disconnect rl_contender; drop procedure p1; drop table t1; set session low_priority_updates=default; -INSERT INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv, +INSERT IGNORE INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index 782ae00bb33..04935a4a268 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -742,3 +742,20 @@ DROP FUNCTION test_function; SET @@sql_mode= @org_mode; #End of Test for Bug#12601974 +# +# MDEV-11848 Automatic statement repreparation changes query semantics +# +SET sql_mode=DEFAULT; +CREATE OR REPLACE TABLE t1 (a TEXT); +PREPARE stmt FROM 'INSERT INTO t1 (a) VALUES (2||3)'; +EXECUTE stmt; +SET sql_mode=ORACLE; +EXECUTE stmt; +ALTER TABLE t1 ADD b INT; +EXECUTE stmt; +SELECT * FROM t1; +a b +1 NULL +1 NULL +1 NULL +DROP TABLE t1; diff --git a/mysql-test/r/statistics.result b/mysql-test/r/statistics.result index bf5cb4f1748..a64a69ad368 100644 --- a/mysql-test/r/statistics.result +++ b/mysql-test/r/statistics.result @@ -413,11 +413,11 @@ t1 CREATE TABLE `t1` ( SELECT * FROM mysql.column_stats; db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL -test t1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL -test t1 y 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +test t1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL +test t1 y 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL ALTER TABLE t1 CHANGE COLUMN x b varchar(32), CHANGE COLUMN y e double; SHOW CREATE TABLE t1; @@ -465,11 +465,11 @@ test s1 40 SELECT * FROM mysql.column_stats; db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram test s1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL -test s1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL test s1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL test s1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL test s1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL test s1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +test s1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL SELECT * FROM mysql.index_stats; db_name table_name index_name prefix_arity avg_frequency test s1 PRIMARY 1 1.0000 @@ -592,14 +592,14 @@ test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL SELECT * FROM mysql.index_stats; db_name table_name index_name prefix_arity avg_frequency test t1 PRIMARY 1 1.0000 -test t1 idx4 3 1.1304 -test t1 idx4 2 1.6875 +test t1 idx1 1 6.4000 +test t1 idx1 2 1.6875 test t1 idx2 1 7.0000 test t1 idx2 2 2.3846 test t1 idx3 1 8.5000 test t1 idx4 1 6.2000 -test t1 idx1 2 1.6875 -test t1 idx1 1 6.4000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/save_column_stats' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM mysql.column_stats WHERE column_name='b'; @@ -681,14 +681,14 @@ test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL SELECT * FROM mysql.index_stats; db_name table_name index_name prefix_arity avg_frequency test t1 PRIMARY 1 1.0000 -test t1 idx4 3 1.1304 +test t1 idx1 1 6.4000 +test t1 idx1 2 1.6875 test t1 idx2 1 7.0000 test t1 idx2 2 2.3846 test t1 idx3 1 8.5000 -test t1 idx4 2 1.6875 test t1 idx4 1 6.2000 -test t1 idx1 2 1.6875 -test t1 idx1 1 6.4000 +test t1 idx4 2 1.6875 +test t1 idx4 3 1.1304 ALTER TABLE t1 DROP COLUMN b; SHOW CREATE TABLE t1; Table Create Table @@ -793,11 +793,11 @@ test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL SELECT * FROM mysql.index_stats; db_name table_name index_name prefix_arity avg_frequency test t1 PRIMARY 1 1.0000 -test t1 idx2 1 7.0000 -test t1 idx1 2 NULL test t1 idx1 1 NULL -test t1 idx3 1 8.5000 +test t1 idx1 2 NULL +test t1 idx2 1 7.0000 test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 test t1 idx4 1 6.2000 test t1 idx4 2 NULL test t1 idx4 3 NULL @@ -817,11 +817,11 @@ test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL SELECT * FROM mysql.index_stats; db_name table_name index_name prefix_arity avg_frequency test t1 PRIMARY 1 1.0000 -test t1 idx2 1 7.0000 -test t1 idx1 2 1.6875 test t1 idx1 1 6.4000 -test t1 idx3 1 8.5000 +test t1 idx1 2 1.6875 +test t1 idx2 1 7.0000 test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 test t1 idx4 1 6.2000 test t1 idx4 2 1.6875 test t1 idx4 3 1.1304 @@ -894,13 +894,13 @@ test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL SELECT * FROM mysql.index_stats; db_name table_name index_name prefix_arity avg_frequency test t1 PRIMARY 1 1.0000 +test t1 idx1 1 6.4000 +test t1 idx1 2 1.6875 +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 test t1 idx4 1 6.2000 test t1 idx4 2 1.6875 -test t1 idx3 1 8.5000 -test t1 idx2 2 2.3846 -test t1 idx2 1 7.0000 -test t1 idx1 2 1.6875 -test t1 idx1 1 6.4000 test t1 idx4 3 1.1304 DELETE FROM mysql.table_stats; DELETE FROM mysql.column_stats; @@ -925,9 +925,9 @@ db_name table_name cardinality test t1 40 SELECT * FROM mysql.column_stats; db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL -test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL SELECT * FROM mysql.index_stats; db_name table_name index_name prefix_arity avg_frequency test t1 idx2 1 7.0000 @@ -949,12 +949,12 @@ test.t1 analyze status Engine-independent statistics collected test.t1 analyze status Table is already up to date SELECT * FROM mysql.index_stats; db_name table_name index_name prefix_arity avg_frequency +test t1 PRIMARY 1 1.0000 test t1 idx2 1 7.0000 test t1 idx2 2 2.3846 test t1 idx4 1 6.2000 test t1 idx4 2 1.6875 test t1 idx4 3 1.1304 -test t1 PRIMARY 1 1.0000 DELETE FROM mysql.table_stats; DELETE FROM mysql.column_stats; DELETE FROM mysql.index_stats; @@ -968,19 +968,19 @@ test t1 40 SELECT * FROM mysql.column_stats; db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL -test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL SELECT * FROM mysql.index_stats; db_name table_name index_name prefix_arity avg_frequency test t1 PRIMARY 1 1.0000 -test t1 idx3 1 8.5000 test t1 idx1 1 6.4000 test t1 idx1 2 1.6875 test t1 idx2 1 7.0000 test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 test t1 idx4 1 6.2000 test t1 idx4 2 1.6875 test t1 idx4 3 1.1304 @@ -996,7 +996,7 @@ SELECT * FROM mysql.table_stats; db_name table_name cardinality test t1 40 test t2 40 -SELECT * FROM mysql.column_stats ORDER BY column_name; +SELECT * FROM mysql.column_stats ORDER BY column_name, table_name; db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL @@ -1200,15 +1200,15 @@ test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL SELECT * FROM mysql.index_stats; db_name table_name index_name prefix_arity avg_frequency -test t2 idx3 1 8.5000 +test t2 PRIMARY 1 1.0000 test t2 idx2 1 7.0000 test t2 idx2 2 2.3846 test t2 idx2 3 1.0000 +test t2 idx3 1 8.5000 +test t2 idx3 2 1.0000 test t2 idx4 1 6.2000 test t2 idx4 2 2.2308 test t2 idx4 3 1.0000 -test t2 idx3 2 1.0000 -test t2 PRIMARY 1 1.0000 ANALYZE TABLE t1; Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected @@ -1216,36 +1216,36 @@ test.t1 analyze Warning Engine-independent statistics are not collected for colu test.t1 analyze status OK SELECT * FROM mysql.column_stats; db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram -test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL -test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL -test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL -test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL -test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL +test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL +test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL +test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL +test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL +test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL SELECT * FROM mysql.index_stats; db_name table_name index_name prefix_arity avg_frequency -test t1 idx2 1 7.0000 -test t2 idx3 1 8.5000 -test t1 idx3 1 8.5000 test t1 PRIMARY 1 1.0000 -test t2 idx2 1 7.0000 -test t2 idx2 2 2.3846 -test t2 idx2 3 1.0000 -test t2 idx4 1 6.2000 -test t2 idx4 2 2.2308 -test t2 idx4 3 1.0000 -test t2 idx3 2 1.0000 -test t2 PRIMARY 1 1.0000 -test t1 idx2 2 2.3846 test t1 idx1 1 NULL test t1 idx1 2 NULL +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 test t1 idx4 1 6.2000 test t1 idx4 2 NULL test t1 idx4 3 NULL +test t2 PRIMARY 1 1.0000 +test t2 idx2 1 7.0000 +test t2 idx2 2 2.3846 +test t2 idx2 3 1.0000 +test t2 idx3 1 8.5000 +test t2 idx3 2 1.0000 +test t2 idx4 1 6.2000 +test t2 idx4 2 2.2308 +test t2 idx4 3 1.0000 DELETE FROM mysql.table_stats; DELETE FROM mysql.column_stats; DELETE FROM mysql.index_stats; @@ -1280,11 +1280,11 @@ test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL SELECT * FROM mysql.index_stats; db_name table_name index_name prefix_arity avg_frequency test t1 PRIMARY 1 1.0000 -test t1 idx3 1 8.5000 -test t1 idx2 1 7.0000 -test t1 idx2 2 2.3846 test t1 idx1 1 NULL test t1 idx1 2 NULL +test t1 idx2 1 7.0000 +test t1 idx2 2 2.3846 +test t1 idx3 1 8.5000 test t1 idx4 1 6.2000 test t1 idx4 2 NULL test t1 idx4 3 NULL @@ -1347,22 +1347,22 @@ ANALYZE TABLE Country, City, CountryLanguage; SELECT UPPER(db_name), UPPER(table_name), cardinality FROM mysql.table_stats; UPPER(db_name) UPPER(table_name) cardinality -WORLD COUNTRY 239 WORLD CITY 4079 +WORLD COUNTRY 239 WORLD COUNTRYLANGUAGE 984 SELECT UPPER(db_name), UPPER(table_name), column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency FROM mysql.column_stats; UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency -WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 -WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 -WORLD COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042 -WORLD COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575 -WORLD COUNTRY Capital 1 4074 0.0293 4.0000 1.0000 +WORLD CITY Country ABW ZWE 0.0000 3.0000 17.5819 WORLD CITY ID 1 4079 0.0000 4.0000 1.0000 WORLD CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195 -WORLD CITY Country ABW ZWE 0.0000 3.0000 17.5819 WORLD CITY Population 42 10500000 0.0000 4.0000 1.0467 +WORLD COUNTRY Capital 1 4074 0.0293 4.0000 1.0000 +WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 +WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 +WORLD COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575 +WORLD COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042 WORLD COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232 WORLD COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532 WORLD COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640 @@ -1370,11 +1370,11 @@ SELECT UPPER(db_name), UPPER(table_name), index_name, prefix_arity, avg_frequency FROM mysql.index_stats; UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency -WORLD COUNTRY PRIMARY 1 1.0000 -WORLD COUNTRY Name 1 1.0000 +WORLD CITY Country 1 17.5819 WORLD CITY PRIMARY 1 1.0000 WORLD CITY Population 1 1.0467 -WORLD CITY Country 1 17.5819 +WORLD COUNTRY Name 1 1.0000 +WORLD COUNTRY PRIMARY 1 1.0000 WORLD COUNTRYLANGUAGE PRIMARY 1 4.2232 WORLD COUNTRYLANGUAGE PRIMARY 2 1.0000 WORLD COUNTRYLANGUAGE Percentage 1 2.7640 @@ -1415,37 +1415,37 @@ ANALYZE TABLE Country, City, CountryLanguage; SELECT UPPER(db_name), UPPER(table_name), cardinality FROM mysql.table_stats; UPPER(db_name) UPPER(table_name) cardinality -WORLD COUNTRY 239 WORLD CITY 4079 +WORLD COUNTRY 239 WORLD COUNTRYLANGUAGE 984 -WORLD_INNODB COUNTRY 239 WORLD_INNODB CITY 4079 +WORLD_INNODB COUNTRY 239 WORLD_INNODB COUNTRYLANGUAGE 984 SELECT UPPER(db_name), UPPER(table_name), column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency FROM mysql.column_stats; UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency -WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 -WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 -WORLD COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042 -WORLD COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575 -WORLD COUNTRY Capital 1 4074 0.0293 4.0000 1.0000 +WORLD CITY Country ABW ZWE 0.0000 3.0000 17.5819 WORLD CITY ID 1 4079 0.0000 4.0000 1.0000 WORLD CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195 -WORLD CITY Country ABW ZWE 0.0000 3.0000 17.5819 WORLD CITY Population 42 10500000 0.0000 4.0000 1.0467 +WORLD COUNTRY Capital 1 4074 0.0293 4.0000 1.0000 +WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 +WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 +WORLD COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575 +WORLD COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042 WORLD COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232 WORLD COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532 WORLD COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640 -WORLD_INNODB COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 -WORLD_INNODB COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 -WORLD_INNODB COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042 -WORLD_INNODB COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575 -WORLD_INNODB COUNTRY Capital 1 4074 0.0293 4.0000 1.0000 +WORLD_INNODB CITY Country ABW ZWE 0.0000 3.0000 17.5819 WORLD_INNODB CITY ID 1 4079 0.0000 4.0000 1.0000 WORLD_INNODB CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195 -WORLD_INNODB CITY Country ABW ZWE 0.0000 3.0000 17.5819 WORLD_INNODB CITY Population 42 10500000 0.0000 4.0000 1.0467 +WORLD_INNODB COUNTRY Capital 1 4074 0.0293 4.0000 1.0000 +WORLD_INNODB COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 +WORLD_INNODB COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 +WORLD_INNODB COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575 +WORLD_INNODB COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042 WORLD_INNODB COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232 WORLD_INNODB COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532 WORLD_INNODB COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640 @@ -1453,19 +1453,19 @@ SELECT UPPER(db_name), UPPER(table_name), index_name, prefix_arity, avg_frequency FROM mysql.index_stats; UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency -WORLD COUNTRY PRIMARY 1 1.0000 -WORLD COUNTRY Name 1 1.0000 +WORLD CITY Country 1 17.5819 WORLD CITY PRIMARY 1 1.0000 WORLD CITY Population 1 1.0467 -WORLD CITY Country 1 17.5819 +WORLD COUNTRY Name 1 1.0000 +WORLD COUNTRY PRIMARY 1 1.0000 WORLD COUNTRYLANGUAGE PRIMARY 1 4.2232 WORLD COUNTRYLANGUAGE PRIMARY 2 1.0000 WORLD COUNTRYLANGUAGE Percentage 1 2.7640 -WORLD_INNODB COUNTRY PRIMARY 1 1.0000 -WORLD_INNODB COUNTRY Name 1 1.0000 +WORLD_INNODB CITY Country 1 17.5819 WORLD_INNODB CITY PRIMARY 1 1.0000 WORLD_INNODB CITY Population 1 1.0467 -WORLD_INNODB CITY Country 1 17.5819 +WORLD_INNODB COUNTRY Name 1 1.0000 +WORLD_INNODB COUNTRY PRIMARY 1 1.0000 WORLD_INNODB COUNTRYLANGUAGE PRIMARY 1 4.2232 WORLD_INNODB COUNTRYLANGUAGE PRIMARY 2 1.0000 WORLD_INNODB COUNTRYLANGUAGE Percentage 1 2.7640 @@ -1511,22 +1511,22 @@ DROP DATABASE world; SELECT UPPER(db_name), UPPER(table_name), cardinality FROM mysql.table_stats; UPPER(db_name) UPPER(table_name) cardinality -WORLD_INNODB COUNTRY 239 WORLD_INNODB CITY 4079 +WORLD_INNODB COUNTRY 239 WORLD_INNODB COUNTRYLANGUAGE 984 SELECT UPPER(db_name), UPPER(table_name), column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency FROM mysql.column_stats; UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency -WORLD_INNODB COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 -WORLD_INNODB COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 -WORLD_INNODB COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042 -WORLD_INNODB COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575 -WORLD_INNODB COUNTRY Capital 1 4074 0.0293 4.0000 1.0000 +WORLD_INNODB CITY Country ABW ZWE 0.0000 3.0000 17.5819 WORLD_INNODB CITY ID 1 4079 0.0000 4.0000 1.0000 WORLD_INNODB CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195 -WORLD_INNODB CITY Country ABW ZWE 0.0000 3.0000 17.5819 WORLD_INNODB CITY Population 42 10500000 0.0000 4.0000 1.0467 +WORLD_INNODB COUNTRY Capital 1 4074 0.0293 4.0000 1.0000 +WORLD_INNODB COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 +WORLD_INNODB COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 +WORLD_INNODB COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575 +WORLD_INNODB COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042 WORLD_INNODB COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232 WORLD_INNODB COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532 WORLD_INNODB COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640 @@ -1534,11 +1534,11 @@ SELECT UPPER(db_name), UPPER(table_name), index_name, prefix_arity, avg_frequency FROM mysql.index_stats; UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency -WORLD_INNODB COUNTRY PRIMARY 1 1.0000 -WORLD_INNODB COUNTRY Name 1 1.0000 +WORLD_INNODB CITY Country 1 17.5819 WORLD_INNODB CITY PRIMARY 1 1.0000 WORLD_INNODB CITY Population 1 1.0467 -WORLD_INNODB CITY Country 1 17.5819 +WORLD_INNODB COUNTRY Name 1 1.0000 +WORLD_INNODB COUNTRY PRIMARY 1 1.0000 WORLD_INNODB COUNTRYLANGUAGE PRIMARY 1 4.2232 WORLD_INNODB COUNTRYLANGUAGE PRIMARY 2 1.0000 WORLD_INNODB COUNTRYLANGUAGE Percentage 1 2.7640 diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 49a7c45de6e..025782a365d 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -1374,6 +1374,7 @@ i int comment 123456789*123456789*123456789*123456789*'); ERROR HY000: Comment for field 'i' is too long (max = 1024) set @@sql_mode= @org_mode; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 (i int comment '123456789*123456789*123456789*123456789* diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index dee15c3b451..3b18a4d0262 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -1,5 +1,6 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; drop view if exists v2; +call mtr.add_suppression("Sort aborted.*"); set @subselect_tmp=@@optimizer_switch; set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test, "semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off"); @@ -1202,11 +1203,11 @@ CREATE TABLE `t3` ( PRIMARY KEY (`numeropost`), UNIQUE KEY `maxnumrep` (`maxnumrep`) ) ENGINE=MyISAM CHARSET=latin1; -INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: Warning 1265 Data truncated for column 'date' at row 1 Warning 1265 Data truncated for column 'date' at row 2 -INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: Warning 1265 Data truncated for column 'date' at row 1 Warning 1265 Data truncated for column 'date' at row 2 @@ -4463,7 +4464,7 @@ insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t1(f11 int, f12 int); create table t2(f21 int unsigned not null, f22 int, f23 varchar(10)); insert into t1 values(1,1),(2,2), (3, 3); -insert into t2 +insert ignore into t2 select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a from t0 A, t0 B, t0 C, t0 D; set session sort_buffer_size= 33*1024; @@ -6011,26 +6012,26 @@ SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS (SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1); f1 f1_key -v j -s j -v v -s v -v c s c -v m +s d +s d +s d +s j s m -v d -s d -v d -s d -v y -s y -v t -s t -v d -s d -v s s s +s t +s v +s y +v c +v d +v d +v d +v j +v m +v s +v t +v v +v y DROP TABLE t1,t2; # # LP bug 919427: EXPLAIN for a query over a single-row table @@ -6361,26 +6362,26 @@ SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 ); f1 f1_key -v j -s j -v v -s v -v c s c -v m +s d +s d +s d +s j s m -v d -s d -v d -s d -v y -s y -v t -s t -v d -s d -v s s s +s t +s v +s y +v c +v d +v d +v d +v j +v m +v s +v t +v v +v y explain SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS @@ -7165,6 +7166,17 @@ NULL drop view v2; drop table t1,t2; # +# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) +# +CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); +INSERT INTO t1 VALUES ('foo','bar'); +SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 ); +f1 f2 +SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 ); +f1 f2 +foo bar +DROP TABLE t1; +# # MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops # with UNION in ALL subquery # diff --git a/mysql-test/r/subselect2.result b/mysql-test/r/subselect2.result index e87f4b9b451..b8295416e93 100644 --- a/mysql-test/r/subselect2.result +++ b/mysql-test/r/subselect2.result @@ -16,7 +16,7 @@ DOCID VARCHAR(32)BINARY NOT NULL , PRIMARY KEY ( DOCID ) ) ENGINE=InnoDB ; -INSERT INTO t1 (DOCID) VALUES ("1"), ("2"); +INSERT IGNORE INTO t1 (DOCID) VALUES ("1"), ("2"); Warnings: Warning 1364 Field 'UUID' doesn't have a default value CREATE TABLE t2 @@ -348,4 +348,49 @@ where t1.a = t2.a and ( t1.a = ( select min(a) from t1 ) or 0 ); a a a FRA FRA FRA drop table t1,t2,t3; +# +# MDEV-10148: Database crashes in the query to the View +# +CREATE TABLE t1 ( +key_code INT(11) NOT NULL, +value_string VARCHAR(50) NULL DEFAULT NULL, +PRIMARY KEY (key_code) +) COLLATE='utf8_general_ci' ENGINE=InnoDB ; +CREATE TABLE t2 ( +key_code INT(11) NOT NULL, +target_date DATE NULL DEFAULT NULL, +PRIMARY KEY (key_code) +) COLLATE='utf8_general_ci' ENGINE=InnoDB ; +CREATE TABLE t3 ( +now_date DATE NOT NULL, +PRIMARY KEY (now_date) +) COLLATE='utf8_general_ci' ENGINE=InnoDB ; +CREATE VIEW v1 +AS +SELECT +B.key_code, +B.target_date +FROM +t2 B INNER JOIN t3 C ON +B.target_date = C.now_date +; +SET @s = 'SELECT A.* FROM t1 A WHERE A.key_code IN (SELECT key_code FROM v1)'; +PREPARE stmt FROM @s; +EXECUTE stmt; +key_code value_string +EXECUTE stmt; +key_code value_string +DEALLOCATE PREPARE stmt; +DROP VIEW v1; +DROP TABLE t1,t2,t3; set optimizer_switch=@subselect2_test_tmp; +create table t1 (a int); +create table t2 (a int); +create table t3(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +insert into t2 select a from t1; +insert into t3 select a from t1; +select null in (select a from t1 where a < out3.a union select a from t2 where +(select a from t3) +1 < out3.a+1) from t3 out3; +ERROR 21000: Subquery returns more than 1 row +drop table t1, t2, t3; diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result index 792ce657ba0..6bbb80c0662 100644 --- a/mysql-test/r/subselect4.result +++ b/mysql-test/r/subselect4.result @@ -2401,5 +2401,56 @@ SELECT x FROM t1 WHERE id > (SELECT MAX(id) - 1000 FROM t1) ORDER BY x LIMIT 1; x 0 drop table t1; +# +# MDEV-7691: Assertion `outer_context || !*from_field || *from_field == not_found_field' ... +# +set optimizer_switch=default; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (4),(6); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1),(8); +PREPARE stmt FROM " +SELECT * FROM t2 +HAVING 0 IN ( + SELECT a FROM t1 + WHERE a IN ( + SELECT a FROM t1 + WHERE b = a + ) +) +"; +EXECUTE stmt; +b +EXECUTE stmt; +b +# Alternative test case, without HAVING +CREATE TABLE t3 (i INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (4),(6); +PREPARE stmt FROM " +SELECT * FROM t3 AS t10 +WHERE EXISTS ( + SELECT * FROM t3 AS t20 WHERE t10.i IN ( + SELECT i FROM t3 + ) +)"; +EXECUTE stmt; +i +6 +EXECUTE stmt; +i +6 +drop table t1, t2, t3; SET optimizer_switch= @@global.optimizer_switch; set @@tmp_table_size= @@global.tmp_table_size; +# +# MDEV-10232 Scalar result of subquery changes after adding an outer select stmt +# +create table t1(c1 int, c2 int, primary key(c2)); +insert into t1 values(2,1),(1,2); +select (select c1 from t1 group by c1,c2 order by c1 limit 1) as x; +x +1 +(select c1 from t1 group by c1,c2 order by c1 limit 1); +c1 +1 +drop table t1; diff --git a/mysql-test/r/subselect_cache.result b/mysql-test/r/subselect_cache.result index 86bc78dc204..5c74555af00 100644 --- a/mysql-test/r/subselect_cache.result +++ b/mysql-test/r/subselect_cache.result @@ -2842,70 +2842,70 @@ WHERE table1 .`col_varchar_key` ) field10 1 NULL w 1 NULL y Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'o' -Warning 1292 Truncated incorrect DOUBLE value: 'o' -Warning 1292 Truncated incorrect DOUBLE value: 'o' -Warning 1292 Truncated incorrect DOUBLE value: 'o' -Warning 1292 Truncated incorrect DOUBLE value: 'o' -Warning 1292 Truncated incorrect DOUBLE value: 'o' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' SET @@optimizer_switch='subquery_cache=on'; /* cache is on */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , ( SELECT SUBQUERY2_t1 .`col_int_key` @@ -2933,32 +2933,32 @@ WHERE table1 .`col_varchar_key` ) field10 1 NULL w 1 NULL y Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'r' -Warning 1292 Truncated incorrect DOUBLE value: 'c' -Warning 1292 Truncated incorrect DOUBLE value: 'o' -Warning 1292 Truncated incorrect DOUBLE value: 'd' -Warning 1292 Truncated incorrect DOUBLE value: 'v' -Warning 1292 Truncated incorrect DOUBLE value: 'm' -Warning 1292 Truncated incorrect DOUBLE value: 'j' -Warning 1292 Truncated incorrect DOUBLE value: 'f' -Warning 1292 Truncated incorrect DOUBLE value: 'n' -Warning 1292 Truncated incorrect DOUBLE value: 'z' -Warning 1292 Truncated incorrect DOUBLE value: 'h' -Warning 1292 Truncated incorrect DOUBLE value: 'q' -Warning 1292 Truncated incorrect DOUBLE value: 'w' Warning 1292 Truncated incorrect DOUBLE value: 'a' -Warning 1292 Truncated incorrect DOUBLE value: 'e' -Warning 1292 Truncated incorrect DOUBLE value: 'u' -Warning 1292 Truncated incorrect DOUBLE value: 's' -Warning 1292 Truncated incorrect DOUBLE value: 'g' Warning 1292 Truncated incorrect DOUBLE value: 'b' -Warning 1292 Truncated incorrect DOUBLE value: 'y' -Warning 1292 Truncated incorrect DOUBLE value: 'p' -Warning 1292 Truncated incorrect DOUBLE value: 't' -Warning 1292 Truncated incorrect DOUBLE value: 'x' -Warning 1292 Truncated incorrect DOUBLE value: 'l' -Warning 1292 Truncated incorrect DOUBLE value: 'k' +Warning 1292 Truncated incorrect DOUBLE value: 'c' +Warning 1292 Truncated incorrect DOUBLE value: 'd' +Warning 1292 Truncated incorrect DOUBLE value: 'e' +Warning 1292 Truncated incorrect DOUBLE value: 'f' +Warning 1292 Truncated incorrect DOUBLE value: 'g' +Warning 1292 Truncated incorrect DOUBLE value: 'h' Warning 1292 Truncated incorrect DOUBLE value: 'i' +Warning 1292 Truncated incorrect DOUBLE value: 'j' +Warning 1292 Truncated incorrect DOUBLE value: 'k' +Warning 1292 Truncated incorrect DOUBLE value: 'l' +Warning 1292 Truncated incorrect DOUBLE value: 'm' +Warning 1292 Truncated incorrect DOUBLE value: 'n' +Warning 1292 Truncated incorrect DOUBLE value: 'o' +Warning 1292 Truncated incorrect DOUBLE value: 'p' +Warning 1292 Truncated incorrect DOUBLE value: 'q' +Warning 1292 Truncated incorrect DOUBLE value: 'r' +Warning 1292 Truncated incorrect DOUBLE value: 's' +Warning 1292 Truncated incorrect DOUBLE value: 't' +Warning 1292 Truncated incorrect DOUBLE value: 'u' +Warning 1292 Truncated incorrect DOUBLE value: 'v' +Warning 1292 Truncated incorrect DOUBLE value: 'w' +Warning 1292 Truncated incorrect DOUBLE value: 'x' +Warning 1292 Truncated incorrect DOUBLE value: 'y' +Warning 1292 Truncated incorrect DOUBLE value: 'z' drop table t1,t2,t3,t4; set @@optimizer_switch= default; #launchpad BUG#609045 diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index 0d40ca3d01f..59f9d3c1876 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -1665,7 +1665,7 @@ DROP TABLE t1,t2,t3,t4,t5; # BUG#836532: Crash in Item_equal_fields_iterator::get_curr_field with semijoin+materialization # CREATE TABLE t2 (a int); -INSERT INTO t2 VALUES ('a'),('a'); +INSERT IGNORE INTO t2 VALUES ('a'),('a'); Warnings: Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1 Warning 1366 Incorrect integer value: 'a' for column 'a' at row 2 diff --git a/mysql-test/r/subselect_no_exists_to_in.result b/mysql-test/r/subselect_no_exists_to_in.result index 7f6ff7a6a16..ecefc0b8883 100644 --- a/mysql-test/r/subselect_no_exists_to_in.result +++ b/mysql-test/r/subselect_no_exists_to_in.result @@ -4,6 +4,7 @@ select @@optimizer_switch like '%exists_to_in=off%'; set optimizer_switch='exists_to_in=off'; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; drop view if exists v2; +call mtr.add_suppression("Sort aborted.*"); set @subselect_tmp=@@optimizer_switch; set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test, "semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off"); @@ -1206,11 +1207,11 @@ CREATE TABLE `t3` ( PRIMARY KEY (`numeropost`), UNIQUE KEY `maxnumrep` (`maxnumrep`) ) ENGINE=MyISAM CHARSET=latin1; -INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: Warning 1265 Data truncated for column 'date' at row 1 Warning 1265 Data truncated for column 'date' at row 2 -INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: Warning 1265 Data truncated for column 'date' at row 1 Warning 1265 Data truncated for column 'date' at row 2 @@ -4465,7 +4466,7 @@ insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t1(f11 int, f12 int); create table t2(f21 int unsigned not null, f22 int, f23 varchar(10)); insert into t1 values(1,1),(2,2), (3, 3); -insert into t2 +insert ignore into t2 select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a from t0 A, t0 B, t0 C, t0 D; set session sort_buffer_size= 33*1024; @@ -6011,26 +6012,26 @@ SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS (SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1); f1 f1_key -v j -s j -v v -s v -v c s c -v m +s d +s d +s d +s j s m -v d -s d -v d -s d -v y -s y -v t -s t -v d -s d -v s s s +s t +s v +s y +v c +v d +v d +v d +v j +v m +v s +v t +v v +v y DROP TABLE t1,t2; # # LP bug 919427: EXPLAIN for a query over a single-row table @@ -6361,26 +6362,26 @@ SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 ); f1 f1_key -v j -s j -v v -s v -v c s c -v m +s d +s d +s d +s j s m -v d -s d -v d -s d -v y -s y -v t -s t -v d -s d -v s s s +s t +s v +s y +v c +v d +v d +v d +v j +v m +v s +v t +v v +v y explain SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS @@ -7165,6 +7166,17 @@ NULL drop view v2; drop table t1,t2; # +# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) +# +CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); +INSERT INTO t1 VALUES ('foo','bar'); +SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 ); +f1 f2 +SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 ); +f1 f2 +foo bar +DROP TABLE t1; +# # MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops # with UNION in ALL subquery # diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result index 6a17f8c8bf5..49a60546b78 100644 --- a/mysql-test/r/subselect_no_mat.result +++ b/mysql-test/r/subselect_no_mat.result @@ -7,6 +7,7 @@ set join_cache_level=1; set @join_cache_level_for_subselect_test=@@join_cache_level; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; drop view if exists v2; +call mtr.add_suppression("Sort aborted.*"); set @subselect_tmp=@@optimizer_switch; set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test, "semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off"); @@ -1209,11 +1210,11 @@ CREATE TABLE `t3` ( PRIMARY KEY (`numeropost`), UNIQUE KEY `maxnumrep` (`maxnumrep`) ) ENGINE=MyISAM CHARSET=latin1; -INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: Warning 1265 Data truncated for column 'date' at row 1 Warning 1265 Data truncated for column 'date' at row 2 -INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: Warning 1265 Data truncated for column 'date' at row 1 Warning 1265 Data truncated for column 'date' at row 2 @@ -4465,7 +4466,7 @@ insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t1(f11 int, f12 int); create table t2(f21 int unsigned not null, f22 int, f23 varchar(10)); insert into t1 values(1,1),(2,2), (3, 3); -insert into t2 +insert ignore into t2 select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a from t0 A, t0 B, t0 C, t0 D; set session sort_buffer_size= 33*1024; @@ -6008,26 +6009,26 @@ SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS (SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1); f1 f1_key -v j -s j -v v -s v -v c s c -v m +s d +s d +s d +s j s m -v d -s d -v d -s d -v y -s y -v t -s t -v d -s d -v s s s +s t +s v +s y +v c +v d +v d +v d +v j +v m +v s +v t +v v +v y DROP TABLE t1,t2; # # LP bug 919427: EXPLAIN for a query over a single-row table @@ -6356,26 +6357,26 @@ SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 ); f1 f1_key -v j -s j -v v -s v -v c s c -v m +s d +s d +s d +s j s m -v d -s d -v d -s d -v y -s y -v t -s t -v d -s d -v s s s +s t +s v +s y +v c +v d +v d +v d +v j +v m +v s +v t +v v +v y explain SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS @@ -7158,6 +7159,17 @@ NULL drop view v2; drop table t1,t2; # +# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) +# +CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); +INSERT INTO t1 VALUES ('foo','bar'); +SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 ); +f1 f2 +SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 ); +f1 f2 +foo bar +DROP TABLE t1; +# # MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops # with UNION in ALL subquery # diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result index c37fc66613f..304a427df6b 100644 --- a/mysql-test/r/subselect_no_opts.result +++ b/mysql-test/r/subselect_no_opts.result @@ -3,6 +3,7 @@ set join_cache_level=1; set @join_cache_level_for_subselect_test=@@join_cache_level; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; drop view if exists v2; +call mtr.add_suppression("Sort aborted.*"); set @subselect_tmp=@@optimizer_switch; set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test, "semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off"); @@ -1205,11 +1206,11 @@ CREATE TABLE `t3` ( PRIMARY KEY (`numeropost`), UNIQUE KEY `maxnumrep` (`maxnumrep`) ) ENGINE=MyISAM CHARSET=latin1; -INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: Warning 1265 Data truncated for column 'date' at row 1 Warning 1265 Data truncated for column 'date' at row 2 -INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: Warning 1265 Data truncated for column 'date' at row 1 Warning 1265 Data truncated for column 'date' at row 2 @@ -4461,7 +4462,7 @@ insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t1(f11 int, f12 int); create table t2(f21 int unsigned not null, f22 int, f23 varchar(10)); insert into t1 values(1,1),(2,2), (3, 3); -insert into t2 +insert ignore into t2 select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a from t0 A, t0 B, t0 C, t0 D; set session sort_buffer_size= 33*1024; @@ -6004,26 +6005,26 @@ SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS (SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1); f1 f1_key -v j -s j -v v -s v -v c s c -v m +s d +s d +s d +s j s m -v d -s d -v d -s d -v y -s y -v t -s t -v d -s d -v s s s +s t +s v +s y +v c +v d +v d +v d +v j +v m +v s +v t +v v +v y DROP TABLE t1,t2; # # LP bug 919427: EXPLAIN for a query over a single-row table @@ -6352,26 +6353,26 @@ SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 ); f1 f1_key -v j -s j -v v -s v -v c s c -v m +s d +s d +s d +s j s m -v d -s d -v d -s d -v y -s y -v t -s t -v d -s d -v s s s +s t +s v +s y +v c +v d +v d +v d +v j +v m +v s +v t +v v +v y explain SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS @@ -7156,6 +7157,17 @@ NULL drop view v2; drop table t1,t2; # +# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) +# +CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); +INSERT INTO t1 VALUES ('foo','bar'); +SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 ); +f1 f2 +SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 ); +f1 f2 +foo bar +DROP TABLE t1; +# # MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops # with UNION in ALL subquery # diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result index 0fec9524dd5..c045be5197c 100644 --- a/mysql-test/r/subselect_no_scache.result +++ b/mysql-test/r/subselect_no_scache.result @@ -6,6 +6,7 @@ set join_cache_level=1; set @join_cache_level_for_subselect_test=@@join_cache_level; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; drop view if exists v2; +call mtr.add_suppression("Sort aborted.*"); set @subselect_tmp=@@optimizer_switch; set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test, "semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off"); @@ -1208,11 +1209,11 @@ CREATE TABLE `t3` ( PRIMARY KEY (`numeropost`), UNIQUE KEY `maxnumrep` (`maxnumrep`) ) ENGINE=MyISAM CHARSET=latin1; -INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: Warning 1265 Data truncated for column 'date' at row 1 Warning 1265 Data truncated for column 'date' at row 2 -INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: Warning 1265 Data truncated for column 'date' at row 1 Warning 1265 Data truncated for column 'date' at row 2 @@ -4469,7 +4470,7 @@ insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t1(f11 int, f12 int); create table t2(f21 int unsigned not null, f22 int, f23 varchar(10)); insert into t1 values(1,1),(2,2), (3, 3); -insert into t2 +insert ignore into t2 select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a from t0 A, t0 B, t0 C, t0 D; set session sort_buffer_size= 33*1024; @@ -6017,26 +6018,26 @@ SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS (SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1); f1 f1_key -v j -s j -v v -s v -v c s c -v m +s d +s d +s d +s j s m -v d -s d -v d -s d -v y -s y -v t -s t -v d -s d -v s s s +s t +s v +s y +v c +v d +v d +v d +v j +v m +v s +v t +v v +v y DROP TABLE t1,t2; # # LP bug 919427: EXPLAIN for a query over a single-row table @@ -6367,26 +6368,26 @@ SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 ); f1 f1_key -v j -s j -v v -s v -v c s c -v m +s d +s d +s d +s j s m -v d -s d -v d -s d -v y -s y -v t -s t -v d -s d -v s s s +s t +s v +s y +v c +v d +v d +v d +v j +v m +v s +v t +v v +v y explain SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS @@ -7171,6 +7172,17 @@ NULL drop view v2; drop table t1,t2; # +# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) +# +CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); +INSERT INTO t1 VALUES ('foo','bar'); +SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 ); +f1 f2 +SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 ); +f1 f2 +foo bar +DROP TABLE t1; +# # MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops # with UNION in ALL subquery # diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result index 6b45582eb45..3440ecbc6c1 100644 --- a/mysql-test/r/subselect_no_semijoin.result +++ b/mysql-test/r/subselect_no_semijoin.result @@ -3,6 +3,7 @@ set join_cache_level=1; set @join_cache_level_for_subselect_test=@@join_cache_level; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; drop view if exists v2; +call mtr.add_suppression("Sort aborted.*"); set @subselect_tmp=@@optimizer_switch; set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test, "semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off"); @@ -1205,11 +1206,11 @@ CREATE TABLE `t3` ( PRIMARY KEY (`numeropost`), UNIQUE KEY `maxnumrep` (`maxnumrep`) ) ENGINE=MyISAM CHARSET=latin1; -INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: Warning 1265 Data truncated for column 'date' at row 1 Warning 1265 Data truncated for column 'date' at row 2 -INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: Warning 1265 Data truncated for column 'date' at row 1 Warning 1265 Data truncated for column 'date' at row 2 @@ -4461,7 +4462,7 @@ insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t1(f11 int, f12 int); create table t2(f21 int unsigned not null, f22 int, f23 varchar(10)); insert into t1 values(1,1),(2,2), (3, 3); -insert into t2 +insert ignore into t2 select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a from t0 A, t0 B, t0 C, t0 D; set session sort_buffer_size= 33*1024; @@ -6004,26 +6005,26 @@ SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS (SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1); f1 f1_key -v j -s j -v v -s v -v c s c -v m +s d +s d +s d +s j s m -v d -s d -v d -s d -v y -s y -v t -s t -v d -s d -v s s s +s t +s v +s y +v c +v d +v d +v d +v j +v m +v s +v t +v v +v y DROP TABLE t1,t2; # # LP bug 919427: EXPLAIN for a query over a single-row table @@ -6352,26 +6353,26 @@ SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 ); f1 f1_key -v j -s j -v v -s v -v c s c -v m +s d +s d +s d +s j s m -v d -s d -v d -s d -v y -s y -v t -s t -v d -s d -v s s s +s t +s v +s y +v c +v d +v d +v d +v j +v m +v s +v t +v v +v y explain SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS @@ -7156,6 +7157,17 @@ NULL drop view v2; drop table t1,t2; # +# MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) +# +CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); +INSERT INTO t1 VALUES ('foo','bar'); +SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 ); +f1 f2 +SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 ); +f1 f2 +foo bar +DROP TABLE t1; +# # MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops # with UNION in ALL subquery # diff --git a/mysql-test/r/subselect_sj2.result b/mysql-test/r/subselect_sj2.result index 8f37c09efcf..948be5766a2 100644 --- a/mysql-test/r/subselect_sj2.result +++ b/mysql-test/r/subselect_sj2.result @@ -1318,5 +1318,18 @@ id 1 2 drop table t1,t2,t3; +# +# MDEV-11108: Assertion `uniq_tuple_length_arg <= table->file->max_key_length()' failed in SJ_TMP_TABLE::create_sj_weedout_tmp_table +# +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +CREATE TABLE t2 (pk BLOB, b INT, PRIMARY KEY(pk(1000))) ENGINE=InnoDB; +CREATE TABLE t3 (c INT) ENGINE=InnoDB; +CREATE OR REPLACE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3; +INSERT INTO t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8); +SELECT * FROM t1, t2 +WHERE a IN ( SELECT b FROM t2 LEFT JOIN v3 ON ( c = b ) ) ; +a pk b +DROP TABLE t1,t2,t3; +DROP VIEW v3; # This must be the last in the file: set optimizer_switch=@subselect_sj2_tmp; diff --git a/mysql-test/r/subselect_sj2_jcl6.result b/mysql-test/r/subselect_sj2_jcl6.result index 021646a7599..2955307eb86 100644 --- a/mysql-test/r/subselect_sj2_jcl6.result +++ b/mysql-test/r/subselect_sj2_jcl6.result @@ -1184,7 +1184,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ref PRIMARY PRIMARY 5 const 1 Using where; Using index 1 PRIMARY t2 ALL NULL NULL NULL NULL 1 Start temporary; Using join buffer (flat, BNL join) 1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) -1 PRIMARY t4 hash_index NULL #hash#$hj:PRIMARY 54:59 test.t3.t3_c 2 Using where; End temporary; Using join buffer (incremental, BNLH join) +1 PRIMARY t4 hash_index NULL #hash#$hj:PRIMARY 54:59 test.t3.t3_c 2 Using where; Using index; End temporary; Using join buffer (incremental, BNLH join) DROP TABLE t1,t2,t3,t4; # # MDEV-6263: Wrong result when using IN subquery with order by @@ -1333,6 +1333,19 @@ id 1 2 drop table t1,t2,t3; +# +# MDEV-11108: Assertion `uniq_tuple_length_arg <= table->file->max_key_length()' failed in SJ_TMP_TABLE::create_sj_weedout_tmp_table +# +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +CREATE TABLE t2 (pk BLOB, b INT, PRIMARY KEY(pk(1000))) ENGINE=InnoDB; +CREATE TABLE t3 (c INT) ENGINE=InnoDB; +CREATE OR REPLACE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3; +INSERT INTO t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8); +SELECT * FROM t1, t2 +WHERE a IN ( SELECT b FROM t2 LEFT JOIN v3 ON ( c = b ) ) ; +a pk b +DROP TABLE t1,t2,t3; +DROP VIEW v3; # This must be the last in the file: set optimizer_switch=@subselect_sj2_tmp; # diff --git a/mysql-test/r/subselect_sj2_mat.result b/mysql-test/r/subselect_sj2_mat.result index 46da52fe0eb..a06742241cf 100644 --- a/mysql-test/r/subselect_sj2_mat.result +++ b/mysql-test/r/subselect_sj2_mat.result @@ -1320,6 +1320,19 @@ id 1 2 drop table t1,t2,t3; +# +# MDEV-11108: Assertion `uniq_tuple_length_arg <= table->file->max_key_length()' failed in SJ_TMP_TABLE::create_sj_weedout_tmp_table +# +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +CREATE TABLE t2 (pk BLOB, b INT, PRIMARY KEY(pk(1000))) ENGINE=InnoDB; +CREATE TABLE t3 (c INT) ENGINE=InnoDB; +CREATE OR REPLACE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3; +INSERT INTO t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8); +SELECT * FROM t1, t2 +WHERE a IN ( SELECT b FROM t2 LEFT JOIN v3 ON ( c = b ) ) ; +a pk b +DROP TABLE t1,t2,t3; +DROP VIEW v3; # This must be the last in the file: set optimizer_switch=@subselect_sj2_tmp; set optimizer_switch=default; diff --git a/mysql-test/r/subselect_sj_mat.result b/mysql-test/r/subselect_sj_mat.result index fa74cc36612..a3f3cc4213c 100644 --- a/mysql-test/r/subselect_sj_mat.result +++ b/mysql-test/r/subselect_sj_mat.result @@ -1702,7 +1702,7 @@ DROP TABLE t1,t2,t3,t4,t5; # BUG#836532: Crash in Item_equal_fields_iterator::get_curr_field with semijoin+materialization # CREATE TABLE t2 (a int); -INSERT INTO t2 VALUES ('a'),('a'); +INSERT IGNORE INTO t2 VALUES ('a'),('a'); Warnings: Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1 Warning 1366 Incorrect integer value: 'a' for column 'a' at row 2 diff --git a/mysql-test/r/system_mysql_db_refs.result b/mysql-test/r/system_mysql_db_refs.result index ac072505bc9..96ecd2f27c0 100644 --- a/mysql-test/r/system_mysql_db_refs.result +++ b/mysql-test/r/system_mysql_db_refs.result @@ -1,22 +1,22 @@ set @name="This is a very long string, that mustn't find room in a system field like Table_name. Thus it should be cut by the actual size of the field. So we can use this string to find out the actual length of the field and to use it in any compare queries"; create table test_db select * from mysql.db; delete from test_db; -insert into test_db (Host,Db,User) values (@name,@name,@name); +insert ignore into test_db (Host,Db,User) values (@name,@name,@name); create table test_host select * from mysql.host; delete from test_host; -insert into test_host (Host,Db) values (@name,@name); +insert ignore into test_host (Host,Db) values (@name,@name); create table test_user select * from mysql.user; delete from test_user; -insert into test_user (Host,User) values (@name,@name); +insert ignore into test_user (Host,User) values (@name,@name); create table test_func select * from mysql.func; delete from test_func; -insert into test_func (name) values (@name); +insert ignore into test_func (name) values (@name); create table test_tables_priv select * from mysql.tables_priv; delete from test_tables_priv; -insert into test_tables_priv (Host,Db,User,Table_name) values (@name,@name,@name,@name); +insert ignore into test_tables_priv (Host,Db,User,Table_name) values (@name,@name,@name,@name); create table test_columns_priv select * from mysql.columns_priv; delete from test_columns_priv; -insert into test_columns_priv (Host,Db,User,Table_name,Column_name) values (@name,@name,@name,@name,@name); +insert ignore into test_columns_priv (Host,Db,User,Table_name,Column_name) values (@name,@name,@name,@name,@name); select if(isnull(test_db.Host),'WRONG!!!','ok') as test_db_Host, if(isnull(test_host.Host),'WRONG!!!','ok') as test_host_Host, diff --git a/mysql-test/r/trigger-compat.result b/mysql-test/r/trigger-compat.result index 6e22c46443f..387d4fb1489 100644 --- a/mysql-test/r/trigger-compat.result +++ b/mysql-test/r/trigger-compat.result @@ -29,8 +29,8 @@ wl2818_trg2 mysqltest_dfn@localhost SELECT * FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_name; TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION -def mysqltest_db1 wl2818_trg1 INSERT def mysqltest_db1 t1 1 NULL INSERT INTO t2 VALUES(CURRENT_USER()) ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci -def mysqltest_db1 wl2818_trg2 INSERT def mysqltest_db1 t1 1 NULL INSERT INTO t2 VALUES(CURRENT_USER()) ROW AFTER NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION mysqltest_dfn@localhost latin1 latin1_swedish_ci latin1_swedish_ci +def mysqltest_db1 wl2818_trg1 INSERT def mysqltest_db1 t1 1 NULL INSERT INTO t2 VALUES(CURRENT_USER()) ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci +def mysqltest_db1 wl2818_trg2 INSERT def mysqltest_db1 t1 1 NULL INSERT INTO t2 VALUES(CURRENT_USER()) ROW AFTER NULL NULL OLD NEW # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION mysqltest_dfn@localhost latin1 latin1_swedish_ci latin1_swedish_ci DROP TRIGGER wl2818_trg1; Warnings: Warning 1454 No definer attribute for trigger 'mysqltest_db1'.'wl2818_trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 7c8cb5c46a6..e6c8f6a5e2f 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -2095,7 +2095,7 @@ DROP TABLE t1, t2; CREATE TABLE t1 (id INT NOT NULL); CREATE TABLE t2 (id INT NOT NULL); INSERT t1 VALUES (1),(2),(3); -UPDATE t1 SET id=NULL; +UPDATE IGNORE t1 SET id=NULL; Warnings: Warning 1048 Column 'id' cannot be null Warning 1048 Column 'id' cannot be null @@ -2123,7 +2123,7 @@ CREATE TRIGGER trg1 BEFORE INSERT ON t2 FOR EACH ROW INSERT/*!INTO*/t1 VALUES (1 # Used to crash SHOW TRIGGERS IN db1; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1 INSERT t2 CREATE DEFINER=`root`@`localhost` TRIGGER trg1 BEFORE INSERT ON t2 FOR EACH ROW INSERTINTOt1 VALUES (1) BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci +trg1 INSERT t2 CREATE DEFINER=`root`@`localhost` TRIGGER trg1 BEFORE INSERT ON t2 FOR EACH ROW INSERTINTOt1 VALUES (1) BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci INSERT INTO t2 VALUES (1); ERROR 42000: Trigger 'trg1' has an error in its body: '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 'VALUES (1)' at line 1' SELECT * FROM t1; @@ -2178,6 +2178,7 @@ s1 DELETE FROM t1; DROP TABLE t1; DROP TEMPORARY TABLE t2; +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; DROP TRIGGER IF EXISTS trg1; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a INT); @@ -2205,6 +2206,7 @@ BEGIN DECLARE trg2 CHAR; SELECT 'ab' INTO trg2; END| +SET sql_mode = DEFAULT; INSERT INTO t1 VALUES (0); SELECT * FROM t1; a diff --git a/mysql-test/r/trigger_no_defaults-11698.result b/mysql-test/r/trigger_no_defaults-11698.result new file mode 100644 index 00000000000..40546cee41d --- /dev/null +++ b/mysql-test/r/trigger_no_defaults-11698.result @@ -0,0 +1,22 @@ +set sql_mode='strict_all_tables'; +create table t1 (a int not null, b int); +insert t1 (b) values (1); +ERROR HY000: Field 'a' doesn't have a default value +create trigger trgi before insert on t1 for each row +case new.b +when 10 then +set new.a = new.b; +when 30 then +set new.a = new.a; +else +do 1; +end case| +insert t1 (b) values (10); +insert t1 (b) values (20); +ERROR HY000: Field 'a' doesn't have a default value +insert t1 (b) values (30); +select * from t1; +a b +10 10 +0 30 +drop table t1; diff --git a/mysql-test/r/trigger_notembedded.result b/mysql-test/r/trigger_notembedded.result index 36352623998..3ee84c3c308 100644 --- a/mysql-test/r/trigger_notembedded.result +++ b/mysql-test/r/trigger_notembedded.result @@ -133,8 +133,8 @@ INSERT INTO t1 VALUES(6); ERROR HY000: The user specified as a definer ('mysqltest_nonexs'@'localhost') does not exist SHOW TRIGGERS; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1 INSERT t1 SET @new_sum = 0 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION mysqltest_inv@localhost latin1 latin1_swedish_ci latin1_swedish_ci -trg2 INSERT t1 SET @new_sum = 0 AFTER # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION mysqltest_nonexs@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg1 INSERT t1 SET @new_sum = 0 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION mysqltest_inv@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg2 INSERT t1 SET @new_sum = 0 AFTER # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION mysqltest_nonexs@localhost latin1 latin1_swedish_ci latin1_swedish_ci DROP TRIGGER trg1; DROP TRIGGER trg2; CREATE TRIGGER trg1 BEFORE INSERT ON t1 @@ -163,11 +163,11 @@ trg5 @abcdef@@@hostname SELECT * FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_name; TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION -def mysqltest_db1 trg1 INSERT def mysqltest_db1 t1 1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci -def mysqltest_db1 trg2 INSERT def mysqltest_db1 t1 1 NULL SET @a = 2 ROW AFTER NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @ latin1 latin1_swedish_ci latin1_swedish_ci -def mysqltest_db1 trg3 UPDATE def mysqltest_db1 t1 1 NULL SET @a = 3 ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @abc@def@@% latin1 latin1_swedish_ci latin1_swedish_ci -def mysqltest_db1 trg4 UPDATE def mysqltest_db1 t1 1 NULL SET @a = 4 ROW AFTER NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @hostname latin1 latin1_swedish_ci latin1_swedish_ci -def mysqltest_db1 trg5 DELETE def mysqltest_db1 t1 1 NULL SET @a = 5 ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @abcdef@@@hostname latin1 latin1_swedish_ci latin1_swedish_ci +def mysqltest_db1 trg1 INSERT def mysqltest_db1 t1 1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci +def mysqltest_db1 trg2 INSERT def mysqltest_db1 t1 1 NULL SET @a = 2 ROW AFTER NULL NULL OLD NEW # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @ latin1 latin1_swedish_ci latin1_swedish_ci +def mysqltest_db1 trg3 UPDATE def mysqltest_db1 t1 1 NULL SET @a = 3 ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @abc@def@@% latin1 latin1_swedish_ci latin1_swedish_ci +def mysqltest_db1 trg4 UPDATE def mysqltest_db1 t1 1 NULL SET @a = 4 ROW AFTER NULL NULL OLD NEW # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @hostname latin1 latin1_swedish_ci latin1_swedish_ci +def mysqltest_db1 trg5 DELETE def mysqltest_db1 t1 1 NULL SET @a = 5 ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @abcdef@@@hostname latin1 latin1_swedish_ci latin1_swedish_ci connection default; DROP USER mysqltest_dfn@localhost; DROP USER mysqltest_inv@localhost; diff --git a/mysql-test/r/trigger_null-8605.result b/mysql-test/r/trigger_null-8605.result index b187fc19554..10315988708 100644 --- a/mysql-test/r/trigger_null-8605.result +++ b/mysql-test/r/trigger_null-8605.result @@ -354,3 +354,13 @@ show columns from t1; Field Type Null Key Default Extra a int(11) NO PRI NULL drop table t1; +create table t1 ( +pk int primary key, +i int, +v1 int as (i) virtual, +v2 int as (i) virtual +); +create trigger tr before update on t1 for each row set @a = 1; +insert into t1 (pk, i) values (null, null); +ERROR 23000: Column 'pk' cannot be null +drop table t1; diff --git a/mysql-test/r/trigger_wl3253.result b/mysql-test/r/trigger_wl3253.result index c39591fdc17..bd2d250cb2f 100644 --- a/mysql-test/r/trigger_wl3253.result +++ b/mysql-test/r/trigger_wl3253.result @@ -93,13 +93,13 @@ CREATE TABLE t1 (a INT); CREATE TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1; SHOW TRIGGERS; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -tr1_bi INSERT t1 SET @a:=1 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr1_bi INSERT t1 SET @a:=1 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_schema = 'test'; TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION -def test tr1_bi INSERT def test t1 1 NULL SET @a:=1 ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +def test tr1_bi INSERT def test t1 1 NULL SET @a:=1 ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci SHOW CREATE TRIGGER tr1_bi; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -tr1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 latin1 latin1_swedish_ci latin1_swedish_ci # +tr1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 latin1 latin1_swedish_ci latin1_swedish_ci # DROP TABLE t1; # # Test 6. @@ -142,7 +142,7 @@ SET TIMESTAMP=UNIX_TIMESTAMP('2013-01-31 09:00:01'); CREATE TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1; SHOW CREATE TRIGGER tr1_bi; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -tr1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 latin1 latin1_swedish_ci latin1_swedish_ci 2013-01-31 09:00:01.00 +tr1_bi STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 latin1 latin1_swedish_ci latin1_swedish_ci 2013-01-31 09:00:01.00 DROP TABLE t1; SET TIMESTAMP=DEFAULT; # @@ -155,10 +155,10 @@ SET TIMESTAMP=UNIX_TIMESTAMP('2013-01-31 09:00:01'); CREATE TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1; SHOW TRIGGERS; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -tr1_bi INSERT t1 SET @a:=1 BEFORE 2013-01-31 09:00:01.00 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr1_bi INSERT t1 SET @a:=1 BEFORE 2013-01-31 09:00:01.00 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_schema = 'test'; TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION -def test tr1_bi INSERT def test t1 1 NULL SET @a:=1 ROW BEFORE NULL NULL OLD NEW 2013-01-31 09:00:01.00 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +def test tr1_bi INSERT def test t1 1 NULL SET @a:=1 ROW BEFORE NULL NULL OLD NEW 2013-01-31 09:00:01.00 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci DROP TABLE t1; SET TIMESTAMP=DEFAULT; # @@ -296,12 +296,12 @@ CREATE TRIGGER tr1_ai AFTER INSERT ON t1 FOR EACH ROW FOLLOWS tr1_bi SET @a:=3; ERROR HY000: Referenced trigger 'tr1_bi' for the given action time and event type does not exist SHOW TRIGGERS; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -tr1_bi INSERT t1 SET @a:=1 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci -tr1_bu UPDATE t1 SET @a:=3 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr1_bi INSERT t1 SET @a:=1 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr1_bu UPDATE t1 SET @a:=3 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_schema = 'test'; TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION -def test tr1_bi INSERT def test t1 1 NULL SET @a:=1 ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci -def test tr1_bu UPDATE def test t1 1 NULL SET @a:=3 ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +def test tr1_bi INSERT def test t1 1 NULL SET @a:=1 ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +def test tr1_bu UPDATE def test t1 1 NULL SET @a:=3 ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci DROP TABLE t1; # # Test 17. Check that table's triggers are dumped correctly. @@ -323,7 +323,7 @@ CREATE TABLE `t1` ( /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 */;; DELIMITER ; @@ -338,7 +338,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr2_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=2 */;; DELIMITER ; @@ -353,7 +353,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr1_bu BEFORE UPDATE ON t1 FOR EACH ROW SET @a:=3 */;; DELIMITER ; @@ -385,7 +385,7 @@ CREATE TABLE `t1` ( /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr0_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=0 */;; DELIMITER ; @@ -400,7 +400,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 */;; DELIMITER ; @@ -415,7 +415,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr1_1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=0 */;; DELIMITER ; @@ -430,7 +430,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr2_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=2 */;; DELIMITER ; @@ -454,17 +454,17 @@ SET TIMESTAMP=DEFAULT; - + - + - + diff --git a/mysql-test/r/truncate.result b/mysql-test/r/truncate.result index 9b4cb4a36d9..48839f0eadb 100644 --- a/mysql-test/r/truncate.result +++ b/mysql-test/r/truncate.result @@ -142,7 +142,7 @@ TRUNCATE p1; ERROR 42S02: Table 'test.p1' doesn't exist SHOW CREATE PROCEDURE p1; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +p1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() SET @a = 5 latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE p1; # diff --git a/mysql-test/r/type_binary.result b/mysql-test/r/type_binary.result index 9d44d718a02..7dfe44ab045 100644 --- a/mysql-test/r/type_binary.result +++ b/mysql-test/r/type_binary.result @@ -116,7 +116,7 @@ hex(cast(0x10 as binary(2))) 1000 create table t1 (b binary(2), vb varbinary(2)); insert into t1 values(0x4120, 0x4120); -insert into t1 values(0x412020, 0x412020); +insert ignore into t1 values(0x412020, 0x412020); Warnings: Warning 1265 Data truncated for column 'b' at row 1 Warning 1265 Data truncated for column 'vb' at row 1 @@ -137,7 +137,7 @@ ERROR 22001: Data too long for column 'vb' at row 1 drop table t1; set @@sql_mode= @old_sql_mode; create table t1(f1 int, f2 binary(2) not null, f3 char(2) not null); -insert into t1 set f1=1; +insert ignore into t1 set f1=1; Warnings: Warning 1364 Field 'f2' doesn't have a default value Warning 1364 Field 'f3' doesn't have a default value diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result index 639a97be27b..b2067907391 100644 --- a/mysql-test/r/type_bit.result +++ b/mysql-test/r/type_bit.result @@ -461,7 +461,7 @@ h a drop table t1; create table t1 (a bit(8)) engine=heap; -insert into t1 values ('1111100000'); +insert ignore into t1 values ('1111100000'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select a+0 from t1; @@ -605,7 +605,7 @@ NULL NULL 11111111 11111111 drop table bug15583; create table t1(a bit(1), b smallint unsigned); -insert into t1 (b, a) values ('2', '1'); +insert ignore into t1 (b, a) values ('2', '1'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select hex(a), b from t1; @@ -675,7 +675,7 @@ COUNT(DISTINCT b,c) 2 DROP TABLE t2; CREATE TABLE t1(a BIT(13), KEY(a)); -INSERT INTO t1(a) VALUES +INSERT IGNORE INTO t1(a) VALUES (65535),(65525),(65535),(65535),(65535),(65535),(65535),(65535),(65535),(65535); EXPLAIN SELECT 1 FROM t1 GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result index acb3c311cf5..9b186207f3f 100644 --- a/mysql-test/r/type_bit_innodb.result +++ b/mysql-test/r/type_bit_innodb.result @@ -60,7 +60,7 @@ AAAAAAAAAAAAAAAA 5555555555555555 drop table t1; create table t1 (a bit) engine=innodb; -insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001'); +insert ignore into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001'); Warnings: Warning 1264 Out of range value for column 'a' at row 4 select hex(a) from t1; @@ -74,7 +74,7 @@ alter table t1 add unique (a); ERROR 23000: Duplicate entry '' for key 'a' drop table t1; create table t1 (a bit(2)) engine=innodb; -insert into t1 values (b'00'), (b'01'), (b'10'), (b'100'); +insert ignore into t1 values (b'00'), (b'01'), (b'10'), (b'100'); Warnings: Warning 1264 Out of range value for column 'a' at row 4 select a+0 from t1; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index dae9094f463..b2fe974acdb 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -7,10 +7,12 @@ b text YES NULL c tinyblob YES NULL d mediumtext YES NULL e longtext YES NULL +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 (a char(255), b varbinary(70000), c varchar(70000000)); Warnings: Note 1246 Converting column 'b' from VARBINARY to BLOB Note 1246 Converting column 'c' from VARCHAR to TEXT +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t4 (c varchar(65530) character set utf8 not null); Warnings: Note 1246 Converting column 'c' from VARCHAR to TEXT @@ -36,6 +38,7 @@ CREATE TABLE t1 (a char(257) default "hello"); ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead CREATE TABLE t2 (a char(256)); ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (a varchar(70000) default "hello"); Warnings: Note 1246 Converting column 'a' from VARCHAR to TEXT diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index b28cf54f53a..4b0e4a61c64 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -106,7 +106,7 @@ f2 19781126 DROP TABLE t1, t2, t3; CREATE TABLE t1 (y YEAR); -INSERT INTO t1 VALUES ('abc'); +INSERT IGNORE INTO t1 VALUES ('abc'); Warnings: Warning 1366 Incorrect integer value: 'abc' for column 'y' at row 1 SELECT * FROM t1; @@ -143,7 +143,7 @@ Warning 1292 Incorrect datetime value: '1311' Warning 1292 Incorrect datetime value: '1311' Warning 1292 Incorrect datetime value: '1311' create table t1 (d date , dt datetime , ts timestamp); -insert into t1 values (9912101,9912101,9912101); +insert ignore into t1 values (9912101,9912101,9912101); Warnings: Warning 1265 Data truncated for column 'd' at row 1 Warning 1265 Data truncated for column 'dt' at row 1 @@ -300,7 +300,7 @@ b = CONVERT((SELECT CONVERT(a, DATE) FROM t1 GROUP BY a), DATE) DROP TABLE t1; End of 5.1 tests create table t1 (f1 date, key (f1)); -insert t1 values ('2010-10-10 15:foobar'); +insert ignore t1 values ('2010-10-10 15:foobar'); Warnings: Warning 1265 Data truncated for column 'f1' at row 1 drop table t1; diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 8588ad185ed..c9b3358cca4 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -50,7 +50,7 @@ t 2001-01-01 01:01:01 2001-01-01 01:01:01 truncate table t1; -insert into t1 values("2003-0303 12:13:14"); +insert ignore into t1 values("2003-0303 12:13:14"); Warnings: Warning 1265 Data truncated for column 't' at row 1 select * from t1; @@ -112,7 +112,7 @@ select * from t1 where a is null or b is null; a b drop table t1; create table t1 (t datetime); -insert into t1 values (20030102030460),(20030102036301),(20030102240401), +insert ignore into t1 values (20030102030460),(20030102036301),(20030102240401), (20030132030401),(20031302030401),(100001202030401); Warnings: Warning 1265 Data truncated for column 't' at row 1 @@ -130,7 +130,7 @@ t 0000-00-00 00:00:00 0000-00-00 00:00:00 delete from t1; -insert into t1 values +insert ignore into t1 values ("2003-01-02 03:04:60"),("2003-01-02 03:63:01"),("2003-01-02 24:04:01"), ("2003-01-32 03:04:01"),("2003-13-02 03:04:01"), ("10000-12-02 03:04:00"); Warnings: @@ -149,7 +149,7 @@ t 0000-00-00 00:00:00 0000-00-00 00:00:00 delete from t1; -insert into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer"); +insert ignore into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer"); Warnings: Warning 1265 Data truncated for column 't' at row 1 Warning 1265 Data truncated for column 't' at row 2 diff --git a/mysql-test/r/type_datetime_hires.result b/mysql-test/r/type_datetime_hires.result index 5f10cdb3f39..e2c2f83a96c 100644 --- a/mysql-test/r/type_datetime_hires.result +++ b/mysql-test/r/type_datetime_hires.result @@ -7,7 +7,7 @@ insert t1 values ('2010-12-11 00:20:03.1234'); insert t1 values ('2010-12-11 15:47:11.1234'); insert t1 values (20101211010203.45678); insert t1 values (20101211030405.789e0); -insert t1 values (99991231235959e1); +insert ignore t1 values (99991231235959e1); Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; @@ -95,7 +95,7 @@ a select a, a + interval 2 year from t1; a a + interval 2 year 2010-12-11 01:02:13.3332 2012-12-11 01:02:13.3332 -insert t1 select a + interval 2 year from t1; +insert ignore t1 select a + interval 2 year from t1; select * from t1; a 2010-12-11 01:02:13.3332 diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index 0f72a244fd2..0ead4ec9aa2 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -155,31 +155,31 @@ create table t1 (a decimal(10,2)); insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); insert into t1 values ("-.1"),("+.1"),(".1"); insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); -insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); +insert ignore into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 -insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); +insert ignore into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 Warning 1264 Out of range value for column 'a' at row 3 -insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); +insert ignore into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Note 1265 Data truncated for column 'a' at row 2 Warning 1264 Out of range value for column 'a' at row 3 -insert into t1 values ("1e+4294967296"),("1e-4294967296"); +insert ignore into t1 values ("1e+4294967296"),("1e-4294967296"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Note 1265 Data truncated for column 'a' at row 2 -insert into t1 values ("1e+18446744073709551615"),("1e+18446744073709551616"),("1e-9223372036854775807"),("1e-9223372036854775809"); +insert ignore into t1 values ("1e+18446744073709551615"),("1e+18446744073709551616"),("1e-9223372036854775807"),("1e-9223372036854775809"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1366 Incorrect decimal value: '1e+18446744073709551616' for column 'a' at row 2 Note 1265 Data truncated for column 'a' at row 3 Warning 1366 Incorrect decimal value: '1e-9223372036854775809' for column 'a' at row 4 -insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); +insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: Warning 1265 Data truncated for column 'a' at row 1 Note 1265 Data truncated for column 'a' at row 3 @@ -222,28 +222,28 @@ create table t1 (a decimal(10,2) unsigned); insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); Warnings: Warning 1264 Out of range value for column 'a' at row 6 -insert into t1 values ("-.1"),("+.1"),(".1"); +insert ignore into t1 values ("-.1"),("+.1"),(".1"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); Warnings: Warning 1264 Out of range value for column 'a' at row 3 -insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); +insert ignore into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 Warning 1264 Out of range value for column 'a' at row 3 -insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); +insert ignore into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 Warning 1264 Out of range value for column 'a' at row 3 -insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); +insert ignore into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Note 1265 Data truncated for column 'a' at row 2 Warning 1264 Out of range value for column 'a' at row 3 -insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); +insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: Warning 1265 Data truncated for column 'a' at row 1 Note 1265 Data truncated for column 'a' at row 3 @@ -280,28 +280,28 @@ create table t1 (a decimal(10,2) zerofill); insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); Warnings: Warning 1264 Out of range value for column 'a' at row 6 -insert into t1 values ("-.1"),("+.1"),(".1"); +insert ignore into t1 values ("-.1"),("+.1"),(".1"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); Warnings: Warning 1264 Out of range value for column 'a' at row 3 -insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); +insert ignore into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 Warning 1264 Out of range value for column 'a' at row 3 -insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); +insert ignore into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 Warning 1264 Out of range value for column 'a' at row 3 -insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); +insert ignore into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Note 1265 Data truncated for column 'a' at row 2 Warning 1264 Out of range value for column 'a' at row 3 -insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); +insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: Warning 1265 Data truncated for column 'a' at row 1 Note 1265 Data truncated for column 'a' at row 3 @@ -338,16 +338,16 @@ create table t1 (a decimal(10,2)); insert into t1 values (0.0),("-0.0"),(+0.0),(01.0),(+01.0),(-01.0); insert into t1 values (-.1),(+.1),(.1); insert into t1 values (00000000000001),(+0000000000001),(-0000000000001); -insert into t1 values (+111111111.11),(111111111.11),(-11111111.11); +insert ignore into t1 values (+111111111.11),(111111111.11),(-11111111.11); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 -insert into t1 values (-111111111.11),(+1111111111.11),(1111111111.11); +insert ignore into t1 values (-111111111.11),(+1111111111.11),(1111111111.11); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 Warning 1264 Out of range value for column 'a' at row 3 -insert into t1 values (1e+100),(1e-100),(-1e+100); +insert ignore into t1 values (1e+100),(1e-100),(-1e+100); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Note 1265 Data truncated for column 'a' at row 2 @@ -392,7 +392,7 @@ a 98760.00 drop table t1; create table t1 (a decimal); -insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999); +insert ignore into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 6 @@ -408,7 +408,7 @@ a 9999999999 drop table t1; create table t1 (a decimal unsigned); -insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); +insert ignore into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 @@ -424,7 +424,7 @@ a 9999999999 drop table t1; create table t1 (a decimal zerofill); -insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); +insert ignore into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 @@ -440,7 +440,7 @@ a 9999999999 drop table t1; create table t1 (a decimal unsigned zerofill); -insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); +insert ignore into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 @@ -456,14 +456,14 @@ a 9999999999 drop table t1; create table t1(a decimal(10,0)); -insert into t1 values ("1e4294967295"); +insert ignore into t1 values ("1e4294967295"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; a 9999999999 delete from t1; -insert into t1 values("1e4294967297"); +insert ignore into t1 values("1e4294967297"); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result index db03e61fcdd..6ad75339847 100644 --- a/mysql-test/r/type_enum.result +++ b/mysql-test/r/type_enum.result @@ -1637,13 +1637,13 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a enum ('0','1')); -insert into t1 set a='foobar'; +insert ignore into t1 set a='foobar'; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a -update t1 set a = replace(a,'x','y'); +update ignore t1 set a = replace(a,'x','y'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; @@ -1782,7 +1782,7 @@ CREATE TABLE t1 ( id INT AUTO_INCREMENT PRIMARY KEY, c1 ENUM('a', '', 'b') ); -INSERT INTO t1 (c1) VALUES (0), ('a'), (''), ('b'); +INSERT IGNORE INTO t1 (c1) VALUES (0), ('a'), (''), ('b'); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 SELECT id, c1 + 0, c1 FROM t1; @@ -1791,6 +1791,7 @@ id c1 + 0 c1 2 1 a 3 2 4 3 b +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 CHANGE c1 c1 ENUM('a', '') NOT NULL; Warnings: Warning 1265 Data truncated for column 'c1' at row 4 @@ -1812,7 +1813,7 @@ drop table t1; CREATE TABLE t1 (c1 ENUM('a', '', 'b')); INSERT INTO t1 (c1) VALUES ('b'); INSERT INTO t1 (c1) VALUES (''); -INSERT INTO t1 (c1) VALUES (0); +INSERT IGNORE INTO t1 (c1) VALUES (0); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES (''); @@ -2140,7 +2141,7 @@ DROP TABLE t1; CREATE TABLE t1 (a ENUM('9e200','9e100')); CREATE TABLE t2 (a DOUBLE); INSERT INTO t2 VALUES ('9e100'); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; Warnings: Warning 1265 Data truncated for column 'a' at row 1 SELECT * FROM t1; @@ -2149,6 +2150,7 @@ a DROP TABLE t1,t2; CREATE TABLE t1 (a DOUBLE); INSERT INTO t1 VALUES (9e100); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a ENUM('9e200','9e100'); Warnings: Warning 1916 Got overflow when converting '9e100' to INT. Value truncated @@ -2160,7 +2162,7 @@ DROP TABLE t1; CREATE TABLE t1 (a ENUM('200','100')); CREATE TABLE t2 (a DOUBLE); INSERT INTO t2 VALUES ('100'); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; Warnings: Warning 1265 Data truncated for column 'a' at row 1 SELECT * FROM t1; @@ -2170,7 +2172,7 @@ DROP TABLE t1,t2; CREATE TABLE t1 (a ENUM('200','100')); CREATE TABLE t2 (a INT); INSERT INTO t2 VALUES ('100'); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; Warnings: Warning 1265 Data truncated for column 'a' at row 1 SELECT * FROM t1; @@ -2179,6 +2181,7 @@ a DROP TABLE t1,t2; CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES ('200'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a ENUM('200','100'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 @@ -2189,7 +2192,7 @@ DROP TABLE t1; CREATE TABLE t1 (a ENUM('200','100')); CREATE TABLE t2 (a INT); INSERT INTO t2 VALUES ('100'); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; Warnings: Warning 1265 Data truncated for column 'a' at row 1 SELECT * FROM t1; @@ -2199,7 +2202,7 @@ DROP TABLE t1,t2; CREATE TABLE t1 (a ENUM('2001','2002')); CREATE TABLE t2 (a YEAR); INSERT INTO t2 VALUES ('2001'); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; Warnings: Warning 1265 Data truncated for column 'a' at row 1 SELECT * FROM t1; @@ -2208,6 +2211,7 @@ a DROP TABLE t1,t2; CREATE TABLE t1 (a YEAR); INSERT INTO t1 VALUES ('2001'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a ENUM('2001','2002'); Warnings: Warning 1265 Data truncated for column 'a' at row 1 diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 58dba89745d..43aed60749e 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -135,10 +135,10 @@ drop table t1; create table t1 (a float(200,100), b double(200,100)); ERROR 42000: Too big scale 100 specified for 'a'. Maximum is 30 create table t1 (c20 char); -insert into t1 values (5000.0); +insert ignore into t1 values (5000.0); Warnings: Warning 1265 Data truncated for column 'c20' at row 1 -insert into t1 values (0.5e4); +insert ignore into t1 values (0.5e4); Warnings: Warning 1265 Data truncated for column 'c20' at row 1 drop table t1; @@ -147,7 +147,7 @@ ERROR 42000: Incorrect column specifier for column 'f' drop table if exists t1; create table t1 (d1 double, d2 double unsigned); insert into t1 set d1 = -1.0; -update t1 set d2 = d1; +update ignore t1 set d2 = d1; Warnings: Warning 1264 Out of range value for column 'd2' at row 1 select * from t1; @@ -155,7 +155,7 @@ d1 d2 -1 0 drop table t1; create table t1 (f float(4,3)); -insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11"); +insert ignore into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11"); Warnings: Warning 1264 Out of range value for column 'f' at row 1 Warning 1264 Out of range value for column 'f' at row 2 @@ -173,7 +173,7 @@ f 9.999 drop table if exists t1; create table t1 (f double(4,3)); -insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11"); +insert ignore into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11"); Warnings: Warning 1264 Out of range value for column 'f' at row 1 Warning 1264 Out of range value for column 'f' at row 2 @@ -363,7 +363,7 @@ DROP TABLE t1; create table t1 (f1 double(200, 0)); insert into t1 values (1e199), (-1e199); insert into t1 values (1e200), (-1e200); -insert into t1 values (2e200), (-2e200); +insert ignore into t1 values (2e200), (-2e200); Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 2 @@ -379,7 +379,7 @@ drop table t1; create table t1 (f1 float(30, 0)); insert into t1 values (1e29), (-1e29); insert into t1 values (1e30), (-1e30); -insert into t1 values (2e30), (-2e30); +insert ignore into t1 values (2e30), (-2e30); Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 2 @@ -453,10 +453,10 @@ foo # CREATE TABLE t1 (f FLOAT); INSERT INTO t1 VALUES ('1.'); -INSERT INTO t1 VALUES ('2.0.'); +INSERT IGNORE INTO t1 VALUES ('2.0.'); Warnings: Warning 1265 Data truncated for column 'f' at row 1 -INSERT INTO t1 VALUES ('.'); +INSERT IGNORE INTO t1 VALUES ('.'); Warnings: Warning 1366 Incorrect double value: '.' for column 'f' at row 1 SELECT * FROM t1 ORDER BY f; @@ -645,10 +645,10 @@ DROP TABLE t1; # MDEV-4102 Limitation on DOUBLE or REAL length is ignored with INSERT .. SELECT # CREATE TABLE t1 (d1 DOUBLE(5,2), d2 DOUBLE(10,2)); -INSERT INTO t1 VALUES (10000000.55, 10000000.55); +INSERT IGNORE INTO t1 VALUES (10000000.55, 10000000.55); Warnings: Warning 1264 Out of range value for column 'd1' at row 1 -INSERT INTO t1 SELECT d2, d2 FROM t1; +INSERT IGNORE INTO t1 SELECT d2, d2 FROM t1; Warnings: Warning 1264 Out of range value for column 'd1' at row 1 SELECT * FROM t1; @@ -664,7 +664,7 @@ f FLOAT, d10_10 DOUBLE PRECISION (10,10), d53_10 DOUBLE(53,10) ); -INSERT INTO t1 (f,d10_10,d53_10) VALUES ( +INSERT IGNORE INTO t1 (f,d10_10,d53_10) VALUES ( -9999999999999999999999999999999999999999999.9999999999, -9999999999999999999999999999999999999999999.9999999999, -9999999999999999999999999999999999999999999.9999999999 @@ -676,7 +676,7 @@ SELECT * FROM t1; f -3.40282e38 d10_10 -0.9999999999 d53_10 -10000000000000000000000000000000000000000000.0000000000 -INSERT INTO t1 (f,d10_10,d53_10) SELECT d53_10, d53_10, d53_10 FROM t1; +INSERT IGNORE INTO t1 (f,d10_10,d53_10) SELECT d53_10, d53_10, d53_10 FROM t1; Warnings: Level Warning Code 1264 @@ -705,7 +705,7 @@ DROP TABLE t1; CREATE TABLE t1 (d10_10 DOUBLE (10,10)); CREATE TABLE t2 (d53_10 DOUBLE (53,10)); INSERT INTO t2 VALUES (-9999999999999999999999999999999999999999999.9999999999); -INSERT INTO t1 (d10_10) SELECT d53_10 FROM t2; +INSERT IGNORE INTO t1 (d10_10) SELECT d53_10 FROM t2; Warnings: Warning 1264 Out of range value for column 'd10_10' at row 1 SELECT * FROM t1; @@ -715,7 +715,7 @@ DROP TABLE t1,t2; CREATE TABLE t1 (d2_2 FLOAT (2,2)); CREATE TABLE t2 (d4_2 FLOAT (4,2)); INSERT INTO t2 VALUES (99.99); -INSERT INTO t1 (d2_2) SELECT d4_2 FROM t2; +INSERT IGNORE INTO t1 (d2_2) SELECT d4_2 FROM t2; Warnings: Warning 1264 Out of range value for column 'd2_2' at row 1 SELECT * FROM t1; diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index bc45d6d2789..313894b4b77 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -77,13 +77,13 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a decimal(4,2)); -insert into t1 value (10000), (1.1e10), ("11111"), (100000.1); +insert ignore into t1 value (10000), (1.1e10), ("11111"), (100000.1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 Warning 1264 Out of range value for column 'a' at row 3 Warning 1264 Out of range value for column 'a' at row 4 -insert into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1); +insert ignore into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 @@ -101,13 +101,13 @@ a -99.99 drop table t1; create table t1 (a decimal(4,2) unsigned); -insert into t1 value (10000), (1.1e10), ("11111"), (100000.1); +insert ignore into t1 value (10000), (1.1e10), ("11111"), (100000.1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 Warning 1264 Out of range value for column 'a' at row 3 Warning 1264 Out of range value for column 'a' at row 4 -insert into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1); +insert ignore into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 2 @@ -125,13 +125,13 @@ a 0.00 drop table t1; create table t1 (a bigint); -insert into t1 values (18446744073709551615.0); +insert ignore into t1 values (18446744073709551615.0); Warnings: Warning 1264 Out of range value for column 'a' at row 1 -insert into t1 values (9223372036854775808.0); +insert ignore into t1 values (9223372036854775808.0); Warnings: Warning 1264 Out of range value for column 'a' at row 1 -insert into t1 values (-18446744073709551615.0); +insert ignore into t1 values (-18446744073709551615.0); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -143,10 +143,10 @@ drop table t1; create table t1 (a bigint unsigned); insert into t1 values (18446744073709551615.0); insert into t1 values (9223372036854775808.0); -insert into t1 values (9999999999999999999999999.000); +insert ignore into t1 values (9999999999999999999999999.000); Warnings: Warning 1264 Out of range value for column 'a' at row 1 -insert into t1 values (-1.0); +insert ignore into t1 values (-1.0); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -157,11 +157,11 @@ a 0 drop table t1; create table t1 (a tinyint); -insert into t1 values (18446744073709551615.0); +insert ignore into t1 values (18446744073709551615.0); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 1 -insert into t1 values (9223372036854775808.0); +insert ignore into t1 values (9223372036854775808.0); Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'a' at row 1 diff --git a/mysql-test/r/type_num.result b/mysql-test/r/type_num.result index 9ee67ac8f33..9573852ce72 100644 --- a/mysql-test/r/type_num.result +++ b/mysql-test/r/type_num.result @@ -423,7 +423,7 @@ Note 1265 Data truncated for column 'i2' at row 1 Note 1265 Data truncated for column 'i4' at row 1 Note 1265 Data truncated for column 'i8' at row 1 Note 1265 Data truncated for column 'd' at row 1 -INSERT INTO t1 VALUES ('','','','','','',''); +INSERT IGNORE INTO t1 VALUES ('','','','','','',''); Warnings: Warning 1366 Incorrect double value: '' for column 'f4' at row 1 Warning 1366 Incorrect double value: '' for column 'f8' at row 1 @@ -432,7 +432,7 @@ Warning 1366 Incorrect integer value: '' for column 'i2' at row 1 Warning 1366 Incorrect integer value: '' for column 'i4' at row 1 Warning 1366 Incorrect integer value: '' for column 'i8' at row 1 Warning 1366 Incorrect decimal value: '' for column 'd' at row 1 -INSERT INTO t1 VALUES ('x','x','x','x','x','x','x'); +INSERT IGNORE INTO t1 VALUES ('x','x','x','x','x','x','x'); Warnings: Warning 1366 Incorrect double value: 'x' for column 'f4' at row 1 Warning 1366 Incorrect double value: 'x' for column 'f8' at row 1 @@ -441,7 +441,7 @@ Warning 1366 Incorrect integer value: 'x' for column 'i2' at row 1 Warning 1366 Incorrect integer value: 'x' for column 'i4' at row 1 Warning 1366 Incorrect integer value: 'x' for column 'i8' at row 1 Warning 1366 Incorrect decimal value: 'x' for column 'd' at row 1 -INSERT INTO t1 VALUES (' x',' x',' x',' x',' x',' x',' x'); +INSERT IGNORE INTO t1 VALUES (' x',' x',' x',' x',' x',' x',' x'); Warnings: Warning 1366 Incorrect double value: ' x' for column 'f4' at row 1 Warning 1366 Incorrect double value: ' x' for column 'f8' at row 1 @@ -450,7 +450,7 @@ Warning 1366 Incorrect integer value: ' x' for column 'i2' at row 1 Warning 1366 Incorrect integer value: ' x' for column 'i4' at row 1 Warning 1366 Incorrect integer value: ' x' for column 'i8' at row 1 Warning 1366 Incorrect decimal value: ' x' for column 'd' at row 1 -INSERT INTO t1 VALUES ('.','.','.','.','.','.','.'); +INSERT IGNORE INTO t1 VALUES ('.','.','.','.','.','.','.'); Warnings: Warning 1366 Incorrect double value: '.' for column 'f4' at row 1 Warning 1366 Incorrect double value: '.' for column 'f8' at row 1 @@ -459,7 +459,7 @@ Warning 1366 Incorrect integer value: '.' for column 'i2' at row 1 Warning 1366 Incorrect integer value: '.' for column 'i4' at row 1 Warning 1366 Incorrect integer value: '.' for column 'i8' at row 1 Warning 1366 Incorrect decimal value: '.' for column 'd' at row 1 -INSERT INTO t1 VALUES ('-','-','-','-','-','-','-'); +INSERT IGNORE INTO t1 VALUES ('-','-','-','-','-','-','-'); Warnings: Warning 1366 Incorrect double value: '-' for column 'f4' at row 1 Warning 1366 Incorrect double value: '-' for column 'f8' at row 1 @@ -468,7 +468,7 @@ Warning 1366 Incorrect integer value: '-' for column 'i2' at row 1 Warning 1366 Incorrect integer value: '-' for column 'i4' at row 1 Warning 1366 Incorrect integer value: '-' for column 'i8' at row 1 Warning 1366 Incorrect decimal value: '-' for column 'd' at row 1 -INSERT INTO t1 VALUES ('+','+','+','+','+','+','+'); +INSERT IGNORE INTO t1 VALUES ('+','+','+','+','+','+','+'); Warnings: Warning 1366 Incorrect double value: '+' for column 'f4' at row 1 Warning 1366 Incorrect double value: '+' for column 'f8' at row 1 @@ -477,7 +477,7 @@ Warning 1366 Incorrect integer value: '+' for column 'i2' at row 1 Warning 1366 Incorrect integer value: '+' for column 'i4' at row 1 Warning 1366 Incorrect integer value: '+' for column 'i8' at row 1 Warning 1366 Incorrect decimal value: '+' for column 'd' at row 1 -INSERT INTO t1 VALUES ('1x','1x','1x','1x','1x','1x','1x'); +INSERT IGNORE INTO t1 VALUES ('1x','1x','1x','1x','1x','1x','1x'); Warnings: Warning 1265 Data truncated for column 'f4' at row 1 Warning 1265 Data truncated for column 'f8' at row 1 @@ -486,7 +486,7 @@ Warning 1265 Data truncated for column 'i2' at row 1 Warning 1265 Data truncated for column 'i4' at row 1 Warning 1265 Data truncated for column 'i8' at row 1 Warning 1265 Data truncated for column 'd' at row 1 -INSERT INTO t1 VALUES ('1e','1e','1e','1e','1e','1e','1e'); +INSERT IGNORE INTO t1 VALUES ('1e','1e','1e','1e','1e','1e','1e'); Warnings: Warning 1265 Data truncated for column 'f4' at row 1 Warning 1265 Data truncated for column 'f8' at row 1 @@ -495,7 +495,7 @@ Warning 1265 Data truncated for column 'i2' at row 1 Warning 1265 Data truncated for column 'i4' at row 1 Warning 1265 Data truncated for column 'i8' at row 1 Warning 1265 Data truncated for column 'd' at row 1 -INSERT INTO t1 VALUES ('1e-','1e-','1e-','1e-','1e-','1e-','1e-'); +INSERT IGNORE INTO t1 VALUES ('1e-','1e-','1e-','1e-','1e-','1e-','1e-'); Warnings: Warning 1265 Data truncated for column 'f4' at row 1 Warning 1265 Data truncated for column 'f8' at row 1 @@ -504,7 +504,7 @@ Warning 1265 Data truncated for column 'i2' at row 1 Warning 1265 Data truncated for column 'i4' at row 1 Warning 1265 Data truncated for column 'i8' at row 1 Warning 1265 Data truncated for column 'd' at row 1 -INSERT INTO t1 VALUES ('1E+','1E+','1E+','1E+','1E+','1E+','1E+'); +INSERT IGNORE INTO t1 VALUES ('1E+','1E+','1E+','1E+','1E+','1E+','1E+'); Warnings: Warning 1265 Data truncated for column 'f4' at row 1 Warning 1265 Data truncated for column 'f8' at row 1 @@ -513,7 +513,7 @@ Warning 1265 Data truncated for column 'i2' at row 1 Warning 1265 Data truncated for column 'i4' at row 1 Warning 1265 Data truncated for column 'i8' at row 1 Warning 1265 Data truncated for column 'd' at row 1 -INSERT INTO t1 VALUES ('1e1000','1e1000','1e1000','1e1000','1e1000','1e1000','1e1000'); +INSERT IGNORE INTO t1 VALUES ('1e1000','1e1000','1e1000','1e1000','1e1000','1e1000','1e1000'); Warnings: Warning 1264 Out of range value for column 'f4' at row 1 Warning 1264 Out of range value for column 'f4' at row 1 diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result index a1416b13e1c..fe7392c758f 100644 --- a/mysql-test/r/type_ranges.result +++ b/mysql-test/r/type_ranges.result @@ -90,10 +90,10 @@ Note 1831 Duplicate index `test3`. This is deprecated and will be disallowed in DROP INDEX test ON t1; insert into t1 values (10, 1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one'); insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,NULL,NULL,NULL,NULL,NULL,NULL,2,2,'two','two,one'); -insert into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3); +insert ignore into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3); Warnings: Warning 1265 Data truncated for column 'string' at row 1 -insert into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1); +insert ignore into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1); Warnings: Warning 1264 Out of range value for column 'utiny' at row 1 Warning 1264 Out of range value for column 'ushort' at row 1 @@ -102,7 +102,7 @@ Warning 1264 Out of range value for column 'ulong' at row 1 Warning 1264 Out of range value for column 'ulonglong' at row 1 Warning 1265 Data truncated for column 'options' at row 1 Warning 1265 Data truncated for column 'flags' at row 1 -insert into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,NULL,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree"); +insert ignore into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,NULL,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree"); Warnings: Warning 1265 Data truncated for column 'string' at row 1 Warning 1264 Out of range value for column 'tiny' at row 1 @@ -115,7 +115,7 @@ Warning 1264 Out of range value for column 'umedium' at row 1 Warning 1264 Out of range value for column 'ulong' at row 1 Warning 1264 Out of range value for column 'ulonglong' at row 1 Warning 1265 Data truncated for column 'options' at row 1 -insert into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,NULL,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0); +insert ignore into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,NULL,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0); Warnings: Warning 1264 Out of range value for column 'tiny' at row 1 Warning 1264 Out of range value for column 'short' at row 1 @@ -171,7 +171,7 @@ mediumblob_col mediumblob not null, new_field char(2), PRIMARY KEY (auto) ); -INSERT INTO t2 (string,mediumblob_col,new_field) SELECT string,mediumblob_col,new_field from t1 where auto > 10; +INSERT IGNORE INTO t2 (string,mediumblob_col,new_field) SELECT string,mediumblob_col,new_field from t1 where auto > 10; Warnings: Warning 1265 Data truncated for column 'new_field' at row 2 Warning 1265 Data truncated for column 'new_field' at row 3 @@ -275,12 +275,12 @@ Field Type Collation Null Key Default Extra Privileges Comment auto int(11) unsigned NULL NO PRI NULL # t1 int(1) NULL NO NULL # t2 varchar(1) latin1_swedish_ci NO NULL # -t3 varchar(256) latin1_swedish_ci NO NULL # -t4 varbinary(256) NULL NO NULL # -t5 text latin1_swedish_ci NO NULL # -t6 blob NULL NO NULL # +t3 varchar(256) latin1_swedish_ci YES NULL # +t4 varbinary(256) NULL YES NULL # +t5 text latin1_swedish_ci YES NULL # +t6 blob NULL YES NULL # t7 char(0) latin1_swedish_ci NO NULL # -t8 binary(0) NULL NO NULL # +t8 binary(0) NULL YES NULL # select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2; t1 t2 length(t3) length(t4) length(t5) length(t6) t7 t8 1 a 256 256 4096 4096 diff --git a/mysql-test/r/type_set.result b/mysql-test/r/type_set.result index 9d3a6e3bcb4..742ee5a33e9 100644 --- a/mysql-test/r/type_set.result +++ b/mysql-test/r/type_set.result @@ -72,6 +72,7 @@ set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17', '34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49', '50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','128')); ERROR HY000: Too many strings for column f1 and SET +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1(f1 set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17', '18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33', diff --git a/mysql-test/r/type_temporal_innodb.result b/mysql-test/r/type_temporal_innodb.result index 425e499a5d3..ce2b3a4e53f 100644 --- a/mysql-test/r/type_temporal_innodb.result +++ b/mysql-test/r/type_temporal_innodb.result @@ -7,7 +7,7 @@ TIME'00:00:00'='' Warnings: Warning 1292 Truncated incorrect time value: '' CREATE TABLE t1 (a ENUM('a'), b TIME, c INT, KEY(b)) ENGINE=InnoDB; -INSERT INTO t1 VALUES ('','00:00:00',0); +INSERT IGNORE INTO t1 VALUES ('','00:00:00',0); Warnings: Warning 1265 Data truncated for column 'a' at row 1 SELECT * FROM t1 WHERE b=''; @@ -58,7 +58,7 @@ DATE'0000-00-00'='' Warnings: Warning 1292 Incorrect datetime value: '' CREATE TABLE t1 (a ENUM('a'), b DATE, c INT, KEY(b)) ENGINE=InnoDB; -INSERT INTO t1 VALUES ('','0000-00-00',0); +INSERT IGNORE INTO t1 VALUES ('','0000-00-00',0); Warnings: Warning 1265 Data truncated for column 'a' at row 1 SELECT * FROM t1 WHERE b=''; @@ -109,7 +109,7 @@ TIMESTAMP'0000-00-00 00:00:00'='' Warnings: Warning 1292 Incorrect datetime value: '' CREATE TABLE t1 (a ENUM('a'), b DATETIME, c INT, KEY(b)) ENGINE=InnoDB; -INSERT INTO t1 VALUES ('','0000-00-00 00:00:00',0); +INSERT IGNORE INTO t1 VALUES ('','0000-00-00 00:00:00',0); Warnings: Warning 1265 Data truncated for column 'a' at row 1 SELECT * FROM t1 WHERE b=''; diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index ce1cb424a6c..a827fb19943 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -25,7 +25,7 @@ t 12:30:00 12:30:35 36:30:31 -insert into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a"); +insert ignore into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a"); Warnings: Warning 1265 Data truncated for column 't' at row 1 Warning 1265 Data truncated for column 't' at row 2 @@ -322,7 +322,7 @@ CREATE TABLE t1 (a TIME(6)); INSERT INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED)); ERROR 22007: Incorrect time value: '18446744069414584320' for column 'a' at row 1 SET sql_mode=DEFAULT; -INSERT INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED)); +INSERT IGNORE INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED)); Warnings: Warning 1264 Out of range value for column 'a' at row 1 SELECT * FROM t1; @@ -1230,6 +1230,7 @@ INSERT INTO t1 (a,b,c) SELECT a,a,a FROM t2; Warnings: Warning 1265 Data truncated for column 'b' at row 2 Warning 1265 Data truncated for column 'b' at row 6 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY c TIME; Warnings: Warning 1265 Data truncated for column 'c' at row 2 diff --git a/mysql-test/r/type_time_hires.result b/mysql-test/r/type_time_hires.result index b9f51e6a9b2..a9345a7e83f 100644 --- a/mysql-test/r/type_time_hires.result +++ b/mysql-test/r/type_time_hires.result @@ -15,7 +15,7 @@ Note 1265 Data truncated for column 'a' at row 1 insert t1 values (20101211030405.789e0); Warnings: Note 1265 Data truncated for column 'a' at row 1 -insert t1 values (99991231235959e1); +insert ignore t1 values (99991231235959e1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from t1; @@ -105,7 +105,7 @@ a a + interval 2 year 01:02:13.3332 NULL Warnings: Warning 1441 Datetime function: time field overflow -insert t1 select a + interval 2 year from t1; +insert ignore t1 select a + interval 2 year from t1; Warnings: Warning 1441 Datetime function: time field overflow select * from t1; diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index 93180218fe4..20523dc1791 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -138,7 +138,7 @@ ix+0 0 0 truncate table t1; -insert into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer"); +insert ignore into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer"); Warnings: Warning 1265 Data truncated for column 'ix' at row 1 Warning 1265 Data truncated for column 'ix' at row 2 diff --git a/mysql-test/r/type_timestamp_hires.result b/mysql-test/r/type_timestamp_hires.result index fc1bd83e04f..7179277aa9a 100644 --- a/mysql-test/r/type_timestamp_hires.result +++ b/mysql-test/r/type_timestamp_hires.result @@ -7,7 +7,7 @@ insert t1 values ('2010-12-11 00:20:03.1234'); insert t1 values ('2010-12-11 15:47:11.1234'); insert t1 values (20101211010203.45678); insert t1 values (20101211030405.789e0); -insert t1 values (99991231235959e1); +insert ignore t1 values (99991231235959e1); Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; @@ -95,7 +95,7 @@ a select a, a + interval 2 year from t1; a a + interval 2 year 2010-12-11 01:02:13.3332 2012-12-11 01:02:13.3332 -insert t1 select a + interval 2 year from t1; +insert ignore t1 select a + interval 2 year from t1; select * from t1; a 2010-12-11 01:02:13.3332 diff --git a/mysql-test/r/type_uint.result b/mysql-test/r/type_uint.result index c970f2ff896..ef7a7ed98ca 100644 --- a/mysql-test/r/type_uint.result +++ b/mysql-test/r/type_uint.result @@ -2,10 +2,10 @@ drop table if exists t1; SET SQL_WARNINGS=1; create table t1 (this int unsigned); insert into t1 values (1); -insert into t1 values (-1); +insert ignore into t1 values (-1); Warnings: Warning 1264 Out of range value for column 'this' at row 1 -insert into t1 values ('5000000000'); +insert ignore into t1 values ('5000000000'); Warnings: Warning 1264 Out of range value for column 'this' at row 1 select * from t1; diff --git a/mysql-test/r/type_year.result b/mysql-test/r/type_year.result index 93672abce44..8d58659769e 100644 --- a/mysql-test/r/type_year.result +++ b/mysql-test/r/type_year.result @@ -29,7 +29,7 @@ y y2 2069 69 drop table t1; create table t1 (y year); -insert into t1 values (now()); +insert ignore into t1 values (now()); Warnings: Warning 1265 Data truncated for column 'y' at row 1 select if(y = now(), 1, 0) from t1; @@ -316,7 +316,7 @@ DROP TABLE t2, t4; # Bug #49910: Behavioural change in SELECT/WHERE on YEAR(4) data type # CREATE TABLE t1 (y YEAR NOT NULL, s VARCHAR(4)); -INSERT INTO t1 (s) VALUES ('bad'); +INSERT IGNORE INTO t1 (s) VALUES ('bad'); Warnings: Warning 1364 Field 'y' doesn't have a default value INSERT INTO t1 (y, s) VALUES (0, 0), (2000, 2000), (2001, 2001); @@ -446,37 +446,39 @@ DROP TABLE t1; # MDEV-9392 Copying from DECIMAL to YEAR is not consistent about warnings # CREATE TABLE t1 (a YEAR); -INSERT INTO t1 VALUES (-0.1); +INSERT IGNORE INTO t1 VALUES (-0.1); Warnings: Warning 1264 Out of range value for column 'a' at row 1 DROP TABLE t1; CREATE TABLE t1 (a YEAR); CREATE TABLE t2 (a DECIMAL(10,1)); INSERT INTO t2 VALUES (-0.1); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; Warnings: Warning 1264 Out of range value for column 'a' at row 1 DROP TABLE t1,t2; CREATE TABLE t1 (a DECIMAL(10,1)); INSERT INTO t1 VALUES (-0.1); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a YEAR; Warnings: Warning 1264 Out of range value for column 'a' at row 1 DROP TABLE t1; CREATE TABLE t1 (a YEAR); -INSERT INTO t1 VALUES (-0.1e0); +INSERT IGNORE INTO t1 VALUES (-0.1e0); Warnings: Warning 1264 Out of range value for column 'a' at row 1 DROP TABLE t1; CREATE TABLE t1 (a YEAR); CREATE TABLE t2 (a DOUBLE); INSERT INTO t2 VALUES (-0.1); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; Warnings: Warning 1264 Out of range value for column 'a' at row 1 DROP TABLE t1,t2; CREATE TABLE t1 (a DOUBLE); INSERT INTO t1 VALUES (-0.1); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a YEAR; Warnings: Warning 1264 Out of range value for column 'a' at row 1 diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index adaaf084a3d..3f8ad60e452 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -1121,7 +1121,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `_latin1'test' collate latin1_bin` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' + `_latin1'test' collate latin1_bin` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select count(*) from t1; count(*) @@ -1134,7 +1134,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `test` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' + `test` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select count(*) from t1; count(*) @@ -1147,7 +1147,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `test` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' + `test` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select count(*) from t1; count(*) @@ -1233,12 +1233,9 @@ a b select * from ((select * from t1 limit 1) union (select * from t1 limit 1)) a; a b 1 a -2 b select * from ((select * from t1 limit 1) union (select * from t1 limit 1) union (select * from t1 limit 1)) a; a b 1 a -2 b -3 c select * from ((((select * from t1))) union (select * from t1) union (select * from t1)) a; a b 1 a @@ -1373,7 +1370,7 @@ t3 CREATE TABLE `t3` ( drop tables t1,t2,t3; SELECT @tmp_max:= @@global.max_allowed_packet; @tmp_max:= @@global.max_allowed_packet -4194304 +16777216 SET @@global.max_allowed_packet=25000000; Warnings: Warning 1292 Truncated incorrect max_allowed_packet value: '25000000' @@ -1621,7 +1618,6 @@ NULL UNION RESULT ALL NULL NULL NULL NULL NULL NULL Using filesort Warnings: Note 1003 select NULL AS `a` from `test`.`t1` union select NULL AS `a` from `test`.`t1` order by `a` DROP TABLE t1; -End of 5.0 tests # # Bug#32858: Error: "Incorrect usage of UNION and INTO" does not take # subselects into account @@ -1736,6 +1732,16 @@ a 6 7 8 +(select a from t1 where false) UNION (select a from t1) limit 8; +a +10 +2 +3 +4 +5 +6 +7 +8 drop table t1; # # Bug#11765255 58201: @@ -2031,6 +2037,25 @@ bbbb dddd drop table t1; # +# MDEV-10172: UNION query returns incorrect rows outside +# conditional evaluation +# +create table t1 (d datetime not null primary key); +insert into t1(d) values ('2016-06-01'),('2016-06-02'),('2016-06-03'),('2016-06-04'); +select * from +( +select * from t1 where d between '2016-06-02' and '2016-06-05' + union +(select * from t1 where d < '2016-06-05' order by d desc limit 1) +) onlyJun2toJun4 +order by d; +d +2016-06-02 00:00:00 +2016-06-03 00:00:00 +2016-06-04 00:00:00 +drop table t1; +End of 5.0 tests +# # WL#1763 Avoid creating temporary table in UNION ALL # EXPLAIN SELECT 1 UNION ALL SELECT 1 LIMIT 1 OFFSET 1; diff --git a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result index 9f4762776a6..6066da2481a 100644 --- a/mysql-test/r/user_var-binlog.result +++ b/mysql-test/r/user_var-binlog.result @@ -30,7 +30,7 @@ use `test`/*!*/; SET TIMESTAMP=10000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index d6762e5a1c5..bca59b5225a 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -1278,12 +1278,12 @@ ERROR HY000: Variable 'lower_case_table_names' is a read only variable # SHOW VARIABLES like 'myisam_recover_options'; Variable_name Value -myisam_recover_options DEFAULT +myisam_recover_options BACKUP,QUICK SELECT @@session.myisam_recover_options; ERROR HY000: Variable 'myisam_recover_options' is a GLOBAL variable SELECT @@global.myisam_recover_options; @@global.myisam_recover_options -DEFAULT +BACKUP,QUICK SET @@session.myisam_recover_options= 'x'; ERROR HY000: Variable 'myisam_recover_options' is a read only variable SET @@global.myisam_recover_options= 'x'; @@ -1532,7 +1532,7 @@ SET @@global.key_buffer_size=@kbs; SET @@global.key_cache_block_size=@kcbs; select @@max_long_data_size; @@max_long_data_size -4194304 +16777216 # # Bug#11766424 59527: # Assert in DECIMAL_BIN_SIZE: diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 78cb251ad11..5d8f71ef708 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -1,7 +1,3 @@ -drop table if exists t1,t2,t3,t4,t5,t6,t9,`t1a``b`,v1,v2,v3,v4,v5,v6; -drop view if exists t1,t2,t3,t4,t5,t6,t9,`t1a``b`,v1,v2,v3,v4,v5,v6; -drop database if exists mysqltest; -use test; SET @save_optimizer_switch=@@optimizer_switch; SET optimizer_switch='outer_join_with_cache=off'; create view v1 (c,d) as select a,b from t1; @@ -1315,6 +1311,7 @@ s1 3 drop view v1; drop table t1; +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t1 (s1 tinyint); create trigger t1_bi before insert on t1 for each row set new.s1 = 500; create view v1 as select * from t1 where s1 <> 127 with check option; @@ -1327,6 +1324,7 @@ s1 drop trigger t1_bi; drop view v1; drop table t1; +SET sql_mode = default; create table t1 (s1 tinyint); create view v1 as select * from t1 where s1 <> 0; create view v2 as select * from v1 where s1 <> 1 with cascaded check option; @@ -1581,22 +1579,22 @@ execute stmt1 using @a; deallocate prepare stmt1; select * from v3; a b -100 1000 -101 1000 -300 1000 -301 1000 -100 10 -101 10 -300 10 -301 10 -100 2000 -101 2000 -300 2000 -301 2000 100 0 +100 10 +100 1000 +100 2000 101 0 +101 10 +101 1000 +101 2000 300 0 +300 10 +300 1000 +300 2000 301 0 +301 10 +301 1000 +301 2000 drop view v3; drop tables t1,t2; create table t1(f1 int); @@ -2796,7 +2794,7 @@ DROP VIEW v1; DROP TABLE t1,t2; CREATE TABLE t1 (a INT NOT NULL, b INT NULL DEFAULT NULL); CREATE VIEW v1 AS SELECT a, b FROM t1; -INSERT INTO v1 (b) VALUES (2); +INSERT IGNORE INTO v1 (b) VALUES (2); Warnings: Warning 1423 Field of view 'test.v1' underlying table doesn't have a default value SET SQL_MODE = STRICT_ALL_TABLES; @@ -3643,7 +3641,7 @@ DROP TABLE t1; # create table t1(f1 int, f2 int not null); create view v1 as select f1 from t1; -insert into v1 values(1); +insert ignore into v1 values(1); Warnings: Warning 1423 Field of view 'test.v1' underlying table doesn't have a default value set @old_mode=@@sql_mode; @@ -5848,6 +5846,31 @@ f1 f2 drop table t1, t2; SELECT 1 FROM (SELECT 1 as a) AS b HAVING (SELECT `SOME_GARBAGE`.b.a)=1; ERROR 42S22: Unknown column 'SOME_GARBAGE.b.a' in 'field list' +# +# MDEV-10035: DBUG_ASSERT on CREATE VIEW v1 AS SELECT * FROM t1 +# FOR UPDATE +# +CREATE TABLE t1 (a INT); +insert into t1 values (1),(2); +CREATE VIEW v1 AS SELECT * FROM t1 FOR UPDATE; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` for update latin1 latin1_swedish_ci +select * from v1; +a +1 +2 +DROP VIEW v1; +CREATE VIEW v1 AS SELECT * FROM t1 LOCK IN SHARE MODE; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` lock in share mode latin1 latin1_swedish_ci +select * from v1; +a +1 +2 +DROP VIEW v1; +DROP TABLE t1; # ----------------------------------------------------------------- # -- End of 10.0 tests. # ----------------------------------------------------------------- @@ -6298,6 +6321,30 @@ INSERT INTO v (f1, f3) VALUES (1,1), (2,2); ERROR HY000: Can not modify more than one base table through a join view 'test.v' drop view v; drop tables t1,t2,t3; +create table t1 (i int, j int); +insert t1 values (1,1),(2,2); +create view v1 as select (2, 3) not in (select i, j from t1); +select * from v1; +(2, 3) not in (select i, j from t1) +1 +show create view v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select !((2,3) in (select `t1`.`i`,`t1`.`j` from `t1`)) AS `(2, 3) not in (select i, j from t1)` latin1 latin1_swedish_ci +drop view v1; +drop table t1; +# +# MDEV-10704: Assertion `field->field->table == table_arg' +# failed in fill_record(THD*, TABLE*, List&, List&, +# bool, bool) +# +CREATE TABLE t1 (i INT); +CREATE TABLE t2 (j INT); +CREATE TABLE t3 (k INT); +CREATE ALGORITHM = MERGE VIEW v AS SELECT j AS f1, k AS f2 FROM ( SELECT j FROM t1, t2 ) sq, t3; +REPLACE INTO v (f1,f2) VALUES (1,1); +ERROR HY000: Can not modify more than one base table through a join view 'test.v' +drop view v; +drop table t1,t2,t3; # # End of 10.2 tests # diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index b4b345ca260..3f4f62dc935 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -29,18 +29,18 @@ show errors; Level Code Message 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 ')' at line 1 insert into t1 values (1); -insert into t1 values ("hej"); +insert ignore into t1 values ("hej"); Warnings: Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1 -insert into t1 values ("hej"),("då"); +insert ignore into t1 values ("hej"),("då"); Warnings: Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1 Warning 1366 Incorrect integer value: 'då' for column 'a' at row 2 set SQL_WARNINGS=1; -insert into t1 values ("hej"); +insert ignore into t1 values ("hej"); Warnings: Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1 -insert into t1 values ("hej"),("då"); +insert ignore into t1 values ("hej"),("då"); Warnings: Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1 Warning 1366 Incorrect integer value: 'då' for column 'a' at row 2 @@ -73,7 +73,7 @@ create table t1(a tinyint, b int not null, c date, d char(5)); load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ','; Warnings: Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2 -Warning 1265 Data truncated for column 'd' at row 3 +Warning 1406 Data too long for column 'd' at row 3 Warning 1265 Data truncated for column 'c' at row 4 Warning 1261 Row 5 doesn't contain data for all columns Warning 1265 Data truncated for column 'b' at row 6 @@ -84,7 +84,7 @@ select @@warning_count; 7 drop table t1; create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5)); -insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test'); +insert ignore into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test'); Warnings: Warning 1048 Column 'a' cannot be null Warning 1264 Out of range value for column 'b' at row 2 @@ -92,37 +92,38 @@ Warning 1265 Data truncated for column 'c' at row 2 Warning 1264 Out of range value for column 'a' at row 3 Warning 1264 Out of range value for column 'b' at row 3 Warning 1265 Data truncated for column 'c' at row 3 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify c char(4); Warnings: Warning 1265 Data truncated for column 'c' at row 1 Warning 1265 Data truncated for column 'c' at row 2 alter table t1 add d char(2); -update t1 set a=NULL where a=10; +update ignore t1 set a=NULL where a=10; Warnings: Warning 1048 Column 'a' cannot be null -update t1 set c='mysql ab' where c='test'; +update ignore t1 set c='mysql ab' where c='test'; Warnings: Warning 1265 Data truncated for column 'c' at row 4 -update t1 set d=c; +update ignore t1 set d=c; Warnings: Warning 1265 Data truncated for column 'd' at row 1 Warning 1265 Data truncated for column 'd' at row 2 Warning 1265 Data truncated for column 'd' at row 3 Warning 1265 Data truncated for column 'd' at row 4 create table t2(a tinyint NOT NULL, b char(3)); -insert into t2 select b,c from t1; +insert ignore into t2 select b,c from t1; Warnings: Warning 1265 Data truncated for column 'b' at row 1 Warning 1265 Data truncated for column 'b' at row 2 Warning 1265 Data truncated for column 'b' at row 3 Warning 1048 Column 'a' cannot be null Warning 1265 Data truncated for column 'b' at row 4 -insert into t2(b) values('mysqlab'); +insert ignore into t2(b) values('mysqlab'); Warnings: Warning 1364 Field 'a' doesn't have a default value Warning 1265 Data truncated for column 'b' at row 1 set sql_warnings=1; -insert into t2(b) values('mysqlab'); +insert ignore into t2(b) values('mysqlab'); Warnings: Warning 1364 Field 'a' doesn't have a default value Warning 1265 Data truncated for column 'b' at row 1 @@ -131,7 +132,7 @@ drop table t1, t2; create table t1(a char(10)); alter table t1 add b char; set max_error_count=10; -update t1 set b=a; +update ignore t1 set b=a; Warnings: Warning 1265 Data truncated for column 'b' at row 1 Warning 1265 Data truncated for column 'b' at row 2 @@ -150,7 +151,7 @@ set max_error_count=0; show variables like 'max_error_count'; Variable_name Value max_error_count 0 -update t1 set b='hi'; +update ignore t1 set b='hi'; Warnings: select @@warning_count; @@warning_count @@ -168,7 +169,7 @@ max_error_count 10 drop table t1; create table t1 (a int); insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); -update t1 set a='abc'; +update ignore t1 set a='abc'; Warnings: Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 1 Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 2 @@ -235,6 +236,7 @@ Note 1305 PROCEDURE test.sp2 does not exist DROP PROCEDURE IF EXISTS sp3; Warnings: Note 1305 PROCEDURE test.sp3 does not exist +SET sql_mode = ''; CREATE PROCEDURE sp1() BEGIN DECLARE x NUMERIC ZEROFILL; @@ -259,7 +261,9 @@ Warning 1366 Incorrect decimal value: 'a`' for column 'x' at row 1 CALL sp3(); Warnings: Warning 1366 Incorrect decimal value: 'a`' for column 'x' at row 1 +SET sql_mode = DEFAULT; DROP PROCEDURE IF EXISTS sp1; +SET sql_mode = ''; CREATE PROCEDURE sp1() BEGIN declare x numeric unsigned zerofill; @@ -268,6 +272,7 @@ END// CALL sp1(); Warnings: Warning 1366 Incorrect decimal value: 'a`' for column 'x' at row 1 +SET sql_mode = DEFAULT; DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result index c8c55b91016..f0a9aea0419 100644 --- a/mysql-test/r/win.result +++ b/mysql-test/r/win.result @@ -456,7 +456,7 @@ pk, c, row_number() over (partition by c order by pk range between unbounded preceding and current row) as r from t1; -ERROR HY000: Window frame is not allowed with 'row_number(' +ERROR HY000: Window frame is not allowed with 'row_number' select pk, c, rank() over w1 as r @@ -2270,6 +2270,17 @@ pk c CNT 8 2 0.5000 9 2 0.6667 10 2 1.0000 +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 create view v1 as select pk, c, c/count(*) over (partition by c order by pk rows between 1 preceding and 2 following) as CNT from t1; @@ -2288,6 +2299,17 @@ pk c CNT 8 2 0.5000 9 2 0.6667 10 2 1.0000 +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 select pk, c, c/count(*) over w1 as CNT from t1 window w1 as (partition by c order by pk rows between 1 preceding and 2 following); pk c CNT @@ -2301,6 +2323,17 @@ pk c CNT 8 2 0.5000 9 2 0.6667 10 2 1.0000 +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 create view v2 as select pk, c, c/count(*) over w1 as CNT from t1 window w1 as (partition by c order by pk rows between 1 preceding and 2 following); show create view v2; @@ -2318,6 +2351,17 @@ pk c CNT 8 2 0.5000 9 2 0.6667 10 2 1.0000 +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 select pk, c, c/count(*) over w1 as CNT from t1 window w1 as (partition by c order by pk rows unbounded preceding); pk c CNT @@ -2331,6 +2375,17 @@ pk c CNT 8 2 0.5000 9 2 0.4000 10 2 0.3333 +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 create view v3 as select pk, c, c/count(*) over w1 as CNT from t1 window w1 as (partition by c order by pk rows unbounded preceding); show create view v3; @@ -2348,6 +2403,17 @@ pk c CNT 8 2 0.5000 9 2 0.4000 10 2 0.3333 +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 select pk, c, c/count(*) over (partition by c order by pk range between 3 preceding and current row) as CNT from t1; @@ -2362,6 +2428,17 @@ pk c CNT 8 2 0.5000 9 2 0.5000 10 2 0.5000 +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 create view v4 as select pk, c, c/count(*) over (partition by c order by pk range between 3 preceding and current row) as CNT from t1; @@ -2380,5 +2457,642 @@ pk c CNT 8 2 0.5000 9 2 0.5000 10 2 0.5000 +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 drop view v1,v2,v3,v4; drop table t0,t1; +# +# MDEV-10875: window function in subquery +# +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (3),(1); +CREATE TABLE t2 (c VARCHAR(8)); +INSERT INTO t2 VALUES ('foo'),('bar'),('foo'); +SELECT COUNT(*) OVER (PARTITION BY c) FROM t2; +COUNT(*) OVER (PARTITION BY c) +2 +1 +2 +SELECT * FROM t1 WHERE i IN ( SELECT COUNT(*) OVER (PARTITION BY c) FROM t2 ); +i +1 +DROP TABLE t1, t2; +# +# MDEV-9976: window function without PARTITION BY and ORDER BY +# +CREATE TABLE t1 (id int, a int); +INSERT INTO t1 VALUES +(1,1000), (2,1100), (3,1800), (4,1500), (5,1700), (6,1200), +(7,2000), (8,2100), (9,1600); +SELECT id, sum(a) OVER (PARTITION BY id +ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) +FROM t1; +id sum(a) OVER (PARTITION BY id +1 1000 +2 1100 +3 1800 +4 1500 +5 1700 +6 1200 +7 2000 +8 2100 +9 1600 +ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) +SELECT id, sum(a) OVER (ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) +FROM t1; +id sum(a) OVER (ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) +1 14000 +2 13000 +3 5900 +4 10700 +5 7600 +6 11900 +7 4100 +8 2100 +9 9200 +DROP TABLE t1; +# +# MDEV-11867: window function with aggregation +# over the result of grouping +# +create table t1 ( +username varchar(32), +amount int +); +insert into t1 values +('user1',1), +('user1',5), +('user1',3), +('user2',10), +('user2',20), +('user2',30); +select username, sum(amount) as s, avg(sum(amount)) over (order by s desc) +from t1 +group by username; +username s avg(sum(amount)) over (order by s desc) +user1 9 34.5000 +user2 60 60.0000 +select username, sum(amount), avg(sum(amount)) over (order by sum(amount) desc) +from t1 +group by username; +username sum(amount) avg(sum(amount)) over (order by sum(amount) desc) +user1 9 34.5000 +user2 60 60.0000 +drop table t1; +# +# MDEV-11594: window function over implicit grouping +# +create table t1 (id int); +insert into t1 values (1), (2), (3), (2); +select sum(id) over (order by sum(id)) from t1; +sum(id) over (order by sum(id)) +1 +select sum(sum(id)) over (order by sum(id)) from t1; +sum(sum(id)) over (order by sum(id)) +8 +drop table t1; +# +# MDEV-9923: integer constant in order by list +# of window specification +# +create table t1 (id int); +insert into t1 values (1), (2), (3), (2); +select rank() over (order by 1) from t1; +rank() over (order by 1) +1 +1 +1 +1 +select rank() over (order by 2) from t1; +rank() over (order by 2) +1 +1 +1 +1 +select rank() over (partition by id order by 2) from t1; +rank() over (partition by id order by 2) +1 +1 +1 +1 +drop table t1; +# +# MDEV-10660: view using a simple window function +# +create table t1 (id int); +insert into t1 values (1), (2), (3), (2); +create view v1(id,rnk) as +select id, rank() over (order by id) from t1; +show create view v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`id` AS `id`,rank() over ( order by `t1`.`id`) AS `rnk` from `t1` latin1 latin1_swedish_ci +select id, rank() over (order by id) from t1; +id rank() over (order by id) +1 1 +2 2 +3 4 +2 2 +select * from v1; +id rnk +1 1 +2 2 +3 4 +2 2 +drop view v1; +drop table t1; +# +# MDEV-11138: window function in the query without tables +# +select row_number() over (); +row_number() over () +1 +select count(*) over (); +count(*) over () +1 +select sum(5) over (); +sum(5) over () +5 +select row_number() over (), sum(5) over (); +row_number() over () sum(5) over () +1 5 +select row_number() over (order by 2); +row_number() over (order by 2) +1 +select row_number() over (partition by 2); +row_number() over (partition by 2) +1 +select row_number() over (partition by 4 order by 1+2); +row_number() over (partition by 4 order by 1+2) +1 +# +# MDEV-11999: execution of prepared statement for +# tableless query with window functions +# +prepare stmt from +"select row_number() over (partition by 4 order by 1+2)"; +execute stmt; +row_number() over (partition by 4 order by 1+2) +1 +execute stmt; +row_number() over (partition by 4 order by 1+2) +1 +deallocate prepare stmt; +# +# MDEV-11745: window function with min/max +# +create table t1 (i int, b int); +insert into t1 values +(1,1),(2,1),(3,1),(4,4),(5,4),(6,4),(7,8),(8,8),(9,8),(10,8); +select b, min(i) over (partition by b) as f +from t1 as tt +order by i; +b f +1 1 +1 1 +1 1 +4 4 +4 4 +4 4 +8 7 +8 7 +8 7 +8 7 +select b, min(i) over (partition by b) as f +from (select * from t1) as tt +order by i; +b f +1 1 +1 1 +1 1 +4 4 +4 4 +4 4 +8 7 +8 7 +8 7 +8 7 +select b, min(i+10) over (partition by b) as f +from t1 as tt +order by i; +b f +1 11 +1 11 +1 11 +4 14 +4 14 +4 14 +8 17 +8 17 +8 17 +8 17 +select b, min(i) over (partition by b) as f +from (select i+10 as i, b from t1) as tt +order by i; +b f +1 11 +1 11 +1 11 +4 14 +4 14 +4 14 +8 17 +8 17 +8 17 +8 17 +select b, min(i+20) over (partition by b) as f +from (select i+10 as i, b from t1) as tt +order by i; +b f +1 31 +1 31 +1 31 +4 34 +4 34 +4 34 +8 37 +8 37 +8 37 +8 37 +select b, max(i) over (partition by b) as f +from t1 as tt +order by i; +b f +1 3 +1 3 +1 3 +4 6 +4 6 +4 6 +8 10 +8 10 +8 10 +8 10 +select b, max(i) over (partition by b) as f +from (select * from t1) as tt +order by i; +b f +1 3 +1 3 +1 3 +4 6 +4 6 +4 6 +8 10 +8 10 +8 10 +8 10 +select b, max(i+10) over (partition by b) as f +from t1 as tt +order by i; +b f +1 13 +1 13 +1 13 +4 16 +4 16 +4 16 +8 20 +8 20 +8 20 +8 20 +select b, max(i) over (partition by b) as f +from (select i+10 as i, b from t1) as tt +order by i; +b f +1 13 +1 13 +1 13 +4 16 +4 16 +4 16 +8 20 +8 20 +8 20 +8 20 +select b, max(i+20) over (partition by b) as f +from (select i+10 as i, b from t1) as tt +order by i; +b f +1 33 +1 33 +1 33 +4 36 +4 36 +4 36 +8 40 +8 40 +8 40 +8 40 +select max(i), max(i), sum(i), count(i) +from t1 as tt +group by b; +max(i) max(i) sum(i) count(i) +3 3 6 3 +6 6 15 3 +10 10 34 4 +select max(i), min(sum(i)) over (partition by count(i)) f +from t1 as tt +group by b; +max(i) f +3 6 +6 6 +10 34 +select max(i), min(sum(i)) over (partition by count(i)) f +from (select * from t1) as tt +group by b; +max(i) f +3 6 +6 6 +10 34 +select max(i+10), min(sum(i)+10) over (partition by count(i)) f +from t1 as tt +group by b; +max(i+10) f +13 16 +16 16 +20 44 +select max(i), max(i), sum(i), count(i) +from (select i+10 as i, b from t1) as tt +group by b; +max(i) max(i) sum(i) count(i) +13 13 36 3 +16 16 45 3 +20 20 74 4 +select max(i), min(sum(i)) over (partition by count(i)) f +from (select i+10 as i, b from t1) as tt +group by b; +max(i) f +13 36 +16 36 +20 74 +select max(i), min(i), min(max(i)-min(i)) over (partition by count(i)) f +from (select i+10 as i, b from t1) as tt +group by b; +max(i) min(i) f +13 11 2 +16 14 2 +20 17 3 +drop table t1; +# +# MDEV-12015: window function over select with WHERE +# that is always FALSE +# +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (3), (1), (2); +SELECT i, ROW_NUMBER() OVER () FROM t1 WHERE 1 = 2; +i ROW_NUMBER() OVER () +NULL 1 +SELECT i, COUNT(*) OVER () FROM t1 WHERE 1 = 2; +i COUNT(*) OVER () +NULL 1 +DROP TABLE t1; +# +# MDEV-12051: window function in query with implicit grouping +# on always empty set +# +create table t1 (a int, b varchar(8)); +insert into t1 values (1,'foo'),(2,'bar'); +select max(a), row_number() over () from t1 where a > 10; +max(a) row_number() over () +NULL 1 +select max(a), sum(max(a)) over () from t1 where a > 10; +max(a) sum(max(a)) over () +NULL NULL +select max(a), sum(max(a)) over (partition by max(a)) from t1 where a > 10; +max(a) sum(max(a)) over (partition by max(a)) +NULL NULL +select max(a), row_number() over () from t1 where 1 = 2; +max(a) row_number() over () +NULL 1 +select max(a), sum(max(a)) over () from t1 where 1 = 2; +max(a) sum(max(a)) over () +NULL NULL +select max(a), sum(max(a)) over (partition by max(a)) from t1 where 1 = 2; +max(a) sum(max(a)) over (partition by max(a)) +NULL NULL +select max(a), row_number() over () from t1 where 1 = 2 +having max(a) is not null; +max(a) row_number() over () +select max(a), sum(max(a)) over () from t1 where 1 = 2 +having max(a) is not null; +max(a) sum(max(a)) over () +drop table t1; +# +# MDEV-10885: window function in query with implicit grouping +# with constant condition evaluated to false +# +CREATE TABLE t1 (a INT, b VARCHAR(8)); +INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); +CREATE TABLE t2 (c INT); +INSERT INTO t2 VALUES (3),(4); +CREATE TABLE t3 (d INT); +INSERT INTO t3 VALUES (5),(6); +SELECT MAX(a), ROW_NUMBER() OVER (PARTITION BY MAX(a)) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ); +MAX(a) ROW_NUMBER() OVER (PARTITION BY MAX(a)) +NULL 1 +SELECT MAX(a), COUNT(MAX(a)) OVER (PARTITION BY MAX(a)) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ); +MAX(a) COUNT(MAX(a)) OVER (PARTITION BY MAX(a)) +NULL 0 +SELECT MAX(a), SUM(MAX(a)) OVER (PARTITION BY MAX(a)) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ); +MAX(a) SUM(MAX(a)) OVER (PARTITION BY MAX(a)) +NULL NULL +SELECT MAX(a), ROW_NUMBER() OVER (PARTITION BY MAX(a)) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ) +HAVING MAX(a) IS NOT NULL; +MAX(a) ROW_NUMBER() OVER (PARTITION BY MAX(a)) +SELECT a, MAX(a), ROW_NUMBER() OVER (PARTITION BY b) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ); +a MAX(a) ROW_NUMBER() OVER (PARTITION BY b) +NULL NULL 1 +SELECT a, COUNT(a), AVG(a) OVER (PARTITION BY b) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ); +a COUNT(a) AVG(a) OVER (PARTITION BY b) +NULL 0 NULL +SELECT a, MAX(a), AVG(a) OVER (PARTITION BY b) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ); +a MAX(a) AVG(a) OVER (PARTITION BY b) +NULL NULL NULL +DROP TABLE t1,t2,t3; +# +# MDEV-10859: Wrong result of aggregate window function in query +# with HAVING and no ORDER BY +# +create table empsalary (depname varchar(32), empno smallint primary key, salary int); +insert into empsalary values +('develop', 1, 5000), ('develop', 2, 4000),('sales', 3, '6000'),('sales', 4, 5000); +SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary; +depname empno salary avg(salary) OVER (PARTITION BY depname) +develop 1 5000 4500.0000 +develop 2 4000 4500.0000 +sales 3 6000 5500.0000 +sales 4 5000 5500.0000 +SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary ORDER BY depname; +depname empno salary avg(salary) OVER (PARTITION BY depname) +develop 1 5000 4500.0000 +develop 2 4000 4500.0000 +sales 3 6000 5500.0000 +sales 4 5000 5500.0000 +# +# These last 2 should have the same row results, ignoring order. +# +SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary HAVING empno > 1; +depname empno salary avg(salary) OVER (PARTITION BY depname) +develop 2 4000 4000.0000 +sales 3 6000 5500.0000 +sales 4 5000 5500.0000 +SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary HAVING empno > 1 ORDER BY depname; +depname empno salary avg(salary) OVER (PARTITION BY depname) +develop 2 4000 4000.0000 +sales 3 6000 5500.0000 +sales 4 5000 5500.0000 +drop table empsalary; +# +# MDEV-11868: min(distinct) over () returns wrong value +# +create table TDEC (CDEC int, RNUM int); +create view VDEC as select * from TDEC; +insert into TDEC (CDEC) values (null),(-1),(0),(1),(0),(10); +select TDEC.CDEC, min(TDEC.CDEC) over () from TDEC; +CDEC min(TDEC.CDEC) over () +NULL -1 +-1 -1 +0 -1 +1 -1 +0 -1 +10 -1 +select VDEC.CDEC, min(VDEC.CDEC) over () from VDEC; +CDEC min(VDEC.CDEC) over () +NULL -1 +-1 -1 +0 -1 +1 -1 +0 -1 +10 -1 +select TDEC.CDEC, max(TDEC.CDEC) over () from TDEC; +CDEC max(TDEC.CDEC) over () +NULL 10 +-1 10 +0 10 +1 10 +0 10 +10 10 +select VDEC.CDEC, max(VDEC.CDEC) over () from VDEC; +CDEC max(VDEC.CDEC) over () +NULL 10 +-1 10 +0 10 +1 10 +0 10 +10 10 +select TDEC.CDEC, min(distinct TDEC.CDEC) over () from TDEC; +CDEC min(distinct TDEC.CDEC) over () +NULL -1 +-1 -1 +0 -1 +1 -1 +0 -1 +10 -1 +select VDEC.CDEC, min(distinct VDEC.CDEC) over () from VDEC; +CDEC min(distinct VDEC.CDEC) over () +NULL -1 +-1 -1 +0 -1 +1 -1 +0 -1 +10 -1 +select TDEC.CDEC, max(distinct TDEC.CDEC) over () from TDEC; +CDEC max(distinct TDEC.CDEC) over () +NULL 10 +-1 10 +0 10 +1 10 +0 10 +10 10 +select VDEC.CDEC, max(distinct VDEC.CDEC) over () from VDEC; +CDEC max(distinct VDEC.CDEC) over () +NULL 10 +-1 10 +0 10 +1 10 +0 10 +10 10 +# +# These should be removed once support for them is added. +# +select TDEC.CDEC, count(distinct TDEC.CDEC) over () from TDEC; +ERROR 42000: This version of MariaDB doesn't yet support 'COUNT(DISTINCT) aggregate as window function' +select VDEC.CDEC, count(distinct VDEC.CDEC) over () from VDEC; +ERROR 42000: This version of MariaDB doesn't yet support 'COUNT(DISTINCT) aggregate as window function' +select TDEC.CDEC, sum(distinct TDEC.CDEC) over () from TDEC; +ERROR 42000: This version of MariaDB doesn't yet support 'SUM(DISTINCT) aggregate as window function' +select VDEC.CDEC, sum(distinct VDEC.CDEC) over () from VDEC; +ERROR 42000: This version of MariaDB doesn't yet support 'SUM(DISTINCT) aggregate as window function' +select TDEC.CDEC, avg(distinct TDEC.CDEC) over () from TDEC; +ERROR 42000: This version of MariaDB doesn't yet support 'AVG(DISTINCT) aggregate as window function' +select VDEC.CDEC, avg(distinct VDEC.CDEC) over () from VDEC; +ERROR 42000: This version of MariaDB doesn't yet support 'AVG(DISTINCT) aggregate as window function' +select TDEC.CDEC, GROUP_CONCAT(TDEC.CDEC) over () from TDEC; +ERROR 42000: This version of MariaDB doesn't yet support 'GROUP_CONCAT() aggregate as window function' +select VDEC.CDEC, GROUP_CONCAT(distinct VDEC.CDEC) over () from VDEC; +ERROR 42000: This version of MariaDB doesn't yet support 'GROUP_CONCAT() aggregate as window function' +drop table TDEC; +drop view VDEC; +# +# MDEV-10700: 10.2.2 windowing function returns incorrect result +# +create table t(a int,b int, c int , d int); +insert into t(a,b,c,d) values(1, rand(10)*1000, rand(10)*1000, rand(10)*1000); +insert into t(a,b,c,d) values(1, rand(10)*1000, rand(10)*1000, rand(10)*1000); +replace into t(a,b,c,d) select 1, rand(10)*1000, rand(10)*1000, rand(10)*1000 from t t1, t t2, t t3, t t4, t t5, t t6, t t7, t t8, t t9, t t10, t t11, t t12, t t13, t t14, t t15, t t16, t t17; +select count(distinct s) from (select sum(d) over(partition by a,b,c) as s from t) Z where s > 0; +count(distinct s) +993 +select count(distinct s) from (select sum(d) as s from t group by a,b,c) Z where s > 0; +count(distinct s) +993 +select count(distinct s) from (select sum(d) over(partition by a,b) as s from t) Z where s > 0; +count(distinct s) +993 +select count(distinct s) from (select sum(d) as s from t group by a,b) Z where s > 0; +count(distinct s) +993 +select count(distinct s) from (select sum(d) over(partition by a) as s from t) Z where s > 0; +count(distinct s) +1 +select count(distinct s) from (select sum(d) as s from t group by a) Z where s > 0; +count(distinct s) +1 +drop table t; +# +# MDEV-9924: window function in query with group by optimized away +# +create table t1 (i int); +insert into t1 values (2),(3),(1); +select row_number() over () from t1 group by 1+2; +row_number() over () +1 +select max(i), row_number() over () from t1 group by 1+2; +max(i) row_number() over () +3 1 +select rank() over (order by max(i)) from t1 group by 1+2; +rank() over (order by max(i)) +1 +select i, row_number() over () from t1 group by 1+2; +i row_number() over () +2 1 +select i, rank() over (order by i) rnk from t1 group by 1+2; +i rnk +2 1 +drop table t1; diff --git a/mysql-test/r/win_big-mdev-10092.result b/mysql-test/r/win_big-mdev-10092.result new file mode 100644 index 00000000000..dc8b7b9c3bd --- /dev/null +++ b/mysql-test/r/win_big-mdev-10092.result @@ -0,0 +1,328 @@ +# +# MDEV-10092: Server crashes in in ha_heap::rnd_pos / Table_read_cursor::get_next +# +CREATE TABLE `orders` ( +`o_orderkey` int(11) NOT NULL, +`o_custkey` double DEFAULT NULL, +`o_orderstatus` char(1) DEFAULT NULL, +`o_totalprice` double DEFAULT NULL, +`o_orderDATE` date DEFAULT NULL, +`o_orderpriority` char(15) DEFAULT NULL, +`o_clerk` char(15) DEFAULT NULL, +`o_shippriority` int(11) DEFAULT NULL, +`o_comment` varchar(79) DEFAULT NULL, +KEY `i_o_orderdate` (`o_orderDATE`), +KEY `i_o_custkey` (`o_custkey`) +) DEFAULT CHARSET=latin1; +create procedure add_data() +begin +INSERT INTO `orders` VALUES (593793,3220,'O',181553.02,'1996-10-12','5-LOW','Clerk#000000921',0,'carefully unusual instructions are final pl'); +INSERT INTO `orders` VALUES (593794,4681,'F',32306.35,'1994-03-15','2-HIGH','Clerk#000000776',0,'slyly ironic depths are blithely. final excuses across the unusual instruction'); +INSERT INTO `orders` VALUES (593795,7213,'O',206579.47,'1998-03-04','2-HIGH','Clerk#000000746',0,'ruthlessly regular theodolites atop the blith'); +INSERT INTO `orders` VALUES (593796,10486,'F',181299.81,'1993-01-13','3-MEDIUM','Clerk#000000787',0,'special theodolites detect slyly. p'); +INSERT INTO `orders` VALUES (593797,3316,'O',208149.32,'1996-12-22','1-URGENT','Clerk#000000355',0,'carefully silent theodolites use blithely acco'); +INSERT INTO `orders` VALUES (593798,1613,'F',254625.5,'1995-01-26','2-HIGH','Clerk#000000504',0,'fluffily even requests ar'); +INSERT INTO `orders` VALUES (593799,4418,'F',45122.99,'1993-07-12','1-URGENT','Clerk#000000838',0,'blithely ironic ideas boost furiously above the ironic foxes. special pac'); +INSERT INTO `orders` VALUES (593824,12013,'F',216314.23,'1992-02-28','1-URGENT','Clerk#000000074',0,'quickly furious requests play above the fur'); +INSERT INTO `orders` VALUES (593825,8101,'O',123101.26,'1997-01-23','5-LOW','Clerk#000000649',0,'regular deposits haggle after the carefully i'); +INSERT INTO `orders` VALUES (593826,6958,'O',280097.59,'1995-12-14','2-HIGH','Clerk#000000080',0,'slyly even ideas about the slyly pending escapades cajole above th'); +INSERT INTO `orders` VALUES (593827,14116,'O',103011.78,'1995-12-16','3-MEDIUM','Clerk#000000567',0,'blithely bold decoys are furiously. fluffy deposits serve flu'); +INSERT INTO `orders` VALUES (593828,6839,'F',106697.51,'1993-12-11','4-NOT SPECIFIED','Clerk#000000065',0,'carefully final theodolites wake quickly final theodolites! unus'); +INSERT INTO `orders` VALUES (593829,14605,'O',44147.73,'1997-02-18','3-MEDIUM','Clerk#000000474',0,'ironic requests use carefully against the iro'); +INSERT INTO `orders` VALUES (593830,12976,'F',167393.6,'1994-06-21','1-URGENT','Clerk#000000424',0,'dolphins haggle careful'); +INSERT INTO `orders` VALUES (593831,14107,'O',208417.51,'1997-11-18','4-NOT SPECIFIED','Clerk#000000336',0,'furiously express pinto beans after the blithely pending requests need to '); +INSERT INTO `orders` VALUES (593856,5623,'O',143236.09,'1998-03-24','5-LOW','Clerk#000000382',0,'carefully ironic accounts impress slyly according to the ironic'); +INSERT INTO `orders` VALUES (593857,1828,'O',217673.82,'1996-01-12','1-URGENT','Clerk#000000060',0,'special, special pinto beans haggle blithely. blithel'); +INSERT INTO `orders` VALUES (593858,14755,'O',8032.07,'1997-07-20','4-NOT SPECIFIED','Clerk#000000110',0,'regular excuses use ironic pinto '); +INSERT INTO `orders` VALUES (593859,8780,'F',356852.14,'1992-10-09','2-HIGH','Clerk#000000510',0,'furiously regular accounts eat across the carefully '); +INSERT INTO `orders` VALUES (593860,13318,'O',18413.14,'1998-01-10','2-HIGH','Clerk#000000673',0,'pending pains cajole furiously alo'); +INSERT INTO `orders` VALUES (593861,1175,'O',28859.21,'1996-09-10','4-NOT SPECIFIED','Clerk#000000680',0,'carefully silent instructi'); +INSERT INTO `orders` VALUES (593862,7787,'F',202891.72,'1992-02-27','5-LOW','Clerk#000000988',0,'slyly express requests sleep. express dependencies wake bli'); +INSERT INTO `orders` VALUES (593863,1897,'O',33062.05,'1998-06-29','1-URGENT','Clerk#000000117',0,'accounts integrate carefully across the fluffily even warhorses'); +INSERT INTO `orders` VALUES (593888,5656,'O',20952.26,'1997-02-04','3-MEDIUM','Clerk#000000735',0,'requests could have to cajole about the special, final '); +INSERT INTO `orders` VALUES (593889,2692,'F',282718.42,'1992-08-02','4-NOT SPECIFIED','Clerk#000000669',0,'regular deposits haggle fluff'); +INSERT INTO `orders` VALUES (593890,3685,'O',34012.74,'1996-06-17','5-LOW','Clerk#000000993',0,'furiously even requests'); +INSERT INTO `orders` VALUES (593891,10333,'F',182791.4,'1993-01-23','4-NOT SPECIFIED','Clerk#000000098',0,'slyly final platelets doubt'); +INSERT INTO `orders` VALUES (593892,5687,'F',224381.48,'1994-09-18','2-HIGH','Clerk#000000294',0,'blithely bold epitaphs sleep after the carefully express in'); +INSERT INTO `orders` VALUES (593893,5437,'F',124300.91,'1993-08-04','4-NOT SPECIFIED','Clerk#000000302',0,'daring instructions alongside of the si'); +INSERT INTO `orders` VALUES (593894,1732,'F',150438.64,'1993-11-07','3-MEDIUM','Clerk#000000046',0,'quickly special accounts integrate by the even, dogged platelets? slowly '); +INSERT INTO `orders` VALUES (593895,12230,'O',47380.97,'1997-03-23','2-HIGH','Clerk#000000168',0,'fluffily permanent instructions alongside of the furiously even pack'); +INSERT INTO `orders` VALUES (593920,13871,'F',2919.68,'1992-01-29','5-LOW','Clerk#000000597',0,'quickly regular foxes across the furiously bold accounts wake car'); +INSERT INTO `orders` VALUES (593921,6664,'F',139065.79,'1992-04-21','5-LOW','Clerk#000000017',0,'fluffily final deposits are carefully. quickly special pinto beans bel'); +INSERT INTO `orders` VALUES (593922,2504,'O',179041.45,'1997-04-05','2-HIGH','Clerk#000000902',0,'final pinto beans are furiously. '); +INSERT INTO `orders` VALUES (593923,4978,'O',258843,'1998-02-27','1-URGENT','Clerk#000000654',0,'carefully final asymptotes according to the regular dependencie'); +INSERT INTO `orders` VALUES (593924,7550,'O',232280.81,'1995-10-28','3-MEDIUM','Clerk#000000063',0,'fluffily ironic packages haggle carefully pending platelets. q'); +INSERT INTO `orders` VALUES (593925,12226,'O',319755.48,'1995-09-01','3-MEDIUM','Clerk#000000308',0,'quickly pending packages throughout the quickly unusual requests'); +INSERT INTO `orders` VALUES (593926,2819,'F',204662.4,'1994-11-07','4-NOT SPECIFIED','Clerk#000000298',0,'blithely special grouches cajole ironic instructions. slyly pendin'); +INSERT INTO `orders` VALUES (593927,593,'F',188162.64,'1995-03-04','1-URGENT','Clerk#000000263',0,'express, unusual deposits boost furiously after the unusual dolphi'); +INSERT INTO `orders` VALUES (593952,9362,'P',318688.16,'1995-03-05','4-NOT SPECIFIED','Clerk#000000468',0,'ruthless requests must have to are carefully? special pa'); +INSERT INTO `orders` VALUES (593953,11410,'O',166717.28,'1998-07-29','5-LOW','Clerk#000000509',0,'even, regular instructions snooze. slyly ironic packages nag fluffily.'); +INSERT INTO `orders` VALUES (593954,8875,'O',132909.37,'1996-08-29','3-MEDIUM','Clerk#000000825',0,'special decoys integrate carefully. care'); +INSERT INTO `orders` VALUES (593955,12494,'O',73329.07,'1995-08-05','1-URGENT','Clerk#000000561',0,'quickly special request'); +INSERT INTO `orders` VALUES (593956,1390,'O',187837.11,'1995-10-17','5-LOW','Clerk#000000797',0,'silent, pending foxes'); +INSERT INTO `orders` VALUES (593957,10106,'F',196969.46,'1993-04-03','2-HIGH','Clerk#000000566',0,'blithely ruthless excuses boost slyly about the requests. careful'); +INSERT INTO `orders` VALUES (593958,14770,'F',103528.82,'1993-12-27','3-MEDIUM','Clerk#000000598',0,'carefully special deposits eat above the q'); +INSERT INTO `orders` VALUES (593959,14566,'O',156600.32,'1996-11-16','2-HIGH','Clerk#000000030',0,'accounts are quickly bold packages. carefully ironic depos'); +INSERT INTO `orders` VALUES (593984,4924,'O',47149.15,'1995-05-06','3-MEDIUM','Clerk#000000120',0,'regular asymptotes haggle slyly abo'); +INSERT INTO `orders` VALUES (593985,5185,'O',152533.91,'1997-08-04','3-MEDIUM','Clerk#000000575',0,'blithely special dolphins are even requests. carefully eve'); +INSERT INTO `orders` VALUES (593986,14257,'O',109734.28,'1998-06-05','3-MEDIUM','Clerk#000000930',0,'carefully final instructions against the slyly'); +INSERT INTO `orders` VALUES (593987,5818,'F',64541.52,'1994-04-13','3-MEDIUM','Clerk#000000259',0,'slyly pending deposits are furiously. regular requests h'); +INSERT INTO `orders` VALUES (593988,1178,'F',249608.42,'1994-10-01','2-HIGH','Clerk#000000266',0,'fluffily regular foxes toward the furiously bold accounts sleep furiously'); +INSERT INTO `orders` VALUES (593989,5173,'P',61508.55,'1995-03-02','2-HIGH','Clerk#000000374',0,'slyly express deposits wake between '); +INSERT INTO `orders` VALUES (593990,8395,'O',129696.17,'1997-12-30','4-NOT SPECIFIED','Clerk#000000570',0,'carefully final requests haggle furiously fluffily final accou'); +INSERT INTO `orders` VALUES (593991,1894,'O',145691.27,'1998-04-09','5-LOW','Clerk#000000294',0,'slyly final notornis haggle carefull'); +INSERT INTO `orders` VALUES (594016,14935,'F',144592.29,'1992-10-20','3-MEDIUM','Clerk#000000602',0,'furiously express ideas cajole quickl'); +INSERT INTO `orders` VALUES (594017,892,'F',147267.55,'1994-12-10','1-URGENT','Clerk#000000419',0,'close, pending packages affix blithely. slyly regular reque'); +end; +// +call add_data(); +call add_data(); +set sort_buffer_size = 1024; +flush status; +select o_custkey, Avg(o_custkey) OVER ( ORDER BY o_custkey ) from orders; +o_custkey Avg(o_custkey) OVER ( ORDER BY o_custkey ) +593 593 +593 593 +892 742.5 +892 742.5 +1175 886.6666666666666 +1175 886.6666666666666 +1178 959.5 +1178 959.5 +1390 1045.6 +1390 1045.6 +1613 1140.1666666666667 +1613 1140.1666666666667 +1732 1224.7142857142858 +1732 1224.7142857142858 +1828 1300.125 +1828 1300.125 +1894 1366.111111111111 +1894 1366.111111111111 +1897 1419.2 +1897 1419.2 +2504 1517.8181818181818 +2504 1517.8181818181818 +2692 1615.6666666666667 +2692 1615.6666666666667 +2819 1708.2307692307693 +2819 1708.2307692307693 +3220 1816.2142857142858 +3220 1816.2142857142858 +3316 1916.2 +3316 1916.2 +3685 2026.75 +3685 2026.75 +4418 2167.4117647058824 +4418 2167.4117647058824 +4681 2307.0555555555557 +4681 2307.0555555555557 +4924 2444.7894736842104 +4924 2444.7894736842104 +4978 2571.45 +4978 2571.45 +5173 2695.3333333333335 +5173 2695.3333333333335 +5185 2808.5 +5185 2808.5 +5437 2922.782608695652 +5437 2922.782608695652 +5623 3035.2916666666665 +5623 3035.2916666666665 +5656 3140.12 +5656 3140.12 +5687 3238.076923076923 +5687 3238.076923076923 +5818 3333.6296296296296 +5818 3333.6296296296296 +6664 3452.5714285714284 +6664 3452.5714285714284 +6839 3569.344827586207 +6839 3569.344827586207 +6958 3682.3 +6958 3682.3 +7213 3796.1935483870966 +7213 3796.1935483870966 +7550 3913.5 +7550 3913.5 +7787 4030.878787878788 +7787 4030.878787878788 +8101 4150.588235294118 +8101 4150.588235294118 +8395 4271.857142857143 +8395 4271.857142857143 +8780 4397.083333333333 +8780 4397.083333333333 +8875 4518.108108108108 +8875 4518.108108108108 +9362 4645.578947368421 +9362 4645.578947368421 +10106 4785.589743589743 +10106 4785.589743589743 +10333 4924.275 +10333 4924.275 +10486 5059.926829268293 +10486 5059.926829268293 +11410 5211.119047619048 +11410 5211.119047619048 +12013 5369.302325581395 +12013 5369.302325581395 +12226 5525.136363636364 +12226 5525.136363636364 +12230 5674.133333333333 +12230 5674.133333333333 +12494 5822.391304347826 +12494 5822.391304347826 +12976 5974.595744680851 +12976 5974.595744680851 +13318 6127.583333333333 +13318 6127.583333333333 +13871 6285.6122448979595 +13871 6285.6122448979595 +14107 6442.04 +14107 6442.04 +14116 6592.509803921569 +14116 6592.509803921569 +14257 6739.903846153846 +14257 6739.903846153846 +14566 6887.566037735849 +14566 6887.566037735849 +14605 7030.481481481482 +14605 7030.481481481482 +14755 7170.927272727273 +14755 7170.927272727273 +14770 7306.625 +14770 7306.625 +14935 7440.456140350877 +14935 7440.456140350877 +select variable_name, +case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end +from information_schema.session_status +where variable_name like 'Sort_merge_passes'; +variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end +SORT_MERGE_PASSES WITH PASSES +flush status; +select o_custkey, Avg(o_custkey) OVER ( ORDER BY o_custkey RANGE CURRENT ROW ) from orders; +o_custkey Avg(o_custkey) OVER ( ORDER BY o_custkey RANGE CURRENT ROW ) +593 593 +593 593 +892 892 +892 892 +1175 1175 +1175 1175 +1178 1178 +1178 1178 +1390 1390 +1390 1390 +1613 1613 +1613 1613 +1732 1732 +1732 1732 +1828 1828 +1828 1828 +1894 1894 +1894 1894 +1897 1897 +1897 1897 +2504 2504 +2504 2504 +2692 2692 +2692 2692 +2819 2819 +2819 2819 +3220 3220 +3220 3220 +3316 3316 +3316 3316 +3685 3685 +3685 3685 +4418 4418 +4418 4418 +4681 4681 +4681 4681 +4924 4924 +4924 4924 +4978 4978 +4978 4978 +5173 5173 +5173 5173 +5185 5185 +5185 5185 +5437 5437 +5437 5437 +5623 5623 +5623 5623 +5656 5656 +5656 5656 +5687 5687 +5687 5687 +5818 5818 +5818 5818 +6664 6664 +6664 6664 +6839 6839 +6839 6839 +6958 6958 +6958 6958 +7213 7213 +7213 7213 +7550 7550 +7550 7550 +7787 7787 +7787 7787 +8101 8101 +8101 8101 +8395 8395 +8395 8395 +8780 8780 +8780 8780 +8875 8875 +8875 8875 +9362 9362 +9362 9362 +10106 10106 +10106 10106 +10333 10333 +10333 10333 +10486 10486 +10486 10486 +11410 11410 +11410 11410 +12013 12013 +12013 12013 +12226 12226 +12226 12226 +12230 12230 +12230 12230 +12494 12494 +12494 12494 +12976 12976 +12976 12976 +13318 13318 +13318 13318 +13871 13871 +13871 13871 +14107 14107 +14107 14107 +14116 14116 +14116 14116 +14257 14257 +14257 14257 +14566 14566 +14566 14566 +14605 14605 +14605 14605 +14755 14755 +14755 14755 +14770 14770 +14770 14770 +14935 14935 +14935 14935 +select variable_name, +case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end +from information_schema.session_status +where variable_name like 'Sort_merge_passes'; +variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end +SORT_MERGE_PASSES WITH PASSES +drop table orders; +drop procedure add_data; diff --git a/mysql-test/r/win_big-mdev-11697.result b/mysql-test/r/win_big-mdev-11697.result new file mode 100644 index 00000000000..e5dc271839c --- /dev/null +++ b/mysql-test/r/win_big-mdev-11697.result @@ -0,0 +1,71 @@ +create table test_table (id int, random_data varchar(36), static_int int, static_varchar varchar(10)); +insert into test_table(id, random_data, static_int, static_varchar) +select id, random_data, 42, 'Hello' + from ( +with recursive data_generator(id, random_data) as ( +select 1 as id, uuid() as random_data +union all +select id + 1, uuid() from data_generator where id < 1000 +) +select * from data_generator +) as a; +commit; +analyze table test_table; +Table Op Msg_type Msg_text +test.test_table analyze status OK +explain select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 1000 +2 DERIVED test_table ALL NULL NULL NULL NULL 1000 Using temporary; Using filesort +select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10; +id next_id +1 2 +2 3 +3 4 +4 5 +5 6 +6 7 +7 8 +8 9 +9 10 +10 11 +drop table if exists test_table; +create table test_table (id int, random_data varchar(36), static_int int, static_varchar varchar(10)); +insert into test_table(id, random_data, static_int, static_varchar) +select id, random_data, 42, 'Hello' + from ( +with recursive data_generator(id, random_data) as ( +select 1 as id, uuid() as random_data +union all +select id + 1, uuid() from data_generator where id < 100000 +) +select * from data_generator +) as a; +commit; +analyze table test_table; +Table Op Msg_type Msg_text +test.test_table analyze status OK +explain select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 100000 +2 DERIVED test_table ALL NULL NULL NULL NULL 100000 Using temporary; Using filesort +flush status; +select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10; +id next_id +1 2 +2 3 +3 4 +4 5 +5 6 +6 7 +7 8 +8 9 +9 10 +10 11 +select variable_name, +case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end +from information_schema.session_status +where variable_name like 'Sort_merge_passes'; +variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end +SORT_MERGE_PASSES WITH PASSES +drop table test_table; diff --git a/mysql-test/r/win_empty_over.result b/mysql-test/r/win_empty_over.result index 8df2c1f4329..a5ee74b943a 100644 --- a/mysql-test/r/win_empty_over.result +++ b/mysql-test/r/win_empty_over.result @@ -138,8 +138,8 @@ create view win_view as (select a, max(a + 1) over () from t1 where a = 1); select * from win_view; a max(a + 1) over () -1 3 -1 3 -1 3 +1 2 +1 2 +1 2 drop view win_view; drop table t1; diff --git a/mysql-test/r/win_first_last_value.result b/mysql-test/r/win_first_last_value.result index ba896a4a4f1..b8fab458249 100644 --- a/mysql-test/r/win_first_last_value.result +++ b/mysql-test/r/win_first_last_value.result @@ -102,3 +102,30 @@ pk a b c d e fst_b lst_b fst_c lst_c fst_d lst_d fst_e lst_e 10 2 0 n_four 0.800 0.01 NULL 0 n_one n_four 0.500 0.800 0.007 0.01 11 2 10 NULL 0.900 NULL NULL 10 n_one NULL 0.500 0.900 0.007 NULL drop table t1; +# +# MDEV-11746: Wrong result upon using FIRST_VALUE with a window frame +# +create table t1 (i int); +insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +select i, +first_value(i) OVER (order by i rows between CURRENT ROW and 1 FOLLOWING) as fst_1f, +last_value(i) OVER (order by i rows between CURRENT ROW and 1 FOLLOWING) as last_1f, +first_value(i) OVER (order by i rows between 1 PRECEDING AND 1 FOLLOWING) as fst_1p1f, +last_value(i) OVER (order by i rows between 1 PRECEDING AND 1 FOLLOWING) as fst_1p1f, +first_value(i) OVER (order by i rows between 2 PRECEDING AND 1 PRECEDING) as fst_2p1p, +last_value(i) OVER (order by i rows between 2 PRECEDING AND 1 PRECEDING) as fst_2p1p, +first_value(i) OVER (order by i rows between 1 FOLLOWING AND 2 FOLLOWING) as fst_1f2f, +last_value(i) OVER (order by i rows between 1 FOLLOWING AND 2 FOLLOWING) as fst_1f2f +from t1; +i fst_1f last_1f fst_1p1f fst_1p1f fst_2p1p fst_2p1p fst_1f2f fst_1f2f +1 1 2 1 2 NULL NULL 2 3 +2 2 3 1 3 1 1 3 4 +3 3 4 2 4 1 2 4 5 +4 4 5 3 5 2 3 5 6 +5 5 6 4 6 3 4 6 7 +6 6 7 5 7 4 5 7 8 +7 7 8 6 8 5 6 8 9 +8 8 9 7 9 6 7 9 10 +9 9 10 8 10 7 8 10 10 +10 10 10 9 10 8 9 NULL NULL +drop table t1; diff --git a/mysql-test/r/xa.result b/mysql-test/r/xa.result index de1d507bd4b..fdcf25f3a12 100644 --- a/mysql-test/r/xa.result +++ b/mysql-test/r/xa.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); drop table if exists t1, t2; create table t1 (a int) engine=innodb; xa start 'test1'; diff --git a/mysql-test/r/xtradb_mrr.result b/mysql-test/r/xtradb_mrr.result index db90ada8053..f49207c0e41 100644 --- a/mysql-test/r/xtradb_mrr.result +++ b/mysql-test/r/xtradb_mrr.result @@ -782,7 +782,7 @@ INSERT INTO t1 VALUES ('MS','Microsoft'), ('IB','IBM- Inc.'), ('GO','Google Inc.'); -INSERT INTO t2 VALUES +INSERT IGNORE INTO t2 VALUES ('AB','Sweden'), ('JA','USA'), ('MS','United States of America'), diff --git a/mysql-test/std_data/bug20683959loaddata.txt b/mysql-test/std_data/bug20683959loaddata.txt deleted file mode 100644 index 1878cc78879..00000000000 --- a/mysql-test/std_data/bug20683959loaddata.txt +++ /dev/null @@ -1 +0,0 @@ -Ã"RT @niouzechun: é˜âˆšõ€®ç¹ä¸Šãƒ£ç¹æ–õ€‡³ç¹§ï½¨ç¹ï½³ç¹ç‰™è€³ç¸ºï½ªç¹§è–™â–¡ç¸ºä»£ï½Œç¸ºï½©ç¸²âˆšã„ç¹ï½³ç¹ä¸Šãƒ£ç¹æ–õ€‡³ç¹§ï½¨ç¹ï½³ç¹å³¨ï½„諠ィ蜉õ€”Žå™ªç¸ºï½ªç¸ºé¡˜ï½©ï½±ç¹§åµâ‰ ç¸ºï½¾ç¹§é¡”ゥ肴・オ逧õ€‹–↓鞫ょå™ç¸ºåŠ±â†‘ç¸ºõ€‹šç‚Šé€•ア縺ッ縲∫樟螳溘õ€­èŽ ï½ºé€•æº˜õ€®è“コ譛ャ逧õ€‹–↓縺õ€‘Žâˆªç¸ºä¸Šï¼žç¸ºä¹â†‘縺õ€‹–ï¼ è³æ¦Šï½¹ï½³é²å³¨â–¡ç¸ºç¤¼ç‚Šè³æ¦Šï½°ï½½ç¸º ç¸ºè‹“セ帙> diff --git a/mysql-test/std_data/loaddata/mdev-11079.txt b/mysql-test/std_data/loaddata/mdev-11079.txt new file mode 100644 index 00000000000..a792f984d5f --- /dev/null +++ b/mysql-test/std_data/loaddata/mdev-11079.txt @@ -0,0 +1 @@ +"%ª«¬" diff --git a/mysql-test/std_data/loaddata/mdev-11631.txt b/mysql-test/std_data/loaddata/mdev-11631.txt new file mode 100644 index 00000000000..87b824b71ae --- /dev/null +++ b/mysql-test/std_data/loaddata/mdev-11631.txt @@ -0,0 +1 @@ +\ä diff --git a/mysql-test/suite/archive/archive.result b/mysql-test/suite/archive/archive.result index 603621abf2a..d294d3dfe58 100644 --- a/mysql-test/suite/archive/archive.result +++ b/mysql-test/suite/archive/archive.result @@ -12593,7 +12593,7 @@ INSERT INTO t5 VALUES (NULL, "establish justice", "to ourselves and"); INSERT INTO t5 VALUES (32, "ensure domestic tranquility", NULL); INSERT INTO t5 VALUES (23, "provide for the common defense", "posterity"); INSERT INTO t5 VALUES (NULL, "promote the general welfare", "do ordain"); -INSERT INTO t5 VALUES (NULL, "abcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabc", "do ordain"); +INSERT IGNORE INTO t5 VALUES (NULL, "abcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabc", "do ordain"); Warnings: Warning 1265 Data truncated for column 'b' at row 1 SELECT * FROM t5; diff --git a/mysql-test/suite/archive/archive.test b/mysql-test/suite/archive/archive.test index 81a73683541..30f2766507e 100644 --- a/mysql-test/suite/archive/archive.test +++ b/mysql-test/suite/archive/archive.test @@ -1515,7 +1515,7 @@ INSERT INTO t5 VALUES (NULL, "establish justice", "to ourselves and"); INSERT INTO t5 VALUES (32, "ensure domestic tranquility", NULL); INSERT INTO t5 VALUES (23, "provide for the common defense", "posterity"); INSERT INTO t5 VALUES (NULL, "promote the general welfare", "do ordain"); -INSERT INTO t5 VALUES (NULL, "abcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabc", "do ordain"); +INSERT IGNORE INTO t5 VALUES (NULL, "abcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabc", "do ordain"); SELECT * FROM t5; diff --git a/mysql-test/suite/archive/discover.result b/mysql-test/suite/archive/discover.result index e1ca9cb6a65..0619ca2051a 100644 --- a/mysql-test/suite/archive/discover.result +++ b/mysql-test/suite/archive/discover.result @@ -139,3 +139,10 @@ flush tables; create table t1 (a int) engine=archive; ERROR 42S01: Table 't1' already exists drop table t1; +CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE; +CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE; +DROP TABLE t1; +CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE; +SELECT * FROM t1; +pk +DROP TABLE t1; diff --git a/mysql-test/suite/archive/discover.test b/mysql-test/suite/archive/discover.test index 20cb69efa00..4ab35cf1115 100644 --- a/mysql-test/suite/archive/discover.test +++ b/mysql-test/suite/archive/discover.test @@ -132,3 +132,13 @@ flush tables; create table t1 (a int) engine=archive; drop table t1; +# +# MDEV-11317: Error in deleting non existing .frm for tables with disocvery +# + +CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE; +CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE; +DROP TABLE t1; +CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE; +SELECT * FROM t1; +DROP TABLE t1; diff --git a/mysql-test/suite/archive/mysqlhotcopy_archive.result b/mysql-test/suite/archive/mysqlhotcopy_archive.result index bea78597336..3c74fc1e01f 100644 --- a/mysql-test/suite/archive/mysqlhotcopy_archive.result +++ b/mysql-test/suite/archive/mysqlhotcopy_archive.result @@ -6,13 +6,13 @@ CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=archive; CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=archive; INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb'); Warnings: -Warning 1265 Data truncated for column 'c2' at row 2 +Warning 1406 Data too long for column 'c2' at row 2 INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb'); Warnings: -Warning 1265 Data truncated for column 'c2' at row 2 +Warning 1406 Data too long for column 'c2' at row 2 INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb'); Warnings: -Warning 1265 Data truncated for column 'c2' at row 2 +Warning 1406 Data too long for column 'c2' at row 2 db.opt t1.ARZ t1.frm diff --git a/mysql-test/suite/archive/repair.result b/mysql-test/suite/archive/repair.result index 16f0f2c1608..9b17fdc7729 100644 --- a/mysql-test/suite/archive/repair.result +++ b/mysql-test/suite/archive/repair.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); create table t1 (a int) engine=archive; insert into t1 values (1); select * from t1; diff --git a/mysql-test/suite/archive/repair.test b/mysql-test/suite/archive/repair.test index 03946d31ead..48ec6b706f3 100644 --- a/mysql-test/suite/archive/repair.test +++ b/mysql-test/suite/archive/repair.test @@ -4,6 +4,8 @@ --source include/have_archive.inc +call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); + --let $datadir = `SELECT @@datadir` create table t1 (a int) engine=archive; diff --git a/mysql-test/suite/binlog/r/binlog_checkpoint.result b/mysql-test/suite/binlog/r/binlog_checkpoint.result index a636952a1cd..9e987913423 100644 --- a/mysql-test/suite/binlog/r/binlog_checkpoint.result +++ b/mysql-test/suite/binlog/r/binlog_checkpoint.result @@ -65,6 +65,7 @@ master-bin.000001 # Format_desc # # SERVER_VERSION, BINLOG_VERSION master-bin.000001 # Gtid_list # # [] master-bin.000001 # Binlog_checkpoint # # master-bin.000001 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (20, REPEAT("x", 4100)) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -75,6 +76,7 @@ master-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION master-bin.000002 # Gtid_list # # [#-#-#] master-bin.000002 # Binlog_checkpoint # # master-bin.000001 master-bin.000002 # Gtid # # BEGIN GTID #-#-# +master-bin.000002 # Annotate_rows # # INSERT INTO t1 VALUES (21, REPEAT("x", 4100)) master-bin.000002 # Table_map # # table_id: # (test.t1) master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000002 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/binlog/r/binlog_database.result b/mysql-test/suite/binlog/r/binlog_database.result index 2c2c5966538..2661b344cad 100644 --- a/mysql-test/suite/binlog/r/binlog_database.result +++ b/mysql-test/suite/binlog/r/binlog_database.result @@ -228,12 +228,14 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (a int) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # drop database if exists mysqltest1 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/binlog/r/binlog_implicit_commit.result b/mysql-test/suite/binlog/r/binlog_implicit_commit.result index bd36418e886..d0e2066b3e1 100644 --- a/mysql-test/suite/binlog/r/binlog_implicit_commit.result +++ b/mysql-test/suite/binlog/r/binlog_implicit_commit.result @@ -138,6 +138,7 @@ SET AUTOCOMMIT = 1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -151,6 +152,7 @@ SET AUTOCOMMIT = 1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -158,10 +160,12 @@ INSERT INTO t1 VALUES (3); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -169,10 +173,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -183,6 +189,7 @@ INSERT INTO t1 VALUES (1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -190,6 +197,7 @@ SET AUTOCOMMIT = 1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -207,8 +215,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -233,8 +243,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -245,6 +257,7 @@ INSERT INTO t1 VALUES (1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -252,6 +265,7 @@ SET AUTOCOMMIT = 0; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -269,8 +283,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -283,6 +299,7 @@ LOCK TABLES t1 WRITE; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -290,6 +307,7 @@ INSERT INTO t1 VALUES (2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -297,10 +315,12 @@ UNLOCK TABLES; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -308,10 +328,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/binlog/r/binlog_innodb.result b/mysql-test/suite/binlog/r/binlog_innodb.result index afa6c827e0b..2896706d407 100644 --- a/mysql-test/suite/binlog/r/binlog_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_innodb.result @@ -74,6 +74,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 2*a WHERE a > 1 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE t1 SET b = a * a WHERE a > 3 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -84,10 +85,12 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 4*a WHERE a > 4 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE t1 SET b = 1*a WHERE a > 1 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE t1 SET b = 2*a WHERE a > 2 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -98,18 +101,22 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 4*a WHERE a > 4 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE t1 SET b = 1*a WHERE a > 1 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE t1 SET b = 2*a WHERE a > 2 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE t1 SET b = 3*a WHERE a > 3 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE t1 SET b = 4*a WHERE a > 4 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/binlog/r/binlog_innodb_row.result b/mysql-test/suite/binlog/r/binlog_innodb_row.result index 82c1b4410fd..ca92a03ff5d 100644 --- a/mysql-test/suite/binlog/r/binlog_innodb_row.result +++ b/mysql-test/suite/binlog/r/binlog_innodb_row.result @@ -10,6 +10,7 @@ commit; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (1),(2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -25,6 +26,7 @@ commit; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (1),(2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -43,6 +45,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 ( c1 int , primary key (c1)) ENGINE=InnoDB master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1), (2), (3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/binlog/r/binlog_max_binlog_stmt_cache_size.result b/mysql-test/suite/binlog/r/binlog_max_binlog_stmt_cache_size.result new file mode 100644 index 00000000000..00f01b59732 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_max_binlog_stmt_cache_size.result @@ -0,0 +1,22 @@ +# +# MDEV-4774: Strangeness with max_binlog_stmt_cache_size Settings +# +CALL mtr.add_suppression("unsigned value 18446744073709547520 adjusted to 4294963200"); +SELECT @@global.max_binlog_stmt_cache_size; +@@global.max_binlog_stmt_cache_size +MAX_BINLOG_STMT_CACHE_SIZE +SET @cache_size= @@max_binlog_stmt_cache_size; +SET @@global.max_binlog_stmt_cache_size= @cache_size+1; +SELECT @@global.max_binlog_stmt_cache_size; +@@global.max_binlog_stmt_cache_size +MAX_BINLOG_STMT_CACHE_SIZE +SET @@global.max_binlog_stmt_cache_size = @cache_size+4095; +SELECT @@global.max_binlog_stmt_cache_size; +@@global.max_binlog_stmt_cache_size +MAX_BINLOG_STMT_CACHE_SIZE +SET @@global.max_binlog_stmt_cache_size= @cache_size-1; +SELECT @@global.max_binlog_stmt_cache_size = @cache_size-4096; +@@global.max_binlog_stmt_cache_size = @cache_size-4096 +1 +SET @@global.max_binlog_stmt_cache_size= @cache_size; +# End of test diff --git a/mysql-test/suite/binlog/r/binlog_mdev342.result b/mysql-test/suite/binlog/r/binlog_mdev342.result index 9dd806a3c8c..7513e855497 100644 --- a/mysql-test/suite/binlog/r/binlog_mdev342.result +++ b/mysql-test/suite/binlog/r/binlog_mdev342.result @@ -32,6 +32,7 @@ master-bin.000001 # Binlog_checkpoint # # master-bin.000001 master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1, REPEAT("x", 4100)) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/binlog/r/binlog_mixed_load_data.result b/mysql-test/suite/binlog/r/binlog_mixed_load_data.result index c66839bf3f3..5bf1e9ec847 100644 --- a/mysql-test/suite/binlog/r/binlog_mixed_load_data.result +++ b/mysql-test/suite/binlog/r/binlog_mixed_load_data.result @@ -4,6 +4,7 @@ LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result index 4255d17fda7..47069b81a15 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result @@ -363,7 +363,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -377,6 +377,9 @@ CREATE TABLE t1 (c01 BIT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (0) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -394,6 +397,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (1) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -427,6 +433,9 @@ CREATE TABLE t1 (c01 BIT(7)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (1) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -444,6 +453,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (2) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -461,6 +473,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (4) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -478,6 +493,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (8) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -495,6 +513,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (16) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -512,6 +533,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (32) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -529,6 +553,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (64) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -546,6 +573,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (127) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -563,6 +593,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c01=127 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -580,6 +613,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET c01=15 WHERE c01=16 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -615,6 +651,9 @@ CREATE TABLE t1 (a BIT(20), b CHAR(2)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (b'00010010010010001001', 'ab') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -649,6 +688,9 @@ CREATE TABLE t1 (c02 BIT(64)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (1) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -666,6 +708,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (2) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -683,6 +728,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (128) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -700,6 +748,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111111111111') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -733,6 +784,9 @@ CREATE TABLE t1 (c03 TINYINT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (1),(2),(3) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -756,6 +810,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (-128) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -773,6 +830,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET c03=2 WHERE c03=1 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -792,6 +852,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c03=-128 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -825,6 +888,9 @@ CREATE TABLE t1 (c04 TINYINT UNSIGNED) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (128), (255) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -845,6 +911,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c04=255 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -878,6 +947,9 @@ CREATE TABLE t1 (c06 BOOL) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (TRUE) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -895,6 +967,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c06=TRUE #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -928,6 +1003,9 @@ CREATE TABLE t1 (c07 SMALLINT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (1234) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -945,6 +1023,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c07=1234 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -978,6 +1059,9 @@ CREATE TABLE t1 (c08 SMALLINT UNSIGNED) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (32768), (65535) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -998,6 +1082,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET c08=2 WHERE c08=32768 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -1017,6 +1104,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c08=65535 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1050,6 +1140,9 @@ CREATE TABLE t1 (c10 MEDIUMINT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (12345) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1067,6 +1160,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c10=12345 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1100,6 +1196,9 @@ CREATE TABLE t1 (c11 MEDIUMINT UNSIGNED) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (8388608), (16777215) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1120,6 +1219,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET c11=2 WHERE c11=8388608 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -1139,6 +1241,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c11=16777215 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1172,6 +1277,9 @@ CREATE TABLE t1 (c13 INT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (123456) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1189,6 +1297,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c13=123456 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1222,6 +1333,9 @@ CREATE TABLE t1 (c14 INT UNSIGNED) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (2147483648), (4294967295) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1242,6 +1356,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET c14=2 WHERE c14=2147483648 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -1261,6 +1378,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c14=4294967295 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1294,6 +1414,9 @@ CREATE TABLE t1 (c16 BIGINT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (1234567890) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1311,6 +1434,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c16=1234567890 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1344,6 +1470,9 @@ CREATE TABLE t1 (c17 BIGINT UNSIGNED) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (9223372036854775808), (18446744073709551615) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1364,6 +1493,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET c17=2 WHERE c17=9223372036854775808 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -1383,6 +1515,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c17=18446744073709551615 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1416,6 +1551,9 @@ CREATE TABLE t1 (c19 FLOAT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (123.2234) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1433,6 +1571,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c19>123 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1466,6 +1607,9 @@ CREATE TABLE t1 (c22 DOUBLE) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (123434.22344545) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1483,6 +1627,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c22>123434 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1516,6 +1663,9 @@ CREATE TABLE t1 (c25 DECIMAL(10,5)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (124.45) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1533,6 +1683,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (-543.21) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1550,6 +1703,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c25=124.45 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1583,6 +1739,9 @@ CREATE TABLE t1 (c28 DATE) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('2001-02-03') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1600,6 +1759,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c28='2001-02-03' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1633,6 +1795,9 @@ CREATE TABLE t1 (c29 DATETIME) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('2001-02-03 10:20:30') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1650,6 +1815,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c29='2001-02-03 10:20:30' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1683,6 +1851,9 @@ CREATE TABLE t1 (c30 TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURR BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('2001-02-03 10:20:30') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1701,6 +1872,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c30='2001-02-03 10:20:30' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1734,6 +1908,9 @@ CREATE TABLE t1 (c31 TIME) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('11:22:33') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1751,6 +1928,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c31='11:22:33' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1784,6 +1964,9 @@ CREATE TABLE t1 (c32 YEAR) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('2001') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1801,6 +1984,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c32=2001 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1834,6 +2020,9 @@ CREATE TABLE t1 (c33 CHAR) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1851,6 +2040,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c33='a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1884,6 +2076,9 @@ CREATE TABLE t1 (c34 CHAR(0)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1901,6 +2096,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c34='' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1934,6 +2132,9 @@ CREATE TABLE t1 (c35 CHAR(1)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('b') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -1951,6 +2152,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c35='b' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -1984,6 +2188,9 @@ CREATE TABLE t1 (c36 CHAR(255)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat('c',255)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2001,6 +2208,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c36>'c' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2034,6 +2244,9 @@ CREATE TABLE t1 (c37 NATIONAL CHAR) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2051,6 +2264,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c37='a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2084,6 +2300,9 @@ CREATE TABLE t1 (c38 NATIONAL CHAR(0)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2101,6 +2320,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c38='' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2134,6 +2356,9 @@ CREATE TABLE t1 (c39 NATIONAL CHAR(1)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2151,6 +2376,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c39='a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2184,6 +2412,9 @@ CREATE TABLE t1 (c40 NATIONAL CHAR(255)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat('a', 255)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2201,6 +2432,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat(_latin1 0xDF, 255)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2218,6 +2452,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c40>'a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2254,6 +2491,9 @@ CREATE TABLE t1 (c41 CHAR CHARACTER SET UCS2) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2271,6 +2511,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c41='a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2304,6 +2547,9 @@ CREATE TABLE t1 (c42 CHAR(0) CHARACTER SET UCS2) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2321,6 +2567,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c42='' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2354,6 +2603,9 @@ CREATE TABLE t1 (c43 CHAR(1) CHARACTER SET UCS2) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2371,6 +2623,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c43='a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2404,6 +2659,9 @@ CREATE TABLE t1 (c44 CHAR(255) CHARACTER SET UCS2) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat('a', 255)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2421,6 +2679,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat(_latin1 0xDF, 255)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2438,10 +2699,11 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c44>'a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # -# at # -#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F ### DELETE FROM `test`.`t1` ### WHERE @@ -2476,6 +2738,9 @@ CREATE TABLE t1 (c45 VARCHAR(0)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2493,6 +2758,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c45='' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2526,6 +2794,9 @@ CREATE TABLE t1 (c46 VARCHAR(1)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2543,6 +2814,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c46='a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2576,6 +2850,9 @@ CREATE TABLE t1 (c47 VARCHAR(255)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat('a',255)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2593,6 +2870,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c47>'a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2626,6 +2906,9 @@ CREATE TABLE t1 (c48 VARCHAR(261)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat('a',261)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2643,6 +2926,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c48>'a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2676,6 +2962,9 @@ CREATE TABLE t1 (c49 NATIONAL VARCHAR(0)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2693,6 +2982,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c49='' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2726,6 +3018,9 @@ CREATE TABLE t1 (c50 NATIONAL VARCHAR(1)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2743,6 +3038,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c50='a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2776,6 +3074,9 @@ CREATE TABLE t1 (c51 NATIONAL VARCHAR(255)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat('a',255)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2793,6 +3094,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat(_latin1 0xDF, 255)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2810,6 +3114,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c51>'a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2846,6 +3153,9 @@ CREATE TABLE t1 (c52 NATIONAL VARCHAR(261)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat('a',261)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2863,6 +3173,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat(_latin1 0xDF, 261)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2880,6 +3193,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c52>'a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2916,6 +3232,9 @@ CREATE TABLE t1 (c53 VARCHAR(0) CHARACTER SET ucs2) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2933,6 +3252,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c53='' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -2966,6 +3288,9 @@ CREATE TABLE t1 (c54 VARCHAR(1) CHARACTER SET ucs2) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2983,6 +3308,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c54='a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3016,6 +3344,9 @@ CREATE TABLE t1 (c55 VARCHAR(255) CHARACTER SET ucs2) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat('ab', 127)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3033,6 +3364,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c55>'a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3066,6 +3400,9 @@ CREATE TABLE t1 (c56 VARCHAR(261) CHARACTER SET ucs2) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat('ab', 130)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3083,6 +3420,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c56>'a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3116,6 +3456,9 @@ CREATE TABLE t1 (c57 BINARY) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (0x00) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3133,6 +3476,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (0x02) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3150,6 +3496,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3167,6 +3516,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c57='a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3200,6 +3552,9 @@ CREATE TABLE t1 (c58 BINARY(0)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3217,6 +3572,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c58='' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3250,6 +3608,9 @@ CREATE TABLE t1 (c59 BINARY(1)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (0x00) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3267,6 +3628,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (0x02) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3284,6 +3648,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3301,6 +3668,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c59='a' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3334,6 +3704,9 @@ CREATE TABLE t1 (c60 BINARY(255)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (0x00) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3351,6 +3724,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (0x02) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3368,6 +3744,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat('a\0',120)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3385,6 +3764,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c60<0x02 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3418,6 +3800,9 @@ CREATE TABLE t1 (c61 VARBINARY(0)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3435,6 +3820,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c61='' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3468,6 +3856,9 @@ CREATE TABLE t1 (c62 VARBINARY(1)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (0x00) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3485,6 +3876,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (0x02) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3502,6 +3896,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3519,6 +3916,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c62=0x02 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3552,6 +3952,9 @@ CREATE TABLE t1 (c63 VARBINARY(255)) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (0x00) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3569,6 +3972,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (0x02) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3586,6 +3992,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (repeat('a\0',120)) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3603,6 +4012,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c63=0x02 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3636,6 +4048,9 @@ CREATE TABLE t1 (c65 TINYBLOB) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('tinyblob1') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3653,6 +4068,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c65='tinyblob1' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3686,6 +4104,9 @@ CREATE TABLE t1 (c68 BLOB) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('blob1') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3703,6 +4124,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c68='blob1' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3736,6 +4160,9 @@ CREATE TABLE t1 (c71 MEDIUMBLOB) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('mediumblob1') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3753,6 +4180,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c71='mediumblob1' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3786,6 +4216,9 @@ CREATE TABLE t1 (c74 LONGBLOB) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('longblob1') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3803,6 +4236,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c74='longblob1' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3836,6 +4272,9 @@ CREATE TABLE t1 (c66 TINYTEXT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('tinytext1') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3853,6 +4292,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c66='tinytext1' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3886,6 +4328,9 @@ CREATE TABLE t1 (c69 TEXT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('text1') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3903,6 +4348,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c69='text1' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3936,6 +4384,9 @@ CREATE TABLE t1 (c72 MEDIUMTEXT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('mediumtext1') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3953,6 +4404,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c72='mediumtext1' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3986,6 +4440,9 @@ CREATE TABLE t1 (c75 LONGTEXT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('longtext1') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4003,6 +4460,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c75='longtext1' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -4036,6 +4496,9 @@ CREATE TABLE t1 (c67 TINYTEXT CHARACTER SET UCS2) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('tinytext1') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4053,6 +4516,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c67='tinytext1' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -4086,6 +4552,9 @@ CREATE TABLE t1 (c70 TEXT CHARACTER SET UCS2) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('text1') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4103,6 +4572,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c70='text1' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -4136,6 +4608,9 @@ CREATE TABLE t1 (c73 MEDIUMTEXT CHARACTER SET UCS2) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('mediumtext1') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4153,6 +4628,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c73='mediumtext1' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -4186,6 +4664,9 @@ CREATE TABLE t1 (c76 LONGTEXT CHARACTER SET UCS2) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('longtext1') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4203,6 +4684,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c76='longtext1' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -4236,6 +4720,9 @@ CREATE TABLE t1 (c77 ENUM('a','b','c')) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('b') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4253,6 +4740,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c77='b' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -4286,6 +4776,9 @@ CREATE TABLE t1 (c78 SET('a','b','c','d','e','f')) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a,b') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4303,6 +4796,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a,c') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4320,6 +4816,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('b,c') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4337,6 +4836,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a,b,c') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4354,6 +4856,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a,b,c,d') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4371,6 +4876,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a,b,c,d,e') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4388,6 +4896,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('a,b,c,d,e,f') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4405,6 +4916,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c78='a,b' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -4446,6 +4960,9 @@ CREATE TABLE t2 (a int NOT NULL DEFAULT 0, b int NOT NULL DEFAULT 0) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 SET a=1 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4464,6 +4981,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 SET b=1 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4482,6 +5002,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t2 SET a=1 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4500,6 +5023,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t2 SET b=1 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4518,6 +5044,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1, t2 SET t1.a=10, t2.a=20 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # @@ -4572,6 +5101,9 @@ DROP TABLE `t1`,`t2` /* generated by server */ BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1dec102 VALUES (-999.99) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1dec102` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4588,6 +5120,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1dec102 VALUES (0) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1dec102` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4604,6 +5139,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1dec102 VALUES (999.99) #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1dec102` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result index 8320a4655dd..365fcff2a72 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result @@ -2371,6 +2371,94 @@ crn INT -- row number BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ( +#Q> b'0', -- c01 +#Q> b'0000000000000000000000000000000000000000000000000000000000000000', -- c02 +#Q> -128, -- c03 +#Q> 0, -- c04 +#Q> 000, -- c05 +#Q> false, -- c06 +#Q> -32768, -- c07 +#Q> 0, -- c08 +#Q> 00000, -- c09 +#Q> -8388608, -- c10 +#Q> 0, -- c11 +#Q> 00000000, -- c12 +#Q> -2147483648, -- c13 +#Q> 0, -- c14 +#Q> 0000000000, -- c15 +#Q> -9223372036854775808, -- c16 +#Q> 0, -- c17 +#Q> 00000000000000000000, -- c18 +#Q> -3.402823466E+38, -- c19 +#Q> 1.175494351E-38, -- c20 +#Q> 000000000000, -- c21 +#Q> -1.7976931348623E+308, -- c22 three digits cut for ps-protocol +#Q> 2.2250738585072E-308, -- c23 three digits cut for ps-protocol +#Q> 0000000000000000000000, -- c24 +#Q> -9999999999, -- c25 +#Q> 0, -- c26 +#Q> 0000000000, -- c27 +#Q> # +#Q> '1000-01-01', -- c28 +#Q> '1000-01-01 00:00:00', -- c29 +#Q> '1970-01-02 00:00:01', -- c30 one day later due to timezone issues +#Q> '-838:59:59', -- c31 +#Q> '1901', -- c32 +#Q> # +#Q> '', -- c33 +#Q> '', -- c34 +#Q> '', -- c35 +#Q> '', -- c36 +#Q> '', -- c37 +#Q> '', -- c38 +#Q> '', -- c39 +#Q> '', -- c40 +#Q> '', -- c41 +#Q> '', -- c42 +#Q> '', -- c43 +#Q> '', -- c44 +#Q> # +#Q> '', -- c45 +#Q> '', -- c46 +#Q> '', -- c47 +#Q> '', -- c48 +#Q> '', -- c49 +#Q> '', -- c50 +#Q> '', -- c51 +#Q> '', -- c52 +#Q> '', -- c53 +#Q> '', -- c54 +#Q> '', -- c55 +#Q> '', -- c56 +#Q> # +#Q> '', -- c57 +#Q> '', -- c58 +#Q> '', -- c59 +#Q> '', -- c60 +#Q> # +#Q> '', -- c61 +#Q> '', -- c62 +#Q> '', -- c63 +#Q> '', -- c64 +#Q> # +#Q> '', -- c65 +#Q> '', -- c66 +#Q> '', -- c67 +#Q> '', -- c68 +#Q> '', -- c69 +#Q> '', -- c70 +#Q> '', -- c71 +#Q> '', -- c72 +#Q> '', -- c73 +#Q> '', -- c74 +#Q> '', -- c75 +#Q> '', -- c76 +#Q> # +#Q> 'a', -- c77 +#Q> '', #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2464,6 +2552,94 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ( +#Q> b'1', -- c01 +#Q> b'1111111111111111111111111111111111111111111111111111111111111111', -- c02 +#Q> 127, -- c03 +#Q> 255, -- c04 +#Q> 255, -- c05 +#Q> true, -- c06 +#Q> 32767, -- c07 +#Q> 65535, -- c08 +#Q> 65535, -- c09 +#Q> 8388607, -- c10 +#Q> 16777215, -- c11 +#Q> 16777215, -- c12 +#Q> 2147483647, -- c13 +#Q> 4294967295, -- c14 +#Q> 4294967295, -- c15 +#Q> 9223372036854775807, -- c16 +#Q> 18446744073709551615, -- c17 +#Q> 18446744073709551615, -- c18 +#Q> 3.402823466E+38, -- c19 +#Q> 3.402823466E+38, -- c20 +#Q> 3.402823466E+38, -- c21 +#Q> 1.7976931348623E+308, -- c22 three digits cut for ps-protocol +#Q> 1.7976931348623E+308, -- c23 three digits cut for ps-protocol +#Q> 1.7976931348623E+308, -- c24 three digits cut for ps-protocol +#Q> 9999999999, -- c25 +#Q> 9999999999, -- c26 +#Q> 9999999999, -- c27 +#Q> # +#Q> '9999-12-31', -- c28 +#Q> '9999-12-31 23:59:59', -- c29 +#Q> '2038-01-08 03:14:07', -- c30 one day earlier due to timezone issues +#Q> '838:59:59', -- c31 +#Q> '2155', -- c32 +#Q> # +#Q> x'ff', -- c33 +#Q> '', -- c34 +#Q> x'ff', -- c35 +#Q> REPEAT(x'ff',255), -- c36 +#Q> _utf8 x'efbfbf', -- c37 +#Q> '', -- c38 +#Q> _utf8 x'efbfbf', -- c39 +#Q> REPEAT(_utf8 x'efbfbf',255), -- c40 +#Q> _ucs2 x'ffff', -- c41 +#Q> '', -- c42 +#Q> _ucs2 x'ffff', -- c43 +#Q> REPEAT(_ucs2 x'ffff',255), -- c44 +#Q> # +#Q> '', -- c45 +#Q> x'ff', -- c46 +#Q> REPEAT(x'ff',255), -- c47 +#Q> REPEAT(x'ff',261), -- c48 +#Q> '', -- c49 +#Q> _utf8 x'efbfbf', -- c50 +#Q> REPEAT(_utf8 x'efbfbf',255), -- c51 +#Q> REPEAT(_utf8 x'efbfbf',261), -- c52 +#Q> '', -- c53 +#Q> _ucs2 x'ffff', -- c54 +#Q> REPEAT(_ucs2 x'ffff',255), -- c55 +#Q> REPEAT(_ucs2 x'ffff',261), -- c56 +#Q> # +#Q> x'ff', -- c57 +#Q> '', -- c58 +#Q> x'ff', -- c59 +#Q> REPEAT(x'ff',255), -- c60 +#Q> # +#Q> '', -- c61 +#Q> x'ff', -- c62 +#Q> REPEAT(x'ff',255), -- c63 +#Q> REPEAT(x'ff',261), -- c64 +#Q> # +#Q> 'tinyblob', -- c65 not using maximum value here +#Q> 'tinytext', -- c66 not using maximum value here +#Q> 'tinytext-ucs2', -- c67 not using maximum value here +#Q> 'blob', -- c68 not using maximum value here +#Q> 'text', -- c69 not using maximum value here +#Q> 'text-ucs2', -- c70 not using maximum value here +#Q> 'mediumblob', -- c71 not using maximum value here +#Q> 'mediumtext', -- c72 not using maximum value here +#Q> 'mediumtext-ucs2', -- c73 not using maximum value here +#Q> 'longblob', -- c74 not using maximum value here +#Q> 'longtext', -- c75 not using maximum value here +#Q> 'longtext-ucs2', -- c76 not using maximum value here +#Q> # +#Q> 'c', -- c77 +#Q> 'a,b,c #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2557,10 +2733,181 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ( +#Q> NULL, -- c01 +#Q> NULL, -- c02 +#Q> NULL, -- c03 +#Q> NULL, -- c04 +#Q> NULL, -- c05 +#Q> NULL, -- c06 +#Q> NULL, -- c07 +#Q> NULL, -- c08 +#Q> NULL, -- c09 +#Q> NULL, -- c10 +#Q> NULL, -- c11 +#Q> NULL, -- c12 +#Q> NULL, -- c13 +#Q> NULL, -- c14 +#Q> NULL, -- c15 +#Q> NULL, -- c16 +#Q> NULL, -- c17 +#Q> NULL, -- c18 +#Q> NULL, -- c19 +#Q> NULL, -- c20 +#Q> NULL, -- c21 +#Q> NULL, -- c22 +#Q> NULL, -- c23 +#Q> NULL, -- c24 +#Q> NULL, -- c25 +#Q> NULL, -- c26 +#Q> NULL, -- c27 +#Q> # +#Q> NULL, -- c28 +#Q> NULL, -- c29 +#Q> NULL, -- c30 +#Q> NULL, -- c31 +#Q> NULL, -- c32 +#Q> # +#Q> NULL, -- c33 +#Q> NULL, -- c34 +#Q> NULL, -- c35 +#Q> NULL, -- c36 +#Q> NULL, -- c37 +#Q> NULL, -- c38 +#Q> NULL, -- c39 +#Q> NULL, -- c40 +#Q> NULL, -- c41 +#Q> NULL, -- c42 +#Q> NULL, -- c43 +#Q> NULL, -- c44 +#Q> # +#Q> NULL, -- c45 +#Q> NULL, -- c46 +#Q> NULL, -- c47 +#Q> NULL, -- c48 +#Q> NULL, -- c49 +#Q> NULL, -- c50 +#Q> NULL, -- c51 +#Q> NULL, -- c52 +#Q> NULL, -- c53 +#Q> NULL, -- c54 +#Q> NULL, -- c55 +#Q> NULL, -- c56 +#Q> # +#Q> NULL, -- c57 +#Q> NULL, -- c58 +#Q> NULL, -- c59 +#Q> NULL, -- c60 +#Q> # +#Q> NULL, -- c61 +#Q> NULL, -- c62 +#Q> NULL, -- c63 +#Q> NULL, -- c64 +#Q> # +#Q> NULL, -- c65 +#Q> NULL, -- c66 +#Q> NULL, -- c67 +#Q> NULL, -- c68 +#Q> NULL, -- c69 +#Q> NULL, -- c70 +#Q> NULL, -- c71 +#Q> NULL, -- c72 +#Q> NULL, -- c73 +#Q> NULL, -- c74 +#Q> NULL, -- c75 +#Q> NULL, -- c76 +#Q> # +#Q> NULL, -- c77 +#Q> NULL, -- c78 +#Q> # +#Q> 3 -- crn -- row number +#Q> ), ( +#Q> b'1', -- c01 +#Q> b'1111111111111111111111111111111111111111111111111111111111111111', -- c02 +#Q> 127, -- c03 +#Q> 0, -- c04 +#Q> 001, -- c05 +#Q> true, -- c06 +#Q> 32767, -- c07 +#Q> 0, -- c08 +#Q> 00001, -- c09 +#Q> 8388607, -- c10 +#Q> 0, -- c11 +#Q> 00000001, -- c12 +#Q> 2147483647, -- c13 +#Q> 0, -- c14 +#Q> 0000000001, -- c15 +#Q> 9223372036854775807, -- c16 +#Q> 0, -- c17 +#Q> 00000000000000000001, -- c18 +#Q> -1.175494351E-38, -- c19 +#Q> 1.175494351E-38, -- c20 +#Q> 000000000000001, -- c21 +#Q> -2.2250738585072E-308, -- c22 +#Q> 2.2250738585072E-308, -- c23 +#Q> 00000000000000000000001, -- c24 +#Q> -9999999999, -- c25 +#Q> 9999999999, -- c26 +#Q> 0000000001, -- c27 +#Q> # +#Q> '2008-08-04', -- c28 +#Q> '2008-08-04 16:18:06', -- c29 +#Q> '2008-08-04 16:18:24', -- c30 +#Q> '16:18:47', -- c31 +#Q> '2008', -- c32 +#Q> # +#Q> 'a', -- c33 +#Q> '', -- c34 +#Q> 'e', -- c35 +#Q> REPEAT('i',255), -- c36 +#Q> _utf8 x'c3a4', -- c37 +#Q> '', -- c38 +#Q> _utf8 x'c3b6', -- c39 +#Q> REPEAT(_utf8 x'c3bc',255), -- c40 +#Q> _ucs2 x'00e4', -- c41 +#Q> '', -- c42 +#Q> _ucs2 x'00f6', -- c43 +#Q> REPEAT(_ucs2 x'00fc',255), -- c44 +#Q> # +#Q> '', -- c45 +#Q> 'a', -- c46 +#Q> REPEAT('e',255), -- c47 +#Q> REPEAT('i',261), -- c48 +#Q> '', -- c49 +#Q> _utf8 x'c3a4', -- c50 +#Q> REPEAT(_utf8 x'c3b6',255), -- c51 +#Q> REPEAT(_utf8 x'c3bc',261), -- c52 +#Q> '', -- c53 +#Q> _ucs2 x'00e4', -- c54 +#Q> REPEAT(_ucs2 x'00f6',255), -- c55 +#Q> REPEAT(_ucs2 x'00fc',261), -- c56 +#Q> # +#Q> '0', -- c57 +#Q> '', -- c58 +#Q> '1', -- c59 +#Q> REPEAT('1',255), -- c60 +#Q> # +#Q> '', -- c61 +#Q> 'b', -- c62 +#Q> REPEAT('c',255), -- c63 +#Q> REPEAT('\'',261), -- c64 +#Q> # +#Q> 'tinyblob', -- c65 +#Q> 'tinytext', -- c66 +#Q> 'tinytext-ucs2', -- c67 +#Q> 'blob', -- c68 +#Q> 'text', -- c69 +#Q> 'text-ucs2', -- c70 +#Q> 'mediumblob', -- c71 +#Q> 'mediumtext', -- c72 +#Q> 'mediumtext-ucs2', -- c73 +#Q> 'longblob', -- c74 +#Q> 'longtext', -- c75 +#Q> 'longtext #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # -# at # -#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET @@ -2733,6 +3080,172 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET +#Q> c01 = b'1', +#Q> c02 = b'1111111111111111111111111111111111111111111111111111111111111111', +#Q> c03 = 127, +#Q> c04 = 255, +#Q> c05 = 255, +#Q> c06 = true, +#Q> c07 = 32767, +#Q> c08 = 65535, +#Q> c09 = 65535, +#Q> c10 = 8388607, +#Q> c11 = 16777215, +#Q> c12 = 16777215, +#Q> c13 = 2147483647, +#Q> c14 = 4294967295, +#Q> c15 = 4294967295, +#Q> c16 = 9223372036854775807, +#Q> c17 = 18446744073709551615, +#Q> c18 = 18446744073709551615, +#Q> c19 = 3.402823466E+38, +#Q> c20 = 3.402823466E+38, +#Q> c21 = 3.402823466E+38, +#Q> c22 = 1.7976931348623E+308, +#Q> c23 = 1.7976931348623E+308, +#Q> c24 = 1.7976931348623E+308, +#Q> c25 = 9999999999, +#Q> c26 = 9999999999, +#Q> c27 = 9999999999, +#Q> # +#Q> c28 = '9999-12-31', +#Q> c29 = '9999-12-31 23:59:59', +#Q> c30 = '2038-01-08 03:14:07', +#Q> c31 = '838:59:59', +#Q> c32 = '2155', +#Q> # +#Q> c33 = x'ff', +#Q> c34 = '', +#Q> c35 = x'ff', +#Q> c36 = REPEAT(x'ff',255), +#Q> c37 = _utf8 x'efbfbf', +#Q> c38 = '', +#Q> c39 = _utf8 x'efbfbf', +#Q> c40 = REPEAT(_utf8 x'efbfbf',255), +#Q> c41 = _ucs2 x'ffff', +#Q> c42 = '', +#Q> c43 = _ucs2 x'ffff', +#Q> c44 = REPEAT(_ucs2 x'ffff',255), +#Q> # +#Q> c45 = '', +#Q> c46 = x'ff', +#Q> c47 = REPEAT(x'ff',255), +#Q> c48 = REPEAT(x'ff',261), +#Q> c49 = '', +#Q> c50 = _utf8 x'efbfbf', +#Q> c51 = REPEAT(_utf8 x'efbfbf',255), +#Q> c52 = REPEAT(_utf8 x'efbfbf',261), +#Q> c53 = '', +#Q> c54 = _ucs2 x'ffff', +#Q> c55 = REPEAT(_ucs2 x'ffff',255), +#Q> c56 = REPEAT(_ucs2 x'ffff',261), +#Q> # +#Q> c57 = x'ff', +#Q> c58 = '', +#Q> c59 = x'ff', +#Q> c60 = REPEAT(x'ff',255), +#Q> # +#Q> c61 = '', +#Q> c62 = x'ff', +#Q> c63 = REPEAT(x'ff',255), +#Q> c64 = REPEAT(x'ff',261), +#Q> # +#Q> c65 = 'tinyblob', +#Q> c66 = 'tinytext', +#Q> c67 = 'tinytext-ucs2', +#Q> c68 = 'blob', +#Q> c69 = 'text', +#Q> c70 = 'text-ucs2', +#Q> c71 = 'mediumblob', +#Q> c72 = 'mediumtext', +#Q> c73 = 'mediumtext-ucs2', +#Q> c74 = 'longblob', +#Q> c75 = 'longtext', +#Q> c76 = 'longtext-ucs2', +#Q> # +#Q> c77 = 'c', +#Q> c78 = 'a,b,c', +#Q> # +#Q> crn = crn +#Q> # +#Q> WHERE +#Q> # +#Q> c01 = b'0' AND +#Q> c02 = b'0000000000000000000000000000000000000000000000000000000000000000' AND +#Q> c03 = -128 AND +#Q> c04 = 0 AND +#Q> c05 = 000 AND +#Q> c06 = false AND +#Q> c07 = -32768 AND +#Q> c08 = 0 AND +#Q> c09 = 00000 AND +#Q> c10 = -8388608 AND +#Q> c11 = 0 AND +#Q> c12 = 00000000 AND +#Q> c13 = -2147483648 AND +#Q> c14 = 0 AND +#Q> c15 = 0000000000 AND +#Q> c16 = -9223372036854775808 AND +#Q> c17 = 0 AND +#Q> c18 = 00000000000000000000 AND +#Q> c19 < -3.402823465E+38 AND +#Q> c20 < 1.175494352E-38 AND +#Q> c21 = 000000000000 AND +#Q> c22 < -1.7976931348622E+308 AND +#Q> c23 < 2.2250738585073E-308 AND +#Q> c24 = 0000000000000000000000 AND +#Q> c25 = -9999999999 AND +#Q> c26 = 0 AND +#Q> c27 = 0000000000 AND +#Q> # +#Q> c28 = '1000-01-01' AND +#Q> c29 = '1000-01-01 00:00:00' AND +#Q> c30 = '1970-01-02 00:00:01' AND +#Q> c31 = '-838:59:59' AND +#Q> c32 = '1901' AND +#Q> # +#Q> c33 = '' AND +#Q> c34 = '' AND +#Q> c35 = '' AND +#Q> c36 = '' AND +#Q> c37 = '' AND +#Q> c38 = '' AND +#Q> c39 = '' AND +#Q> c40 = '' AND +#Q> c41 = '' AND +#Q> c42 = '' AND +#Q> c43 = '' AND +#Q> c44 = '' AND +#Q> # +#Q> c45 = '' AND +#Q> c46 = '' AND +#Q> c47 = '' AND +#Q> c48 = '' AND +#Q> c49 = '' AND +#Q> c50 = '' AND +#Q> c51 = '' AND +#Q> c52 = '' AND +#Q> c53 = '' AND +#Q> c54 = '' AND +#Q> c55 = '' AND +#Q> c56 = '' AND +#Q> # +#Q> # this does not reproduce the inserted value: c57 = '' AND +#Q> c58 = '' AND +#Q> # this does not reproduce the inserted value: c59 = '' AND +#Q> # this does not reproduce the inserted value: c60 = '' AND +#Q> # +#Q> c61 = '' AND +#Q> c62 = '' AND +#Q> c63 = '' AND +#Q> c64 = '' AND +#Q> # +#Q> c65 = '' AND +#Q> c66 = '' AND +#Q> c67 = #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -2906,6 +3419,177 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET +#Q> c01 = b'0', +#Q> c02 = b'0000000000000000000000000000000000000000000000000000000000000000', +#Q> c03 = -128, +#Q> c04 = 0, +#Q> c05 = 000, +#Q> c06 = false, +#Q> c07 = -32768, +#Q> c08 = 0, +#Q> c09 = 00000, +#Q> c10 = -8388608, +#Q> c11 = 0, +#Q> c12 = 00000000, +#Q> c13 = -2147483648, +#Q> c14 = 0, +#Q> c15 = 0000000000, +#Q> c16 = -9223372036854775808, +#Q> c17 = 0, +#Q> c18 = 00000000000000000000, +#Q> c19 = -3.402823466E+38, +#Q> c20 = 1.175494351E-38, +#Q> c21 = 000000000000, +#Q> c22 = -1.7976931348623E+308, +#Q> c23 = 2.2250738585072E-308, +#Q> c24 = 0000000000000000000000, +#Q> c25 = -9999999999, +#Q> c26 = 0, +#Q> c27 = 0000000000, +#Q> # +#Q> c28 = '1000-01-01', +#Q> c29 = '1000-01-01 00:00:00', +#Q> c30 = '1970-01-02 00:00:01', +#Q> c31 = '-838:59:59', +#Q> c32 = '1901', +#Q> # +#Q> c33 = '', +#Q> c34 = '', +#Q> c35 = '', +#Q> c36 = '', +#Q> c37 = '', +#Q> c38 = '', +#Q> c39 = '', +#Q> c40 = '', +#Q> c41 = '', +#Q> c42 = '', +#Q> c43 = '', +#Q> c44 = '', +#Q> # +#Q> c45 = '', +#Q> c46 = '', +#Q> c47 = '', +#Q> c48 = '', +#Q> c49 = '', +#Q> c50 = '', +#Q> c51 = '', +#Q> c52 = '', +#Q> c53 = '', +#Q> c54 = '', +#Q> c55 = '', +#Q> c56 = '', +#Q> # +#Q> c57 = '', +#Q> c58 = '', +#Q> c59 = '', +#Q> c60 = '', +#Q> # +#Q> c61 = '', +#Q> c62 = '', +#Q> c63 = '', +#Q> c64 = '', +#Q> # +#Q> c65 = '', +#Q> c66 = '', +#Q> c67 = '', +#Q> c68 = '', +#Q> c69 = '', +#Q> c70 = '', +#Q> c71 = '', +#Q> c72 = '', +#Q> c73 = '', +#Q> c74 = '', +#Q> c75 = '', +#Q> c76 = '', +#Q> # +#Q> c77 = 'a', +#Q> c78 = '', +#Q> # +#Q> crn = crn +#Q> # +#Q> WHERE +#Q> # +#Q> c01 = b'1' AND +#Q> # the below does not reproduce the inserted value: +#Q> #c02 = b'1111111111111111111111111111111111111111111111111111111111111111' AND +#Q> c03 = 127 AND +#Q> c04 = 255 AND +#Q> c05 = 255 AND +#Q> c06 = true AND +#Q> c07 = 32767 AND +#Q> c08 = 65535 AND +#Q> c09 = 65535 AND +#Q> c10 = 8388607 AND +#Q> c11 = 16777215 AND +#Q> c12 = 16777215 AND +#Q> c13 = 2147483647 AND +#Q> c14 = 4294967295 AND +#Q> c15 = 4294967295 AND +#Q> c16 = 9223372036854775807 AND +#Q> c17 = 18446744073709551615 AND +#Q> c18 = 18446744073709551615 AND +#Q> c19 > 3.402823465E+38 AND +#Q> c20 > 3.402823465E+38 AND +#Q> c21 > 3.402823465E+38 AND +#Q> c22 > 1.7976931348622E+308 AND +#Q> c23 > 1.7976931348622E+308 AND +#Q> c24 > 1.7976931348622E+308 AND +#Q> c25 = 9999999999 AND +#Q> c26 = 9999999999 AND +#Q> c27 = 9999999999 AND +#Q> # +#Q> c28 = '9999-12-31' AND +#Q> c29 = '9999-12-31 23:59:59' AND +#Q> c30 = '2038-01-08 03:14:07' AND +#Q> c31 = '838:59:59' AND +#Q> c32 = '2155' AND +#Q> # +#Q> c33 = x'ff' AND +#Q> c34 = '' AND +#Q> c35 = x'ff' AND +#Q> c36 = REPEAT(x'ff',255) AND +#Q> c37 = _utf8 x'efbfbf' AND +#Q> c38 = '' AND +#Q> c39 = _utf8 x'efbfbf' AND +#Q> c40 = REPEAT(_utf8 x'efbfbf',255) AND +#Q> c41 = _ucs2 x'ffff' AND +#Q> c42 = '' AND +#Q> c43 = _ucs2 x'ffff' AND +#Q> c44 = REPEAT(_ucs2 x'ffff',255) AND +#Q> # +#Q> c45 = '' AND +#Q> c46 = x'ff' AND +#Q> c47 = REPEAT(x'ff',255) AND +#Q> c48 = REPEAT(x'ff',261) AND +#Q> c49 = '' AND +#Q> c50 = _utf8 x'efbfbf' AND +#Q> c51 = REPEAT(_utf8 x'efbfbf',255) AND +#Q> c52 = REPEAT(_utf8 x'efbfbf',261) AND +#Q> c53 = '' AND +#Q> c54 = _ucs2 x'ffff' AND +#Q> c55 = REPEAT(_ucs2 x'ffff',255) AND +#Q> c56 = REPEAT(_ucs2 x'ffff',261) AND +#Q> # +#Q> c57 = x'ff' AND +#Q> c58 = '' AND +#Q> c59 = x'ff' AND +#Q> c60 = REPEAT(x'ff',255) AND +#Q> # +#Q> c61 = '' AND +#Q> c62 = x'ff' AND +#Q> c63 = REPEAT(x'ff',255) AND +#Q> c64 = REPEAT(x'ff',261) AND +#Q> # +#Q> c65 = 'tinyblob' AND +#Q> c66 = 'tinytext' AND +#Q> c67 = 'tinytext-ucs2' AND +#Q> c68 = 'blob' AND +#Q> c69 = 'text' AND +#Q> c70 = 'text-ucs2' AND +#Q> c71 = 'mediumblob #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -3079,6 +3763,175 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET +#Q> c01 = b'1', +#Q> c02 = b'1111111111111111111111111111111111111111111111111111111111111111', +#Q> c03 = 127, +#Q> c04 = 0, +#Q> c05 = 001, +#Q> c06 = true, +#Q> c07 = 32767, +#Q> c08 = 0, +#Q> c09 = 00001, +#Q> c10 = 8388607, +#Q> c11 = 0, +#Q> c12 = 00000001, +#Q> c13 = 2147483647, +#Q> c14 = 0, +#Q> c15 = 0000000001, +#Q> c16 = 9223372036854775807, +#Q> c17 = 0, +#Q> c18 = 00000000000000000001, +#Q> c19 = -1.175494351E-38, +#Q> c20 = 1.175494351E-38, +#Q> c21 = 000000000000001, +#Q> c22 = -2.2250738585072E-308, +#Q> c23 = 2.2250738585072E-308, +#Q> c24 = 00000000000000000000001, +#Q> c25 = -9999999999, +#Q> c26 = 9999999999, +#Q> c27 = 0000000001, +#Q> # +#Q> c28 = '2008-08-04', +#Q> c29 = '2008-08-04 16:18:06', +#Q> c30 = '2008-08-04 16:18:24', +#Q> c31 = '16:18:47', +#Q> c32 = '2008', +#Q> # +#Q> c33 = 'a', +#Q> c34 = '', +#Q> c35 = 'e', +#Q> c36 = REPEAT('i',255), +#Q> c37 = _utf8 x'c3a4', +#Q> c38 = '', +#Q> c39 = _utf8 x'c3b6', +#Q> c40 = REPEAT(_utf8 x'c3bc',255), +#Q> c41 = _ucs2 x'00e4', +#Q> c42 = '', +#Q> c43 = _ucs2 x'00f6', +#Q> c44 = REPEAT(_ucs2 x'00fc',255), +#Q> # +#Q> c45 = '', +#Q> c46 = 'a', +#Q> c47 = REPEAT('e',255), +#Q> c48 = REPEAT('i',261), +#Q> c49 = '', +#Q> c50 = _utf8 x'c3a4', +#Q> c51 = REPEAT(_utf8 x'c3b6',255), +#Q> c52 = REPEAT(_utf8 x'c3bc',261), +#Q> c53 = '', +#Q> c54 = _ucs2 x'00e4', +#Q> c55 = REPEAT(_ucs2 x'00f6',255), +#Q> c56 = REPEAT(_ucs2 x'00fc',261), +#Q> # +#Q> c57 = '0', +#Q> c58 = '', +#Q> c59 = '1', +#Q> c60 = REPEAT('1',255), +#Q> # +#Q> c61 = '', +#Q> c62 = 'b', +#Q> c63 = REPEAT('c',255), +#Q> c64 = REPEAT('\'',261), +#Q> # +#Q> c65 = 'tinyblob', +#Q> c66 = 'tinytext', +#Q> c67 = 'tinytext-ucs2', +#Q> c68 = 'blob', +#Q> c69 = 'text', +#Q> c70 = 'text-ucs2', +#Q> c71 = 'mediumblob', +#Q> c72 = 'mediumtext', +#Q> c73 = 'mediumtext-ucs2', +#Q> c74 = 'longblob', +#Q> c75 = 'longtext', +#Q> c76 = 'longtext-ucs2', +#Q> # +#Q> c77 = 'b', +#Q> c78 = 'b,c', +#Q> # +#Q> crn = crn +#Q> # +#Q> WHERE +#Q> # +#Q> c01 IS NULL AND +#Q> c02 IS NULL AND +#Q> c03 IS NULL AND +#Q> c04 IS NULL AND +#Q> c05 IS NULL AND +#Q> c06 IS NULL AND +#Q> c07 IS NULL AND +#Q> c08 IS NULL AND +#Q> c09 IS NULL AND +#Q> c10 IS NULL AND +#Q> c11 IS NULL AND +#Q> c12 IS NULL AND +#Q> c13 IS NULL AND +#Q> c14 IS NULL AND +#Q> c15 IS NULL AND +#Q> c16 IS NULL AND +#Q> c17 IS NULL AND +#Q> c18 IS NULL AND +#Q> c19 IS NULL AND +#Q> c20 IS NULL AND +#Q> c21 IS NULL AND +#Q> c22 IS NULL AND +#Q> c23 IS NULL AND +#Q> c24 IS NULL AND +#Q> c25 IS NULL AND +#Q> c26 IS NULL AND +#Q> c27 IS NULL AND +#Q> # +#Q> c28 IS NULL AND +#Q> c29 IS NULL AND +#Q> # this got a timestamp instead of NULL: c30 IS NULL AND +#Q> c31 IS NULL AND +#Q> c32 IS NULL AND +#Q> # +#Q> c33 IS NULL AND +#Q> c34 IS NULL AND +#Q> c35 IS NULL AND +#Q> c36 IS NULL AND +#Q> c37 IS NULL AND +#Q> c38 IS NULL AND +#Q> c39 IS NULL AND +#Q> c40 IS NULL AND +#Q> c41 IS NULL AND +#Q> c42 IS NULL AND +#Q> c43 IS NULL AND +#Q> c44 IS NULL AND +#Q> # +#Q> c45 IS NULL AND +#Q> c46 IS NULL AND +#Q> c47 IS NULL AND +#Q> c48 IS NULL AND +#Q> c49 IS NULL AND +#Q> c50 IS NULL AND +#Q> c51 IS NULL AND +#Q> c52 IS NULL AND +#Q> c53 IS NULL AND +#Q> c54 IS NULL AND +#Q> c55 IS NULL AND +#Q> c56 IS NULL AND +#Q> # +#Q> c57 IS NULL AND +#Q> c58 IS NULL AND +#Q> c59 IS NULL AND +#Q> c60 IS NULL AND +#Q> # +#Q> c61 IS NULL AND +#Q> c62 IS NULL AND +#Q> c63 IS NULL AND +#Q> c64 IS NULL AND +#Q> # +#Q> c65 IS NULL AND +#Q> c66 IS NULL AND +#Q> c67 IS NULL AND +#Q> c68 IS NULL AND +#Q> c69 IS NULL AND +#Q> c70 IS NULL #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -3252,6 +4105,178 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET +#Q> c01 = NULL, +#Q> c02 = NULL, +#Q> c03 = NULL, +#Q> c04 = NULL, +#Q> c05 = NULL, +#Q> c06 = NULL, +#Q> c07 = NULL, +#Q> c08 = NULL, +#Q> c09 = NULL, +#Q> c10 = NULL, +#Q> c11 = NULL, +#Q> c12 = NULL, +#Q> c13 = NULL, +#Q> c14 = NULL, +#Q> c15 = NULL, +#Q> c16 = NULL, +#Q> c17 = NULL, +#Q> c18 = NULL, +#Q> c19 = NULL, +#Q> c20 = NULL, +#Q> c21 = NULL, +#Q> c22 = NULL, +#Q> c23 = NULL, +#Q> c24 = NULL, +#Q> c25 = NULL, +#Q> c26 = NULL, +#Q> c27 = NULL, +#Q> # +#Q> c28 = NULL, +#Q> c29 = NULL, +#Q> c30 = NULL, +#Q> c31 = NULL, +#Q> c32 = NULL, +#Q> # +#Q> c33 = NULL, +#Q> c34 = NULL, +#Q> c35 = NULL, +#Q> c36 = NULL, +#Q> c37 = NULL, +#Q> c38 = NULL, +#Q> c39 = NULL, +#Q> c40 = NULL, +#Q> c41 = NULL, +#Q> c42 = NULL, +#Q> c43 = NULL, +#Q> c44 = NULL, +#Q> # +#Q> c45 = NULL, +#Q> c46 = NULL, +#Q> c47 = NULL, +#Q> c48 = NULL, +#Q> c49 = NULL, +#Q> c50 = NULL, +#Q> c51 = NULL, +#Q> c52 = NULL, +#Q> c53 = NULL, +#Q> c54 = NULL, +#Q> c55 = NULL, +#Q> c56 = NULL, +#Q> # +#Q> c57 = NULL, +#Q> c58 = NULL, +#Q> c59 = NULL, +#Q> c60 = NULL, +#Q> # +#Q> c61 = NULL, +#Q> c62 = NULL, +#Q> c63 = NULL, +#Q> c64 = NULL, +#Q> # +#Q> c65 = NULL, +#Q> c66 = NULL, +#Q> c67 = NULL, +#Q> c68 = NULL, +#Q> c69 = NULL, +#Q> c70 = NULL, +#Q> c71 = NULL, +#Q> c72 = NULL, +#Q> c73 = NULL, +#Q> c74 = NULL, +#Q> c75 = NULL, +#Q> c76 = NULL, +#Q> # +#Q> c77 = NULL, +#Q> c78 = NULL, +#Q> # +#Q> crn = crn +#Q> # +#Q> WHERE +#Q> # +#Q> c01 = b'1' AND +#Q> # the below does not reproduce the inserted value: +#Q> #c02 = b'1111111111111111111111111111111111111111111111111111111111111111' AND +#Q> c03 = 127 AND +#Q> c04 = 0 AND +#Q> c05 = 001 AND +#Q> c06 = true AND +#Q> c07 = 32767 AND +#Q> c08 = 0 AND +#Q> c09 = 00001 AND +#Q> c10 = 8388607 AND +#Q> c11 = 0 AND +#Q> c12 = 00000001 AND +#Q> c13 = 2147483647 AND +#Q> c14 = 0 AND +#Q> c15 = 0000000001 AND +#Q> c16 = 9223372036854775807 AND +#Q> c17 = 0 AND +#Q> c18 = 00000000000000000001 AND +#Q> c19 > -1.175494352E-38 AND +#Q> c20 < 1.175494352E-38 AND +#Q> c21 = 000000000000001 AND +#Q> c22 > -2.2250738585073E-308 AND +#Q> c23 < 2.2250738585073E-308 AND +#Q> c24 = 00000000000000000000001 AND +#Q> c25 = -9999999999 AND +#Q> c26 = 9999999999 AND +#Q> c27 = 0000000001 AND +#Q> # +#Q> c28 = '2008-08-04' AND +#Q> c29 = '2008-08-04 16:18:06' AND +#Q> c30 = '2008-08-04 16:18:24' AND +#Q> c31 = '16:18:47' AND +#Q> c32 = '2008' AND +#Q> # +#Q> c33 = 'a' AND +#Q> c34 = '' AND +#Q> c35 = 'e' AND +#Q> c36 = REPEAT('i',255) AND +#Q> c37 = _utf8 x'c3a4' AND +#Q> c38 = '' AND +#Q> c39 = _utf8 x'c3b6' AND +#Q> c40 = REPEAT(_utf8 x'c3bc',255) AND +#Q> c41 = _ucs2 x'00e4' AND +#Q> c42 = '' AND +#Q> c43 = _ucs2 x'00f6' AND +#Q> c44 = REPEAT(_ucs2 x'00fc',255) AND +#Q> # +#Q> c45 = '' AND +#Q> c46 = 'a' AND +#Q> c47 = REPEAT('e',255) AND +#Q> c48 = REPEAT('i',261) AND +#Q> c49 = '' AND +#Q> c50 = _utf8 x'c3a4' AND +#Q> c51 = REPEAT(_utf8 x'c3b6',255) AND +#Q> c52 = REPEAT(_utf8 x'c3bc',261) AND +#Q> c53 = '' AND +#Q> c54 = _ucs2 x'00e4' AND +#Q> c55 = REPEAT(_ucs2 x'00f6',255) AND +#Q> c56 = REPEAT(_ucs2 x'00fc',261) AND +#Q> # +#Q> c57 = '0' AND +#Q> c58 = '' AND +#Q> c59 = '1' AND +#Q> c60 = REPEAT('1',255) AND +#Q> # +#Q> c61 = '' AND +#Q> c62 = 'b' AND +#Q> c63 = REPEAT('c',255) AND +#Q> c64 = REPEAT('\'',261) AND +#Q> # +#Q> c65 = 'tinyblob' AND +#Q> c66 = 'tinytext' AND +#Q> c67 = 'tinytext-ucs2' AND +#Q> c68 = 'blob' AND +#Q> c69 = 'text' AND +#Q> c70 = 'text-ucs2' AND +#Q> c71 = 'mediumblob' AND +#Q> c72 = 'me #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -3425,6 +4450,92 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE +#Q> # +#Q> c01 = b'1' AND +#Q> # the below does not reproduce the inserted value: +#Q> #c02 = b'1111111111111111111111111111111111111111111111111111111111111111' AND +#Q> c03 = 127 AND +#Q> c04 = 255 AND +#Q> c05 = 255 AND +#Q> c06 = true AND +#Q> c07 = 32767 AND +#Q> c08 = 65535 AND +#Q> c09 = 65535 AND +#Q> c10 = 8388607 AND +#Q> c11 = 16777215 AND +#Q> c12 = 16777215 AND +#Q> c13 = 2147483647 AND +#Q> c14 = 4294967295 AND +#Q> c15 = 4294967295 AND +#Q> c16 = 9223372036854775807 AND +#Q> c17 = 18446744073709551615 AND +#Q> c18 = 18446744073709551615 AND +#Q> c19 > 3.402823465E+38 AND +#Q> c20 > 3.402823465E+38 AND +#Q> c21 > 3.402823465E+38 AND +#Q> c22 > 1.7976931348622E+308 AND +#Q> c23 > 1.7976931348622E+308 AND +#Q> c24 > 1.7976931348622E+308 AND +#Q> c25 = 9999999999 AND +#Q> c26 = 9999999999 AND +#Q> c27 = 9999999999 AND +#Q> # +#Q> c28 = '9999-12-31' AND +#Q> c29 = '9999-12-31 23:59:59' AND +#Q> c30 = '2038-01-08 03:14:07' AND +#Q> c31 = '838:59:59' AND +#Q> c32 = '2155' AND +#Q> # +#Q> c33 = x'ff' AND +#Q> c34 = '' AND +#Q> c35 = x'ff' AND +#Q> c36 = REPEAT(x'ff',255) AND +#Q> c37 = _utf8 x'efbfbf' AND +#Q> c38 = '' AND +#Q> c39 = _utf8 x'efbfbf' AND +#Q> c40 = REPEAT(_utf8 x'efbfbf',255) AND +#Q> c41 = _ucs2 x'ffff' AND +#Q> c42 = '' AND +#Q> c43 = _ucs2 x'ffff' AND +#Q> c44 = REPEAT(_ucs2 x'ffff',255) AND +#Q> # +#Q> c45 = '' AND +#Q> c46 = x'ff' AND +#Q> c47 = REPEAT(x'ff',255) AND +#Q> c48 = REPEAT(x'ff',261) AND +#Q> c49 = '' AND +#Q> c50 = _utf8 x'efbfbf' AND +#Q> c51 = REPEAT(_utf8 x'efbfbf',255) AND +#Q> c52 = REPEAT(_utf8 x'efbfbf',261) AND +#Q> c53 = '' AND +#Q> c54 = _ucs2 x'ffff' AND +#Q> c55 = REPEAT(_ucs2 x'ffff',255) AND +#Q> c56 = REPEAT(_ucs2 x'ffff',261) AND +#Q> # +#Q> c57 = x'ff' AND +#Q> c58 = '' AND +#Q> c59 = x'ff' AND +#Q> c60 = REPEAT(x'ff',255) AND +#Q> # +#Q> c61 = '' AND +#Q> c62 = x'ff' AND +#Q> c63 = REPEAT(x'ff',255) AND +#Q> c64 = REPEAT(x'ff',261) AND +#Q> # +#Q> c65 = 'tinyblob' AND +#Q> c66 = 'tinytext' AND +#Q> c67 = 'tinytext-ucs2' AND +#Q> c68 = 'blob' AND +#Q> c69 = 'text' AND +#Q> c70 = 'text-ucs2' AND +#Q> c71 = 'mediumblob' AND +#Q> c72 = 'mediumtext' AND +#Q> c73 = 'mediumtext-ucs2' AND +#Q> c74 = 'longblob' AND +#Q> c75 = ' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3518,6 +4629,89 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE +#Q> # +#Q> c01 = b'0' AND +#Q> c02 = b'0000000000000000000000000000000000000000000000000000000000000000' AND +#Q> c03 = -128 AND +#Q> c04 = 0 AND +#Q> c05 = 000 AND +#Q> c06 = false AND +#Q> c07 = -32768 AND +#Q> c08 = 0 AND +#Q> c09 = 00000 AND +#Q> c10 = -8388608 AND +#Q> c11 = 0 AND +#Q> c12 = 00000000 AND +#Q> c13 = -2147483648 AND +#Q> c14 = 0 AND +#Q> c15 = 0000000000 AND +#Q> c16 = -9223372036854775808 AND +#Q> c17 = 0 AND +#Q> c18 = 00000000000000000000 AND +#Q> c19 < -3.402823465E+38 AND +#Q> c20 < 1.175494352E-38 AND +#Q> c21 = 000000000000 AND +#Q> c22 < -1.7976931348622E+308 AND +#Q> c23 < 2.2250738585073E-308 AND +#Q> c24 = 0000000000000000000000 AND +#Q> c25 = -9999999999 AND +#Q> c26 = 0 AND +#Q> c27 = 0000000000 AND +#Q> # +#Q> c28 = '1000-01-01' AND +#Q> c29 = '1000-01-01 00:00:00' AND +#Q> c30 = '1970-01-02 00:00:01' AND +#Q> c31 = '-838:59:59' AND +#Q> c32 = '1901' AND +#Q> # +#Q> c33 = '' AND +#Q> c34 = '' AND +#Q> c35 = '' AND +#Q> c36 = '' AND +#Q> c37 = '' AND +#Q> c38 = '' AND +#Q> c39 = '' AND +#Q> c40 = '' AND +#Q> c41 = '' AND +#Q> c42 = '' AND +#Q> c43 = '' AND +#Q> c44 = '' AND +#Q> # +#Q> c45 = '' AND +#Q> c46 = '' AND +#Q> c47 = '' AND +#Q> c48 = '' AND +#Q> c49 = '' AND +#Q> c50 = '' AND +#Q> c51 = '' AND +#Q> c52 = '' AND +#Q> c53 = '' AND +#Q> c54 = '' AND +#Q> c55 = '' AND +#Q> c56 = '' AND +#Q> # +#Q> # this does not reproduce the inserted value: c57 = '' AND +#Q> c58 = '' AND +#Q> # this does not reproduce the inserted value: c59 = '' AND +#Q> # this does not reproduce the inserted value: c60 = '' AND +#Q> # +#Q> c61 = '' AND +#Q> c62 = '' AND +#Q> c63 = '' AND +#Q> c64 = '' AND +#Q> # +#Q> c65 = '' AND +#Q> c66 = '' AND +#Q> c67 = '' AND +#Q> c68 = '' AND +#Q> c69 = '' AND +#Q> c70 = '' AND +#Q> c71 = '' AND +#Q> c72 = '' AND +#Q> c73 = '' A #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3611,6 +4805,92 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE +#Q> # +#Q> c01 = b'1' AND +#Q> # the below does not reproduce the inserted value: +#Q> #c02 = b'1111111111111111111111111111111111111111111111111111111111111111' AND +#Q> c03 = 127 AND +#Q> c04 = 0 AND +#Q> c05 = 001 AND +#Q> c06 = true AND +#Q> c07 = 32767 AND +#Q> c08 = 0 AND +#Q> c09 = 00001 AND +#Q> c10 = 8388607 AND +#Q> c11 = 0 AND +#Q> c12 = 00000001 AND +#Q> c13 = 2147483647 AND +#Q> c14 = 0 AND +#Q> c15 = 0000000001 AND +#Q> c16 = 9223372036854775807 AND +#Q> c17 = 0 AND +#Q> c18 = 00000000000000000001 AND +#Q> c19 > -1.175494352E-38 AND +#Q> c20 < 1.175494352E-38 AND +#Q> c21 = 000000000000001 AND +#Q> c22 > -2.2250738585073E-308 AND +#Q> c23 < 2.2250738585073E-308 AND +#Q> c24 = 00000000000000000000001 AND +#Q> c25 = -9999999999 AND +#Q> c26 = 9999999999 AND +#Q> c27 = 0000000001 AND +#Q> # +#Q> c28 = '2008-08-04' AND +#Q> c29 = '2008-08-04 16:18:06' AND +#Q> c30 = '2008-08-04 16:18:24' AND +#Q> c31 = '16:18:47' AND +#Q> c32 = '2008' AND +#Q> # +#Q> c33 = 'a' AND +#Q> c34 = '' AND +#Q> c35 = 'e' AND +#Q> c36 = REPEAT('i',255) AND +#Q> c37 = _utf8 x'c3a4' AND +#Q> c38 = '' AND +#Q> c39 = _utf8 x'c3b6' AND +#Q> c40 = REPEAT(_utf8 x'c3bc',255) AND +#Q> c41 = _ucs2 x'00e4' AND +#Q> c42 = '' AND +#Q> c43 = _ucs2 x'00f6' AND +#Q> c44 = REPEAT(_ucs2 x'00fc',255) AND +#Q> # +#Q> c45 = '' AND +#Q> c46 = 'a' AND +#Q> c47 = REPEAT('e',255) AND +#Q> c48 = REPEAT('i',261) AND +#Q> c49 = '' AND +#Q> c50 = _utf8 x'c3a4' AND +#Q> c51 = REPEAT(_utf8 x'c3b6',255) AND +#Q> c52 = REPEAT(_utf8 x'c3bc',261) AND +#Q> c53 = '' AND +#Q> c54 = _ucs2 x'00e4' AND +#Q> c55 = REPEAT(_ucs2 x'00f6',255) AND +#Q> c56 = REPEAT(_ucs2 x'00fc',261) AND +#Q> # +#Q> c57 = '0' AND +#Q> c58 = '' AND +#Q> c59 = '1' AND +#Q> c60 = REPEAT('1',255) AND +#Q> # +#Q> c61 = '' AND +#Q> c62 = 'b' AND +#Q> c63 = REPEAT('c',255) AND +#Q> c64 = REPEAT('\'',261) AND +#Q> # +#Q> c65 = 'tinyblob' AND +#Q> c66 = 'tinytext' AND +#Q> c67 = 'tinytext-ucs2' AND +#Q> c68 = 'blob' AND +#Q> c69 = 'text' AND +#Q> c70 = 'text-ucs2' AND +#Q> c71 = 'mediumblob' AND +#Q> c72 = 'mediumtext' AND +#Q> c73 = 'mediumtext-ucs2' AND +#Q> c74 = 'longblob' AND +#Q> c75 = 'longtext' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3704,6 +4984,90 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE +#Q> # +#Q> c01 IS NULL AND +#Q> c02 IS NULL AND +#Q> c03 IS NULL AND +#Q> c04 IS NULL AND +#Q> c05 IS NULL AND +#Q> c06 IS NULL AND +#Q> c07 IS NULL AND +#Q> c08 IS NULL AND +#Q> c09 IS NULL AND +#Q> c10 IS NULL AND +#Q> c11 IS NULL AND +#Q> c12 IS NULL AND +#Q> c13 IS NULL AND +#Q> c14 IS NULL AND +#Q> c15 IS NULL AND +#Q> c16 IS NULL AND +#Q> c17 IS NULL AND +#Q> c18 IS NULL AND +#Q> c19 IS NULL AND +#Q> c20 IS NULL AND +#Q> c21 IS NULL AND +#Q> c22 IS NULL AND +#Q> c23 IS NULL AND +#Q> c24 IS NULL AND +#Q> c25 IS NULL AND +#Q> c26 IS NULL AND +#Q> c27 IS NULL AND +#Q> # +#Q> c28 IS NULL AND +#Q> c29 IS NULL AND +#Q> # this got a timestamp instead of NULL: c30 IS NULL AND +#Q> c31 IS NULL AND +#Q> c32 IS NULL AND +#Q> # +#Q> c33 IS NULL AND +#Q> c34 IS NULL AND +#Q> c35 IS NULL AND +#Q> c36 IS NULL AND +#Q> c37 IS NULL AND +#Q> c38 IS NULL AND +#Q> c39 IS NULL AND +#Q> c40 IS NULL AND +#Q> c41 IS NULL AND +#Q> c42 IS NULL AND +#Q> c43 IS NULL AND +#Q> c44 IS NULL AND +#Q> # +#Q> c45 IS NULL AND +#Q> c46 IS NULL AND +#Q> c47 IS NULL AND +#Q> c48 IS NULL AND +#Q> c49 IS NULL AND +#Q> c50 IS NULL AND +#Q> c51 IS NULL AND +#Q> c52 IS NULL AND +#Q> c53 IS NULL AND +#Q> c54 IS NULL AND +#Q> c55 IS NULL AND +#Q> c56 IS NULL AND +#Q> # +#Q> c57 IS NULL AND +#Q> c58 IS NULL AND +#Q> c59 IS NULL AND +#Q> c60 IS NULL AND +#Q> # +#Q> c61 IS NULL AND +#Q> c62 IS NULL AND +#Q> c63 IS NULL AND +#Q> c64 IS NULL AND +#Q> # +#Q> c65 IS NULL AND +#Q> c66 IS NULL AND +#Q> c67 IS NULL AND +#Q> c68 IS NULL AND +#Q> c69 IS NULL AND +#Q> c70 IS NULL AND +#Q> c71 IS NULL AND +#Q> c72 IS NULL AND +#Q> c73 IS NULL AND +#Q> c74 IS NUL #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3921,6 +5285,18 @@ crn INT -- row number BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES +#Q> ('2008-08-01','VARCHAR-01',1), +#Q> ('2008-08-02','VARCHAR-02',2), +#Q> ('2008-08-03','VARCHAR-03',3), +#Q> ('2008-08-04','VARCHAR-04',4), +#Q> ('2008-08-05','VARCHAR-05',5), +#Q> ('2008-08-06','VARCHAR-06',6), +#Q> ('2008-08-07','VARCHAR-07',7), +#Q> ('2008-08-08','VARCHAR-08',8), +#Q> ('2008-08-09','VARCH #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -3978,6 +5354,9 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET c28 = ADDDATE(c28,10) WHERE crn < 8 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -4053,6 +5432,9 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE crn < 8 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -4324,6 +5706,18 @@ c_3_n INT -- row number BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES +#Q> ('2008-01-01','VARCHAR-01-01',11), +#Q> ('2008-01-02','VARCHAR-01-02',2), +#Q> ('2008-01-03','VARCHAR-01-03',3), +#Q> ('2008-01-04','VARCHAR-01-04',4), +#Q> ('2008-01-05','VARCHAR-01-05',5), +#Q> ('2008-01-06','VARCHAR-01-06',6), +#Q> ('2008-01-07','VARCHAR-01-07',7), +#Q> ('2008-01-08','VARCHAR-01-08',18), +#Q> ('2008-01-09','VARCHAR-0 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4381,6 +5775,18 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t2 VALUES +#Q> ('2008-02-01','VARCHAR-02-01',21), +#Q> ('2008-02-02','VARCHAR-02-02',2), +#Q> ('2008-02-03','VARCHAR-02-03',3), +#Q> ('2008-02-04','VARCHAR-02-04',4), +#Q> ('2008-02-05','VARCHAR-02-05',5), +#Q> ('2008-02-06','VARCHAR-02-06',6), +#Q> ('2008-02-07','VARCHAR-02-07',7), +#Q> ('2008-02-08','VARCHAR-02-08',28), +#Q> ('2008-02-09','VARCHAR-0 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4438,6 +5844,18 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t3 VALUES +#Q> ('2008-03-01','VARCHAR-03-01',31), +#Q> ('2008-03-02','VARCHAR-03-02',2), +#Q> ('2008-03-03','VARCHAR-03-03',3), +#Q> ('2008-03-04','VARCHAR-03-04',4), +#Q> ('2008-03-05','VARCHAR-03-05',5), +#Q> ('2008-03-06','VARCHAR-03-06',6), +#Q> ('2008-03-07','VARCHAR-03-07',7), +#Q> ('2008-03-08','VARCHAR-03-08',38), +#Q> ('2008-03-09','VARCHAR-0 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t3` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4495,6 +5913,13 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1,t2,t3 SET +#Q> c_1_1 = ADDDATE(c_1_1,INTERVAL 10 YEAR), +#Q> c_2_1 = ADDDATE(c_2_1,INTERVAL 20 YEAR), +#Q> c_3_1 = ADDDATE(c_3_1,INTERVAL 30 YEAR) +#Q> WHERE c_1_n = c_2_n AND c_2_n = c #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # @@ -4677,6 +6102,10 @@ COMMIT/*!*/; BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1,t2,t3 USING t1 INNER JOIN t2 INNER JOIN t3 +#Q> WHERE c_1_n = c_2_n AND c_2_n = c_3_ #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # @@ -4886,6 +6315,11 @@ c3 VARCHAR(60) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> LOAD DATA INFILE '../../std_data/loaddata5.dat' +#Q> INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY '' (c1,c2) +#Q> SET c3 = 'Wo #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result index e668481212d..7c6c21625f2 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result @@ -2371,6 +2371,94 @@ crn INT -- row number BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ( +#Q> b'0', -- c01 +#Q> b'0000000000000000000000000000000000000000000000000000000000000000', -- c02 +#Q> -128, -- c03 +#Q> 0, -- c04 +#Q> 000, -- c05 +#Q> false, -- c06 +#Q> -32768, -- c07 +#Q> 0, -- c08 +#Q> 00000, -- c09 +#Q> -8388608, -- c10 +#Q> 0, -- c11 +#Q> 00000000, -- c12 +#Q> -2147483648, -- c13 +#Q> 0, -- c14 +#Q> 0000000000, -- c15 +#Q> -9223372036854775808, -- c16 +#Q> 0, -- c17 +#Q> 00000000000000000000, -- c18 +#Q> -3.402823466E+38, -- c19 +#Q> 1.175494351E-38, -- c20 +#Q> 000000000000, -- c21 +#Q> -1.7976931348623E+308, -- c22 three digits cut for ps-protocol +#Q> 2.2250738585072E-308, -- c23 three digits cut for ps-protocol +#Q> 0000000000000000000000, -- c24 +#Q> -9999999999, -- c25 +#Q> 0, -- c26 +#Q> 0000000000, -- c27 +#Q> # +#Q> '1000-01-01', -- c28 +#Q> '1000-01-01 00:00:00', -- c29 +#Q> '1970-01-02 00:00:01', -- c30 one day later due to timezone issues +#Q> '-838:59:59', -- c31 +#Q> '1901', -- c32 +#Q> # +#Q> '', -- c33 +#Q> '', -- c34 +#Q> '', -- c35 +#Q> '', -- c36 +#Q> '', -- c37 +#Q> '', -- c38 +#Q> '', -- c39 +#Q> '', -- c40 +#Q> '', -- c41 +#Q> '', -- c42 +#Q> '', -- c43 +#Q> '', -- c44 +#Q> # +#Q> '', -- c45 +#Q> '', -- c46 +#Q> '', -- c47 +#Q> '', -- c48 +#Q> '', -- c49 +#Q> '', -- c50 +#Q> '', -- c51 +#Q> '', -- c52 +#Q> '', -- c53 +#Q> '', -- c54 +#Q> '', -- c55 +#Q> '', -- c56 +#Q> # +#Q> '', -- c57 +#Q> '', -- c58 +#Q> '', -- c59 +#Q> '', -- c60 +#Q> # +#Q> '', -- c61 +#Q> '', -- c62 +#Q> '', -- c63 +#Q> '', -- c64 +#Q> # +#Q> '', -- c65 +#Q> '', -- c66 +#Q> '', -- c67 +#Q> '', -- c68 +#Q> '', -- c69 +#Q> '', -- c70 +#Q> '', -- c71 +#Q> '', -- c72 +#Q> '', -- c73 +#Q> '', -- c74 +#Q> '', -- c75 +#Q> '', -- c76 +#Q> # +#Q> 'a', -- c77 +#Q> '', #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2467,6 +2555,94 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ( +#Q> b'1', -- c01 +#Q> b'1111111111111111111111111111111111111111111111111111111111111111', -- c02 +#Q> 127, -- c03 +#Q> 255, -- c04 +#Q> 255, -- c05 +#Q> true, -- c06 +#Q> 32767, -- c07 +#Q> 65535, -- c08 +#Q> 65535, -- c09 +#Q> 8388607, -- c10 +#Q> 16777215, -- c11 +#Q> 16777215, -- c12 +#Q> 2147483647, -- c13 +#Q> 4294967295, -- c14 +#Q> 4294967295, -- c15 +#Q> 9223372036854775807, -- c16 +#Q> 18446744073709551615, -- c17 +#Q> 18446744073709551615, -- c18 +#Q> 3.402823466E+38, -- c19 +#Q> 3.402823466E+38, -- c20 +#Q> 3.402823466E+38, -- c21 +#Q> 1.7976931348623E+308, -- c22 three digits cut for ps-protocol +#Q> 1.7976931348623E+308, -- c23 three digits cut for ps-protocol +#Q> 1.7976931348623E+308, -- c24 three digits cut for ps-protocol +#Q> 9999999999, -- c25 +#Q> 9999999999, -- c26 +#Q> 9999999999, -- c27 +#Q> # +#Q> '9999-12-31', -- c28 +#Q> '9999-12-31 23:59:59', -- c29 +#Q> '2038-01-08 03:14:07', -- c30 one day earlier due to timezone issues +#Q> '838:59:59', -- c31 +#Q> '2155', -- c32 +#Q> # +#Q> x'ff', -- c33 +#Q> '', -- c34 +#Q> x'ff', -- c35 +#Q> REPEAT(x'ff',255), -- c36 +#Q> _utf8 x'efbfbf', -- c37 +#Q> '', -- c38 +#Q> _utf8 x'efbfbf', -- c39 +#Q> REPEAT(_utf8 x'efbfbf',255), -- c40 +#Q> _ucs2 x'ffff', -- c41 +#Q> '', -- c42 +#Q> _ucs2 x'ffff', -- c43 +#Q> REPEAT(_ucs2 x'ffff',255), -- c44 +#Q> # +#Q> '', -- c45 +#Q> x'ff', -- c46 +#Q> REPEAT(x'ff',255), -- c47 +#Q> REPEAT(x'ff',261), -- c48 +#Q> '', -- c49 +#Q> _utf8 x'efbfbf', -- c50 +#Q> REPEAT(_utf8 x'efbfbf',255), -- c51 +#Q> REPEAT(_utf8 x'efbfbf',261), -- c52 +#Q> '', -- c53 +#Q> _ucs2 x'ffff', -- c54 +#Q> REPEAT(_ucs2 x'ffff',255), -- c55 +#Q> REPEAT(_ucs2 x'ffff',261), -- c56 +#Q> # +#Q> x'ff', -- c57 +#Q> '', -- c58 +#Q> x'ff', -- c59 +#Q> REPEAT(x'ff',255), -- c60 +#Q> # +#Q> '', -- c61 +#Q> x'ff', -- c62 +#Q> REPEAT(x'ff',255), -- c63 +#Q> REPEAT(x'ff',261), -- c64 +#Q> # +#Q> 'tinyblob', -- c65 not using maximum value here +#Q> 'tinytext', -- c66 not using maximum value here +#Q> 'tinytext-ucs2', -- c67 not using maximum value here +#Q> 'blob', -- c68 not using maximum value here +#Q> 'text', -- c69 not using maximum value here +#Q> 'text-ucs2', -- c70 not using maximum value here +#Q> 'mediumblob', -- c71 not using maximum value here +#Q> 'mediumtext', -- c72 not using maximum value here +#Q> 'mediumtext-ucs2', -- c73 not using maximum value here +#Q> 'longblob', -- c74 not using maximum value here +#Q> 'longtext', -- c75 not using maximum value here +#Q> 'longtext-ucs2', -- c76 not using maximum value here +#Q> # +#Q> 'c', -- c77 +#Q> 'a,b,c #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -2562,10 +2738,181 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ( +#Q> NULL, -- c01 +#Q> NULL, -- c02 +#Q> NULL, -- c03 +#Q> NULL, -- c04 +#Q> NULL, -- c05 +#Q> NULL, -- c06 +#Q> NULL, -- c07 +#Q> NULL, -- c08 +#Q> NULL, -- c09 +#Q> NULL, -- c10 +#Q> NULL, -- c11 +#Q> NULL, -- c12 +#Q> NULL, -- c13 +#Q> NULL, -- c14 +#Q> NULL, -- c15 +#Q> NULL, -- c16 +#Q> NULL, -- c17 +#Q> NULL, -- c18 +#Q> NULL, -- c19 +#Q> NULL, -- c20 +#Q> NULL, -- c21 +#Q> NULL, -- c22 +#Q> NULL, -- c23 +#Q> NULL, -- c24 +#Q> NULL, -- c25 +#Q> NULL, -- c26 +#Q> NULL, -- c27 +#Q> # +#Q> NULL, -- c28 +#Q> NULL, -- c29 +#Q> NULL, -- c30 +#Q> NULL, -- c31 +#Q> NULL, -- c32 +#Q> # +#Q> NULL, -- c33 +#Q> NULL, -- c34 +#Q> NULL, -- c35 +#Q> NULL, -- c36 +#Q> NULL, -- c37 +#Q> NULL, -- c38 +#Q> NULL, -- c39 +#Q> NULL, -- c40 +#Q> NULL, -- c41 +#Q> NULL, -- c42 +#Q> NULL, -- c43 +#Q> NULL, -- c44 +#Q> # +#Q> NULL, -- c45 +#Q> NULL, -- c46 +#Q> NULL, -- c47 +#Q> NULL, -- c48 +#Q> NULL, -- c49 +#Q> NULL, -- c50 +#Q> NULL, -- c51 +#Q> NULL, -- c52 +#Q> NULL, -- c53 +#Q> NULL, -- c54 +#Q> NULL, -- c55 +#Q> NULL, -- c56 +#Q> # +#Q> NULL, -- c57 +#Q> NULL, -- c58 +#Q> NULL, -- c59 +#Q> NULL, -- c60 +#Q> # +#Q> NULL, -- c61 +#Q> NULL, -- c62 +#Q> NULL, -- c63 +#Q> NULL, -- c64 +#Q> # +#Q> NULL, -- c65 +#Q> NULL, -- c66 +#Q> NULL, -- c67 +#Q> NULL, -- c68 +#Q> NULL, -- c69 +#Q> NULL, -- c70 +#Q> NULL, -- c71 +#Q> NULL, -- c72 +#Q> NULL, -- c73 +#Q> NULL, -- c74 +#Q> NULL, -- c75 +#Q> NULL, -- c76 +#Q> # +#Q> NULL, -- c77 +#Q> NULL, -- c78 +#Q> # +#Q> 3 -- crn -- row number +#Q> ), ( +#Q> b'1', -- c01 +#Q> b'1111111111111111111111111111111111111111111111111111111111111111', -- c02 +#Q> 127, -- c03 +#Q> 0, -- c04 +#Q> 001, -- c05 +#Q> true, -- c06 +#Q> 32767, -- c07 +#Q> 0, -- c08 +#Q> 00001, -- c09 +#Q> 8388607, -- c10 +#Q> 0, -- c11 +#Q> 00000001, -- c12 +#Q> 2147483647, -- c13 +#Q> 0, -- c14 +#Q> 0000000001, -- c15 +#Q> 9223372036854775807, -- c16 +#Q> 0, -- c17 +#Q> 00000000000000000001, -- c18 +#Q> -1.175494351E-38, -- c19 +#Q> 1.175494351E-38, -- c20 +#Q> 000000000000001, -- c21 +#Q> -2.2250738585072E-308, -- c22 +#Q> 2.2250738585072E-308, -- c23 +#Q> 00000000000000000000001, -- c24 +#Q> -9999999999, -- c25 +#Q> 9999999999, -- c26 +#Q> 0000000001, -- c27 +#Q> # +#Q> '2008-08-04', -- c28 +#Q> '2008-08-04 16:18:06', -- c29 +#Q> '2008-08-04 16:18:24', -- c30 +#Q> '16:18:47', -- c31 +#Q> '2008', -- c32 +#Q> # +#Q> 'a', -- c33 +#Q> '', -- c34 +#Q> 'e', -- c35 +#Q> REPEAT('i',255), -- c36 +#Q> _utf8 x'c3a4', -- c37 +#Q> '', -- c38 +#Q> _utf8 x'c3b6', -- c39 +#Q> REPEAT(_utf8 x'c3bc',255), -- c40 +#Q> _ucs2 x'00e4', -- c41 +#Q> '', -- c42 +#Q> _ucs2 x'00f6', -- c43 +#Q> REPEAT(_ucs2 x'00fc',255), -- c44 +#Q> # +#Q> '', -- c45 +#Q> 'a', -- c46 +#Q> REPEAT('e',255), -- c47 +#Q> REPEAT('i',261), -- c48 +#Q> '', -- c49 +#Q> _utf8 x'c3a4', -- c50 +#Q> REPEAT(_utf8 x'c3b6',255), -- c51 +#Q> REPEAT(_utf8 x'c3bc',261), -- c52 +#Q> '', -- c53 +#Q> _ucs2 x'00e4', -- c54 +#Q> REPEAT(_ucs2 x'00f6',255), -- c55 +#Q> REPEAT(_ucs2 x'00fc',261), -- c56 +#Q> # +#Q> '0', -- c57 +#Q> '', -- c58 +#Q> '1', -- c59 +#Q> REPEAT('1',255), -- c60 +#Q> # +#Q> '', -- c61 +#Q> 'b', -- c62 +#Q> REPEAT('c',255), -- c63 +#Q> REPEAT('\'',261), -- c64 +#Q> # +#Q> 'tinyblob', -- c65 +#Q> 'tinytext', -- c66 +#Q> 'tinytext-ucs2', -- c67 +#Q> 'blob', -- c68 +#Q> 'text', -- c69 +#Q> 'text-ucs2', -- c70 +#Q> 'mediumblob', -- c71 +#Q> 'mediumtext', -- c72 +#Q> 'mediumtext-ucs2', -- c73 +#Q> 'longblob', -- c74 +#Q> 'longtext', -- c75 +#Q> 'longtext #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # -# at # -#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET @@ -2740,6 +3087,172 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET +#Q> c01 = b'1', +#Q> c02 = b'1111111111111111111111111111111111111111111111111111111111111111', +#Q> c03 = 127, +#Q> c04 = 255, +#Q> c05 = 255, +#Q> c06 = true, +#Q> c07 = 32767, +#Q> c08 = 65535, +#Q> c09 = 65535, +#Q> c10 = 8388607, +#Q> c11 = 16777215, +#Q> c12 = 16777215, +#Q> c13 = 2147483647, +#Q> c14 = 4294967295, +#Q> c15 = 4294967295, +#Q> c16 = 9223372036854775807, +#Q> c17 = 18446744073709551615, +#Q> c18 = 18446744073709551615, +#Q> c19 = 3.402823466E+38, +#Q> c20 = 3.402823466E+38, +#Q> c21 = 3.402823466E+38, +#Q> c22 = 1.7976931348623E+308, +#Q> c23 = 1.7976931348623E+308, +#Q> c24 = 1.7976931348623E+308, +#Q> c25 = 9999999999, +#Q> c26 = 9999999999, +#Q> c27 = 9999999999, +#Q> # +#Q> c28 = '9999-12-31', +#Q> c29 = '9999-12-31 23:59:59', +#Q> c30 = '2038-01-08 03:14:07', +#Q> c31 = '838:59:59', +#Q> c32 = '2155', +#Q> # +#Q> c33 = x'ff', +#Q> c34 = '', +#Q> c35 = x'ff', +#Q> c36 = REPEAT(x'ff',255), +#Q> c37 = _utf8 x'efbfbf', +#Q> c38 = '', +#Q> c39 = _utf8 x'efbfbf', +#Q> c40 = REPEAT(_utf8 x'efbfbf',255), +#Q> c41 = _ucs2 x'ffff', +#Q> c42 = '', +#Q> c43 = _ucs2 x'ffff', +#Q> c44 = REPEAT(_ucs2 x'ffff',255), +#Q> # +#Q> c45 = '', +#Q> c46 = x'ff', +#Q> c47 = REPEAT(x'ff',255), +#Q> c48 = REPEAT(x'ff',261), +#Q> c49 = '', +#Q> c50 = _utf8 x'efbfbf', +#Q> c51 = REPEAT(_utf8 x'efbfbf',255), +#Q> c52 = REPEAT(_utf8 x'efbfbf',261), +#Q> c53 = '', +#Q> c54 = _ucs2 x'ffff', +#Q> c55 = REPEAT(_ucs2 x'ffff',255), +#Q> c56 = REPEAT(_ucs2 x'ffff',261), +#Q> # +#Q> c57 = x'ff', +#Q> c58 = '', +#Q> c59 = x'ff', +#Q> c60 = REPEAT(x'ff',255), +#Q> # +#Q> c61 = '', +#Q> c62 = x'ff', +#Q> c63 = REPEAT(x'ff',255), +#Q> c64 = REPEAT(x'ff',261), +#Q> # +#Q> c65 = 'tinyblob', +#Q> c66 = 'tinytext', +#Q> c67 = 'tinytext-ucs2', +#Q> c68 = 'blob', +#Q> c69 = 'text', +#Q> c70 = 'text-ucs2', +#Q> c71 = 'mediumblob', +#Q> c72 = 'mediumtext', +#Q> c73 = 'mediumtext-ucs2', +#Q> c74 = 'longblob', +#Q> c75 = 'longtext', +#Q> c76 = 'longtext-ucs2', +#Q> # +#Q> c77 = 'c', +#Q> c78 = 'a,b,c', +#Q> # +#Q> crn = crn +#Q> # +#Q> WHERE +#Q> # +#Q> c01 = b'0' AND +#Q> c02 = b'0000000000000000000000000000000000000000000000000000000000000000' AND +#Q> c03 = -128 AND +#Q> c04 = 0 AND +#Q> c05 = 000 AND +#Q> c06 = false AND +#Q> c07 = -32768 AND +#Q> c08 = 0 AND +#Q> c09 = 00000 AND +#Q> c10 = -8388608 AND +#Q> c11 = 0 AND +#Q> c12 = 00000000 AND +#Q> c13 = -2147483648 AND +#Q> c14 = 0 AND +#Q> c15 = 0000000000 AND +#Q> c16 = -9223372036854775808 AND +#Q> c17 = 0 AND +#Q> c18 = 00000000000000000000 AND +#Q> c19 < -3.402823465E+38 AND +#Q> c20 < 1.175494352E-38 AND +#Q> c21 = 000000000000 AND +#Q> c22 < -1.7976931348622E+308 AND +#Q> c23 < 2.2250738585073E-308 AND +#Q> c24 = 0000000000000000000000 AND +#Q> c25 = -9999999999 AND +#Q> c26 = 0 AND +#Q> c27 = 0000000000 AND +#Q> # +#Q> c28 = '1000-01-01' AND +#Q> c29 = '1000-01-01 00:00:00' AND +#Q> c30 = '1970-01-02 00:00:01' AND +#Q> c31 = '-838:59:59' AND +#Q> c32 = '1901' AND +#Q> # +#Q> c33 = '' AND +#Q> c34 = '' AND +#Q> c35 = '' AND +#Q> c36 = '' AND +#Q> c37 = '' AND +#Q> c38 = '' AND +#Q> c39 = '' AND +#Q> c40 = '' AND +#Q> c41 = '' AND +#Q> c42 = '' AND +#Q> c43 = '' AND +#Q> c44 = '' AND +#Q> # +#Q> c45 = '' AND +#Q> c46 = '' AND +#Q> c47 = '' AND +#Q> c48 = '' AND +#Q> c49 = '' AND +#Q> c50 = '' AND +#Q> c51 = '' AND +#Q> c52 = '' AND +#Q> c53 = '' AND +#Q> c54 = '' AND +#Q> c55 = '' AND +#Q> c56 = '' AND +#Q> # +#Q> # this does not reproduce the inserted value: c57 = '' AND +#Q> c58 = '' AND +#Q> # this does not reproduce the inserted value: c59 = '' AND +#Q> # this does not reproduce the inserted value: c60 = '' AND +#Q> # +#Q> c61 = '' AND +#Q> c62 = '' AND +#Q> c63 = '' AND +#Q> c64 = '' AND +#Q> # +#Q> c65 = '' AND +#Q> c66 = '' AND +#Q> c67 = #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -2915,6 +3428,177 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET +#Q> c01 = b'0', +#Q> c02 = b'0000000000000000000000000000000000000000000000000000000000000000', +#Q> c03 = -128, +#Q> c04 = 0, +#Q> c05 = 000, +#Q> c06 = false, +#Q> c07 = -32768, +#Q> c08 = 0, +#Q> c09 = 00000, +#Q> c10 = -8388608, +#Q> c11 = 0, +#Q> c12 = 00000000, +#Q> c13 = -2147483648, +#Q> c14 = 0, +#Q> c15 = 0000000000, +#Q> c16 = -9223372036854775808, +#Q> c17 = 0, +#Q> c18 = 00000000000000000000, +#Q> c19 = -3.402823466E+38, +#Q> c20 = 1.175494351E-38, +#Q> c21 = 000000000000, +#Q> c22 = -1.7976931348623E+308, +#Q> c23 = 2.2250738585072E-308, +#Q> c24 = 0000000000000000000000, +#Q> c25 = -9999999999, +#Q> c26 = 0, +#Q> c27 = 0000000000, +#Q> # +#Q> c28 = '1000-01-01', +#Q> c29 = '1000-01-01 00:00:00', +#Q> c30 = '1970-01-02 00:00:01', +#Q> c31 = '-838:59:59', +#Q> c32 = '1901', +#Q> # +#Q> c33 = '', +#Q> c34 = '', +#Q> c35 = '', +#Q> c36 = '', +#Q> c37 = '', +#Q> c38 = '', +#Q> c39 = '', +#Q> c40 = '', +#Q> c41 = '', +#Q> c42 = '', +#Q> c43 = '', +#Q> c44 = '', +#Q> # +#Q> c45 = '', +#Q> c46 = '', +#Q> c47 = '', +#Q> c48 = '', +#Q> c49 = '', +#Q> c50 = '', +#Q> c51 = '', +#Q> c52 = '', +#Q> c53 = '', +#Q> c54 = '', +#Q> c55 = '', +#Q> c56 = '', +#Q> # +#Q> c57 = '', +#Q> c58 = '', +#Q> c59 = '', +#Q> c60 = '', +#Q> # +#Q> c61 = '', +#Q> c62 = '', +#Q> c63 = '', +#Q> c64 = '', +#Q> # +#Q> c65 = '', +#Q> c66 = '', +#Q> c67 = '', +#Q> c68 = '', +#Q> c69 = '', +#Q> c70 = '', +#Q> c71 = '', +#Q> c72 = '', +#Q> c73 = '', +#Q> c74 = '', +#Q> c75 = '', +#Q> c76 = '', +#Q> # +#Q> c77 = 'a', +#Q> c78 = '', +#Q> # +#Q> crn = crn +#Q> # +#Q> WHERE +#Q> # +#Q> c01 = b'1' AND +#Q> # the below does not reproduce the inserted value: +#Q> #c02 = b'1111111111111111111111111111111111111111111111111111111111111111' AND +#Q> c03 = 127 AND +#Q> c04 = 255 AND +#Q> c05 = 255 AND +#Q> c06 = true AND +#Q> c07 = 32767 AND +#Q> c08 = 65535 AND +#Q> c09 = 65535 AND +#Q> c10 = 8388607 AND +#Q> c11 = 16777215 AND +#Q> c12 = 16777215 AND +#Q> c13 = 2147483647 AND +#Q> c14 = 4294967295 AND +#Q> c15 = 4294967295 AND +#Q> c16 = 9223372036854775807 AND +#Q> c17 = 18446744073709551615 AND +#Q> c18 = 18446744073709551615 AND +#Q> c19 > 3.402823465E+38 AND +#Q> c20 > 3.402823465E+38 AND +#Q> c21 > 3.402823465E+38 AND +#Q> c22 > 1.7976931348622E+308 AND +#Q> c23 > 1.7976931348622E+308 AND +#Q> c24 > 1.7976931348622E+308 AND +#Q> c25 = 9999999999 AND +#Q> c26 = 9999999999 AND +#Q> c27 = 9999999999 AND +#Q> # +#Q> c28 = '9999-12-31' AND +#Q> c29 = '9999-12-31 23:59:59' AND +#Q> c30 = '2038-01-08 03:14:07' AND +#Q> c31 = '838:59:59' AND +#Q> c32 = '2155' AND +#Q> # +#Q> c33 = x'ff' AND +#Q> c34 = '' AND +#Q> c35 = x'ff' AND +#Q> c36 = REPEAT(x'ff',255) AND +#Q> c37 = _utf8 x'efbfbf' AND +#Q> c38 = '' AND +#Q> c39 = _utf8 x'efbfbf' AND +#Q> c40 = REPEAT(_utf8 x'efbfbf',255) AND +#Q> c41 = _ucs2 x'ffff' AND +#Q> c42 = '' AND +#Q> c43 = _ucs2 x'ffff' AND +#Q> c44 = REPEAT(_ucs2 x'ffff',255) AND +#Q> # +#Q> c45 = '' AND +#Q> c46 = x'ff' AND +#Q> c47 = REPEAT(x'ff',255) AND +#Q> c48 = REPEAT(x'ff',261) AND +#Q> c49 = '' AND +#Q> c50 = _utf8 x'efbfbf' AND +#Q> c51 = REPEAT(_utf8 x'efbfbf',255) AND +#Q> c52 = REPEAT(_utf8 x'efbfbf',261) AND +#Q> c53 = '' AND +#Q> c54 = _ucs2 x'ffff' AND +#Q> c55 = REPEAT(_ucs2 x'ffff',255) AND +#Q> c56 = REPEAT(_ucs2 x'ffff',261) AND +#Q> # +#Q> c57 = x'ff' AND +#Q> c58 = '' AND +#Q> c59 = x'ff' AND +#Q> c60 = REPEAT(x'ff',255) AND +#Q> # +#Q> c61 = '' AND +#Q> c62 = x'ff' AND +#Q> c63 = REPEAT(x'ff',255) AND +#Q> c64 = REPEAT(x'ff',261) AND +#Q> # +#Q> c65 = 'tinyblob' AND +#Q> c66 = 'tinytext' AND +#Q> c67 = 'tinytext-ucs2' AND +#Q> c68 = 'blob' AND +#Q> c69 = 'text' AND +#Q> c70 = 'text-ucs2' AND +#Q> c71 = 'mediumblob #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -3090,6 +3774,175 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET +#Q> c01 = b'1', +#Q> c02 = b'1111111111111111111111111111111111111111111111111111111111111111', +#Q> c03 = 127, +#Q> c04 = 0, +#Q> c05 = 001, +#Q> c06 = true, +#Q> c07 = 32767, +#Q> c08 = 0, +#Q> c09 = 00001, +#Q> c10 = 8388607, +#Q> c11 = 0, +#Q> c12 = 00000001, +#Q> c13 = 2147483647, +#Q> c14 = 0, +#Q> c15 = 0000000001, +#Q> c16 = 9223372036854775807, +#Q> c17 = 0, +#Q> c18 = 00000000000000000001, +#Q> c19 = -1.175494351E-38, +#Q> c20 = 1.175494351E-38, +#Q> c21 = 000000000000001, +#Q> c22 = -2.2250738585072E-308, +#Q> c23 = 2.2250738585072E-308, +#Q> c24 = 00000000000000000000001, +#Q> c25 = -9999999999, +#Q> c26 = 9999999999, +#Q> c27 = 0000000001, +#Q> # +#Q> c28 = '2008-08-04', +#Q> c29 = '2008-08-04 16:18:06', +#Q> c30 = '2008-08-04 16:18:24', +#Q> c31 = '16:18:47', +#Q> c32 = '2008', +#Q> # +#Q> c33 = 'a', +#Q> c34 = '', +#Q> c35 = 'e', +#Q> c36 = REPEAT('i',255), +#Q> c37 = _utf8 x'c3a4', +#Q> c38 = '', +#Q> c39 = _utf8 x'c3b6', +#Q> c40 = REPEAT(_utf8 x'c3bc',255), +#Q> c41 = _ucs2 x'00e4', +#Q> c42 = '', +#Q> c43 = _ucs2 x'00f6', +#Q> c44 = REPEAT(_ucs2 x'00fc',255), +#Q> # +#Q> c45 = '', +#Q> c46 = 'a', +#Q> c47 = REPEAT('e',255), +#Q> c48 = REPEAT('i',261), +#Q> c49 = '', +#Q> c50 = _utf8 x'c3a4', +#Q> c51 = REPEAT(_utf8 x'c3b6',255), +#Q> c52 = REPEAT(_utf8 x'c3bc',261), +#Q> c53 = '', +#Q> c54 = _ucs2 x'00e4', +#Q> c55 = REPEAT(_ucs2 x'00f6',255), +#Q> c56 = REPEAT(_ucs2 x'00fc',261), +#Q> # +#Q> c57 = '0', +#Q> c58 = '', +#Q> c59 = '1', +#Q> c60 = REPEAT('1',255), +#Q> # +#Q> c61 = '', +#Q> c62 = 'b', +#Q> c63 = REPEAT('c',255), +#Q> c64 = REPEAT('\'',261), +#Q> # +#Q> c65 = 'tinyblob', +#Q> c66 = 'tinytext', +#Q> c67 = 'tinytext-ucs2', +#Q> c68 = 'blob', +#Q> c69 = 'text', +#Q> c70 = 'text-ucs2', +#Q> c71 = 'mediumblob', +#Q> c72 = 'mediumtext', +#Q> c73 = 'mediumtext-ucs2', +#Q> c74 = 'longblob', +#Q> c75 = 'longtext', +#Q> c76 = 'longtext-ucs2', +#Q> # +#Q> c77 = 'b', +#Q> c78 = 'b,c', +#Q> # +#Q> crn = crn +#Q> # +#Q> WHERE +#Q> # +#Q> c01 IS NULL AND +#Q> c02 IS NULL AND +#Q> c03 IS NULL AND +#Q> c04 IS NULL AND +#Q> c05 IS NULL AND +#Q> c06 IS NULL AND +#Q> c07 IS NULL AND +#Q> c08 IS NULL AND +#Q> c09 IS NULL AND +#Q> c10 IS NULL AND +#Q> c11 IS NULL AND +#Q> c12 IS NULL AND +#Q> c13 IS NULL AND +#Q> c14 IS NULL AND +#Q> c15 IS NULL AND +#Q> c16 IS NULL AND +#Q> c17 IS NULL AND +#Q> c18 IS NULL AND +#Q> c19 IS NULL AND +#Q> c20 IS NULL AND +#Q> c21 IS NULL AND +#Q> c22 IS NULL AND +#Q> c23 IS NULL AND +#Q> c24 IS NULL AND +#Q> c25 IS NULL AND +#Q> c26 IS NULL AND +#Q> c27 IS NULL AND +#Q> # +#Q> c28 IS NULL AND +#Q> c29 IS NULL AND +#Q> # this got a timestamp instead of NULL: c30 IS NULL AND +#Q> c31 IS NULL AND +#Q> c32 IS NULL AND +#Q> # +#Q> c33 IS NULL AND +#Q> c34 IS NULL AND +#Q> c35 IS NULL AND +#Q> c36 IS NULL AND +#Q> c37 IS NULL AND +#Q> c38 IS NULL AND +#Q> c39 IS NULL AND +#Q> c40 IS NULL AND +#Q> c41 IS NULL AND +#Q> c42 IS NULL AND +#Q> c43 IS NULL AND +#Q> c44 IS NULL AND +#Q> # +#Q> c45 IS NULL AND +#Q> c46 IS NULL AND +#Q> c47 IS NULL AND +#Q> c48 IS NULL AND +#Q> c49 IS NULL AND +#Q> c50 IS NULL AND +#Q> c51 IS NULL AND +#Q> c52 IS NULL AND +#Q> c53 IS NULL AND +#Q> c54 IS NULL AND +#Q> c55 IS NULL AND +#Q> c56 IS NULL AND +#Q> # +#Q> c57 IS NULL AND +#Q> c58 IS NULL AND +#Q> c59 IS NULL AND +#Q> c60 IS NULL AND +#Q> # +#Q> c61 IS NULL AND +#Q> c62 IS NULL AND +#Q> c63 IS NULL AND +#Q> c64 IS NULL AND +#Q> # +#Q> c65 IS NULL AND +#Q> c66 IS NULL AND +#Q> c67 IS NULL AND +#Q> c68 IS NULL AND +#Q> c69 IS NULL AND +#Q> c70 IS NULL #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -3265,6 +4118,178 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET +#Q> c01 = NULL, +#Q> c02 = NULL, +#Q> c03 = NULL, +#Q> c04 = NULL, +#Q> c05 = NULL, +#Q> c06 = NULL, +#Q> c07 = NULL, +#Q> c08 = NULL, +#Q> c09 = NULL, +#Q> c10 = NULL, +#Q> c11 = NULL, +#Q> c12 = NULL, +#Q> c13 = NULL, +#Q> c14 = NULL, +#Q> c15 = NULL, +#Q> c16 = NULL, +#Q> c17 = NULL, +#Q> c18 = NULL, +#Q> c19 = NULL, +#Q> c20 = NULL, +#Q> c21 = NULL, +#Q> c22 = NULL, +#Q> c23 = NULL, +#Q> c24 = NULL, +#Q> c25 = NULL, +#Q> c26 = NULL, +#Q> c27 = NULL, +#Q> # +#Q> c28 = NULL, +#Q> c29 = NULL, +#Q> c30 = NULL, +#Q> c31 = NULL, +#Q> c32 = NULL, +#Q> # +#Q> c33 = NULL, +#Q> c34 = NULL, +#Q> c35 = NULL, +#Q> c36 = NULL, +#Q> c37 = NULL, +#Q> c38 = NULL, +#Q> c39 = NULL, +#Q> c40 = NULL, +#Q> c41 = NULL, +#Q> c42 = NULL, +#Q> c43 = NULL, +#Q> c44 = NULL, +#Q> # +#Q> c45 = NULL, +#Q> c46 = NULL, +#Q> c47 = NULL, +#Q> c48 = NULL, +#Q> c49 = NULL, +#Q> c50 = NULL, +#Q> c51 = NULL, +#Q> c52 = NULL, +#Q> c53 = NULL, +#Q> c54 = NULL, +#Q> c55 = NULL, +#Q> c56 = NULL, +#Q> # +#Q> c57 = NULL, +#Q> c58 = NULL, +#Q> c59 = NULL, +#Q> c60 = NULL, +#Q> # +#Q> c61 = NULL, +#Q> c62 = NULL, +#Q> c63 = NULL, +#Q> c64 = NULL, +#Q> # +#Q> c65 = NULL, +#Q> c66 = NULL, +#Q> c67 = NULL, +#Q> c68 = NULL, +#Q> c69 = NULL, +#Q> c70 = NULL, +#Q> c71 = NULL, +#Q> c72 = NULL, +#Q> c73 = NULL, +#Q> c74 = NULL, +#Q> c75 = NULL, +#Q> c76 = NULL, +#Q> # +#Q> c77 = NULL, +#Q> c78 = NULL, +#Q> # +#Q> crn = crn +#Q> # +#Q> WHERE +#Q> # +#Q> c01 = b'1' AND +#Q> # the below does not reproduce the inserted value: +#Q> #c02 = b'1111111111111111111111111111111111111111111111111111111111111111' AND +#Q> c03 = 127 AND +#Q> c04 = 0 AND +#Q> c05 = 001 AND +#Q> c06 = true AND +#Q> c07 = 32767 AND +#Q> c08 = 0 AND +#Q> c09 = 00001 AND +#Q> c10 = 8388607 AND +#Q> c11 = 0 AND +#Q> c12 = 00000001 AND +#Q> c13 = 2147483647 AND +#Q> c14 = 0 AND +#Q> c15 = 0000000001 AND +#Q> c16 = 9223372036854775807 AND +#Q> c17 = 0 AND +#Q> c18 = 00000000000000000001 AND +#Q> c19 > -1.175494352E-38 AND +#Q> c20 < 1.175494352E-38 AND +#Q> c21 = 000000000000001 AND +#Q> c22 > -2.2250738585073E-308 AND +#Q> c23 < 2.2250738585073E-308 AND +#Q> c24 = 00000000000000000000001 AND +#Q> c25 = -9999999999 AND +#Q> c26 = 9999999999 AND +#Q> c27 = 0000000001 AND +#Q> # +#Q> c28 = '2008-08-04' AND +#Q> c29 = '2008-08-04 16:18:06' AND +#Q> c30 = '2008-08-04 16:18:24' AND +#Q> c31 = '16:18:47' AND +#Q> c32 = '2008' AND +#Q> # +#Q> c33 = 'a' AND +#Q> c34 = '' AND +#Q> c35 = 'e' AND +#Q> c36 = REPEAT('i',255) AND +#Q> c37 = _utf8 x'c3a4' AND +#Q> c38 = '' AND +#Q> c39 = _utf8 x'c3b6' AND +#Q> c40 = REPEAT(_utf8 x'c3bc',255) AND +#Q> c41 = _ucs2 x'00e4' AND +#Q> c42 = '' AND +#Q> c43 = _ucs2 x'00f6' AND +#Q> c44 = REPEAT(_ucs2 x'00fc',255) AND +#Q> # +#Q> c45 = '' AND +#Q> c46 = 'a' AND +#Q> c47 = REPEAT('e',255) AND +#Q> c48 = REPEAT('i',261) AND +#Q> c49 = '' AND +#Q> c50 = _utf8 x'c3a4' AND +#Q> c51 = REPEAT(_utf8 x'c3b6',255) AND +#Q> c52 = REPEAT(_utf8 x'c3bc',261) AND +#Q> c53 = '' AND +#Q> c54 = _ucs2 x'00e4' AND +#Q> c55 = REPEAT(_ucs2 x'00f6',255) AND +#Q> c56 = REPEAT(_ucs2 x'00fc',261) AND +#Q> # +#Q> c57 = '0' AND +#Q> c58 = '' AND +#Q> c59 = '1' AND +#Q> c60 = REPEAT('1',255) AND +#Q> # +#Q> c61 = '' AND +#Q> c62 = 'b' AND +#Q> c63 = REPEAT('c',255) AND +#Q> c64 = REPEAT('\'',261) AND +#Q> # +#Q> c65 = 'tinyblob' AND +#Q> c66 = 'tinytext' AND +#Q> c67 = 'tinytext-ucs2' AND +#Q> c68 = 'blob' AND +#Q> c69 = 'text' AND +#Q> c70 = 'text-ucs2' AND +#Q> c71 = 'mediumblob' AND +#Q> c72 = 'me #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -3440,6 +4465,92 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE +#Q> # +#Q> c01 = b'1' AND +#Q> # the below does not reproduce the inserted value: +#Q> #c02 = b'1111111111111111111111111111111111111111111111111111111111111111' AND +#Q> c03 = 127 AND +#Q> c04 = 255 AND +#Q> c05 = 255 AND +#Q> c06 = true AND +#Q> c07 = 32767 AND +#Q> c08 = 65535 AND +#Q> c09 = 65535 AND +#Q> c10 = 8388607 AND +#Q> c11 = 16777215 AND +#Q> c12 = 16777215 AND +#Q> c13 = 2147483647 AND +#Q> c14 = 4294967295 AND +#Q> c15 = 4294967295 AND +#Q> c16 = 9223372036854775807 AND +#Q> c17 = 18446744073709551615 AND +#Q> c18 = 18446744073709551615 AND +#Q> c19 > 3.402823465E+38 AND +#Q> c20 > 3.402823465E+38 AND +#Q> c21 > 3.402823465E+38 AND +#Q> c22 > 1.7976931348622E+308 AND +#Q> c23 > 1.7976931348622E+308 AND +#Q> c24 > 1.7976931348622E+308 AND +#Q> c25 = 9999999999 AND +#Q> c26 = 9999999999 AND +#Q> c27 = 9999999999 AND +#Q> # +#Q> c28 = '9999-12-31' AND +#Q> c29 = '9999-12-31 23:59:59' AND +#Q> c30 = '2038-01-08 03:14:07' AND +#Q> c31 = '838:59:59' AND +#Q> c32 = '2155' AND +#Q> # +#Q> c33 = x'ff' AND +#Q> c34 = '' AND +#Q> c35 = x'ff' AND +#Q> c36 = REPEAT(x'ff',255) AND +#Q> c37 = _utf8 x'efbfbf' AND +#Q> c38 = '' AND +#Q> c39 = _utf8 x'efbfbf' AND +#Q> c40 = REPEAT(_utf8 x'efbfbf',255) AND +#Q> c41 = _ucs2 x'ffff' AND +#Q> c42 = '' AND +#Q> c43 = _ucs2 x'ffff' AND +#Q> c44 = REPEAT(_ucs2 x'ffff',255) AND +#Q> # +#Q> c45 = '' AND +#Q> c46 = x'ff' AND +#Q> c47 = REPEAT(x'ff',255) AND +#Q> c48 = REPEAT(x'ff',261) AND +#Q> c49 = '' AND +#Q> c50 = _utf8 x'efbfbf' AND +#Q> c51 = REPEAT(_utf8 x'efbfbf',255) AND +#Q> c52 = REPEAT(_utf8 x'efbfbf',261) AND +#Q> c53 = '' AND +#Q> c54 = _ucs2 x'ffff' AND +#Q> c55 = REPEAT(_ucs2 x'ffff',255) AND +#Q> c56 = REPEAT(_ucs2 x'ffff',261) AND +#Q> # +#Q> c57 = x'ff' AND +#Q> c58 = '' AND +#Q> c59 = x'ff' AND +#Q> c60 = REPEAT(x'ff',255) AND +#Q> # +#Q> c61 = '' AND +#Q> c62 = x'ff' AND +#Q> c63 = REPEAT(x'ff',255) AND +#Q> c64 = REPEAT(x'ff',261) AND +#Q> # +#Q> c65 = 'tinyblob' AND +#Q> c66 = 'tinytext' AND +#Q> c67 = 'tinytext-ucs2' AND +#Q> c68 = 'blob' AND +#Q> c69 = 'text' AND +#Q> c70 = 'text-ucs2' AND +#Q> c71 = 'mediumblob' AND +#Q> c72 = 'mediumtext' AND +#Q> c73 = 'mediumtext-ucs2' AND +#Q> c74 = 'longblob' AND +#Q> c75 = ' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3535,6 +4646,89 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE +#Q> # +#Q> c01 = b'0' AND +#Q> c02 = b'0000000000000000000000000000000000000000000000000000000000000000' AND +#Q> c03 = -128 AND +#Q> c04 = 0 AND +#Q> c05 = 000 AND +#Q> c06 = false AND +#Q> c07 = -32768 AND +#Q> c08 = 0 AND +#Q> c09 = 00000 AND +#Q> c10 = -8388608 AND +#Q> c11 = 0 AND +#Q> c12 = 00000000 AND +#Q> c13 = -2147483648 AND +#Q> c14 = 0 AND +#Q> c15 = 0000000000 AND +#Q> c16 = -9223372036854775808 AND +#Q> c17 = 0 AND +#Q> c18 = 00000000000000000000 AND +#Q> c19 < -3.402823465E+38 AND +#Q> c20 < 1.175494352E-38 AND +#Q> c21 = 000000000000 AND +#Q> c22 < -1.7976931348622E+308 AND +#Q> c23 < 2.2250738585073E-308 AND +#Q> c24 = 0000000000000000000000 AND +#Q> c25 = -9999999999 AND +#Q> c26 = 0 AND +#Q> c27 = 0000000000 AND +#Q> # +#Q> c28 = '1000-01-01' AND +#Q> c29 = '1000-01-01 00:00:00' AND +#Q> c30 = '1970-01-02 00:00:01' AND +#Q> c31 = '-838:59:59' AND +#Q> c32 = '1901' AND +#Q> # +#Q> c33 = '' AND +#Q> c34 = '' AND +#Q> c35 = '' AND +#Q> c36 = '' AND +#Q> c37 = '' AND +#Q> c38 = '' AND +#Q> c39 = '' AND +#Q> c40 = '' AND +#Q> c41 = '' AND +#Q> c42 = '' AND +#Q> c43 = '' AND +#Q> c44 = '' AND +#Q> # +#Q> c45 = '' AND +#Q> c46 = '' AND +#Q> c47 = '' AND +#Q> c48 = '' AND +#Q> c49 = '' AND +#Q> c50 = '' AND +#Q> c51 = '' AND +#Q> c52 = '' AND +#Q> c53 = '' AND +#Q> c54 = '' AND +#Q> c55 = '' AND +#Q> c56 = '' AND +#Q> # +#Q> # this does not reproduce the inserted value: c57 = '' AND +#Q> c58 = '' AND +#Q> # this does not reproduce the inserted value: c59 = '' AND +#Q> # this does not reproduce the inserted value: c60 = '' AND +#Q> # +#Q> c61 = '' AND +#Q> c62 = '' AND +#Q> c63 = '' AND +#Q> c64 = '' AND +#Q> # +#Q> c65 = '' AND +#Q> c66 = '' AND +#Q> c67 = '' AND +#Q> c68 = '' AND +#Q> c69 = '' AND +#Q> c70 = '' AND +#Q> c71 = '' AND +#Q> c72 = '' AND +#Q> c73 = '' A #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3630,6 +4824,92 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE +#Q> # +#Q> c01 = b'1' AND +#Q> # the below does not reproduce the inserted value: +#Q> #c02 = b'1111111111111111111111111111111111111111111111111111111111111111' AND +#Q> c03 = 127 AND +#Q> c04 = 0 AND +#Q> c05 = 001 AND +#Q> c06 = true AND +#Q> c07 = 32767 AND +#Q> c08 = 0 AND +#Q> c09 = 00001 AND +#Q> c10 = 8388607 AND +#Q> c11 = 0 AND +#Q> c12 = 00000001 AND +#Q> c13 = 2147483647 AND +#Q> c14 = 0 AND +#Q> c15 = 0000000001 AND +#Q> c16 = 9223372036854775807 AND +#Q> c17 = 0 AND +#Q> c18 = 00000000000000000001 AND +#Q> c19 > -1.175494352E-38 AND +#Q> c20 < 1.175494352E-38 AND +#Q> c21 = 000000000000001 AND +#Q> c22 > -2.2250738585073E-308 AND +#Q> c23 < 2.2250738585073E-308 AND +#Q> c24 = 00000000000000000000001 AND +#Q> c25 = -9999999999 AND +#Q> c26 = 9999999999 AND +#Q> c27 = 0000000001 AND +#Q> # +#Q> c28 = '2008-08-04' AND +#Q> c29 = '2008-08-04 16:18:06' AND +#Q> c30 = '2008-08-04 16:18:24' AND +#Q> c31 = '16:18:47' AND +#Q> c32 = '2008' AND +#Q> # +#Q> c33 = 'a' AND +#Q> c34 = '' AND +#Q> c35 = 'e' AND +#Q> c36 = REPEAT('i',255) AND +#Q> c37 = _utf8 x'c3a4' AND +#Q> c38 = '' AND +#Q> c39 = _utf8 x'c3b6' AND +#Q> c40 = REPEAT(_utf8 x'c3bc',255) AND +#Q> c41 = _ucs2 x'00e4' AND +#Q> c42 = '' AND +#Q> c43 = _ucs2 x'00f6' AND +#Q> c44 = REPEAT(_ucs2 x'00fc',255) AND +#Q> # +#Q> c45 = '' AND +#Q> c46 = 'a' AND +#Q> c47 = REPEAT('e',255) AND +#Q> c48 = REPEAT('i',261) AND +#Q> c49 = '' AND +#Q> c50 = _utf8 x'c3a4' AND +#Q> c51 = REPEAT(_utf8 x'c3b6',255) AND +#Q> c52 = REPEAT(_utf8 x'c3bc',261) AND +#Q> c53 = '' AND +#Q> c54 = _ucs2 x'00e4' AND +#Q> c55 = REPEAT(_ucs2 x'00f6',255) AND +#Q> c56 = REPEAT(_ucs2 x'00fc',261) AND +#Q> # +#Q> c57 = '0' AND +#Q> c58 = '' AND +#Q> c59 = '1' AND +#Q> c60 = REPEAT('1',255) AND +#Q> # +#Q> c61 = '' AND +#Q> c62 = 'b' AND +#Q> c63 = REPEAT('c',255) AND +#Q> c64 = REPEAT('\'',261) AND +#Q> # +#Q> c65 = 'tinyblob' AND +#Q> c66 = 'tinytext' AND +#Q> c67 = 'tinytext-ucs2' AND +#Q> c68 = 'blob' AND +#Q> c69 = 'text' AND +#Q> c70 = 'text-ucs2' AND +#Q> c71 = 'mediumblob' AND +#Q> c72 = 'mediumtext' AND +#Q> c73 = 'mediumtext-ucs2' AND +#Q> c74 = 'longblob' AND +#Q> c75 = 'longtext' #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3725,6 +5005,90 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE +#Q> # +#Q> c01 IS NULL AND +#Q> c02 IS NULL AND +#Q> c03 IS NULL AND +#Q> c04 IS NULL AND +#Q> c05 IS NULL AND +#Q> c06 IS NULL AND +#Q> c07 IS NULL AND +#Q> c08 IS NULL AND +#Q> c09 IS NULL AND +#Q> c10 IS NULL AND +#Q> c11 IS NULL AND +#Q> c12 IS NULL AND +#Q> c13 IS NULL AND +#Q> c14 IS NULL AND +#Q> c15 IS NULL AND +#Q> c16 IS NULL AND +#Q> c17 IS NULL AND +#Q> c18 IS NULL AND +#Q> c19 IS NULL AND +#Q> c20 IS NULL AND +#Q> c21 IS NULL AND +#Q> c22 IS NULL AND +#Q> c23 IS NULL AND +#Q> c24 IS NULL AND +#Q> c25 IS NULL AND +#Q> c26 IS NULL AND +#Q> c27 IS NULL AND +#Q> # +#Q> c28 IS NULL AND +#Q> c29 IS NULL AND +#Q> # this got a timestamp instead of NULL: c30 IS NULL AND +#Q> c31 IS NULL AND +#Q> c32 IS NULL AND +#Q> # +#Q> c33 IS NULL AND +#Q> c34 IS NULL AND +#Q> c35 IS NULL AND +#Q> c36 IS NULL AND +#Q> c37 IS NULL AND +#Q> c38 IS NULL AND +#Q> c39 IS NULL AND +#Q> c40 IS NULL AND +#Q> c41 IS NULL AND +#Q> c42 IS NULL AND +#Q> c43 IS NULL AND +#Q> c44 IS NULL AND +#Q> # +#Q> c45 IS NULL AND +#Q> c46 IS NULL AND +#Q> c47 IS NULL AND +#Q> c48 IS NULL AND +#Q> c49 IS NULL AND +#Q> c50 IS NULL AND +#Q> c51 IS NULL AND +#Q> c52 IS NULL AND +#Q> c53 IS NULL AND +#Q> c54 IS NULL AND +#Q> c55 IS NULL AND +#Q> c56 IS NULL AND +#Q> # +#Q> c57 IS NULL AND +#Q> c58 IS NULL AND +#Q> c59 IS NULL AND +#Q> c60 IS NULL AND +#Q> # +#Q> c61 IS NULL AND +#Q> c62 IS NULL AND +#Q> c63 IS NULL AND +#Q> c64 IS NULL AND +#Q> # +#Q> c65 IS NULL AND +#Q> c66 IS NULL AND +#Q> c67 IS NULL AND +#Q> c68 IS NULL AND +#Q> c69 IS NULL AND +#Q> c70 IS NULL AND +#Q> c71 IS NULL AND +#Q> c72 IS NULL AND +#Q> c73 IS NULL AND +#Q> c74 IS NUL #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -3944,6 +5308,18 @@ crn INT -- row number BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES +#Q> ('2008-08-01','VARCHAR-01',1), +#Q> ('2008-08-02','VARCHAR-02',2), +#Q> ('2008-08-03','VARCHAR-03',3), +#Q> ('2008-08-04','VARCHAR-04',4), +#Q> ('2008-08-05','VARCHAR-05',5), +#Q> ('2008-08-06','VARCHAR-06',6), +#Q> ('2008-08-07','VARCHAR-07',7), +#Q> ('2008-08-08','VARCHAR-08',8), +#Q> ('2008-08-09','VARCH #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4003,6 +5379,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET c28 = ADDDATE(c28,10) WHERE crn < 8 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -4080,6 +5459,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE crn < 8 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -4353,6 +5735,18 @@ c_3_n INT -- row number BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES +#Q> ('2008-01-01','VARCHAR-01-01',11), +#Q> ('2008-01-02','VARCHAR-01-02',2), +#Q> ('2008-01-03','VARCHAR-01-03',3), +#Q> ('2008-01-04','VARCHAR-01-04',4), +#Q> ('2008-01-05','VARCHAR-01-05',5), +#Q> ('2008-01-06','VARCHAR-01-06',6), +#Q> ('2008-01-07','VARCHAR-01-07',7), +#Q> ('2008-01-08','VARCHAR-01-08',18), +#Q> ('2008-01-09','VARCHAR-0 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4412,6 +5806,18 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t2 VALUES +#Q> ('2008-02-01','VARCHAR-02-01',21), +#Q> ('2008-02-02','VARCHAR-02-02',2), +#Q> ('2008-02-03','VARCHAR-02-03',3), +#Q> ('2008-02-04','VARCHAR-02-04',4), +#Q> ('2008-02-05','VARCHAR-02-05',5), +#Q> ('2008-02-06','VARCHAR-02-06',6), +#Q> ('2008-02-07','VARCHAR-02-07',7), +#Q> ('2008-02-08','VARCHAR-02-08',28), +#Q> ('2008-02-09','VARCHAR-0 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4471,6 +5877,18 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t3 VALUES +#Q> ('2008-03-01','VARCHAR-03-01',31), +#Q> ('2008-03-02','VARCHAR-03-02',2), +#Q> ('2008-03-03','VARCHAR-03-03',3), +#Q> ('2008-03-04','VARCHAR-03-04',4), +#Q> ('2008-03-05','VARCHAR-03-05',5), +#Q> ('2008-03-06','VARCHAR-03-06',6), +#Q> ('2008-03-07','VARCHAR-03-07',7), +#Q> ('2008-03-08','VARCHAR-03-08',38), +#Q> ('2008-03-09','VARCHAR-0 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t3` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -4530,6 +5948,13 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1,t2,t3 SET +#Q> c_1_1 = ADDDATE(c_1_1,INTERVAL 10 YEAR), +#Q> c_2_1 = ADDDATE(c_2_1,INTERVAL 20 YEAR), +#Q> c_3_1 = ADDDATE(c_3_1,INTERVAL 30 YEAR) +#Q> WHERE c_1_n = c_2_n AND c_2_n = c #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # @@ -4714,6 +6139,10 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1,t2,t3 USING t1 INNER JOIN t2 INNER JOIN t3 +#Q> WHERE c_1_n = c_2_n AND c_2_n = c_3_ #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # @@ -4925,6 +6354,11 @@ c3 VARCHAR(60) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> LOAD DATA INFILE '../../std_data/loaddata5.dat' +#Q> INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY '' (c1,c2) +#Q> SET c3 = 'Wo #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result index 9d8de92efdf..c6c7684f4c8 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result @@ -147,7 +147,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -175,6 +175,9 @@ c2 VARCHAR(20) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (1,'varchar-1'), (2,'varchar-2'), (3,'varchar-3') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -191,6 +194,9 @@ BEGIN ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET c1 = c1 + 10 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -216,6 +222,9 @@ BEGIN ### @1=13 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c1 = 12 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -248,6 +257,9 @@ TRUNCATE TABLE t1 BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t2 VALUES (1,'varchar-1'), (2,'varchar-2'), (3,'varchar-3') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -274,6 +286,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t2 SET c1 = c1 + 10 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -309,6 +324,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t2 WHERE c1 = 12 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -327,6 +345,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (1,'varchar-1'), (2,'varchar-2'), (3,'varchar-3') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -343,6 +364,9 @@ BEGIN ### @1=3 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET c1 = c1 + 10 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -368,6 +392,9 @@ BEGIN ### @1=13 /* INT meta=0 nullable=1 is_null=0 */ ### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 WHERE c1 = 12 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -400,6 +427,9 @@ TRUNCATE TABLE t2 BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t2 VALUES (1,'varchar-1'), (2,'varchar-2'), (3,'varchar-3') #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -426,6 +456,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t2 SET c1 = c1 + 10 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F @@ -461,6 +494,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t2 WHERE c1 = 12 #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F diff --git a/mysql-test/suite/binlog/r/binlog_row_annotate.result b/mysql-test/suite/binlog/r/binlog_row_annotate.result index 3da1d9877f4..8a37200a2e3 100644 --- a/mysql-test/suite/binlog/r/binlog_row_annotate.result +++ b/mysql-test/suite/binlog/r/binlog_row_annotate.result @@ -49,6 +49,7 @@ master-bin.000001 # Query # # CREATE DATABASE test2 master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # CREATE DATABASE test3 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO test1.t1 VALUES (1), (2), (3) master-bin.000001 # Table_map # # table_id: # (test1.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -146,6 +147,9 @@ CREATE DATABASE test3 BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # Annotate_rows: +#Q> INSERT INTO test1.t1 VALUES (1), (2), (3) #010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F @@ -367,6 +371,9 @@ CREATE DATABASE test1 BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # Annotate_rows: +#Q> INSERT INTO test1.t1 VALUES (1), (2), (3) #010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F @@ -531,6 +538,7 @@ CREATE DATABASE test3 BEGIN /*!*/; # at # +# at # #010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F @@ -750,6 +758,9 @@ CREATE DATABASE test3 BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # Annotate_rows: +#Q> INSERT INTO test1.t1 VALUES (1), (2), (3) #010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F @@ -971,6 +982,9 @@ CREATE DATABASE test1 BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # Annotate_rows: +#Q> INSERT INTO test1.t1 VALUES (1), (2), (3) #010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index 25b6e7351a2..4068a80771c 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -15,10 +15,12 @@ master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=innodb master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert t1 values (5) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert t2 values (5) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -33,204 +35,304 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (n int) engine=innodb master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(100 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(99 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(98 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(97 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(96 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(95 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(94 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(93 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(92 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(91 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(90 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(89 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(88 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(87 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(86 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(85 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(84 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(83 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(82 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(81 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(80 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(79 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(78 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(77 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(76 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(75 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(74 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(73 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(72 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(71 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(70 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(69 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(68 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(67 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(66 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(65 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(64 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(63 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(62 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(61 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(60 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(59 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(58 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(57 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(56 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(55 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(54 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(53 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(52 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(51 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(50 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(49 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(48 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(47 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(46 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(45 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(44 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(43 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(42 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(41 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(40 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(39 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(38 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(37 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(36 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(35 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(34 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(33 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(32 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(31 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(30 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(29 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(28 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(27 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(26 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(25 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(24 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(23 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(22 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(21 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(20 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(19 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(18 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(17 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(16 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(15 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(14 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(13 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(12 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(11 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(10 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(9 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(8 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(7 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(6 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(5 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(4 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(3 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(2 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values(1 + 4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -255,10 +357,13 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1(n int) engine=innodb master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values (2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values (3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -282,204 +387,304 @@ master-bin.000001 # Query # # use `test`; create table t1 (a int, b char(255)) e master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; flush status master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values( 100, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 99, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 98, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 97, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 96, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 95, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 94, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 93, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 92, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 91, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 90, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 89, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 88, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 87, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 86, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 85, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 84, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 83, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 82, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 81, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 80, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 79, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 78, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 77, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 76, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 75, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 74, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 73, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 72, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 71, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 70, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 69, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 68, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 67, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 66, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 65, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 64, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 63, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 62, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 61, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 60, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 59, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 58, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 57, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 56, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 55, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 54, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 53, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 52, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 51, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 50, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 49, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 48, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 47, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 46, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 45, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 44, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 43, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 42, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 41, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 40, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 39, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 38, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 37, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 36, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 35, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 34, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 33, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 32, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 31, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 30, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 29, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 28, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 27, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 26, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 25, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 24, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 23, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 22, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 21, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 20, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 19, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 18, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 17, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 16, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 15, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 14, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 13, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 12, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 11, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 10, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 9, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 8, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 7, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 6, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 5, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 4, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 3, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 2, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t1 values( 1, 'just to fill void to make transaction occupying at least two buffers of the trans cache' ) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -501,6 +706,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (9999999999999999,14632475938453979136) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -637,7 +843,7 @@ create table if not exists t2 select * from t1; create temporary table tt1 (a int); create table if not exists t3 like tt1; USE mysql; -INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test'); +INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test'); UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'; DELETE FROM user WHERE host='localhost' AND user='@#@'; use test; @@ -646,6 +852,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(5) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -654,18 +861,22 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) engine=myisam master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(5),(null) /* Insert_id 128 */ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert ignore into t1 values (4),(null) /* Insert_id 128 */ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(3),(null) /* Insert_id 5 */ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert ignore into t1 values(2),(null) /* Insert_id 5 */ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -683,14 +894,17 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test') master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@' master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # DELETE FROM user WHERE host='localhost' AND user='@#@' master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -779,10 +993,15 @@ Log_name Pos Event_type Server_id End_log_pos Info # # Gtid 1 # GTID 0-1-1 # # Query 1 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) # # Gtid 1 # BEGIN GTID 0-1-2 +# # Annotate_rows 1 # INSERT INTO t1 VALUES (1) # # Table_map 1 # table_id: # (test.t1) # # Write_rows_v1 1 # table_id: # flags: STMT_END_F # # Query 1 # COMMIT # # Gtid 1 # BEGIN GTID 0-1-3 +# # Annotate_rows 1 # BINLOG ' +3u9kSBMUAAAAKQAAAJEBAAAAABoAAAAAAAAABHRlc3QAAnQxAAEDAAA= +3u9kSBcUAAAAIgAAALMBAAAQABoAAAAAAAEAAf/+AgAAAA== +' # # Table_map 1 # table_id: # (test.t1) # # Write_rows_v1 1 # table_id: # flags: STMT_END_F # # Query 1 # COMMIT diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result b/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result index 346b7a58179..f4f9753828b 100644 --- a/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result @@ -58,7 +58,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -11499,30 +11499,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; SET collation_connection='cp932_bin'; create table t1 select repeat('a',4000) a; @@ -11606,30 +11594,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; create table t2 (a char(1)); insert into t2 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'); @@ -11649,14 +11625,14 @@ drop table t1; drop table t2; create table t1 (col1 varchar(1)) character set cp932; insert into t1 values ('a'); -insert into t1 values ('ab'); +insert ignore into t1 values ('ab'); Warnings: Warning 1265 Data truncated for column 'col1' at row 1 select * from t1; col1 a a -insert into t1 values ('abc'); +insert ignore into t1 values ('abc'); Warnings: Warning 1265 Data truncated for column 'col1' at row 1 select * from t1; diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result index 9a2fbfb9d6e..da51ec1e3b6 100644 --- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result @@ -6,6 +6,7 @@ insert into t2 values (@v); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2 values (@v) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -20,7 +21,7 @@ BEGIN SET TIMESTAMP=10000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -71,26 +72,26 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 700101 6:46:40 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created YYMMDD HH:MM:SS # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Gtid list [#-#-#] +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Gtid list [#-#-#] # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000002 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000002 # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000003 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000003 # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# ddl +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# ddl /*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=#*//*!*/; /*!100001 SET @@session.server_id=#*//*!*/; /*!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; SET TIMESTAMP=XXX/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/; @@ -99,117 +100,135 @@ SET @@session.collation_database=DEFAULT/*!*/; CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8) /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; BEGIN /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('ä(i1)') +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +# at # +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1='ä(i1)' /* VARSTRING(30) meta=30 nullable=1 is_null=0 */ # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; BEGIN /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('ä(i2)') +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +# at # +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1='ä(i2)' /* VARSTRING(30) meta=30 nullable=1 is_null=0 */ # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; BEGIN /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('ä(i3)') +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +# at # +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1='ä(i3)' /* VARSTRING(30) meta=30 nullable=1 is_null=0 */ # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; BEGIN /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('ä(p1)') +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +# at # +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1='ä(p1)' /* VARSTRING(30) meta=30 nullable=1 is_null=0 */ # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; BEGIN /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('ä(p2)') +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +# at # +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1='ä(p2)' /* VARSTRING(30) meta=30 nullable=1 is_null=0 */ # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; BEGIN /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES ('ä(p3)') +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +# at # +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET ### @1='ä(p3)' /* VARSTRING(30) meta=30 nullable=1 is_null=0 */ # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# ddl +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# ddl /*!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; DROP TABLE `t1` /* generated by server */ /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Rotate to master-bin.000004 pos: 4 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Rotate to master-bin.000004 pos: 4 DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; diff --git a/mysql-test/suite/binlog/r/binlog_row_drop_tbl.result b/mysql-test/suite/binlog/r/binlog_row_drop_tbl.result index 056e658b1fc..574b1a7980a 100644 --- a/mysql-test/suite/binlog/r/binlog_row_drop_tbl.result +++ b/mysql-test/suite/binlog/r/binlog_row_drop_tbl.result @@ -20,6 +20,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES(1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result b/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result index d82a9654261..4b35170b2db 100644 --- a/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result +++ b/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result @@ -61,6 +61,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 ( i text ) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES ('1') master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/binlog/r/binlog_row_insert_select.result b/mysql-test/suite/binlog/r/binlog_row_insert_select.result index 9a5ca5f2352..d92e303aa9f 100644 --- a/mysql-test/suite/binlog/r/binlog_row_insert_select.result +++ b/mysql-test/suite/binlog/r/binlog_row_insert_select.result @@ -9,6 +9,7 @@ ERROR 23000: Duplicate entry '2' for key 'a' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 select * from t2 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result index ca5faa9f5a3..0bff58fda2a 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result @@ -13,10 +13,12 @@ commit; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2 select * from t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -32,6 +34,7 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2 select * from t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -50,13 +53,16 @@ commit; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2 select * from t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `my_savepoint` +master-bin.000001 # Annotate_rows # # insert into t1 values(4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `my_savepoint` @@ -81,16 +87,20 @@ a include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2 select * from t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(5) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `my_savepoint` +master-bin.000001 # Annotate_rows # # insert into t1 values(6) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `my_savepoint` +master-bin.000001 # Annotate_rows # # insert into t1 values(7) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -111,6 +121,7 @@ get_lock("a",10) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2 select * from t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -122,10 +133,12 @@ insert into t2 select * from t1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(9) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2 select * from t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -138,10 +151,12 @@ insert into t2 select * from t1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(10) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2 select * from t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -150,14 +165,17 @@ commit; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(10) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2 select * from t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(11) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -172,8 +190,10 @@ commit; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(12) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t2 select * from t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -198,6 +218,7 @@ commit; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(14) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `my_savepoint` @@ -220,9 +241,11 @@ a include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(16) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `my_savepoint` +master-bin.000001 # Annotate_rows # # insert into t1 values(18) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -284,23 +307,28 @@ get_lock("lock1",60) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values(16) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `my_savepoint` +master-bin.000001 # Annotate_rows # # insert into t1 values(18) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # delete from t1 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; alter table t2 engine=MyISAM master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2 values (20) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -309,10 +337,12 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2` /* generated by s master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t0 (n int) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert t0 select * from t1 master-bin.000001 # Table_map # # table_id: # (test.t0) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t0 select GET_LOCK("lock1",0) master-bin.000001 # Table_map # # table_id: # (test.t0) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -407,12 +437,14 @@ DROP TABLE t1,t2; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 values (1,1),(1,2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 values (3,3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -421,34 +453,41 @@ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (4,4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE table t2 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (5,5) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 values (6,6) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 values (7,7) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 values (8,8) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 values (9,9) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 values (10,10) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -535,6 +574,7 @@ ERROR 23000: Duplicate entry '2' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (null) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F @@ -554,6 +594,7 @@ count(*) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (null) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F @@ -611,6 +652,7 @@ ERROR 23000: Duplicate entry '4' for key 'b' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (null) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -777,6 +819,7 @@ ERROR 23000: Duplicate entry '2' for key 'PRIMARY' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (null) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F @@ -795,6 +838,7 @@ count(*) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (null) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F @@ -849,6 +893,7 @@ ERROR 23000: Duplicate entry '4' for key 'b' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (null) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result index 5991fd6f37f..e48dd2c89b4 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result +++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result @@ -51,7 +51,7 @@ use `new_test1`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -65,6 +65,9 @@ CREATE TABLE t1 (a INT, b INT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (1,1),(2,2) #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -96,6 +99,9 @@ CREATE TABLE t2 (a INT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t2 VALUES (1),(2) #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test2`.`t2` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -116,6 +122,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM test1.t1 WHERE a=1 #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -143,6 +152,9 @@ CREATE TABLE t3 (a INT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t3 VALUES (1),(2) #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test3`.`t3` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -163,6 +175,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO test1.t1 VALUES (3,3) #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -181,6 +196,10 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE t1 +#Q> FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -215,6 +234,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM test3.t3 WHERE a=1 #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test3`.`t3` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -263,7 +285,7 @@ use `new_test1`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -277,6 +299,9 @@ CREATE TABLE t1 (a INT, b INT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES (1,1),(2,2) #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -308,6 +333,9 @@ CREATE TABLE t2 (a INT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t2 VALUES (1),(2) #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test2`.`t2` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -328,6 +356,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM test1.t1 WHERE a=1 #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F @@ -355,6 +386,9 @@ CREATE TABLE t3 (a INT) BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t3 VALUES (1),(2) #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test3`.`t3` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -375,6 +409,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO test1.t1 VALUES (3,3) #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -393,6 +430,10 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE t1 +#Q> FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F @@ -427,6 +468,9 @@ COMMIT BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM test3.t3 WHERE a=1 #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test3`.`t3` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index 07f9350a8d4..872ba40e05f 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -451,7 +451,7 @@ create table if not exists t2 select * from t1; create temporary table tt1 (a int); create table if not exists t3 like tt1; USE mysql; -INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test'); +INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test'); UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'; DELETE FROM user WHERE host='localhost' AND user='@#@'; use test; @@ -501,7 +501,7 @@ master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int) master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1 master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test') +master-bin.000001 # Query # # use `mysql`; INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test') master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@' @@ -598,6 +598,10 @@ Log_name Pos Event_type Server_id End_log_pos Info # # Query 1 # use `test`; INSERT INTO t1 VALUES (1) # # Query 1 # COMMIT # # Gtid 1 # BEGIN GTID 0-1-3 +# # Annotate_rows 1 # BINLOG ' +3u9kSBMUAAAAKQAAAJEBAAAAABoAAAAAAAAABHRlc3QAAnQxAAEDAAA= +3u9kSBcUAAAAIgAAALMBAAAQABoAAAAAAAEAAf/+AgAAAA== +' # # Table_map 1 # table_id: # (test.t1) # # Write_rows_v1 1 # table_id: # flags: STMT_END_F # # Query 1 # COMMIT diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result index 346b7a58179..f4f9753828b 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result @@ -58,7 +58,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -11499,30 +11499,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; SET collation_connection='cp932_bin'; create table t1 select repeat('a',4000) a; @@ -11606,30 +11594,18 @@ CREATE TABLE t1 AS SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); -Warnings: -Warning 1364 Field 'c' doesn't have a default value -Warning 1364 Field 'd' doesn't have a default value SELECT hex(concat(repeat(0xF1F2, 10), '%')); hex(concat(repeat(0xF1F2, 10), '%')) F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); a hex(b) c -2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 -4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL DROP TABLE t1; create table t2 (a char(1)); insert into t2 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'); @@ -11649,14 +11625,14 @@ drop table t1; drop table t2; create table t1 (col1 varchar(1)) character set cp932; insert into t1 values ('a'); -insert into t1 values ('ab'); +insert ignore into t1 values ('ab'); Warnings: Warning 1265 Data truncated for column 'col1' at row 1 select * from t1; col1 a a -insert into t1 values ('abc'); +insert ignore into t1 values ('abc'); Warnings: Warning 1265 Data truncated for column 'col1' at row 1 select * from t1; diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result index e8ecdb7b976..6c82c5793df 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result @@ -22,7 +22,7 @@ use `test`/*!*/; SET TIMESTAMP=10000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -76,26 +76,26 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 700101 6:46:40 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created YYMMDD HH:MM:SS # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Gtid list [#-#-#] +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Gtid list [#-#-#] # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000002 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000002 # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000003 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000003 # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# ddl +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# ddl /*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=#*//*!*/; /*!100001 SET @@session.server_id=#*//*!*/; /*!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; SET TIMESTAMP=XXX/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/; @@ -104,105 +104,105 @@ SET @@session.collation_database=DEFAULT/*!*/; CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8) /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; BEGIN /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; INSERT INTO t1 VALUES ('ä(i1)') /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; BEGIN /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; INSERT INTO t1 VALUES ('ä(i2)') /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; BEGIN /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; INSERT INTO t1 VALUES ('ä(i3)') /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; BEGIN /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; INSERT INTO t1 VALUES ('ä(p1)') /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; BEGIN /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; INSERT INTO t1 VALUES ('ä(p2)') /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; BEGIN /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; INSERT INTO t1 VALUES ('ä(p3)') /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX GTID #-#-# ddl +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# ddl /*!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; DROP TABLE `t1` /* generated by server */ /*!*/; # at # -#700101 6:46:40 server id # end_log_pos # CRC32 XXX Rotate to master-bin.000004 pos: 4 +#YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Rotate to master-bin.000004 pos: 4 DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; diff --git a/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result b/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result index 3b144755aa3..8340420f5ad 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result +++ b/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result @@ -85,6 +85,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1 ( i text ) master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE ttmp1 ( i text ) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES ('1') master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/binlog/r/binlog_stm_row.result b/mysql-test/suite/binlog/r/binlog_stm_row.result index 663af848b61..2b2446273ab 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_row.result +++ b/mysql-test/suite/binlog/r/binlog_stm_row.result @@ -87,6 +87,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (4) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 SELECT * FROM t2 WHERE GET_LOCK('Bug#34306', 120) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/binlog/r/binlog_stm_user_variables.result b/mysql-test/suite/binlog/r/binlog_stm_user_variables.result index 225921182e6..9923eb89a11 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_user_variables.result +++ b/mysql-test/suite/binlog/r/binlog_stm_user_variables.result @@ -17,10 +17,10 @@ CREATE TABLE t1 (`tinyint` TINYINT, `decimal` DECIMAL(30,2)) ENGINE = MyISAM; ### insert max unsigned ### a) declarative -INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);; +INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);; TRUNCATE t1; ### b) user var -INSERT INTO t1 VALUES (@positive, +INSERT IGNORE INTO t1 VALUES (@positive, @positive, @positive, @positive, @@ -55,13 +55,13 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (`tinyint` TINYINT, `real` REAL(30,2), `decimal` DECIMAL(30,2)) ENGINE = MyISAM master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615) +master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE t1 master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # User var # # @`positive`=18446744073709551615 -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@positive, +master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES (@positive, @positive, @positive, @positive, @@ -78,10 +78,10 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@positive, master-bin.000001 # Query # # COMMIT ### insert min signed ### a) declarative -INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);; +INSERT IGNORE INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);; TRUNCATE t1; ### b) user var -INSERT INTO t1 VALUES (@negative, +INSERT IGNORE INTO t1 VALUES (@negative, @negative, @negative, @negative, @@ -116,13 +116,13 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (`tinyint` TINYINT, `real` REAL(30,2), `decimal` DECIMAL(30,2)) ENGINE = MyISAM master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615) +master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE t1 master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # User var # # @`positive`=18446744073709551615 -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@positive, +master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES (@positive, @positive, @positive, @positive, @@ -138,13 +138,13 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@positive, @positive) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808) +master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE t1 master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # User var # # @`negative`=-9223372036854775808 -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@negative, +master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES (@negative, @negative, @negative, @negative, diff --git a/mysql-test/suite/binlog/r/binlog_truncate_myisam.result b/mysql-test/suite/binlog/r/binlog_truncate_myisam.result index 56944e6ee0c..cdaab2980c1 100644 --- a/mysql-test/suite/binlog/r/binlog_truncate_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_truncate_myisam.result @@ -42,10 +42,12 @@ connection default; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index 6e996205dc0..1cde61620a6 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -2521,6 +2521,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT DELAYED INTO t1 VALUES (1), (2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 SELECT * FROM t2 LIMIT 1 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2548,6 +2549,7 @@ INSERT INTO t2 SET a = func_modify_t1(); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 SET a = 1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2575,10 +2577,12 @@ INSERT INTO t1 SET a = 2; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2(a) values(new.a) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t3(a) values(new.a) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t2) diff --git a/mysql-test/suite/binlog/r/binlog_write_error.result b/mysql-test/suite/binlog/r/binlog_write_error.result index 28cffb3a8e5..2606a9f40b3 100644 --- a/mysql-test/suite/binlog/r/binlog_write_error.result +++ b/mysql-test/suite/binlog/r/binlog_write_error.result @@ -59,8 +59,8 @@ DROP VIEW v1; ERROR HY000: Error writing file 'master-bin' ((errno: #) SET GLOBAL debug_dbug=''; SET GLOBAL debug_dbug='d,injecting_fault_writing'; -CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1; -CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1; +CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; +CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) SET GLOBAL debug_dbug=''; SET GLOBAL debug_dbug='d,injecting_fault_writing'; diff --git a/mysql-test/suite/binlog/r/binlog_xa_recover.result b/mysql-test/suite/binlog/r/binlog_xa_recover.result index 2c0e677bf1c..25aa1389b71 100644 --- a/mysql-test/suite/binlog/r/binlog_xa_recover.result +++ b/mysql-test/suite/binlog/r/binlog_xa_recover.result @@ -50,6 +50,7 @@ master-bin.000003 # Gtid_list # # [#-#-#] master-bin.000003 # Binlog_checkpoint # # master-bin.000002 master-bin.000003 # Binlog_checkpoint # # master-bin.000003 master-bin.000003 # Gtid # # BEGIN GTID #-#-# +master-bin.000003 # Annotate_rows # # INSERT INTO t1 VALUES (102, REPEAT("x", 4100)) master-bin.000003 # Table_map # # table_id: # (test.t1) master-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000003 # Xid # # COMMIT /* XID */ @@ -61,6 +62,7 @@ master-bin.000004 # Gtid_list # # [#-#-#] master-bin.000004 # Binlog_checkpoint # # master-bin.000003 master-bin.000004 # Binlog_checkpoint # # master-bin.000004 master-bin.000004 # Gtid # # BEGIN GTID #-#-# +master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (1, REPEAT("x", 4100)) master-bin.000004 # Table_map # # table_id: # (test.t1) master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000004 # Xid # # COMMIT /* XID */ @@ -71,10 +73,12 @@ master-bin.000005 # Format_desc # # SERVER_VERSION, BINLOG_VERSION master-bin.000005 # Gtid_list # # [#-#-#] master-bin.000005 # Binlog_checkpoint # # master-bin.000004 master-bin.000005 # Gtid # # BEGIN GTID #-#-# +master-bin.000005 # Annotate_rows # # INSERT INTO t1 VALUES (2, NULL) master-bin.000005 # Table_map # # table_id: # (test.t1) master-bin.000005 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000005 # Xid # # COMMIT /* XID */ master-bin.000005 # Gtid # # BEGIN GTID #-#-# +master-bin.000005 # Annotate_rows # # INSERT INTO t1 VALUES (3, REPEAT("x", 4100)) master-bin.000005 # Table_map # # table_id: # (test.t1) master-bin.000005 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000005 # Xid # # COMMIT /* XID */ @@ -135,6 +139,7 @@ master-bin.000004 # Format_desc # # SERVER_VERSION, BINLOG_VERSION master-bin.000004 # Gtid_list # # [#-#-#] master-bin.000004 # Binlog_checkpoint # # master-bin.000001 master-bin.000004 # Gtid # # BEGIN GTID #-#-# +master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (13, NULL) master-bin.000004 # Table_map # # table_id: # (test.t1) master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000004 # Xid # # COMMIT /* XID */ @@ -158,6 +163,7 @@ master-bin.000004 # Format_desc # # SERVER_VERSION, BINLOG_VERSION master-bin.000004 # Gtid_list # # [#-#-#] master-bin.000004 # Binlog_checkpoint # # master-bin.000001 master-bin.000004 # Gtid # # BEGIN GTID #-#-# +master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (13, NULL) master-bin.000004 # Table_map # # table_id: # (test.t1) master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000004 # Xid # # COMMIT /* XID */ @@ -225,6 +231,7 @@ master-bin.000004 # Gtid_list # # [#-#-#] master-bin.000004 # Binlog_checkpoint # # master-bin.000003 master-bin.000004 # Binlog_checkpoint # # master-bin.000004 master-bin.000004 # Gtid # # BEGIN GTID #-#-# +master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (24, REPEAT("x", 4100)) master-bin.000004 # Table_map # # table_id: # (test.t1) master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000004 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/binlog/r/flashback.result b/mysql-test/suite/binlog/r/flashback.result new file mode 100644 index 00000000000..a7973b36ddd --- /dev/null +++ b/mysql-test/suite/binlog/r/flashback.result @@ -0,0 +1,505 @@ +# +# Preparatory cleanup. +# +DROP TABLE IF EXISTS t1; +# +# We need a fixed timestamp to avoid varying results. +# +SET timestamp=1000000000; +# +# Delete all existing binary logs. +# +RESET MASTER; +CREATE TABLE t1 ( +c01 tinyint, +c02 smallint, +c03 mediumint, +c04 int, +c05 bigint, +c06 char(10), +c07 varchar(20), +c08 TEXT +) ENGINE=InnoDB; +# +# Insert data to t1 +# +INSERT INTO t1 VALUES(0,0,0,0,0,'','',''); +INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz"); +INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 255)); +# +# Update t1 +# +UPDATE t1 SET c01=100 WHERE c02=0 OR c03=3; +# +# Clear t1 +# +DELETE FROM t1; +FLUSH LOGS; +# +# Show mysqlbinlog result without -B +# +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 9:46:40 at startup +ROLLBACK/*!*/; +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list [] +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*!100001 SET @@session.server_id=1*//*!*/; +/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +use `test`/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=#/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; +SET @@session.sql_mode=1411383296/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; +CREATE TABLE t1 ( +c01 tinyint, +c02 smallint, +c03 mediumint, +c04 int, +c05 bigint, +c06 char(10), +c07 varchar(20), +c08 TEXT +) ENGINE=InnoDB +/*!*/; +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans +/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +BEGIN +/*!*/; +# at # +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES(0,0,0,0,0,'','','') +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +### INSERT INTO `test`.`t1` +### SET +### @1=0 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=0 /* INT meta=0 nullable=1 is_null=0 */ +### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # +COMMIT/*!*/; +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans +/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +BEGIN +/*!*/; +# at # +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz") +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +### INSERT INTO `test`.`t1` +### SET +### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=4 /* INT meta=0 nullable=1 is_null=0 */ +### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # +COMMIT/*!*/; +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans +/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +BEGIN +/*!*/; +# at # +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 255)) +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +### INSERT INTO `test`.`t1` +### SET +### @1=127 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=32767 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=8388607 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=2147483647 /* INT meta=0 nullable=1 is_null=0 */ +### @5=9223372036854775807 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='aaaaaaaaaa' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='aaaaaaaaaaaaaaaaaaaa' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # +COMMIT/*!*/; +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 trans +/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +BEGIN +/*!*/; +# at # +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET c01=100 WHERE c02=0 OR c03=3 +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F +### UPDATE `test`.`t1` +### WHERE +### @1=0 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=0 /* INT meta=0 nullable=1 is_null=0 */ +### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +### SET +### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=0 /* INT meta=0 nullable=1 is_null=0 */ +### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +### UPDATE `test`.`t1` +### WHERE +### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=4 /* INT meta=0 nullable=1 is_null=0 */ +### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +### SET +### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=4 /* INT meta=0 nullable=1 is_null=0 */ +### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # +COMMIT/*!*/; +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 trans +/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +BEGIN +/*!*/; +# at # +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F +### DELETE FROM `test`.`t1` +### WHERE +### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=0 /* INT meta=0 nullable=1 is_null=0 */ +### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +### DELETE FROM `test`.`t1` +### WHERE +### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=4 /* INT meta=0 nullable=1 is_null=0 */ +### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +### DELETE FROM `test`.`t1` +### WHERE +### @1=127 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=32767 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=8388607 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=2147483647 /* INT meta=0 nullable=1 is_null=0 */ +### @5=9223372036854775807 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='aaaaaaaaaa' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='aaaaaaaaaaaaaaaaaaaa' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # +COMMIT/*!*/; +# at # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4 +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; +# +# Show mysqlbinlog result with -B +# +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 9:46:40 at startup +ROLLBACK/*!*/; +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list [] +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES(0,0,0,0,0,'','','') +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz") +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 255)) +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> UPDATE t1 SET c01=100 WHERE c02=0 OR c03=3 +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> DELETE FROM t1 +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4 +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # +BEGIN/*!*/; +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +### INSERT INTO `test`.`t1` +### SET +### @1=127 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=32767 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=8388607 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=2147483647 /* INT meta=0 nullable=1 is_null=0 */ +### @5=9223372036854775807 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='aaaaaaaaaa' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='aaaaaaaaaaaaaaaaaaaa' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +### INSERT INTO `test`.`t1` +### SET +### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=4 /* INT meta=0 nullable=1 is_null=0 */ +### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +### INSERT INTO `test`.`t1` +### SET +### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=0 /* INT meta=0 nullable=1 is_null=0 */ +### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +COMMIT +/*!*/; +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # +BEGIN/*!*/; +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F +### UPDATE `test`.`t1` +### WHERE +### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=4 /* INT meta=0 nullable=1 is_null=0 */ +### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +### SET +### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=4 /* INT meta=0 nullable=1 is_null=0 */ +### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +### UPDATE `test`.`t1` +### WHERE +### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=0 /* INT meta=0 nullable=1 is_null=0 */ +### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +### SET +### @1=0 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=0 /* INT meta=0 nullable=1 is_null=0 */ +### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +COMMIT +/*!*/; +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # +BEGIN/*!*/; +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F +### DELETE FROM `test`.`t1` +### WHERE +### @1=127 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=32767 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=8388607 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=2147483647 /* INT meta=0 nullable=1 is_null=0 */ +### @5=9223372036854775807 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='aaaaaaaaaa' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='aaaaaaaaaaaaaaaaaaaa' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +COMMIT +/*!*/; +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # +BEGIN/*!*/; +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F +### DELETE FROM `test`.`t1` +### WHERE +### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=4 /* INT meta=0 nullable=1 is_null=0 */ +### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +COMMIT +/*!*/; +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # +BEGIN/*!*/; +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F +### DELETE FROM `test`.`t1` +### WHERE +### @1=0 /* TINYINT meta=0 nullable=1 is_null=0 */ +### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */ +### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */ +### @4=0 /* INT meta=0 nullable=1 is_null=0 */ +### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */ +### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */ +### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +COMMIT +/*!*/; +#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +use `test`/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=#/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; +SET @@session.sql_mode=1411383296/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; +COMMIT +/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; +# +# Insert data to t1 +# +TRUNCATE TABLE t1; +INSERT INTO t1 VALUES(0,0,0,0,0,'','',''); +INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz"); +INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 60)); +# +# Delete all existing binary logs. +# +RESET MASTER; +SELECT * FROM t1; +c01 c02 c03 c04 c05 c06 c07 c08 +0 0 0 0 0 +1 2 3 4 5 abc abcdefg abcedfghijklmnopqrstuvwxyz +127 32767 8388607 2147483647 9223372036854775807 aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +# +# Operate some data +# +UPDATE t1 SET c01=20; +UPDATE t1 SET c02=200; +UPDATE t1 SET c03=2000; +DELETE FROM t1; +FLUSH LOGS; +# +# Flashback & Check the result +# +SELECT * FROM t1; +c01 c02 c03 c04 c05 c06 c07 c08 +127 32767 8388607 2147483647 9223372036854775807 aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +1 2 3 4 5 abc abcdefg abcedfghijklmnopqrstuvwxyz +0 0 0 0 0 +RESET MASTER; +# +# UPDATE multi-rows in one event +# +BEGIN; +UPDATE t1 SET c01=10 WHERE c01=0; +UPDATE t1 SET c01=20 WHERE c01=10; +COMMIT; +FLUSH LOGS; +# +# Flashback & Check the result +# +SELECT * FROM t1; +c01 c02 c03 c04 c05 c06 c07 c08 +127 32767 8388607 2147483647 9223372036854775807 aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +1 2 3 4 5 abc abcdefg abcedfghijklmnopqrstuvwxyz +0 0 0 0 0 +DROP TABLE t1; +# +# Self-referencing foreign keys +# +CREATE TABLE t1 (a INT PRIMARY KEY, b INT, FOREIGN KEY my_fk(b) REFERENCES t1(a)) ENGINE=InnoDB; +BEGIN; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (2, 1), (3, 2), (4, 3); +COMMIT; +SELECT * FROM t1; +a b +1 NULL +2 1 +3 2 +4 3 +RESET MASTER; +DELETE FROM t1 ORDER BY a DESC; +FLUSH LOGS; +# +# Flashback & Check the result +# +SELECT * FROM t1; +a b +1 NULL +2 1 +3 2 +4 3 +DROP TABLE t1; diff --git a/mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.opt b/mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.opt new file mode 100644 index 00000000000..c52ef14d5d0 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.opt @@ -0,0 +1 @@ +--max_binlog_stmt_cache_size=18446744073709547520 diff --git a/mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.test b/mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.test new file mode 100644 index 00000000000..ca3f45c154c --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_max_binlog_stmt_cache_size.test @@ -0,0 +1,36 @@ + +--echo # +--echo # MDEV-4774: Strangeness with max_binlog_stmt_cache_size Settings +--echo # + +CALL mtr.add_suppression("unsigned value 18446744073709547520 adjusted to 4294963200"); + +--replace_result 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE 4294963200 MAX_BINLOG_STMT_CACHE_SIZE +SELECT @@global.max_binlog_stmt_cache_size; + +# Save the initial value of @@global.max_binlog_stmt_cache_size. +--replace_result 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE 4294963200 MAX_BINLOG_STMT_CACHE_SIZE +SET @cache_size= @@max_binlog_stmt_cache_size; + +--disable_warnings +SET @@global.max_binlog_stmt_cache_size= @cache_size+1; +--enable_warnings +--replace_result 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE 4294963200 MAX_BINLOG_STMT_CACHE_SIZE +SELECT @@global.max_binlog_stmt_cache_size; + +--disable_warnings +SET @@global.max_binlog_stmt_cache_size = @cache_size+4095; +--enable_warnings +--replace_result 4294963200 MAX_BINLOG_STMT_CACHE_SIZE 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE +SELECT @@global.max_binlog_stmt_cache_size; + +--disable_warnings +SET @@global.max_binlog_stmt_cache_size= @cache_size-1; +--enable_warnings +SELECT @@global.max_binlog_stmt_cache_size = @cache_size-4096; + +# Restore @@global.max_binlog_stmt_cache_size to its initial value. +SET @@global.max_binlog_stmt_cache_size= @cache_size; + +--echo # End of test + diff --git a/mysql-test/suite/binlog/t/binlog_row_binlog-master.opt b/mysql-test/suite/binlog/t/binlog_row_binlog-master.opt index 099f07e5d4e..e4c44226ff5 100644 --- a/mysql-test/suite/binlog/t/binlog_row_binlog-master.opt +++ b/mysql-test/suite/binlog/t/binlog_row_binlog-master.opt @@ -1 +1 @@ ---max_binlog_size=4096 --default-storage-engine=MyISAM +--max_binlog_size=8192 --default-storage-engine=MyISAM diff --git a/mysql-test/suite/binlog/t/binlog_stm_user_variables.test b/mysql-test/suite/binlog/t/binlog_stm_user_variables.test index 4bed6db6269..85bf511af86 100644 --- a/mysql-test/suite/binlog/t/binlog_stm_user_variables.test +++ b/mysql-test/suite/binlog/t/binlog_stm_user_variables.test @@ -27,13 +27,13 @@ CREATE TABLE t1 (`tinyint` TINYINT, -- echo ### insert max unsigned -- echo ### a) declarative -- disable_warnings --- eval INSERT INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long); +-- eval INSERT IGNORE INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long); -- enable_warnings TRUNCATE t1; -- echo ### b) user var -- disable_warnings -INSERT INTO t1 VALUES (@positive, +INSERT IGNORE INTO t1 VALUES (@positive, @positive, @positive, @positive, @@ -57,13 +57,13 @@ INSERT INTO t1 VALUES (@positive, -- echo ### insert min signed -- echo ### a) declarative -- disable_warnings --- eval INSERT INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long); +-- eval INSERT IGNORE INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long); -- enable_warnings TRUNCATE t1; -- echo ### b) user var -- disable_warnings -INSERT INTO t1 VALUES (@negative, +INSERT IGNORE INTO t1 VALUES (@negative, @negative, @negative, @negative, diff --git a/mysql-test/suite/binlog/t/flashback-master.opt b/mysql-test/suite/binlog/t/flashback-master.opt new file mode 100644 index 00000000000..476efbe20ab --- /dev/null +++ b/mysql-test/suite/binlog/t/flashback-master.opt @@ -0,0 +1,2 @@ +--flashback +--timezone=GMT-8 diff --git a/mysql-test/suite/binlog/t/flashback.test b/mysql-test/suite/binlog/t/flashback.test new file mode 100644 index 00000000000..2f395a2a7b1 --- /dev/null +++ b/mysql-test/suite/binlog/t/flashback.test @@ -0,0 +1,163 @@ +--source include/have_log_bin.inc +--source include/have_innodb.inc + +--echo # +--echo # Preparatory cleanup. +--echo # +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +--echo # +--echo # We need a fixed timestamp to avoid varying results. +--echo # +SET timestamp=1000000000; + +--echo # +--echo # Delete all existing binary logs. +--echo # +RESET MASTER; + + +CREATE TABLE t1 ( + c01 tinyint, + c02 smallint, + c03 mediumint, + c04 int, + c05 bigint, + c06 char(10), + c07 varchar(20), + c08 TEXT +) ENGINE=InnoDB; + +--echo # +--echo # Insert data to t1 +--echo # +INSERT INTO t1 VALUES(0,0,0,0,0,'','',''); +INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz"); +INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 255)); + + +--echo # +--echo # Update t1 +--echo # +UPDATE t1 SET c01=100 WHERE c02=0 OR c03=3; + +--echo # +--echo # Clear t1 +--echo # +DELETE FROM t1; + +FLUSH LOGS; + +--echo # +--echo # Show mysqlbinlog result without -B +--echo # + +let $MYSQLD_DATADIR= `select @@datadir`; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ +--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001 + +--echo # +--echo # Show mysqlbinlog result with -B +--echo # + +let $MYSQLD_DATADIR= `select @@datadir`; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ +--exec $MYSQL_BINLOG -B --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001 + +--echo # +--echo # Insert data to t1 +--echo # +TRUNCATE TABLE t1; +INSERT INTO t1 VALUES(0,0,0,0,0,'','',''); +INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz"); +INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 60)); + +--echo # +--echo # Delete all existing binary logs. +--echo # +RESET MASTER; +SELECT * FROM t1; + +--echo # +--echo # Operate some data +--echo # + +UPDATE t1 SET c01=20; +UPDATE t1 SET c02=200; +UPDATE t1 SET c03=2000; + +DELETE FROM t1; + +FLUSH LOGS; + +--echo # +--echo # Flashback & Check the result +--echo # + +let $MYSQLD_DATADIR= `select @@datadir`; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG -B -vv $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_1.sql +--exec $MYSQL -e "SET binlog_format= ROW; source $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_1.sql;" + +SELECT * FROM t1; + +RESET MASTER; + +--echo # +--echo # UPDATE multi-rows in one event +--echo # +BEGIN; +UPDATE t1 SET c01=10 WHERE c01=0; +UPDATE t1 SET c01=20 WHERE c01=10; +COMMIT; + +FLUSH LOGS; + +--echo # +--echo # Flashback & Check the result +--echo # + +let $MYSQLD_DATADIR= `select @@datadir`; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG -B -vv $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_2.sql +--exec $MYSQL -e "SET binlog_format= ROW; source $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_2.sql;" + +SELECT * FROM t1; + +DROP TABLE t1; + +--echo # +--echo # Self-referencing foreign keys +--echo # +CREATE TABLE t1 (a INT PRIMARY KEY, b INT, FOREIGN KEY my_fk(b) REFERENCES t1(a)) ENGINE=InnoDB; + +BEGIN; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (2, 1), (3, 2), (4, 3); +COMMIT; + +SELECT * FROM t1; + +# New binlog +RESET MASTER; + +DELETE FROM t1 ORDER BY a DESC; + +FLUSH LOGS; + +--echo # +--echo # Flashback & Check the result +--echo # + +let $MYSQLD_DATADIR= `select @@datadir`; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG -B -vv $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_3.sql +--exec $MYSQL -e "SET binlog_format= ROW; source $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_3.sql;" + +SELECT * FROM t1; + +DROP TABLE t1; diff --git a/mysql-test/suite/binlog_encryption/binlog_row_annotate.combinations b/mysql-test/suite/binlog_encryption/binlog_row_annotate.combinations new file mode 100644 index 00000000000..710c53d0ace --- /dev/null +++ b/mysql-test/suite/binlog_encryption/binlog_row_annotate.combinations @@ -0,0 +1,6 @@ +[cmpr] +log-bin-compress=1 +log-bin-compress-min-len=10 + +[ncmpr] +log-bin-compress=0 diff --git a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result index f4cfc86619d..e72fc9faa6e 100644 --- a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result +++ b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result @@ -50,6 +50,7 @@ master-bin.000001 # Query # # CREATE DATABASE test2 master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # CREATE DATABASE test3 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO test1.t1 VALUES (1), (2), (3) master-bin.000001 # Table_map # # table_id: # (test1.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -147,6 +148,9 @@ CREATE DATABASE test3 BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # Annotate_rows: +#Q> INSERT INTO test1.t1 VALUES (1), (2), (3) #010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F @@ -368,6 +372,9 @@ CREATE DATABASE test1 BEGIN /*!*/; # at # +# at # +#010909 4:46:40 server id # end_log_pos # Annotate_rows: +#Q> INSERT INTO test1.t1 VALUES (1), (2), (3) #010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F diff --git a/mysql-test/suite/binlog_encryption/binlog_write_error.result b/mysql-test/suite/binlog_encryption/binlog_write_error.result index 28cffb3a8e5..2606a9f40b3 100644 --- a/mysql-test/suite/binlog_encryption/binlog_write_error.result +++ b/mysql-test/suite/binlog_encryption/binlog_write_error.result @@ -59,8 +59,8 @@ DROP VIEW v1; ERROR HY000: Error writing file 'master-bin' ((errno: #) SET GLOBAL debug_dbug=''; SET GLOBAL debug_dbug='d,injecting_fault_writing'; -CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1; -CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1; +CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; +CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) SET GLOBAL debug_dbug=''; SET GLOBAL debug_dbug='d,injecting_fault_writing'; diff --git a/mysql-test/suite/binlog_encryption/binlog_xa_recover.result b/mysql-test/suite/binlog_encryption/binlog_xa_recover.result index 6719d891ee2..af36fe277a1 100644 --- a/mysql-test/suite/binlog_encryption/binlog_xa_recover.result +++ b/mysql-test/suite/binlog_encryption/binlog_xa_recover.result @@ -51,6 +51,7 @@ master-bin.000003 # Gtid_list # # [#-#-#] master-bin.000003 # Binlog_checkpoint # # master-bin.000002 master-bin.000003 # Binlog_checkpoint # # master-bin.000003 master-bin.000003 # Gtid # # BEGIN GTID #-#-# +master-bin.000003 # Annotate_rows # # INSERT INTO t1 VALUES (102, REPEAT("x", 4100)) master-bin.000003 # Table_map # # table_id: # (test.t1) master-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000003 # Xid # # COMMIT /* XID */ @@ -63,6 +64,7 @@ master-bin.000004 # Gtid_list # # [#-#-#] master-bin.000004 # Binlog_checkpoint # # master-bin.000003 master-bin.000004 # Binlog_checkpoint # # master-bin.000004 master-bin.000004 # Gtid # # BEGIN GTID #-#-# +master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (1, REPEAT("x", 4100)) master-bin.000004 # Table_map # # table_id: # (test.t1) master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000004 # Xid # # COMMIT /* XID */ @@ -74,10 +76,12 @@ master-bin.000005 # Start_encryption # # master-bin.000005 # Gtid_list # # [#-#-#] master-bin.000005 # Binlog_checkpoint # # master-bin.000004 master-bin.000005 # Gtid # # BEGIN GTID #-#-# +master-bin.000005 # Annotate_rows # # INSERT INTO t1 VALUES (2, NULL) master-bin.000005 # Table_map # # table_id: # (test.t1) master-bin.000005 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000005 # Xid # # COMMIT /* XID */ master-bin.000005 # Gtid # # BEGIN GTID #-#-# +master-bin.000005 # Annotate_rows # # INSERT INTO t1 VALUES (3, REPEAT("x", 4100)) master-bin.000005 # Table_map # # table_id: # (test.t1) master-bin.000005 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000005 # Xid # # COMMIT /* XID */ @@ -140,6 +144,7 @@ master-bin.000004 # Start_encryption # # master-bin.000004 # Gtid_list # # [#-#-#] master-bin.000004 # Binlog_checkpoint # # master-bin.000001 master-bin.000004 # Gtid # # BEGIN GTID #-#-# +master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (13, NULL) master-bin.000004 # Table_map # # table_id: # (test.t1) master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000004 # Xid # # COMMIT /* XID */ @@ -164,6 +169,7 @@ master-bin.000004 # Start_encryption # # master-bin.000004 # Gtid_list # # [#-#-#] master-bin.000004 # Binlog_checkpoint # # master-bin.000001 master-bin.000004 # Gtid # # BEGIN GTID #-#-# +master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (13, NULL) master-bin.000004 # Table_map # # table_id: # (test.t1) master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000004 # Xid # # COMMIT /* XID */ @@ -232,6 +238,7 @@ master-bin.000004 # Gtid_list # # [#-#-#] master-bin.000004 # Binlog_checkpoint # # master-bin.000003 master-bin.000004 # Binlog_checkpoint # # master-bin.000004 master-bin.000004 # Gtid # # BEGIN GTID #-#-# +master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (24, REPEAT("x", 4100)) master-bin.000004 # Table_map # # table_id: # (test.t1) master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000004 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/binlog_encryption/mysqlbinlog.combinations b/mysql-test/suite/binlog_encryption/mysqlbinlog.combinations new file mode 100644 index 00000000000..710c53d0ace --- /dev/null +++ b/mysql-test/suite/binlog_encryption/mysqlbinlog.combinations @@ -0,0 +1,6 @@ +[cmpr] +log-bin-compress=1 +log-bin-compress-min-len=10 + +[ncmpr] +log-bin-compress=0 diff --git a/mysql-test/suite/binlog_encryption/rpl_binlog_errors.result b/mysql-test/suite/binlog_encryption/rpl_binlog_errors.result index a54b84227e5..06be72d523b 100644 --- a/mysql-test/suite/binlog_encryption/rpl_binlog_errors.result +++ b/mysql-test/suite/binlog_encryption/rpl_binlog_errors.result @@ -9,7 +9,7 @@ connection master; call mtr.add_suppression("Can't generate a unique log-filename"); call mtr.add_suppression("Writing one row to the row-based binary log failed.*"); call mtr.add_suppression("Error writing file .*"); -SET @old_debug= @@global.debug; +SET @old_debug= @@global.debug_dbug; SELECT repeat('x',8192) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data'; SELECT repeat('x',10) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data'; RESET MASTER; @@ -88,6 +88,7 @@ DELETE FROM t2; RESET MASTER; ###################### TEST #7 SET GLOBAL debug_dbug="+d,error_unique_log_filename"; +SET @@binlog_annotate_row_events= 0; SELECT count(*) FROM t4; count(*) 0 @@ -179,7 +180,7 @@ Level Code Message SET GLOBAL debug_dbug="+d,fault_injection_registering_index"; FLUSH LOGS; ERROR HY000: Can't open file: 'master-bin.000002' (errno: 1 "Operation not permitted") -SET GLOBAL debug_dbug="-d,fault_injection_registering_index"; +SET GLOBAL debug_dbug=@old_debug; SHOW BINARY LOGS; ERROR HY000: You are not using binary logging CREATE TABLE t5 (a INT); @@ -188,12 +189,13 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +flush tables; ###################### TEST #11 include/rpl_restart_server.inc [server_number=1] SET GLOBAL debug_dbug="+d,fault_injection_openning_index"; FLUSH LOGS; ERROR HY000: Can't open file: 'master-bin.index' (errno: 1 "Operation not permitted") -SET GLOBAL debug_dbug="-d,fault_injection_openning_index"; +SET GLOBAL debug_dbug=@old_debug; RESET MASTER; ERROR HY000: Binlog closed, cannot RESET MASTER CREATE TABLE t5 (a INT); @@ -202,12 +204,13 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +flush tables; include/rpl_restart_server.inc [server_number=1] ###################### TEST #12 SET GLOBAL debug_dbug="+d,fault_injection_new_file_rotate_event"; FLUSH LOGS; ERROR HY000: Can't open file: 'master-bin' (errno: 2 "No such file or directory") -SET GLOBAL debug_dbug="-d,fault_injection_new_file_rotate_event"; +SET GLOBAL debug_dbug=@old_debug; RESET MASTER; ERROR HY000: Binlog closed, cannot RESET MASTER CREATE TABLE t5 (a INT); @@ -216,6 +219,7 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +flush tables; include/rpl_restart_server.inc [server_number=1] DROP TABLE t1, t2, t4; RESET MASTER; diff --git a/mysql-test/suite/binlog_encryption/rpl_gtid_basic.combinations b/mysql-test/suite/binlog_encryption/rpl_gtid_basic.combinations new file mode 100644 index 00000000000..710c53d0ace --- /dev/null +++ b/mysql-test/suite/binlog_encryption/rpl_gtid_basic.combinations @@ -0,0 +1,6 @@ +[cmpr] +log-bin-compress=1 +log-bin-compress-min-len=10 + +[ncmpr] +log-bin-compress=0 diff --git a/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result b/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result index dd946ec3107..4e17669605f 100644 --- a/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result +++ b/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result @@ -465,9 +465,11 @@ include/stop_slave.inc connection server_1; SET gtid_domain_id=2; SET gtid_seq_no=1030; +SET @@binlog_annotate_row_events= 0; INSERT INTO t1 VALUES (17); INSERT INTO t1 VALUES (18); INSERT INTO t1 VALUES (19); +SET @@binlog_annotate_row_events= 1; connection server_2; SET sql_slave_skip_counter= 5; include/start_slave.inc diff --git a/mysql-test/suite/binlog_encryption/rpl_special_charset.result b/mysql-test/suite/binlog_encryption/rpl_special_charset.result index 218ced9b8ea..b947cf3484d 100644 --- a/mysql-test/suite/binlog_encryption/rpl_special_charset.result +++ b/mysql-test/suite/binlog_encryption/rpl_special_charset.result @@ -1,6 +1,6 @@ include/master-slave.inc [connection master] -call mtr.add_suppression("Cannot use utf16 as character_set_client"); +call mtr.add_suppression("'utf16' can not be used as client character set"); CREATE TABLE t1(i VARCHAR(20)); INSERT INTO t1 VALUES (0xFFFF); connection slave; diff --git a/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result b/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result index 6c709945111..2f7f1b07cb4 100644 --- a/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result +++ b/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result @@ -21,7 +21,7 @@ binlog_format ROW set global binlog_format=DEFAULT; show global variables like "binlog_format%"; Variable_name Value -binlog_format STATEMENT +binlog_format MIXED set global binlog_format=MIXED; show global variables like "binlog_format%"; Variable_name Value @@ -135,11 +135,13 @@ insert into t1 values(concat("for_23_",UUID())); insert into t1 select "yesterday_24_"; create table t2 ENGINE=MyISAM select rpad(UUID(),100,' '); create table t3 select 1 union select UUID(); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); Warnings: Warning 1292 Incorrect datetime value: '3' -insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); +insert ignore into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); create procedure foo() begin insert into t1 values("work_25_"); diff --git a/mysql-test/suite/csv/csv.result b/mysql-test/suite/csv/csv.result index 833cd688be5..220b84b222e 100644 --- a/mysql-test/suite/csv/csv.result +++ b/mysql-test/suite/csv/csv.result @@ -1,5 +1,6 @@ call mtr.add_suppression("Table 'test_repair_table2' is marked as crashed and should be repaired"); call mtr.add_suppression("Table 'test_repair_table4' is marked as crashed and should be repaired"); +call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); drop table if exists t1,t2,t3,t4; CREATE TABLE t1 ( Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, @@ -5325,7 +5326,7 @@ select * from t1; a drop table t1; create table t1(a datetime not null) engine=csv; -insert into t1 values(); +insert ignore into t1 values(); Warnings: Warning 1364 Field 'a' doesn't have a default value select * from t1; @@ -5333,7 +5334,7 @@ a 0000-00-00 00:00:00 drop table t1; create table t1(a set('foo','bar') not null) engine=csv; -insert into t1 values(); +insert ignore into t1 values(); Warnings: Warning 1364 Field 'a' doesn't have a default value select * from t1; @@ -5341,7 +5342,7 @@ a drop table t1; create table t1(a varchar(32) not null) engine=csv; -insert into t1 values(); +insert ignore into t1 values(); Warnings: Warning 1364 Field 'a' doesn't have a default value select * from t1; @@ -5349,7 +5350,7 @@ a drop table t1; create table t1(a int not null) engine=csv; -insert into t1 values(); +insert ignore into t1 values(); Warnings: Warning 1364 Field 'a' doesn't have a default value select * from t1; @@ -5357,7 +5358,7 @@ a 0 drop table t1; create table t1(a blob not null) engine=csv; -insert into t1 values(); +insert ignore into t1 values(); Warnings: Warning 1364 Field 'a' doesn't have a default value select * from t1; @@ -5365,7 +5366,7 @@ a drop table t1; create table t1(a bit(1) not null) engine=csv; -insert into t1 values(); +insert ignore into t1 values(); Warnings: Warning 1364 Field 'a' doesn't have a default value select BIN(a) from t1; @@ -5410,13 +5411,13 @@ drop table t1; CREATE TABLE t1 (e enum('foo','bar') NOT NULL) ENGINE = CSV; INSERT INTO t1 VALUES(); INSERT INTO t1 VALUES(default); -INSERT INTO t1 VALUES(0); +INSERT IGNORE INTO t1 VALUES(0); Warnings: Warning 1265 Data truncated for column 'e' at row 1 -INSERT INTO t1 VALUES(3); +INSERT IGNORE INTO t1 VALUES(3); Warnings: Warning 1265 Data truncated for column 'e' at row 1 -INSERT INTO t1 VALUES(-1); +INSERT IGNORE INTO t1 VALUES(-1); Warnings: Warning 1265 Data truncated for column 'e' at row 1 SELECT * FROM t1; diff --git a/mysql-test/suite/csv/csv.test b/mysql-test/suite/csv/csv.test index f274eea3236..3da9aca7b16 100644 --- a/mysql-test/suite/csv/csv.test +++ b/mysql-test/suite/csv/csv.test @@ -6,6 +6,7 @@ call mtr.add_suppression("Table 'test_repair_table2' is marked as crashed and should be repaired"); call mtr.add_suppression("Table 'test_repair_table4' is marked as crashed and should be repaired"); +call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); # # Simple select test @@ -1737,27 +1738,27 @@ drop table t1; # Bug #31473: does not work with NULL value in datetime field # create table t1(a datetime not null) engine=csv; -insert into t1 values(); +insert ignore into t1 values(); select * from t1; drop table t1; create table t1(a set('foo','bar') not null) engine=csv; -insert into t1 values(); +insert ignore into t1 values(); select * from t1; drop table t1; create table t1(a varchar(32) not null) engine=csv; -insert into t1 values(); +insert ignore into t1 values(); select * from t1; drop table t1; create table t1(a int not null) engine=csv; -insert into t1 values(); +insert ignore into t1 values(); select * from t1; drop table t1; create table t1(a blob not null) engine=csv; -insert into t1 values(); +insert ignore into t1 values(); select * from t1; drop table t1; create table t1(a bit(1) not null) engine=csv; -insert into t1 values(); +insert ignore into t1 values(); select BIN(a) from t1; drop table t1; # We prevent creation of table with nullable ENUM @@ -1814,9 +1815,9 @@ drop table t1; CREATE TABLE t1 (e enum('foo','bar') NOT NULL) ENGINE = CSV; INSERT INTO t1 VALUES(); INSERT INTO t1 VALUES(default); -INSERT INTO t1 VALUES(0); -INSERT INTO t1 VALUES(3); -INSERT INTO t1 VALUES(-1); +INSERT IGNORE INTO t1 VALUES(0); +INSERT IGNORE INTO t1 VALUES(3); +INSERT IGNORE INTO t1 VALUES(-1); SELECT * FROM t1; DROP TABLE t1; diff --git a/mysql-test/suite/csv/csv_not_null.result b/mysql-test/suite/csv/csv_not_null.result index aed9bcb1587..57ba0b726a7 100644 --- a/mysql-test/suite/csv/csv_not_null.result +++ b/mysql-test/suite/csv/csv_not_null.result @@ -15,11 +15,11 @@ CREATE TABLE t1 (a int NOT NULL, b blob NOT NULL, c CHAR(20) NOT NULL, d VARCHAR(20) NOT NULL, e enum('foo','bar') NOT NULL,f DATE NOT NULL) ENGINE = CSV; # === should result in default for each datatype === -INSERT INTO t1 VALUES(); +INSERT IGNORE INTO t1 VALUES(); SELECT * FROM t1; a b c d e f 0 foo 0000-00-00 -INSERT INTO t1 VALUES(default,default,default,default,default,default); +INSERT IGNORE INTO t1 VALUES(default,default,default,default,default,default); SELECT * FROM t1; a b c d e f 0 foo 0000-00-00 @@ -40,7 +40,7 @@ DROP TABLE t1; # ===== csv_not_null.3 ===== DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV; -INSERT INTO t1 VALUES(); +INSERT IGNORE INTO t1 VALUES(); SELECT * FROM t1; a b 0 @@ -48,7 +48,7 @@ UPDATE t1 set b = 'new_value' where a = 0; SELECT * FROM t1; a b 0 new_value -UPDATE t1 set b = NULL where b = 'new_value'; +UPDATE IGNORE t1 set b = NULL where b = 'new_value'; Warnings: Warning 1048 Column 'b' cannot be null SELECT * FROM t1; diff --git a/mysql-test/suite/csv/csv_not_null.test b/mysql-test/suite/csv/csv_not_null.test index bebea53b2f7..effb98e1f43 100644 --- a/mysql-test/suite/csv/csv_not_null.test +++ b/mysql-test/suite/csv/csv_not_null.test @@ -50,13 +50,13 @@ d VARCHAR(20) NOT NULL, e enum('foo','bar') NOT NULL,f DATE NOT NULL) ENGINE = CSV; -- echo # === should result in default for each datatype === -- disable_warnings -INSERT INTO t1 VALUES(); +INSERT IGNORE INTO t1 VALUES(); -- enable_warnings SELECT * FROM t1; -- disable_warnings # Bug#33717 - INSERT...(default) fails for enum. -INSERT INTO t1 VALUES(default,default,default,default,default,default); +INSERT IGNORE INTO t1 VALUES(default,default,default,default,default,default); -- enable_warnings SELECT * FROM t1; @@ -84,14 +84,14 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV; --disable_warnings -INSERT INTO t1 VALUES(); +INSERT IGNORE INTO t1 VALUES(); --enable_warnings SELECT * FROM t1; --disable_warnings UPDATE t1 set b = 'new_value' where a = 0; --enable_warnings SELECT * FROM t1; -UPDATE t1 set b = NULL where b = 'new_value'; +UPDATE IGNORE t1 set b = NULL where b = 'new_value'; SELECT * FROM t1; DROP TABLE t1; diff --git a/mysql-test/suite/encryption/disabled.def b/mysql-test/suite/encryption/disabled.def index f8d7fb51865..d92d3495cb8 100644 --- a/mysql-test/suite/encryption/disabled.def +++ b/mysql-test/suite/encryption/disabled.def @@ -10,7 +10,5 @@ # ############################################################################## -innodb_scrub : MDEV-8139 -innodb_scrub_compressed : MDEV-8139 -innodb_scrub_background : MDEV-8139 -innochecksum: see buf_page_is_corrupted() +innodb_scrub : MDEV-8139 scrubbing does not work reliably +innodb_scrub_background : MDEV-8139 scrubbing does not work reliably diff --git a/mysql-test/suite/encryption/r/innochecksum.result b/mysql-test/suite/encryption/r/innochecksum.result index 50eafbf9f5e..7cd7af7b93b 100644 --- a/mysql-test/suite/encryption/r/innochecksum.result +++ b/mysql-test/suite/encryption/r/innochecksum.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; set global innodb_compression_algorithm = 1; # Create and populate a tables CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=4; @@ -23,5 +19,3 @@ CREATE TABLE t5 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB PAGE_CO # Write file to make mysql-test-run.pl start up the server again # Cleanup DROP TABLE t1, t2, t3, t4, t5; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result index 7c6a9d2ba83..dc5be714f66 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result @@ -11,10 +11,6 @@ call mtr.add_suppression("InnoDB: Tablespace id .* is encrypted but encryption s call mtr.add_suppression("InnoDB: InnoDB: Page may be an index page where index id is .*"); # Start server with keys2.txt -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2; INSERT INTO t1 VALUES ('foobar'); ALTER TABLE t1 ADD COLUMN c2 INT; diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change3.result b/mysql-test/suite/encryption/r/innodb-bad-key-change3.result index 6f4a46b4c44..79155bf43b9 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change3.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change3.result @@ -1,7 +1,5 @@ call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; set global innodb_compression_algorithm = 1; CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES ENCRYPTION_KEY_ID=4; SHOW WARNINGS; @@ -23,8 +21,6 @@ backup: t1 UNLOCK TABLES; ALTER TABLE t1 DISCARD TABLESPACE; restore: t1 .ibd and .cfg files -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; ALTER TABLE t1 IMPORT TABLESPACE; ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB SHOW CREATE TABLE t1; diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result index 369a8c7989c..d6c2706e8bf 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result @@ -4,16 +4,8 @@ call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop th call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal data dictionary of InnoDB though the .frm file for the table exists. See .* for how you can resolve the problem."); call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*"); call mtr.add_suppression("Couldn't load plugins from 'file_key_management*"); -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4; INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check Warning Table test/t1 in tablespace # is encrypted but encryption service or used key_id is not available. Can't continue reading table. @@ -22,5 +14,3 @@ test.t1 check error Corrupt SHOW WARNINGS; Level Code Message DROP TABLE t1; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change5.result b/mysql-test/suite/encryption/r/innodb-bad-key-change5.result index 9d8b1ddd23b..75a0587d35d 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change5.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change5.result @@ -4,16 +4,8 @@ call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop th call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal data dictionary of InnoDB though the .frm file for the table exists. See .* for how you can resolve the problem."); call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*"); call mtr.add_suppression("Couldn't load plugins from 'file_key_management*"); -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4; INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize Warning Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue checking table. @@ -30,5 +22,3 @@ Level Code Message Warning 192 Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue reading table. Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB DROP TABLE t1; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb-discard-import-change.result b/mysql-test/suite/encryption/r/innodb-discard-import-change.result index 2505780b70c..b0b01b7cf7b 100644 --- a/mysql-test/suite/encryption/r/innodb-discard-import-change.result +++ b/mysql-test/suite/encryption/r/innodb-discard-import-change.result @@ -1,6 +1,4 @@ call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded"); -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_compression_algorithm = 1; create table t1(c1 bigint not null primary key auto_increment, b char(200)) engine=innodb encrypted=yes encryption_key_id=4; create table t2(c1 bigint not null primary key auto_increment, b char(200)) engine=innodb encrypted=yes encryption_key_id=1; diff --git a/mysql-test/suite/encryption/r/innodb-discard-import.result b/mysql-test/suite/encryption/r/innodb-discard-import.result index 06f4abab9f4..91314a77177 100644 --- a/mysql-test/suite/encryption/r/innodb-discard-import.result +++ b/mysql-test/suite/encryption/r/innodb-discard-import.result @@ -1,7 +1,5 @@ call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_compression_algorithm = 1; create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=4; show warnings; diff --git a/mysql-test/suite/encryption/r/innodb-encryption-alter.result b/mysql-test/suite/encryption/r/innodb-encryption-alter.result index 2003df0f4f4..06e4172bbae 100644 --- a/mysql-test/suite/encryption/r/innodb-encryption-alter.result +++ b/mysql-test/suite/encryption/r/innodb-encryption-alter.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_encrypt_tables = ON; SET GLOBAL innodb_encryption_threads = 4; CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO ENCRYPTION_KEY_ID=4; @@ -53,5 +49,3 @@ Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB set innodb_default_encryption_key_id = 1; drop table t1,t2; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb-encryption-disable.result b/mysql-test/suite/encryption/r/innodb-encryption-disable.result index 62b233c1c93..63ad0cf13fb 100644 --- a/mysql-test/suite/encryption/r/innodb-encryption-disable.result +++ b/mysql-test/suite/encryption/r/innodb-encryption-disable.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; call mtr.add_suppression("InnoDB: Block in space_id .* in file test/.* encrypted"); call mtr.add_suppression("InnoDB: However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match."); call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop this table or install correct key management plugin and key file."); @@ -44,5 +40,3 @@ select * from t5; ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB drop table t1; drop table t5; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb-log-encrypt-crash.result b/mysql-test/suite/encryption/r/innodb-log-encrypt-crash.result deleted file mode 100644 index 5310fb6ace2..00000000000 --- a/mysql-test/suite/encryption/r/innodb-log-encrypt-crash.result +++ /dev/null @@ -1,19 +0,0 @@ -call mtr.add_suppression("InnoDB: New log files created, LSN=.*"); -call mtr.add_suppression("InnoDB: Creating foreign key constraint system tables."); -call mtr.add_suppression("InnoDB: Error: Table .*"); -CREATE TABLE t1 ( -pk bigint auto_increment, -col_int int, -col_int_key int, -col_char char(12), -col_char_key char(12), -primary key (pk), -key (`col_int_key` ), -key (`col_char_key` ) -) ENGINE=InnoDB; -CREATE TABLE t2 LIKE t1; -INSERT INTO t1 VALUES (NULL,1,1,'foo','foo'),(NULL,2,2,'bar','bar'),(NULL,3,3,'baz','baz'),(NULL,4,4,'qux','qux'); -INSERT INTO t2 -SELECT NULL, a1.col_int, a1.col_int_key, a1.col_char, a1.col_char_key -FROM t1 a1, t1 a2, t1 a3, t1 a4, t1 a5, t1 a6, t1 a7, t1 a8, t1 a9, t1 a10; -DROP TABLE t1, t2; diff --git a/mysql-test/suite/encryption/r/innodb-log-encrypt.result b/mysql-test/suite/encryption/r/innodb-log-encrypt.result deleted file mode 100644 index fb62292e1f3..00000000000 --- a/mysql-test/suite/encryption/r/innodb-log-encrypt.result +++ /dev/null @@ -1,59 +0,0 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; -create table t1(c1 bigint not null, b char(200), c varchar(200)) engine=innodb encrypted=yes encryption_key_id=1; -show warnings; -Level Code Message -create procedure innodb_insert_proc (repeat_count int) -begin -declare current_num int; -set current_num = 0; -while current_num < repeat_count do -insert into t1 values(current_num, substring(MD5(RAND()), -64), REPEAT('privatejanprivate',10)); -set current_num = current_num + 1; -end while; -end// -commit; -set autocommit=0; -call innodb_insert_proc(2000); -commit; -set autocommit=1; -update t1 set c1 = c1 +1; -select count(*) from t1; -count(*) -2000 -# ibdata1 yes on expecting NOT FOUND -NOT FOUND /privatejanprivate/ in ibdata1 -# t1 yes on expecting NOT FOUND -NOT FOUND /privatejanprivate/ in t1.ibd -# log0 yes on expecting NOT FOUND -NOT FOUND /privatejanprivate/ in ib_logfile0 -# log1 yes on expecting NOT FOUND -NOT FOUND /privatejanprivate/ in ib_logfile1 -# Restart mysqld --innodb_encrypt_log=0 -insert into t1 values(5000, substring(MD5(RAND()), -64), REPEAT('publicmessage',10)); -insert into t1 values(5001, substring(MD5(RAND()), -64), REPEAT('publicmessage',10)); -insert into t1 values(5002, substring(MD5(RAND()), -64), REPEAT('publicmessage',10)); -insert into t1 values(5003, substring(MD5(RAND()), -64), REPEAT('publicmessage',10)); -insert into t1 values(5004, substring(MD5(RAND()), -64), REPEAT('publicmessage',10)); -# ibdata1 yes on expecting NOT FOUND -NOT FOUND /privatejanprivate/ in ibdata1 -# t1 yes on expecting NOT FOUND -NOT FOUND /privatejanprivate/ in t1.ibd -# log0 yes on expecting NOT FOUND -NOT FOUND /privatejanprivate/ in ib_logfile0 -# log1 yes on expecting NOT FOUND -NOT FOUND /privatejanprivate/ in ib_logfile1 -# ibdata1 yes on expecting NOT FOUND -NOT FOUND /publicmessage/ in ibdata1 -# t1 yes on expecting NOT FOUND -NOT FOUND /publicmessage/ in t1.ibd -# log0 no on expecting FOUND/NOTFOUND depending where insert goes -FOUND /publicmessage/ in ib_logfile0 -# log1 no on expecting FOUND/NOTFOUND depending where insert goes -NOT FOUND /publicmessage/ in ib_logfile1 -drop procedure innodb_insert_proc; -drop table t1; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption-32k.result b/mysql-test/suite/encryption/r/innodb-page_encryption-32k.result index 6aa98a2fc68..fdebf23ce8f 100644 --- a/mysql-test/suite/encryption/r/innodb-page_encryption-32k.result +++ b/mysql-test/suite/encryption/r/innodb-page_encryption-32k.result @@ -1,9 +1,14 @@ call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1; create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=3; +ERROR HY000: Can't create table `test`.`innodb_dynamic` (errno: 140 "Wrong create options") +show warnings; +Level Code Message +Warning 140 InnoDB: ENCRYPTION_KEY_ID 3 not available +Error 1005 Can't create table `test`.`innodb_dynamic` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=33; create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant encrypted=yes encryption_key_id=4; show create table innodb_compact; Table Create Table @@ -16,7 +21,7 @@ Table Create Table innodb_dynamic CREATE TABLE `innodb_dynamic` ( `c1` bigint(20) NOT NULL, `b` char(200) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `encrypted`=yes `encryption_key_id`=3 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `encrypted`=yes `encryption_key_id`=33 show create table innodb_redundant; Table Create Table innodb_redundant CREATE TABLE `innodb_redundant` ( @@ -72,9 +77,6 @@ innodb_compact CREATE TABLE `innodb_compact` ( `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT alter table innodb_dynamic engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT; -Warnings: -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. show create table innodb_dynamic; Table Create Table innodb_dynamic CREATE TABLE `innodb_dynamic` ( diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption.result b/mysql-test/suite/encryption/r/innodb-page_encryption.result index 051fd602db5..1069b8652da 100644 --- a/mysql-test/suite/encryption/r/innodb-page_encryption.result +++ b/mysql-test/suite/encryption/r/innodb-page_encryption.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; show warnings; Level Code Message @@ -122,10 +118,6 @@ variable_value >= 0 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; variable_value >= 0 1 -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; update innodb_normal set c1 = c1 +1; update innodb_compact set c1 = c1 + 1; update innodb_compressed set c1 = c1 + 1; @@ -201,10 +193,6 @@ innodb_redundant CREATE TABLE `innodb_redundant` ( `c1` bigint(20) NOT NULL, `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; show create table innodb_compact; Table Create Table innodb_compact CREATE TABLE `innodb_compact` ( @@ -281,5 +269,3 @@ drop table innodb_compressed; drop table innodb_dynamic; drop table innodb_redundant; drop table innodb_defkey; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result b/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result index 6efefb23b87..a5bd7da8421 100644 --- a/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result +++ b/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; set global innodb_compression_algorithm = 1; create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb page_compressed=1; show warnings; @@ -76,10 +72,6 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_ variable_value >= 0 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decompressed'; variable_value >= 0 -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; set global innodb_compression_algorithm = 1; update innodb_normal set c1 = c1 + 1; update innodb_compact set c1 = c1 + 1; @@ -132,10 +124,6 @@ innodb_dynamic CREATE TABLE `innodb_dynamic` ( `c1` bigint(20) NOT NULL, `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; show create table innodb_normal; Table Create Table innodb_normal CREATE TABLE `innodb_normal` ( @@ -188,5 +176,3 @@ drop procedure innodb_insert_proc; drop table innodb_normal; drop table innodb_compact; drop table innodb_dynamic; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result b/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result index 672202de774..ce74ac52537 100644 --- a/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result +++ b/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result @@ -1,10 +1,6 @@ call mtr.add_suppression("KeyID 0 not found or with error. Check the key and the log*"); call mtr.add_suppression("Disabling redo log encryp*"); call mtr.add_suppression("InnoDB: Redo log crypto: Can't initialize to key version*"); -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; show warnings; Level Code Message @@ -101,10 +97,6 @@ variable_value >= 0 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; variable_value >= 0 1 -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; update innodb_normal set c1 = c1 +1; update innodb_compact set c1 = c1 + 1; update innodb_compressed set c1 = c1 + 1; @@ -172,10 +164,6 @@ innodb_redundant CREATE TABLE `innodb_redundant` ( `c1` bigint(20) NOT NULL, `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; show create table innodb_compact; Table Create Table innodb_compact CREATE TABLE `innodb_compact` ( @@ -253,5 +241,3 @@ pk 1 2 DROP TABLE t1; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb-read-only.result b/mysql-test/suite/encryption/r/innodb-read-only.result new file mode 100644 index 00000000000..5d063e129e2 --- /dev/null +++ b/mysql-test/suite/encryption/r/innodb-read-only.result @@ -0,0 +1,3 @@ +# Wait max 10 min for key encryption threads to encrypt all spaces +# Success! +# All done diff --git a/mysql-test/suite/encryption/r/innodb-scrub-log.result b/mysql-test/suite/encryption/r/innodb-scrub-log.result new file mode 100644 index 00000000000..8ea75000368 --- /dev/null +++ b/mysql-test/suite/encryption/r/innodb-scrub-log.result @@ -0,0 +1,3 @@ +create table t1(a int not null primary key auto_increment, +b varchar(200), c char(100), d varchar(150)) engine=innodb; +DROP TABLE t1; diff --git a/mysql-test/suite/encryption/r/innodb-spatial-index.result b/mysql-test/suite/encryption/r/innodb-spatial-index.result new file mode 100644 index 00000000000..7ad0af72bcd --- /dev/null +++ b/mysql-test/suite/encryption/r/innodb-spatial-index.result @@ -0,0 +1,42 @@ +CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, +c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB +ENCRYPTED=YES; +ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") +CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, +c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB; +ALTER TABLE t1 ENCRYPTED=YES; +ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +DROP TABLE t1; +CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, +c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=YES ENGINE=INNODB; +CREATE SPATIAL INDEX b on t1(coordinate); +ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate); +ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +DROP TABLE t1; +CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, +c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=DEFAULT ENGINE=INNODB; +CREATE SPATIAL INDEX b on t1(coordinate); +INSERT INTO t1 values(1, 'secret', ST_GeomFromText('POINT(903994614 180726515)')); +ALTER TABLE t1 DROP INDEX b; +INSERT INTO t1 values(2, 'secret', ST_GeomFromText('POINT(903994614 180726515)')); +ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate); +INSERT INTO t1 values(3, 'secret', ST_GeomFromText('POINT(903994614 180726515)')); +DROP TABLE t1; +CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, +c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB; +CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT, +c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB PAGE_COMPRESSED=YES; +INSERT INTO t1 values(1, 'secret', ST_GeomFromText('POINT(903994614 180726515)')); +INSERT INTO t2 values(1, 'secret', ST_GeomFromText('POINT(903994614 180726515)')); +# Success! +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION > 0; +NAME +mysql/innodb_table_stats +mysql/innodb_index_stats +test/t1 +test/t2 +NULL +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0; +NAME +DROP TABLE t1, t2; diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_log.result b/mysql-test/suite/encryption/r/innodb_encrypt_log.result new file mode 100644 index 00000000000..c660ebe336b --- /dev/null +++ b/mysql-test/suite/encryption/r/innodb_encrypt_log.result @@ -0,0 +1,65 @@ +# +# MDEV-9011: Redo log encryption does not work +# +# +# MDEV-9422 Encrypted redo log checksum errors +# on restart after killing busy server instance +# +SET GLOBAL innodb_log_checksums=0; +Warnings: +Warning 138 innodb_encrypt_log implies innodb_log_checksums +SELECT @@global.innodb_log_checksums; +@@global.innodb_log_checksums +1 +CREATE TABLE t0 ( +pk bigint auto_increment, +col_int int, +col_int_key int, +col_char char(12), +col_char_key char(12), +primary key (pk), +key (col_int_key), +key (col_char_key) +) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1; +CREATE TEMPORARY TABLE t LIKE t0; +INSERT INTO t VALUES +(NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'), +(NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament'); +SET GLOBAL innodb_flush_log_at_trx_commit=1; +INSERT INTO t0 +SELECT NULL, t1.col_int, t1.col_int_key, t1.col_char, t1.col_char_key +FROM t t1, t t2, t t3, t t4, t t5; +# Kill the server +# ibdata1 expecting NOT FOUND +NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ibdata1 +# t0.ibd expecting NOT FOUND +NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in t0.ibd +# ib_logfile0 expecting NOT FOUND +NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0 +# ib_logfile1 expecting NOT FOUND +NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile1 +# Restart without redo log encryption +SELECT COUNT(*) FROM t0; +COUNT(*) +1024 +CHECK TABLE t0; +Table Op Msg_type Msg_text +test.t0 check status OK +SET GLOBAL innodb_flush_log_at_trx_commit=1; +INSERT INTO t0 VALUES(NULL, 5, 5, 'public', 'gossip'); +# Kill the server +# ib_logfile0 expecting NOT FOUND +NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0 +# ib_logfile0 expecting FOUND +FOUND /public|gossip/ in ib_logfile0 +# ibdata1 expecting NOT FOUND +NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in ibdata1 +# t0.ibd expecting NOT FOUND +NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in t0.ibd +SELECT COUNT(*) FROM t0; +COUNT(*) +1025 +CHECK TABLE t0; +Table Op Msg_type Msg_text +test.t0 check status OK +DROP TABLE t0; diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result b/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result new file mode 100644 index 00000000000..957a8c1eec9 --- /dev/null +++ b/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result @@ -0,0 +1,104 @@ +# redo log from before MariaDB 10.2.2/MySQL 5.7.9 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2\./ in mysqld.1.err +# redo log from before MariaDB 10.2.2, with corrupted log checkpoint +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint/ in mysqld.1.err +FOUND /Plugin 'InnoDB' registration as a STORAGE ENGINE failed/ in mysqld.1.err +# redo log from before MariaDB 10.2.2, with corrupted log block +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err +# redo log from "after" MariaDB 10.2.2, but with invalid header checksum +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Invalid redo log header checksum/ in mysqld.1.err +# distant future redo log format, with valid header checksum +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Unsupported redo log format. The redo log was created with malicious intentions, or perhaps\. Please follow the instructions at http://dev.mysql.com/doc/refman/5.7/en/upgrading-downgrading.html/ in mysqld.1.err +# valid header, but old-format checkpoint blocks +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: No valid checkpoint found .corrupted redo log/ in mysqld.1.err +# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err +FOUND /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err +# --innodb-force-recovery=6 (skip the entire redo log) +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES +FOUND /\[Note\] InnoDB: .* started; log sequence number 0/ in mysqld.1.err +# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +# --innodb-force-recovery=6 (skip the entire redo log) +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES +# Test a corrupted MLOG_FILE_NAME record. +# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Starting crash recovery from checkpoint LSN=1213964/ in mysqld.1.err +FOUND /InnoDB: MLOG_FILE_NAME incorrect:bogus/ in mysqld.1.err +FOUND /InnoDB: ############### CORRUPT LOG RECORD FOUND ##################/ in mysqld.1.err +FOUND /InnoDB: Log record type 55, page 151:488\. Log parsing proceeded successfully up to 1213973\. Previous log record type 56, is multi 0 Recv offset 9, prev 0/ in mysqld.1.err +FOUND /len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8 bogus / in mysqld.1.err +FOUND /InnoDB: Set innodb_force_recovery to ignore this error/ in mysqld.1.err +# Test a corrupted MLOG_FILE_NAME record. +# valid header, invalid checkpoint 1, valid checkpoint 2, invalid block +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 2454333373 found: 150151/ in mysqld.1.err +# valid header, invalid checkpoint 1, valid checkpoint 2, invalid log record +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: MLOG_FILE_NAME incorrect:bigot/ in mysqld.1.err +FOUND /len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;/ in mysqld.1.err +# missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +NOT FOUND /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42$/ in mysqld.1.err +# Minimal MariaDB 10.1.21 encrypted redo log +SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +1 +1 +FOUND /InnoDB: Encrypting redo log/ in mysqld.1.err +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ibdata1 diff --git a/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result b/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result index 9523c7c3982..60b9ff57605 100644 --- a/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result +++ b/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_encryption_threads = 4; SET GLOBAL innodb_encrypt_tables = on; set global innodb_compression_algorithm = 1; @@ -264,5 +260,3 @@ drop table innodb_page_compressed6; drop table innodb_page_compressed7; drop table innodb_page_compressed8; drop table innodb_page_compressed9; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result index ae1fbdebcb3..91581eb8837 100644 --- a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result +++ b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result @@ -1,7 +1,5 @@ call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes; CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB; CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB row_format=compressed encrypted=yes; diff --git a/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result b/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result index 576b44fe897..54cdf842b20 100644 --- a/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result +++ b/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result @@ -1,8 +1,4 @@ call mtr.add_suppression("trying to do an operation on a dropped tablespace .*"); -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_encrypt_tables = OFF; SET GLOBAL innodb_encryption_threads = 4; CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB; @@ -65,7 +61,5 @@ COUNT(1) SELECT COUNT(1) FROM t5; COUNT(1) 400 -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html drop table t1,t2,t3,t4, t5; set GLOBAL innodb_default_encryption_key_id=1; diff --git a/mysql-test/suite/encryption/r/innodb_encryption_is.result b/mysql-test/suite/encryption/r/innodb_encryption_is.result index 591c5a84ccc..0ce4a11f1ea 100644 --- a/mysql-test/suite/encryption/r/innodb_encryption_is.result +++ b/mysql-test/suite/encryption/r/innodb_encryption_is.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1; CREATE TABLE t2 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2; INSERT INTO t1 VALUES ('foobar'); @@ -14,5 +10,3 @@ NAME ENCRYPTION_SCHEME MIN_KEY_VERSION CURRENT_KEY_VERSION CURRENT_KEY_ID test/t1 1 1 1 1 test/t2 1 1 1 2 DROP TABLE t1, t2; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result b/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result index e49e38a8f3f..3d616ee71e3 100644 --- a/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result +++ b/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; create table innodb_compressed1(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed encrypted=yes; create table innodb_compressed2(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=1 encrypted=yes; create table innodb_compressed3(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=2 encrypted=yes; @@ -27,10 +23,6 @@ NOT FOUND /private/ in innodb_compressed2.ibd NOT FOUND /private/ in innodb_compressed3.ibd # t4 yes on expecting NOT FOUND NOT FOUND /private/ in innodb_compressed4.ibd -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; select * from innodb_compressed1 where d = 20; c1 d a b 1 20 private evenmoreprivate @@ -155,5 +147,3 @@ drop table innodb_compressed1; drop table innodb_compressed2; drop table innodb_compressed3; drop table innodb_compressed4; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb_encryption_tables.result b/mysql-test/suite/encryption/r/innodb_encryption_tables.result index da62c0a2f0e..e7bcc207612 100644 --- a/mysql-test/suite/encryption/r/innodb_encryption_tables.result +++ b/mysql-test/suite/encryption/r/innodb_encryption_tables.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact; create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic; @@ -105,10 +101,6 @@ variable_value >= 0 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed'; variable_value >= 0 1 -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; update innodb_normal set c1 = c1 + 1; update innodb_compact set c1 = c1 + 1; update innodb_dynamic set c1 = c1 + 1; @@ -163,5 +155,3 @@ drop table innodb_compact; drop table innodb_dynamic; drop table innodb_compressed; drop table innodb_redundant; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb_lotoftables.result b/mysql-test/suite/encryption/r/innodb_lotoftables.result index 34f2684253e..cf5724b527a 100644 --- a/mysql-test/suite/encryption/r/innodb_lotoftables.result +++ b/mysql-test/suite/encryption/r/innodb_lotoftables.result @@ -1,5 +1,4 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; +SET GLOBAL innodb_fast_shutdown=0; SHOW VARIABLES LIKE 'innodb_encrypt%'; Variable_name Value innodb_encrypt_log OFF @@ -87,44 +86,44 @@ Innodb_pages0_read 3 # Restart Success! show status like 'innodb_pages0_read%'; Variable_name Value -Innodb_pages0_read 3 +Innodb_pages0_read 303 show status like 'innodb_pages0_read%'; Variable_name Value -Innodb_pages0_read 3 +Innodb_pages0_read 303 use test; show status like 'innodb_pages0_read%'; Variable_name Value -Innodb_pages0_read 3 +Innodb_pages0_read 303 use innodb_encrypted_1; show status like 'innodb_pages0_read%'; Variable_name Value -Innodb_pages0_read 3 +Innodb_pages0_read 303 use innodb_encrypted_2; show status like 'innodb_pages0_read%'; Variable_name Value -Innodb_pages0_read 3 +Innodb_pages0_read 303 use innodb_encrypted_3; show status like 'innodb_pages0_read%'; Variable_name Value -Innodb_pages0_read 3 +Innodb_pages0_read 303 use innodb_encrypted_1; show status like 'innodb_pages0_read%'; Variable_name Value -Innodb_pages0_read 3 +Innodb_pages0_read 303 show status like 'innodb_pages0_read%'; Variable_name Value -Innodb_pages0_read 103 +Innodb_pages0_read 303 use innodb_encrypted_2; show status like 'innodb_pages0_read%'; Variable_name Value -Innodb_pages0_read 103 +Innodb_pages0_read 303 show status like 'innodb_pages0_read%'; Variable_name Value -Innodb_pages0_read 203 +Innodb_pages0_read 303 use innodb_encrypted_3; show status like 'innodb_pages0_read%'; Variable_name Value -Innodb_pages0_read 203 +Innodb_pages0_read 303 show status like 'innodb_pages0_read%'; Variable_name Value Innodb_pages0_read 303 diff --git a/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result b/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result index 798e0ca4357..d04525b0d5a 100644 --- a/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result +++ b/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes; CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB; CREATE TABLE t3 (id INT, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes; @@ -176,5 +172,3 @@ NOT FOUND /mangled/ in t6.ibd NOT FOUND /mysql/ in t7.ibd DROP PROCEDURE innodb_insert_proc; DROP TABLE t1, t2, t3, t4, t5, t6, t7; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result b/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result index 22038c0e933..d3406e67f18 100644 --- a/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result +++ b/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result @@ -1,8 +1,4 @@ # Restart mysqld --loose-file-key-management-filename=keys2.txt -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; show warnings; Level Code Message @@ -106,10 +102,6 @@ variable_value >= 0 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; variable_value >= 0 1 -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; alter table innodb_compact engine=innodb encryption_key_id = 2; alter table innodb_compressed engine=innodb encryption_key_id = 3; alter table innodb_dynamic engine=innodb encryption_key_id = 4; @@ -155,5 +147,3 @@ drop table innodb_compact; drop table innodb_compressed; drop table innodb_dynamic; drop table innodb_redundant; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/encryption/r/innodb_scrub.result b/mysql-test/suite/encryption/r/innodb_scrub.result index 95f0aed3226..e3dd48b2c51 100644 --- a/mysql-test/suite/encryption/r/innodb_scrub.result +++ b/mysql-test/suite/encryption/r/innodb_scrub.result @@ -1,207 +1,121 @@ create table snapshot_status engine = myisam select * from information_schema.global_status -where variable_name like 'innodb_scrub%'; -# -# Test delete of records -# -create table t1 ( +where variable_name like 'innodb_scrub_background%'; +# MDEV-8139 Fix scrubbing tests +# FIXME: Add index(b) to each table; ensure that undo logs are scrubbed. +create table delete_3 ( +a int auto_increment primary key, +b varchar(256), +c text) engine = innodb row_format=compressed; +delete from delete_3; +create table delete_rollback_delete_3 ( +a int auto_increment primary key, +b varchar(256), +c text) engine = innodb row_format=compressed; +begin; +delete from delete_rollback_delete_3; +rollback; +delete from delete_rollback_delete_3; +create table insert_rollback_3 ( +a int auto_increment primary key, +b varchar(256), +c text) engine = innodb row_format=compressed; +begin; +rollback; +create table delete_2 ( a int auto_increment primary key, b varchar(256), c text) engine = innodb row_format=compact; -# Populate table with rows -delete from t1; -# restart mysqld so that all pages are flushed -# read all rows from table -select * from t1; -# compact: delete from: grep -c bicycle t1.ibd -0 -# compact: delete from: grep -c bicycle ibdata1 -0 -# compact: delete from: grep -c repairman t1.ibd -0 -# compact: delete from: grep -c repairman ibdata1 -0 -drop table t1; -# -# Test delete+rollback+delete -# -create table t1 ( +delete from delete_2; +create table delete_rollback_delete_2 ( a int auto_increment primary key, b varchar(256), c text) engine = innodb row_format=compact; -# Populate table with rows begin; -delete from t1; +delete from delete_rollback_delete_2; rollback; -delete from t1; -# restart mysqld so that all pages are flushed -# read all rows from table -select * from t1; -# compact: delete rollback: grep -c bicycle t1.ibd -0 -# compact: delete rollback: grep -c bicycle ibdata1 -0 -# compact: delete rollback: grep -c repairman t1.ibd -0 -# compact: delete rollback: grep -c repairman ibdata1 -0 -drop table t1; -# -# Test insert+rollback -# -create table t1 ( +delete from delete_rollback_delete_2; +create table insert_rollback_2 ( a int auto_increment primary key, b varchar(256), c text) engine = innodb row_format=compact; -# Populate table with rows begin; rollback; -# restart mysqld so that all pages are flushed -# read all rows from table -select * from t1; -# compact: insert rollback: grep -c bicycle t1.ibd -0 -# compact: insert rollback: grep -c bicycle ibdata1 -0 -# compact: insert rollback: grep -c repairman t1.ibd -0 -# compact: insert rollback: grep -c repairman ibdata1 -0 -drop table t1; -# -# Test delete of records -# -create table t1 ( +create table delete_1 ( a int auto_increment primary key, b varchar(256), c text) engine = innodb row_format=redundant; -# Populate table with rows -delete from t1; -# restart mysqld so that all pages are flushed -# read all rows from table -select * from t1; -# redundant: delete from: grep -c bicycle t1.ibd -0 -# redundant: delete from: grep -c bicycle ibdata1 -0 -# redundant: delete from: grep -c repairman t1.ibd -0 -# redundant: delete from: grep -c repairman ibdata1 -0 -drop table t1; -# -# Test delete+rollback+delete -# -create table t1 ( +delete from delete_1; +create table delete_rollback_delete_1 ( a int auto_increment primary key, b varchar(256), c text) engine = innodb row_format=redundant; -# Populate table with rows begin; -delete from t1; +delete from delete_rollback_delete_1; rollback; -delete from t1; -# restart mysqld so that all pages are flushed -# read all rows from table -select * from t1; -# redundant: delete rollback: grep -c bicycle t1.ibd -0 -# redundant: delete rollback: grep -c bicycle ibdata1 -0 -# redundant: delete rollback: grep -c repairman t1.ibd -0 -# redundant: delete rollback: grep -c repairman ibdata1 -0 -drop table t1; -# -# Test insert+rollback -# -create table t1 ( +delete from delete_rollback_delete_1; +create table insert_rollback_1 ( a int auto_increment primary key, b varchar(256), c text) engine = innodb row_format=redundant; -# Populate table with rows begin; rollback; -# restart mysqld so that all pages are flushed -# read all rows from table -select * from t1; -# redundant: insert rollback: grep -c bicycle t1.ibd -0 -# redundant: insert rollback: grep -c bicycle ibdata1 -0 -# redundant: insert rollback: grep -c repairman t1.ibd -0 -# redundant: insert rollback: grep -c repairman ibdata1 -0 -drop table t1; -# -# Test delete of records -# -create table t1 ( +create table delete_0 ( a int auto_increment primary key, b varchar(256), c text) engine = innodb row_format=dynamic; -# Populate table with rows -delete from t1; -# restart mysqld so that all pages are flushed -# read all rows from table -select * from t1; -# dynamic: delete from: grep -c bicycle t1.ibd -0 -# dynamic: delete from: grep -c bicycle ibdata1 -0 -# dynamic: delete from: grep -c repairman t1.ibd -0 -# dynamic: delete from: grep -c repairman ibdata1 -0 -drop table t1; -# -# Test delete+rollback+delete -# -create table t1 ( +delete from delete_0; +create table delete_rollback_delete_0 ( a int auto_increment primary key, b varchar(256), c text) engine = innodb row_format=dynamic; -# Populate table with rows begin; -delete from t1; +delete from delete_rollback_delete_0; rollback; -delete from t1; -# restart mysqld so that all pages are flushed -# read all rows from table -select * from t1; -# dynamic: delete rollback: grep -c bicycle t1.ibd -0 -# dynamic: delete rollback: grep -c bicycle ibdata1 -0 -# dynamic: delete rollback: grep -c repairman t1.ibd -0 -# dynamic: delete rollback: grep -c repairman ibdata1 -0 -drop table t1; -# -# Test insert+rollback -# -create table t1 ( +delete from delete_rollback_delete_0; +create table insert_rollback_0 ( a int auto_increment primary key, b varchar(256), c text) engine = innodb row_format=dynamic; -# Populate table with rows begin; rollback; -# restart mysqld so that all pages are flushed -# read all rows from table -select * from t1; -# dynamic: insert rollback: grep -c bicycle t1.ibd -0 -# dynamic: insert rollback: grep -c bicycle ibdata1 -0 -# dynamic: insert rollback: grep -c repairman t1.ibd -0 -# dynamic: insert rollback: grep -c repairman ibdata1 -0 -drop table t1; +SET GLOBAL innodb_fast_shutdown=0; +# delete_3.ibd +# delete_rollback_delete_3.ibd +# insert_rollback_3.ibd +# delete_2.ibd +# delete_rollback_delete_2.ibd +# insert_rollback_2.ibd +# delete_1.ibd +# delete_rollback_delete_1.ibd +# insert_rollback_1.ibd +# delete_0.ibd +# delete_rollback_delete_0.ibd +# insert_rollback_0.ibd +check table delete_3, delete_rollback_delete_3, insert_rollback_3; +Table Op Msg_type Msg_text +test.delete_3 check status OK +test.delete_rollback_delete_3 check status OK +test.insert_rollback_3 check status OK +drop table delete_3, delete_rollback_delete_3, insert_rollback_3; +check table delete_2, delete_rollback_delete_2, insert_rollback_2; +Table Op Msg_type Msg_text +test.delete_2 check status OK +test.delete_rollback_delete_2 check status OK +test.insert_rollback_2 check status OK +drop table delete_2, delete_rollback_delete_2, insert_rollback_2; +check table delete_1, delete_rollback_delete_1, insert_rollback_1; +Table Op Msg_type Msg_text +test.delete_1 check status OK +test.delete_rollback_delete_1 check status OK +test.insert_rollback_1 check status OK +drop table delete_1, delete_rollback_delete_1, insert_rollback_1; +check table delete_0, delete_rollback_delete_0, insert_rollback_0; +Table Op Msg_type Msg_text +test.delete_0 check status OK +test.delete_rollback_delete_0 check status OK +test.insert_rollback_0 check status OK +drop table delete_0, delete_rollback_delete_0, insert_rollback_0; show variables like 'innodb_%scrub_data%'; Variable_name Value innodb_background_scrub_data_check_interval 3600 diff --git a/mysql-test/suite/encryption/r/innodb_scrub_background.result b/mysql-test/suite/encryption/r/innodb_scrub_background.result index 1ff6c0bda98..6a2f263d0a1 100644 --- a/mysql-test/suite/encryption/r/innodb_scrub_background.result +++ b/mysql-test/suite/encryption/r/innodb_scrub_background.result @@ -11,66 +11,146 @@ innodb_background_scrub_data_uncompressed ON innodb_immediate_scrub_data_uncompressed OFF # make sure spaces are checked quickly SET GLOBAL innodb_background_scrub_data_check_interval=1; -create table snapshot_status engine = myisam -select * from information_schema.global_status -where variable_name like 'innodb_scrub%'; -truncate table snapshot_status; -insert into snapshot_status -select * from information_schema.global_status -where variable_name like 'innodb_scrub%'; -# -# Test delete of records -# -create table t1 ( +create table delete_3 ( a int auto_increment primary key, b varchar(256), -c text, index(b)) engine = innodb row_format=dynamic; +c text, +index(b)) engine = innodb row_format=compressed; # Populate table with rows -delete from t1; -# -# Test delete+rollback+delete -# -create table t2 ( +delete from delete_3; +create table delete_rollback_delete_3 ( a int auto_increment primary key, b varchar(256), -c text, index(b)) engine = innodb row_format=dynamic; +c text, +index(b)) engine = innodb row_format=compressed; # Populate table with rows begin; -delete from t2; +delete from delete_rollback_delete_3; rollback; -delete from t2; -# -# Test insert+rollback -# -create table t3 ( +delete from delete_rollback_delete_3; +create table insert_rollback_3 ( a int auto_increment primary key, b varchar(256), -c text, index(b)) engine = innodb row_format=dynamic; +c text, +index(b)) engine = innodb row_format=compressed; +# Populate table with rows +begin; +rollback; +create table delete_2 ( +a int auto_increment primary key, +b varchar(256), +c text, +index(b)) engine = innodb row_format=compact; +# Populate table with rows +delete from delete_2; +create table delete_rollback_delete_2 ( +a int auto_increment primary key, +b varchar(256), +c text, +index(b)) engine = innodb row_format=compact; +# Populate table with rows +begin; +delete from delete_rollback_delete_2; +rollback; +delete from delete_rollback_delete_2; +create table insert_rollback_2 ( +a int auto_increment primary key, +b varchar(256), +c text, +index(b)) engine = innodb row_format=compact; +# Populate table with rows +begin; +rollback; +create table delete_1 ( +a int auto_increment primary key, +b varchar(256), +c text, +index(b)) engine = innodb row_format=redundant; +# Populate table with rows +delete from delete_1; +create table delete_rollback_delete_1 ( +a int auto_increment primary key, +b varchar(256), +c text, +index(b)) engine = innodb row_format=redundant; +# Populate table with rows +begin; +delete from delete_rollback_delete_1; +rollback; +delete from delete_rollback_delete_1; +create table insert_rollback_1 ( +a int auto_increment primary key, +b varchar(256), +c text, +index(b)) engine = innodb row_format=redundant; +# Populate table with rows +begin; +rollback; +create table delete_0 ( +a int auto_increment primary key, +b varchar(256), +c text, +index(b)) engine = innodb row_format=dynamic; +# Populate table with rows +delete from delete_0; +create table delete_rollback_delete_0 ( +a int auto_increment primary key, +b varchar(256), +c text, +index(b)) engine = innodb row_format=dynamic; +# Populate table with rows +begin; +delete from delete_rollback_delete_0; +rollback; +delete from delete_rollback_delete_0; +create table insert_rollback_0 ( +a int auto_increment primary key, +b varchar(256), +c text, +index(b)) engine = innodb row_format=dynamic; # Populate table with rows begin; rollback; # start scrubbing threads SET GLOBAL innodb_encryption_threads=5; # Wait max 10 min for scrubbing -# Success! -# stop scrubbing threads -SET GLOBAL innodb_encryption_threads=0; -# restart mysqld so that all pages are flushed -# read all rows from table -select * from t1; -# dynamic: delete: grep -c bicycle t1.ibd -0 -# dynamic: delete: grep -c repairman t1.ibd -0 -# dynamic: delete rollback: grep -c bicycle t2.ibd -0 -# dynamic: delete rollback: grep -c repairman t2.ibd -0 -# dynamic: insert rollback: grep -c bicycle t3.ibd -0 -# dynamic: insert rollback: grep -c repairman t3.ibd -0 -drop table t1, t2, t3; +SET GLOBAL innodb_fast_shutdown=0; +# delete_3.ibd +# delete_rollback_delete_3.ibd +# insert_rollback_3.ibd +# delete_2.ibd +# delete_rollback_delete_2.ibd +# insert_rollback_2.ibd +# delete_1.ibd +# delete_rollback_delete_1.ibd +# insert_rollback_1.ibd +# delete_0.ibd +# delete_rollback_delete_0.ibd +# insert_rollback_0.ibd +check table delete_3, delete_rollback_delete_3, insert_rollback_3; +Table Op Msg_type Msg_text +test.delete_3 check status OK +test.delete_rollback_delete_3 check status OK +test.insert_rollback_3 check status OK +drop table delete_3, delete_rollback_delete_3, insert_rollback_3; +check table delete_2, delete_rollback_delete_2, insert_rollback_2; +Table Op Msg_type Msg_text +test.delete_2 check status OK +test.delete_rollback_delete_2 check status OK +test.insert_rollback_2 check status OK +drop table delete_2, delete_rollback_delete_2, insert_rollback_2; +check table delete_1, delete_rollback_delete_1, insert_rollback_1; +Table Op Msg_type Msg_text +test.delete_1 check status OK +test.delete_rollback_delete_1 check status OK +test.insert_rollback_1 check status OK +drop table delete_1, delete_rollback_delete_1, insert_rollback_1; +check table delete_0, delete_rollback_delete_0, insert_rollback_0; +Table Op Msg_type Msg_text +test.delete_0 check status OK +test.delete_rollback_delete_0 check status OK +test.insert_rollback_0 check status OK +drop table delete_0, delete_rollback_delete_0, insert_rollback_0; show variables like 'innodb_%scrub_data%'; Variable_name Value innodb_background_scrub_data_check_interval 3600 @@ -78,4 +158,3 @@ innodb_background_scrub_data_compressed ON innodb_background_scrub_data_interval 604800 innodb_background_scrub_data_uncompressed ON innodb_immediate_scrub_data_uncompressed OFF -drop table snapshot_status; diff --git a/mysql-test/suite/encryption/r/innodb_scrub_compressed.result b/mysql-test/suite/encryption/r/innodb_scrub_compressed.result deleted file mode 100644 index 0b5e9f11a05..00000000000 --- a/mysql-test/suite/encryption/r/innodb_scrub_compressed.result +++ /dev/null @@ -1,71 +0,0 @@ -# make sure spaces are checked quickly -SET GLOBAL innodb_background_scrub_data_check_interval=1; -# -# Test delete of records -# -create table t1 ( -a int auto_increment primary key, -b varchar(256), -c text) engine = innodb row_format=compressed; -# Populate table with rows -delete from t1; -# -# Test delete+rollback+delete -# -create table t2 ( -a int auto_increment primary key, -b varchar(256), -c text) engine = innodb row_format=compressed; -# Populate table with rows -begin; -delete from t2; -rollback; -delete from t2; -# -# Test insert+rollback -# -create table t3 ( -a int auto_increment primary key, -b varchar(256), -c text) engine = innodb row_format=compressed; -# Populate table with rows -begin; -rollback; -# start scrubbing threads -SET GLOBAL innodb_encryption_threads=5; -# Wait max 10 min for scrubbing of this table -# Success! -# stop scrubbing threads -SET GLOBAL innodb_encryption_threads=0; -# Now there should be background scrubs -# restart mysqld so that all pages are flushed (encryption off) -# so that grep will find stuff -# read all rows from table -select * from t1; -select * from t2; -select * from t3; -# grep -c bicycle t1.ibd -0 -# grep -c bicycle ibdata1 -0 -# grep -c repairman t1.ibd -0 -# grep -c repairman ibdata1 -0 -# grep -c boondoggle t2.ibd -0 -# grep -c boondoggle ibdata1 -0 -# grep -c waste t2.ibd -0 -# grep -c waste ibdata1 -0 -# grep -c keso t3.ibd -0 -# grep -c keso ibdata1 -0 -# grep -c kent t3.ibd -0 -# grep -c kent ibdata1 -0 -drop table t1, t2, t3; diff --git a/mysql-test/suite/encryption/t/innochecksum.test b/mysql-test/suite/encryption/t/innochecksum.test index 7b41b2c5413..39e86d49674 100644 --- a/mysql-test/suite/encryption/t/innochecksum.test +++ b/mysql-test/suite/encryption/t/innochecksum.test @@ -15,13 +15,9 @@ if (!$INNOCHECKSUM) { --disable_query_log let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; let MYSQLD_DATADIR= `SELECT @@datadir`; --enable_query_log -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; # zlib set global innodb_compression_algorithm = 1; @@ -97,6 +93,4 @@ DROP TABLE t1, t2, t3, t4, t5; # reset system --disable_query_log EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; --enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test index 3bcce90b01a..cc5e6b36ac3 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test @@ -29,14 +29,6 @@ call mtr.add_suppression("InnoDB: InnoDB: Page may be an index page where index -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt -- source include/restart_mysqld.inc ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2; INSERT INTO t1 VALUES ('foobar'); ALTER TABLE t1 ADD COLUMN c2 INT; diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change3.test b/mysql-test/suite/encryption/t/innodb-bad-key-change3.test index b3ebe1c4aa5..dbd04748143 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change3.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change3.test @@ -12,11 +12,6 @@ call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - --let $MYSQLD_TMPDIR = `SELECT @@tmpdir` --let $MYSQLD_DATADIR = `SELECT @@datadir` --let SEARCH_RANGE = 10000000 @@ -34,11 +29,7 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc ---disable_warnings -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; set global innodb_compression_algorithm = 1; ---enable_warnings CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES ENCRYPTION_KEY_ID=4; SHOW WARNINGS; @@ -76,11 +67,6 @@ EOF --source include/wait_until_connected_again.inc --source include/restart_mysqld.inc ---disable_warnings -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; ---enable_warnings - --error ER_GET_ERRMSG ALTER TABLE t1 IMPORT TABLESPACE; SHOW CREATE TABLE t1; @@ -109,12 +95,6 @@ EOF DROP TABLE t1; # reset system ---disable_warnings ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log ---enable_warnings --remove_file $MYSQLTEST_VARDIR/keys1.txt --remove_file $MYSQLTEST_VARDIR/keys2.txt diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test index 82da3bbcf70..0b1db40b866 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test @@ -32,14 +32,6 @@ EOF --let $MYSQLD_TMPDIR = `SELECT @@tmpdir` --let $MYSQLD_DATADIR = `SELECT @@datadir` ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4; INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); @@ -56,9 +48,6 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - --replace_regex /tablespace [0-9]*/tablespace #/ CHECK TABLE t1; SHOW WARNINGS; @@ -82,9 +71,3 @@ EOF DROP TABLE t1; --remove_file $MYSQLTEST_VARDIR/keys1.txt - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change5.test b/mysql-test/suite/encryption/t/innodb-bad-key-change5.test index c6c0c963818..5f63eebe034 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change5.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change5.test @@ -32,14 +32,6 @@ EOF --let $MYSQLD_TMPDIR = `SELECT @@tmpdir` --let $MYSQLD_DATADIR = `SELECT @@datadir` ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4; INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); @@ -56,9 +48,6 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - OPTIMIZE TABLE t1; SHOW WARNINGS; @@ -80,9 +69,3 @@ EOF DROP TABLE t1; --remove_file $MYSQLTEST_VARDIR/keys1.txt - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb-discard-import-change.test b/mysql-test/suite/encryption/t/innodb-discard-import-change.test index a278a8fba29..2cb6865ed95 100644 --- a/mysql-test/suite/encryption/t/innodb-discard-import-change.test +++ b/mysql-test/suite/encryption/t/innodb-discard-import-change.test @@ -6,17 +6,9 @@ call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded"); ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; let $innodb_compression_algo = `SELECT @@innodb_compression_algorithm`; ---enable_query_log ---disable_warnings -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_compression_algorithm = 1; ---enable_warnings create table t1(c1 bigint not null primary key auto_increment, b char(200)) engine=innodb encrypted=yes encryption_key_id=4; create table t2(c1 bigint not null primary key auto_increment, b char(200)) engine=innodb encrypted=yes encryption_key_id=1; @@ -121,11 +113,6 @@ SELECT COUNT(*) FROM t5; DROP TABLE t1,t2,t3,t4,t5,t6; # reset system ---disable_warnings --disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algo; --enable_query_log ---enable_warnings - diff --git a/mysql-test/suite/encryption/t/innodb-discard-import.test b/mysql-test/suite/encryption/t/innodb-discard-import.test index 9feaacc41e5..e105cf82b67 100644 --- a/mysql-test/suite/encryption/t/innodb-discard-import.test +++ b/mysql-test/suite/encryption/t/innodb-discard-import.test @@ -13,17 +13,8 @@ call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; let $innodb_compression_algo = `SELECT @@innodb_compression_algorithm`; ---enable_query_log - ---disable_warnings -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_compression_algorithm = 1; ---enable_warnings --let $MYSQLD_TMPDIR = `SELECT @@tmpdir` --let $MYSQLD_DATADIR = `SELECT @@datadir` @@ -126,10 +117,6 @@ DROP PROCEDURE innodb_insert_proc; DROP TABLE t1,t2,t3,t4; # reset system ---disable_warnings --disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algo; --enable_query_log ---enable_warnings diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test index 316ece1c16b..cb7d5a47975 100644 --- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test +++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test @@ -5,15 +5,9 @@ # MDEV-8817: Failing assertion: new_state->key_version != ENCRYPTION_KEY_VERSION_INVALID # ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; let $encrypt_tables = `SELECT @@innodb_encrypt_tables`; let $threads = `SELECT @@innodb_encryption_threads`; ---enable_query_log -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_encrypt_tables = ON; SET GLOBAL innodb_encryption_threads = 4; @@ -91,8 +85,6 @@ drop table t1,t2; # reset system --disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; EVAL SET GLOBAL innodb_encrypt_tables = $encrypt_tables; EVAL SET GLOBAL innodb_encryption_threads = $threads; --enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb-encryption-disable.test b/mysql-test/suite/encryption/t/innodb-encryption-disable.test index e8e2ba02402..8a8b451f5b1 100644 --- a/mysql-test/suite/encryption/t/innodb-encryption-disable.test +++ b/mysql-test/suite/encryption/t/innodb-encryption-disable.test @@ -6,14 +6,6 @@ -- source include/not_crashrep.inc -- source filekeys_plugin_exists.inc ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - # # MDEV-9559: Server without encryption configs crashes if selecting from an implicitly encrypted table # @@ -93,9 +85,4 @@ select * from t5; drop table t1; drop table t5; ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log - --remove_file $MYSQLTEST_VARDIR/encryption-disable-keys1.txt diff --git a/mysql-test/suite/encryption/t/innodb-log-encrypt-crash.test b/mysql-test/suite/encryption/t/innodb-log-encrypt-crash.test deleted file mode 100644 index cb9a69d036b..00000000000 --- a/mysql-test/suite/encryption/t/innodb-log-encrypt-crash.test +++ /dev/null @@ -1,41 +0,0 @@ --- source include/have_innodb.inc --- source include/not_embedded.inc -# test takes very long time on debug build --- source include/not_debug.inc --- source include/big_test.inc --- source filekeys_plugin.inc - -call mtr.add_suppression("InnoDB: New log files created, LSN=.*"); -call mtr.add_suppression("InnoDB: Creating foreign key constraint system tables."); -call mtr.add_suppression("InnoDB: Error: Table .*"); - -# -# MDEV-9422: Checksum errors on restart when killing busy instance that uses encrypted XtraDB tables -# - -CREATE TABLE t1 ( - pk bigint auto_increment, - col_int int, - col_int_key int, - col_char char(12), - col_char_key char(12), - primary key (pk), - key (`col_int_key` ), - key (`col_char_key` ) -) ENGINE=InnoDB; -CREATE TABLE t2 LIKE t1; - -INSERT INTO t1 VALUES (NULL,1,1,'foo','foo'),(NULL,2,2,'bar','bar'),(NULL,3,3,'baz','baz'),(NULL,4,4,'qux','qux'); -INSERT INTO t2 - SELECT NULL, a1.col_int, a1.col_int_key, a1.col_char, a1.col_char_key - FROM t1 a1, t1 a2, t1 a3, t1 a4, t1 a5, t1 a6, t1 a7, t1 a8, t1 a9, t1 a10; - ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---shutdown_server 0 ---source include/wait_until_disconnected.inc - ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---enable_reconnect ---source include/wait_until_connected_again.inc - -DROP TABLE t1, t2; diff --git a/mysql-test/suite/encryption/t/innodb-log-encrypt.test b/mysql-test/suite/encryption/t/innodb-log-encrypt.test deleted file mode 100644 index 7c2e6f847b1..00000000000 --- a/mysql-test/suite/encryption/t/innodb-log-encrypt.test +++ /dev/null @@ -1,114 +0,0 @@ --- source include/have_innodb.inc --- source include/not_embedded.inc --- source filekeys_plugin.inc - -# -# MDEV-9011: Redo log encryption does not work -# - ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - -create table t1(c1 bigint not null, b char(200), c varchar(200)) engine=innodb encrypted=yes encryption_key_id=1; -show warnings; - -delimiter //; -create procedure innodb_insert_proc (repeat_count int) -begin - declare current_num int; - set current_num = 0; - while current_num < repeat_count do - insert into t1 values(current_num, substring(MD5(RAND()), -64), REPEAT('privatejanprivate',10)); - set current_num = current_num + 1; - end while; -end// -delimiter ;// -commit; - -set autocommit=0; -call innodb_insert_proc(2000); -commit; -set autocommit=1; - -update t1 set c1 = c1 +1; -select count(*) from t1; - --- source include/restart_mysqld.inc - ---let $MYSQLD_DATADIR=`select @@datadir` ---let ib1_IBD = $MYSQLD_DATADIR/ibdata1 ---let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd ---let log0 = $MYSQLD_DATADIR/ib_logfile0 ---let log1 = $MYSQLD_DATADIR/ib_logfile1 ---let SEARCH_RANGE = 10000000 ---let SEARCH_PATTERN=privatejanprivate - ---echo # ibdata1 yes on expecting NOT FOUND --- let SEARCH_FILE=$ib1_IBD --- source include/search_pattern_in_file.inc ---echo # t1 yes on expecting NOT FOUND --- let SEARCH_FILE=$t1_IBD --- source include/search_pattern_in_file.inc ---echo # log0 yes on expecting NOT FOUND --- let SEARCH_FILE=$log0 --- source include/search_pattern_in_file.inc ---echo # log1 yes on expecting NOT FOUND --- let SEARCH_FILE=$log1 --- source include/search_pattern_in_file.inc - ---echo # Restart mysqld --innodb_encrypt_log=0 --- let $restart_parameters=--innodb_encrypt_log=0 --- source include/restart_mysqld.inc - -insert into t1 values(5000, substring(MD5(RAND()), -64), REPEAT('publicmessage',10)); -insert into t1 values(5001, substring(MD5(RAND()), -64), REPEAT('publicmessage',10)); -insert into t1 values(5002, substring(MD5(RAND()), -64), REPEAT('publicmessage',10)); -insert into t1 values(5003, substring(MD5(RAND()), -64), REPEAT('publicmessage',10)); -insert into t1 values(5004, substring(MD5(RAND()), -64), REPEAT('publicmessage',10)); - ---let SEARCH_PATTERN=privatejanprivate ---echo # ibdata1 yes on expecting NOT FOUND --- let SEARCH_FILE=$ib1_IBD --- source include/search_pattern_in_file.inc ---echo # t1 yes on expecting NOT FOUND --- let SEARCH_FILE=$t1_IBD --- source include/search_pattern_in_file.inc ---echo # log0 yes on expecting NOT FOUND --- let SEARCH_FILE=$log0 --- source include/search_pattern_in_file.inc ---echo # log1 yes on expecting NOT FOUND --- let SEARCH_FILE=$log1 --- source include/search_pattern_in_file.inc - ---let SEARCH_PATTERN=publicmessage ---echo # ibdata1 yes on expecting NOT FOUND --- let SEARCH_FILE=$ib1_IBD --- source include/search_pattern_in_file.inc ---echo # t1 yes on expecting NOT FOUND --- let SEARCH_FILE=$t1_IBD --- source include/search_pattern_in_file.inc ---echo # log0 no on expecting FOUND/NOTFOUND depending where insert goes --- let SEARCH_FILE=$log0 --- source include/search_pattern_in_file.inc ---echo # log1 no on expecting FOUND/NOTFOUND depending where insert goes --- let SEARCH_FILE=$log1 --- source include/search_pattern_in_file.inc - -drop procedure innodb_insert_proc; -drop table t1; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb-page_encryption-32k.test b/mysql-test/suite/encryption/t/innodb-page_encryption-32k.test index 325f0a86521..29d821d1fc1 100644 --- a/mysql-test/suite/encryption/t/innodb-page_encryption-32k.test +++ b/mysql-test/suite/encryption/t/innodb-page_encryption-32k.test @@ -7,18 +7,12 @@ call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); ---disable_query_log -# These values can change during the test -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1; +--error ER_CANT_CREATE_TABLE create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=3; +show warnings; +create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=33; create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant encrypted=yes encryption_key_id=4; show create table innodb_compact; @@ -88,9 +82,3 @@ drop table innodb_normal; drop table innodb_compact; drop table innodb_dynamic; drop table innodb_redundant; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb-page_encryption.test b/mysql-test/suite/encryption/t/innodb-page_encryption.test index 463df756933..df2d1d52aaa 100644 --- a/mysql-test/suite/encryption/t/innodb-page_encryption.test +++ b/mysql-test/suite/encryption/t/innodb-page_encryption.test @@ -1,14 +1,6 @@ -- source include/have_innodb.inc -- source include/have_file_key_management_plugin.inc ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; show warnings; create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1; @@ -85,9 +77,6 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_ --source include/restart_mysqld.inc -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - update innodb_normal set c1 = c1 +1; update innodb_compact set c1 = c1 + 1; update innodb_compressed set c1 = c1 + 1; @@ -124,9 +113,6 @@ show create table innodb_redundant; --source include/restart_mysqld.inc -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - show create table innodb_compact; show create table innodb_compressed; show create table innodb_dynamic; @@ -161,9 +147,3 @@ drop table innodb_compressed; drop table innodb_dynamic; drop table innodb_redundant; drop table innodb_defkey; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb-page_encryption_compression.test b/mysql-test/suite/encryption/t/innodb-page_encryption_compression.test index eb293e97693..2fe29e0cb5c 100644 --- a/mysql-test/suite/encryption/t/innodb-page_encryption_compression.test +++ b/mysql-test/suite/encryption/t/innodb-page_encryption_compression.test @@ -5,15 +5,9 @@ # Test heavy not tested on valgrind -- source include/not_valgrind.inc ---disable_query_log let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; let $encryption = `SELECT @@innodb_encrypt_tables`; ---enable_query_log -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; # zlib set global innodb_compression_algorithm = 1; @@ -67,8 +61,6 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_ --source include/restart_mysqld.inc -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; # zlib set global innodb_compression_algorithm = 1; @@ -97,9 +89,6 @@ show create table innodb_dynamic; --source include/restart_mysqld.inc -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - show create table innodb_normal; show create table innodb_compact; show create table innodb_dynamic; @@ -128,7 +117,5 @@ drop table innodb_dynamic; # reset system --disable_query_log EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; EVAL SET GLOBAL innodb_encrypt_tables = $encryption; --enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test b/mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test index b6fe0d10b65..f7eab67154d 100644 --- a/mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test +++ b/mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test @@ -2,18 +2,10 @@ -- source include/not_embedded.inc -- source include/have_file_key_management_plugin.inc ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - call mtr.add_suppression("KeyID 0 not found or with error. Check the key and the log*"); call mtr.add_suppression("Disabling redo log encryp*"); call mtr.add_suppression("InnoDB: Redo log crypto: Can't initialize to key version*"); -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; show warnings; create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1; @@ -77,9 +69,6 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_ --source include/restart_mysqld.inc -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - update innodb_normal set c1 = c1 +1; update innodb_compact set c1 = c1 + 1; update innodb_compressed set c1 = c1 + 1; @@ -112,9 +101,6 @@ show create table innodb_redundant; --source include/restart_mysqld.inc -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - show create table innodb_compact; show create table innodb_compressed; show create table innodb_dynamic; @@ -160,9 +146,3 @@ INSERT INTO t1 VALUES (1),(2); SELECT * FROM t1; DROP TABLE t1; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb-read-only.opt b/mysql-test/suite/encryption/t/innodb-read-only.opt new file mode 100644 index 00000000000..acedb1a17bb --- /dev/null +++ b/mysql-test/suite/encryption/t/innodb-read-only.opt @@ -0,0 +1,3 @@ +--innodb-encrypt-tables=1 +--innodb-encryption-threads=4 +--innodb-tablespaces-encryption diff --git a/mysql-test/suite/encryption/t/innodb-read-only.test b/mysql-test/suite/encryption/t/innodb-read-only.test new file mode 100644 index 00000000000..10ec87467b6 --- /dev/null +++ b/mysql-test/suite/encryption/t/innodb-read-only.test @@ -0,0 +1,34 @@ +--source suite/encryption/include/have_file_key_management_plugin.inc +--source include/have_innodb.inc +--source include/not_embedded.inc + +--echo # Wait max 10 min for key encryption threads to encrypt all spaces +let $cnt=600; +while ($cnt) +{ + let $success=`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0`; + if ($success) + { + let $cnt=0; + } + if (!$success) + { + real_sleep 1; + dec $cnt; + } +} +if (!$success) +{ + SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION; + SHOW STATUS LIKE 'innodb_encryption%'; + -- die Timeout waiting for encryption threads +} +--echo # Success! + +# +# MDEV-11835: InnoDB: Failing assertion: free_slot != NULL on +# restarting server with encryption and read-only +# +--let $restart_parameters= --innodb-read-only=1 --innodb-encrypt-tables=1 +--source include/restart_mysqld.inc +--echo # All done diff --git a/mysql-test/suite/encryption/t/innodb-scrub-log.opt b/mysql-test/suite/encryption/t/innodb-scrub-log.opt new file mode 100644 index 00000000000..0078065bbf7 --- /dev/null +++ b/mysql-test/suite/encryption/t/innodb-scrub-log.opt @@ -0,0 +1 @@ +--loose-innodb-scrub-log=on diff --git a/mysql-test/suite/encryption/t/innodb-scrub-log.test b/mysql-test/suite/encryption/t/innodb-scrub-log.test new file mode 100644 index 00000000000..36ecc88b99a --- /dev/null +++ b/mysql-test/suite/encryption/t/innodb-scrub-log.test @@ -0,0 +1,13 @@ +--source include/have_innodb.inc + +# +# MDEV-11705: InnoDB: Failing assertion: (&log_sys->mutex)->is_owned() if server started with innodb-scrub-log +# + +create table t1(a int not null primary key auto_increment, +b varchar(200), c char(100), d varchar(150)) engine=innodb; + +let $wait_condition= SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'innodb_scrub_log'; +--source include/wait_condition.inc + +DROP TABLE t1; diff --git a/mysql-test/suite/encryption/t/innodb-spatial-index.opt b/mysql-test/suite/encryption/t/innodb-spatial-index.opt new file mode 100644 index 00000000000..d1f1bb9c555 --- /dev/null +++ b/mysql-test/suite/encryption/t/innodb-spatial-index.opt @@ -0,0 +1,4 @@ +--innodb-encrypt-tables +--innodb-encryption-rotate-key-age=15 +--innodb-encryption-threads=4 +--innodb-tablespaces-encryption diff --git a/mysql-test/suite/encryption/t/innodb-spatial-index.test b/mysql-test/suite/encryption/t/innodb-spatial-index.test new file mode 100644 index 00000000000..de78461c765 --- /dev/null +++ b/mysql-test/suite/encryption/t/innodb-spatial-index.test @@ -0,0 +1,72 @@ +--source include/have_innodb.inc +--source include/have_file_key_management_plugin.inc + +# +# MDEV-11974: MariaDB 10.2 encryption does not support spatial indexes +# + +# +# (1) Do not allow creating table with ENCRYPTED=YES +# +# +--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/ +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, +c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB +ENCRYPTED=YES; + +# +# (2) Alter table +# +CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, +c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB; +--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ENCRYPTED=YES; +--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/ +DROP TABLE t1; + +# +# Index creation +# +CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, +c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=YES ENGINE=INNODB; +--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/ +--error ER_CANT_CREATE_TABLE +CREATE SPATIAL INDEX b on t1(coordinate); +--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate); +DROP TABLE t1; + +CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, +c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=DEFAULT ENGINE=INNODB; +CREATE SPATIAL INDEX b on t1(coordinate); +INSERT INTO t1 values(1, 'secret', ST_GeomFromText('POINT(903994614 180726515)')); +ALTER TABLE t1 DROP INDEX b; +INSERT INTO t1 values(2, 'secret', ST_GeomFromText('POINT(903994614 180726515)')); +ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate); +INSERT INTO t1 values(3, 'secret', ST_GeomFromText('POINT(903994614 180726515)')); +DROP TABLE t1; +# +# (3) Default encryption should still work +# + +CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, +c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB; +CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT, +c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB PAGE_COMPRESSED=YES; + +INSERT INTO t1 values(1, 'secret', ST_GeomFromText('POINT(903994614 180726515)')); +INSERT INTO t2 values(1, 'secret', ST_GeomFromText('POINT(903994614 180726515)')); + +--let $wait_timeout=600 +--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0; +--source include/wait_condition.inc + +--echo # Success! + +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION > 0; +SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0; + +DROP TABLE t1, t2; \ No newline at end of file diff --git a/mysql-test/suite/encryption/t/innodb-log-encrypt.opt b/mysql-test/suite/encryption/t/innodb_encrypt_log.opt similarity index 100% rename from mysql-test/suite/encryption/t/innodb-log-encrypt.opt rename to mysql-test/suite/encryption/t/innodb_encrypt_log.opt diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_log.test b/mysql-test/suite/encryption/t/innodb_encrypt_log.test new file mode 100644 index 00000000000..5f60889600a --- /dev/null +++ b/mysql-test/suite/encryption/t/innodb_encrypt_log.test @@ -0,0 +1,94 @@ +-- source include/have_innodb.inc +-- source include/not_embedded.inc +-- source filekeys_plugin.inc + +--echo # +--echo # MDEV-9011: Redo log encryption does not work +--echo # + +--echo # +--echo # MDEV-9422 Encrypted redo log checksum errors +--echo # on restart after killing busy server instance +--echo # + +--let $MYSQLD_DATADIR=`select @@datadir` + +SET GLOBAL innodb_log_checksums=0; +SELECT @@global.innodb_log_checksums; + +CREATE TABLE t0 ( + pk bigint auto_increment, + col_int int, + col_int_key int, + col_char char(12), + col_char_key char(12), + primary key (pk), + key (col_int_key), + key (col_char_key) +) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1; +CREATE TEMPORARY TABLE t LIKE t0; + +INSERT INTO t VALUES +(NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'), +(NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament'); + +# Force a redo log flush at the next commit. +SET GLOBAL innodb_flush_log_at_trx_commit=1; +INSERT INTO t0 + SELECT NULL, t1.col_int, t1.col_int_key, t1.col_char, t1.col_char_key + FROM t t1, t t2, t t3, t t4, t t5; + +--source include/kill_mysqld.inc + +--let SEARCH_RANGE = 10000000 +--let SEARCH_PATTERN=private|secret|sacr(ed|ament)|success|story|secur(e|ity) + +--echo # ibdata1 expecting NOT FOUND +-- let SEARCH_FILE=$MYSQLD_DATADIR/ibdata1 +-- source include/search_pattern_in_file.inc +--echo # t0.ibd expecting NOT FOUND +-- let SEARCH_FILE=$MYSQLD_DATADIR/test/t0.ibd +-- source include/search_pattern_in_file.inc +--echo # ib_logfile0 expecting NOT FOUND +-- let SEARCH_FILE=$MYSQLD_DATADIR/ib_logfile0 +-- source include/search_pattern_in_file.inc +--echo # ib_logfile1 expecting NOT FOUND +-- let SEARCH_FILE=$MYSQLD_DATADIR/ib_logfile1 +-- source include/search_pattern_in_file.inc + +--echo # Restart without redo log encryption +-- let $restart_parameters=--skip-innodb-encrypt-log --innodb-log-files-in-group=1 +-- source include/start_mysqld.inc + +SELECT COUNT(*) FROM t0; +CHECK TABLE t0; +# Force a redo log flush at the next commit. +SET GLOBAL innodb_flush_log_at_trx_commit=1; +# If we tested with UPDATE, we would get clear-text redo log for +# encrypted undo log written with the old secret values. +INSERT INTO t0 VALUES(NULL, 5, 5, 'public', 'gossip'); + +--source include/kill_mysqld.inc + +--echo # ib_logfile0 expecting NOT FOUND +-- let SEARCH_FILE=$MYSQLD_DATADIR/ib_logfile0 +-- source include/search_pattern_in_file.inc +--let SEARCH_PATTERN=public|gossip +--echo # ib_logfile0 expecting FOUND +-- let SEARCH_FILE=$MYSQLD_DATADIR/ib_logfile0 +-- source include/search_pattern_in_file.inc + +--let SEARCH_PATTERN=private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip +--echo # ibdata1 expecting NOT FOUND +-- let SEARCH_FILE=$MYSQLD_DATADIR/ibdata1 +-- source include/search_pattern_in_file.inc +--echo # t0.ibd expecting NOT FOUND +-- let SEARCH_FILE=$MYSQLD_DATADIR/test/t0.ibd +-- source include/search_pattern_in_file.inc + +--let $restart_parameters= +--source include/start_mysqld.inc + +SELECT COUNT(*) FROM t0; +CHECK TABLE t0; +DROP TABLE t0; diff --git a/mysql-test/suite/encryption/t/innodb-log-encrypt-crash.opt b/mysql-test/suite/encryption/t/innodb_encrypt_log_corruption.opt similarity index 87% rename from mysql-test/suite/encryption/t/innodb-log-encrypt-crash.opt rename to mysql-test/suite/encryption/t/innodb_encrypt_log_corruption.opt index e76aa060879..8070b5a6182 100644 --- a/mysql-test/suite/encryption/t/innodb-log-encrypt-crash.opt +++ b/mysql-test/suite/encryption/t/innodb_encrypt_log_corruption.opt @@ -3,4 +3,3 @@ --loose-file-key-management --loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/logkey.txt --file-key-management-encryption-algorithm=aes_cbc ---innodb-buffer-pool-size=128M diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_log_corruption.test b/mysql-test/suite/encryption/t/innodb_encrypt_log_corruption.test new file mode 100644 index 00000000000..f1642e83e32 --- /dev/null +++ b/mysql-test/suite/encryption/t/innodb_encrypt_log_corruption.test @@ -0,0 +1,15 @@ +--let $no_cleanup=1 +--source ../../innodb/t/log_corruption.test + +SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +--source include/shutdown_mysqld.inc +--let SEARCH_PATTERN= InnoDB: Encrypting redo log +--source include/search_pattern_in_file.inc + +--let $restart_parameters= +--source include/start_mysqld.inc + +--list_files $bugdir +--remove_files_wildcard $bugdir +--rmdir $bugdir diff --git a/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test b/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test index c2c7bd96d3e..606662e44e6 100644 --- a/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test +++ b/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test @@ -4,16 +4,10 @@ # embedded does not support restart -- source include/not_embedded.inc ---disable_query_log let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; let $innodb_encrypt_tables_orig = `SELECT @@innodb_encrypt_tables`; let $innodb_encryption_threads_orig = `SELECT @@innodb_encryption_threads`; ---enable_query_log -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_encryption_threads = 4; SET GLOBAL innodb_encrypt_tables = on; @@ -161,9 +155,6 @@ drop table innodb_page_compressed9; # reset system --disable_query_log EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; EVAL SET GLOBAL innodb_encrypt_tables = $innodb_encrypt_tables_orig; EVAL SET GLOBAL innodb_encryption_threads = $innodb_encryption_threads_orig; --enable_query_log - diff --git a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test index 32ba5d306f4..075cb1cf77e 100644 --- a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test +++ b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test @@ -15,16 +15,6 @@ let $MYSQLD_DATADIR = `SELECT @@datadir`; --let t2_IBD = $MYSQLD_DATADIR/test/t2.ibd --let t3_IBD = $MYSQLD_DATADIR/test/t3.ibd ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - ---disable_warnings -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; ---enable_warnings - CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes; CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB; CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB row_format=compressed encrypted=yes; @@ -154,11 +144,3 @@ SELECT COUNT(1) FROM t3; DROP PROCEDURE innodb_insert_proc; DROP TABLE t1, t2, t3; - -# reset system ---disable_warnings ---disable_query_log -eval SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -eval SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log ---enable_warnings diff --git a/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test b/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test index 8f0986071f1..47d546ae698 100644 --- a/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test +++ b/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test @@ -5,15 +5,9 @@ call mtr.add_suppression("trying to do an operation on a dropped tablespace .*"); ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; let $encrypt_tables = `SELECT @@innodb_encrypt_tables`; let $threads = `SELECT @@innodb_encryption_threads`; ---enable_query_log -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_encrypt_tables = OFF; SET GLOBAL innodb_encryption_threads = 4; @@ -133,8 +127,6 @@ SELECT COUNT(1) FROM t5; # reset system --disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; EVAL SET GLOBAL innodb_encrypt_tables = $encrypt_tables; EVAL SET GLOBAL innodb_encryption_threads = $threads; --enable_query_log @@ -142,4 +134,3 @@ EVAL SET GLOBAL innodb_encryption_threads = $threads; drop table t1,t2,t3,t4, t5; set GLOBAL innodb_default_encryption_key_id=1; - diff --git a/mysql-test/suite/encryption/t/innodb_encryption_is.test b/mysql-test/suite/encryption/t/innodb_encryption_is.test index 333bb84c634..52574aa2b9d 100644 --- a/mysql-test/suite/encryption/t/innodb_encryption_is.test +++ b/mysql-test/suite/encryption/t/innodb_encryption_is.test @@ -1,14 +1,6 @@ -- source include/have_innodb.inc -- source include/have_file_key_management_plugin.inc ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1; CREATE TABLE t2 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2; INSERT INTO t1 VALUES ('foobar'); @@ -23,9 +15,3 @@ FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE NAME LIKE '%t1' OR NAME LIKE '%t2'; DROP TABLE t1, t2; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test b/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test index 0a28c1690a2..d6319164c35 100644 --- a/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test +++ b/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test @@ -2,14 +2,6 @@ -- source include/have_file_key_management_plugin.inc -- source include/not_embedded.inc ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - create table innodb_compressed1(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed encrypted=yes; create table innodb_compressed2(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=1 encrypted=yes; create table innodb_compressed3(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=2 encrypted=yes; @@ -52,9 +44,6 @@ insert into innodb_compressed4 select * from innodb_compressed1; -- let SEARCH_FILE=$t4_IBD -- source include/search_pattern_in_file.inc -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - select * from innodb_compressed1 where d = 20; select * from innodb_compressed1 where d = 30; select * from innodb_compressed2 where d = 20; @@ -117,9 +106,3 @@ drop table innodb_compressed1; drop table innodb_compressed2; drop table innodb_compressed3; drop table innodb_compressed4; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb_encryption_tables.test b/mysql-test/suite/encryption/t/innodb_encryption_tables.test index f806b776800..bc762faf12e 100644 --- a/mysql-test/suite/encryption/t/innodb_encryption_tables.test +++ b/mysql-test/suite/encryption/t/innodb_encryption_tables.test @@ -2,14 +2,6 @@ -- source include/have_example_key_management_plugin.inc -- source include/not_embedded.inc ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact; create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic; @@ -73,9 +65,6 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_ --source include/restart_mysqld.inc -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - update innodb_normal set c1 = c1 + 1; update innodb_compact set c1 = c1 + 1; update innodb_dynamic set c1 = c1 + 1; @@ -106,9 +95,3 @@ drop table innodb_compact; drop table innodb_dynamic; drop table innodb_compressed; drop table innodb_redundant; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb_lotoftables.test b/mysql-test/suite/encryption/t/innodb_lotoftables.test index cad3cb54326..6e87c93df4b 100644 --- a/mysql-test/suite/encryption/t/innodb_lotoftables.test +++ b/mysql-test/suite/encryption/t/innodb_lotoftables.test @@ -6,13 +6,12 @@ -- source include/not_embedded.inc --disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; let $innodb_encryption_threads_orig = `SELECT @@global.innodb_encryption_threads`; --enable_query_log -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; +# empty the change buffer and the undo logs to avoid extra reads +SET GLOBAL innodb_fast_shutdown=0; +--source include/restart_mysqld.inc SHOW VARIABLES LIKE 'innodb_encrypt%'; @@ -29,7 +28,8 @@ let $tables = 100; --disable_query_log while ($tables) { - eval create table t_$tables (a int not null primary key, b varchar(200)) engine=innodb; + eval create table t_$tables (a int not null primary key, b varchar(200)) engine=innodb + stats_persistent=0; commit; let $rows = 100; while($rows) @@ -64,7 +64,8 @@ set autocommit=0; let $tables = 100; while ($tables) { - eval create table t_$tables (a int not null primary key, b varchar(200)) engine=innodb encrypted=yes; + eval create table t_$tables (a int not null primary key, b varchar(200)) engine=innodb + stats_persistent=0 encrypted=yes; commit; let $rows = 100; while($rows) @@ -100,7 +101,8 @@ set autocommit=0; let $tables = 100; while ($tables) { - eval create table t_$tables (a int not null primary key, b varchar(200)) engine=innodb encrypted=no; + eval create table t_$tables (a int not null primary key, b varchar(200)) engine=innodb + stats_persistent=0 encrypted=no; commit; let $rows = 100; while($rows) @@ -268,7 +270,5 @@ drop database innodb_encrypted_2; drop database innodb_encrypted_3; --disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; EVAL SET GLOBAL innodb_encryption_threads = $innodb_encryption_threads_orig; --enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test b/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test index 40beb10bcdb..eb90c446a81 100644 --- a/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test +++ b/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test @@ -4,14 +4,6 @@ -- source include/not_embedded.inc -- source include/not_windows.inc ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - --let $MYSQLD_DATADIR=`select @@datadir` --let SEARCH_RANGE = 10000000 --let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd @@ -183,9 +175,3 @@ select count(1) from t7; DROP PROCEDURE innodb_insert_proc; DROP TABLE t1, t2, t3, t4, t5, t6, t7; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test b/mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test index 7cbf005ed32..1babf577473 100644 --- a/mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test +++ b/mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test @@ -7,14 +7,6 @@ -- let $restart_parameters=--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt -- source include/restart_mysqld.inc ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; show warnings; create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=2; @@ -65,9 +57,6 @@ select * from innodb_redundant; SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted'; SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - alter table innodb_compact engine=innodb encryption_key_id = 2; alter table innodb_compressed engine=innodb encryption_key_id = 3; alter table innodb_dynamic engine=innodb encryption_key_id = 4; @@ -88,9 +77,3 @@ drop table innodb_compact; drop table innodb_compressed; drop table innodb_dynamic; drop table innodb_redundant; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log diff --git a/mysql-test/suite/encryption/t/innodb_scrub.opt b/mysql-test/suite/encryption/t/innodb_scrub.opt index 3adb645c589..ef43b2a20a8 100644 --- a/mysql-test/suite/encryption/t/innodb_scrub.opt +++ b/mysql-test/suite/encryption/t/innodb_scrub.opt @@ -2,8 +2,6 @@ --innodb-background-scrub-data-uncompressed=OFF --innodb-encrypt-tables=OFF --innodb-encryption-threads=0 ---innodb-file-format=Barracuda ---innodb-file-per-table=1 --innodb-immediate-scrub-data-uncompressed=ON --loose-innodb-debug-force-scrubbing=ON --innodb-tablespaces-scrubbing diff --git a/mysql-test/suite/encryption/t/innodb_scrub.test b/mysql-test/suite/encryption/t/innodb_scrub.test index 32170567b4c..3288ae9ce1c 100644 --- a/mysql-test/suite/encryption/t/innodb_scrub.test +++ b/mysql-test/suite/encryption/t/innodb_scrub.test @@ -1,147 +1,138 @@ -- source include/have_innodb.inc -- source include/not_embedded.inc -- source include/have_example_key_management_plugin.inc --- source include/not_windows.inc let $MYSQLD_DATADIR=`select @@datadir`; -let ib1_IBD = $MYSQLD_DATADIR/ibdata1; -let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd; +let INNODB_PAGE_SIZE= `select @@innodb_page_size`; create table snapshot_status engine = myisam select * from information_schema.global_status -where variable_name like 'innodb_scrub%'; +where variable_name like 'innodb_scrub_background%'; let $rowcount=500; -let $formatno = 3; +let $maxformatno= 4; +let $formatno= $maxformatno; + +--echo # MDEV-8139 Fix scrubbing tests +--echo # FIXME: Add index(b) to each table; ensure that undo logs are scrubbed. +let $tableformat= ( + a int auto_increment primary key, + b varchar(256), + c text) engine = innodb row_format; + while ($formatno) { +dec $formatno; let $format = `select case $formatno - when 1 then 'dynamic' - when 2 then 'redundant' - when 3 then 'compact' + when 0 then 'dynamic' + when 1 then 'redundant' + when 2 then 'compact' + when 3 then 'compressed' end`; + +let $t= delete_$formatno; +eval create table $t $tableformat=$format; + +let $numinserts = $rowcount; +--disable_query_log +begin; +while ($numinserts) +{ + dec $numinserts; + eval insert into $t(b,c) values ('repairman', repeat('unicycle', 1000)); +} +commit; +--enable_query_log + +eval delete from $t; + +let $t= delete_rollback_delete_$formatno; +eval create table $t $tableformat=$format; + +let $numinserts = $rowcount; +--disable_query_log +begin; +while ($numinserts) +{ + dec $numinserts; + eval insert into $t(b,c) values ('breakhuman', repeat('bicycle', 1000)); +} +commit; +--enable_query_log + +begin; +eval delete from $t; +rollback; +eval delete from $t; + +let $t= insert_rollback_$formatno; + +eval create table $t $tableformat=$format; + +let $numinserts = $rowcount; +begin; +--disable_query_log +while ($numinserts) +{ + dec $numinserts; + eval insert into $t(b,c) values ('wonderwoman', repeat('tricycle', 1000)); +} +--enable_query_log + +rollback; +} + +SET GLOBAL innodb_fast_shutdown=0; +-- source include/shutdown_mysqld.inc + +let SEARCH_ABORT= FOUND; +let SEARCH_PATTERN= (un|b|tr)icycle|(repair|breakhu|wonderwo)man; +let SEARCH_RANGE= 12582912; +let SEARCH_FILE= $MYSQLD_DATADIR/ibdata1; + +# We may randomly find copies of unscrubbed pages in the doublewrite buffer. +# Let us scrub the doublewrite buffer ourselves. +perl; +use Fcntl 'SEEK_SET'; +my $page_size = $ENV{INNODB_PAGE_SIZE}; +open(FILE, "+<", "$ENV{SEARCH_FILE}") or die "cannot open: $!\n"; +seek(FILE, $page_size * 64, SEEK_SET) or die "cannot seek: $!\n"; +print(FILE chr(0) x ($page_size * 128)) or die "cannot write: $!\n"; +close FILE or die "cannot close: $!\n";; +EOF + +-- source include/search_pattern_in_file.inc + +let $formatno= $maxformatno; +while ($formatno) +{ dec $formatno; --- echo # --- echo # Test delete of records --- echo # - -eval create table t1 ( - a int auto_increment primary key, - b varchar(256), - c text) engine = innodb row_format=$format; - -let $numinserts = $rowcount; --- echo # Populate table with rows ---disable_query_log -while ($numinserts) -{ - dec $numinserts; - insert into t1(b,c) values ('bicycle', repeat('repairman', 1000)); +let $t= delete_$formatno.ibd; +let SEARCH_FILE= $MYSQLD_DATADIR/test/$t; +-- echo # $t +-- source include/search_pattern_in_file.inc +let $t= delete_rollback_delete_$formatno.ibd; +let SEARCH_FILE= $MYSQLD_DATADIR/test/$t; +-- echo # $t +-- source include/search_pattern_in_file.inc +let $t= insert_rollback_$formatno.ibd; +let SEARCH_FILE= $MYSQLD_DATADIR/test/$t; +-- echo # $t +-- source include/search_pattern_in_file.inc } ---enable_query_log -delete from t1; +-- source include/start_mysqld.inc --- echo # restart mysqld so that all pages are flushed --- source include/restart_mysqld.inc --- echo # read all rows from table --- disable_result_log -select * from t1; --- enable_result_log - --- echo # $format: delete from: grep -c bicycle t1.ibd --- exec grep -c bicycle $t1_IBD || true --- echo # $format: delete from: grep -c bicycle ibdata1 --- exec grep -c bicycle $ib1_IBD || true --- echo # $format: delete from: grep -c repairman t1.ibd --- exec grep -c repairman $t1_IBD || true --- echo # $format: delete from: grep -c repairman ibdata1 --- exec grep -c repairman $ib1_IBD || true - -drop table t1; - --- echo # --- echo # Test delete+rollback+delete --- echo # - -eval create table t1 ( - a int auto_increment primary key, - b varchar(256), - c text) engine = innodb row_format=$format; - -let $numinserts = $rowcount; --- echo # Populate table with rows ---disable_query_log -while ($numinserts) +let $formatno= $maxformatno; +while ($formatno) { - dec $numinserts; - insert into t1(b,c) values ('bicycle', repeat('repairman', 1000)); -} ---enable_query_log +dec $formatno; -begin; -delete from t1; -rollback; -delete from t1; +let $t= delete_$formatno, delete_rollback_delete_$formatno, insert_rollback_$formatno; --- echo # restart mysqld so that all pages are flushed --- source include/restart_mysqld.inc --- echo # read all rows from table --- disable_result_log -select * from t1; --- enable_result_log - --- echo # $format: delete rollback: grep -c bicycle t1.ibd --- exec grep -c bicycle $t1_IBD || true --- echo # $format: delete rollback: grep -c bicycle ibdata1 --- exec grep -c bicycle $ib1_IBD || true --- echo # $format: delete rollback: grep -c repairman t1.ibd --- exec grep -c repairman $t1_IBD || true --- echo # $format: delete rollback: grep -c repairman ibdata1 --- exec grep -c repairman $ib1_IBD || true - -drop table t1; - --- echo # --- echo # Test insert+rollback --- echo # - -eval create table t1 ( - a int auto_increment primary key, - b varchar(256), - c text) engine = innodb row_format=$format; - -let $numinserts = $rowcount; --- echo # Populate table with rows -begin; ---disable_query_log -while ($numinserts) -{ - dec $numinserts; - insert into t1(b,c) values ('bicycle', repeat('repairman', 1000)); -} ---enable_query_log - -rollback; - --- echo # restart mysqld so that all pages are flushed --- source include/restart_mysqld.inc --- echo # read all rows from table --- disable_result_log -select * from t1; --- enable_result_log - --- echo # $format: insert rollback: grep -c bicycle t1.ibd --- exec grep -c bicycle $t1_IBD || true --- echo # $format: insert rollback: grep -c bicycle ibdata1 --- exec grep -c bicycle $ib1_IBD || true --- echo # $format: insert rollback: grep -c repairman t1.ibd --- exec grep -c repairman $t1_IBD || true --- echo # $format: insert rollback: grep -c repairman ibdata1 --- exec grep -c repairman $ib1_IBD || true - -drop table t1; +eval check table $t; +eval drop table $t; } show variables like 'innodb_%scrub_data%'; diff --git a/mysql-test/suite/encryption/t/innodb_scrub_background.opt b/mysql-test/suite/encryption/t/innodb_scrub_background.opt index 1cc525b2402..04987f4a3ad 100644 --- a/mysql-test/suite/encryption/t/innodb_scrub_background.opt +++ b/mysql-test/suite/encryption/t/innodb_scrub_background.opt @@ -1,5 +1,3 @@ ---innodb-file-per-table=1 ---innodb-file-format=Barracuda --innodb-immediate-scrub-data-uncompressed=OFF --innodb-background-scrub-data-uncompressed=ON --innodb-background-scrub-data-compressed=ON diff --git a/mysql-test/suite/encryption/t/innodb_scrub_background.test b/mysql-test/suite/encryption/t/innodb_scrub_background.test index 19e56683117..c705ee51006 100644 --- a/mysql-test/suite/encryption/t/innodb_scrub_background.test +++ b/mysql-test/suite/encryption/t/innodb_scrub_background.test @@ -1,13 +1,9 @@ -- source include/have_innodb.inc -- source include/not_embedded.inc -- source include/have_example_key_management_plugin.inc --- source include/not_windows.inc let $MYSQLD_DATADIR=`select @@datadir`; -let ib1_IBD = $MYSQLD_DATADIR/ibdata1; -let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd; -let t2_IBD = $MYSQLD_DATADIR/test/t2.ibd; -let t3_IBD = $MYSQLD_DATADIR/test/t3.ibd; +let INNODB_PAGE_SIZE= `select @@innodb_page_size`; --echo # --echo # immediate scrubbing is off @@ -18,80 +14,67 @@ show variables like 'innodb_%scrub_data%'; -- echo # make sure spaces are checked quickly SET GLOBAL innodb_background_scrub_data_check_interval=1; -create table snapshot_status engine = myisam -select * from information_schema.global_status -where variable_name like 'innodb_scrub%'; - let $rowcount=500; -let $formatno = 1; +let $maxformatno= 4; +let $formatno= $maxformatno; + +let $tableformat= ( + a int auto_increment primary key, + b varchar(256), + c text, + index(b)) engine = innodb row_format; + while ($formatno) { -let $format = `select case $formatno - when 1 then 'dynamic' - when 2 then 'redundant' - when 3 then 'compact' - when 4 then 'compressed' - end`; dec $formatno; +let $format = `select case $formatno + when 0 then 'dynamic' + when 1 then 'redundant' + when 2 then 'compact' + when 3 then 'compressed' + end`; -truncate table snapshot_status; -insert into snapshot_status -select * from information_schema.global_status -where variable_name like 'innodb_scrub%'; - --- echo # --- echo # Test delete of records --- echo # - -eval create table t1 ( - a int auto_increment primary key, - b varchar(256), - c text, index(b)) engine = innodb row_format=$format; +let $t= delete_$formatno; +eval create table $t $tableformat=$format; let $numinserts = $rowcount; -- echo # Populate table with rows --disable_query_log +begin; while ($numinserts) { dec $numinserts; - insert into t1(b,c) values ('bicycle', repeat('repairman', 1000)); + eval insert into $t(b,c) values ('unicycle', repeat('wonderwoman', 1000)); } +commit; --enable_query_log -delete from t1; +eval delete from $t; --- echo # --- echo # Test delete+rollback+delete --- echo # +let $t= delete_rollback_delete_$formatno; -eval create table t2 ( - a int auto_increment primary key, - b varchar(256), - c text, index(b)) engine = innodb row_format=$format; +eval create table $t $tableformat=$format; let $numinserts = $rowcount; -- echo # Populate table with rows --disable_query_log +begin; while ($numinserts) { dec $numinserts; - insert into t2(b,c) values ('bicycle', repeat('repairman', 1000)); + eval insert into $t(b,c) values ('bicycle', repeat('repairman', 1000)); } +commit; --enable_query_log begin; -delete from t2; +eval delete from $t; rollback; -delete from t2; +eval delete from $t; --- echo # --- echo # Test insert+rollback --- echo # +let $t= insert_rollback_$formatno; -eval create table t3 ( - a int auto_increment primary key, - b varchar(256), - c text, index(b)) engine = innodb row_format=$format; +eval create table $t $tableformat=$format; let $numinserts = $rowcount; -- echo # Populate table with rows @@ -100,11 +83,12 @@ begin; while ($numinserts) { dec $numinserts; - insert into t3(b,c) values ('bicycle', repeat('repairman', 1000)); + eval insert into $t(b,c) values ('tricycle', repeat('superhuman', 1000)); } --enable_query_log rollback; +} -- echo # start scrubbing threads SET GLOBAL innodb_encryption_threads=5; @@ -130,35 +114,57 @@ if (!$success) -- die Timeout waiting for background threads } --- echo # Success! --- echo # stop scrubbing threads -SET GLOBAL innodb_encryption_threads=0; +SET GLOBAL innodb_fast_shutdown=0; +-- source include/shutdown_mysqld.inc --- echo # restart mysqld so that all pages are flushed --- source include/restart_mysqld.inc --- echo # read all rows from table --- disable_result_log -select * from t1; --- enable_result_log +let SEARCH_ABORT= FOUND; +let SEARCH_PATTERN= (un|b|tr)icycle|(repair|breakhu|wonderwo)man; +let SEARCH_RANGE= 12582912; +let SEARCH_FILE= $MYSQLD_DATADIR/ibdata1; --- echo # $format: delete: grep -c bicycle t1.ibd --- exec grep -c bicycle $t1_IBD || true --- echo # $format: delete: grep -c repairman t1.ibd --- exec grep -c repairman $t1_IBD || true +# We may randomly find copies of unscrubbed pages in the doublewrite buffer. +# Let us scrub the doublewrite buffer ourselves. +perl; +use Fcntl 'SEEK_SET'; +my $page_size = $ENV{INNODB_PAGE_SIZE}; +open(FILE, "+<", "$ENV{SEARCH_FILE}") or die "cannot open: $!\n"; +seek(FILE, $page_size * 64, SEEK_SET) or die "cannot seek: $!\n"; +print(FILE chr(0) x ($page_size * 128)) or die "cannot write: $!\n"; +close FILE or die "cannot close: $!\n";; +EOF --- echo # $format: delete rollback: grep -c bicycle t2.ibd --- exec grep -c bicycle $t2_IBD || true --- echo # $format: delete rollback: grep -c repairman t2.ibd --- exec grep -c repairman $t2_IBD || true +-- source include/search_pattern_in_file.inc --- echo # $format: insert rollback: grep -c bicycle t3.ibd --- exec grep -c bicycle $t3_IBD || true --- echo # $format: insert rollback: grep -c repairman t3.ibd --- exec grep -c repairman $t3_IBD || true +let $formatno= $maxformatno; +while ($formatno) +{ +dec $formatno; -drop table t1, t2, t3; +let $t= delete_$formatno.ibd; +let SEARCH_FILE= $MYSQLD_DATADIR/test/$t; +-- echo # $t +-- source include/search_pattern_in_file.inc +let $t= delete_rollback_delete_$formatno.ibd; +let SEARCH_FILE= $MYSQLD_DATADIR/test/$t; +-- echo # $t +-- source include/search_pattern_in_file.inc +let $t= insert_rollback_$formatno.ibd; +let SEARCH_FILE= $MYSQLD_DATADIR/test/$t; +-- echo # $t +-- source include/search_pattern_in_file.inc +} + +-- source include/start_mysqld.inc + +let $formatno= $maxformatno; +while ($formatno) +{ +dec $formatno; + +let $t= delete_$formatno, delete_rollback_delete_$formatno, insert_rollback_$formatno; + +eval check table $t; +eval drop table $t; } show variables like 'innodb_%scrub_data%'; - -drop table snapshot_status; diff --git a/mysql-test/suite/encryption/t/innodb_scrub_compressed.opt b/mysql-test/suite/encryption/t/innodb_scrub_compressed.opt deleted file mode 100644 index 48b04fa7049..00000000000 --- a/mysql-test/suite/encryption/t/innodb_scrub_compressed.opt +++ /dev/null @@ -1,9 +0,0 @@ ---innodb-file-per-table=1 ---innodb-file-format=Barracuda ---innodb-immediate-scrub-data-uncompressed=ON ---innodb-background-scrub-data-uncompressed=ON ---innodb-background-scrub-data-compressed=ON ---loose-innodb-debug-force-scrubbing=ON ---innodb-encrypt-tables=OFF ---innodb-encrypt-log=OFF ---innodb-tablespaces-scrubbing diff --git a/mysql-test/suite/encryption/t/innodb_scrub_compressed.test b/mysql-test/suite/encryption/t/innodb_scrub_compressed.test deleted file mode 100644 index d41edac7494..00000000000 --- a/mysql-test/suite/encryption/t/innodb_scrub_compressed.test +++ /dev/null @@ -1,161 +0,0 @@ --- source include/have_innodb.inc --- source include/not_embedded.inc --- source include/have_example_key_management_plugin.inc --- source include/not_windows.inc - -let $MYSQLD_DATADIR=`select @@datadir`; -let ib1_IBD = $MYSQLD_DATADIR/ibdata1; -let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd; -let t2_IBD = $MYSQLD_DATADIR/test/t2.ibd; -let t3_IBD = $MYSQLD_DATADIR/test/t3.ibd; - -let $rowcount=500; - --- echo # make sure spaces are checked quickly -SET GLOBAL innodb_background_scrub_data_check_interval=1; - --- echo # --- echo # Test delete of records --- echo # - -eval create table t1 ( - a int auto_increment primary key, - b varchar(256), - c text) engine = innodb row_format=compressed; - -let $numinserts = $rowcount; --- echo # Populate table with rows ---disable_query_log -while ($numinserts) -{ - dec $numinserts; - insert into t1(b,c) values ('bicycle', repeat('repairman', 1000)); -} ---enable_query_log - -delete from t1; - --- echo # --- echo # Test delete+rollback+delete --- echo # - -eval create table t2 ( - a int auto_increment primary key, - b varchar(256), - c text) engine = innodb row_format=compressed; - -let $numinserts = $rowcount; --- echo # Populate table with rows ---disable_query_log -while ($numinserts) -{ - dec $numinserts; - insert into t2(b,c) values ('boondoggle', repeat('waste of time', 1000)); -} ---enable_query_log - -begin; -delete from t2; -rollback; -delete from t2; - --- echo # --- echo # Test insert+rollback --- echo # - -eval create table t3 ( - a int auto_increment primary key, - b varchar(256), - c text) engine = innodb row_format=compressed; - -let $numinserts = $rowcount; --- echo # Populate table with rows -begin; ---disable_query_log -while ($numinserts) -{ - dec $numinserts; - insert into t3(b,c) values ('keso', repeat('kent', 1000)); -} ---enable_query_log - -rollback; - --- echo # start scrubbing threads -SET GLOBAL innodb_encryption_threads=5; --- echo # Wait max 10 min for scrubbing of this table -let $cnt=600; -while ($cnt) -{ - let $success=`SELECT COUNT(*) = 0 -FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_SCRUBBING -WHERE LAST_SCRUB_COMPLETED IS NULL AND ( NAME like 'test/%' OR SPACE = 0 )`; - - if ($success) - { - let $cnt=0; - } - if (!$success) - { - real_sleep 1; - dec $cnt; - } -} -if (!$success) -{ - SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_SCRUBBING; - SHOW STATUS LIKE 'innodb_%scrub%'; - -- die Timeout waiting for background threads -} --- echo # Success! --- echo # stop scrubbing threads -SET GLOBAL innodb_encryption_threads=0; - ---echo # Now there should be background scrubs -let $success=`select sum(variable_value) > 0 -from information_schema.global_status -where variable_name in ('innodb_scrub_background_page_reorganizations', -'innodb_scrub_background_page_splits')`; - -if (!$success) { - show status like 'innodb_scrub%'; -} - --- echo # restart mysqld so that all pages are flushed (encryption off) --- echo # so that grep will find stuff --- source include/restart_mysqld.inc --- echo # read all rows from table --- disable_result_log -select * from t1; -select * from t2; -select * from t3; --- enable_result_log - --- echo # grep -c bicycle t1.ibd --- exec grep -c bicycle $t1_IBD || true --- echo # grep -c bicycle ibdata1 --- exec grep -c bicycle $ib1_IBD || true --- echo # grep -c repairman t1.ibd --- exec grep -c repairman $t1_IBD || true --- echo # grep -c repairman ibdata1 --- exec grep -c repairman $ib1_IBD || true - --- echo # grep -c boondoggle t2.ibd --- exec grep -c boondoggle $t2_IBD || true --- echo # grep -c boondoggle ibdata1 --- exec grep -c boondoggle $ib1_IBD || true --- echo # grep -c waste t2.ibd --- exec grep -c waste $t2_IBD || true --- echo # grep -c waste ibdata1 --- exec grep -c waste $ib1_IBD || true - --- echo # grep -c keso t3.ibd --- exec grep -c keso $t3_IBD || true --- echo # grep -c keso ibdata1 --- exec grep -c keso $ib1_IBD || true --- echo # grep -c kent t3.ibd --- exec grep -c kent $t3_IBD || true --- echo # grep -c kent ibdata1 --- exec grep -c kent $ib1_IBD || true - -drop table t1, t2, t3; diff --git a/mysql-test/suite/engines/funcs/r/comment_column.result b/mysql-test/suite/engines/funcs/r/comment_column.result index 184ac3cd7cb..b57ea26fc86 100644 --- a/mysql-test/suite/engines/funcs/r/comment_column.result +++ b/mysql-test/suite/engines/funcs/r/comment_column.result @@ -236,6 +236,7 @@ t1 CREATE TABLE `t1` ( `c10` int(11) DEFAULT NULL COMMENT 'ABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd', KEY `i2` (`c2`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT='ABCDEFGHIJabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 ADD COLUMN c11 INTEGER COMMENT 'ABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'; Warnings: Warning 1629 Comment for field 'c11' is too long (max = 1024) diff --git a/mysql-test/suite/engines/funcs/r/comment_index.result b/mysql-test/suite/engines/funcs/r/comment_index.result index f32fdb33ce1..0b3ef838d5f 100644 --- a/mysql-test/suite/engines/funcs/r/comment_index.result +++ b/mysql-test/suite/engines/funcs/r/comment_index.result @@ -265,6 +265,7 @@ t1 CREATE TABLE `t1` ( KEY `i10` (`c10`) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd', KEY `i1_3` (`c1`,`c2`,`c3`) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd' ) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT='ABCDEFGHIJabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd' +SET STATEMENT sql_mode = '' FOR CREATE INDEX i11 ON t1(c11) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'; Warnings: Warning 1688 Comment for index 'i11' is too long (max = 1024) @@ -317,6 +318,7 @@ t1 CREATE TABLE `t1` ( KEY `i1_3` (`c1`,`c2`,`c3`) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd', KEY `i11` (`c11`) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd' ) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT='ABCDEFGHIJabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 ADD INDEX (c13) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'; Warnings: Warning 1688 Comment for index 'c13' is too long (max = 1024) diff --git a/mysql-test/suite/engines/funcs/r/date_function.result b/mysql-test/suite/engines/funcs/r/date_function.result index 51d492c347b..3eea9330191 100644 --- a/mysql-test/suite/engines/funcs/r/date_function.result +++ b/mysql-test/suite/engines/funcs/r/date_function.result @@ -28,7 +28,7 @@ DATE(c1) 2008-02-29 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -72,7 +72,7 @@ Monday Friday DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -116,7 +116,7 @@ DAYOFMONTH(c1) 29 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -160,7 +160,7 @@ DAYOFWEEK(c1) 6 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -204,7 +204,7 @@ DAYOFYEAR(c1) 60 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -248,7 +248,7 @@ FROM_DAYS(c1) 0000-00-00 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -292,7 +292,7 @@ LAST_DAY(c1) 2008-02-29 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -336,7 +336,7 @@ MONTH(c1) 2 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -380,7 +380,7 @@ December February DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -424,7 +424,7 @@ QUARTER(c1) 1 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -468,7 +468,7 @@ TIMESTAMP(c1) 2008-02-29 00:00:00 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -512,7 +512,7 @@ TO_DAYS(c1) 733466 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -556,7 +556,7 @@ WEEK(c1) 8 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -600,7 +600,7 @@ WEEKDAY(c1) 4 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -644,7 +644,7 @@ WEEKOFYEAR(c1) 9 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -688,7 +688,7 @@ YEAR(c1) 2008 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); @@ -732,7 +732,7 @@ YEARWEEK(c1) 200808 DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31'); diff --git a/mysql-test/suite/engines/funcs/r/datetime_function.result b/mysql-test/suite/engines/funcs/r/datetime_function.result index 583552edc7d..57076939354 100644 --- a/mysql-test/suite/engines/funcs/r/datetime_function.result +++ b/mysql-test/suite/engines/funcs/r/datetime_function.result @@ -16,7 +16,7 @@ INSERT INTO t3 VALUES('2000-01-01 00:00:00'); INSERT INTO t3 VALUES('2008-02-29 13:13:13'); DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01 00:00:00'); +INSERT IGNORE INTO t3 VALUES('1000-01-01 00:00:00'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31 23:59:59'); diff --git a/mysql-test/suite/engines/funcs/r/in_enum_null.result b/mysql-test/suite/engines/funcs/r/in_enum_null.result index fbd7a2878ff..2575ee4d1cb 100644 --- a/mysql-test/suite/engines/funcs/r/in_enum_null.result +++ b/mysql-test/suite/engines/funcs/r/in_enum_null.result @@ -1,12 +1,12 @@ DROP TABLE IF EXISTS t7; CREATE TABLE t7(c1 ENUM('a','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij') NULL); INSERT INTO t7(c1) VALUES(NULL); -INSERT INTO t7(c1) VALUES(''); +INSERT IGNORE INTO t7(c1) VALUES(''); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 INSERT INTO t7(c1) VALUES('a'); INSERT INTO t7(c1) VALUES('abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); -INSERT INTO t7(c1) VALUES('abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); +INSERT IGNORE INTO t7(c1) VALUES('abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 SELECT * FROM t7; diff --git a/mysql-test/suite/engines/funcs/r/in_set_null.result b/mysql-test/suite/engines/funcs/r/in_set_null.result index 0106cfc3c32..8ceedb5c471 100644 --- a/mysql-test/suite/engines/funcs/r/in_set_null.result +++ b/mysql-test/suite/engines/funcs/r/in_set_null.result @@ -4,7 +4,7 @@ INSERT INTO t7(c1) VALUES(NULL); INSERT INTO t7(c1) VALUES(''); INSERT INTO t7(c1) VALUES('a'); INSERT INTO t7(c1) VALUES('abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); -INSERT INTO t7(c1) VALUES('abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); +INSERT IGNORE INTO t7(c1) VALUES('abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 INSERT INTO t7(c1) VALUES('a,abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); diff --git a/mysql-test/suite/engines/funcs/r/jp_comment_column.result b/mysql-test/suite/engines/funcs/r/jp_comment_column.result index 9b33dbc3f26..ea50b296765 100644 --- a/mysql-test/suite/engines/funcs/r/jp_comment_column.result +++ b/mysql-test/suite/engines/funcs/r/jp_comment_column.result @@ -237,6 +237,7 @@ t1 CREATE TABLE `t1` ( `c10` int(11) DEFAULT NULL COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦', KEY `i2` (`c2`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT='‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 ADD COLUMN c11 INTEGER COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦'; Warnings: Warning 1629 Comment for field 'c11' is too long (max = 1024) diff --git a/mysql-test/suite/engines/funcs/r/jp_comment_index.result b/mysql-test/suite/engines/funcs/r/jp_comment_index.result index ead0c5f7342..3b5c29f25c8 100644 --- a/mysql-test/suite/engines/funcs/r/jp_comment_index.result +++ b/mysql-test/suite/engines/funcs/r/jp_comment_index.result @@ -266,6 +266,7 @@ t1 CREATE TABLE `t1` ( KEY `i10` (`c10`) COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦', KEY `i1_3` (`c1`,`c2`,`c3`) COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦' ) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT='‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦' +SET STATEMENT sql_mode = '' FOR CREATE INDEX i11 ON t1(c11) COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦'; Warnings: Warning 1688 Comment for index 'i11' is too long (max = 1024) @@ -318,6 +319,7 @@ t1 CREATE TABLE `t1` ( KEY `i1_3` (`c1`,`c2`,`c3`) COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦', KEY `i11` (`c11`) COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦' ) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT='‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 ADD INDEX (c13) COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦'; Warnings: Warning 1688 Comment for index 'c13' is too long (max = 1024) diff --git a/mysql-test/suite/engines/funcs/r/ta_set_drop_default.result b/mysql-test/suite/engines/funcs/r/ta_set_drop_default.result index ffd3c000c7d..442c6bc771d 100644 --- a/mysql-test/suite/engines/funcs/r/ta_set_drop_default.result +++ b/mysql-test/suite/engines/funcs/r/ta_set_drop_default.result @@ -23,7 +23,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -64,7 +64,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -105,7 +105,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -146,7 +146,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -187,7 +187,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -228,7 +228,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -269,7 +269,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -310,7 +310,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -351,7 +351,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -392,7 +392,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -433,7 +433,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -474,7 +474,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -515,7 +515,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -556,7 +556,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -597,7 +597,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -638,7 +638,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -679,7 +679,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -720,7 +720,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -761,7 +761,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -802,7 +802,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -843,7 +843,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; @@ -884,7 +884,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`c1`) ) ENGINE=ENGINE DEFAULT CHARSET=latin1 ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); Warnings: Warning 1364 Field 'c2' doesn't have a default value SELECT * FROM t1 ORDER BY c1; diff --git a/mysql-test/suite/engines/funcs/r/tc_partition_remove.result b/mysql-test/suite/engines/funcs/r/tc_partition_remove.result index 6e7831bd6c5..3ae3439f83c 100644 --- a/mysql-test/suite/engines/funcs/r/tc_partition_remove.result +++ b/mysql-test/suite/engines/funcs/r/tc_partition_remove.result @@ -1,6 +1,6 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 TINYINT NULL, c2 CHAR(5)) PARTITION BY HASH(c1); -INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc'); +INSERT IGNORE INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc'); Warnings: Warning 1264 Out of range value for column 'c1' at row 3 Warning 1264 Out of range value for column 'c1' at row 4 @@ -238,7 +238,7 @@ DROP TABLE t1; SHOW TABLES; Tables_in_test CREATE TABLE t1 (c1 TINYINT NOT NULL, c2 CHAR(5)) PARTITION BY HASH(c1); -INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc'); +INSERT IGNORE INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc'); Warnings: Warning 1264 Out of range value for column 'c1' at row 3 Warning 1264 Out of range value for column 'c1' at row 4 diff --git a/mysql-test/suite/engines/funcs/r/time_function.result b/mysql-test/suite/engines/funcs/r/time_function.result index f5b2f289dc8..7c8b0f617bb 100644 --- a/mysql-test/suite/engines/funcs/r/time_function.result +++ b/mysql-test/suite/engines/funcs/r/time_function.result @@ -2,7 +2,7 @@ DROP TABLE IF EXISTS t3; CREATE TABLE t3(c1 TIME NOT NULL); INSERT INTO t3 VALUES('00:00:00'); INSERT INTO t3 VALUES('23:59:59'); -INSERT INTO t3 VALUES('99:99:99'); +INSERT IGNORE INTO t3 VALUES('99:99:99'); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 INSERT INTO t3 VALUES('12:00:00'); diff --git a/mysql-test/suite/engines/funcs/t/comment_column.test b/mysql-test/suite/engines/funcs/t/comment_column.test index cc2d1013271..7831ffb213b 100644 --- a/mysql-test/suite/engines/funcs/t/comment_column.test +++ b/mysql-test/suite/engines/funcs/t/comment_column.test @@ -62,6 +62,7 @@ SHOW CREATE TABLE t1; # comment overflow(warning) +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 ADD COLUMN c11 INTEGER COMMENT 'ABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'; SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1'; SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1'; diff --git a/mysql-test/suite/engines/funcs/t/comment_index.test b/mysql-test/suite/engines/funcs/t/comment_index.test index ead6a0313b1..e654b5c2e34 100644 --- a/mysql-test/suite/engines/funcs/t/comment_index.test +++ b/mysql-test/suite/engines/funcs/t/comment_index.test @@ -57,6 +57,7 @@ SHOW CREATE TABLE t1; # comment overflow(warning) +SET STATEMENT sql_mode = '' FOR CREATE INDEX i11 ON t1(c11) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'; SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1'; SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1'; @@ -65,6 +66,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 ADD INDEX (c13) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'; SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1'; SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1'; diff --git a/mysql-test/suite/engines/funcs/t/date_function.test b/mysql-test/suite/engines/funcs/t/date_function.test index 360dc898731..39698fa4870 100644 --- a/mysql-test/suite/engines/funcs/t/date_function.test +++ b/mysql-test/suite/engines/funcs/t/date_function.test @@ -18,7 +18,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT DATE(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -42,7 +42,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT DAYNAME(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -66,7 +66,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT DAYOFMONTH(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -90,7 +90,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT DAYOFWEEK(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -114,7 +114,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT DAYOFYEAR(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -138,7 +138,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT FROM_DAYS(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -162,7 +162,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT LAST_DAY(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -186,7 +186,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT MONTH(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -210,7 +210,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT MONTHNAME(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -234,7 +234,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT QUARTER(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -258,7 +258,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT TIMESTAMP(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -282,7 +282,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT TO_DAYS(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -306,7 +306,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT WEEK(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -330,7 +330,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT WEEKDAY(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -354,7 +354,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT WEEKOFYEAR(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -378,7 +378,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT YEAR(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); @@ -402,7 +402,7 @@ INSERT INTO t3 VALUES('2008-02-29'); SELECT YEARWEEK(c1) FROM t3; DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01'); +INSERT IGNORE INTO t3 VALUES('1000-01-01'); INSERT INTO t3 VALUES('1999-12-31'); INSERT INTO t3 VALUES('2000-01-01'); INSERT INTO t3 VALUES('2006-12-25'); diff --git a/mysql-test/suite/engines/funcs/t/datetime_function.test b/mysql-test/suite/engines/funcs/t/datetime_function.test index 00d150326c1..467ea4b98c0 100644 --- a/mysql-test/suite/engines/funcs/t/datetime_function.test +++ b/mysql-test/suite/engines/funcs/t/datetime_function.test @@ -14,7 +14,7 @@ INSERT INTO t3 VALUES('2000-01-01 00:00:00'); INSERT INTO t3 VALUES('2008-02-29 13:13:13'); DROP TABLE t3; CREATE TABLE t3(c1 TIMESTAMP NOT NULL); -INSERT INTO t3 VALUES('1000-01-01 00:00:00'); +INSERT IGNORE INTO t3 VALUES('1000-01-01 00:00:00'); INSERT INTO t3 VALUES('1999-12-31 23:59:59'); INSERT INTO t3 VALUES('2000-01-01 00:00:00'); INSERT INTO t3 VALUES('2008-02-29 13:13:13'); diff --git a/mysql-test/suite/engines/funcs/t/in_enum_null.test b/mysql-test/suite/engines/funcs/t/in_enum_null.test index 67bab2a6225..2551527cc4d 100644 --- a/mysql-test/suite/engines/funcs/t/in_enum_null.test +++ b/mysql-test/suite/engines/funcs/t/in_enum_null.test @@ -3,10 +3,10 @@ DROP TABLE IF EXISTS t7; --enable_warnings CREATE TABLE t7(c1 ENUM('a','abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij') NULL); INSERT INTO t7(c1) VALUES(NULL); -INSERT INTO t7(c1) VALUES(''); +INSERT IGNORE INTO t7(c1) VALUES(''); INSERT INTO t7(c1) VALUES('a'); INSERT INTO t7(c1) VALUES('abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); -INSERT INTO t7(c1) VALUES('abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); +INSERT IGNORE INTO t7(c1) VALUES('abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); SELECT * FROM t7; SELECT COUNT(c1) AS null_rows FROM t7 WHERE c1 IS NULL; DROP TABLE t7; diff --git a/mysql-test/suite/engines/funcs/t/in_set_null.test b/mysql-test/suite/engines/funcs/t/in_set_null.test index 845f8351b03..aaeb7056685 100644 --- a/mysql-test/suite/engines/funcs/t/in_set_null.test +++ b/mysql-test/suite/engines/funcs/t/in_set_null.test @@ -6,7 +6,7 @@ INSERT INTO t7(c1) VALUES(NULL); INSERT INTO t7(c1) VALUES(''); INSERT INTO t7(c1) VALUES('a'); INSERT INTO t7(c1) VALUES('abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); -INSERT INTO t7(c1) VALUES('abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); +INSERT IGNORE INTO t7(c1) VALUES('abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); INSERT INTO t7(c1) VALUES('a,abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij'); SELECT * FROM t7; SELECT COUNT(c1) AS null_rows FROM t7 WHERE c1 IS NULL; diff --git a/mysql-test/suite/engines/funcs/t/jp_comment_column.test b/mysql-test/suite/engines/funcs/t/jp_comment_column.test index 4a070afd21c..63867242502 100644 --- a/mysql-test/suite/engines/funcs/t/jp_comment_column.test +++ b/mysql-test/suite/engines/funcs/t/jp_comment_column.test @@ -63,6 +63,7 @@ SHOW CREATE TABLE t1; # comment overflow(warning) +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 ADD COLUMN c11 INTEGER COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦'; SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1'; SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1'; diff --git a/mysql-test/suite/engines/funcs/t/jp_comment_index.test b/mysql-test/suite/engines/funcs/t/jp_comment_index.test index 59f750d4bb7..aba14c79c43 100644 --- a/mysql-test/suite/engines/funcs/t/jp_comment_index.test +++ b/mysql-test/suite/engines/funcs/t/jp_comment_index.test @@ -58,6 +58,7 @@ SHOW CREATE TABLE t1; # comment overflow(warning) +SET STATEMENT sql_mode = '' FOR CREATE INDEX i11 ON t1(c11) COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦'; SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1'; SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1'; @@ -66,6 +67,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE SHOW CREATE TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 ADD INDEX (c13) COMMENT '‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚ ‚¢‚¤‚¦'; SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1'; SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1'; diff --git a/mysql-test/suite/engines/funcs/t/rpl_row_until.test b/mysql-test/suite/engines/funcs/t/rpl_row_until.test index ef48212660d..7f8b0000042 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_row_until.test +++ b/mysql-test/suite/engines/funcs/t/rpl_row_until.test @@ -10,8 +10,8 @@ INSERT INTO t1 VALUES (1),(2),(3),(4); DROP TABLE t1; # Save master log position for query DROP TABLE t1 save_master_pos; -let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 10); -let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 10); +let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 11); +let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 11); CREATE TABLE t2(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY); # Save master log position for query CREATE TABLE t2 @@ -21,7 +21,7 @@ let $master_pos_create_t2= query_get_value(SHOW BINLOG EVENTS, Pos, 12); INSERT INTO t2 VALUES (1),(2); save_master_pos; # Save master log position for query INSERT INTO t2 VALUES (1),(2); -let $master_pos_insert1_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 17); +let $master_pos_insert1_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 19); sync_slave_with_master; # Save relay log position for query INSERT INTO t2 VALUES (1),(2); @@ -31,7 +31,7 @@ connection master; INSERT INTO t2 VALUES (3),(4); DROP TABLE t2; # Save master log position for query DROP TABLE t2; -let $master_pos_drop_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 23); +let $master_pos_drop_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 26); sync_slave_with_master; --source include/stop_slave.inc diff --git a/mysql-test/suite/engines/funcs/t/ta_set_drop_default.test b/mysql-test/suite/engines/funcs/t/ta_set_drop_default.test index dde3c201cca..7f889dcb905 100644 --- a/mysql-test/suite/engines/funcs/t/ta_set_drop_default.test +++ b/mysql-test/suite/engines/funcs/t/ta_set_drop_default.test @@ -13,7 +13,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -30,7 +30,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -47,7 +47,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -64,7 +64,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -81,7 +81,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -98,7 +98,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -115,7 +115,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -132,7 +132,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -149,7 +149,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -166,7 +166,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -183,7 +183,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -200,7 +200,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -217,7 +217,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -234,7 +234,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -251,7 +251,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -268,7 +268,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -285,7 +285,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -302,7 +302,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -319,7 +319,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -336,7 +336,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -353,7 +353,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" @@ -370,7 +370,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT; -INSERT INTO t1(c1) VALUES(2); +INSERT IGNORE INTO t1(c1) VALUES(2); SELECT * FROM t1 ORDER BY c1; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" diff --git a/mysql-test/suite/engines/funcs/t/tc_partition_remove.test b/mysql-test/suite/engines/funcs/t/tc_partition_remove.test index a10d6d609ec..b0e99d54611 100644 --- a/mysql-test/suite/engines/funcs/t/tc_partition_remove.test +++ b/mysql-test/suite/engines/funcs/t/tc_partition_remove.test @@ -2,7 +2,7 @@ DROP TABLE IF EXISTS t1; --enable_warnings CREATE TABLE t1 (c1 TINYINT NULL, c2 CHAR(5)) PARTITION BY HASH(c1); -INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc'); +INSERT IGNORE INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc'); SELECT * FROM t1 ORDER BY c1; SHOW TABLES; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; @@ -80,7 +80,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE " PAGE_CHECKSUM=0" "" SHOW CREATE TABLE t1; DROP TABLE t1; SHOW TABLES; CREATE TABLE t1 (c1 TINYINT NOT NULL, c2 CHAR(5)) PARTITION BY HASH(c1); -INSERT INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc'); +INSERT IGNORE INTO t1 VALUES(0,'abc'),(100,'abc'),(200,'abc'),(300,'abc'),(400,'abc'); SELECT * FROM t1 ORDER BY c1; SHOW TABLES; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; diff --git a/mysql-test/suite/engines/funcs/t/time_function.test b/mysql-test/suite/engines/funcs/t/time_function.test index 91f8e8989d2..e5ab395c452 100644 --- a/mysql-test/suite/engines/funcs/t/time_function.test +++ b/mysql-test/suite/engines/funcs/t/time_function.test @@ -4,7 +4,7 @@ DROP TABLE IF EXISTS t3; CREATE TABLE t3(c1 TIME NOT NULL); INSERT INTO t3 VALUES('00:00:00'); INSERT INTO t3 VALUES('23:59:59'); -INSERT INTO t3 VALUES('99:99:99'); +INSERT IGNORE INTO t3 VALUES('99:99:99'); INSERT INTO t3 VALUES('12:00:00'); INSERT INTO t3 VALUES('13:13:13'); DROP TABLE t3; diff --git a/mysql-test/suite/engines/iuds/r/delete_decimal.result b/mysql-test/suite/engines/iuds/r/delete_decimal.result index 4977c66776d..1925bef563d 100644 --- a/mysql-test/suite/engines/iuds/r/delete_decimal.result +++ b/mysql-test/suite/engines/iuds/r/delete_decimal.result @@ -1,7 +1,7 @@ DROP TABLE IF EXISTS t1,t2,t3,t4; CREATE TABLE t1(c1 DECIMAL(10,5) UNSIGNED NOT NULL, c2 DECIMAL(10,5) SIGNED NULL, c3 DECIMAL, c4 INT, UNIQUE INDEX idx(c1,c4)); INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); -INSERT INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -13,11 +13,11 @@ Note 1265 Data truncated for column 'c2' at row 1 Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); -INSERT INTO t1 VALUES ("-.1","-.1","-.1",8); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Note 1265 Data truncated for column 'c3' at row 1 -INSERT INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -183,17 +183,17 @@ c1 c2 c3 DROP TABLES IF EXISTS t1,t2,t3,t4; CREATE TABLE t1(c1 FLOAT(10,5) UNSIGNED NOT NULL, c2 FLOAT(10,5) SIGNED NULL, c3 FLOAT, c4 INT, UNIQUE INDEX idx(c1,c4)); INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); -INSERT INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); -INSERT INTO t1 VALUES ("-.1","-.1","-.1",8); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -360,17 +360,17 @@ c1 c2 c3 DROP TABLES IF EXISTS t1,t2,t3,t4; CREATE TABLE t1(c1 DOUBLE(10,5) UNSIGNED NOT NULL, c2 DOUBLE(10,5) SIGNED NULL, c3 DOUBLE, c4 INT, UNIQUE INDEX idx(c1,c4)); INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); -INSERT INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); -INSERT INTO t1 VALUES ("-.1","-.1","-.1",8); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 diff --git a/mysql-test/suite/engines/iuds/r/insert_decimal.result b/mysql-test/suite/engines/iuds/r/insert_decimal.result index 77e9901cbd5..a341de58946 100644 --- a/mysql-test/suite/engines/iuds/r/insert_decimal.result +++ b/mysql-test/suite/engines/iuds/r/insert_decimal.result @@ -11,7 +11,7 @@ Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 VALUES('99999.99999','-99999.99999','99999.99999',3); Warnings: Note 1265 Data truncated for column 'c3' at row 1 -INSERT INTO t2 VALUES('-9999999999','-9999999999','9999999999',4); +INSERT IGNORE INTO t2 VALUES('-9999999999','-9999999999','9999999999',4); Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t1; @@ -19,6 +19,7 @@ c1 c2 c3 c4 100.05000 -100.05000 100 1 12345.00001 NULL NULL NULL 99999.99999 -99999.99999 100000 3 +SET STATEMENT sql_mode = '' FOR INSERT INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); ERROR 23000: Duplicate entry '99999.99999--99999.99999' for key 'idx' DELETE FROM t1 WHERE c1='99999.99999' AND c2='-99999.99999'; @@ -26,30 +27,30 @@ SELECT * FROM t1; c1 c2 c3 c4 100.05000 -100.05000 100 1 12345.00001 NULL NULL NULL -INSERT INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); +INSERT IGNORE INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Note 1265 Data truncated for column 'c3' at row 1 -INSERT INTO t2 VALUES('10000000000','-10000000000','10000000000',6); +INSERT IGNORE INTO t2 VALUES('10000000000','-10000000000','10000000000',6); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 insert into t1 values ("0.0","0.0","0.0",7),("01.0","01.0","01.0",10); -insert into t1 values ("-.1","-.1","-.1",13); +insert ignore into t1 values ("-.1","-.1","-.1",13); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Note 1265 Data truncated for column 'c3' at row 1 -insert into t1 values ("+111111111.11","+111111111.11","+111111111.11",19); +insert ignore into t1 values ("+111111111.11","+111111111.11","+111111111.11",19); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Note 1265 Data truncated for column 'c3' at row 1 -insert into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12); +insert ignore into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12); Warnings: Warning 1264 Out of range value for column 'c2' at row 6 -insert into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15); +insert ignore into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15); Warnings: Note 1265 Data truncated for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -60,10 +61,10 @@ Note 1265 Data truncated for column 'c3' at row 2 Note 1265 Data truncated for column 'c1' at row 3 Note 1265 Data truncated for column 'c2' at row 3 Note 1265 Data truncated for column 'c3' at row 3 -insert into t2 values ("00000000000001","00000000000001","00000000000001",16),("+0000000000001","+0000000000001","+0000000000001",17),("-0000000000001","-0000000000001","-0000000000001",18); +insert ignore into t2 values ("00000000000001","00000000000001","00000000000001",16),("+0000000000001","+0000000000001","+0000000000001",17),("-0000000000001","-0000000000001","-0000000000001",18); Warnings: Warning 1264 Out of range value for column 'c2' at row 3 -insert into t2 values ("+111111111.11","+111111111.11","+111111111.11",19),("111111111.11","111111111.11","111111111.11",20),("-11111111.11","-11111111.11","-11111111.11",21); +insert ignore into t2 values ("+111111111.11","+111111111.11","+111111111.11",19),("111111111.11","111111111.11","111111111.11",20),("-11111111.11","-11111111.11","-11111111.11",21); Warnings: Note 1265 Data truncated for column 'c1' at row 1 Note 1265 Data truncated for column 'c2' at row 1 @@ -74,7 +75,7 @@ Note 1265 Data truncated for column 'c3' at row 2 Note 1265 Data truncated for column 'c1' at row 3 Warning 1264 Out of range value for column 'c2' at row 3 Note 1265 Data truncated for column 'c3' at row 3 -insert into t2 values ("-111111111.11","-111111111.11","-111111111.11",22),("+1111111111.11","+1111111111.11","+1111111111.11",23),("1111111111.11","1111111111.11","1111111111.11",24); +insert ignore into t2 values ("-111111111.11","-111111111.11","-111111111.11",22),("+1111111111.11","+1111111111.11","+1111111111.11",23),("1111111111.11","1111111111.11","1111111111.11",24); Warnings: Note 1265 Data truncated for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85,7 +86,7 @@ Note 1265 Data truncated for column 'c3' at row 2 Note 1265 Data truncated for column 'c1' at row 3 Note 1265 Data truncated for column 'c2' at row 3 Note 1265 Data truncated for column 'c3' at row 3 -insert into t2 values ("1e+1000","1e+1000","1e+1000",25),("1e-1000","1e-1000","1e-1000",26),("-1e+1000","-1e+1000","-1e+1000",27); +insert ignore into t2 values ("1e+1000","1e+1000","1e+1000",25),("1e-1000","1e-1000","1e-1000",26),("-1e+1000","-1e+1000","-1e+1000",27); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -96,7 +97,7 @@ Note 1265 Data truncated for column 'c3' at row 2 Warning 1264 Out of range value for column 'c1' at row 3 Warning 1264 Out of range value for column 'c2' at row 3 Warning 1264 Out of range value for column 'c3' at row 3 -insert into t2 values ("1e+4294967296","1e+4294967296","1e+4294967296",28),("1e-4294967296","1e-4294967296","1e-4294967296",29); +insert ignore into t2 values ("1e+4294967296","1e+4294967296","1e+4294967296",28),("1e-4294967296","1e-4294967296","1e-4294967296",29); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -104,7 +105,7 @@ Warning 1264 Out of range value for column 'c3' at row 1 Note 1265 Data truncated for column 'c1' at row 2 Note 1265 Data truncated for column 'c2' at row 2 Note 1265 Data truncated for column 'c3' at row 2 -insert into t2 values ("1e+18446744073709551615","1e+18446744073709551615","1e+18446744073709551615",30),("1e+18446744073709551616","1e+18446744073709551616","1e+18446744073709551616",31),("1e-9223372036854775807","1e-9223372036854775807","1e-9223372036854775807",32),("1e-9223372036854775809","1e-9223372036854775809","1e-9223372036854775809",33); +insert ignore into t2 values ("1e+18446744073709551615","1e+18446744073709551615","1e+18446744073709551615",30),("1e+18446744073709551616","1e+18446744073709551616","1e+18446744073709551616",31),("1e-9223372036854775807","1e-9223372036854775807","1e-9223372036854775807",32),("1e-9223372036854775809","1e-9223372036854775809","1e-9223372036854775809",33); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -945,13 +946,13 @@ c1 MIN(c2) 12345.00001 NULL 99999.99999 -99999.99999 CREATE TABLE t5(c1 DECIMAL(65,0) UNSIGNED NOT NULL, c2 DECIMAL(65,0) SIGNED NULL, c3 DECIMAL, c4 INT, INDEX idx(c1,c2)); -INSERT INTO t5 VALUES('1e+64','-1e+64','1e+64',1),('1e-64','-1e-64','1e-64',2); +INSERT IGNORE INTO t5 VALUES('1e+64','-1e+64','1e+64',1),('1e-64','-1e-64','1e-64',2); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 Note 1265 Data truncated for column 'c1' at row 2 Note 1265 Data truncated for column 'c2' at row 2 Note 1265 Data truncated for column 'c3' at row 2 -INSERT INTO t5 VALUES('1.2e+65','-1.2e+65','1.2e+65',3),('1.2e-65','-1.2e-65','1.2e-65',4); +INSERT IGNORE INTO t5 VALUES('1.2e+65','-1.2e+65','1.2e+65',3),('1.2e-65','-1.2e-65','1.2e-65',4); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -1022,7 +1023,7 @@ INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100.05000',1); INSERT INTO t2 VALUES('-1000000000','1000000000','1000000000',2); INSERT INTO t1(c1) VALUES('12345.000009'); INSERT INTO t1 VALUES('99999.99999','-99999.99999','99999.99999',3); -INSERT INTO t2 VALUES('-9999999999','-9999999999','9999999999',4); +INSERT IGNORE INTO t2 VALUES('-9999999999','-9999999999','9999999999',4); Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t1; @@ -1030,41 +1031,42 @@ c1 c2 c3 c4 100.05000 -100.05000 100.05 1 12345.00000 NULL NULL NULL 100000.00000 -100000.00000 100000 3 +SET STATEMENT sql_mode = '' FOR INSERT INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); ERROR 23000: Duplicate entry '100000.00000--100000.00000' for key 'idx' DELETE FROM t1 WHERE c1='100000.00000' AND c2='-100000.00000'; -INSERT INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); +INSERT IGNORE INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 -INSERT INTO t2 VALUES('10000000000','-10000000000','10000000000',6); +INSERT IGNORE INTO t2 VALUES('10000000000','-10000000000','10000000000',6); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 insert into t1 values ("0.0","0.0","0.0",7),("01.0","01.0","01.0",10); -insert into t1 values ("-.1","-.1","-.1",13); +insert ignore into t1 values ("-.1","-.1","-.1",13); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -insert into t1 values ("+111111111.11","+111111111.11","+111111111.11",19); +insert ignore into t1 values ("+111111111.11","+111111111.11","+111111111.11",19); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 -insert into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12); +insert ignore into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12); Warnings: Warning 1264 Out of range value for column 'c2' at row 6 -insert into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15); +insert ignore into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15); Warnings: Warning 1264 Out of range value for column 'c2' at row 1 -insert into t2 values ("00000000000001","00000000000001","00000000000001",16),("+0000000000001","+0000000000001","+0000000000001",17),("-0000000000001","-0000000000001","-0000000000001",18); +insert ignore into t2 values ("00000000000001","00000000000001","00000000000001",16),("+0000000000001","+0000000000001","+0000000000001",17),("-0000000000001","-0000000000001","-0000000000001",18); Warnings: Warning 1264 Out of range value for column 'c2' at row 3 -insert into t2 values ("+111111111.11","+111111111.11","+111111111.11",19),("111111111.11","111111111.11","111111111.11",20),("-11111111.11","-11111111.11","-11111111.11",21); +insert ignore into t2 values ("+111111111.11","+111111111.11","+111111111.11",19),("111111111.11","111111111.11","111111111.11",20),("-11111111.11","-11111111.11","-11111111.11",21); Warnings: Warning 1264 Out of range value for column 'c2' at row 3 -insert into t2 values ("-111111111.11","-111111111.11","-111111111.11",22),("+1111111111.11","+1111111111.11","+1111111111.11",23),("1111111111.11","1111111111.11","1111111111.11",24); +insert ignore into t2 values ("-111111111.11","-111111111.11","-111111111.11",22),("+1111111111.11","+1111111111.11","+1111111111.11",23),("1111111111.11","1111111111.11","1111111111.11",24); Warnings: Warning 1264 Out of range value for column 'c2' at row 1 -insert into t2 values ("1e+1000","1e+1000","1e+1000",25),("1e-1000","1e-1000","1e-1000",26),("-1e+1000","-1e+1000","-1e+1000",27); +insert ignore into t2 values ("1e+1000","1e+1000","1e+1000",25),("1e-1000","1e-1000","1e-1000",26),("-1e+1000","-1e+1000","-1e+1000",27); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 1 @@ -1078,7 +1080,7 @@ Warning 1264 Out of range value for column 'c2' at row 3 Warning 1264 Out of range value for column 'c2' at row 3 Warning 1264 Out of range value for column 'c3' at row 3 Warning 1264 Out of range value for column 'c3' at row 3 -insert into t2 values ("1e+4294967296","1e+4294967296","1e+4294967296",28),("1e-4294967296","1e-4294967296","1e-4294967296",29); +insert ignore into t2 values ("1e+4294967296","1e+4294967296","1e+4294967296",28),("1e-4294967296","1e-4294967296","1e-4294967296",29); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 1 @@ -1086,7 +1088,7 @@ Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -insert into t2 values ("1e+18446744073709551615","1e+18446744073709551615","1e+18446744073709551615",30),("1e+18446744073709551616","1e+18446744073709551616","1e+18446744073709551616",31),("1e-9223372036854775807","1e-9223372036854775807","1e-9223372036854775807",32),("1e-9223372036854775809","1e-9223372036854775809","1e-9223372036854775809",33); +insert ignore into t2 values ("1e+18446744073709551615","1e+18446744073709551615","1e+18446744073709551615",30),("1e+18446744073709551616","1e+18446744073709551616","1e+18446744073709551616",31),("1e-9223372036854775807","1e-9223372036854775807","1e-9223372036854775807",32),("1e-9223372036854775809","1e-9223372036854775809","1e-9223372036854775809",33); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 1 @@ -1882,18 +1884,20 @@ c1 MIN(c2) CREATE TABLE t5(c1 FLOAT(23,0) UNSIGNED NOT NULL, c2 FLOAT(23,0) SIGNED NULL, c3 FLOAT, c4 INT, INDEX idx(c1,c2)); INSERT INTO t5 VALUES('1e+22','-1e+22','1e+22',1),('1e-22','-1e-22','1e-22',2); SELECT * FROM t5; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t5 CHANGE c1 c1 FLOAT(24,0) SIGNED NOT NULL, CHANGE c2 c2 FLOAT(24,0) UNSIGNED NULL; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 INSERT INTO t5 VALUES('-1e+23','1e+23','1e+23',3),('-1e-23','1e-23','1e-23',4); SELECT * FROM t5; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t5 CHANGE c1 c1 FLOAT(53,0) UNSIGNED, CHANGE c2 c2 FLOAT(53,0) SIGNED; Warnings: Warning 1264 Out of range value for column 'c1' at row 3 -INSERT INTO t5 VALUES('1e+52','-1e+52','1e+52',5),('1e-52','-1e-52','1e-52',6); +INSERT IGNORE INTO t5 VALUES('1e+52','-1e+52','1e+52',5),('1e-52','-1e-52','1e-52',6); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t5 VALUES('1e+53','-1e+53','1e+53',7),('1e-53','-1e-53','1e-53',8); +INSERT IGNORE INTO t5 VALUES('1e+53','-1e+53','1e+53',7),('1e-53','-1e-53','1e-53',8); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 SELECT * FROM t5; @@ -1922,7 +1926,7 @@ INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100.05000',1); INSERT INTO t2 VALUES('-1000000000','1000000000','1000000000',2); INSERT INTO t1(c1) VALUES('12345.000009'); INSERT INTO t1 VALUES('99999.99999','-99999.99999','99999.99999',3); -INSERT INTO t2 VALUES('-9999999999','-9999999999','9999999999',4); +INSERT IGNORE INTO t2 VALUES('-9999999999','-9999999999','9999999999',4); Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t1; @@ -1930,41 +1934,42 @@ c1 c2 c3 c4 100.05000 -100.05000 100.05 1 12345.00001 NULL NULL NULL 99999.99999 -99999.99999 99999.99999 3 +SET STATEMENT sql_mode = '' FOR INSERT INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); ERROR 23000: Duplicate entry '99999.99999--99999.99999' for key 'idx' DELETE FROM t1 WHERE c1='99999.99999' AND c2='-99999.99999'; -INSERT INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); +INSERT IGNORE INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 -INSERT INTO t2 VALUES('10000000000','-10000000000','10000000000',6); +INSERT IGNORE INTO t2 VALUES('10000000000','-10000000000','10000000000',6); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 insert into t1 values ("0.0","0.0","0.0",7),("01.0","01.0","01.0",10); -insert into t1 values ("-.1","-.1","-.1",13); +insert ignore into t1 values ("-.1","-.1","-.1",13); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -insert into t1 values ("+111111111.11","+111111111.11","+111111111.11",19); +insert ignore into t1 values ("+111111111.11","+111111111.11","+111111111.11",19); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 -insert into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12); +insert ignore into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12); Warnings: Warning 1264 Out of range value for column 'c2' at row 6 -insert into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15); +insert ignore into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15); Warnings: Warning 1264 Out of range value for column 'c2' at row 1 -insert into t2 values ("00000000000001","00000000000001","00000000000001",16),("+0000000000001","+0000000000001","+0000000000001",17),("-0000000000001","-0000000000001","-0000000000001",18); +insert ignore into t2 values ("00000000000001","00000000000001","00000000000001",16),("+0000000000001","+0000000000001","+0000000000001",17),("-0000000000001","-0000000000001","-0000000000001",18); Warnings: Warning 1264 Out of range value for column 'c2' at row 3 -insert into t2 values ("+111111111.11","+111111111.11","+111111111.11",19),("111111111.11","111111111.11","111111111.11",20),("-11111111.11","-11111111.11","-11111111.11",21); +insert ignore into t2 values ("+111111111.11","+111111111.11","+111111111.11",19),("111111111.11","111111111.11","111111111.11",20),("-11111111.11","-11111111.11","-11111111.11",21); Warnings: Warning 1264 Out of range value for column 'c2' at row 3 -insert into t2 values ("-111111111.11","-111111111.11","-111111111.11",22),("+1111111111.11","+1111111111.11","+1111111111.11",23),("1111111111.11","1111111111.11","1111111111.11",24); +insert ignore into t2 values ("-111111111.11","-111111111.11","-111111111.11",22),("+1111111111.11","+1111111111.11","+1111111111.11",23),("1111111111.11","1111111111.11","1111111111.11",24); Warnings: Warning 1264 Out of range value for column 'c2' at row 1 -insert into t2 values ("1e+1000","1e+1000","1e+1000",25),("1e-1000","1e-1000","1e-1000",26),("-1e+1000","-1e+1000","-1e+1000",27); +insert ignore into t2 values ("1e+1000","1e+1000","1e+1000",25),("1e-1000","1e-1000","1e-1000",26),("-1e+1000","-1e+1000","-1e+1000",27); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 1 @@ -1976,14 +1981,14 @@ Warning 1264 Out of range value for column 'c1' at row 3 Warning 1264 Out of range value for column 'c2' at row 3 Warning 1264 Out of range value for column 'c2' at row 3 Warning 1264 Out of range value for column 'c3' at row 3 -insert into t2 values ("1e+4294967296","1e+4294967296","1e+4294967296",28),("1e-4294967296","1e-4294967296","1e-4294967296",29); +insert ignore into t2 values ("1e+4294967296","1e+4294967296","1e+4294967296",28),("1e-4294967296","1e-4294967296","1e-4294967296",29); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -insert into t2 values ("1e+18446744073709551615","1e+18446744073709551615","1e+18446744073709551615",30),("1e+18446744073709551616","1e+18446744073709551616","1e+18446744073709551616",31),("1e-9223372036854775807","1e-9223372036854775807","1e-9223372036854775807",32),("1e-9223372036854775809","1e-9223372036854775809","1e-9223372036854775809",33); +insert ignore into t2 values ("1e+18446744073709551615","1e+18446744073709551615","1e+18446744073709551615",30),("1e+18446744073709551616","1e+18446744073709551616","1e+18446744073709551616",31),("1e-9223372036854775807","1e-9223372036854775807","1e-9223372036854775807",32),("1e-9223372036854775809","1e-9223372036854775809","1e-9223372036854775809",33); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 1 @@ -2824,11 +2829,13 @@ SELECT * FROM t5; c1 c2 c3 c4 0 0 1e-22 2 10000000000000000000000 -10000000000000000000000 1e22 1 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t5 CHANGE c1 c1 DOUBLE(24,0) SIGNED NOT NULL, CHANGE c2 c2 DOUBLE(24,0) UNSIGNED NULL; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 INSERT INTO t5 VALUES('-1e+23','1e+23','1e+23',3),('-1e-23','1e-23','1e-23',4); SELECT * FROM t5; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t5 CHANGE c1 c1 DOUBLE(53,0) UNSIGNED, CHANGE c2 c2 DOUBLE(53,0) SIGNED; Warnings: Warning 1264 Out of range value for column 'c1' at row 3 diff --git a/mysql-test/suite/engines/iuds/r/insert_number.result b/mysql-test/suite/engines/iuds/r/insert_number.result index 904a9697dc3..6119e624e8c 100644 --- a/mysql-test/suite/engines/iuds/r/insert_number.result +++ b/mysql-test/suite/engines/iuds/r/insert_number.result @@ -10,25 +10,25 @@ INSERT INTO t3 VALUES(101,-102,103,104,105,106,101),(101,-102,103,104,105,106,10 INSERT INTO t1 VALUES(105,NULL,102,103,104,105,106); INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106); INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106); -INSERT INTO t1 VALUES('','',17,18,19,20,21); +INSERT IGNORE INTO t1 VALUES('','',17,18,19,20,21); Warnings: Warning 1366 Incorrect integer value: '' for column 'c1' at row 1 Warning 1366 Incorrect integer value: '' for column 'c2' at row 1 -INSERT INTO t2 VALUES('','',17,18,19,20,21); +INSERT IGNORE INTO t2 VALUES('','',17,18,19,20,21); Warnings: Warning 1366 Incorrect integer value: '' for column 'c1' at row 1 Warning 1366 Incorrect integer value: '' for column 'c2' at row 1 -INSERT INTO t3 VALUES('','',17,18,19,20,21); +INSERT IGNORE INTO t3 VALUES('','',17,18,19,20,21); Warnings: Warning 1366 Incorrect integer value: '' for column 'c1' at row 1 Warning 1366 Incorrect integer value: '' for column 'c2' at row 1 -INSERT INTO t1 VALUES(-1,124,22,23,24,25,26); +INSERT IGNORE INTO t1 VALUES(-1,124,22,23,24,25,26); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES(-1,124,22,23,24,25,26); +INSERT IGNORE INTO t2 VALUES(-1,124,22,23,24,25,26); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t3 VALUES(-1,124,22,23,24,25,26); +INSERT IGNORE INTO t3 VALUES(-1,124,22,23,24,25,26); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t1 VALUES(0,124,27,28,29,30,31); @@ -37,15 +37,15 @@ INSERT INTO t3 VALUES(0,124,27,28,29,30,31); INSERT INTO t1 VALUES(0,0,32,32,34,35,36); INSERT INTO t2 VALUES(0,0,32,32,34,35,36); INSERT INTO t3 VALUES(0,0,32,32,34,35,36); -INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41); +INSERT IGNORE INTO t1 VALUES('101.34 a','a',37,38,39,40,41); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1 -INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41); +INSERT IGNORE INTO t2 VALUES('101.34 a','a',37,38,39,40,41); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1 -INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41); +INSERT IGNORE INTO t3 VALUES('101.34 a','a',37,38,39,40,41); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1 @@ -1373,29 +1373,29 @@ INSERT INTO t5 VALUES(101,-102,-103,-104,105,106,107,108),(108,-109,-110,111,112 INSERT INTO t4 VALUES(0,32,33,34,35,36,37,38); INSERT INTO t5 VALUES(0,-32,-32,33,34,35,36,37); INSERT INTO t4(c1,c3,c4) VALUES(NULL,104,LAST_INSERT_ID()); -INSERT INTO t5(c1,c3,c4) VALUES(NULL,-104,LAST_INSERT_ID()); +INSERT IGNORE INTO t5(c1,c3,c4) VALUES(NULL,-104,LAST_INSERT_ID()); Warnings: Warning 1364 Field 'c2' doesn't have a default value -INSERT INTO t4 VALUES('','',17,18,19,20,21,22); +INSERT IGNORE INTO t4 VALUES('','',17,18,19,20,21,22); Warnings: Warning 1366 Incorrect integer value: '' for column 'c1' at row 1 Warning 1366 Incorrect integer value: '' for column 'c2' at row 1 -INSERT INTO t5 VALUES('','',-17,18,19,20,21,22); +INSERT IGNORE INTO t5 VALUES('','',-17,18,19,20,21,22); Warnings: Warning 1366 Incorrect integer value: '' for column 'c1' at row 1 Warning 1366 Incorrect integer value: '' for column 'c2' at row 1 -INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41); +INSERT IGNORE INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1 Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1 -INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41); +INSERT IGNORE INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1 Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1 INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13); -INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12); +INSERT IGNORE INTO t5 VALUES(-1,-1,-1,8,9,10,11,12); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t4(c2,c3,c4,c5,c6,c7,c8) VALUES(101,102,104,105,106,107,108),(108,109,111,112,113,114,115),(115,116,118,119,120,121,122),(122,123,125,126,127,128,128); @@ -2310,12 +2310,14 @@ c2 MIN(c3) 32 33 7 8 NULL 104 +SET STATEMENT sql_mode = '' FOR INSERT INTO t2(c1) VALUES(NULL); ERROR 23000: Column 'c1' cannot be null INSERT INTO t3 VALUES(NULL,1,2,3,4,5,6); ERROR 23000: Column 'c1' cannot be null INSERT INTO t4(c3) VALUES(NULL); ERROR 23000: Column 'c3' cannot be null +SET STATEMENT sql_mode = '' FOR INSERT INTO t5(c3) VALUES(NULL); ERROR 23000: Column 'c3' cannot be null INSERT INTO t4(c1,c3) VALUES(-101,105) /*throws error as the row with c1=-101 exists */; @@ -2324,6 +2326,7 @@ INSERT INTO t2(c1,c6) VALUES(101,106) /*throws error as the row with c1=101,c6=1 ERROR 23000: Duplicate entry '101-106' for key 'PRIMARY' INSERT INTO t5(c1,c2,c3) VALUES(101,-102,4) /*throws error as the row with c1=101,c2=-102 exists */; ERROR 23000: Duplicate entry '101--102' for key 'PRIMARY' +SET STATEMENT sql_mode = '' FOR INSERT INTO t5(c3) VALUES(-103) /*throws error as the row with c3=-103 exists */; ERROR 23000: Duplicate entry '-103' for key 'c3' INSERT INTO t4(c2,c3) VALUES(102,103) /*throws error as the row with c2=102,c3=103 exists */; @@ -2368,7 +2371,7 @@ INSERT INTO t6(c1) VALUES(0),(1),(2),(3),(3),(4),(4),(5); INSERT INTO t7(c1) SELECT c1 FROM t6; ERROR 23000: Duplicate entry '3' for key 'PRIMARY' TRUNCATE TABLE t6; -INSERT INTO t6 VALUES(5,-1,1,1,1,1,1),(6,-2,2,2,2,2,2),(0,-4,4,4,4,4,4),(NULL,-5,5,5,5,5,5); +INSERT IGNORE INTO t6 VALUES(5,-1,1,1,1,1,1),(6,-2,2,2,2,2,2),(0,-4,4,4,4,4,4),(NULL,-5,5,5,5,5,5); Warnings: Warning 1048 Column 'c1' cannot be null INSERT INTO t8 SELECT * FROM t6; @@ -2388,7 +2391,7 @@ SELECT * FROM t8; c1 c2 c3 c4 c5 c6 c7 1 -2 NULL NULL NULL NULL NULL DROP TABLE t6,t7,t8; -INSERT INTO t2 SET c3=5,c4=6; +INSERT IGNORE INTO t2 SET c3=5,c4=6; Warnings: Warning 1364 Field 'c1' doesn't have a default value Warning 1364 Field 'c6' doesn't have a default value diff --git a/mysql-test/suite/engines/iuds/r/insert_time.result b/mysql-test/suite/engines/iuds/r/insert_time.result index 6680886aad1..fdda49a36c1 100644 --- a/mysql-test/suite/engines/iuds/r/insert_time.result +++ b/mysql-test/suite/engines/iuds/r/insert_time.result @@ -24,19 +24,21 @@ INSERT INTO t1 VALUES('8:3:2','8:3:2','2009-01-18'),('1112','1112','2009-01-19') INSERT INTO t2 VALUES('8:3:2','8:3:2','2009-01-18'),('1112','1112','2009-01-19'),(11,11,'2009-01-20'),('00:12:30','00:12:30','2009-01-23'),('9:00:45','9:00:45','2009-01-24'),('9:36:00','9:36:00','2009-01-25'); INSERT INTO t3 VALUES('8:3:2','8:3:2','2009-01-18'),('1112','1112','2009-01-19'),(11,11,'2009-01-20'),('00:12:30','00:12:30','2009-01-23'),('9:00:45','9:00:45','2009-01-24'),('9:36:00','9:36:00','2009-01-25'); INSERT INTO t4 VALUES('8:3:2','8:3:2','2009-01-18'),('1112','1112','2009-01-19'),(11,11,'2009-01-20'),('00:12:30','00:12:30','2009-01-23'),('9:00:45','9:00:45','2009-01-24'),('9:36:00','9:36:00','2009-01-25'); +SET STATEMENT sql_mode = '' FOR INSERT INTO t1 VALUES('-850:00:00','-850:00:00','2009-01-21'); ERROR 23000: Duplicate entry '-838:59:59' for key 'PRIMARY' +SET STATEMENT sql_mode = '' FOR INSERT INTO t1 VALUES('850:00:00','850:00:00','2009-01-21'); ERROR 23000: Duplicate entry '838:59:59' for key 'PRIMARY' DELETE FROM t1 WHERE c1='-838:59:59' AND c2='-838:59:59'; DELETE FROM t1 WHERE c1='838:59:59' AND c2='838:59:59'; -INSERT INTO t1 VALUES('-850:00:00','-850:00:00','2009-01-21'),('850:00:00','850:00:00','2009-01-21'); +INSERT IGNORE INTO t1 VALUES('-850:00:00','-850:00:00','2009-01-21'),('850:00:00','850:00:00','2009-01-21'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 -INSERT INTO t4 VALUES('10.22.22','10.22.22','2009-01-26'),(1234567,1234567,'2009-01-27'),(123456789,123456789,'2009-01-28'),(123456789.10,123456789.10,'2009-01-29'),('10 22:22','10 22:22','2009-01-30'),('12.45a','12.45a','2009-01-31'); +INSERT IGNORE INTO t4 VALUES('10.22.22','10.22.22','2009-01-26'),(1234567,1234567,'2009-01-27'),(123456789,123456789,'2009-01-28'),(123456789.10,123456789.10,'2009-01-29'),('10 22:22','10 22:22','2009-01-30'),('12.45a','12.45a','2009-01-31'); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 @@ -5104,7 +5106,7 @@ c1 c2 c3 INSERT INTO t1 SET c1='07:23:55',c2='13 06:23:55'; INSERT INTO t2 SET c1='07:23:55',c2='13 06:23:55'; INSERT INTO t3 SET c1='07:23:55'; -INSERT INTO t4 SET c2='07:23:55'; +INSERT IGNORE INTO t4 SET c2='07:23:55'; Warnings: Warning 1364 Field 'c1' doesn't have a default value SELECT * FROM t1 WHERE c1='07:23:55' AND c2='13 06:23:55' /* Returns 1 row with values for other column as NULL */; @@ -5155,7 +5157,7 @@ c1 c2 c3 08:29:45 NULL 2009-02-01 00:00:00 07:23:55 NULL TRUNCATE TABLE t5; -INSERT INTO t5 SELECT * FROM t4 WHERE c1 >='12colon34colon56'; +INSERT IGNORE INTO t5 SELECT * FROM t4 WHERE c1 >='12colon34colon56'; Warnings: Warning 1292 Truncated incorrect time value: '12colon34colon56' SELECT * FROM t5; diff --git a/mysql-test/suite/engines/iuds/r/insert_year.result b/mysql-test/suite/engines/iuds/r/insert_year.result index aa472c45d82..ea6e10d130b 100644 --- a/mysql-test/suite/engines/iuds/r/insert_year.result +++ b/mysql-test/suite/engines/iuds/r/insert_year.result @@ -14,41 +14,41 @@ INSERT INTO t3 VALUES('00','10','98-12-17','98.12.17 11:30:45'),('20','20','98-1 INSERT INTO t4 VALUES('00','00','98-12-17','98.12.17 11:30:45'),('20','20','98-12-16','98.12.16 11:30:45'),('40','40','98-12-15','98.12.15 11:30:45'),('60','60','98-12-14','98.12.14 11:30:45'),('69','69','98-12-13','98.12.13 11:30:45'),('70','70','98-12-12','98.12.12 11:30:45'),('90','90','98-12-11','98.12.11 11:30:45'),('99','99','98-12-10','98.12.10 11:30:45'); INSERT INTO t4 VALUES(1,1,'98-12-9','98.12.9 11:30:45'),(20,20,'98-12-8','98.12.8 11:30:45'),(40,40,'98-12-7','98.12.7 11:30:45'),(60,60,'98-12-6','98.12.6 11:30:45'),(69,69,'98-12-5','98.12.5 11:30:45'),(70,70,'98-12-4','98.12.4 11:30:45'),(90,90,'98-12-3','98.12.3 11:30:45'),(99,99,'98-12-2','98.12.2 11:30:45'); SET TIMESTAMP=1233216687; -INSERT INTO t1 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t1 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 Note 1265 Data truncated for column 'c3' at row 1 -INSERT INTO t2 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t2 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 Note 1265 Data truncated for column 'c3' at row 1 -INSERT INTO t3 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t3 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 Note 1265 Data truncated for column 'c3' at row 1 -INSERT INTO t4 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t4 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1(c1) VALUES('5'); -INSERT INTO t2(c1) VALUES('5'); +INSERT IGNORE INTO t2(c1) VALUES('5'); Warnings: Warning 1364 Field 'c2' doesn't have a default value INSERT INTO t3(c1) VALUES('5'); INSERT INTO t4(c1,c2) VALUES('0','000'); -INSERT INTO t2 VALUES(1900,2156,'08-01-06','08/01/07'); +INSERT IGNORE INTO t2 VALUES(1900,2156,'08-01-06','08/01/07'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 -INSERT INTO t3 VALUES('1900','2156','08-01-08','08/1/9'); +INSERT IGNORE INTO t3 VALUES('1900','2156','08-01-08','08/1/9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 -INSERT INTO t4 VALUES('1900','2156','08-01-08','08/1/9'),(1900,2156,'08-01-08','08/1/9'),(0,00,'08-01-08','08/1/9'),(000,000,'08-01-08','08/1/9'),('-20','100','08-01-08','08/1/9'),(-20,100,'08-01-08','08/1/9'); +INSERT IGNORE INTO t4 VALUES('1900','2156','08-01-08','08/1/9'),(1900,2156,'08-01-08','08/1/9'),(0,00,'08-01-08','08/1/9'),(000,000,'08-01-08','08/1/9'),('-20','100','08-01-08','08/1/9'),(-20,100,'08-01-08','08/1/9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -58,11 +58,11 @@ Warning 1264 Out of range value for column 'c1' at row 5 Warning 1264 Out of range value for column 'c2' at row 5 Warning 1264 Out of range value for column 'c1' at row 6 Warning 1264 Out of range value for column 'c2' at row 6 -INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; +INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; Warnings: Warning 1366 Incorrect integer value: '' for column 'c1' at row 1 Warning 1366 Incorrect integer value: '' for column 'c2' at row 1 -INSERT INTO t4 VALUES('abcd','abcd','08-01-10','08/01/11'),(1234,1234,'08-01-12','08/01/13') /* Inserts zero dates for absurd dates */; +INSERT IGNORE INTO t4 VALUES('abcd','abcd','08-01-10','08/01/11'),(1234,1234,'08-01-12','08/01/13') /* Inserts zero dates for absurd dates */; Warnings: Warning 1366 Incorrect integer value: 'abcd' for column 'c1' at row 1 Warning 1366 Incorrect integer value: 'abcd' for column 'c2' at row 1 @@ -3219,11 +3219,11 @@ c1 c2 c3 c4 TRUNCATE TABLE t5; DROP TABLE t5; INSERT INTO t1 SET c1='00'; -INSERT INTO t2 SET c1=69; +INSERT IGNORE INTO t2 SET c1=69; Warnings: Warning 1364 Field 'c2' doesn't have a default value INSERT INTO t3 SET c1=70; -INSERT INTO t4 SET c2=99; +INSERT IGNORE INTO t4 SET c2=99; Warnings: Warning 1364 Field 'c1' doesn't have a default value SELECT * FROM t1 WHERE c1=0; @@ -3273,41 +3273,41 @@ INSERT INTO t3 VALUES('00','10','98-12-17','98.12.17 11:30:45'),('20','20','98-1 INSERT INTO t4 VALUES('00','00','98-12-17','98.12.17 11:30:45'),('20','20','98-12-16','98.12.16 11:30:45'),('40','40','98-12-15','98.12.15 11:30:45'),('60','60','98-12-14','98.12.14 11:30:45'),('69','69','98-12-13','98.12.13 11:30:45'),('70','70','98-12-12','98.12.12 11:30:45'),('90','90','98-12-11','98.12.11 11:30:45'),('99','99','98-12-10','98.12.10 11:30:45'); INSERT INTO t4 VALUES(1,1,'98-12-9','98.12.9 11:30:45'),(20,20,'98-12-8','98.12.8 11:30:45'),(40,40,'98-12-7','98.12.7 11:30:45'),(60,60,'98-12-6','98.12.6 11:30:45'),(69,69,'98-12-5','98.12.5 11:30:45'),(70,70,'98-12-4','98.12.4 11:30:45'),(90,90,'98-12-3','98.12.3 11:30:45'),(99,99,'98-12-2','98.12.2 11:30:45'); SET TIMESTAMP=1233216687; -INSERT INTO t1 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t1 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 Note 1265 Data truncated for column 'c3' at row 1 -INSERT INTO t2 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t2 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 Note 1265 Data truncated for column 'c3' at row 1 -INSERT INTO t3 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t3 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 Note 1265 Data truncated for column 'c3' at row 1 -INSERT INTO t4 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t4 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1(c1) VALUES('5'); -INSERT INTO t2(c1) VALUES('5'); +INSERT IGNORE INTO t2(c1) VALUES('5'); Warnings: Warning 1364 Field 'c2' doesn't have a default value INSERT INTO t3(c1) VALUES('5'); INSERT INTO t4(c1,c2) VALUES('0','000'); -INSERT INTO t2 VALUES(1900,2156,'08-01-06','08/01/07'); +INSERT IGNORE INTO t2 VALUES(1900,2156,'08-01-06','08/01/07'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 -INSERT INTO t3 VALUES('1900','2156','08-01-08','08/1/9'); +INSERT IGNORE INTO t3 VALUES('1900','2156','08-01-08','08/1/9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 -INSERT INTO t4 VALUES('1900','2156','08-01-08','08/1/9'),(1900,2156,'08-01-08','08/1/9'),(0,00,'08-01-08','08/1/9'),(000,000,'08-01-08','08/1/9'),('-20','100','08-01-08','08/1/9'),(-20,100,'08-01-08','08/1/9'); +INSERT IGNORE INTO t4 VALUES('1900','2156','08-01-08','08/1/9'),(1900,2156,'08-01-08','08/1/9'),(0,00,'08-01-08','08/1/9'),(000,000,'08-01-08','08/1/9'),('-20','100','08-01-08','08/1/9'),(-20,100,'08-01-08','08/1/9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -3317,11 +3317,11 @@ Warning 1264 Out of range value for column 'c1' at row 5 Warning 1264 Out of range value for column 'c2' at row 5 Warning 1264 Out of range value for column 'c1' at row 6 Warning 1264 Out of range value for column 'c2' at row 6 -INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; +INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; Warnings: Warning 1366 Incorrect integer value: '' for column 'c1' at row 1 Warning 1366 Incorrect integer value: '' for column 'c2' at row 1 -INSERT INTO t4 VALUES('abcd','abcd','08-01-10','08/01/11'),(1234,1234,'08-01-12','08/01/13') /* Inserts zero dates for absurd dates */; +INSERT IGNORE INTO t4 VALUES('abcd','abcd','08-01-10','08/01/11'),(1234,1234,'08-01-12','08/01/13') /* Inserts zero dates for absurd dates */; Warnings: Warning 1366 Incorrect integer value: 'abcd' for column 'c1' at row 1 Warning 1366 Incorrect integer value: 'abcd' for column 'c2' at row 1 @@ -6188,11 +6188,11 @@ c1 c2 c3 c4 TRUNCATE TABLE t5; DROP TABLE t5; INSERT INTO t1 SET c1='00'; -INSERT INTO t2 SET c1=69; +INSERT IGNORE INTO t2 SET c1=69; Warnings: Warning 1364 Field 'c2' doesn't have a default value INSERT INTO t3 SET c1=70; -INSERT INTO t4 SET c2=99; +INSERT IGNORE INTO t4 SET c2=99; Warnings: Warning 1364 Field 'c1' doesn't have a default value SELECT * FROM t1 WHERE c1=0; diff --git a/mysql-test/suite/engines/iuds/r/strings_update_delete.result b/mysql-test/suite/engines/iuds/r/strings_update_delete.result index 159d2608ea1..56dd0cf4d12 100644 --- a/mysql-test/suite/engines/iuds/r/strings_update_delete.result +++ b/mysql-test/suite/engines/iuds/r/strings_update_delete.result @@ -70348,7 +70348,7 @@ DROP TABLE t3,t4,t5; CREATE TABLE t6 (a char(2) not null primary key, b varchar(20) not null, key (b)); CREATE TABLE t7 (a char(2) not null primary key, b varchar(20) not null, key (b)); INSERT INTO t6 values ('AB','MySQLAB'),('JA','Sun Microsystems'),('MS','Microsoft'),('IB','IBM- Inc.'),('GO','Google Inc.'); -INSERT INTO t7 values ('AB','Sweden'),('JA','USA'),('MS','United States of Amercica'),('IB','North America'),('GO','South America'); +INSERT IGNORE INTO t7 values ('AB','Sweden'),('JA','USA'),('MS','United States of Amercica'),('IB','North America'),('GO','South America'); Warnings: Warning 1265 Data truncated for column 'b' at row 3 update t6,t7 set t6.a=LCASE(t6.a); @@ -70423,7 +70423,7 @@ INSERT INTO t16 VALUES (('d,a,d,d')); SELECT c1 FROM t16; c1 a,d -INSERT INTO t16 (c1) VALUES ('a,b,d'),('d,A ,b'); +INSERT IGNORE INTO t16 (c1) VALUES ('a,b,d'),('d,A ,b'); Warnings: Warning 1265 Data truncated for column 'c1' at row 2 SELECT c1 FROM t16; @@ -70431,7 +70431,7 @@ c1 a,b,d a,d b,d -INSERT INTO t16 (c1) VALUES ('f,a,b'); +INSERT IGNORE INTO t16 (c1) VALUES ('f,a,b'); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 SHOW WARNINGS; @@ -70443,6 +70443,7 @@ a,b a,b,d a,d b,d +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t17 (c1 SET('a','b','a','b')); Warnings: Note 1291 Column 'c1' has duplicated value 'a' in SET @@ -70453,7 +70454,7 @@ Note 1291 Column 'c1' has duplicated value 'a' in SET Note 1291 Column 'c1' has duplicated value 'b' in SET CREATE TABLE t18 (c1 CHAR(4),c2 enum('SMALL','MEDIUM','LARGE','VERY LARGE')); INSERT INTO t18 VALUES('SIZE', 'SMALL'); -INSERT INTO t18 VALUES('SIZE', 'SMALL1'); +INSERT IGNORE INTO t18 VALUES('SIZE', 'SMALL1'); Warnings: Warning 1265 Data truncated for column 'c2' at row 1 SELECT * FROM t18 WHERE c2=0; diff --git a/mysql-test/suite/engines/iuds/r/type_bit_iuds.result b/mysql-test/suite/engines/iuds/r/type_bit_iuds.result index 5051293e238..2c84abfd49d 100644 --- a/mysql-test/suite/engines/iuds/r/type_bit_iuds.result +++ b/mysql-test/suite/engines/iuds/r/type_bit_iuds.result @@ -120,7 +120,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -353,7 +353,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -402,7 +402,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -447,7 +447,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -536,7 +536,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -564,11 +564,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -639,7 +639,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -746,7 +746,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -798,13 +798,13 @@ INSERT INTO t1 VALUES (b'0'); set @v3=repeat('01',@v2); INSERT INTO t1 VALUES (b'01'); set @v3=repeat('10',@v2); -INSERT INTO t1 VALUES (b'10'); +INSERT IGNORE INTO t1 VALUES (b'10'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -944,7 +944,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -1184,7 +1184,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -1233,7 +1233,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -1278,7 +1278,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -1367,7 +1367,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -1395,11 +1395,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -1470,7 +1470,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -1577,7 +1577,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -1633,7 +1633,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -1651,7 +1651,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -1813,7 +1813,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -2041,7 +2041,7 @@ hex(c1) hex(c2) 3 3 0 3 CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -2090,7 +2090,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -2135,7 +2135,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -2218,7 +2218,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -2246,13 +2246,13 @@ hex(c1) hex(c2) 1 1 2 2 3 3 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 3 2 2 3 3 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 3 @@ -2324,7 +2324,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -2425,7 +2425,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -2483,7 +2483,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -2501,7 +2501,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -2519,7 +2519,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -2537,7 +2537,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -2743,7 +2743,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -3024,7 +3024,7 @@ hex(c1) hex(c2) F F 9 F CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -3073,7 +3073,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -3150,7 +3150,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT hex(c1),hex(c2) FROM t5; @@ -3178,7 +3178,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 B @@ -3191,7 +3191,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -3262,7 +3262,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -3397,7 +3397,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -3415,7 +3415,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -3433,7 +3433,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -3451,7 +3451,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -3469,7 +3469,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -3487,7 +3487,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -3505,7 +3505,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -3523,7 +3523,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -3775,7 +3775,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -4281,11 +4281,11 @@ _ a z ~ -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c2' at row 2 @@ -4296,7 +4296,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -4396,7 +4396,7 @@ hex(c1) hex(c2) 7F FF 9 FF SET SQL_MODE=DEFAULT; -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 0 8E @@ -4508,7 +4508,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -4596,7 +4596,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4614,7 +4614,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4632,7 +4632,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4650,7 +4650,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4668,7 +4668,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4686,7 +4686,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4704,7 +4704,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4722,7 +4722,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4740,7 +4740,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4758,7 +4758,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4776,7 +4776,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4794,7 +4794,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4812,7 +4812,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4830,7 +4830,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4848,7 +4848,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -4866,7 +4866,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -5746,7 +5746,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -6000,7 +6000,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6018,7 +6018,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6036,7 +6036,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6054,7 +6054,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6072,7 +6072,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6090,7 +6090,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6108,7 +6108,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6126,7 +6126,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6144,7 +6144,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6162,7 +6162,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6180,7 +6180,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6198,7 +6198,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6216,7 +6216,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6234,7 +6234,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6252,7 +6252,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6270,7 +6270,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6288,7 +6288,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6306,7 +6306,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6324,7 +6324,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6342,7 +6342,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6360,7 +6360,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6378,7 +6378,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6396,7 +6396,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6414,7 +6414,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6432,7 +6432,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6450,7 +6450,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6468,7 +6468,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6486,7 +6486,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6504,7 +6504,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6522,7 +6522,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -6540,7 +6540,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -6557,7 +6557,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 INSERT INTO t1 VALUES (b'0'); @@ -7817,7 +7817,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -8071,7 +8071,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8089,7 +8089,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8107,7 +8107,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8125,7 +8125,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8143,7 +8143,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8161,7 +8161,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8179,7 +8179,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8197,7 +8197,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8215,7 +8215,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8233,7 +8233,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8251,7 +8251,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8269,7 +8269,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8287,7 +8287,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8305,7 +8305,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8323,7 +8323,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8341,7 +8341,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8359,7 +8359,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8377,7 +8377,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8395,7 +8395,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8413,7 +8413,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8431,7 +8431,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8449,7 +8449,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8467,7 +8467,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8485,7 +8485,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8503,7 +8503,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8521,7 +8521,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8539,7 +8539,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8557,7 +8557,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8575,7 +8575,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8593,7 +8593,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8611,7 +8611,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8629,7 +8629,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8647,7 +8647,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8665,7 +8665,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8683,7 +8683,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8701,7 +8701,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8719,7 +8719,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8737,7 +8737,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8755,7 +8755,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8773,7 +8773,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8791,7 +8791,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8809,7 +8809,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8827,7 +8827,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8845,7 +8845,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8863,7 +8863,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8881,7 +8881,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8899,7 +8899,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8917,7 +8917,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8935,7 +8935,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8953,7 +8953,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8971,7 +8971,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -8989,7 +8989,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -9007,7 +9007,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -9025,7 +9025,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -9043,7 +9043,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -9061,7 +9061,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -9079,7 +9079,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -9097,7 +9097,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -9115,7 +9115,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -9132,7 +9132,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 set @v1=4; @@ -9148,7 +9148,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); set @v1=3; set @v2=3/2; set @v3=repeat('1',@v1); @@ -9162,7 +9162,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); set @v1=2; set @v2=2/2; set @v3=repeat('1',@v1); @@ -9176,7 +9176,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); set @v1=1; set @v2=1/2; set @v3=repeat('1',@v1); @@ -9190,7 +9190,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); INSERT INTO t1 VALUES (b'0'); INSERT INTO t2 VALUES (b'0', b'0', b'0'); SELECT HEX(c1) FROM t1; @@ -11349,7 +11349,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -11582,7 +11582,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -11631,7 +11631,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -11676,7 +11676,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -11765,7 +11765,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -11793,11 +11793,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -11868,7 +11868,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -11975,7 +11975,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -12027,13 +12027,13 @@ INSERT INTO t1 VALUES (b'0'); set @v3=repeat('01',@v2); INSERT INTO t1 VALUES (b'01'); set @v3=repeat('10',@v2); -INSERT INTO t1 VALUES (b'10'); +INSERT IGNORE INTO t1 VALUES (b'10'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -12173,7 +12173,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -12413,7 +12413,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -12462,7 +12462,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -12507,7 +12507,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -12596,7 +12596,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -12624,11 +12624,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -12699,7 +12699,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -12806,7 +12806,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -12862,7 +12862,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -12880,7 +12880,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -13042,7 +13042,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -13270,7 +13270,7 @@ hex(c1) hex(c2) 3 3 0 3 CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -13319,7 +13319,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -13364,7 +13364,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -13447,7 +13447,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -13475,13 +13475,13 @@ hex(c1) hex(c2) 1 1 2 2 3 3 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 3 2 2 3 3 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 3 @@ -13553,7 +13553,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -13654,7 +13654,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -13712,7 +13712,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -13730,7 +13730,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -13748,7 +13748,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -13766,7 +13766,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -13972,7 +13972,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -14253,7 +14253,7 @@ hex(c1) hex(c2) F F 9 F CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -14302,7 +14302,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -14379,7 +14379,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT hex(c1),hex(c2) FROM t5; @@ -14407,7 +14407,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 B @@ -14420,7 +14420,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -14491,7 +14491,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -14626,7 +14626,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -14644,7 +14644,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -14662,7 +14662,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -14680,7 +14680,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -14698,7 +14698,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -14716,7 +14716,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -14734,7 +14734,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -14752,7 +14752,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -15004,7 +15004,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -15510,11 +15510,11 @@ _ a z ~ -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c2' at row 2 @@ -15525,7 +15525,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -15625,7 +15625,7 @@ hex(c1) hex(c2) 7F FF 9 FF SET SQL_MODE=DEFAULT; -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 0 8E @@ -15737,7 +15737,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -15825,7 +15825,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -15843,7 +15843,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -15861,7 +15861,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -15879,7 +15879,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -15897,7 +15897,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -15915,7 +15915,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -15933,7 +15933,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -15951,7 +15951,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -15969,7 +15969,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -15987,7 +15987,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -16005,7 +16005,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -16023,7 +16023,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -16041,7 +16041,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -16059,7 +16059,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -16077,7 +16077,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -16095,7 +16095,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -16975,7 +16975,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -17229,7 +17229,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17247,7 +17247,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17265,7 +17265,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17283,7 +17283,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17301,7 +17301,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17319,7 +17319,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17337,7 +17337,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17355,7 +17355,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17373,7 +17373,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17391,7 +17391,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17409,7 +17409,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17427,7 +17427,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17445,7 +17445,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17463,7 +17463,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17481,7 +17481,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17499,7 +17499,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17517,7 +17517,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17535,7 +17535,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17553,7 +17553,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17571,7 +17571,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17589,7 +17589,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17607,7 +17607,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17625,7 +17625,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17643,7 +17643,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17661,7 +17661,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17679,7 +17679,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17697,7 +17697,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17715,7 +17715,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17733,7 +17733,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17751,7 +17751,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -17769,7 +17769,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -17786,7 +17786,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 INSERT INTO t1 VALUES (b'1'); @@ -19046,7 +19046,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -19300,7 +19300,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19318,7 +19318,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19336,7 +19336,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19354,7 +19354,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19372,7 +19372,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19390,7 +19390,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19408,7 +19408,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19426,7 +19426,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19444,7 +19444,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19462,7 +19462,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19480,7 +19480,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19498,7 +19498,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19516,7 +19516,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19534,7 +19534,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19552,7 +19552,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19570,7 +19570,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19588,7 +19588,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19606,7 +19606,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19624,7 +19624,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19642,7 +19642,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19660,7 +19660,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19678,7 +19678,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19696,7 +19696,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19714,7 +19714,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19732,7 +19732,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19750,7 +19750,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19768,7 +19768,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19786,7 +19786,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19804,7 +19804,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19822,7 +19822,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19840,7 +19840,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19858,7 +19858,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19876,7 +19876,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19894,7 +19894,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19912,7 +19912,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19930,7 +19930,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19948,7 +19948,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19966,7 +19966,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -19984,7 +19984,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20002,7 +20002,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20020,7 +20020,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20038,7 +20038,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20056,7 +20056,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20074,7 +20074,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20092,7 +20092,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20110,7 +20110,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20128,7 +20128,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20146,7 +20146,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20164,7 +20164,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20182,7 +20182,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20200,7 +20200,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20218,7 +20218,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20236,7 +20236,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20254,7 +20254,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20272,7 +20272,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20290,7 +20290,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20308,7 +20308,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20326,7 +20326,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -20344,7 +20344,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -20361,7 +20361,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 set @v1=4; @@ -20377,7 +20377,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); set @v1=3; set @v2=3/2; set @v3=repeat('1',@v1); @@ -20391,7 +20391,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); set @v1=2; set @v2=2/2; set @v3=repeat('1',@v1); @@ -20405,7 +20405,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); set @v1=1; set @v2=1/2; set @v3=repeat('1',@v1); @@ -20419,7 +20419,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); INSERT INTO t1 VALUES (b'1'); INSERT INTO t2 VALUES (b'1', b'1', b'1'); SELECT HEX(c1) FROM t1; @@ -22465,10 +22465,10 @@ SELECT 0 + (10<<0); 10 CREATE TABLE t1(c1 BIT(0)); CREATE TABLE t2(c1 BIT(0), c2 BIT(0), c3 BIT(0)); -INSERT INTO t1 VALUES (b'10'); +INSERT IGNORE INTO t1 VALUES (b'10'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'10', b'10', b'10'); +INSERT IGNORE INTO t2 VALUES (b'10', b'10', b'10'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -22584,7 +22584,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -22817,7 +22817,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -22866,7 +22866,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -22911,7 +22911,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -23000,7 +23000,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -23028,11 +23028,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -23103,7 +23103,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -23210,7 +23210,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -23262,21 +23262,21 @@ INSERT INTO t1 VALUES (b'0'); set @v3=repeat('01',@v2); INSERT INTO t1 VALUES (b'01'); set @v3=repeat('10',@v2); -INSERT INTO t1 VALUES (b'10'); +INSERT IGNORE INTO t1 VALUES (b'10'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'10'); +INSERT IGNORE INTO t1 VALUES (b'10'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'10', b'10', b'10'); +INSERT IGNORE INTO t2 VALUES (b'10', b'10', b'10'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -23414,7 +23414,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -23654,7 +23654,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -23703,7 +23703,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -23748,7 +23748,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -23837,7 +23837,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -23865,11 +23865,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -23940,7 +23940,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -24047,7 +24047,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -24103,7 +24103,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -24121,7 +24121,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -24283,7 +24283,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -24511,7 +24511,7 @@ hex(c1) hex(c2) 3 3 0 3 CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -24560,7 +24560,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -24605,7 +24605,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -24688,7 +24688,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -24716,13 +24716,13 @@ hex(c1) hex(c2) 1 1 2 2 3 3 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 3 2 2 3 3 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 3 @@ -24794,7 +24794,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -24895,7 +24895,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -24953,7 +24953,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -24971,7 +24971,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -24989,7 +24989,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -25007,7 +25007,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -25213,7 +25213,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -25494,7 +25494,7 @@ hex(c1) hex(c2) F F 9 F CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -25543,7 +25543,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -25620,7 +25620,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT hex(c1),hex(c2) FROM t5; @@ -25648,7 +25648,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 B @@ -25661,7 +25661,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -25732,7 +25732,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -25867,7 +25867,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -25885,7 +25885,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -25903,7 +25903,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -25921,7 +25921,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -25939,7 +25939,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -25957,7 +25957,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -25975,7 +25975,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -25993,7 +25993,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -26245,7 +26245,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -26751,11 +26751,11 @@ _ a z ~ -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c2' at row 2 @@ -26766,7 +26766,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -26866,7 +26866,7 @@ hex(c1) hex(c2) 7F FF 9 FF SET SQL_MODE=DEFAULT; -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 0 8E @@ -26978,7 +26978,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -27066,7 +27066,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27084,7 +27084,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27102,7 +27102,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27120,7 +27120,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27138,7 +27138,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27156,7 +27156,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27174,7 +27174,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27192,7 +27192,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27210,7 +27210,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27228,7 +27228,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27246,7 +27246,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27264,7 +27264,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27282,7 +27282,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27300,7 +27300,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27318,7 +27318,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -27336,7 +27336,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28216,7 +28216,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -28470,7 +28470,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28488,7 +28488,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28506,7 +28506,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28524,7 +28524,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28542,7 +28542,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28560,7 +28560,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28578,7 +28578,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28596,7 +28596,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28614,7 +28614,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28632,7 +28632,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28650,7 +28650,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28668,7 +28668,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28686,7 +28686,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28704,7 +28704,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28722,7 +28722,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28740,7 +28740,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28758,7 +28758,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28776,7 +28776,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28794,7 +28794,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28812,7 +28812,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28830,7 +28830,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28848,7 +28848,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28866,7 +28866,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28884,7 +28884,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28902,7 +28902,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28920,7 +28920,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28938,7 +28938,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28956,7 +28956,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28974,7 +28974,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -28992,7 +28992,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -29010,7 +29010,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -29027,7 +29027,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 INSERT INTO t1 VALUES (b'10'); @@ -30287,7 +30287,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -30541,7 +30541,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30559,7 +30559,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30577,7 +30577,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30595,7 +30595,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30613,7 +30613,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30631,7 +30631,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30649,7 +30649,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30667,7 +30667,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30685,7 +30685,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30703,7 +30703,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30721,7 +30721,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30739,7 +30739,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30757,7 +30757,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30775,7 +30775,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30793,7 +30793,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30811,7 +30811,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30829,7 +30829,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30847,7 +30847,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30865,7 +30865,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30883,7 +30883,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30901,7 +30901,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30919,7 +30919,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30937,7 +30937,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30955,7 +30955,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30973,7 +30973,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -30991,7 +30991,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31009,7 +31009,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31027,7 +31027,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31045,7 +31045,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31063,7 +31063,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31081,7 +31081,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31099,7 +31099,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31117,7 +31117,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31135,7 +31135,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31153,7 +31153,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31171,7 +31171,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31189,7 +31189,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31207,7 +31207,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31225,7 +31225,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31243,7 +31243,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31261,7 +31261,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31279,7 +31279,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31297,7 +31297,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31315,7 +31315,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31333,7 +31333,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31351,7 +31351,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31369,7 +31369,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31387,7 +31387,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31405,7 +31405,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31423,7 +31423,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31441,7 +31441,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31459,7 +31459,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31477,7 +31477,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31495,7 +31495,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31513,7 +31513,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31531,7 +31531,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31549,7 +31549,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31567,7 +31567,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -31585,7 +31585,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -31602,7 +31602,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 set @v1=4; @@ -31618,7 +31618,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); set @v1=3; set @v2=3/2; set @v3=repeat('1',@v1); @@ -31632,7 +31632,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); set @v1=2; set @v2=2/2; set @v3=repeat('1',@v1); @@ -31646,7 +31646,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); set @v1=1; set @v2=1/2; set @v3=repeat('1',@v1); @@ -31660,7 +31660,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); INSERT INTO t1 VALUES (b'10'); INSERT INTO t2 VALUES (b'10', b'10', b'10'); SELECT HEX(c1) FROM t1; @@ -33706,10 +33706,10 @@ SELECT 0 + (1010<<0); 1010 CREATE TABLE t1(c1 BIT(0)); CREATE TABLE t2(c1 BIT(0), c2 BIT(0), c3 BIT(0)); -INSERT INTO t1 VALUES (b'1010'); +INSERT IGNORE INTO t1 VALUES (b'1010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010', b'1010', b'1010'); +INSERT IGNORE INTO t2 VALUES (b'1010', b'1010', b'1010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -33825,7 +33825,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -34058,7 +34058,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -34107,7 +34107,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -34152,7 +34152,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -34241,7 +34241,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -34269,11 +34269,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -34344,7 +34344,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -34451,7 +34451,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -34503,21 +34503,21 @@ INSERT INTO t1 VALUES (b'0'); set @v3=repeat('01',@v2); INSERT INTO t1 VALUES (b'01'); set @v3=repeat('10',@v2); -INSERT INTO t1 VALUES (b'10'); +INSERT IGNORE INTO t1 VALUES (b'10'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'1010'); +INSERT IGNORE INTO t1 VALUES (b'1010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010', b'1010', b'1010'); +INSERT IGNORE INTO t2 VALUES (b'1010', b'1010', b'1010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -34655,7 +34655,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -34895,7 +34895,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -34944,7 +34944,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -34989,7 +34989,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -35078,7 +35078,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -35106,11 +35106,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -35181,7 +35181,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -35288,7 +35288,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -35344,7 +35344,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -35362,15 +35362,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'1010'); +INSERT IGNORE INTO t1 VALUES (b'1010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010', b'1010', b'1010'); +INSERT IGNORE INTO t2 VALUES (b'1010', b'1010', b'1010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -35530,7 +35530,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -35758,7 +35758,7 @@ hex(c1) hex(c2) 3 3 0 3 CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -35807,7 +35807,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -35852,7 +35852,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -35935,7 +35935,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -35963,13 +35963,13 @@ hex(c1) hex(c2) 1 1 2 2 3 3 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 3 2 2 3 3 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 3 @@ -36041,7 +36041,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -36142,7 +36142,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -36200,7 +36200,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -36218,7 +36218,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -36236,7 +36236,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -36254,7 +36254,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -36460,7 +36460,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -36741,7 +36741,7 @@ hex(c1) hex(c2) F F 9 F CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -36790,7 +36790,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -36867,7 +36867,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT hex(c1),hex(c2) FROM t5; @@ -36895,7 +36895,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 B @@ -36908,7 +36908,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -36979,7 +36979,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -37114,7 +37114,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -37132,7 +37132,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -37150,7 +37150,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -37168,7 +37168,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -37186,7 +37186,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -37204,7 +37204,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -37222,7 +37222,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -37240,7 +37240,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -37492,7 +37492,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -37998,11 +37998,11 @@ _ a z ~ -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c2' at row 2 @@ -38013,7 +38013,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -38113,7 +38113,7 @@ hex(c1) hex(c2) 7F FF 9 FF SET SQL_MODE=DEFAULT; -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 0 8E @@ -38225,7 +38225,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -38313,7 +38313,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38331,7 +38331,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38349,7 +38349,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38367,7 +38367,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38385,7 +38385,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38403,7 +38403,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38421,7 +38421,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38439,7 +38439,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38457,7 +38457,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38475,7 +38475,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38493,7 +38493,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38511,7 +38511,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38529,7 +38529,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38547,7 +38547,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38565,7 +38565,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -38583,7 +38583,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39463,7 +39463,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -39717,7 +39717,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39735,7 +39735,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39753,7 +39753,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39771,7 +39771,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39789,7 +39789,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39807,7 +39807,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39825,7 +39825,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39843,7 +39843,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39861,7 +39861,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39879,7 +39879,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39897,7 +39897,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39915,7 +39915,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39933,7 +39933,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39951,7 +39951,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39969,7 +39969,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -39987,7 +39987,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40005,7 +40005,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40023,7 +40023,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40041,7 +40041,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40059,7 +40059,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40077,7 +40077,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40095,7 +40095,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40113,7 +40113,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40131,7 +40131,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40149,7 +40149,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40167,7 +40167,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40185,7 +40185,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40203,7 +40203,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40221,7 +40221,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40239,7 +40239,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -40257,7 +40257,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -40274,7 +40274,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 INSERT INTO t1 VALUES (b'1010'); @@ -41534,7 +41534,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -41788,7 +41788,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -41806,7 +41806,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -41824,7 +41824,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -41842,7 +41842,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -41860,7 +41860,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -41878,7 +41878,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -41896,7 +41896,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -41914,7 +41914,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -41932,7 +41932,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -41950,7 +41950,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -41968,7 +41968,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -41986,7 +41986,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42004,7 +42004,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42022,7 +42022,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42040,7 +42040,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42058,7 +42058,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42076,7 +42076,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42094,7 +42094,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42112,7 +42112,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42130,7 +42130,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42148,7 +42148,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42166,7 +42166,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42184,7 +42184,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42202,7 +42202,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42220,7 +42220,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42238,7 +42238,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42256,7 +42256,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42274,7 +42274,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42292,7 +42292,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42310,7 +42310,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42328,7 +42328,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42346,7 +42346,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42364,7 +42364,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42382,7 +42382,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42400,7 +42400,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42418,7 +42418,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42436,7 +42436,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42454,7 +42454,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42472,7 +42472,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42490,7 +42490,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42508,7 +42508,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42526,7 +42526,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42544,7 +42544,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42562,7 +42562,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42580,7 +42580,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42598,7 +42598,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42616,7 +42616,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42634,7 +42634,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42652,7 +42652,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42670,7 +42670,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42688,7 +42688,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42706,7 +42706,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42724,7 +42724,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42742,7 +42742,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42760,7 +42760,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42778,7 +42778,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42796,7 +42796,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42814,7 +42814,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -42832,7 +42832,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -42849,7 +42849,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 set @v1=4; @@ -42865,7 +42865,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); set @v1=3; set @v2=3/2; set @v3=repeat('1',@v1); @@ -42879,7 +42879,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); set @v1=2; set @v2=2/2; set @v3=repeat('1',@v1); @@ -42893,7 +42893,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); set @v1=1; set @v2=1/2; set @v3=repeat('1',@v1); @@ -42907,7 +42907,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); INSERT INTO t1 VALUES (b'1010'); INSERT INTO t2 VALUES (b'1010', b'1010', b'1010'); SELECT HEX(c1) FROM t1; @@ -44953,10 +44953,10 @@ SELECT 0 + (1010101010101010<<0); 1010101010101010 CREATE TABLE t1(c1 BIT(0)); CREATE TABLE t2(c1 BIT(0), c2 BIT(0), c3 BIT(0)); -INSERT INTO t1 VALUES (b'1010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -45072,7 +45072,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -45305,7 +45305,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -45354,7 +45354,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -45399,7 +45399,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -45488,7 +45488,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -45516,11 +45516,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -45591,7 +45591,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -45698,7 +45698,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -45750,21 +45750,21 @@ INSERT INTO t1 VALUES (b'0'); set @v3=repeat('01',@v2); INSERT INTO t1 VALUES (b'01'); set @v3=repeat('10',@v2); -INSERT INTO t1 VALUES (b'10'); +INSERT IGNORE INTO t1 VALUES (b'10'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'1010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -45902,7 +45902,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -46142,7 +46142,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -46191,7 +46191,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -46236,7 +46236,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -46325,7 +46325,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -46353,11 +46353,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -46428,7 +46428,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -46535,7 +46535,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -46591,7 +46591,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -46609,15 +46609,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'1010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -46777,7 +46777,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -47005,7 +47005,7 @@ hex(c1) hex(c2) 3 3 0 3 CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -47054,7 +47054,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -47099,7 +47099,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -47182,7 +47182,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -47210,13 +47210,13 @@ hex(c1) hex(c2) 1 1 2 2 3 3 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 3 2 2 3 3 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 3 @@ -47288,7 +47288,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -47389,7 +47389,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -47447,7 +47447,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -47465,7 +47465,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -47483,7 +47483,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -47501,15 +47501,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'1010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -47713,7 +47713,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -47994,7 +47994,7 @@ hex(c1) hex(c2) F F 9 F CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -48043,7 +48043,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -48120,7 +48120,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT hex(c1),hex(c2) FROM t5; @@ -48148,7 +48148,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 B @@ -48161,7 +48161,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -48232,7 +48232,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -48367,7 +48367,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -48385,7 +48385,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -48403,7 +48403,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -48421,7 +48421,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -48439,7 +48439,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -48457,7 +48457,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -48475,7 +48475,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -48493,15 +48493,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'1010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -48751,7 +48751,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -49257,11 +49257,11 @@ _ a z ~ -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c2' at row 2 @@ -49272,7 +49272,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -49372,7 +49372,7 @@ hex(c1) hex(c2) 7F FF 9 FF SET SQL_MODE=DEFAULT; -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 0 8E @@ -49484,7 +49484,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -49572,7 +49572,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49590,7 +49590,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49608,7 +49608,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49626,7 +49626,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49644,7 +49644,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49662,7 +49662,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49680,7 +49680,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49698,7 +49698,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49716,7 +49716,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49734,7 +49734,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49752,7 +49752,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49770,7 +49770,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49788,7 +49788,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49806,7 +49806,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49824,7 +49824,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -49842,7 +49842,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -50722,7 +50722,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -50976,7 +50976,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -50994,7 +50994,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51012,7 +51012,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51030,7 +51030,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51048,7 +51048,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51066,7 +51066,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51084,7 +51084,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51102,7 +51102,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51120,7 +51120,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51138,7 +51138,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51156,7 +51156,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51174,7 +51174,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51192,7 +51192,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51210,7 +51210,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51228,7 +51228,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51246,7 +51246,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51264,7 +51264,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51282,7 +51282,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51300,7 +51300,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51318,7 +51318,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51336,7 +51336,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51354,7 +51354,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51372,7 +51372,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51390,7 +51390,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51408,7 +51408,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51426,7 +51426,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51444,7 +51444,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51462,7 +51462,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51480,7 +51480,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51498,7 +51498,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -51516,7 +51516,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -51533,7 +51533,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 INSERT INTO t1 VALUES (b'1010101010101010'); @@ -52793,7 +52793,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -53047,7 +53047,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53065,7 +53065,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53083,7 +53083,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53101,7 +53101,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53119,7 +53119,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53137,7 +53137,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53155,7 +53155,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53173,7 +53173,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53191,7 +53191,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53209,7 +53209,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53227,7 +53227,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53245,7 +53245,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53263,7 +53263,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53281,7 +53281,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53299,7 +53299,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53317,7 +53317,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53335,7 +53335,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53353,7 +53353,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53371,7 +53371,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53389,7 +53389,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53407,7 +53407,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53425,7 +53425,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53443,7 +53443,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53461,7 +53461,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53479,7 +53479,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53497,7 +53497,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53515,7 +53515,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53533,7 +53533,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53551,7 +53551,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53569,7 +53569,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53587,7 +53587,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53605,7 +53605,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53623,7 +53623,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53641,7 +53641,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53659,7 +53659,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53677,7 +53677,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53695,7 +53695,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53713,7 +53713,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53731,7 +53731,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53749,7 +53749,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53767,7 +53767,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53785,7 +53785,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53803,7 +53803,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53821,7 +53821,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53839,7 +53839,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53857,7 +53857,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53875,7 +53875,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53893,7 +53893,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53911,7 +53911,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53929,7 +53929,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53947,7 +53947,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53965,7 +53965,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -53983,7 +53983,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -54001,7 +54001,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -54019,7 +54019,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -54037,7 +54037,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -54055,7 +54055,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -54073,7 +54073,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -54091,7 +54091,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -54108,7 +54108,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 set @v1=4; @@ -54124,7 +54124,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); set @v1=3; set @v2=3/2; set @v3=repeat('1',@v1); @@ -54138,7 +54138,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); set @v1=2; set @v2=2/2; set @v3=repeat('1',@v1); @@ -54152,7 +54152,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); set @v1=1; set @v2=1/2; set @v3=repeat('1',@v1); @@ -54166,7 +54166,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); INSERT INTO t1 VALUES (b'1010101010101010'); INSERT INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); SELECT HEX(c1) FROM t1; @@ -56214,10 +56214,10 @@ Warnings: Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated CREATE TABLE t1(c1 BIT(0)); CREATE TABLE t2(c1 BIT(0), c2 BIT(0), c3 BIT(0)); -INSERT INTO t1 VALUES (b'101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -56333,7 +56333,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -56566,7 +56566,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -56615,7 +56615,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -56660,7 +56660,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -56749,7 +56749,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -56777,11 +56777,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -56852,7 +56852,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -56959,7 +56959,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -57013,21 +57013,21 @@ INSERT INTO t1 VALUES (b'0'); set @v3=repeat('01',@v2); INSERT INTO t1 VALUES (b'01'); set @v3=repeat('10',@v2); -INSERT INTO t1 VALUES (b'10'); +INSERT IGNORE INTO t1 VALUES (b'10'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -57165,7 +57165,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -57405,7 +57405,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -57454,7 +57454,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -57499,7 +57499,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -57588,7 +57588,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -57616,11 +57616,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -57691,7 +57691,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -57798,7 +57798,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -57856,7 +57856,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -57874,15 +57874,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -58042,7 +58042,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -58270,7 +58270,7 @@ hex(c1) hex(c2) 3 3 0 3 CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -58319,7 +58319,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -58364,7 +58364,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -58447,7 +58447,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -58475,13 +58475,13 @@ hex(c1) hex(c2) 1 1 2 2 3 3 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 3 2 2 3 3 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 3 @@ -58553,7 +58553,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -58654,7 +58654,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -58714,7 +58714,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -58732,7 +58732,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -58750,7 +58750,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -58768,15 +58768,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -58980,7 +58980,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -59261,7 +59261,7 @@ hex(c1) hex(c2) F F 9 F CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -59310,7 +59310,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -59387,7 +59387,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT hex(c1),hex(c2) FROM t5; @@ -59415,7 +59415,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 B @@ -59428,7 +59428,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -59499,7 +59499,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -59636,7 +59636,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -59654,7 +59654,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -59672,7 +59672,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -59690,7 +59690,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -59708,7 +59708,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -59726,7 +59726,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -59744,7 +59744,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -59762,15 +59762,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -60020,7 +60020,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -60526,11 +60526,11 @@ _ a z ~ -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c2' at row 2 @@ -60541,7 +60541,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -60641,7 +60641,7 @@ hex(c1) hex(c2) 7F FF 9 FF SET SQL_MODE=DEFAULT; -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 0 8E @@ -60753,7 +60753,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -60843,7 +60843,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -60861,7 +60861,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -60879,7 +60879,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -60897,7 +60897,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -60915,7 +60915,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -60933,7 +60933,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -60951,7 +60951,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -60969,7 +60969,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -60987,7 +60987,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -61005,7 +61005,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -61023,7 +61023,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -61041,7 +61041,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -61059,7 +61059,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -61077,7 +61077,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -61095,7 +61095,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -61113,15 +61113,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -61999,7 +61999,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -62255,7 +62255,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62273,7 +62273,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62291,7 +62291,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62309,7 +62309,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62327,7 +62327,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62345,7 +62345,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62363,7 +62363,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62381,7 +62381,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62399,7 +62399,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62417,7 +62417,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62435,7 +62435,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62453,7 +62453,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62471,7 +62471,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62489,7 +62489,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62507,7 +62507,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62525,7 +62525,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62543,7 +62543,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62561,7 +62561,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62579,7 +62579,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62597,7 +62597,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62615,7 +62615,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62633,7 +62633,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62651,7 +62651,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62669,7 +62669,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62687,7 +62687,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62705,7 +62705,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62723,7 +62723,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62741,7 +62741,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62759,7 +62759,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62777,7 +62777,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -62795,7 +62795,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -62812,7 +62812,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 INSERT INTO t1 VALUES (b'101010101010101010101010101010'); @@ -64072,7 +64072,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -64328,7 +64328,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64346,7 +64346,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64364,7 +64364,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64382,7 +64382,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64400,7 +64400,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64418,7 +64418,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64436,7 +64436,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64454,7 +64454,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64472,7 +64472,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64490,7 +64490,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64508,7 +64508,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64526,7 +64526,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64544,7 +64544,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64562,7 +64562,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64580,7 +64580,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64598,7 +64598,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64616,7 +64616,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64634,7 +64634,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64652,7 +64652,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64670,7 +64670,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64688,7 +64688,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64706,7 +64706,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64724,7 +64724,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64742,7 +64742,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64760,7 +64760,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64778,7 +64778,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64796,7 +64796,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64814,7 +64814,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64832,7 +64832,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64850,7 +64850,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64868,7 +64868,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64886,7 +64886,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64904,7 +64904,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64922,7 +64922,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64940,7 +64940,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64958,7 +64958,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64976,7 +64976,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -64994,7 +64994,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65012,7 +65012,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65030,7 +65030,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65048,7 +65048,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65066,7 +65066,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65084,7 +65084,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65102,7 +65102,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65120,7 +65120,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65138,7 +65138,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65156,7 +65156,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65174,7 +65174,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65192,7 +65192,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65210,7 +65210,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65228,7 +65228,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65246,7 +65246,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65264,7 +65264,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65282,7 +65282,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65300,7 +65300,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65318,7 +65318,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65336,7 +65336,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65354,7 +65354,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -65372,7 +65372,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -65389,7 +65389,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 set @v1=4; @@ -65405,7 +65405,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); set @v1=3; set @v2=3/2; set @v3=repeat('1',@v1); @@ -65419,7 +65419,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); set @v1=2; set @v2=2/2; set @v3=repeat('1',@v1); @@ -65433,7 +65433,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); set @v1=1; set @v2=1/2; set @v3=repeat('1',@v1); @@ -65447,7 +65447,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); INSERT INTO t1 VALUES (b'101010101010101010101010101010'); INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); SELECT HEX(c1) FROM t1; @@ -67492,10 +67492,10 @@ Warnings: Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated CREATE TABLE t1(c1 BIT(0)); CREATE TABLE t2(c1 BIT(0), c2 BIT(0), c3 BIT(0)); -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -67611,7 +67611,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -67844,7 +67844,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -67893,7 +67893,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -67938,7 +67938,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -68027,7 +68027,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -68055,11 +68055,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -68130,7 +68130,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -68237,7 +68237,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -68288,21 +68288,21 @@ INSERT INTO t1 VALUES (b'0'); set @v3=repeat('01',@v2); INSERT INTO t1 VALUES (b'01'); set @v3=repeat('10',@v2); -INSERT INTO t1 VALUES (b'10'); +INSERT IGNORE INTO t1 VALUES (b'10'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -68440,7 +68440,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -68680,7 +68680,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -68729,7 +68729,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -68774,7 +68774,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -68863,7 +68863,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -68891,11 +68891,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -68966,7 +68966,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -69073,7 +69073,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -69128,7 +69128,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -69146,15 +69146,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -69314,7 +69314,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -69542,7 +69542,7 @@ hex(c1) hex(c2) 3 3 0 3 CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -69591,7 +69591,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -69636,7 +69636,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -69719,7 +69719,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -69747,13 +69747,13 @@ hex(c1) hex(c2) 1 1 2 2 3 3 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 3 2 2 3 3 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 3 @@ -69825,7 +69825,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -69926,7 +69926,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -69983,7 +69983,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -70001,7 +70001,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -70019,7 +70019,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -70037,15 +70037,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -70249,7 +70249,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -70530,7 +70530,7 @@ hex(c1) hex(c2) F F 9 F CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -70579,7 +70579,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -70656,7 +70656,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT hex(c1),hex(c2) FROM t5; @@ -70684,7 +70684,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 B @@ -70697,7 +70697,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -70768,7 +70768,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -70902,7 +70902,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -70920,7 +70920,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -70938,7 +70938,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -70956,7 +70956,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -70974,7 +70974,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -70992,7 +70992,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -71010,7 +71010,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -71028,15 +71028,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -71286,7 +71286,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -71792,11 +71792,11 @@ _ a z ~ -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c2' at row 2 @@ -71807,7 +71807,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -71907,7 +71907,7 @@ hex(c1) hex(c2) 7F FF 9 FF SET SQL_MODE=DEFAULT; -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 0 8E @@ -72019,7 +72019,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -72106,7 +72106,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72124,7 +72124,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72142,7 +72142,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72160,7 +72160,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72178,7 +72178,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72196,7 +72196,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72214,7 +72214,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72232,7 +72232,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72250,7 +72250,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72268,7 +72268,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72286,7 +72286,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72304,7 +72304,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72322,7 +72322,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72340,7 +72340,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72358,7 +72358,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -72376,15 +72376,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73262,7 +73262,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -73515,7 +73515,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73533,7 +73533,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73551,7 +73551,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73569,7 +73569,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73587,7 +73587,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73605,7 +73605,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73623,7 +73623,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73641,7 +73641,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73659,7 +73659,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73677,7 +73677,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73695,7 +73695,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73713,7 +73713,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73731,7 +73731,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73749,7 +73749,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73767,7 +73767,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73785,7 +73785,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73803,7 +73803,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73821,7 +73821,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73839,7 +73839,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73857,7 +73857,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73875,7 +73875,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73893,7 +73893,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73911,7 +73911,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73929,7 +73929,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73947,7 +73947,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73965,7 +73965,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -73983,7 +73983,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -74001,7 +74001,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -74019,7 +74019,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -74037,7 +74037,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -74055,7 +74055,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -74072,13 +74072,13 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75338,7 +75338,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -75591,7 +75591,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75609,7 +75609,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75627,7 +75627,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75645,7 +75645,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75663,7 +75663,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75681,7 +75681,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75699,7 +75699,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75717,7 +75717,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75735,7 +75735,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75753,7 +75753,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75771,7 +75771,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75789,7 +75789,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75807,7 +75807,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75825,7 +75825,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75843,7 +75843,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75861,7 +75861,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75879,7 +75879,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75897,7 +75897,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75915,7 +75915,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75933,7 +75933,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75951,7 +75951,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75969,7 +75969,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -75987,7 +75987,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76005,7 +76005,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76023,7 +76023,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76041,7 +76041,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76059,7 +76059,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76077,7 +76077,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76095,7 +76095,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76113,7 +76113,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76131,7 +76131,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76149,7 +76149,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76167,7 +76167,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76185,7 +76185,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76203,7 +76203,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76221,7 +76221,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76239,7 +76239,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76257,7 +76257,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76275,7 +76275,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76293,7 +76293,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76311,7 +76311,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76329,7 +76329,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76347,7 +76347,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76365,7 +76365,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76383,7 +76383,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76401,7 +76401,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76419,7 +76419,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76437,7 +76437,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76455,7 +76455,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76473,7 +76473,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76491,7 +76491,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76509,7 +76509,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76527,7 +76527,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76545,7 +76545,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76563,7 +76563,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76581,7 +76581,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76599,7 +76599,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76617,7 +76617,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -76635,7 +76635,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -76652,7 +76652,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 set @v1=4; @@ -76668,7 +76668,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); set @v1=3; set @v2=3/2; set @v3=repeat('1',@v1); @@ -76682,7 +76682,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); set @v1=2; set @v2=2/2; set @v3=repeat('1',@v1); @@ -76696,7 +76696,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); set @v1=1; set @v2=1/2; set @v3=repeat('1',@v1); @@ -76710,7 +76710,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); SELECT HEX(c1) FROM t1; @@ -78755,10 +78755,10 @@ Warnings: Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated CREATE TABLE t1(c1 BIT(0)); CREATE TABLE t2(c1 BIT(0), c2 BIT(0), c3 BIT(0)); -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -78874,7 +78874,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -79107,7 +79107,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -79156,7 +79156,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -79201,7 +79201,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -79290,7 +79290,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -79318,11 +79318,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -79393,7 +79393,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -79500,7 +79500,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -79551,21 +79551,21 @@ INSERT INTO t1 VALUES (b'0'); set @v3=repeat('01',@v2); INSERT INTO t1 VALUES (b'01'); set @v3=repeat('10',@v2); -INSERT INTO t1 VALUES (b'10'); +INSERT IGNORE INTO t1 VALUES (b'10'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -79703,7 +79703,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -79943,7 +79943,7 @@ hex(c1) hex(c2) 1 1 0 1 CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -79992,7 +79992,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -80037,7 +80037,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -80126,7 +80126,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -80154,11 +80154,11 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 1 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -80229,7 +80229,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -80336,7 +80336,7 @@ Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x01' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 2 Warning 1264 Out of range value for column 'c2' at row 2 @@ -80391,7 +80391,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -80409,15 +80409,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -80577,7 +80577,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -80805,7 +80805,7 @@ hex(c1) hex(c2) 3 3 0 3 CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -80854,7 +80854,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -80899,7 +80899,7 @@ UPDATE t6 SET c2=10 WHERE c2=NULL; UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -80982,7 +80982,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -81010,13 +81010,13 @@ hex(c1) hex(c2) 1 1 2 2 3 3 -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 3 2 2 3 3 -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 3 @@ -81088,7 +81088,7 @@ Warning 1264 Out of range value for column 'c1' at row 22 Warning 1264 Out of range value for column 'c2' at row 22 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -81189,7 +81189,7 @@ Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 10 Warning 1264 Out of range value for column 'c2' at row 10 Warning 1062 Duplicate entry '\x03' for key 'PRIMARY' -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); Warnings: Warning 1264 Out of range value for column 'c1' at row 4 Warning 1264 Out of range value for column 'c2' at row 4 @@ -81246,7 +81246,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -81264,7 +81264,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -81282,7 +81282,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -81300,15 +81300,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -81512,7 +81512,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -81793,7 +81793,7 @@ hex(c1) hex(c2) F F 9 F CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -81842,7 +81842,7 @@ c1   UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c1' at row 2 @@ -81919,7 +81919,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT hex(c1),hex(c2) FROM t5; @@ -81947,7 +81947,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 1 B @@ -81960,7 +81960,7 @@ hex(c1) hex(c2) 8 D 9 D A A -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 TRUNCATE t5; @@ -82031,7 +82031,7 @@ Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' Warning 1264 Out of range value for column 'c1' at row 23 Warning 1264 Out of range value for column 'c2' at row 23 Warning 1062 Duplicate entry '\x0F' for key 'PRIMARY' -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -82165,7 +82165,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -82183,7 +82183,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -82201,7 +82201,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -82219,7 +82219,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -82237,7 +82237,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -82255,7 +82255,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -82273,7 +82273,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -82291,15 +82291,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -82549,7 +82549,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -83055,11 +83055,11 @@ _ a z ~ -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c2' at row 2 @@ -83070,7 +83070,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -83170,7 +83170,7 @@ hex(c1) hex(c2) 7F FF 9 FF SET SQL_MODE=DEFAULT; -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; SELECT hex(c1),hex(c2) FROM t5; hex(c1) hex(c2) 0 8E @@ -83282,7 +83282,7 @@ Warning 1264 Out of range value for column 'c2' at row 34 Warning 1264 Out of range value for column 'c2' at row 35 Warning 1264 Out of range value for column 'c2' at row 36 Warning 1264 Out of range value for column 'c2' at row 37 -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); Warnings: Warning 1264 Out of range value for column 'c2' at row 2 Warning 1264 Out of range value for column 'c2' at row 5 @@ -83369,7 +83369,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83387,7 +83387,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83405,7 +83405,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83423,7 +83423,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83441,7 +83441,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83459,7 +83459,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83477,7 +83477,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83495,7 +83495,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83513,7 +83513,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83531,7 +83531,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83549,7 +83549,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83567,7 +83567,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83585,7 +83585,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83603,7 +83603,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83621,7 +83621,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -83639,15 +83639,15 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84525,7 +84525,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -84778,7 +84778,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84796,7 +84796,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84814,7 +84814,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84832,7 +84832,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84850,7 +84850,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84868,7 +84868,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84886,7 +84886,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84904,7 +84904,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84922,7 +84922,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84940,7 +84940,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84958,7 +84958,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84976,7 +84976,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -84994,7 +84994,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85012,7 +85012,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85030,7 +85030,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85048,7 +85048,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85066,7 +85066,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85084,7 +85084,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85102,7 +85102,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85120,7 +85120,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85138,7 +85138,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85156,7 +85156,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85174,7 +85174,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85192,7 +85192,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85210,7 +85210,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85228,7 +85228,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85246,7 +85246,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85264,7 +85264,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85282,7 +85282,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85300,7 +85300,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -85318,7 +85318,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -85335,13 +85335,13 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -86601,7 +86601,7 @@ UPDATE t6 SET c1=12 WHERE c1=b'101' AND c2=178; UPDATE t6 SET c1=c1+2,c2=c1+c2 WHERE c2=46 OR c2=b'1001'; UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; Warnings: Warning 1264 Out of range value for column 'c2' at row 16 SELECT hex(c1) FROM t5 WHERE c1<>0; @@ -86854,7 +86854,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -86872,7 +86872,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -86890,7 +86890,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -86908,7 +86908,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -86926,7 +86926,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -86944,7 +86944,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -86962,7 +86962,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -86980,7 +86980,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -86998,7 +86998,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87016,7 +87016,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101 set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87034,7 +87034,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87052,7 +87052,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010101010' set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87070,7 +87070,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87088,7 +87088,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87106,7 +87106,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87124,7 +87124,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87142,7 +87142,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87160,7 +87160,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87178,7 +87178,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87196,7 +87196,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87214,7 +87214,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87232,7 +87232,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111111'","b'01010101010101010101010101010101010101010101","b'10101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87250,7 +87250,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87268,7 +87268,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111111'","b'010101010101010101010101010101010101010101","b'101010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87286,7 +87286,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87304,7 +87304,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111111'","b'0101010101010101010101010101010101010101","b'1010101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87322,7 +87322,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87340,7 +87340,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111111'","b'01010101010101010101010101010101010101","b'10101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87358,7 +87358,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87376,7 +87376,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111111'","b'010101010101010101010101010101010101","b'101010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87394,7 +87394,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87412,7 +87412,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111111'","b'0101010101010101010101010101010101","b'1010101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87430,7 +87430,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87448,7 +87448,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111111'","b'01010101010101010101010101010101","b'10101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87466,7 +87466,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87484,7 +87484,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111111'","b'010101010101010101010101010101","b'101010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87502,7 +87502,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87520,7 +87520,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111111'","b'0101010101010101010101010101","b'1010101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87538,7 +87538,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87556,7 +87556,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111111'","b'01010101010101010101010101","b'10101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87574,7 +87574,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87592,7 +87592,7 @@ INSERT INTO t1 VALUES (b'101010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111111'","b'010101010101010101010101","b'101010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87610,7 +87610,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87628,7 +87628,7 @@ INSERT INTO t1 VALUES (b'1010101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111111'","b'0101010101010101010101","b'1010101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87646,7 +87646,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87664,7 +87664,7 @@ INSERT INTO t1 VALUES (b'10101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111111'","b'01010101010101010101","b'10101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87682,7 +87682,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87700,7 +87700,7 @@ INSERT INTO t1 VALUES (b'101010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111111'","b'010101010101010101","b'101010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87718,7 +87718,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87736,7 +87736,7 @@ INSERT INTO t1 VALUES (b'1010101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111111'","b'0101010101010101","b'1010101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87754,7 +87754,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87772,7 +87772,7 @@ INSERT INTO t1 VALUES (b'10101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111111'","b'01010101010101","b'10101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87790,7 +87790,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87808,7 +87808,7 @@ INSERT INTO t1 VALUES (b'101010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111111'","b'010101010101","b'101010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87826,7 +87826,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87844,7 +87844,7 @@ INSERT INTO t1 VALUES (b'1010101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111111'","b'0101010101","b'1010101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87862,7 +87862,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87880,7 +87880,7 @@ INSERT INTO t1 VALUES (b'10101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111111'","b'01010101","b'10101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -87898,7 +87898,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'111111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c3' at row 1 @@ -87915,7 +87915,7 @@ INSERT INTO t1 VALUES (b'101010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); +INSERT IGNORE INTO t2 VALUES ("b'11111'","b'010101","b'101010'"); Warnings: Warning 1264 Out of range value for column 'c3' at row 1 set @v1=4; @@ -87931,7 +87931,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'1111'","b'0101","b'1010'"); set @v1=3; set @v2=3/2; set @v3=repeat('1',@v1); @@ -87945,7 +87945,7 @@ INSERT INTO t1 VALUES (b'1010'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'111'","b'0101","b'1010'"); +INSERT IGNORE INTO t2 VALUES ("b'111'","b'0101","b'1010'"); set @v1=2; set @v2=2/2; set @v3=repeat('1',@v1); @@ -87959,7 +87959,7 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'11'","b'01","b'10'"); +INSERT IGNORE INTO t2 VALUES ("b'11'","b'01","b'10'"); set @v1=1; set @v2=1/2; set @v3=repeat('1',@v1); @@ -87973,11 +87973,11 @@ INSERT INTO t1 VALUES (b'10'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); -INSERT INTO t2 VALUES ("b'1'","b'01","b'10'"); -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES ("b'1'","b'01","b'10'"); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 diff --git a/mysql-test/suite/engines/iuds/r/update_decimal.result b/mysql-test/suite/engines/iuds/r/update_decimal.result index eb482c6181b..7b4a3ea9079 100644 --- a/mysql-test/suite/engines/iuds/r/update_decimal.result +++ b/mysql-test/suite/engines/iuds/r/update_decimal.result @@ -1,7 +1,7 @@ DROP TABLE IF EXISTS t1,t2,t3,t4; CREATE TABLE t1(c1 DECIMAL(10,5) UNSIGNED NOT NULL, c2 DECIMAL(10,5) SIGNED NULL, c3 DECIMAL, c4 INT, UNIQUE INDEX idx(c1,c4)); INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); -INSERT INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -13,11 +13,11 @@ Note 1265 Data truncated for column 'c2' at row 1 Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); -INSERT INTO t1 VALUES ("-.1","-.1","-.1",8); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Note 1265 Data truncated for column 'c3' at row 1 -INSERT INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -48,7 +48,7 @@ c1 c2 99999.99999 -99999.99999 99999.99999 99999.99999 99999.99999 99999.99999 -UPDATE t1 SET c1=c2+c3 WHERE c3 < 10000; +UPDATE IGNORE t1 SET c1=c2+c3 WHERE c3 < 10000; Warnings: Warning 1264 Out of range value for column 'c1' at row 8 SELECT * FROM t1; @@ -102,7 +102,7 @@ c1 c2 c3 c4 99999.99999 -99999.99999 9999999999 5 99999.99999 99999.99999 1000000000 3 99999.99999 99999.99999 111111111 9 -UPDATE t1 SET c1=-1.0e+2 WHERE c4=2; +UPDATE IGNORE t1 SET c1=-1.0e+2 WHERE c4=2; Warnings: Warning 1264 Out of range value for column 'c1' at row 2 SHOW WARNINGS; @@ -120,7 +120,7 @@ c1 c2 c3 c4 99999.99999 -99999.99999 9999999999 5 99999.99999 99999.99999 1000000000 3 99999.99999 99999.99999 111111111 9 -UPDATE t1 SET c1=1.0e+20 WHERE c4=2; +UPDATE IGNORE t1 SET c1=1.0e+20 WHERE c4=2; Warnings: Warning 1264 Out of range value for column 'c1' at row 2 SHOW WARNINGS; @@ -168,7 +168,7 @@ c1 c2 c3 c4 99999.99999 1.00000 1 7 99999.99999 99999.99999 1000000000 3 99999.99999 99999.99999 111111111 9 -UPDATE t1 SET c1=99999.999999 WHERE c4=7; +UPDATE IGNORE t1 SET c1=99999.999999 WHERE c4=7; Warnings: Warning 1264 Out of range value for column 'c1' at row 7 SELECT c1,c4 FROM t1; @@ -332,7 +332,7 @@ CREATE TABLE t3(c1 DECIMAL(10,5) NOT NULL, c2 DECIMAL, c3 INT, UNIQUE INDEX idx3 INSERT INTO t2 VALUES ('11111.11111','1111111111',1),('22222.22222','2222222222',2),('33333.33333','3333333333',3); INSERT INTO t3 VALUES ('11111.11111','4444444444',1),('55555.55555','5555555555',2),('66666.66666','6666666666',3); UPDATE t2,t3 SET t3.c1='22222.22222' WHERE t2.c1=t3.c1 AND t2.c3=t3.c3; -UPDATE t1 SET c3='asdf' WHERE c1='11111.11111'; +UPDATE IGNORE t1 SET c3='asdf' WHERE c1='11111.11111'; Warnings: Warning 1366 Incorrect decimal value: 'asdf' for column 'c3' at row 1 SELECT c3 FROM t1; @@ -346,7 +346,7 @@ c3 7777777777 8888888888 9999999999 -UPDATE t1 SET c2="1 e 1" WHERE c4=2; +UPDATE IGNORE t1 SET c2="1 e 1" WHERE c4=2; Warnings: Warning 1265 Data truncated for column 'c2' at row 2 SELECT c2 FROM t1; @@ -391,17 +391,17 @@ c1 c2 c3 DROP TABLES IF EXISTS t1,t2,t3,t4; CREATE TABLE t1(c1 FLOAT(10,5) UNSIGNED NOT NULL, c2 FLOAT(10,5) SIGNED NULL, c3 FLOAT, c4 INT, UNIQUE INDEX idx(c1,c4)); INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); -INSERT INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); -INSERT INTO t1 VALUES ("-.1","-.1","-.1",8); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -431,7 +431,7 @@ c1 c2 100000.00000 100000.00000 10001.00000 1001.00000 11111.00000 -10000.00000 -UPDATE t1 SET c1=c2+c3 WHERE c3 < 10000; +UPDATE IGNORE t1 SET c1=c2+c3 WHERE c3 < 10000; Warnings: Warning 1264 Out of range value for column 'c1' at row 8 SELECT * FROM t1; @@ -485,7 +485,7 @@ c1 c2 c3 c4 10001.00000 NULL 10000 4 11111.00000 -9900.00000 10000000 2 2.00000 1.00000 1 7 -UPDATE t1 SET c1=-1.0e+2 WHERE c4=2; +UPDATE IGNORE t1 SET c1=-1.0e+2 WHERE c4=2; Warnings: Warning 1264 Out of range value for column 'c1' at row 2 SHOW WARNINGS; @@ -503,7 +503,7 @@ c1 c2 c3 c4 100000.00000 100000.00000 111111000 9 10001.00000 NULL 10000 4 2.00000 1.00000 1 7 -UPDATE t1 SET c1=1.0e+20 WHERE c4=2; +UPDATE IGNORE t1 SET c1=1.0e+20 WHERE c4=2; Warnings: Warning 1264 Out of range value for column 'c1' at row 2 SHOW WARNINGS; @@ -550,7 +550,7 @@ c1 c2 c3 c4 100000.00000 100000.00000 1000000000 3 100000.00000 100000.00000 111111000 9 10001.00000 NULL 1234570000 4 -UPDATE t1 SET c1=99999.999999 WHERE c4=7; +UPDATE IGNORE t1 SET c1=99999.999999 WHERE c4=7; Warnings: Warning 1264 Out of range value for column 'c1' at row 7 SELECT c1,c4 FROM t1; @@ -728,7 +728,7 @@ c3 6666670000 7777780000 8888890000 -UPDATE t1 SET c2="1 e 1" WHERE c4=2; +UPDATE IGNORE t1 SET c2="1 e 1" WHERE c4=2; Warnings: Warning 1265 Data truncated for column 'c2' at row 2 SELECT c2 FROM t1; @@ -773,17 +773,17 @@ c1 c2 c3 DROP TABLES IF EXISTS t1,t2,t3,t4; CREATE TABLE t1(c1 DOUBLE(10,5) UNSIGNED NOT NULL, c2 DOUBLE(10,5) SIGNED NULL, c3 DOUBLE, c4 INT, UNIQUE INDEX idx(c1,c4)); INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); -INSERT INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); -INSERT INTO t1 VALUES ("-.1","-.1","-.1",8); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -813,7 +813,7 @@ c1 c2 99999.99999 -99999.99999 99999.99999 99999.99999 99999.99999 99999.99999 -UPDATE t1 SET c1=c2+c3 WHERE c3 < 10000; +UPDATE IGNORE t1 SET c1=c2+c3 WHERE c3 < 10000; Warnings: Warning 1264 Out of range value for column 'c1' at row 8 SELECT * FROM t1; @@ -867,7 +867,7 @@ c1 c2 c3 c4 99999.99999 -99999.99999 9999999999 5 99999.99999 99999.99999 1000000000.0001 3 99999.99999 99999.99999 111111111.11 9 -UPDATE t1 SET c1=-1.0e+2 WHERE c4=2; +UPDATE IGNORE t1 SET c1=-1.0e+2 WHERE c4=2; Warnings: Warning 1264 Out of range value for column 'c1' at row 2 SHOW WARNINGS; @@ -885,7 +885,7 @@ c1 c2 c3 c4 99999.99999 -99999.99999 9999999999 5 99999.99999 99999.99999 1000000000.0001 3 99999.99999 99999.99999 111111111.11 9 -UPDATE t1 SET c1=1.0e+20 WHERE c4=2; +UPDATE IGNORE t1 SET c1=1.0e+20 WHERE c4=2; Warnings: Warning 1264 Out of range value for column 'c1' at row 2 SHOW WARNINGS; @@ -933,7 +933,7 @@ c1 c2 c3 c4 99999.99999 1.00000 1 7 99999.99999 99999.99999 1000000000.0001 3 99999.99999 99999.99999 111111111.11 9 -UPDATE t1 SET c1=99999.999999 WHERE c4=7; +UPDATE IGNORE t1 SET c1=99999.999999 WHERE c4=7; Warnings: Warning 1264 Out of range value for column 'c1' at row 7 SELECT c1,c4 FROM t1; @@ -1097,7 +1097,7 @@ CREATE TABLE t3(c1 DOUBLE(10,5) NOT NULL, c2 DOUBLE, c3 INT, UNIQUE INDEX idx3(c INSERT INTO t2 VALUES ('11111.11111','1111111111',1),('22222.22222','2222222222',2),('33333.33333','3333333333',3); INSERT INTO t3 VALUES ('11111.11111','4444444444',1),('55555.55555','5555555555',2),('66666.66666','6666666666',3); UPDATE t2,t3 SET t3.c1='22222.22222' WHERE t2.c1=t3.c1 AND t2.c3=t3.c3; -UPDATE t1 SET c3='asdf' WHERE c1='11111.11111'; +UPDATE IGNORE t1 SET c3='asdf' WHERE c1='11111.11111'; Warnings: Warning 1366 Incorrect double value: 'asdf' for column 'c3' at row 1 SELECT c3 FROM t1; @@ -1111,7 +1111,7 @@ c3 7777777777 8888888888 9999999999 -UPDATE t1 SET c2="1 e 1" WHERE c4=2; +UPDATE IGNORE t1 SET c2="1 e 1" WHERE c4=2; Warnings: Warning 1265 Data truncated for column 'c2' at row 2 SELECT c2 FROM t1; diff --git a/mysql-test/suite/engines/iuds/r/update_delete_number.result b/mysql-test/suite/engines/iuds/r/update_delete_number.result index 15de16ed714..ef9d9ff0d34 100644 --- a/mysql-test/suite/engines/iuds/r/update_delete_number.result +++ b/mysql-test/suite/engines/iuds/r/update_delete_number.result @@ -26,7 +26,7 @@ SELECT c1,c2 FROM t1 WHERE c1=120; c1 c2 120 NULL 120 NULL -UPDATE t1 SET c1=-120 WHERE c2=-102; +UPDATE IGNORE t1 SET c1=-120 WHERE c2=-102; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 SELECT c1,c2 FROM t1 WHERE c2=-102; @@ -45,7 +45,7 @@ c1 c2 c3 1 0 1 2 0 2 INSERT INTO t1 VALUES(106,-106,9),(107,-107,10),(108,-108,11),(109,-109,12),(255,127,13); -UPDATE t1 SET c1=4294967296,c2=2147483648 WHERE c2 BETWEEN -108 AND -106; +UPDATE IGNORE t1 SET c1=4294967296,c2=2147483648 WHERE c2 BETWEEN -108 AND -106; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -61,7 +61,7 @@ c1 c2 c3 4294967295 2147483647 10 4294967295 2147483647 11 4294967295 2147483647 9 -UPDATE t1 SET c2=-2147483649 WHERE c1=109 ORDER BY c1; +UPDATE IGNORE t1 SET c2=-2147483649 WHERE c1=109 ORDER BY c1; Warnings: Warning 1264 Out of range value for column 'c2' at row 13 SELECT c1,c2 FROM t1 WHERE c1=109; @@ -78,7 +78,7 @@ SELECT c1,c2 FROM t1 WHERE c2=-110; c1 c2 0 -110 SET SQL_MODE=DEFAULT; -UPDATE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; +UPDATE IGNORE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; Warnings: Warning 1048 Column 'c1' cannot be null SELECT * FROM t1 WHERE c1=0; @@ -144,7 +144,7 @@ c1 c2 7 8 10 11 4294967295 2147483647 -UPDATE t2 SET c1=0,c2=-2147483648 WHERE c2=2; +UPDATE IGNORE t2 SET c1=0,c2=-2147483648 WHERE c2=2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT c1,c2 FROM t1 ORDER BY c1; @@ -1119,7 +1119,7 @@ SELECT c1,c2 FROM t1 WHERE c1=120; c1 c2 120 NULL 120 NULL -UPDATE t1 SET c1=-120 WHERE c2=-102; +UPDATE IGNORE t1 SET c1=-120 WHERE c2=-102; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 SELECT c1,c2 FROM t1 WHERE c2=-102; @@ -1139,7 +1139,7 @@ c1 c2 c3 1 0 1 2 0 2 INSERT INTO t1 VALUES(106,-106,9),(107,-107,10),(108,-108,11),(109,-109,12),(255,127,13); -UPDATE t1 SET c1=256,c2=128 WHERE c2 BETWEEN -108 AND -106; +UPDATE IGNORE t1 SET c1=256,c2=128 WHERE c2 BETWEEN -108 AND -106; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -1156,7 +1156,7 @@ c1 c2 c3 255 127 11 255 127 13 255 127 9 -UPDATE t1 SET c2=-129 WHERE c1=109 ORDER BY c1; +UPDATE IGNORE t1 SET c2=-129 WHERE c1=109 ORDER BY c1; Warnings: Warning 1264 Out of range value for column 'c2' at row 13 SELECT c1,c2 FROM t1 WHERE c1=109; @@ -1173,7 +1173,7 @@ SELECT c1,c2 FROM t1 WHERE c2=-110; c1 c2 0 -110 SET SQL_MODE=DEFAULT; -UPDATE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; +UPDATE IGNORE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; Warnings: Warning 1048 Column 'c1' cannot be null SELECT * FROM t1 WHERE c1=0; @@ -1239,7 +1239,7 @@ c1 c2 7 8 10 11 255 127 -UPDATE t2 SET c1=0,c2=-128 WHERE c2=2; +UPDATE IGNORE t2 SET c1=0,c2=-128 WHERE c2=2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT c1,c2 FROM t1 ORDER BY c1; @@ -1644,7 +1644,7 @@ a b 107 7 108 8 109 9 -update mt1,mt2 set mt1.a=mt1.a+100 where mt1.a=101; +update ignore mt1,mt2 set mt1.a=mt1.a+100 where mt1.a=101; Warnings: Warning 1264 Out of range value for column 'a' at row 1 select * from mt1; @@ -1892,7 +1892,7 @@ SELECT c1,c2 FROM t1 WHERE c1=120; c1 c2 120 NULL 120 NULL -UPDATE t1 SET c1=-120 WHERE c2=-102; +UPDATE IGNORE t1 SET c1=-120 WHERE c2=-102; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 SELECT c1,c2 FROM t1 WHERE c2=-102; @@ -1911,7 +1911,7 @@ c1 c2 c3 1 0 1 2 0 2 INSERT INTO t1 VALUES(106,-106,9),(107,-107,10),(108,-108,11),(109,-109,12),(255,127,13); -UPDATE t1 SET c1=65536,c2=32768 WHERE c2 BETWEEN -108 AND -106; +UPDATE IGNORE t1 SET c1=65536,c2=32768 WHERE c2 BETWEEN -108 AND -106; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -1927,7 +1927,7 @@ c1 c2 c3 65535 32767 10 65535 32767 11 65535 32767 9 -UPDATE t1 SET c2=-32769 WHERE c1=109 ORDER BY c1; +UPDATE IGNORE t1 SET c2=-32769 WHERE c1=109 ORDER BY c1; Warnings: Warning 1264 Out of range value for column 'c2' at row 13 SELECT c1,c2 FROM t1 WHERE c1=109; @@ -1944,7 +1944,7 @@ SELECT c1,c2 FROM t1 WHERE c2=-110; c1 c2 0 -110 SET SQL_MODE=DEFAULT; -UPDATE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; +UPDATE IGNORE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; Warnings: Warning 1048 Column 'c1' cannot be null SELECT * FROM t1 WHERE c1=0; @@ -2010,7 +2010,7 @@ c1 c2 7 8 10 11 65535 32767 -UPDATE t2 SET c1=0,c2=-32768 WHERE c2=2; +UPDATE IGNORE t2 SET c1=0,c2=-32768 WHERE c2=2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT c1,c2 FROM t1 ORDER BY c1; @@ -2639,7 +2639,7 @@ SELECT c1,c2 FROM t1 WHERE c1=120; c1 c2 120 NULL 120 NULL -UPDATE t1 SET c1=-120 WHERE c2=-102; +UPDATE IGNORE t1 SET c1=-120 WHERE c2=-102; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 SELECT c1,c2 FROM t1 WHERE c2=-102; @@ -2658,7 +2658,7 @@ c1 c2 c3 1 0 1 2 0 2 INSERT INTO t1 VALUES(106,-106,9),(107,-107,10),(108,-108,11),(109,-109,12),(255,127,13); -UPDATE t1 SET c1=16777216,c2=8388608 WHERE c2 BETWEEN -108 AND -106; +UPDATE IGNORE t1 SET c1=16777216,c2=8388608 WHERE c2 BETWEEN -108 AND -106; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -2674,7 +2674,7 @@ c1 c2 c3 16777215 8388607 10 16777215 8388607 11 16777215 8388607 9 -UPDATE t1 SET c2=-8388609 WHERE c1=109 ORDER BY c1; +UPDATE IGNORE t1 SET c2=-8388609 WHERE c1=109 ORDER BY c1; Warnings: Warning 1264 Out of range value for column 'c2' at row 13 SELECT c1,c2 FROM t1 WHERE c1=109; @@ -2691,7 +2691,7 @@ SELECT c1,c2 FROM t1 WHERE c2=-110; c1 c2 0 -110 SET SQL_MODE=DEFAULT; -UPDATE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; +UPDATE IGNORE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; Warnings: Warning 1048 Column 'c1' cannot be null SELECT * FROM t1 WHERE c1=0; @@ -2757,7 +2757,7 @@ c1 c2 7 8 10 11 16777215 8388607 -UPDATE t2 SET c1=0,c2=-8388608 WHERE c2=2; +UPDATE IGNORE t2 SET c1=0,c2=-8388608 WHERE c2=2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT c1,c2 FROM t1 ORDER BY c1; @@ -3386,7 +3386,7 @@ SELECT c1,c2 FROM t1 WHERE c1=120; c1 c2 120 NULL 120 NULL -UPDATE t1 SET c1=-120 WHERE c2=-102; +UPDATE IGNORE t1 SET c1=-120 WHERE c2=-102; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 SELECT c1,c2 FROM t1 WHERE c2=-102; @@ -3405,7 +3405,7 @@ c1 c2 c3 1 0 1 2 0 2 INSERT INTO t1 VALUES(106,-106,9),(107,-107,10),(108,-108,11),(109,-109,12),(255,127,13); -UPDATE t1 SET c1=18446744073709551616,c2=9223372036854775808 WHERE c2 BETWEEN -108 AND -106; +UPDATE IGNORE t1 SET c1=18446744073709551616,c2=9223372036854775808 WHERE c2 BETWEEN -108 AND -106; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 Warning 1264 Out of range value for column 'c2' at row 1 @@ -3421,7 +3421,7 @@ c1 c2 c3 18446744073709551615 9223372036854775807 10 18446744073709551615 9223372036854775807 11 18446744073709551615 9223372036854775807 9 -UPDATE t1 SET c2=-9223372036854775809 WHERE c1=109 ORDER BY c1; +UPDATE IGNORE t1 SET c2=-9223372036854775809 WHERE c1=109 ORDER BY c1; Warnings: Warning 1264 Out of range value for column 'c2' at row 13 SELECT c1,c2 FROM t1 WHERE c1=109; @@ -3438,7 +3438,7 @@ SELECT c1,c2 FROM t1 WHERE c2=-110; c1 c2 0 -110 SET SQL_MODE=DEFAULT; -UPDATE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; +UPDATE IGNORE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; Warnings: Warning 1048 Column 'c1' cannot be null SELECT * FROM t1 WHERE c1=0; @@ -3504,7 +3504,7 @@ c1 c2 7 8 10 11 18446744073709551615 9223372036854775807 -UPDATE t2 SET c1=0,c2=-9223372036854775808 WHERE c2=2; +UPDATE IGNORE t2 SET c1=0,c2=-9223372036854775808 WHERE c2=2; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT c1,c2 FROM t1 ORDER BY c1; diff --git a/mysql-test/suite/engines/iuds/r/update_time.result b/mysql-test/suite/engines/iuds/r/update_time.result index 09a7cbf0c7f..48ddb82d521 100644 --- a/mysql-test/suite/engines/iuds/r/update_time.result +++ b/mysql-test/suite/engines/iuds/r/update_time.result @@ -814,7 +814,7 @@ c2 838:59:57 838:59:58 838:59:59 -UPDATE t4 SET c2='-838:59:60' WHERE c1='100:04:04'; +UPDATE IGNORE t4 SET c2='-838:59:60' WHERE c1='100:04:04'; Warnings: Warning 1265 Data truncated for column 'c2' at row 12 SELECT c2 FROM t4; @@ -861,7 +861,7 @@ c2 838:59:59 NULL NULL -UPDATE t4 SET c2='838:59:60' WHERE c1='100:04:04'; +UPDATE IGNORE t4 SET c2='838:59:60' WHERE c1='100:04:04'; Warnings: Warning 1265 Data truncated for column 'c2' at row 12 SELECT c2 FROM t4; @@ -953,7 +953,7 @@ c2 838:59:59 NULL NULL -UPDATE t4 SET c2='11:11:60' WHERE c1='100:04:04'; +UPDATE IGNORE t4 SET c2='11:11:60' WHERE c1='100:04:04'; Warnings: Warning 1265 Data truncated for column 'c2' at row 12 SELECT c2 FROM t4; @@ -1000,7 +1000,7 @@ c2 838:59:59 NULL NULL -UPDATE t4 SET c2='11:60:11' WHERE c1='100:04:04'; +UPDATE IGNORE t4 SET c2='11:60:11' WHERE c1='100:04:04'; Warnings: Warning 1265 Data truncated for column 'c2' at row 12 SELECT c2 FROM t4; @@ -1074,7 +1074,7 @@ c1 SET SQL_MODE=DEFAULT; UPDATE t1 SET c1=8385958 WHERE c2='34 22:59:59'; ERROR 23000: Duplicate entry '838:59:58' for key 'PRIMARY' -UPDATE t1 SET c2='def' WHERE c1=59; +UPDATE IGNORE t1 SET c2='def' WHERE c1=59; Warnings: Warning 1265 Data truncated for column 'c2' at row 1 SELECT c2 FROM t1; @@ -1213,7 +1213,7 @@ c1 c2 838:59:57 838:59:57 838:59:58 838:59:58 838:59:59 838:59:59 -UPDATE t1 SET t1.c2='99999.99999' WHERE c1 BETWEEN 080000 AND 100000; +UPDATE IGNORE t1 SET t1.c2='99999.99999' WHERE c1 BETWEEN 080000 AND 100000; Warnings: Warning 1265 Data truncated for column 'c2' at row 1 SELECT * FROM t1; @@ -1260,7 +1260,7 @@ c1 c2 838:59:57 838:59:57 838:59:58 838:59:58 838:59:59 838:59:59 -UPDATE t1 SET c1=c1+1,c2=c2-1 WHERE c1 IN (222222,8385955,1500000) ORDER BY c1; +UPDATE IGNORE t1 SET c1=c1+1,c2=c2-1 WHERE c1 IN (222222,8385955,1500000) ORDER BY c1; Warnings: Warning 1265 Data truncated for column 'c2' at row 2 SELECT * FROM t1; diff --git a/mysql-test/suite/engines/iuds/r/update_year.result b/mysql-test/suite/engines/iuds/r/update_year.result index c762d70a276..b766531f083 100644 --- a/mysql-test/suite/engines/iuds/r/update_year.result +++ b/mysql-test/suite/engines/iuds/r/update_year.result @@ -581,7 +581,7 @@ c1 99 99 NULL -UPDATE t1 SET c2=-1 WHERE c1=2071; +UPDATE IGNORE t1 SET c2=-1 WHERE c1=2071; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT c2 FROM t1; @@ -633,7 +633,7 @@ c2 2155 NULL NULL -UPDATE t1 SET c2=2156 WHERE c1=2001; +UPDATE IGNORE t1 SET c2=2156 WHERE c1=2001; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT c2 FROM t1; @@ -660,7 +660,7 @@ c2 2155 NULL NULL -UPDATE t4 SET c2=-1 WHERE c1=71; +UPDATE IGNORE t4 SET c2=-1 WHERE c1=71; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT c2 FROM t4; @@ -712,7 +712,7 @@ NULL NULL NULL NULL -UPDATE t4 SET c2=100 WHERE c1=79; +UPDATE IGNORE t4 SET c2=100 WHERE c1=79; Warnings: Warning 1264 Out of range value for column 'c2' at row 1 SELECT c2 FROM t4; @@ -772,7 +772,7 @@ c1 SET SQL_MODE=DEFAULT #Update with invalid values #UPDATE t2 SET c1='def' WHERE c2=2064; -UPDATE t4 SET c1=-70 WHERE c2=75; +UPDATE IGNORE t4 SET c1=-70 WHERE c2=75; Warnings: Warning 1264 Out of range value for column 'c1' at row 17 SELECT c1 FROM t4; @@ -852,7 +852,7 @@ c1 c2 2079 2069 2154 2155 2155 2155 -UPDATE t1 SET c1=c1-1,c2=c2+1 WHERE c1 IN (2154,2009,1979); +UPDATE IGNORE t1 SET c1=c1-1,c2=c2+1 WHERE c1 IN (2154,2009,1979); Warnings: Warning 1264 Out of range value for column 'c2' at row 1 Warning 1264 Out of range value for column 'c2' at row 3 diff --git a/mysql-test/suite/engines/iuds/t/delete_decimal.test b/mysql-test/suite/engines/iuds/t/delete_decimal.test index 8217c5727c3..053fc7810dc 100644 --- a/mysql-test/suite/engines/iuds/t/delete_decimal.test +++ b/mysql-test/suite/engines/iuds/t/delete_decimal.test @@ -13,7 +13,7 @@ CREATE TABLE t1(c1 DECIMAL(10,5) UNSIGNED NOT NULL, c2 DECIMAL(10,5) SIGNED NULL INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); # DECIMAL := DECIMAL(10,0); Decimal values in c3 will be stripped; -INSERT INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); # c1, c2, c3 will be rounded automatically INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); @@ -23,8 +23,8 @@ INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); # Test insert leading zero, +/- signs, overflow handling INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); -INSERT INTO t1 VALUES ("-.1","-.1","-.1",8); -INSERT INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); # Inserting in scientific notations INSERT INTO t1 VALUES('1.0e+4','1.0e-5','1.0e+9',10); @@ -137,7 +137,7 @@ CREATE TABLE t1(c1 FLOAT(10,5) UNSIGNED NOT NULL, c2 FLOAT(10,5) SIGNED NULL, c3 INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); # DECIMAL := DECIMAL(10,0); Decimal values in c3 will be stripped; -INSERT INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); # c1, c2, c3 will be rounded automatically INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); @@ -147,8 +147,8 @@ INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); # Test insert leading zero, +/- signs, overflow handling INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); -INSERT INTO t1 VALUES ("-.1","-.1","-.1",8); -INSERT INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); # Inserting in scientific notations INSERT INTO t1 VALUES('1.0e+4','1.0e-5','1.0e+9',10); @@ -268,7 +268,7 @@ CREATE TABLE t1(c1 DOUBLE(10,5) UNSIGNED NOT NULL, c2 DOUBLE(10,5) SIGNED NULL, INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); # DECIMAL := DECIMAL(10,0); Decimal values in c3 will be stripped; -INSERT INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); # c1, c2, c3 will be rounded automatically INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); @@ -278,8 +278,8 @@ INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); # Test insert leading zero, +/- signs, overflow handling INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); -INSERT INTO t1 VALUES ("-.1","-.1","-.1",8); -INSERT INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); # Inserting in scientific notations INSERT INTO t1 VALUES('1.0e+4','1.0e-5','1.0e+9',10); diff --git a/mysql-test/suite/engines/iuds/t/insert_decimal.test b/mysql-test/suite/engines/iuds/t/insert_decimal.test index 04ea80bc39b..c75fa19506e 100644 --- a/mysql-test/suite/engines/iuds/t/insert_decimal.test +++ b/mysql-test/suite/engines/iuds/t/insert_decimal.test @@ -17,31 +17,32 @@ INSERT INTO t1(c1) VALUES('12345.000009'); # Test insert max values INSERT INTO t1 VALUES('99999.99999','-99999.99999','99999.99999',3); -INSERT INTO t2 VALUES('-9999999999','-9999999999','9999999999',4); +INSERT IGNORE INTO t2 VALUES('-9999999999','-9999999999','9999999999',4); # Test insert outside max value, would be clipped to closest endpoint --sorted_result SELECT * FROM t1; --error ER_DUP_ENTRY +SET STATEMENT sql_mode = '' FOR INSERT INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); DELETE FROM t1 WHERE c1='99999.99999' AND c2='-99999.99999'; --sorted_result SELECT * FROM t1; -INSERT INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); -INSERT INTO t2 VALUES('10000000000','-10000000000','10000000000',6); +INSERT IGNORE INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); +INSERT IGNORE INTO t2 VALUES('10000000000','-10000000000','10000000000',6); # Test insert leading zero, +/- signs, overflow handling insert into t1 values ("0.0","0.0","0.0",7),("01.0","01.0","01.0",10); -insert into t1 values ("-.1","-.1","-.1",13); -insert into t1 values ("+111111111.11","+111111111.11","+111111111.11",19); -insert into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12); -insert into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15); -insert into t2 values ("00000000000001","00000000000001","00000000000001",16),("+0000000000001","+0000000000001","+0000000000001",17),("-0000000000001","-0000000000001","-0000000000001",18); -insert into t2 values ("+111111111.11","+111111111.11","+111111111.11",19),("111111111.11","111111111.11","111111111.11",20),("-11111111.11","-11111111.11","-11111111.11",21); -insert into t2 values ("-111111111.11","-111111111.11","-111111111.11",22),("+1111111111.11","+1111111111.11","+1111111111.11",23),("1111111111.11","1111111111.11","1111111111.11",24); -insert into t2 values ("1e+1000","1e+1000","1e+1000",25),("1e-1000","1e-1000","1e-1000",26),("-1e+1000","-1e+1000","-1e+1000",27); -insert into t2 values ("1e+4294967296","1e+4294967296","1e+4294967296",28),("1e-4294967296","1e-4294967296","1e-4294967296",29); -insert into t2 values ("1e+18446744073709551615","1e+18446744073709551615","1e+18446744073709551615",30),("1e+18446744073709551616","1e+18446744073709551616","1e+18446744073709551616",31),("1e-9223372036854775807","1e-9223372036854775807","1e-9223372036854775807",32),("1e-9223372036854775809","1e-9223372036854775809","1e-9223372036854775809",33); +insert ignore into t1 values ("-.1","-.1","-.1",13); +insert ignore into t1 values ("+111111111.11","+111111111.11","+111111111.11",19); +insert ignore into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12); +insert ignore into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15); +insert ignore into t2 values ("00000000000001","00000000000001","00000000000001",16),("+0000000000001","+0000000000001","+0000000000001",17),("-0000000000001","-0000000000001","-0000000000001",18); +insert ignore into t2 values ("+111111111.11","+111111111.11","+111111111.11",19),("111111111.11","111111111.11","111111111.11",20),("-11111111.11","-11111111.11","-11111111.11",21); +insert ignore into t2 values ("-111111111.11","-111111111.11","-111111111.11",22),("+1111111111.11","+1111111111.11","+1111111111.11",23),("1111111111.11","1111111111.11","1111111111.11",24); +insert ignore into t2 values ("1e+1000","1e+1000","1e+1000",25),("1e-1000","1e-1000","1e-1000",26),("-1e+1000","-1e+1000","-1e+1000",27); +insert ignore into t2 values ("1e+4294967296","1e+4294967296","1e+4294967296",28),("1e-4294967296","1e-4294967296","1e-4294967296",29); +insert ignore into t2 values ("1e+18446744073709551615","1e+18446744073709551615","1e+18446744073709551615",30),("1e+18446744073709551616","1e+18446744073709551616","1e+18446744073709551616",31),("1e-9223372036854775807","1e-9223372036854775807","1e-9223372036854775807",32),("1e-9223372036854775809","1e-9223372036854775809","1e-9223372036854775809",33); # Now Select --sorted_result @@ -289,8 +290,8 @@ SELECT c1,MIN(c2) FROM t1 GROUP BY c1; # Test extremes CREATE TABLE t5(c1 DECIMAL(65,0) UNSIGNED NOT NULL, c2 DECIMAL(65,0) SIGNED NULL, c3 DECIMAL, c4 INT, INDEX idx(c1,c2)); -INSERT INTO t5 VALUES('1e+64','-1e+64','1e+64',1),('1e-64','-1e-64','1e-64',2); -INSERT INTO t5 VALUES('1.2e+65','-1.2e+65','1.2e+65',3),('1.2e-65','-1.2e-65','1.2e-65',4); +INSERT IGNORE INTO t5 VALUES('1e+64','-1e+64','1e+64',1),('1e-64','-1e-64','1e-64',2); +INSERT IGNORE INTO t5 VALUES('1.2e+65','-1.2e+65','1.2e+65',3),('1.2e-65','-1.2e-65','1.2e-65',4); --sorted_result SELECT * FROM t5; DROP TABLE t5; @@ -347,28 +348,29 @@ INSERT INTO t1(c1) VALUES('12345.000009'); # Test insert max values INSERT INTO t1 VALUES('99999.99999','-99999.99999','99999.99999',3); -INSERT INTO t2 VALUES('-9999999999','-9999999999','9999999999',4); +INSERT IGNORE INTO t2 VALUES('-9999999999','-9999999999','9999999999',4); # Test insert outside max value, would be clipped to closest endpoint SELECT * FROM t1; --error ER_DUP_ENTRY +SET STATEMENT sql_mode = '' FOR INSERT INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); DELETE FROM t1 WHERE c1='100000.00000' AND c2='-100000.00000'; -INSERT INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); -INSERT INTO t2 VALUES('10000000000','-10000000000','10000000000',6); +INSERT IGNORE INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); +INSERT IGNORE INTO t2 VALUES('10000000000','-10000000000','10000000000',6); # Test insert leading zero, +/- signs, overflow handling insert into t1 values ("0.0","0.0","0.0",7),("01.0","01.0","01.0",10); -insert into t1 values ("-.1","-.1","-.1",13); -insert into t1 values ("+111111111.11","+111111111.11","+111111111.11",19); -insert into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12); -insert into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15); -insert into t2 values ("00000000000001","00000000000001","00000000000001",16),("+0000000000001","+0000000000001","+0000000000001",17),("-0000000000001","-0000000000001","-0000000000001",18); -insert into t2 values ("+111111111.11","+111111111.11","+111111111.11",19),("111111111.11","111111111.11","111111111.11",20),("-11111111.11","-11111111.11","-11111111.11",21); -insert into t2 values ("-111111111.11","-111111111.11","-111111111.11",22),("+1111111111.11","+1111111111.11","+1111111111.11",23),("1111111111.11","1111111111.11","1111111111.11",24); -insert into t2 values ("1e+1000","1e+1000","1e+1000",25),("1e-1000","1e-1000","1e-1000",26),("-1e+1000","-1e+1000","-1e+1000",27); -insert into t2 values ("1e+4294967296","1e+4294967296","1e+4294967296",28),("1e-4294967296","1e-4294967296","1e-4294967296",29); -insert into t2 values ("1e+18446744073709551615","1e+18446744073709551615","1e+18446744073709551615",30),("1e+18446744073709551616","1e+18446744073709551616","1e+18446744073709551616",31),("1e-9223372036854775807","1e-9223372036854775807","1e-9223372036854775807",32),("1e-9223372036854775809","1e-9223372036854775809","1e-9223372036854775809",33); +insert ignore into t1 values ("-.1","-.1","-.1",13); +insert ignore into t1 values ("+111111111.11","+111111111.11","+111111111.11",19); +insert ignore into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12); +insert ignore into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15); +insert ignore into t2 values ("00000000000001","00000000000001","00000000000001",16),("+0000000000001","+0000000000001","+0000000000001",17),("-0000000000001","-0000000000001","-0000000000001",18); +insert ignore into t2 values ("+111111111.11","+111111111.11","+111111111.11",19),("111111111.11","111111111.11","111111111.11",20),("-11111111.11","-11111111.11","-11111111.11",21); +insert ignore into t2 values ("-111111111.11","-111111111.11","-111111111.11",22),("+1111111111.11","+1111111111.11","+1111111111.11",23),("1111111111.11","1111111111.11","1111111111.11",24); +insert ignore into t2 values ("1e+1000","1e+1000","1e+1000",25),("1e-1000","1e-1000","1e-1000",26),("-1e+1000","-1e+1000","-1e+1000",27); +insert ignore into t2 values ("1e+4294967296","1e+4294967296","1e+4294967296",28),("1e-4294967296","1e-4294967296","1e-4294967296",29); +insert ignore into t2 values ("1e+18446744073709551615","1e+18446744073709551615","1e+18446744073709551615",30),("1e+18446744073709551616","1e+18446744073709551616","1e+18446744073709551616",31),("1e-9223372036854775807","1e-9223372036854775807","1e-9223372036854775807",32),("1e-9223372036854775809","1e-9223372036854775809","1e-9223372036854775809",33); # Now Select --sorted_result @@ -622,6 +624,7 @@ INSERT INTO t5 VALUES('1e+22','-1e+22','1e+22',1),('1e-22','-1e-22','1e-22',2); --sorted_result SELECT * FROM t5; --enable_result_log +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t5 CHANGE c1 c1 FLOAT(24,0) SIGNED NOT NULL, CHANGE c2 c2 FLOAT(24,0) UNSIGNED NULL; INSERT INTO t5 VALUES('-1e+23','1e+23','1e+23',3),('-1e-23','1e-23','1e-23',4); #Output is platform dependent @@ -629,9 +632,10 @@ INSERT INTO t5 VALUES('-1e+23','1e+23','1e+23',3),('-1e-23','1e-23','1e-23',4); --sorted_result SELECT * FROM t5; --enable_result_log +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t5 CHANGE c1 c1 FLOAT(53,0) UNSIGNED, CHANGE c2 c2 FLOAT(53,0) SIGNED; -INSERT INTO t5 VALUES('1e+52','-1e+52','1e+52',5),('1e-52','-1e-52','1e-52',6); -INSERT INTO t5 VALUES('1e+53','-1e+53','1e+53',7),('1e-53','-1e-53','1e-53',8); +INSERT IGNORE INTO t5 VALUES('1e+52','-1e+52','1e+52',5),('1e-52','-1e-52','1e-52',6); +INSERT IGNORE INTO t5 VALUES('1e+53','-1e+53','1e+53',7),('1e-53','-1e-53','1e-53',8); #Output is platform dependent --replace_column 1 # 2 # @@ -665,28 +669,29 @@ INSERT INTO t1(c1) VALUES('12345.000009'); # Test insert max values INSERT INTO t1 VALUES('99999.99999','-99999.99999','99999.99999',3); -INSERT INTO t2 VALUES('-9999999999','-9999999999','9999999999',4); +INSERT IGNORE INTO t2 VALUES('-9999999999','-9999999999','9999999999',4); # Test insert outside max value, would be clipped to closest endpoint SELECT * FROM t1; --error ER_DUP_ENTRY +SET STATEMENT sql_mode = '' FOR INSERT INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); DELETE FROM t1 WHERE c1='99999.99999' AND c2='-99999.99999'; -INSERT INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); -INSERT INTO t2 VALUES('10000000000','-10000000000','10000000000',6); +INSERT IGNORE INTO t1 VALUES('100000.000002','-100000.000002','100000.000002',5); +INSERT IGNORE INTO t2 VALUES('10000000000','-10000000000','10000000000',6); # Test insert leading zero, +/- signs, overflow handling insert into t1 values ("0.0","0.0","0.0",7),("01.0","01.0","01.0",10); -insert into t1 values ("-.1","-.1","-.1",13); -insert into t1 values ("+111111111.11","+111111111.11","+111111111.11",19); -insert into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12); -insert into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15); -insert into t2 values ("00000000000001","00000000000001","00000000000001",16),("+0000000000001","+0000000000001","+0000000000001",17),("-0000000000001","-0000000000001","-0000000000001",18); -insert into t2 values ("+111111111.11","+111111111.11","+111111111.11",19),("111111111.11","111111111.11","111111111.11",20),("-11111111.11","-11111111.11","-11111111.11",21); -insert into t2 values ("-111111111.11","-111111111.11","-111111111.11",22),("+1111111111.11","+1111111111.11","+1111111111.11",23),("1111111111.11","1111111111.11","1111111111.11",24); -insert into t2 values ("1e+1000","1e+1000","1e+1000",25),("1e-1000","1e-1000","1e-1000",26),("-1e+1000","-1e+1000","-1e+1000",27); -insert into t2 values ("1e+4294967296","1e+4294967296","1e+4294967296",28),("1e-4294967296","1e-4294967296","1e-4294967296",29); -insert into t2 values ("1e+18446744073709551615","1e+18446744073709551615","1e+18446744073709551615",30),("1e+18446744073709551616","1e+18446744073709551616","1e+18446744073709551616",31),("1e-9223372036854775807","1e-9223372036854775807","1e-9223372036854775807",32),("1e-9223372036854775809","1e-9223372036854775809","1e-9223372036854775809",33); +insert ignore into t1 values ("-.1","-.1","-.1",13); +insert ignore into t1 values ("+111111111.11","+111111111.11","+111111111.11",19); +insert ignore into t2 values ("0.0","0.0","0.0",7),("-0.0","-0.0","-0.0",8),("+0.0","+0.0","+0.0",9),("01.0","01.0","01.0",10),("+01.0","+01.0","+01.0",11),("-01.0","-01.0","-01.0",12); +insert ignore into t2 values ("-.1","-.1","-.1",13),("+.1","+.1","+.1",14),(".1",".1",".1",15); +insert ignore into t2 values ("00000000000001","00000000000001","00000000000001",16),("+0000000000001","+0000000000001","+0000000000001",17),("-0000000000001","-0000000000001","-0000000000001",18); +insert ignore into t2 values ("+111111111.11","+111111111.11","+111111111.11",19),("111111111.11","111111111.11","111111111.11",20),("-11111111.11","-11111111.11","-11111111.11",21); +insert ignore into t2 values ("-111111111.11","-111111111.11","-111111111.11",22),("+1111111111.11","+1111111111.11","+1111111111.11",23),("1111111111.11","1111111111.11","1111111111.11",24); +insert ignore into t2 values ("1e+1000","1e+1000","1e+1000",25),("1e-1000","1e-1000","1e-1000",26),("-1e+1000","-1e+1000","-1e+1000",27); +insert ignore into t2 values ("1e+4294967296","1e+4294967296","1e+4294967296",28),("1e-4294967296","1e-4294967296","1e-4294967296",29); +insert ignore into t2 values ("1e+18446744073709551615","1e+18446744073709551615","1e+18446744073709551615",30),("1e+18446744073709551616","1e+18446744073709551616","1e+18446744073709551616",31),("1e-9223372036854775807","1e-9223372036854775807","1e-9223372036854775807",32),("1e-9223372036854775809","1e-9223372036854775809","1e-9223372036854775809",33); # Now Select --sorted_result @@ -939,6 +944,7 @@ CREATE TABLE t5(c1 DOUBLE(23,0) UNSIGNED NOT NULL, c2 DOUBLE(23,0) SIGNED NULL, INSERT INTO t5 VALUES('1e+22','-1e+22','1e+22',1),('1e-22','-1e-22','1e-22',2); --sorted_result SELECT * FROM t5; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t5 CHANGE c1 c1 DOUBLE(24,0) SIGNED NOT NULL, CHANGE c2 c2 DOUBLE(24,0) UNSIGNED NULL; INSERT INTO t5 VALUES('-1e+23','1e+23','1e+23',3),('-1e-23','1e-23','1e-23',4); #Output is platform dependent @@ -946,6 +952,7 @@ INSERT INTO t5 VALUES('-1e+23','1e+23','1e+23',3),('-1e-23','1e-23','1e-23',4); --sorted_result SELECT * FROM t5; --enable_result_log +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t5 CHANGE c1 c1 DOUBLE(53,0) UNSIGNED, CHANGE c2 c2 DOUBLE(53,0) SIGNED; INSERT INTO t5 VALUES('1e+52','-1e+52','1e+52',5),('1e-52','-1e-52','1e-52',6); INSERT INTO t5 VALUES('1e+53','-1e+53','1e+53',7),('1e-53','-1e-53','1e-53',8); diff --git a/mysql-test/suite/engines/iuds/t/insert_number.test b/mysql-test/suite/engines/iuds/t/insert_number.test index 2d5332e2d2e..9e4a971d711 100644 --- a/mysql-test/suite/engines/iuds/t/insert_number.test +++ b/mysql-test/suite/engines/iuds/t/insert_number.test @@ -24,14 +24,14 @@ INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106); INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106); # Insert empty string '' -INSERT INTO t1 VALUES('','',17,18,19,20,21); -INSERT INTO t2 VALUES('','',17,18,19,20,21); -INSERT INTO t3 VALUES('','',17,18,19,20,21); +INSERT IGNORE INTO t1 VALUES('','',17,18,19,20,21); +INSERT IGNORE INTO t2 VALUES('','',17,18,19,20,21); +INSERT IGNORE INTO t3 VALUES('','',17,18,19,20,21); # Insert negative value to unsigned integer, positive value to signed integer, zero values -INSERT INTO t1 VALUES(-1,124,22,23,24,25,26); -INSERT INTO t2 VALUES(-1,124,22,23,24,25,26); -INSERT INTO t3 VALUES(-1,124,22,23,24,25,26); +INSERT IGNORE INTO t1 VALUES(-1,124,22,23,24,25,26); +INSERT IGNORE INTO t2 VALUES(-1,124,22,23,24,25,26); +INSERT IGNORE INTO t3 VALUES(-1,124,22,23,24,25,26); INSERT INTO t1 VALUES(0,124,27,28,29,30,31); INSERT INTO t2 VALUES(0,124,27,28,29,30,31); INSERT INTO t3 VALUES(0,124,27,28,29,30,31); @@ -40,9 +40,9 @@ INSERT INTO t2 VALUES(0,0,32,32,34,35,36); INSERT INTO t3 VALUES(0,0,32,32,34,35,36); # Insert non-numeric value to numeric column, would be converted to 0 or numeric value (if contains part) -INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41); -INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41); -INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41); +INSERT IGNORE INTO t1 VALUES('101.34 a','a',37,38,39,40,41); +INSERT IGNORE INTO t2 VALUES('101.34 a','a',37,38,39,40,41); +INSERT IGNORE INTO t3 VALUES('101.34 a','a',37,38,39,40,41); --sorted_result SELECT * FROM t1; @@ -384,29 +384,29 @@ INSERT INTO t4(c1,c3,c4) VALUES(NULL,104,LAST_INSERT_ID()); --if (!$auto_value) { --die "AUTO_INCREMENT didn't work well on NULL" } -INSERT INTO t5(c1,c3,c4) VALUES(NULL,-104,LAST_INSERT_ID()); +INSERT IGNORE INTO t5(c1,c3,c4) VALUES(NULL,-104,LAST_INSERT_ID()); --let $auto_value=`SELECT LAST_INSERT_ID()=110 AND c1=110 FROM t5 WHERE c3=-104;` --if (!$auto_value) { --die "AUTO_INCREMENT didn't work well on NULL" } # Insert empty strings, increments the value -INSERT INTO t4 VALUES('','',17,18,19,20,21,22); +INSERT IGNORE INTO t4 VALUES('','',17,18,19,20,21,22); --let $auto_value=`SELECT LAST_INSERT_ID()=3 AND c1=3 FROM t4 WHERE c2=0 AND c3=17;` --if (!$auto_value) { --die "AUTO_INCREMENT didn't work well on ''" } -INSERT INTO t5 VALUES('','',-17,18,19,20,21,22); +INSERT IGNORE INTO t5 VALUES('','',-17,18,19,20,21,22); --let $auto_value=`SELECT LAST_INSERT_ID()=111 AND c1=111 FROM t5 WHERE c2=0 AND c3=-17;` --if (!$auto_value) { --die "AUTO_INCREMENT didn't work well on ''" } # Insert strings with numeric part, inserts the numeric part of the string -INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41); +INSERT IGNORE INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41); --let $auto_value=`SELECT LAST_INSERT_ID()=111 AND c1=102 FROM t4 WHERE c2=0 AND c3=0;` --if (!$auto_value) { --die "AUTO_INCREMENT didn't work well on invalid strings with numeric part" } -INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41); +INSERT IGNORE INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41); --let $auto_value=`SELECT LAST_INSERT_ID()=111 AND c1=102 FROM t5 WHERE c2=0 AND c3=0;` --if (!$auto_value) { --die "AUTO_INCREMENT didn't work well on invalid strings with numeric part" @@ -417,7 +417,7 @@ INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13); --if (!$auto_value) { --die "AUTO_INCREMENT didn't work on negative value" } -INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12); +INSERT IGNORE INTO t5 VALUES(-1,-1,-1,8,9,10,11,12); --let $auto_value=`SELECT LAST_INSERT_ID()=112 AND c1=112 FROM t5 WHERE c2=-1 AND c3=-1;` --if (!$auto_value) { --die "AUTO_INCREMENT didn't work for negative value on unsigned" @@ -676,12 +676,14 @@ SELECT c2,MIN(c3) FROM t4 GROUP BY c2; # Insert NULL to non-null column --error ER_BAD_NULL_ERROR +SET STATEMENT sql_mode = '' FOR INSERT INTO t2(c1) VALUES(NULL); --error ER_BAD_NULL_ERROR INSERT INTO t3 VALUES(NULL,1,2,3,4,5,6); --error ER_BAD_NULL_ERROR INSERT INTO t4(c3) VALUES(NULL); --error ER_BAD_NULL_ERROR +SET STATEMENT sql_mode = '' FOR INSERT INTO t5(c3) VALUES(NULL); # Insert duplicate value to pk @@ -696,6 +698,7 @@ INSERT INTO t5(c1,c2,c3) VALUES(101,-102,4) /*throws error as the row with c1=10 # Insert duplicate value to unique column, throws error --error ER_DUP_ENTRY +SET STATEMENT sql_mode = '' FOR INSERT INTO t5(c3) VALUES(-103) /*throws error as the row with c3=-103 exists */; --error ER_DUP_ENTRY # Insert duplicate value to clustered unique column, throws error @@ -737,7 +740,7 @@ INSERT INTO t7(c1) SELECT c1 FROM t6; TRUNCATE TABLE t6; # Test 'INSERT INTO SELECT FROM' with AUTO_INCREMENT and inserting 0,NULL -INSERT INTO t6 VALUES(5,-1,1,1,1,1,1),(6,-2,2,2,2,2,2),(0,-4,4,4,4,4,4),(NULL,-5,5,5,5,5,5); +INSERT IGNORE INTO t6 VALUES(5,-1,1,1,1,1,1),(6,-2,2,2,2,2,2),(0,-4,4,4,4,4,4),(NULL,-5,5,5,5,5,5); INSERT INTO t8 SELECT * FROM t6; SELECT LAST_INSERT_ID() AS last_insert_id; --sorted_result @@ -749,7 +752,7 @@ SELECT * FROM t8; DROP TABLE t6,t7,t8; # Test 'INSERT SET' -INSERT INTO t2 SET c3=5,c4=6; +INSERT IGNORE INTO t2 SET c3=5,c4=6; SET SQL_MODE=STRICT_ALL_TABLES; --error ER_NO_DEFAULT_FOR_FIELD INSERT INTO t2 SET c3=5,c4=6; diff --git a/mysql-test/suite/engines/iuds/t/insert_time.test b/mysql-test/suite/engines/iuds/t/insert_time.test index 4579d9a8f45..0e5e21507a9 100644 --- a/mysql-test/suite/engines/iuds/t/insert_time.test +++ b/mysql-test/suite/engines/iuds/t/insert_time.test @@ -43,15 +43,17 @@ INSERT INTO t3 VALUES('8:3:2','8:3:2','2009-01-18'),('1112','1112','2009-01-19') INSERT INTO t4 VALUES('8:3:2','8:3:2','2009-01-18'),('1112','1112','2009-01-19'),(11,11,'2009-01-20'),('00:12:30','00:12:30','2009-01-23'),('9:00:45','9:00:45','2009-01-24'),('9:36:00','9:36:00','2009-01-25'); # Outside range would be clipped to closest end point --error ER_DUP_ENTRY +SET STATEMENT sql_mode = '' FOR INSERT INTO t1 VALUES('-850:00:00','-850:00:00','2009-01-21'); --error ER_DUP_ENTRY +SET STATEMENT sql_mode = '' FOR INSERT INTO t1 VALUES('850:00:00','850:00:00','2009-01-21'); DELETE FROM t1 WHERE c1='-838:59:59' AND c2='-838:59:59'; DELETE FROM t1 WHERE c1='838:59:59' AND c2='838:59:59'; -INSERT INTO t1 VALUES('-850:00:00','-850:00:00','2009-01-21'),('850:00:00','850:00:00','2009-01-21'); +INSERT IGNORE INTO t1 VALUES('-850:00:00','-850:00:00','2009-01-21'),('850:00:00','850:00:00','2009-01-21'); # Insert invalid values -INSERT INTO t4 VALUES('10.22.22','10.22.22','2009-01-26'),(1234567,1234567,'2009-01-27'),(123456789,123456789,'2009-01-28'),(123456789.10,123456789.10,'2009-01-29'),('10 22:22','10 22:22','2009-01-30'),('12.45a','12.45a','2009-01-31'); +INSERT IGNORE INTO t4 VALUES('10.22.22','10.22.22','2009-01-26'),(1234567,1234567,'2009-01-27'),(123456789,123456789,'2009-01-28'),(123456789.10,123456789.10,'2009-01-29'),('10 22:22','10 22:22','2009-01-30'),('12.45a','12.45a','2009-01-31'); # Insert permissible NULLs INSERT INTO t1 VALUES('8:29:45',NULL,'2009-02-01'); @@ -1044,7 +1046,7 @@ SELECT * FROM t3 WHERE c1='32 9:23' AND c2='33 9:23' /* 1 row */; INSERT INTO t1 SET c1='07:23:55',c2='13 06:23:55'; INSERT INTO t2 SET c1='07:23:55',c2='13 06:23:55'; INSERT INTO t3 SET c1='07:23:55'; -INSERT INTO t4 SET c2='07:23:55'; +INSERT IGNORE INTO t4 SET c2='07:23:55'; SELECT * FROM t1 WHERE c1='07:23:55' AND c2='13 06:23:55' /* Returns 1 row with values for other column as NULL */; SELECT * FROM t2 WHERE c1='07:23:55' AND c2='13 06:23:55' /* Returns 1 row with values for other column as NULL */; SELECT * FROM t3 WHERE c1='07:23:55' /* Returns 1 row with values for other column as NULL */; @@ -1055,7 +1057,7 @@ CREATE TABLE t5(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, INDEX idx(c1,c2)); INSERT INTO t5 SELECT * FROM t4; SELECT * FROM t5; TRUNCATE TABLE t5; -INSERT INTO t5 SELECT * FROM t4 WHERE c1 >='12colon34colon56'; +INSERT IGNORE INTO t5 SELECT * FROM t4 WHERE c1 >='12colon34colon56'; SELECT * FROM t5; TRUNCATE TABLE t5; DROP TABLE t5; diff --git a/mysql-test/suite/engines/iuds/t/insert_year.test b/mysql-test/suite/engines/iuds/t/insert_year.test index 392b4544376..4d92e36f068 100644 --- a/mysql-test/suite/engines/iuds/t/insert_year.test +++ b/mysql-test/suite/engines/iuds/t/insert_year.test @@ -31,27 +31,27 @@ INSERT INTO t4 VALUES(1,1,'98-12-9','98.12.9 11:30:45'),(20,20,'98-12-8','98.12. # As the result of a function SET TIMESTAMP=1233216687; # 2009-01-29 13:41:27 -INSERT INTO t1 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); -INSERT INTO t2 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); -INSERT INTO t3 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); -INSERT INTO t4 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t1 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t2 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t3 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t4 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); # Insert other valid year values one digit strings, '0', '000' INSERT INTO t1(c1) VALUES('5'); -INSERT INTO t2(c1) VALUES('5'); +INSERT IGNORE INTO t2(c1) VALUES('5'); INSERT INTO t3(c1) VALUES('5'); INSERT INTO t4(c1,c2) VALUES('0','000'); # Insert invalid year values, outside range, would be converted to zero value -INSERT INTO t2 VALUES(1900,2156,'08-01-06','08/01/07'); -INSERT INTO t3 VALUES('1900','2156','08-01-08','08/1/9'); -INSERT INTO t4 VALUES('1900','2156','08-01-08','08/1/9'),(1900,2156,'08-01-08','08/1/9'),(0,00,'08-01-08','08/1/9'),(000,000,'08-01-08','08/1/9'),('-20','100','08-01-08','08/1/9'),(-20,100,'08-01-08','08/1/9'); +INSERT IGNORE INTO t2 VALUES(1900,2156,'08-01-06','08/01/07'); +INSERT IGNORE INTO t3 VALUES('1900','2156','08-01-08','08/1/9'); +INSERT IGNORE INTO t4 VALUES('1900','2156','08-01-08','08/1/9'),(1900,2156,'08-01-08','08/1/9'),(0,00,'08-01-08','08/1/9'),(000,000,'08-01-08','08/1/9'),('-20','100','08-01-08','08/1/9'),(-20,100,'08-01-08','08/1/9'); # Insert empty string '', would be converted to zero -INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; +INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; # Insert non-date value(absurd values), would be converted to zero -INSERT INTO t4 VALUES('abcd','abcd','08-01-10','08/01/11'),(1234,1234,'08-01-12','08/01/13') /* Inserts zero dates for absurd dates */; +INSERT IGNORE INTO t4 VALUES('abcd','abcd','08-01-10','08/01/11'),(1234,1234,'08-01-12','08/01/13') /* Inserts zero dates for absurd dates */; # Insert duplicates for parts of the clustered key/unique index INSERT INTO t2 VALUES('20','30','98-12-16','98.12.16 11:30:45'),('40','20','98-12-15','98.12.15 11:30:45'); @@ -745,9 +745,9 @@ DROP TABLE t5; # Test 'INSERT SET' INSERT INTO t1 SET c1='00'; -INSERT INTO t2 SET c1=69; +INSERT IGNORE INTO t2 SET c1=69; INSERT INTO t3 SET c1=70; -INSERT INTO t4 SET c2=99; +INSERT IGNORE INTO t4 SET c2=99; --sorted_result SELECT * FROM t1 WHERE c1=0; --sorted_result @@ -787,27 +787,27 @@ INSERT INTO t4 VALUES(1,1,'98-12-9','98.12.9 11:30:45'),(20,20,'98-12-8','98.12. # As the result of a function SET TIMESTAMP=1233216687; # 2009-01-29 13:41:27 -INSERT INTO t1 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); -INSERT INTO t2 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); -INSERT INTO t3 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); -INSERT INTO t4 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t1 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t2 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t3 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); +INSERT IGNORE INTO t4 VALUES(NOW(),CURRENT_DATE,NOW(),CURRENT_DATE); # Insert other valid year values one digit strings, '0', '000' INSERT INTO t1(c1) VALUES('5'); -INSERT INTO t2(c1) VALUES('5'); +INSERT IGNORE INTO t2(c1) VALUES('5'); INSERT INTO t3(c1) VALUES('5'); INSERT INTO t4(c1,c2) VALUES('0','000'); # Insert invalid year values, outside range, would be converted to zero value -INSERT INTO t2 VALUES(1900,2156,'08-01-06','08/01/07'); -INSERT INTO t3 VALUES('1900','2156','08-01-08','08/1/9'); -INSERT INTO t4 VALUES('1900','2156','08-01-08','08/1/9'),(1900,2156,'08-01-08','08/1/9'),(0,00,'08-01-08','08/1/9'),(000,000,'08-01-08','08/1/9'),('-20','100','08-01-08','08/1/9'),(-20,100,'08-01-08','08/1/9'); +INSERT IGNORE INTO t2 VALUES(1900,2156,'08-01-06','08/01/07'); +INSERT IGNORE INTO t3 VALUES('1900','2156','08-01-08','08/1/9'); +INSERT IGNORE INTO t4 VALUES('1900','2156','08-01-08','08/1/9'),(1900,2156,'08-01-08','08/1/9'),(0,00,'08-01-08','08/1/9'),(000,000,'08-01-08','08/1/9'),('-20','100','08-01-08','08/1/9'),(-20,100,'08-01-08','08/1/9'); # Insert empty string '', would be converted to zero -INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; +INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; # Insert non-date value(absurd values), would be converted to zero -INSERT INTO t4 VALUES('abcd','abcd','08-01-10','08/01/11'),(1234,1234,'08-01-12','08/01/13') /* Inserts zero dates for absurd dates */; +INSERT IGNORE INTO t4 VALUES('abcd','abcd','08-01-10','08/01/11'),(1234,1234,'08-01-12','08/01/13') /* Inserts zero dates for absurd dates */; # Insert duplicates for parts of the clustered key/unique index INSERT INTO t2 VALUES('20','30','98-12-16','98.12.16 11:30:45'),('40','20','98-12-15','98.12.15 11:30:45'); @@ -1491,9 +1491,9 @@ DROP TABLE t5; # Test 'INSERT SET' INSERT INTO t1 SET c1='00'; -INSERT INTO t2 SET c1=69; +INSERT IGNORE INTO t2 SET c1=69; INSERT INTO t3 SET c1=70; -INSERT INTO t4 SET c2=99; +INSERT IGNORE INTO t4 SET c2=99; --sorted_result SELECT * FROM t1 WHERE c1=0; --sorted_result diff --git a/mysql-test/suite/engines/iuds/t/strings_update_delete.test b/mysql-test/suite/engines/iuds/t/strings_update_delete.test index 2099869e801..736439ca4b7 100644 --- a/mysql-test/suite/engines/iuds/t/strings_update_delete.test +++ b/mysql-test/suite/engines/iuds/t/strings_update_delete.test @@ -79,7 +79,7 @@ DROP TABLE t3,t4,t5; CREATE TABLE t6 (a char(2) not null primary key, b varchar(20) not null, key (b)); CREATE TABLE t7 (a char(2) not null primary key, b varchar(20) not null, key (b)); INSERT INTO t6 values ('AB','MySQLAB'),('JA','Sun Microsystems'),('MS','Microsoft'),('IB','IBM- Inc.'),('GO','Google Inc.'); -INSERT INTO t7 values ('AB','Sweden'),('JA','USA'),('MS','United States of Amercica'),('IB','North America'),('GO','South America'); +INSERT IGNORE INTO t7 values ('AB','Sweden'),('JA','USA'),('MS','United States of Amercica'),('IB','North America'),('GO','South America'); update t6,t7 set t6.a=LCASE(t6.a); --sorted_result select * from t6; @@ -117,22 +117,23 @@ CREATE TABLE t16 (c1 SET('a', 'b', 'c', 'd', 'e')); eval INSERT INTO t16 VALUES (('d,a,d,d')); --sorted_result SELECT c1 FROM t16; -eval INSERT INTO t16 (c1) VALUES ('a,b,d'),('d,A ,b'); +eval INSERT IGNORE INTO t16 (c1) VALUES ('a,b,d'),('d,A ,b'); --sorted_result SELECT c1 FROM t16; #--warning WARN_DATA_TRUNCATED -eval INSERT INTO t16 (c1) VALUES ('f,a,b'); +eval INSERT IGNORE INTO t16 (c1) VALUES ('f,a,b'); SHOW WARNINGS; --sorted_result SELECT c1 FROM t16; #--warning ER_DUPLICATED_VALUE_IN_TYPE +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t17 (c1 SET('a','b','a','b')); SHOW WARNINGS; # Tests for ENUM datatype # Invalid ENUM value insert behavior CREATE TABLE t18 (c1 CHAR(4),c2 enum('SMALL','MEDIUM','LARGE','VERY LARGE')); eval INSERT INTO t18 VALUES('SIZE', 'SMALL'); -eval INSERT INTO t18 VALUES('SIZE', 'SMALL1'); +eval INSERT IGNORE INTO t18 VALUES('SIZE', 'SMALL1'); --sorted_result SELECT * FROM t18 WHERE c2=0; EXPLAIN SELECT * FROM t18 WHERE c2=0; diff --git a/mysql-test/suite/engines/iuds/t/type_bit_iuds.test b/mysql-test/suite/engines/iuds/t/type_bit_iuds.test index 88418decfad..8f48d50fad0 100644 --- a/mysql-test/suite/engines/iuds/t/type_bit_iuds.test +++ b/mysql-test/suite/engines/iuds/t/type_bit_iuds.test @@ -72,7 +72,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(0) NOT NULL PRIMARY KEY, c2 BIT(0)); CREATE TABLE t6(c1 BIT(0), c2 BIT(0)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -147,7 +147,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -157,7 +157,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -177,7 +177,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -205,7 +205,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -220,14 +220,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -235,7 +235,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -263,7 +263,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -312,14 +312,14 @@ let $STR2= query_get_value(select @v3 as I,I,1); eval INSERT INTO t1 VALUES (b'$STR2'); set @v3=repeat('10',@v2); let $STR3= query_get_value(select @v3 as I,I,1); -eval INSERT INTO t1 VALUES (b'$STR3'); +eval INSERT IGNORE INTO t1 VALUES (b'$STR3'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'0'); @@ -358,7 +358,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(1) NOT NULL PRIMARY KEY, c2 BIT(1)); CREATE TABLE t6(c1 BIT(1), c2 BIT(1)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -433,7 +433,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -443,7 +443,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -463,7 +463,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -491,7 +491,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -506,14 +506,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -521,7 +521,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -549,7 +549,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -605,7 +605,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'0'); @@ -644,7 +644,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(2) NOT NULL PRIMARY KEY, c2 BIT(2)); CREATE TABLE t6(c1 BIT(2), c2 BIT(2)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -719,7 +719,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -729,7 +729,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -749,7 +749,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -777,7 +777,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -792,14 +792,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -807,7 +807,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -835,7 +835,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -891,7 +891,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'0'); @@ -930,7 +930,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(4) NOT NULL PRIMARY KEY, c2 BIT(4)); CREATE TABLE t6(c1 BIT(4), c2 BIT(4)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -1005,7 +1005,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -1015,7 +1015,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -1067,7 +1067,7 @@ INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10, # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -1078,14 +1078,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -1093,7 +1093,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -1177,7 +1177,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'0'); @@ -1216,7 +1216,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(8) NOT NULL PRIMARY KEY, c2 BIT(8)); CREATE TABLE t6(c1 BIT(8), c2 BIT(8)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -1297,13 +1297,13 @@ SELECT * FROM t7; ############# UPDATE ########### # Update order by limit -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; # Update with NULL ( NULL to number & number to NULL) @@ -1323,7 +1323,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -1339,7 +1339,7 @@ SET SQL_MODE=DEFAULT; #Multi table update --disable_warnings -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -1379,7 +1379,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -1463,7 +1463,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'0'); @@ -1609,7 +1609,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -1749,7 +1749,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'0'); @@ -1895,7 +1895,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -2035,7 +2035,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'0'); @@ -2360,7 +2360,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(0) NOT NULL PRIMARY KEY, c2 BIT(0)); CREATE TABLE t6(c1 BIT(0), c2 BIT(0)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -2435,7 +2435,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -2445,7 +2445,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -2465,7 +2465,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -2493,7 +2493,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -2508,14 +2508,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -2523,7 +2523,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -2551,7 +2551,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -2600,14 +2600,14 @@ let $STR2= query_get_value(select @v3 as I,I,1); eval INSERT INTO t1 VALUES (b'$STR2'); set @v3=repeat('10',@v2); let $STR3= query_get_value(select @v3 as I,I,1); -eval INSERT INTO t1 VALUES (b'$STR3'); +eval INSERT IGNORE INTO t1 VALUES (b'$STR3'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1'); @@ -2646,7 +2646,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(1) NOT NULL PRIMARY KEY, c2 BIT(1)); CREATE TABLE t6(c1 BIT(1), c2 BIT(1)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -2721,7 +2721,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -2731,7 +2731,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -2751,7 +2751,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -2779,7 +2779,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -2794,14 +2794,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -2809,7 +2809,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -2837,7 +2837,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -2893,7 +2893,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1'); @@ -2932,7 +2932,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(2) NOT NULL PRIMARY KEY, c2 BIT(2)); CREATE TABLE t6(c1 BIT(2), c2 BIT(2)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -3007,7 +3007,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -3017,7 +3017,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -3037,7 +3037,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -3065,7 +3065,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -3080,14 +3080,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -3095,7 +3095,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -3123,7 +3123,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -3179,7 +3179,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1'); @@ -3218,7 +3218,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(4) NOT NULL PRIMARY KEY, c2 BIT(4)); CREATE TABLE t6(c1 BIT(4), c2 BIT(4)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -3293,7 +3293,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -3303,7 +3303,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -3355,7 +3355,7 @@ INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10, # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -3366,14 +3366,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -3381,7 +3381,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -3465,7 +3465,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1'); @@ -3504,7 +3504,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(8) NOT NULL PRIMARY KEY, c2 BIT(8)); CREATE TABLE t6(c1 BIT(8), c2 BIT(8)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -3585,13 +3585,13 @@ SELECT * FROM t7; ############# UPDATE ########### # Update order by limit -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; # Update with NULL ( NULL to number & number to NULL) @@ -3611,7 +3611,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -3627,7 +3627,7 @@ SET SQL_MODE=DEFAULT; #Multi table update --disable_warnings -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -3667,7 +3667,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -3751,7 +3751,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1'); @@ -3897,7 +3897,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -4037,7 +4037,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1'); @@ -4183,7 +4183,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -4323,7 +4323,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1'); @@ -4612,8 +4612,8 @@ let $STR3= query_get_value(select @v5 as I,I,1); eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'10'); -INSERT INTO t2 VALUES (b'10', b'10', b'10'); +INSERT IGNORE INTO t1 VALUES (b'10'); +INSERT IGNORE INTO t2 VALUES (b'10', b'10', b'10'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -4648,7 +4648,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(0) NOT NULL PRIMARY KEY, c2 BIT(0)); CREATE TABLE t6(c1 BIT(0), c2 BIT(0)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -4723,7 +4723,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -4733,7 +4733,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -4753,7 +4753,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -4781,7 +4781,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -4796,14 +4796,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -4811,7 +4811,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -4839,7 +4839,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -4888,18 +4888,18 @@ let $STR2= query_get_value(select @v3 as I,I,1); eval INSERT INTO t1 VALUES (b'$STR2'); set @v3=repeat('10',@v2); let $STR3= query_get_value(select @v3 as I,I,1); -eval INSERT INTO t1 VALUES (b'$STR3'); +eval INSERT IGNORE INTO t1 VALUES (b'$STR3'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'10'); -INSERT INTO t2 VALUES (b'10', b'10', b'10'); +INSERT IGNORE INTO t1 VALUES (b'10'); +INSERT IGNORE INTO t2 VALUES (b'10', b'10', b'10'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -4934,7 +4934,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(1) NOT NULL PRIMARY KEY, c2 BIT(1)); CREATE TABLE t6(c1 BIT(1), c2 BIT(1)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -5009,7 +5009,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -5019,7 +5019,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -5039,7 +5039,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -5067,7 +5067,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -5082,14 +5082,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -5097,7 +5097,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -5125,7 +5125,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -5181,7 +5181,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'10'); @@ -5220,7 +5220,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(2) NOT NULL PRIMARY KEY, c2 BIT(2)); CREATE TABLE t6(c1 BIT(2), c2 BIT(2)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -5295,7 +5295,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -5305,7 +5305,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -5325,7 +5325,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -5353,7 +5353,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -5368,14 +5368,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -5383,7 +5383,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -5411,7 +5411,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -5467,7 +5467,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'10'); @@ -5506,7 +5506,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(4) NOT NULL PRIMARY KEY, c2 BIT(4)); CREATE TABLE t6(c1 BIT(4), c2 BIT(4)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -5581,7 +5581,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -5591,7 +5591,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -5643,7 +5643,7 @@ INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10, # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -5654,14 +5654,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -5669,7 +5669,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -5753,7 +5753,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'10'); @@ -5792,7 +5792,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(8) NOT NULL PRIMARY KEY, c2 BIT(8)); CREATE TABLE t6(c1 BIT(8), c2 BIT(8)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -5873,13 +5873,13 @@ SELECT * FROM t7; ############# UPDATE ########### # Update order by limit -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; # Update with NULL ( NULL to number & number to NULL) @@ -5899,7 +5899,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -5915,7 +5915,7 @@ SET SQL_MODE=DEFAULT; #Multi table update --disable_warnings -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -5955,7 +5955,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -6039,7 +6039,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'10'); @@ -6185,7 +6185,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -6325,7 +6325,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'10'); @@ -6471,7 +6471,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -6611,7 +6611,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'10'); @@ -6900,8 +6900,8 @@ let $STR3= query_get_value(select @v5 as I,I,1); eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010'); -INSERT INTO t2 VALUES (b'1010', b'1010', b'1010'); +INSERT IGNORE INTO t1 VALUES (b'1010'); +INSERT IGNORE INTO t2 VALUES (b'1010', b'1010', b'1010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -6936,7 +6936,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(0) NOT NULL PRIMARY KEY, c2 BIT(0)); CREATE TABLE t6(c1 BIT(0), c2 BIT(0)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -7011,7 +7011,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -7021,7 +7021,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -7041,7 +7041,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -7069,7 +7069,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -7084,14 +7084,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -7099,7 +7099,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -7127,7 +7127,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -7176,18 +7176,18 @@ let $STR2= query_get_value(select @v3 as I,I,1); eval INSERT INTO t1 VALUES (b'$STR2'); set @v3=repeat('10',@v2); let $STR3= query_get_value(select @v3 as I,I,1); -eval INSERT INTO t1 VALUES (b'$STR3'); +eval INSERT IGNORE INTO t1 VALUES (b'$STR3'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010'); -INSERT INTO t2 VALUES (b'1010', b'1010', b'1010'); +INSERT IGNORE INTO t1 VALUES (b'1010'); +INSERT IGNORE INTO t2 VALUES (b'1010', b'1010', b'1010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -7222,7 +7222,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(1) NOT NULL PRIMARY KEY, c2 BIT(1)); CREATE TABLE t6(c1 BIT(1), c2 BIT(1)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -7297,7 +7297,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -7307,7 +7307,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -7327,7 +7327,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -7355,7 +7355,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -7370,14 +7370,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -7385,7 +7385,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -7413,7 +7413,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -7469,11 +7469,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010'); -INSERT INTO t2 VALUES (b'1010', b'1010', b'1010'); +INSERT IGNORE INTO t1 VALUES (b'1010'); +INSERT IGNORE INTO t2 VALUES (b'1010', b'1010', b'1010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -7508,7 +7508,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(2) NOT NULL PRIMARY KEY, c2 BIT(2)); CREATE TABLE t6(c1 BIT(2), c2 BIT(2)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -7583,7 +7583,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -7593,7 +7593,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -7613,7 +7613,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -7641,7 +7641,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -7656,14 +7656,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -7671,7 +7671,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -7699,7 +7699,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -7755,7 +7755,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1010'); @@ -7794,7 +7794,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(4) NOT NULL PRIMARY KEY, c2 BIT(4)); CREATE TABLE t6(c1 BIT(4), c2 BIT(4)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -7869,7 +7869,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -7879,7 +7879,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -7931,7 +7931,7 @@ INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10, # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -7942,14 +7942,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -7957,7 +7957,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -8041,7 +8041,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1010'); @@ -8080,7 +8080,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(8) NOT NULL PRIMARY KEY, c2 BIT(8)); CREATE TABLE t6(c1 BIT(8), c2 BIT(8)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -8161,13 +8161,13 @@ SELECT * FROM t7; ############# UPDATE ########### # Update order by limit -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; # Update with NULL ( NULL to number & number to NULL) @@ -8187,7 +8187,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -8203,7 +8203,7 @@ SET SQL_MODE=DEFAULT; #Multi table update --disable_warnings -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -8243,7 +8243,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -8327,7 +8327,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1010'); @@ -8473,7 +8473,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -8613,7 +8613,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1010'); @@ -8759,7 +8759,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -8899,7 +8899,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1010'); @@ -9188,8 +9188,8 @@ let $STR3= query_get_value(select @v5 as I,I,1); eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010101010101010'); -INSERT INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -9224,7 +9224,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(0) NOT NULL PRIMARY KEY, c2 BIT(0)); CREATE TABLE t6(c1 BIT(0), c2 BIT(0)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -9299,7 +9299,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -9309,7 +9309,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -9329,7 +9329,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -9357,7 +9357,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -9372,14 +9372,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -9387,7 +9387,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -9415,7 +9415,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -9464,18 +9464,18 @@ let $STR2= query_get_value(select @v3 as I,I,1); eval INSERT INTO t1 VALUES (b'$STR2'); set @v3=repeat('10',@v2); let $STR3= query_get_value(select @v3 as I,I,1); -eval INSERT INTO t1 VALUES (b'$STR3'); +eval INSERT IGNORE INTO t1 VALUES (b'$STR3'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010101010101010'); -INSERT INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -9510,7 +9510,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(1) NOT NULL PRIMARY KEY, c2 BIT(1)); CREATE TABLE t6(c1 BIT(1), c2 BIT(1)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -9585,7 +9585,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -9595,7 +9595,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -9615,7 +9615,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -9643,7 +9643,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -9658,14 +9658,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -9673,7 +9673,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -9701,7 +9701,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -9757,11 +9757,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010101010101010'); -INSERT INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -9796,7 +9796,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(2) NOT NULL PRIMARY KEY, c2 BIT(2)); CREATE TABLE t6(c1 BIT(2), c2 BIT(2)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -9871,7 +9871,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -9881,7 +9881,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -9901,7 +9901,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -9929,7 +9929,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -9944,14 +9944,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -9959,7 +9959,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -9987,7 +9987,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -10043,11 +10043,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010101010101010'); -INSERT INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -10082,7 +10082,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(4) NOT NULL PRIMARY KEY, c2 BIT(4)); CREATE TABLE t6(c1 BIT(4), c2 BIT(4)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -10157,7 +10157,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -10167,7 +10167,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -10219,7 +10219,7 @@ INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10, # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -10230,14 +10230,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -10245,7 +10245,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -10329,11 +10329,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010101010101010'); -INSERT INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010', b'1010101010101010', b'1010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -10368,7 +10368,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(8) NOT NULL PRIMARY KEY, c2 BIT(8)); CREATE TABLE t6(c1 BIT(8), c2 BIT(8)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -10449,13 +10449,13 @@ SELECT * FROM t7; ############# UPDATE ########### # Update order by limit -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; # Update with NULL ( NULL to number & number to NULL) @@ -10475,7 +10475,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -10491,7 +10491,7 @@ SET SQL_MODE=DEFAULT; #Multi table update --disable_warnings -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -10531,7 +10531,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -10615,7 +10615,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1010101010101010'); @@ -10761,7 +10761,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -10901,7 +10901,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1010101010101010'); @@ -11047,7 +11047,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -11187,7 +11187,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1010101010101010'); @@ -11476,8 +11476,8 @@ let $STR3= query_get_value(select @v5 as I,I,1); eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -11512,7 +11512,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(0) NOT NULL PRIMARY KEY, c2 BIT(0)); CREATE TABLE t6(c1 BIT(0), c2 BIT(0)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -11587,7 +11587,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -11597,7 +11597,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -11617,7 +11617,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -11645,7 +11645,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -11660,14 +11660,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -11675,7 +11675,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -11703,7 +11703,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -11752,18 +11752,18 @@ let $STR2= query_get_value(select @v3 as I,I,1); eval INSERT INTO t1 VALUES (b'$STR2'); set @v3=repeat('10',@v2); let $STR3= query_get_value(select @v3 as I,I,1); -eval INSERT INTO t1 VALUES (b'$STR3'); +eval INSERT IGNORE INTO t1 VALUES (b'$STR3'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -11798,7 +11798,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(1) NOT NULL PRIMARY KEY, c2 BIT(1)); CREATE TABLE t6(c1 BIT(1), c2 BIT(1)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -11873,7 +11873,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -11883,7 +11883,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -11903,7 +11903,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -11931,7 +11931,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -11946,14 +11946,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -11961,7 +11961,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -11989,7 +11989,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -12045,11 +12045,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -12084,7 +12084,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(2) NOT NULL PRIMARY KEY, c2 BIT(2)); CREATE TABLE t6(c1 BIT(2), c2 BIT(2)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -12159,7 +12159,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -12169,7 +12169,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -12189,7 +12189,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -12217,7 +12217,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -12232,14 +12232,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -12247,7 +12247,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -12275,7 +12275,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -12331,11 +12331,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -12370,7 +12370,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(4) NOT NULL PRIMARY KEY, c2 BIT(4)); CREATE TABLE t6(c1 BIT(4), c2 BIT(4)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -12445,7 +12445,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -12455,7 +12455,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -12507,7 +12507,7 @@ INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10, # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -12518,14 +12518,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -12533,7 +12533,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -12617,11 +12617,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -12656,7 +12656,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(8) NOT NULL PRIMARY KEY, c2 BIT(8)); CREATE TABLE t6(c1 BIT(8), c2 BIT(8)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -12737,13 +12737,13 @@ SELECT * FROM t7; ############# UPDATE ########### # Update order by limit -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; # Update with NULL ( NULL to number & number to NULL) @@ -12763,7 +12763,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -12779,7 +12779,7 @@ SET SQL_MODE=DEFAULT; #Multi table update --disable_warnings -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -12819,7 +12819,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -12903,11 +12903,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'101010101010101010101010101010', b'101010101010101010101010101010', b'101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -13049,7 +13049,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -13189,7 +13189,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'101010101010101010101010101010'); @@ -13335,7 +13335,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -13475,7 +13475,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'101010101010101010101010101010'); @@ -13765,8 +13765,8 @@ let $STR3= query_get_value(select @v5 as I,I,1); eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -13801,7 +13801,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(0) NOT NULL PRIMARY KEY, c2 BIT(0)); CREATE TABLE t6(c1 BIT(0), c2 BIT(0)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -13876,7 +13876,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -13886,7 +13886,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -13906,7 +13906,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -13934,7 +13934,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -13949,14 +13949,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -13964,7 +13964,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -13992,7 +13992,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -14042,18 +14042,18 @@ let $STR2= query_get_value(select @v3 as I,I,1); eval INSERT INTO t1 VALUES (b'$STR2'); set @v3=repeat('10',@v2); let $STR3= query_get_value(select @v3 as I,I,1); -eval INSERT INTO t1 VALUES (b'$STR3'); +eval INSERT IGNORE INTO t1 VALUES (b'$STR3'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -14088,7 +14088,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(1) NOT NULL PRIMARY KEY, c2 BIT(1)); CREATE TABLE t6(c1 BIT(1), c2 BIT(1)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -14163,7 +14163,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -14173,7 +14173,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -14193,7 +14193,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -14221,7 +14221,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -14236,14 +14236,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -14251,7 +14251,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -14279,7 +14279,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -14336,11 +14336,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -14375,7 +14375,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(2) NOT NULL PRIMARY KEY, c2 BIT(2)); CREATE TABLE t6(c1 BIT(2), c2 BIT(2)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -14450,7 +14450,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -14460,7 +14460,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -14480,7 +14480,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -14508,7 +14508,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -14523,14 +14523,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -14538,7 +14538,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -14566,7 +14566,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -14623,11 +14623,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -14662,7 +14662,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(4) NOT NULL PRIMARY KEY, c2 BIT(4)); CREATE TABLE t6(c1 BIT(4), c2 BIT(4)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -14737,7 +14737,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -14747,7 +14747,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -14799,7 +14799,7 @@ INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10, # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -14810,14 +14810,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -14825,7 +14825,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -14910,11 +14910,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -14949,7 +14949,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(8) NOT NULL PRIMARY KEY, c2 BIT(8)); CREATE TABLE t6(c1 BIT(8), c2 BIT(8)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -15030,13 +15030,13 @@ SELECT * FROM t7; ############# UPDATE ########### # Update order by limit -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; # Update with NULL ( NULL to number & number to NULL) @@ -15056,7 +15056,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -15072,7 +15072,7 @@ SET SQL_MODE=DEFAULT; #Multi table update --disable_warnings -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -15112,7 +15112,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -15197,11 +15197,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -15343,7 +15343,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -15484,11 +15484,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); -INSERT INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); +INSERT IGNORE INTO t2 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010', b'1010101010101010101010101010101010101010101010101010101010101010'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -15630,7 +15630,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -15771,7 +15771,7 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); @@ -16061,8 +16061,8 @@ let $STR3= query_get_value(select @v5 as I,I,1); eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -16097,7 +16097,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(0) NOT NULL PRIMARY KEY, c2 BIT(0)); CREATE TABLE t6(c1 BIT(0), c2 BIT(0)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -16172,7 +16172,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(0)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -16182,7 +16182,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -16202,7 +16202,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -16230,7 +16230,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -16245,14 +16245,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -16260,7 +16260,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -16288,7 +16288,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -16338,18 +16338,18 @@ let $STR2= query_get_value(select @v3 as I,I,1); eval INSERT INTO t1 VALUES (b'$STR2'); set @v3=repeat('10',@v2); let $STR3= query_get_value(select @v3 as I,I,1); -eval INSERT INTO t1 VALUES (b'$STR3'); +eval INSERT IGNORE INTO t1 VALUES (b'$STR3'); set @v3=repeat('1',@v1); set @v4=repeat('01',@v2); set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -16384,7 +16384,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(1) NOT NULL PRIMARY KEY, c2 BIT(1)); CREATE TABLE t6(c1 BIT(1), c2 BIT(1)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -16459,7 +16459,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(1)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -16469,7 +16469,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -16489,7 +16489,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -16517,7 +16517,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -16532,14 +16532,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -16547,7 +16547,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -16575,7 +16575,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -16632,11 +16632,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -16671,7 +16671,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(2) NOT NULL PRIMARY KEY, c2 BIT(2)); CREATE TABLE t6(c1 BIT(2), c2 BIT(2)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -16746,7 +16746,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(2)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -16756,7 +16756,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -16776,7 +16776,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints -UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; +UPDATE IGNORE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; UPDATE t6 SET c2=-1 WHERE c1=94; @@ -16804,7 +16804,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -16819,14 +16819,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -16834,7 +16834,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -16862,7 +16862,7 @@ SELECT hex(c1),hex(c2) FROM t5; TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); -INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +INSERT IGNORE INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; @@ -16919,11 +16919,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -16958,7 +16958,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(4) NOT NULL PRIMARY KEY, c2 BIT(4)); CREATE TABLE t6(c1 BIT(4), c2 BIT(4)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -17033,7 +17033,7 @@ SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC ; SELECT hex(c1),hex(c2) FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2 ; #Inserting different charachers CREATE TABLE t7(c1 BIT(4)); -INSERT INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); +INSERT IGNORE INTO t7 VALUES('a'),('A'),('z'),('Z'),('!'),('`'),('@'),('#'),('~'),('$'),('%'),('^'),('&'),('*'),('('),(')'),('-'),('_'),('+'),('='),('1'),('9'); --sorted_result SELECT * FROM t7; ############# UPDATE ########### @@ -17043,7 +17043,7 @@ UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations -UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; +UPDATE IGNORE t6 SET c1=c2+c1 WHERE c2 < 100; UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -17095,7 +17095,7 @@ INSERT INTO t6 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10, # Update using Const # EXPLAIN SELECT * FROM t5 WHERE c1=6 AND c2=6; -UPDATE t5 SET c2='a' WHERE c1=6 AND c2=6; +UPDATE IGNORE t5 SET c2='a' WHERE c1=6 AND c2=6; --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -17106,14 +17106,14 @@ UPDATE t5 SET c2=13 where c1 BETWEEN 5 AND 9; SELECT hex(c1),hex(c2) FROM t5; # EXPLAIN SELECT * FROM t5 WHERE c1 IN (b'001',b'101',b'111'); --disable_warnings -UPDATE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); +UPDATE IGNORE t5 SET c2=c2+10 WHERE c1 IN (b'001',b'101',b'111'); --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; # Update using eq_ref # EXPLAIN SELECT * FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; -UPDATE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t6.c2 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; ############# DELETE ########### @@ -17121,7 +17121,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -17206,11 +17206,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -17245,7 +17245,7 @@ ALTER TABLE t4 ADD PRIMARY KEY (i); CREATE TABLE t5(c1 BIT(8) NOT NULL PRIMARY KEY, c2 BIT(8)); CREATE TABLE t6(c1 BIT(8), c2 BIT(8)); INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); --sorted_result SELECT HEX(c1),HEX(c2) FROM t5; @@ -17326,13 +17326,13 @@ SELECT * FROM t7; ############# UPDATE ########### # Update order by limit -UPDATE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; +UPDATE IGNORE t6 SET c1='10' WHERE c2 > 100 ORDER BY c2 LIMIT 1; # Update with arithmetic operations UPDATE t6 SET c1=c2+c1 WHERE c2 < 100; -UPDATE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; +UPDATE IGNORE t6 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; # Update with NULL ( NULL to number & number to NULL) @@ -17352,7 +17352,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -17368,7 +17368,7 @@ SET SQL_MODE=DEFAULT; #Multi table update --disable_warnings -UPDATE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; +UPDATE IGNORE t5,t6 SET t5.c2=t6.c1+t5.c1, t6.c2=t5.c1+t6.c1 WHERE t5.c1 > 100 OR t6.c2 > 100; --enable_warnings --sorted_result SELECT hex(c1),hex(c2) FROM t5; @@ -17408,7 +17408,7 @@ TRUNCATE t5; TRUNCATE t6; INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135); -INSERT INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); +INSERT IGNORE INTO t6 VALUES (94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135),(null,23),(1,null),(null,null); # Delete by order by limit DELETE FROM t6 WHERE c2 > 100 ORDER BY c2 LIMIT 1; @@ -17493,11 +17493,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -17639,7 +17639,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -17780,11 +17780,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result @@ -17926,7 +17926,7 @@ UPDATE t6 SET c2=123 WHERE c1 IN (30,b'101',88); # Update outside range would be clipped to closest endpoints UPDATE t6 SET c1=b'1111111111111111111111111111111111111111111111111111111111111111111' WHERE c2 < 10; -UPDATE t6 SET c2=-1 WHERE c1=94; +UPDATE IGNORE t6 SET c2=-1 WHERE c1=94; # Update ignore on bad null error @@ -18067,11 +18067,11 @@ set @v5=repeat('10',@v2); let $STR0= query_get_value(select @v3 as I,I,1); let $STR2= query_get_value(select @v4 as I,I,1); let $STR3= query_get_value(select @v5 as I,I,1); -eval INSERT INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); +eval INSERT IGNORE INTO t2 VALUES ("b'$STR0'","b'$STR2","b'$STR3'"); dec $i; } -INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); -INSERT INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); +INSERT IGNORE INTO t2 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101', b'10101010101010101010101010101010101010101010101010101010101010101'); --sorted_result SELECT HEX(c1) FROM t1; --sorted_result diff --git a/mysql-test/suite/engines/iuds/t/update_decimal.test b/mysql-test/suite/engines/iuds/t/update_decimal.test index aa96665e82d..bf302e6a1e6 100644 --- a/mysql-test/suite/engines/iuds/t/update_decimal.test +++ b/mysql-test/suite/engines/iuds/t/update_decimal.test @@ -13,7 +13,7 @@ CREATE TABLE t1(c1 DECIMAL(10,5) UNSIGNED NOT NULL, c2 DECIMAL(10,5) SIGNED NULL INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); # DECIMAL := DECIMAL(10,0); Decimal values in c3 will be stripped; -INSERT INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); # c1, c2, c3 will be rounded automatically INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); @@ -23,8 +23,8 @@ INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); # Test insert leading zero, +/- signs, overflow handling INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); -INSERT INTO t1 VALUES ("-.1","-.1","-.1",8); -INSERT INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); # Inserting in scientific notations INSERT INTO t1 VALUES('1.0e+4','1.0e-5','1.0e+9',10); @@ -41,7 +41,7 @@ UPDATE t1 SET c1='10001.00001' WHERE c2 > 100 ORDER BY c2 LIMIT 1; SELECT c1,c2 FROM t1; # Update with arithmetic operations -UPDATE t1 SET c1=c2+c3 WHERE c3 < 10000; +UPDATE IGNORE t1 SET c1=c2+c3 WHERE c3 < 10000; --sorted_result SELECT * FROM t1; UPDATE t1 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -57,11 +57,11 @@ UPDATE t1 SET c2=1.0e+5 WHERE c2=NULL; SELECT * FROM t1; # Update negative value to unsigned column -UPDATE t1 SET c1=-1.0e+2 WHERE c4=2; +UPDATE IGNORE t1 SET c1=-1.0e+2 WHERE c4=2; SHOW WARNINGS; --sorted_result SELECT * FROM t1; -UPDATE t1 SET c1=1.0e+20 WHERE c4=2; +UPDATE IGNORE t1 SET c1=1.0e+20 WHERE c4=2; SHOW WARNINGS; --sorted_result SELECT * FROM t1; @@ -78,7 +78,7 @@ UPDATE t1 SET c3=1234567890 WHERE c4 IN (4,5,6); SELECT * FROM t1; # Update outside range would be clipped to closest endpoints -UPDATE t1 SET c1=99999.999999 WHERE c4=7; +UPDATE IGNORE t1 SET c1=99999.999999 WHERE c4=7; --sorted_result SELECT c1,c4 FROM t1; UPDATE t1 SET c2=-9999.0099 WHERE c4=5; @@ -158,10 +158,10 @@ INSERT INTO t3 VALUES ('11111.11111','4444444444',1),('55555.55555','5555555555' UPDATE t2,t3 SET t3.c1='22222.22222' WHERE t2.c1=t3.c1 AND t2.c3=t3.c3; #Updating with invalid values -UPDATE t1 SET c3='asdf' WHERE c1='11111.11111'; +UPDATE IGNORE t1 SET c3='asdf' WHERE c1='11111.11111'; --sorted_result SELECT c3 FROM t1; -UPDATE t1 SET c2="1 e 1" WHERE c4=2; +UPDATE IGNORE t1 SET c2="1 e 1" WHERE c4=2; --sorted_result SELECT c2 FROM t1; @@ -193,7 +193,7 @@ CREATE TABLE t1(c1 FLOAT(10,5) UNSIGNED NOT NULL, c2 FLOAT(10,5) SIGNED NULL, c3 INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); # DECIMAL := DECIMAL(10,0); Decimal values in c3 will be stripped; -INSERT INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); # c1, c2, c3 will be rounded automatically INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); @@ -203,8 +203,8 @@ INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); # Test insert leading zero, +/- signs, overflow handling INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); -INSERT INTO t1 VALUES ("-.1","-.1","-.1",8); -INSERT INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); # Inserting in scientific notations INSERT INTO t1 VALUES('1.0e+4','1.0e-5','1.0e+9',10); @@ -221,7 +221,7 @@ UPDATE t1 SET c1='10001.00001' WHERE c2 > 100 ORDER BY c2 LIMIT 1; SELECT c1,c2 FROM t1; # Update with arithmetic operations -UPDATE t1 SET c1=c2+c3 WHERE c3 < 10000; +UPDATE IGNORE t1 SET c1=c2+c3 WHERE c3 < 10000; --sorted_result SELECT * FROM t1; UPDATE t1 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -237,11 +237,11 @@ UPDATE t1 SET c2=1.0e+5 WHERE c2=NULL; SELECT * FROM t1; # Update negative value to unsigned column -UPDATE t1 SET c1=-1.0e+2 WHERE c4=2; +UPDATE IGNORE t1 SET c1=-1.0e+2 WHERE c4=2; SHOW WARNINGS; --sorted_result SELECT * FROM t1; -UPDATE t1 SET c1=1.0e+20 WHERE c4=2; +UPDATE IGNORE t1 SET c1=1.0e+20 WHERE c4=2; SHOW WARNINGS; --sorted_result SELECT * FROM t1; @@ -258,7 +258,7 @@ UPDATE t1 SET c3=1234567890 WHERE c4 IN (4,5,6); SELECT * FROM t1; # Update outside range would be clipped to closest endpoints -UPDATE t1 SET c1=99999.999999 WHERE c4=7; +UPDATE IGNORE t1 SET c1=99999.999999 WHERE c4=7; --sorted_result SELECT c1,c4 FROM t1; UPDATE t1 SET c2=-9999.0099 WHERE c4=5; @@ -347,7 +347,7 @@ UPDATE t2,t3 SET t3.c1='22222.22222' WHERE t2.c1=t3.c1 AND t2.c3=t3.c3; UPDATE t1 SET c3='asdf' WHERE c1='11111.11111'; --sorted_result SELECT c3 FROM t1; -UPDATE t1 SET c2="1 e 1" WHERE c4=2; +UPDATE IGNORE t1 SET c2="1 e 1" WHERE c4=2; --replace_result 88888.89063 88888.89062 --sorted_result SELECT c2 FROM t1; @@ -382,7 +382,7 @@ CREATE TABLE t1(c1 DOUBLE(10,5) UNSIGNED NOT NULL, c2 DOUBLE(10,5) SIGNED NULL, INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); # DECIMAL := DECIMAL(10,0); Decimal values in c3 will be stripped; -INSERT INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); # c1, c2, c3 will be rounded automatically INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); @@ -392,8 +392,8 @@ INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); # Test insert leading zero, +/- signs, overflow handling INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); -INSERT INTO t1 VALUES ("-.1","-.1","-.1",8); -INSERT INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); # Inserting in scientific notations INSERT INTO t1 VALUES('1.0e+4','1.0e-5','1.0e+9',10); @@ -410,7 +410,7 @@ UPDATE t1 SET c1='10001.00001' WHERE c2 > 100 ORDER BY c2 LIMIT 1; SELECT c1,c2 FROM t1; # Update with arithmetic operations -UPDATE t1 SET c1=c2+c3 WHERE c3 < 10000; +UPDATE IGNORE t1 SET c1=c2+c3 WHERE c3 < 10000; --sorted_result SELECT * FROM t1; UPDATE t1 SET c2=c2+100 WHERE c1 >=100 ORDER BY c1 LIMIT 4; @@ -426,11 +426,11 @@ UPDATE t1 SET c2=1.0e+5 WHERE c2=NULL; SELECT * FROM t1; # Update negative value to unsigned column -UPDATE t1 SET c1=-1.0e+2 WHERE c4=2; +UPDATE IGNORE t1 SET c1=-1.0e+2 WHERE c4=2; SHOW WARNINGS; --sorted_result SELECT * FROM t1; -UPDATE t1 SET c1=1.0e+20 WHERE c4=2; +UPDATE IGNORE t1 SET c1=1.0e+20 WHERE c4=2; SHOW WARNINGS; --sorted_result SELECT * FROM t1; @@ -447,7 +447,7 @@ UPDATE t1 SET c3=1234567890 WHERE c4 IN (4,5,6); SELECT * FROM t1; # Update outside range would be clipped to closest endpoints -UPDATE t1 SET c1=99999.999999 WHERE c4=7; +UPDATE IGNORE t1 SET c1=99999.999999 WHERE c4=7; --sorted_result SELECT c1,c4 FROM t1; UPDATE t1 SET c2=-9999.0099 WHERE c4=5; @@ -527,10 +527,10 @@ INSERT INTO t3 VALUES ('11111.11111','4444444444',1),('55555.55555','5555555555' UPDATE t2,t3 SET t3.c1='22222.22222' WHERE t2.c1=t3.c1 AND t2.c3=t3.c3; #Updating with invalid values -UPDATE t1 SET c3='asdf' WHERE c1='11111.11111'; +UPDATE IGNORE t1 SET c3='asdf' WHERE c1='11111.11111'; --sorted_result SELECT c3 FROM t1; -UPDATE t1 SET c2="1 e 1" WHERE c4=2; +UPDATE IGNORE t1 SET c2="1 e 1" WHERE c4=2; --sorted_result SELECT c2 FROM t1; diff --git a/mysql-test/suite/engines/iuds/t/update_delete_number.test b/mysql-test/suite/engines/iuds/t/update_delete_number.test index b8af78606d2..c58746d59f4 100644 --- a/mysql-test/suite/engines/iuds/t/update_delete_number.test +++ b/mysql-test/suite/engines/iuds/t/update_delete_number.test @@ -26,7 +26,7 @@ UPDATE t1 SET c1=120 WHERE c2 IS NULL; SELECT c1,c2 FROM t1 WHERE c1=120; # Update negative value to unsigned col -UPDATE t1 SET c1=-120 WHERE c2=-102; +UPDATE IGNORE t1 SET c1=-120 WHERE c2=-102; --sorted_result SELECT c1,c2 FROM t1 WHERE c2=-102; @@ -43,11 +43,11 @@ SELECT * FROM t1 WHERE c2=0; # Update outside range, would be clipped to closest endpoint INSERT INTO t1 VALUES(106,-106,9),(107,-107,10),(108,-108,11),(109,-109,12),(255,127,13); -UPDATE t1 SET c1=4294967296,c2=2147483648 WHERE c2 BETWEEN -108 AND -106; +UPDATE IGNORE t1 SET c1=4294967296,c2=2147483648 WHERE c2 BETWEEN -108 AND -106; SELECT COUNT(*) FROM t1 WHERE c1=4294967296 AND c2=2147483648 /* no rows */; --sorted_result SELECT * FROM t1 WHERE c1=4294967295 AND c2=2147483647; -UPDATE t1 SET c2=-2147483649 WHERE c1=109 ORDER BY c1; +UPDATE IGNORE t1 SET c2=-2147483649 WHERE c1=109 ORDER BY c1; --sorted_result SELECT c1,c2 FROM t1 WHERE c1=109; @@ -60,7 +60,7 @@ UPDATE IGNORE t1 SET c1=NULL WHERE c2=-110 /* updates to default value 0 */; --sorted_result SELECT c1,c2 FROM t1 WHERE c2=-110; SET SQL_MODE=DEFAULT; -UPDATE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; +UPDATE IGNORE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; --sorted_result SELECT * FROM t1 WHERE c1=0; @@ -94,7 +94,7 @@ SELECT c1 FROM t2 WHERE c2=13; # Update the unsigned auto_increment field UPDATE t1 SET c1=4294967295,c2=2147483647 WHERE c2=13; SELECT c1,c2 FROM t1 ORDER BY c1; -UPDATE t2 SET c1=0,c2=-2147483648 WHERE c2=2; +UPDATE IGNORE t2 SET c1=0,c2=-2147483648 WHERE c2=2; SELECT c1,c2 FROM t1 ORDER BY c1; UPDATE t2 SET c2=0 WHERE c2=5; SELECT c1,c2 FROM t1 ORDER BY c1; @@ -604,7 +604,7 @@ UPDATE t1 SET c1=120 WHERE c2 IS NULL; SELECT c1,c2 FROM t1 WHERE c1=120; # Update negative value to unsigned col -UPDATE t1 SET c1=-120 WHERE c2=-102; +UPDATE IGNORE t1 SET c1=-120 WHERE c2=-102; --sorted_result SELECT c1,c2 FROM t1 WHERE c2=-102; @@ -621,11 +621,11 @@ SELECT * FROM t1 WHERE c2=0; # Update outside range, would be clipped to closest endpoint INSERT INTO t1 VALUES(106,-106,9),(107,-107,10),(108,-108,11),(109,-109,12),(255,127,13); -UPDATE t1 SET c1=256,c2=128 WHERE c2 BETWEEN -108 AND -106; +UPDATE IGNORE t1 SET c1=256,c2=128 WHERE c2 BETWEEN -108 AND -106; SELECT COUNT(*) FROM t1 WHERE c1=256 AND c2=128 /* no rows */; --sorted_result SELECT * FROM t1 WHERE c1=255 AND c2=127; -UPDATE t1 SET c2=-129 WHERE c1=109 ORDER BY c1; +UPDATE IGNORE t1 SET c2=-129 WHERE c1=109 ORDER BY c1; --sorted_result SELECT c1,c2 FROM t1 WHERE c1=109; @@ -638,7 +638,7 @@ UPDATE IGNORE t1 SET c1=NULL WHERE c2=-110 /* updates to default value 0 */; --sorted_result SELECT c1,c2 FROM t1 WHERE c2=-110; SET SQL_MODE=DEFAULT; -UPDATE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; +UPDATE IGNORE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; --sorted_result SELECT * FROM t1 WHERE c1=0; @@ -672,7 +672,7 @@ SELECT c1 FROM t2 WHERE c2=13; # Update the unsigned auto_increment field UPDATE t1 SET c1=255,c2=127 WHERE c2=13; SELECT c1,c2 FROM t1 ORDER BY c1; -UPDATE t2 SET c1=0,c2=-128 WHERE c2=2; +UPDATE IGNORE t2 SET c1=0,c2=-128 WHERE c2=2; SELECT c1,c2 FROM t1 ORDER BY c1; UPDATE t2 SET c2=0 WHERE c2=5; SELECT c1,c2 FROM t1 ORDER BY c1; @@ -787,7 +787,7 @@ update mt1,mt2 set mt1.a=mt1.a+100; --sorted_result select * from mt1; # unique key -update mt1,mt2 set mt1.a=mt1.a+100 where mt1.a=101; +update ignore mt1,mt2 set mt1.a=mt1.a+100 where mt1.a=101; --sorted_result select * from mt1; # ref key @@ -904,7 +904,7 @@ UPDATE t1 SET c1=120 WHERE c2 IS NULL; SELECT c1,c2 FROM t1 WHERE c1=120; # Update negative value to unsigned col -UPDATE t1 SET c1=-120 WHERE c2=-102; +UPDATE IGNORE t1 SET c1=-120 WHERE c2=-102; --sorted_result SELECT c1,c2 FROM t1 WHERE c2=-102; @@ -921,11 +921,11 @@ SELECT * FROM t1 WHERE c2=0; # Update outside range, would be clipped to closest endpoint INSERT INTO t1 VALUES(106,-106,9),(107,-107,10),(108,-108,11),(109,-109,12),(255,127,13); -UPDATE t1 SET c1=65536,c2=32768 WHERE c2 BETWEEN -108 AND -106; +UPDATE IGNORE t1 SET c1=65536,c2=32768 WHERE c2 BETWEEN -108 AND -106; SELECT COUNT(*) FROM t1 WHERE c1=65536 AND c2=32768 /* no rows */; --sorted_result SELECT * FROM t1 WHERE c1=65535 AND c2=32767; -UPDATE t1 SET c2=-32769 WHERE c1=109 ORDER BY c1; +UPDATE IGNORE t1 SET c2=-32769 WHERE c1=109 ORDER BY c1; --sorted_result SELECT c1,c2 FROM t1 WHERE c1=109; @@ -938,7 +938,7 @@ UPDATE IGNORE t1 SET c1=NULL WHERE c2=-110 /* updates to default value 0 */; --sorted_result SELECT c1,c2 FROM t1 WHERE c2=-110; SET SQL_MODE=DEFAULT; -UPDATE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; +UPDATE IGNORE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; --sorted_result SELECT * FROM t1 WHERE c1=0; @@ -972,7 +972,7 @@ SELECT c1 FROM t2 WHERE c2=13; # Update the unsigned auto_increment field UPDATE t1 SET c1=65535,c2=32767 WHERE c2=13; SELECT c1,c2 FROM t1 ORDER BY c1; -UPDATE t2 SET c1=0,c2=-32768 WHERE c2=2; +UPDATE IGNORE t2 SET c1=0,c2=-32768 WHERE c2=2; SELECT c1,c2 FROM t1 ORDER BY c1; UPDATE t2 SET c2=0 WHERE c2=5; SELECT c1,c2 FROM t1 ORDER BY c1; @@ -1205,7 +1205,7 @@ UPDATE t1 SET c1=120 WHERE c2 IS NULL; SELECT c1,c2 FROM t1 WHERE c1=120; # Update negative value to unsigned col -UPDATE t1 SET c1=-120 WHERE c2=-102; +UPDATE IGNORE t1 SET c1=-120 WHERE c2=-102; --sorted_result SELECT c1,c2 FROM t1 WHERE c2=-102; @@ -1222,11 +1222,11 @@ SELECT * FROM t1 WHERE c2=0; # Update outside range, would be clipped to closest endpoint INSERT INTO t1 VALUES(106,-106,9),(107,-107,10),(108,-108,11),(109,-109,12),(255,127,13); -UPDATE t1 SET c1=16777216,c2=8388608 WHERE c2 BETWEEN -108 AND -106; +UPDATE IGNORE t1 SET c1=16777216,c2=8388608 WHERE c2 BETWEEN -108 AND -106; SELECT COUNT(*) FROM t1 WHERE c1=16777216 AND c2=8388608 /* no rows */; --sorted_result SELECT * FROM t1 WHERE c1=16777215 AND c2=8388607; -UPDATE t1 SET c2=-8388609 WHERE c1=109 ORDER BY c1; +UPDATE IGNORE t1 SET c2=-8388609 WHERE c1=109 ORDER BY c1; --sorted_result SELECT c1,c2 FROM t1 WHERE c1=109; @@ -1239,7 +1239,7 @@ UPDATE IGNORE t1 SET c1=NULL WHERE c2=-110 /* updates to default value 0 */; --sorted_result SELECT c1,c2 FROM t1 WHERE c2=-110; SET SQL_MODE=DEFAULT; -UPDATE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; +UPDATE IGNORE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; --sorted_result SELECT * FROM t1 WHERE c1=0; @@ -1273,7 +1273,7 @@ SELECT c1 FROM t2 WHERE c2=13; # Update the unsigned auto_increment field UPDATE t1 SET c1=16777215,c2=8388607 WHERE c2=13; SELECT c1,c2 FROM t1 ORDER BY c1; -UPDATE t2 SET c1=0,c2=-8388608 WHERE c2=2; +UPDATE IGNORE t2 SET c1=0,c2=-8388608 WHERE c2=2; SELECT c1,c2 FROM t1 ORDER BY c1; UPDATE t2 SET c2=0 WHERE c2=5; SELECT c1,c2 FROM t1 ORDER BY c1; @@ -1506,7 +1506,7 @@ UPDATE t1 SET c1=120 WHERE c2 IS NULL; SELECT c1,c2 FROM t1 WHERE c1=120; # Update negative value to unsigned col -UPDATE t1 SET c1=-120 WHERE c2=-102; +UPDATE IGNORE t1 SET c1=-120 WHERE c2=-102; --sorted_result SELECT c1,c2 FROM t1 WHERE c2=-102; @@ -1523,11 +1523,11 @@ SELECT * FROM t1 WHERE c2=0; # Update outside range, would be clipped to closest endpoint INSERT INTO t1 VALUES(106,-106,9),(107,-107,10),(108,-108,11),(109,-109,12),(255,127,13); -UPDATE t1 SET c1=18446744073709551616,c2=9223372036854775808 WHERE c2 BETWEEN -108 AND -106; +UPDATE IGNORE t1 SET c1=18446744073709551616,c2=9223372036854775808 WHERE c2 BETWEEN -108 AND -106; SELECT COUNT(*) FROM t1 WHERE c1=18446744073709551616 AND c2=9223372036854775808 /* no rows */; --sorted_result SELECT * FROM t1 WHERE c1=18446744073709551615 AND c2=9223372036854775807; -UPDATE t1 SET c2=-9223372036854775809 WHERE c1=109 ORDER BY c1; +UPDATE IGNORE t1 SET c2=-9223372036854775809 WHERE c1=109 ORDER BY c1; --sorted_result SELECT c1,c2 FROM t1 WHERE c1=109; @@ -1540,7 +1540,7 @@ UPDATE IGNORE t1 SET c1=NULL WHERE c2=-110 /* updates to default value 0 */; --sorted_result SELECT c1,c2 FROM t1 WHERE c2=-110; SET SQL_MODE=DEFAULT; -UPDATE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; +UPDATE IGNORE t1 SET c1=NULL WHERE c2=-111 /* updates to default value 0 */; --sorted_result SELECT * FROM t1 WHERE c1=0; @@ -1574,7 +1574,7 @@ SELECT c1 FROM t2 WHERE c2=13; # Update the unsigned auto_increment field UPDATE t1 SET c1=18446744073709551615,c2=9223372036854775807 WHERE c2=13; SELECT c1,c2 FROM t1 ORDER BY c1; -UPDATE t2 SET c1=0,c2=-9223372036854775808 WHERE c2=2; +UPDATE IGNORE t2 SET c1=0,c2=-9223372036854775808 WHERE c2=2; SELECT c1,c2 FROM t1 ORDER BY c1; UPDATE t2 SET c2=0 WHERE c2=5; SELECT c1,c2 FROM t1 ORDER BY c1; diff --git a/mysql-test/suite/engines/iuds/t/update_time.test b/mysql-test/suite/engines/iuds/t/update_time.test index 4b5f89580be..5ce69b46986 100644 --- a/mysql-test/suite/engines/iuds/t/update_time.test +++ b/mysql-test/suite/engines/iuds/t/update_time.test @@ -119,19 +119,19 @@ UPDATE t2 SET c2='1111' WHERE c1 IN ('100:04:04',005454,'2:2:2',111111); SELECT c2 FROM t2; #Update outside range would be clipped to closest endpoints -UPDATE t4 SET c2='-838:59:60' WHERE c1='100:04:04'; +UPDATE IGNORE t4 SET c2='-838:59:60' WHERE c1='100:04:04'; --sorted_result SELECT c2 FROM t4; -UPDATE t4 SET c2='838:59:60' WHERE c1='100:04:04'; +UPDATE IGNORE t4 SET c2='838:59:60' WHERE c1='100:04:04'; --sorted_result SELECT c2 FROM t4; UPDATE t4 SET c2='00:00:00' WHERE c1='100:04:04'; --sorted_result SELECT c2 FROM t4; -UPDATE t4 SET c2='11:11:60' WHERE c1='100:04:04'; +UPDATE IGNORE t4 SET c2='11:11:60' WHERE c1='100:04:04'; --sorted_result SELECT c2 FROM t4; -UPDATE t4 SET c2='11:60:11' WHERE c1='100:04:04'; +UPDATE IGNORE t4 SET c2='11:60:11' WHERE c1='100:04:04'; --sorted_result SELECT c2 FROM t4; @@ -151,7 +151,7 @@ SET SQL_MODE=DEFAULT; UPDATE t1 SET c1=8385958 WHERE c2='34 22:59:59'; #Update with invalid values -UPDATE t1 SET c2='def' WHERE c1=59; +UPDATE IGNORE t1 SET c2='def' WHERE c1=59; --sorted_result SELECT c2 FROM t1; --error ER_PARSE_ERROR @@ -172,11 +172,11 @@ SELECT * FROM t1; # Update using range # EXPLAIN SELECT * FROM t1 WHERE c1 BETWEEN 080000 AND 100000; -UPDATE t1 SET t1.c2='99999.99999' WHERE c1 BETWEEN 080000 AND 100000; +UPDATE IGNORE t1 SET t1.c2='99999.99999' WHERE c1 BETWEEN 080000 AND 100000; --sorted_result SELECT * FROM t1; # EXPLAIN SELECT * FROM t1 WHERE c1 IN (222222,8385955,1500000); -UPDATE t1 SET c1=c1+1,c2=c2-1 WHERE c1 IN (222222,8385955,1500000) ORDER BY c1; +UPDATE IGNORE t1 SET c1=c1+1,c2=c2-1 WHERE c1 IN (222222,8385955,1500000) ORDER BY c1; --sorted_result SELECT * FROM t1; diff --git a/mysql-test/suite/engines/iuds/t/update_year.test b/mysql-test/suite/engines/iuds/t/update_year.test index d1f06293716..599c637e442 100644 --- a/mysql-test/suite/engines/iuds/t/update_year.test +++ b/mysql-test/suite/engines/iuds/t/update_year.test @@ -128,22 +128,22 @@ UPDATE t4 SET c1=99 WHERE c2 IN (01,54,65,69,null); SELECT c1 FROM t4; # Update outside range would be clipped to closest endpoints -UPDATE t1 SET c2=-1 WHERE c1=2071; +UPDATE IGNORE t1 SET c2=-1 WHERE c1=2071; --sorted_result SELECT c2 FROM t1; UPDATE t1 SET c2=0 WHERE c1=2003; --sorted_result SELECT c2 FROM t1; -UPDATE t1 SET c2=2156 WHERE c1=2001; +UPDATE IGNORE t1 SET c2=2156 WHERE c1=2001; --sorted_result SELECT c2 FROM t1; -UPDATE t4 SET c2=-1 WHERE c1=71; +UPDATE IGNORE t4 SET c2=-1 WHERE c1=71; --sorted_result SELECT c2 FROM t4; UPDATE t4 SET c2=0 WHERE c1=70; --sorted_result SELECT c2 FROM t4; -UPDATE t4 SET c2=100 WHERE c1=79; +UPDATE IGNORE t4 SET c2=100 WHERE c1=79; --sorted_result SELECT c2 FROM t4; @@ -162,7 +162,7 @@ SET SQL_MODE=DEFAULT #UPDATE t2 SET c1='def' WHERE c2=2064; #--sorted_result #SELECT c1 FROM t2; -UPDATE t4 SET c1=-70 WHERE c2=75; +UPDATE IGNORE t4 SET c1=-70 WHERE c2=75; --sorted_result SELECT c1 FROM t4; @@ -187,7 +187,7 @@ UPDATE t1 SET t1.c2=0000 WHERE c1 BETWEEN 2000 AND 2010; --sorted_result SELECT * FROM t1; # EXPLAIN SELECT * FROM t1 WHERE c1 IN (2154,2009,1979); -UPDATE t1 SET c1=c1-1,c2=c2+1 WHERE c1 IN (2154,2009,1979); +UPDATE IGNORE t1 SET c1=c1-1,c2=c2+1 WHERE c1 IN (2154,2009,1979); --sorted_result SELECT * FROM t1; diff --git a/mysql-test/suite/engines/rr_trx/r/init_innodb.result b/mysql-test/suite/engines/rr_trx/r/init_innodb.result index 516147976ce..6522adfd52b 100644 --- a/mysql-test/suite/engines/rr_trx/r/init_innodb.result +++ b/mysql-test/suite/engines/rr_trx/r/init_innodb.result @@ -43,7 +43,7 @@ t1 CREATE TABLE `t1` ( `int2_key` int(11) DEFAULT NULL, `int2_unique` int(11) DEFAULT NULL, `for_update` tinyint(1) DEFAULT 0, - `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `connection_id` int(11) DEFAULT NULL, `thread_id` int(11) DEFAULT 0, `is_uncommitted` tinyint(1) DEFAULT 0, diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result index 8b96e54eefd..6819e2356c3 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result @@ -27,7 +27,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -41,7 +41,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -73,6 +73,7 @@ Ensure that the scope of each BEGIN/END compound statement within a stored procedure definition is properly applied -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp1( ) begin_label: BEGIN declare x char DEFAULT 'x'; @@ -713,6 +714,7 @@ DROP PROCEDURE IF EXISTS sp3; DROP PROCEDURE IF EXISTS sp4; DROP TABLE IF EXISTS temp; CREATE TABLE temp( f1 CHAR, f2 CHAR); +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp0() BEGIN set @done=0; @@ -720,6 +722,7 @@ set @x=0; insert into temp values('xxx', 'yy'); set @x=1; END// +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '01000' set @done = 1; @@ -728,6 +731,7 @@ set @x=0; insert into temp values('xxx', 'yy'); set @x=1; END// +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp2() BEGIN declare continue handler for sqlwarning set @done = 1; @@ -736,6 +740,7 @@ set @x=0; insert into temp values('xxx', 'yy'); set @x=1; END// +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp3() BEGIN declare exit handler for sqlstate '01000' set @done = 1; @@ -744,6 +749,7 @@ set @x=0; insert into temp values('xxx', 'yy'); set @x=1; END// +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp4() BEGIN declare exit handler for sqlwarning set @done = 1; diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result index fdbe03e17fc..5f3de814d9c 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result @@ -27,7 +27,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -41,7 +41,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result index 2cf079a75f8..6db6e374ca7 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result @@ -29,7 +29,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -43,7 +43,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result index a520bdfac36..cf0070144dc 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result @@ -27,7 +27,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -41,7 +41,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result index de63339ee95..4df88b53a56 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result @@ -28,7 +28,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result index 0d846a019dd..405b7ab62b0 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result @@ -27,7 +27,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -41,7 +41,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result index 4e4716fd873..b29c0271fdc 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result @@ -486,8 +486,8 @@ create trigger trg1_4 before UPDATE on t1 for each row set new.f1 = 'trig 1_4-yes'; show triggers; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci -trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci connection no_privs; select current_user; current_user diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_09.result b/mysql-test/suite/funcs_1/r/innodb_trig_09.result index e6a10592424..6664994543b 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_09.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_09.result @@ -185,7 +185,7 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 0 0 0 0 0 0 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 0 0 0 0 0 0 -Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL +update ignore tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL where f122='Test 3.5.9.4'; Warnings: Warning 1048 Column 'f136' cannot be null diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result index 8e9a654d4ed..f4a6d75fbc0 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result @@ -163,6 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test) Testcase 3.5.10.extra: ---------------------- +set sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t1_sp (var136 tinyint, var151 decimal) engine = ; create trigger trg before insert on t1_sp for each row set @counter=@counter+1; @@ -199,6 +200,7 @@ count(*) drop procedure trig_sp; drop trigger trg; drop table t1_sp; +set sql_mode = default; Testcase 3.5.11.1 (implemented in trig_perf.test) ------------------------------------------------- @@ -290,7 +292,7 @@ drop table t4; Testcase y.y.y.4: Recursive trigger/SP references ------------------------------------------------- -set @sql_mode='traditional'; +set sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t1_sp ( count integer, var136 tinyint, @@ -347,6 +349,7 @@ count(*) drop procedure trig_sp; drop trigger trg; drop table t1_sp; +set sql_mode = default; Testcase y.y.y.5: Rollback of nested trigger references ------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/is_cml_innodb.result b/mysql-test/suite/funcs_1/r/is_cml_innodb.result index d8cd7a93664..58718fc5fae 100644 --- a/mysql-test/suite/funcs_1/r/is_cml_innodb.result +++ b/mysql-test/suite/funcs_1/r/is_cml_innodb.result @@ -40,6 +40,9 @@ WHERE table_schema LIKE 'test%' AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, DATA_TYPE, @@ -56,6 +59,9 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME 2.0000 text ucs2 ucs2_general_ci 2.0000 varchar ucs2 ucs2_general_ci 2.0079 tinytext ucs2 ucs2_general_ci +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, DATA_TYPE, @@ -68,6 +74,11 @@ ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME NULL char ucs2 ucs2_general_ci NULL varchar ucs2 ucs2_general_ci +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values --> are 0, which is intended behavior, and the result of 0 / 0 IS NULL SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, @@ -94,4 +105,7 @@ NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0) 2.0079 test t1 f9 tinytext 127 255 ucs2 ucs2_general_ci tinytext 2.0000 test t1 f10 mediumtext 8388607 16777215 ucs2 ucs2_general_ci mediumtext 2.0000 test t1 f11 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/r/is_columns.result b/mysql-test/suite/funcs_1/r/is_columns.result index 89f29ff4b38..63c6e11f20a 100644 --- a/mysql-test/suite/funcs_1/r/is_columns.result +++ b/mysql-test/suite/funcs_1/r/is_columns.result @@ -430,8 +430,8 @@ TABLE_SCHEMA test TABLE_NAME t1_my_tablex COLUMN_NAME col2 ORDINAL_POSITION 2 -COLUMN_DEFAULT -IS_NULLABLE NO +COLUMN_DEFAULT NULL +IS_NULLABLE YES DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 1 CHARACTER_OCTET_LENGTH 1 diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result index a005e39b0b4..f946930bf30 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_innodb.result +++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result @@ -359,29 +359,9 @@ drop TABLE if exists t7, t8; CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB; CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB; LOAD DATA INFILE '/std_data/funcs_1/t7.txt' INTO TABLE t7; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 +ERROR 22007: Incorrect date value: '' for column 'f3' at row 1 LOAD DATA INFILE '/std_data/funcs_1/t7.txt' INTO TABLE t8; -Warnings: -Warning 1265 Data truncated for column 'f3' at row 1 -Warning 1265 Data truncated for column 'f3' at row 2 -Warning 1265 Data truncated for column 'f3' at row 3 -Warning 1265 Data truncated for column 'f3' at row 4 -Warning 1265 Data truncated for column 'f3' at row 5 -Warning 1265 Data truncated for column 'f3' at row 6 -Warning 1265 Data truncated for column 'f3' at row 7 -Warning 1265 Data truncated for column 'f3' at row 8 -Warning 1265 Data truncated for column 'f3' at row 9 -Warning 1265 Data truncated for column 'f3' at row 10 +ERROR 22007: Incorrect date value: '' for column 'f3' at row 1 drop TABLE if exists t9; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = InnoDB; LOAD DATA INFILE '/std_data/funcs_1/t9.txt' INTO TABLE t9; @@ -743,6 +723,12 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME 1.0000 text latin1 latin1_swedish_ci 1.0000 tinytext latin1 latin1_swedish_ci 1.0000 varchar latin1 latin1_swedish_ci +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, DATA_TYPE, @@ -753,6 +739,12 @@ WHERE table_schema LIKE 'test%' AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, DATA_TYPE, @@ -779,6 +771,17 @@ NULL year NULL NULL NULL char latin1 latin1_bin NULL char latin1 latin1_swedish_ci NULL varchar latin1 latin1_swedish_ci +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values --> are 0, which is intended behavior, and the result of 0 / 0 IS NULL SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, @@ -1121,6 +1124,12 @@ NULL test4 t6 f3 date NULL NULL NULL NULL date NULL test4 t6 f4 int NULL NULL NULL NULL int(11) 1.0000 test4 t6 f5 char 25 25 latin1 latin1_swedish_ci char(25) NULL test4 t6 f6 int NULL NULL NULL NULL int(11) +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 DROP DATABASE test1; DROP DATABASE test4; DROP TABLE test.t1; diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result index 0ee25154c50..fe23f9de0c5 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result @@ -28,7 +28,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -74,6 +74,7 @@ Ensure that the scope of each BEGIN/END compound statement within a stored procedure definition is properly applied -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp1( ) begin_label: BEGIN declare x char DEFAULT 'x'; @@ -714,6 +715,7 @@ DROP PROCEDURE IF EXISTS sp3; DROP PROCEDURE IF EXISTS sp4; DROP TABLE IF EXISTS temp; CREATE TABLE temp( f1 CHAR, f2 CHAR); +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp0() BEGIN set @done=0; @@ -721,6 +723,7 @@ set @x=0; insert into temp values('xxx', 'yy'); set @x=1; END// +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '01000' set @done = 1; @@ -729,6 +732,7 @@ set @x=0; insert into temp values('xxx', 'yy'); set @x=1; END// +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp2() BEGIN declare continue handler for sqlwarning set @done = 1; @@ -737,6 +741,7 @@ set @x=0; insert into temp values('xxx', 'yy'); set @x=1; END// +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp3() BEGIN declare exit handler for sqlstate '01000' set @done = 1; @@ -745,6 +750,7 @@ set @x=0; insert into temp values('xxx', 'yy'); set @x=1; END// +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp4() BEGIN declare exit handler for sqlwarning set @done = 1; diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_03.result b/mysql-test/suite/funcs_1/r/memory_storedproc_03.result index f5e40d190a6..6390cc240f9 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_03.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_03.result @@ -28,7 +28,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result index a0a48842ef8..ce1ee82e89a 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result @@ -29,7 +29,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -43,7 +43,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_07.result b/mysql-test/suite/funcs_1/r/memory_storedproc_07.result index 2b8d41f963e..751986b837e 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_07.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_07.result @@ -28,7 +28,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_08.result b/mysql-test/suite/funcs_1/r/memory_storedproc_08.result index 1188eedf6c6..1b8a571e481 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_08.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_08.result @@ -28,7 +28,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result index bf4fcefb9db..0f5fe7cf34c 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result @@ -28,7 +28,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result index f9e8fc05088..83c36c6294f 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result @@ -487,8 +487,8 @@ create trigger trg1_4 before UPDATE on t1 for each row set new.f1 = 'trig 1_4-yes'; show triggers; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci -trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci connection no_privs; select current_user; current_user diff --git a/mysql-test/suite/funcs_1/r/memory_trig_09.result b/mysql-test/suite/funcs_1/r/memory_trig_09.result index 5394aa01bf6..7579418dc1f 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_09.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_09.result @@ -186,7 +186,7 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 0 0 0 0 0 0 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 0 0 0 0 0 0 -Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL +update ignore tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL where f122='Test 3.5.9.4'; Warnings: Warning 1048 Column 'f136' cannot be null diff --git a/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result index 8dd080d7ddd..63b8b643820 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result @@ -164,6 +164,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test) Testcase 3.5.10.extra: ---------------------- +set sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t1_sp (var136 tinyint, var151 decimal) engine = ; create trigger trg before insert on t1_sp for each row set @counter=@counter+1; @@ -200,6 +201,7 @@ count(*) drop procedure trig_sp; drop trigger trg; drop table t1_sp; +set sql_mode = default; Testcase 3.5.11.1 (implemented in trig_perf.test) ------------------------------------------------- @@ -295,7 +297,7 @@ drop table t4; Testcase y.y.y.4: Recursive trigger/SP references ------------------------------------------------- -set @sql_mode='traditional'; +set sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t1_sp ( count integer, var136 tinyint, @@ -352,6 +354,7 @@ count(*) drop procedure trig_sp; drop trigger trg; drop table t1_sp; +set sql_mode = default; Testcase y.y.y.5: Rollback of nested trigger references ------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result index 0ee25154c50..fe23f9de0c5 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result @@ -28,7 +28,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -74,6 +74,7 @@ Ensure that the scope of each BEGIN/END compound statement within a stored procedure definition is properly applied -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp1( ) begin_label: BEGIN declare x char DEFAULT 'x'; @@ -714,6 +715,7 @@ DROP PROCEDURE IF EXISTS sp3; DROP PROCEDURE IF EXISTS sp4; DROP TABLE IF EXISTS temp; CREATE TABLE temp( f1 CHAR, f2 CHAR); +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp0() BEGIN set @done=0; @@ -721,6 +723,7 @@ set @x=0; insert into temp values('xxx', 'yy'); set @x=1; END// +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '01000' set @done = 1; @@ -729,6 +732,7 @@ set @x=0; insert into temp values('xxx', 'yy'); set @x=1; END// +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp2() BEGIN declare continue handler for sqlwarning set @done = 1; @@ -737,6 +741,7 @@ set @x=0; insert into temp values('xxx', 'yy'); set @x=1; END// +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp3() BEGIN declare exit handler for sqlstate '01000' set @done = 1; @@ -745,6 +750,7 @@ set @x=0; insert into temp values('xxx', 'yy'); set @x=1; END// +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp4() BEGIN declare exit handler for sqlwarning set @done = 1; diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result index f5e40d190a6..6390cc240f9 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result @@ -28,7 +28,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result index a0a48842ef8..ce1ee82e89a 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result @@ -29,7 +29,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -43,7 +43,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result index 2b8d41f963e..751986b837e 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result @@ -28,7 +28,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result index 1188eedf6c6..1b8a571e481 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result @@ -28,7 +28,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result index bf4fcefb9db..0f5fe7cf34c 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result @@ -28,7 +28,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result index d1ab5674cb4..a4db9050c86 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result @@ -487,8 +487,8 @@ create trigger trg1_4 before UPDATE on t1 for each row set new.f1 = 'trig 1_4-yes'; show triggers; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci -trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci connection no_privs; select current_user; current_user diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_09.result b/mysql-test/suite/funcs_1/r/myisam_trig_09.result index 5394aa01bf6..7579418dc1f 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_09.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_09.result @@ -186,7 +186,7 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 0 0 0 0 0 0 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 0 0 0 0 0 0 -Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL +update ignore tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL where f122='Test 3.5.9.4'; Warnings: Warning 1048 Column 'f136' cannot be null diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result index 38cbe10e64b..e73e0413469 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result @@ -164,6 +164,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test) Testcase 3.5.10.extra: ---------------------- +set sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t1_sp (var136 tinyint, var151 decimal) engine = ; create trigger trg before insert on t1_sp for each row set @counter=@counter+1; @@ -200,6 +201,7 @@ count(*) drop procedure trig_sp; drop trigger trg; drop table t1_sp; +set sql_mode = default; Testcase 3.5.11.1 (implemented in trig_perf.test) ------------------------------------------------- @@ -295,7 +297,7 @@ drop table t4; Testcase y.y.y.4: Recursive trigger/SP references ------------------------------------------------- -set @sql_mode='traditional'; +set sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t1_sp ( count integer, var136 tinyint, @@ -352,6 +354,7 @@ count(*) drop procedure trig_sp; drop trigger trg; drop table t1_sp; +set sql_mode = default; Testcase y.y.y.5: Rollback of nested trigger references ------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result index 7a27703a1ec..2c86e6c3e73 100644 --- a/mysql-test/suite/funcs_1/r/storedproc.result +++ b/mysql-test/suite/funcs_1/r/storedproc.result @@ -28,7 +28,7 @@ load data infile '/std_data/funcs_1/t4.txt' into table t6; USE db_storedproc; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t7; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t7; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 @@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 10 create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ; -load data infile '/std_data/funcs_1/t7.txt' into table t8; +load data infile '/std_data/funcs_1/t7.txt' ignore into table t8; Warnings: Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 2 diff --git a/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc b/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc index c4ae93aca6b..6f23a559ce3 100644 --- a/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc +++ b/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc @@ -70,7 +70,7 @@ create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = $engine_type; --replace_result $MYSQLTEST_VARDIR eval -load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t7.txt' into table t7; +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t7.txt' ignore into table t7; --replace_result $engine_type eval @@ -78,7 +78,7 @@ create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = $engine_type; --replace_result $MYSQLTEST_VARDIR eval -load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t7.txt' into table t8; +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t7.txt' ignore into table t8; --replace_result $engine_type eval diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc index 0d9548830b4..2717303ddb9 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc @@ -211,6 +211,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp1( ) begin_label: BEGIN declare x char DEFAULT 'x'; @@ -994,6 +995,7 @@ CREATE TABLE temp( f1 CHAR, f2 CHAR); delimiter //; # 0 - without handler +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp0() BEGIN set @done=0; @@ -1003,6 +1005,7 @@ BEGIN END// # 1st one with SQLSTATE + CONTINUE +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '01000' set @done = 1; @@ -1013,6 +1016,7 @@ BEGIN END// # 2nd one with SQLWARNING + CONTINUE +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp2() BEGIN declare continue handler for sqlwarning set @done = 1; @@ -1023,6 +1027,7 @@ BEGIN END// # 3 with SQLSTATE + EXIT +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp3() BEGIN declare exit handler for sqlstate '01000' set @done = 1; @@ -1033,6 +1038,7 @@ BEGIN END// # 4 with SQLWARNING + EXIT +SET STATEMENT sql_mode = '' FOR CREATE PROCEDURE sp4() BEGIN declare exit handler for sqlwarning set @done = 1; diff --git a/mysql-test/suite/funcs_1/triggers/triggers_09.inc b/mysql-test/suite/funcs_1/triggers/triggers_09.inc index e9e6af92994..93762b363df 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_09.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_09.inc @@ -183,7 +183,7 @@ let $message= Testcase 3.5.9.4:; @tr_var_af_136, @tr_var_af_151, @tr_var_af_163; --enable_query_log - Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL + update ignore tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL where f122='Test 3.5.9.4'; select f118, f121, f122, f136, f151, f163 from tb3 diff --git a/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc index dd8b2a87cd8..88b04a0eefd 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc @@ -144,7 +144,7 @@ let $message= Testcase 3.5.10.6: (implemented in trig_frkey.test); # on the subject table from a stored procedure is indeed activated correctly let $message= Testcase 3.5.10.extra:; --source include/show_msg.inc - + set sql_mode = 'NO_ENGINE_SUBSTITUTION'; --replace_result $engine_type eval create table t1_sp (var136 tinyint, var151 decimal) engine = $engine_type; @@ -184,6 +184,7 @@ let $message= Testcase 3.5.10.extra:; drop trigger trg; drop table t1_sp; --enable_warnings + set sql_mode = default; ################################## ########## Section 3.5.11 ######## @@ -321,8 +322,7 @@ let $message= Testcase y.y.y.3: Circular trigger reference; # Testcase: create recursive trigger/storedprocedures conditions let $message= Testcase y.y.y.4: Recursive trigger/SP references; --source include/show_msg.inc - -set @sql_mode='traditional'; + set sql_mode = 'NO_ENGINE_SUBSTITUTION'; --replace_result $engine_type eval create table t1_sp ( count integer, @@ -375,6 +375,7 @@ set @sql_mode='traditional'; drop trigger trg; drop table t1_sp; --enable_warnings + set sql_mode = default; # Testcase: y.y.y.5: diff --git a/mysql-test/suite/funcs_2/include/check_charset.inc b/mysql-test/suite/funcs_2/include/check_charset.inc index 0242d4390ac..bf2f2db610b 100644 --- a/mysql-test/suite/funcs_2/include/check_charset.inc +++ b/mysql-test/suite/funcs_2/include/check_charset.inc @@ -26,7 +26,7 @@ ALTER TABLE test.t1 ADD code VARCHAR(16) NOT NULL; let $1= 221; while ($1) { - eval INSERT INTO test.t1 VALUES(CHAR(254-$1), HEX(254-$1)); + eval INSERT IGNORE INTO test.t1 VALUES(CHAR(254-$1), HEX(254-$1)); dec $1; } DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1; diff --git a/mysql-test/suite/funcs_2/t/innodb_charset.test b/mysql-test/suite/funcs_2/t/innodb_charset.test index b77bacfc01c..da4dea44ad7 100644 --- a/mysql-test/suite/funcs_2/t/innodb_charset.test +++ b/mysql-test/suite/funcs_2/t/innodb_charset.test @@ -6,6 +6,7 @@ # Checking of other prerequisites is in charset_master.test # ################################################################################ +--source include/no_valgrind_without_big.inc --source include/have_innodb.inc let $engine_type= InnoDB; diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index f2e4077016a..20c1cb39f87 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -30,14 +30,9 @@ galera_gcs_fragment : Incorrect arguments to SET galera_flush_local : Fails sporadically galera_binlog_stmt_autoinc : TODO: investigate galera_concurrent_ctas : Test times out, investigate -MW-258 : MDEV-11229 -galera_as_master : MDEV-11229 -MW-44 : MDEV-11229 -galera_gcs_fc_limit : MDEV-11229 -galera_roles : MDEV-11229 -galera_lock_table : MDEV-11229 MW-286 : TODO: investigate galera_sst_xtrabackup-v2-options : TODO: Fix test case galera_sst_xtrabackup-v2 : MDEV-11208 galera_sst_xtrabackup-v2_encrypt_with_key : MDEV-11208 mysql-wsrep#33 : TODO: investigate +galera_var_innodb_disallow_writes : MDEV-10949 diff --git a/mysql-test/suite/galera/r/MW-284.result b/mysql-test/suite/galera/r/MW-284.result index 338f6c21375..a4c08bc7a93 100644 --- a/mysql-test/suite/galera/r/MW-284.result +++ b/mysql-test/suite/galera/r/MW-284.result @@ -4,6 +4,7 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; SET SESSION wsrep_on = OFF; SET SESSION wsrep_on = ON; +SET global wsrep_sync_wait=0; connection node_3; START SLAVE; include/wait_for_slave_param.inc [Slave_IO_Running] @@ -16,6 +17,7 @@ INSERT INTO t1 VALUES (1); connection node_3; connection node_1; DROP TABLE t1; +SET global wsrep_sync_wait=7; connection node_3; STOP SLAVE; RESET SLAVE ALL; diff --git a/mysql-test/suite/galera/r/create.result b/mysql-test/suite/galera/r/create.result index 4d6488d324b..a445b32e8bf 100644 --- a/mysql-test/suite/galera/r/create.result +++ b/mysql-test/suite/galera/r/create.result @@ -7,6 +7,8 @@ SHOW VARIABLES LIKE '%log%bin%'; Variable_name Value log_bin OFF log_bin_basename +log_bin_compress OFF +log_bin_compress_min_len 256 log_bin_index log_bin_trust_function_creators ON sql_log_bin ON diff --git a/mysql-test/suite/galera/r/galera_create_function.result b/mysql-test/suite/galera/r/galera_create_function.result index 576ea44cce5..9118c2864f3 100644 --- a/mysql-test/suite/galera/r/galera_create_function.result +++ b/mysql-test/suite/galera/r/galera_create_function.result @@ -22,7 +22,7 @@ RETURN 123; connection node_1; SHOW CREATE FUNCTION f1; Function sql_mode Create Function character_set_client collation_connection Database Collation -f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` FUNCTION `f1`(param INTEGER) RETURNS varchar(200) CHARSET latin1 +f1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` FUNCTION `f1`(param INTEGER) RETURNS varchar(200) CHARSET latin1 MODIFIES SQL DATA COMMENT 'f1_comment' RETURN 'abc' latin1 latin1_swedish_ci latin1_swedish_ci @@ -32,14 +32,14 @@ SELECT 1 FROM DUAL; 1 SHOW CREATE FUNCTION f1; Function sql_mode Create Function character_set_client collation_connection Database Collation -f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` FUNCTION `f1`(param INTEGER) RETURNS varchar(200) CHARSET latin1 +f1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` FUNCTION `f1`(param INTEGER) RETURNS varchar(200) CHARSET latin1 MODIFIES SQL DATA COMMENT 'f1_comment' RETURN 'abc' latin1 latin1_swedish_ci latin1_swedish_ci connection node_1; SHOW CREATE FUNCTION f2; Function sql_mode Create Function character_set_client collation_connection Database Collation -f2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f2`(param VARCHAR(100)) RETURNS int(11) +f2 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f2`(param VARCHAR(100)) RETURNS int(11) NO SQL DETERMINISTIC SQL SECURITY INVOKER @@ -47,7 +47,7 @@ RETURN 123 latin1 latin1_swedish_ci latin1_swedish_ci connection node_2; SHOW CREATE FUNCTION f2; Function sql_mode Create Function character_set_client collation_connection Database Collation -f2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f2`(param VARCHAR(100)) RETURNS int(11) +f2 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f2`(param VARCHAR(100)) RETURNS int(11) NO SQL DETERMINISTIC SQL SECURITY INVOKER diff --git a/mysql-test/suite/galera/r/galera_create_procedure.result b/mysql-test/suite/galera/r/galera_create_procedure.result index 90f29ffa617..98dc4a856dc 100644 --- a/mysql-test/suite/galera/r/galera_create_procedure.result +++ b/mysql-test/suite/galera/r/galera_create_procedure.result @@ -20,7 +20,7 @@ SQL SECURITY INVOKER BEGIN END ; connection node_1; SHOW CREATE PROCEDURE p1; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` PROCEDURE `p1`(IN param1 INTEGER, OUT param2 INTEGER, INOUT param3 INTEGER) +p1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` PROCEDURE `p1`(IN param1 INTEGER, OUT param2 INTEGER, INOUT param3 INTEGER) MODIFIES SQL DATA COMMENT 'p1_comment' INSERT INTO t1 VALUES (1) latin1 latin1_swedish_ci latin1_swedish_ci @@ -30,14 +30,14 @@ SELECT 1 FROM DUAL; 1 SHOW CREATE PROCEDURE p1; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` PROCEDURE `p1`(IN param1 INTEGER, OUT param2 INTEGER, INOUT param3 INTEGER) +p1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` PROCEDURE `p1`(IN param1 INTEGER, OUT param2 INTEGER, INOUT param3 INTEGER) MODIFIES SQL DATA COMMENT 'p1_comment' INSERT INTO t1 VALUES (1) latin1 latin1_swedish_ci latin1_swedish_ci connection node_1; SHOW CREATE PROCEDURE p2; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(param VARCHAR(100)) +p2 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(param VARCHAR(100)) NO SQL DETERMINISTIC SQL SECURITY INVOKER @@ -45,7 +45,7 @@ BEGIN END latin1 latin1_swedish_ci latin1_swedish_ci connection node_2; SHOW CREATE PROCEDURE p2; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(param VARCHAR(100)) +p2 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(param VARCHAR(100)) NO SQL DETERMINISTIC SQL SECURITY INVOKER diff --git a/mysql-test/suite/galera/r/galera_enum.result b/mysql-test/suite/galera/r/galera_enum.result index e8ccb12b990..1bac7dc9388 100644 --- a/mysql-test/suite/galera/r/galera_enum.result +++ b/mysql-test/suite/galera/r/galera_enum.result @@ -2,7 +2,7 @@ connection node_1; CREATE TABLE t1 (f1 ENUM('', 'one', 'two'), KEY (f1)) ENGINE=InnoDB; INSERT INTO t1 VALUES (''); INSERT INTO t1 VALUES ('one'), ('two'); -INSERT INTO t1 VALUES (0), (1), (2); +INSERT IGNORE INTO t1 VALUES (0), (1), (2); Warnings: Warning 1265 Data truncated for column 'f1' at row 1 connection node_2; diff --git a/mysql-test/suite/galera/r/galera_forced_binlog_format.result b/mysql-test/suite/galera/r/galera_forced_binlog_format.result index 86789a1b8e9..b94e6530886 100644 --- a/mysql-test/suite/galera/r/galera_forced_binlog_format.result +++ b/mysql-test/suite/galera/r/galera_forced_binlog_format.result @@ -2,12 +2,12 @@ connection node_1; RESET MASTER; SET SESSION binlog_format = 'STATEMENT'; Warnings: -Warning 1105 MariaDB Galera does not support binlog format: STATEMENT +Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); SET SESSION binlog_format = 'MIXED'; Warnings: -Warning 1105 MariaDB Galera does not support binlog format: MIXED +Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED INSERT INTO t1 VALUES (2); SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256; Log_name Pos Event_type Server_id End_log_pos Info @@ -16,10 +16,12 @@ mysqld-bin.000001 Binlog_checkpoint 1 mysqld-bin.000001 mysqld-bin.000001 Gtid 1 GTID 0-1-1 mysqld-bin.000001 Query 1 use `test`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB mysqld-bin.000001 Gtid 1 BEGIN GTID 0-1-2 +mysqld-bin.000001 Annotate_rows 1 INSERT INTO t1 VALUES (1) mysqld-bin.000001 Table_map 1 table_id: ### (test.t1) mysqld-bin.000001 Write_rows_v1 1 table_id: ### flags: STMT_END_F mysqld-bin.000001 Xid 1 COMMIT /* xid=### */ mysqld-bin.000001 Gtid 1 BEGIN GTID 0-1-3 +mysqld-bin.000001 Annotate_rows 1 INSERT INTO t1 VALUES (2) mysqld-bin.000001 Table_map 1 table_id: ### (test.t1) mysqld-bin.000001 Write_rows_v1 1 table_id: ### flags: STMT_END_F mysqld-bin.000001 Xid 1 COMMIT /* xid=### */ diff --git a/mysql-test/suite/galera/r/galera_log_bin.result b/mysql-test/suite/galera/r/galera_log_bin.result index 576a72eb55f..a6f0ef12be1 100644 --- a/mysql-test/suite/galera/r/galera_log_bin.result +++ b/mysql-test/suite/galera/r/galera_log_bin.result @@ -13,21 +13,24 @@ COUNT(*) = 2 connection node_1; ALTER TABLE t1 ADD COLUMN f2 INTEGER; FLUSH LOGS; -SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,18; +SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,21; Log_name Pos Event_type Server_id End_log_pos Info mysqld-bin.000002 # Gtid # # GTID 0-1-1 mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-2 +mysqld-bin.000002 # Annotate_rows # # INSERT INTO t1 VALUES (1) mysqld-bin.000002 # Table_map # # table_id: # (test.t1) mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000002 # Xid # # COMMIT /* xid=# */ mysqld-bin.000002 # Gtid # # GTID 0-1-3 mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-4 +mysqld-bin.000002 # Annotate_rows # # INSERT INTO t2 VALUES (1) mysqld-bin.000002 # Table_map # # table_id: # (test.t2) mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000002 # Xid # # COMMIT /* xid=# */ mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-5 +mysqld-bin.000002 # Annotate_rows # # INSERT INTO t2 VALUES (1) mysqld-bin.000002 # Table_map # # table_id: # (test.t2) mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000002 # Xid # # COMMIT /* xid=# */ @@ -37,21 +40,24 @@ connection node_2; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; COUNT(*) = 2 1 -SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,18; +SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,21; Log_name Pos Event_type Server_id End_log_pos Info mysqld-bin.000003 # Gtid # # GTID 0-1-1 mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-2 +mysqld-bin.000003 # Annotate_rows # # INSERT INTO t1 VALUES (1) mysqld-bin.000003 # Table_map # # table_id: # (test.t1) mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000003 # Xid # # COMMIT /* xid=# */ mysqld-bin.000003 # Gtid # # GTID 0-1-3 mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-4 +mysqld-bin.000003 # Annotate_rows # # INSERT INTO t2 VALUES (1) mysqld-bin.000003 # Table_map # # table_id: # (test.t2) mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000003 # Xid # # COMMIT /* xid=# */ mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-5 +mysqld-bin.000003 # Annotate_rows # # INSERT INTO t2 VALUES (1) mysqld-bin.000003 # Table_map # # table_id: # (test.t2) mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000003 # Xid # # COMMIT /* xid=# */ diff --git a/mysql-test/suite/galera/r/galera_mdev_10812.result b/mysql-test/suite/galera/r/galera_mdev_10812.result new file mode 100644 index 00000000000..de0a08a3794 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_mdev_10812.result @@ -0,0 +1,16 @@ +# +# MDEV-10812: On COM_STMT_CLOSE/COM_QUIT, when wsrep_conflict_state +# is ABORTED, it causes wrong response to be sent to the client +# +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; +CREATE TABLE t1(a INT PRIMARY KEY); +INSERT INTO t1 VALUES(1),(2),(3); +START TRANSACTION ; +UPDATE t1 SET a=a+100; +connection node_2; +UPDATE t1 SET a=a+100; +connection node_1a; +disconnect node_1a; +connection node_2; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result index bf4b056a6e4..90349f493bd 100644 --- a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result +++ b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result @@ -11,7 +11,7 @@ SET SESSION wsrep_sync_wait=0; SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%applied write set%'; COUNT(*) = 1 1 -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table level lock%'; +SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock'; COUNT(*) = 1 1 SELECT COUNT(*) = 0 FROM t1; diff --git a/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result b/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result index 336f46fcd7e..44feeddcd48 100644 --- a/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result +++ b/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result @@ -13,15 +13,16 @@ INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;; connection node_1; connection node_1a; connection node_2; -SELECT COUNT(*) = 30000 FROM t1; -COUNT(*) = 30000 -1 -SELECT COUNT(DISTINCT f1) = 30000 FROM t1; -COUNT(DISTINCT f1) = 30000 -1 -SELECT COUNT(*) = 5 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; -COUNT(*) = 5 -1 +SELECT COUNT(*) FROM t1; +COUNT(*) +30000 +SELECT COUNT(DISTINCT f1) FROM t1; +COUNT(DISTINCT f1) +30000 +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE +USER = 'system user' AND NOT STATE <=> 'InnoDB background thread'; +COUNT(*) +5 connection default; DROP TABLE t1; DROP TABLE ten; diff --git a/mysql-test/suite/galera/r/galera_sbr.result b/mysql-test/suite/galera/r/galera_sbr.result index 61a58c9cb89..0bdaeef5b8a 100644 --- a/mysql-test/suite/galera/r/galera_sbr.result +++ b/mysql-test/suite/galera/r/galera_sbr.result @@ -1,12 +1,12 @@ connection node_1; SET SESSION binlog_format = 'STATEMENT'; Warnings: -Warning 1105 MariaDB Galera does not support binlog format: STATEMENT +Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); SET SESSION binlog_format = 'MIXED'; Warnings: -Warning 1105 MariaDB Galera does not support binlog format: MIXED +Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED INSERT INTO t1 VALUES (2); connection node_2; SELECT COUNT(*) = 2 FROM t1; diff --git a/mysql-test/suite/galera/r/galera_sbr_binlog.result b/mysql-test/suite/galera/r/galera_sbr_binlog.result index 61a58c9cb89..0bdaeef5b8a 100644 --- a/mysql-test/suite/galera/r/galera_sbr_binlog.result +++ b/mysql-test/suite/galera/r/galera_sbr_binlog.result @@ -1,12 +1,12 @@ connection node_1; SET SESSION binlog_format = 'STATEMENT'; Warnings: -Warning 1105 MariaDB Galera does not support binlog format: STATEMENT +Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); SET SESSION binlog_format = 'MIXED'; Warnings: -Warning 1105 MariaDB Galera does not support binlog format: MIXED +Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED INSERT INTO t1 VALUES (2); connection node_2; SELECT COUNT(*) = 2 FROM t1; diff --git a/mysql-test/suite/galera/r/galera_sync_wait_show.result b/mysql-test/suite/galera/r/galera_sync_wait_show.result index 4c104eb54d8..e0783e42174 100644 --- a/mysql-test/suite/galera/r/galera_sync_wait_show.result +++ b/mysql-test/suite/galera/r/galera_sync_wait_show.result @@ -12,7 +12,7 @@ CREATE PROCEDURE p1 () SELECT 1 FROM DUAL; connection node_2; SHOW CREATE PROCEDURE p1; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +p1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() SELECT 1 FROM DUAL latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE p1; connection node_1; @@ -27,7 +27,7 @@ CREATE FUNCTION f1 () RETURNS INTEGER RETURN 123; connection node_2; SHOW CREATE FUNCTION f1; Function sql_mode Create Function character_set_client collation_connection Database Collation -f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) +f1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) RETURN 123 latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION f1; connection node_1; @@ -43,12 +43,12 @@ CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a'; connection node_2; SHOW CREATE TRIGGER tr1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -tr1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a' latin1 latin1_swedish_ci latin1_swedish_ci # +tr1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a' latin1 latin1_swedish_ci latin1_swedish_ci # DROP TABLE t1; connection node_1; CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1; connection node_2; SHOW CREATE EVENT event1; Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation -event1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `event1` ON SCHEDULE AT '2038-01-01 23:59:59' ON COMPLETION NOT PRESERVE DISABLE ON SLAVE DO SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci +event1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `event1` ON SCHEDULE AT '2038-01-01 23:59:59' ON COMPLETION NOT PRESERVE DISABLE ON SLAVE DO SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci DROP EVENT event1; diff --git a/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result b/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result index b13302d3ecd..ca3844bf6bf 100644 --- a/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result +++ b/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result @@ -24,3 +24,7 @@ connection node_2; SET GLOBAL wsrep_certify_nonPK = 1; DROP TABLE t1; DROP TABLE t2; +connection node_1; +call mtr.add_suppression("SQL statement was ineffective"); +disconnect node_2; +disconnect node_1; diff --git a/mysql-test/suite/galera/r/galera_var_cluster_address.result b/mysql-test/suite/galera/r/galera_var_cluster_address.result index ef75cf21a79..251a73a6f9a 100644 --- a/mysql-test/suite/galera/r/galera_var_cluster_address.result +++ b/mysql-test/suite/galera/r/galera_var_cluster_address.result @@ -45,3 +45,4 @@ CALL mtr.add_suppression("gcs connect failed: Connection timed out"); CALL mtr.add_suppression("WSREP: wsrep::connect\\(foo://\\) failed: 7"); disconnect node_2; disconnect node_1; +# End of test diff --git a/mysql-test/suite/galera/r/galera_var_dirty_reads.result b/mysql-test/suite/galera/r/galera_var_dirty_reads.result index 118e2ca3019..0bc30f4092c 100644 --- a/mysql-test/suite/galera/r/galera_var_dirty_reads.result +++ b/mysql-test/suite/galera/r/galera_var_dirty_reads.result @@ -21,6 +21,15 @@ Variable_name Value wsrep_cluster_status non-Primary SELECT * FROM t1; ERROR 08S01: WSREP has not yet prepared node for application use +SELECT @@wsrep_dirty_reads; +@@wsrep_dirty_reads +0 +SELECT 2; +2 +2 +SELECT 2+2 FROM DUAL; +2+2 +4 SET @@session.wsrep_dirty_reads=ON; SELECT * FROM t1; i diff --git a/mysql-test/suite/galera/r/galera_var_max_ws_rows.result b/mysql-test/suite/galera/r/galera_var_max_ws_rows.result index 6e239c70a3e..6bf67a3fb60 100644 --- a/mysql-test/suite/galera/r/galera_var_max_ws_rows.result +++ b/mysql-test/suite/galera/r/galera_var_max_ws_rows.result @@ -113,3 +113,28 @@ INSERT INTO t1 (f2) VALUES (2); ERROR HY000: wsrep_max_ws_rows exceeded DROP TABLE t1; DROP TABLE ten; +# +# MDEV-11817: Altering a table with more rows than +# wsrep_max_ws_rows causes cluster to break when running +# Galera cluster in TOI mode +# +connection node_1; +CREATE TABLE t1(c1 INT)ENGINE = INNODB; +SET GLOBAL wsrep_max_ws_rows= DEFAULT; +INSERT INTO t1 VALUES(1); +INSERT INTO t1 SELECT * FROM t1; +SET GLOBAL wsrep_max_ws_rows= 1; +ALTER TABLE t1 CHANGE COLUMN c1 c1 BIGINT; +connection node_2; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT COUNT(*) FROM t1; +COUNT(*) +2 +DROP TABLE t1; +connection node_1; +disconnect node_2; +disconnect node_1; diff --git a/mysql-test/suite/galera/r/galera_var_slave_threads.result b/mysql-test/suite/galera/r/galera_var_slave_threads.result index facc083544c..030f6c13b0a 100644 --- a/mysql-test/suite/galera/r/galera_var_slave_threads.result +++ b/mysql-test/suite/galera/r/galera_var_slave_threads.result @@ -12,24 +12,26 @@ SELECT @@wsrep_slave_threads = 1; @@wsrep_slave_threads = 1 1 SET GLOBAL wsrep_slave_threads = 1; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; -COUNT(*) = 1 +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST +WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread'; +COUNT(*) +2 +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; +COUNT(*) 1 SET GLOBAL wsrep_slave_threads = 64; connection node_1; INSERT INTO t1 VALUES (1); connection node_2; -SELECT COUNT(*) = 1 FROM t1; -COUNT(*) = 1 +SELECT COUNT(*) FROM t1; +COUNT(*) 1 -SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; -COUNT(*) = @@wsrep_slave_threads + 1 +SELECT COUNT(*) - @@wsrep_slave_threads FROM INFORMATION_SCHEMA.PROCESSLIST +WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread'; +COUNT(*) - @@wsrep_slave_threads 1 -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; -COUNT(*) = 1 +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; +COUNT(*) 1 SET GLOBAL wsrep_slave_threads = 1; connection node_1; @@ -98,14 +100,15 @@ INSERT INTO t2 VALUES (DEFAULT); INSERT INTO t2 VALUES (DEFAULT); INSERT INTO t2 VALUES (DEFAULT); connection node_2; -SELECT COUNT(*) = 64 FROM t2; -COUNT(*) = 64 +SELECT COUNT(*) FROM t2; +COUNT(*) +64 +SELECT COUNT(*) - @@wsrep_slave_threads FROM INFORMATION_SCHEMA.PROCESSLIST +WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread'; +COUNT(*) - @@wsrep_slave_threads 1 -SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; -COUNT(*) = @@wsrep_slave_threads + 1 -1 -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; -COUNT(*) = 1 +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; +COUNT(*) 1 SET GLOBAL wsrep_slave_threads = 1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/lp1347768.result b/mysql-test/suite/galera/r/lp1347768.result index c085059e014..7beb167d538 100644 --- a/mysql-test/suite/galera/r/lp1347768.result +++ b/mysql-test/suite/galera/r/lp1347768.result @@ -11,7 +11,7 @@ PRIMARY KEY (`id`), UNIQUE KEY `idx_link_old` (`old_url`), KEY `idx_link_modifed` (`modified_date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -INSERT INTO r8kmb_redirect_links VALUES (550,'http://mysite.com/images/download/ßуñûічýøù_ôþóþòір_þфõÑ.doc','','','',0,'2013-07-15 14:29:42','0000-00-00 00:00:00'); +INSERT IGNORE INTO r8kmb_redirect_links VALUES (550,'http://mysite.com/images/download/ßуñûічýøù_ôþóþòір_þфõÑ.doc','','','',0,'2013-07-15 14:29:42','0000-00-00 00:00:00'); Warnings: Warning 1265 Data truncated for column 'old_url' at row 1 DROP TABLE r8kmb_redirect_links; diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm index 2da2b3ad503..a161301d8ff 100644 --- a/mysql-test/suite/galera/suite.pm +++ b/mysql-test/suite/galera/suite.pm @@ -32,7 +32,6 @@ push @::global_suppressions, qr(WSREP:.*down context.*), qr(WSREP: Failed to send state UUID:), qr(WSREP: last inactive check more than .* skipping check), - qr(WSREP: SQL statement was ineffective), qr(WSREP: Releasing seqno [0-9]* before [0-9]* was assigned.), qr|WSREP: access file\(.*gvwstate.dat\) failed\(No such file or directory\)|, qr(WSREP: Quorum: No node with complete state), @@ -67,6 +66,7 @@ push @::global_suppressions, qr|WSREP: gcs_caused\(\) returned .*|, qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|, qr(WSREP: Action message in non-primary configuration from member [0-9]*), + qr(WSREP: discarding established .*), ); diff --git a/mysql-test/suite/galera/t/MW-258.test b/mysql-test/suite/galera/t/MW-258.test index f5519f8a081..f00b82d6bb4 100644 --- a/mysql-test/suite/galera/t/MW-258.test +++ b/mysql-test/suite/galera/t/MW-258.test @@ -34,6 +34,7 @@ UNLOCK TABLES; --connection node_1 --echo value after RSU: +--sleep 2 SHOW STATUS LIKE 'wsrep_desync_count'; SHOW VARIABLES LIKE 'wsrep_desync'; SET GLOBAL wsrep_desync=0; diff --git a/mysql-test/suite/galera/t/MW-284.test b/mysql-test/suite/galera/t/MW-284.test index f3ce1b0dc91..7add82f1227 100644 --- a/mysql-test/suite/galera/t/MW-284.test +++ b/mysql-test/suite/galera/t/MW-284.test @@ -11,12 +11,16 @@ --enable_query_log --connection node_1 +--let $wsrep_sync_wait_state= `SELECT @@global.wsrep_sync_wait;` CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; SET SESSION wsrep_on = OFF; --let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status' --source include/wait_condition.inc SET SESSION wsrep_on = ON; +#wsrep_sync_wait is set to zero because when slave tries to connect it it ask for queries like SELECT UNIX_TIMESTAMP() on node 1 which will fail, causing +#a warning in slave error log. +SET global wsrep_sync_wait=0; --connection node_3 START SLAVE; @@ -47,6 +51,7 @@ INSERT INTO t1 VALUES (1); --connection node_1 DROP TABLE t1; +--eval SET global wsrep_sync_wait=$wsrep_sync_wait_state --connection node_3 --let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1' --source include/wait_condition.inc diff --git a/mysql-test/suite/galera/t/MW-44.test b/mysql-test/suite/galera/t/MW-44.test index 55a3fd57f80..133676b9141 100644 --- a/mysql-test/suite/galera/t/MW-44.test +++ b/mysql-test/suite/galera/t/MW-44.test @@ -8,9 +8,11 @@ --connection node_1 TRUNCATE TABLE mysql.general_log; +--sleep 1 --connection node_2 TRUNCATE TABLE mysql.general_log; +--sleep 1 --connection node_1 SET SESSION wsrep_osu_method=TOI; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; diff --git a/mysql-test/suite/galera/t/galera_as_master.test b/mysql-test/suite/galera/t/galera_as_master.test index 93f9224b258..a56fb6dc976 100644 --- a/mysql-test/suite/galera/t/galera_as_master.test +++ b/mysql-test/suite/galera/t/galera_as_master.test @@ -27,6 +27,7 @@ CREATE TABLE test.t3 AS SELECT * from t1; SET SQL_LOG_BIN=ON; INSERT INTO t1 VALUES(3); CREATE TABLE test.t4 AS SELECT * from t1; +--save_master_pos --connection node_2 SELECT * FROM t1; @@ -35,28 +36,21 @@ SELECT * FROM t3; SELECT * FROM t4; --connection node_3 +--sync_with_master SHOW TABLES; ---let $wait_condition = SELECT COUNT(*) = 2 FROM t1; ---source include/wait_condition.inc - ---let $wait_condition = SELECT COUNT(*) = 3 FROM t4; ---source include/wait_condition.inc - SELECT * FROM t1; SELECT * FROM t4; --echo # Cleanup --connection node_1 DROP TABLE t1, t4; +--save_master_pos SET SQL_LOG_BIN=OFF; DROP TABLE t2, t3; --connection node_3 ---let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; ---source include/wait_condition.inc ---let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't4'; ---source include/wait_condition.inc +--sync_with_master STOP SLAVE; RESET SLAVE ALL; diff --git a/mysql-test/suite/galera/t/galera_enum.test b/mysql-test/suite/galera/t/galera_enum.test index ff5332486aa..2497f717ef2 100644 --- a/mysql-test/suite/galera/t/galera_enum.test +++ b/mysql-test/suite/galera/t/galera_enum.test @@ -14,7 +14,7 @@ CREATE TABLE t1 (f1 ENUM('', 'one', 'two'), KEY (f1)) ENGINE=InnoDB; INSERT INTO t1 VALUES (''); INSERT INTO t1 VALUES ('one'), ('two'); -INSERT INTO t1 VALUES (0), (1), (2); +INSERT IGNORE INTO t1 VALUES (0), (1), (2); --connection node_2 SELECT COUNT(*) = 6 FROM t1; diff --git a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test index 721d84ecb05..dc65a452d7c 100644 --- a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test +++ b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test @@ -19,10 +19,13 @@ SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; LOCK TABLE t1 WRITE; --connection node_1 - +--sleep 1 INSERT INTO t1 VALUES (2); +--sleep 1 INSERT INTO t1 VALUES (3); +--sleep 1 INSERT INTO t1 VALUES (4); +--sleep 1 # This query will hang because flow control will kick in --send diff --git a/mysql-test/suite/galera/t/galera_kill_applier.test b/mysql-test/suite/galera/t/galera_kill_applier.test index e14a8b9af23..71a46114970 100644 --- a/mysql-test/suite/galera/t/galera_kill_applier.test +++ b/mysql-test/suite/galera/t/galera_kill_applier.test @@ -7,7 +7,7 @@ --connection node_1 ---let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE != 'wsrep aborter idle' OR STATE IS NULL LIMIT 1` +--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND NOT STATE <=> 'wsrep aborter idle' AND NOT STATE <=> 'InnoDB background thread' LIMIT 1` --disable_query_log --error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR diff --git a/mysql-test/suite/galera/t/galera_lock_table.test b/mysql-test/suite/galera/t/galera_lock_table.test index bd581842f6f..0bcaf646917 100644 --- a/mysql-test/suite/galera/t/galera_lock_table.test +++ b/mysql-test/suite/galera/t/galera_lock_table.test @@ -11,6 +11,8 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB; +--sleep 1 + --connection node_2 LOCK TABLE t1 READ; diff --git a/mysql-test/suite/galera/t/galera_log_bin.test b/mysql-test/suite/galera/t/galera_log_bin.test index d2d3987d711..2f0faa761c5 100644 --- a/mysql-test/suite/galera/t/galera_log_bin.test +++ b/mysql-test/suite/galera/t/galera_log_bin.test @@ -24,13 +24,13 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER; FLUSH LOGS; --replace_column 2 # 4 # 5 # --replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/ -SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,18; +SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,21; --connection node_2 SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; --replace_column 2 # 4 # 5 # --replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/ -SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,18; +SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,21; DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/galera/t/galera_mdev_10812.test b/mysql-test/suite/galera/t/galera_mdev_10812.test new file mode 100644 index 00000000000..4539ab6c84d --- /dev/null +++ b/mysql-test/suite/galera/t/galera_mdev_10812.test @@ -0,0 +1,27 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--echo # +--echo # MDEV-10812: On COM_STMT_CLOSE/COM_QUIT, when wsrep_conflict_state +--echo # is ABORTED, it causes wrong response to be sent to the client +--echo # + +# First create a deadlock +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; +CREATE TABLE t1(a INT PRIMARY KEY); +INSERT INTO t1 VALUES(1),(2),(3); +START TRANSACTION ; +UPDATE t1 SET a=a+100; + +--sleep 2 +--connection node_2 +UPDATE t1 SET a=a+100; + +--sleep 2 +--connection node_1a +# here we get deadlock error +--disconnect node_1a + +--connection node_2 +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test b/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test index febb91a9725..08ed3fac67e 100644 --- a/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test +++ b/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test @@ -33,7 +33,7 @@ INSERT INTO t2 VALUES (1); --sleep 1 SET SESSION wsrep_sync_wait=0; SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%applied write set%'; -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table level lock%'; +SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock'; SELECT COUNT(*) = 0 FROM t1; SELECT COUNT(*) = 0 FROM t2; diff --git a/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test b/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test index f280e49d206..4e3da64489a 100644 --- a/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test +++ b/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test @@ -37,9 +37,10 @@ SET GLOBAL wsrep_slave_threads = 4; --connection node_2 --reap -SELECT COUNT(*) = 30000 FROM t1; -SELECT COUNT(DISTINCT f1) = 30000 FROM t1; -SELECT COUNT(*) = 5 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; +SELECT COUNT(*) FROM t1; +SELECT COUNT(DISTINCT f1) FROM t1; +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE + USER = 'system user' AND NOT STATE <=> 'InnoDB background thread'; --disable_query_log --eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig; diff --git a/mysql-test/suite/galera/t/galera_roles.test b/mysql-test/suite/galera/t/galera_roles.test index 16e417d1fdb..79951ad10c8 100644 --- a/mysql-test/suite/galera/t/galera_roles.test +++ b/mysql-test/suite/galera/t/galera_roles.test @@ -36,6 +36,7 @@ GRANT SELECT (a) ON test1.t2 TO role1; --connect(foo_node_1,127.0.0.1,foo,,test,$port_1,) --let $port_2= \$NODE_MYPORT_2 +--sleep 1 --connect(foo_node_2,127.0.0.1,foo,,test,$port_2,) --echo @@ -107,7 +108,7 @@ CALL test1.pr1(); --echo --echo # Connect with foo_node_2 --connection foo_node_2 - +--sleep 1 --error ER_PROCACCESS_DENIED_ERROR CALL test1.pr1(); diff --git a/mysql-test/suite/galera/t/galera_var_certify_nonPK_off.test b/mysql-test/suite/galera/t/galera_var_certify_nonPK_off.test index 3e8f3d18859..d2d16176e41 100644 --- a/mysql-test/suite/galera/t/galera_var_certify_nonPK_off.test +++ b/mysql-test/suite/galera/t/galera_var_certify_nonPK_off.test @@ -37,3 +37,7 @@ SELECT COUNT(*) = 1 FROM t2 WHERE f1 = 3; DROP TABLE t1; DROP TABLE t2; +--connection node_1 +call mtr.add_suppression("SQL statement was ineffective"); + +--source include/galera_end.inc diff --git a/mysql-test/suite/galera/t/galera_var_cluster_address.test b/mysql-test/suite/galera/t/galera_var_cluster_address.test index 4e5d138ae0a..740c38765f6 100644 --- a/mysql-test/suite/galera/t/galera_var_cluster_address.test +++ b/mysql-test/suite/galera/t/galera_var_cluster_address.test @@ -9,6 +9,7 @@ --let $node_1=node_1 --let $node_2=node_2 --source include/auto_increment_offset_save.inc + # # Set to invalid value # @@ -73,3 +74,4 @@ CALL mtr.add_suppression("WSREP: wsrep::connect\\(foo://\\) failed: 7"); --source include/auto_increment_offset_restore.inc --source include/galera_end.inc +--echo # End of test diff --git a/mysql-test/suite/galera/t/galera_var_dirty_reads.test b/mysql-test/suite/galera/t/galera_var_dirty_reads.test index bcdb1574a3d..1fd30c69a7b 100644 --- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test +++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test @@ -37,6 +37,11 @@ SHOW STATUS LIKE 'wsrep_cluster_status'; --error ER_UNKNOWN_COM_ERROR SELECT * FROM t1; +#Select query which does not access table should be allowed MDEV-11016 +SELECT @@wsrep_dirty_reads; +SELECT 2; +SELECT 2+2 FROM DUAL; + SET @@session.wsrep_dirty_reads=ON; SELECT * FROM t1; diff --git a/mysql-test/suite/galera/t/galera_var_max_ws_rows.test b/mysql-test/suite/galera/t/galera_var_max_ws_rows.test index 944238bf1aa..ab6a3390c06 100644 --- a/mysql-test/suite/galera/t/galera_var_max_ws_rows.test +++ b/mysql-test/suite/galera/t/galera_var_max_ws_rows.test @@ -146,10 +146,31 @@ INSERT INTO t1 (f2) VALUES (1); --error ER_ERROR_DURING_COMMIT INSERT INTO t1 (f2) VALUES (2); +DROP TABLE t1; +DROP TABLE ten; + +--echo # +--echo # MDEV-11817: Altering a table with more rows than +--echo # wsrep_max_ws_rows causes cluster to break when running +--echo # Galera cluster in TOI mode +--echo # +--connection node_1 +CREATE TABLE t1(c1 INT)ENGINE = INNODB; +SET GLOBAL wsrep_max_ws_rows= DEFAULT; +INSERT INTO t1 VALUES(1); +INSERT INTO t1 SELECT * FROM t1; +SET GLOBAL wsrep_max_ws_rows= 1; +ALTER TABLE t1 CHANGE COLUMN c1 c1 BIGINT; + +--connection node_2 +SHOW CREATE TABLE t1; +SELECT COUNT(*) FROM t1; +DROP TABLE t1; + +--connection node_1 --disable_query_log --eval SET GLOBAL wsrep_max_ws_rows = $wsrep_max_ws_rows_orig --enable_query_log -DROP TABLE t1; -DROP TABLE ten; +--source include/galera_end.inc diff --git a/mysql-test/suite/galera/t/galera_var_slave_threads.test b/mysql-test/suite/galera/t/galera_var_slave_threads.test index 50e22fbef66..7ebb787b3da 100644 --- a/mysql-test/suite/galera/t/galera_var_slave_threads.test +++ b/mysql-test/suite/galera/t/galera_var_slave_threads.test @@ -22,8 +22,9 @@ SELECT @@wsrep_slave_threads = 1; SET GLOBAL wsrep_slave_threads = 1; # There is a separate wsrep_aborter thread at all times -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST + WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread'; +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; # # Increase the number of slave threads. The change takes effect immediately @@ -36,10 +37,11 @@ SET GLOBAL wsrep_slave_threads = 64; INSERT INTO t1 VALUES (1); --connection node_2 -SELECT COUNT(*) = 1 FROM t1; +SELECT COUNT(*) FROM t1; -SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; +SELECT COUNT(*) - @@wsrep_slave_threads FROM INFORMATION_SCHEMA.PROCESSLIST + WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread'; +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; # # Reduce the number of slave threads. The change is not immediate -- a thread will only exit after a replication event @@ -58,10 +60,11 @@ while ($count) } --connection node_2 -SELECT COUNT(*) = 64 FROM t2; +SELECT COUNT(*) FROM t2; -SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; +SELECT COUNT(*) - @@wsrep_slave_threads FROM INFORMATION_SCHEMA.PROCESSLIST + WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread'; +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; --eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig diff --git a/mysql-test/suite/galera/t/lp1347768.test b/mysql-test/suite/galera/t/lp1347768.test index 96d42867c6a..ad5f5e9c38c 100644 --- a/mysql-test/suite/galera/t/lp1347768.test +++ b/mysql-test/suite/galera/t/lp1347768.test @@ -19,6 +19,6 @@ CREATE TABLE `r8kmb_redirect_links` ( KEY `idx_link_modifed` (`modified_date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -INSERT INTO r8kmb_redirect_links VALUES (550,'http://mysite.com/images/download/ßуñûічýøù_ôþóþòір_þфõÑ.doc','','','',0,'2013-07-15 14:29:42','0000-00-00 00:00:00'); +INSERT IGNORE INTO r8kmb_redirect_links VALUES (550,'http://mysite.com/images/download/ßуñûічýøù_ôþóþòір_þфõÑ.doc','','','',0,'2013-07-15 14:29:42','0000-00-00 00:00:00'); DROP TABLE r8kmb_redirect_links; diff --git a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc index bd84ace62ec..f132c2f2f63 100644 --- a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc +++ b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc @@ -269,10 +269,12 @@ ALTER TABLE t1 DROP PRIMARY KEY , ADD KEY idx ( col5, col2 ); DROP TABLE t1; --echo # Bug#20949226:i CAN ASSIGN NON-DEFAULT() VALUE TO GENERATED COLUMN --echo # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5 AS c2; CREATE TABLE t2 (a int); INSERT INTO t2 values(1); DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, a AS c2 from t2; DROP TABLE t1; CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5; diff --git a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc index 4b3431eea2e..7fde9c2e852 100644 --- a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc +++ b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc @@ -47,7 +47,7 @@ delete from t1; select * from t1; --echo # INSERT INTO tbl_name VALUES... a non-NULL value is specified against gcols -insert into t1 values (1,2,3); +insert ignore into t1 values (1,2,3); select * from t1; delete from t1; select * from t1; @@ -73,7 +73,7 @@ select * from t1; --echo # INSERT INTO tbl_name () VALUES... a non-NULL value is specified --echo # against gcols -insert into t1 (a,b) values (1,3), (2,4); +insert ignore into t1 (a,b) values (1,3), (2,4); select * from t1; delete from t1; select * from t1; @@ -131,7 +131,7 @@ select * from t1; --echo # UPDATE tbl_name SET gcol=expr WHERE non-gcol=expr insert into t1 (a) values (1), (2); select * from t1 order by a; -update t1 set c=3 where a=2; +update ignore t1 set c=3 where a=2; select * from t1 order by a; delete from t1; select * from t1; @@ -147,7 +147,7 @@ select * from t1; --echo # UPDATE tbl_name SET gcol=expr WHERE gcol=expr insert into t1 (a) values (1), (2); select * from t1 order by a; -update t1 set c=3 where b=-2; +update ignore t1 set c=3 where b=-2; select * from t1 order by a; delete from t1; select * from t1; @@ -493,7 +493,7 @@ b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL, KEY (a(183),b) ); -INSERT INTO t VALUES(), (), (); +INSERT IGNORE INTO t VALUES(), (), (); DELETE IGNORE FROM t; @@ -512,7 +512,7 @@ CREATE TABLE t ( UNIQUE(b), UNIQUE(b1) ); -INSERT INTO t VALUES(); +INSERT IGNORE INTO t VALUES(); SELECT b from t; SELECT b1 from t; SELECT * from t; diff --git a/mysql-test/suite/gcol/inc/gcol_keys.inc b/mysql-test/suite/gcol/inc/gcol_keys.inc index 7f888ef54a5..8b6712e9302 100644 --- a/mysql-test/suite/gcol/inc/gcol_keys.inc +++ b/mysql-test/suite/gcol/inc/gcol_keys.inc @@ -676,6 +676,7 @@ INSERT INTO t(a) VALUES (1); # Before index was created, this query returned the expected one match. SELECT * FROM t WHERE c = '0'; # Adding an index sometimes crashed, other times populated it with garbage ... +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t ADD UNIQUE INDEX (c(1)); # ... so that this query found no match in the index. SELECT * FROM t WHERE c = '0'; @@ -689,8 +690,9 @@ CREATE TABLE t (a INT, b INT, h VARCHAR(10)); INSERT INTO t VALUES (12, 3, "ss"); INSERT INTO t VALUES (13, 4, "ss"); INSERT INTO t VALUES (14, 0, "ss"); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t ADD c INT GENERATED ALWAYS AS (a/b) VIRTUAL; -#--error ER_DIVISION_BY_ZERO +--error ER_DIVISION_BY_ZERO CREATE INDEX idx ON t(c); CALL mtr.add_suppression("\\[Warning\\] InnoDB: Compute virtual column values failed"); DROP TABLE t; diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result index 37be09b221f..c4a54999614 100644 --- a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result @@ -354,12 +354,14 @@ ERROR 42000: Can't DROP INDEX `PRIMARY`; check that it exists DROP TABLE t1; # Bug#20949226:i CAN ASSIGN NON-DEFAULT() VALUE TO GENERATED COLUMN # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5 AS c2; Warnings: Warning 1906 The value specified for generated column 'c2' in table 't1' ignored CREATE TABLE t2 (a int); INSERT INTO t2 values(1); DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, a AS c2 from t2; Warnings: Warning 1906 The value specified for generated column 'c2' in table 't1' ignored diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result index f6d0830ee3d..0f66b3ad779 100644 --- a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result @@ -354,12 +354,14 @@ ERROR 42000: Can't DROP INDEX `PRIMARY`; check that it exists DROP TABLE t1; # Bug#20949226:i CAN ASSIGN NON-DEFAULT() VALUE TO GENERATED COLUMN # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5 AS c2; Warnings: Warning 1906 The value specified for generated column 'c2' in table 't1' ignored CREATE TABLE t2 (a int); INSERT INTO t2 values(1); DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, a AS c2 from t2; Warnings: Warning 1906 The value specified for generated column 'c2' in table 't1' ignored diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result index 192016ba8df..3c2e4d3dd0a 100644 --- a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result @@ -23,7 +23,7 @@ delete from t1; select * from t1; a b c # INSERT INTO tbl_name VALUES... a non-NULL value is specified against gcols -insert into t1 values (1,2,3); +insert ignore into t1 values (1,2,3); Warnings: Warning 1906 The value specified for generated column 'b' in table 't1' ignored Warning 1906 The value specified for generated column 'c' in table 't1' ignored @@ -63,7 +63,7 @@ select * from t1; a b c # INSERT INTO tbl_name () VALUES... a non-NULL value is specified # against gcols -insert into t1 (a,b) values (1,3), (2,4); +insert ignore into t1 (a,b) values (1,3), (2,4); Warnings: Warning 1906 The value specified for generated column 'b' in table 't1' ignored Warning 1906 The value specified for generated column 'b' in table 't1' ignored @@ -151,7 +151,7 @@ select * from t1 order by a; a b c 1 -1 -1 2 -2 -2 -update t1 set c=3 where a=2; +update ignore t1 set c=3 where a=2; Warnings: Warning 1906 The value specified for generated column 'c' in table 't1' ignored select * from t1 order by a; @@ -181,7 +181,7 @@ select * from t1 order by a; a b c 1 -1 -1 2 -2 -2 -update t1 set c=3 where b=-2; +update ignore t1 set c=3 where b=-2; Warnings: Warning 1906 The value specified for generated column 'c' in table 't1' ignored select * from t1 order by a; diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result index b30eb709c47..4d62a5d7a82 100644 --- a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result @@ -23,7 +23,7 @@ delete from t1; select * from t1; a b c # INSERT INTO tbl_name VALUES... a non-NULL value is specified against gcols -insert into t1 values (1,2,3); +insert ignore into t1 values (1,2,3); Warnings: Warning 1906 The value specified for generated column 'b' in table 't1' ignored Warning 1906 The value specified for generated column 'c' in table 't1' ignored @@ -63,7 +63,7 @@ select * from t1; a b c # INSERT INTO tbl_name () VALUES... a non-NULL value is specified # against gcols -insert into t1 (a,b) values (1,3), (2,4); +insert ignore into t1 (a,b) values (1,3), (2,4); Warnings: Warning 1906 The value specified for generated column 'b' in table 't1' ignored Warning 1906 The value specified for generated column 'b' in table 't1' ignored @@ -151,7 +151,7 @@ select * from t1 order by a; a b c 1 -1 -1 2 -2 -2 -update t1 set c=3 where a=2; +update ignore t1 set c=3 where a=2; Warnings: Warning 1906 The value specified for generated column 'c' in table 't1' ignored select * from t1 order by a; @@ -181,7 +181,7 @@ select * from t1 order by a; a b c 1 -1 -1 2 -2 -2 -update t1 set c=3 where b=-2; +update ignore t1 set c=3 where b=-2; Warnings: Warning 1906 The value specified for generated column 'c' in table 't1' ignored select * from t1 order by a; @@ -549,7 +549,7 @@ a BLOB GENERATED ALWAYS AS ('') VIRTUAL, b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL, KEY (a(183),b) ); -INSERT INTO t VALUES(), (), (); +INSERT IGNORE INTO t VALUES(), (), (); Warnings: Warning 1265 Data truncated for column 'b' at row 1 Warning 1265 Data truncated for column 'b' at row 2 @@ -568,7 +568,7 @@ c1 YEAR GENERATED ALWAYS AS ('aaaa') STORED, UNIQUE(b), UNIQUE(b1) ); -INSERT INTO t VALUES(); +INSERT IGNORE INTO t VALUES(); SELECT b from t; b 2000 diff --git a/mysql-test/suite/gcol/r/gcol_keys_myisam.result b/mysql-test/suite/gcol/r/gcol_keys_myisam.result index a331b1d2154..8cd871162fd 100644 --- a/mysql-test/suite/gcol/r/gcol_keys_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_keys_myisam.result @@ -706,6 +706,7 @@ INSERT INTO t(a) VALUES (1); SELECT * FROM t WHERE c = '0'; a b c 1 127 0 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t ADD UNIQUE INDEX (c(1)); Warnings: Warning 1264 Out of range value for column 'b' at row 1 @@ -721,8 +722,10 @@ CREATE TABLE t (a INT, b INT, h VARCHAR(10)); INSERT INTO t VALUES (12, 3, "ss"); INSERT INTO t VALUES (13, 4, "ss"); INSERT INTO t VALUES (14, 0, "ss"); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t ADD c INT GENERATED ALWAYS AS (a/b) VIRTUAL; CREATE INDEX idx ON t(c); +ERROR 22012: Division by 0 CALL mtr.add_suppression("\\[Warning\\] InnoDB: Compute virtual column values failed"); DROP TABLE t; # diff --git a/mysql-test/suite/gcol/r/gcol_select_innodb.result b/mysql-test/suite/gcol/r/gcol_select_innodb.result index 24daadb0d5b..bc9bddad690 100644 --- a/mysql-test/suite/gcol/r/gcol_select_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_select_innodb.result @@ -520,14 +520,12 @@ ALTER TABLE t1 ADD COLUMN d SMALLINT AS (a) VIRTUAL; ALTER TABLE t1 DROP COLUMN d; ALTER TABLE t1 ADD COLUMN c INT AS(a) VIRTUAL; ALTER TABLE t1 CHANGE c c SMALLINT AS(a) VIRTUAL; -Warnings: -Warning 1264 Out of range value for column 'c' at row 1 +ERROR 22003: Out of range value for column 'c' at row 1 ALTER TABLE t1 MODIFY c TINYINT AS(a) VIRTUAL; -Warnings: -Warning 1264 Out of range value for column 'c' at row 1 +ERROR 22003: Out of range value for column 'c' at row 1 SELECT * FROM t1; a c -2147483647 127 +2147483647 2147483647 DROP TABLE t1; CREATE TABLE t1(a INT); INSERT INTO t1 VALUES(2147483647); @@ -538,12 +536,9 @@ ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. ALTER TABLE t1 ADD COLUMN e SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=NONE; ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED ALTER TABLE t1 ADD COLUMN f SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=SHARED; -Warnings: -Warning 1264 Out of range value for column 'f' at row 1 +ERROR 22003: Out of range value for column 'f' at row 1 ALTER TABLE t1 ADD COLUMN g SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=EXCLUSIVE; -Warnings: -Warning 1264 Out of range value for column 'f' at row 1 -Warning 1264 Out of range value for column 'g' at row 1 +ERROR 22003: Out of range value for column 'g' at row 1 DROP TABLE t1; # # Bug#21980430 GCOLS: CRASHING diff --git a/mysql-test/suite/gcol/r/gcol_select_myisam.result b/mysql-test/suite/gcol/r/gcol_select_myisam.result index d5e4bdabb38..d0fe7fbd0d4 100644 --- a/mysql-test/suite/gcol/r/gcol_select_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_select_myisam.result @@ -1122,27 +1122,25 @@ DROP TABLE t2, t3; CREATE TABLE t1(a INT); INSERT INTO t1 VALUES(2147483647); ALTER TABLE t1 ADD COLUMN b SMALLINT AS (a) VIRTUAL; -Warnings: -Warning 1264 Out of range value for column 'b' at row 1 +ERROR 22003: Out of range value for column 'b' at row 1 ALTER TABLE t1 DROP COLUMN b; +ERROR 42000: Can't DROP COLUMN `b`; check that it exists ALTER TABLE t1 ADD COLUMN c SMALLINT AS (a) VIRTUAL; -Warnings: -Warning 1264 Out of range value for column 'c' at row 1 +ERROR 22003: Out of range value for column 'c' at row 1 ALTER TABLE t1 DROP COLUMN c; +ERROR 42000: Can't DROP COLUMN `c`; check that it exists ALTER TABLE t1 ADD COLUMN d SMALLINT AS (a) VIRTUAL; -Warnings: -Warning 1264 Out of range value for column 'd' at row 1 +ERROR 22003: Out of range value for column 'd' at row 1 ALTER TABLE t1 DROP COLUMN d; +ERROR 42000: Can't DROP COLUMN `d`; check that it exists ALTER TABLE t1 ADD COLUMN c INT AS(a) VIRTUAL; ALTER TABLE t1 CHANGE c c SMALLINT AS(a) VIRTUAL; -Warnings: -Warning 1264 Out of range value for column 'c' at row 1 +ERROR 22003: Out of range value for column 'c' at row 1 ALTER TABLE t1 MODIFY c TINYINT AS(a) VIRTUAL; -Warnings: -Warning 1264 Out of range value for column 'c' at row 1 +ERROR 22003: Out of range value for column 'c' at row 1 SELECT * FROM t1; a c -2147483647 127 +2147483647 2147483647 DROP TABLE t1; CREATE TABLE t1(a INT); INSERT INTO t1 VALUES(2147483647); @@ -1153,12 +1151,9 @@ ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. ALTER TABLE t1 ADD COLUMN e SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=NONE; ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED ALTER TABLE t1 ADD COLUMN f SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=SHARED; -Warnings: -Warning 1264 Out of range value for column 'f' at row 1 +ERROR 22003: Out of range value for column 'f' at row 1 ALTER TABLE t1 ADD COLUMN g SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=EXCLUSIVE; -Warnings: -Warning 1264 Out of range value for column 'f' at row 1 -Warning 1264 Out of range value for column 'g' at row 1 +ERROR 22003: Out of range value for column 'g' at row 1 DROP TABLE t1; # # Bug#21980430 GCOLS: CRASHING diff --git a/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result b/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result index 25e07e450d9..f8f447d493d 100644 --- a/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result @@ -273,10 +273,14 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 insert into t1 values (2,default); insert into t1 values (-2,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b -2 NULL 2 0.693147 +Warning 1365 Division by 0 +Warnings: drop table t1; set sql_warnings = 0; # LOG() @@ -292,11 +296,15 @@ t1 CREATE TABLE `t1` ( insert into t1 values (2,65536,default); insert into t1 values (10,100,default); insert into t1 values (1,100,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b c 1 100 NULL 10 100 2 2 65536 16 +Warning 1365 Division by 0 +Warnings: drop table t1; set sql_warnings = 0; set sql_warnings = 1; @@ -309,10 +317,14 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 insert into t1 values (2,default); insert into t1 values (-2,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b -2 NULL 2 0.693147 +Warning 1365 Division by 0 +Warnings: drop table t1; set sql_warnings = 0; # LOG2() @@ -326,10 +338,14 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 insert into t1 values (65536,default); insert into t1 values (-100,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b -100 NULL 65536 16 +Warning 1365 Division by 0 +Warnings: drop table t1; set sql_warnings = 0; # LOG10() @@ -344,11 +360,15 @@ t1 CREATE TABLE `t1` ( insert into t1 values (2,default); insert into t1 values (100,default); insert into t1 values (-100,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b -100 NULL 100 2 2 0.30103 +Warning 1365 Division by 0 +Warnings: drop table t1; set sql_warnings = 0; # - @@ -2264,11 +2284,8 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 insert into t1 values ('2003-02-05',default); insert into t1 values ('2003-02-32',default); -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a b -0000-00-00 00:00:00 NULL 2003-02-05 00:00:00 2003-02-28 00:00:00 drop table t1; set sql_warnings = 0; diff --git a/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result b/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result index 03be01c3229..9db5f0c7c38 100644 --- a/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result @@ -273,10 +273,14 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (2,default); insert into t1 values (-2,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b -2 NULL 2 0.693147 +Warning 1365 Division by 0 +Warnings: drop table t1; set sql_warnings = 0; # LOG() @@ -292,11 +296,15 @@ t1 CREATE TABLE `t1` ( insert into t1 values (2,65536,default); insert into t1 values (10,100,default); insert into t1 values (1,100,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b c 1 100 NULL 10 100 2 2 65536 16 +Warning 1365 Division by 0 +Warnings: drop table t1; set sql_warnings = 0; set sql_warnings = 1; @@ -309,10 +317,14 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (2,default); insert into t1 values (-2,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b -2 NULL 2 0.693147 +Warning 1365 Division by 0 +Warnings: drop table t1; set sql_warnings = 0; # LOG2() @@ -326,10 +338,14 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (65536,default); insert into t1 values (-100,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b -100 NULL 65536 16 +Warning 1365 Division by 0 +Warnings: drop table t1; set sql_warnings = 0; # LOG10() @@ -344,11 +360,15 @@ t1 CREATE TABLE `t1` ( insert into t1 values (2,default); insert into t1 values (100,default); insert into t1 values (-100,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b -100 NULL 100 2 2 0.30103 +Warning 1365 Division by 0 +Warnings: drop table t1; set sql_warnings = 0; # - @@ -2264,11 +2284,8 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('2003-02-05',default); insert into t1 values ('2003-02-32',default); -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a b -0000-00-00 00:00:00 NULL 2003-02-05 00:00:00 2003-02-28 00:00:00 drop table t1; set sql_warnings = 0; diff --git a/mysql-test/suite/gcol/r/innodb_virtual_basic.result b/mysql-test/suite/gcol/r/innodb_virtual_basic.result index 06a307fc761..7212dbcc16f 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_basic.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_basic.result @@ -209,7 +209,7 @@ CREATE TABLE t1(a INT); CREATE INDEX idx ON t1(a); CREATE TABLE t3(a INT, b INT , INDEX(b), CONSTRAINT x FOREIGN KEY(b) REFERENCES t1(a)); CREATE TABLE t2(a INT, b INT generated always as (a+1) virtual, INDEX(b), CONSTRAINT x FOREIGN KEY(b) REFERENCES t1(a)); -ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed") +ERROR HY000: Can't create table `test`.`t2` (errno: 121 "Duplicate key on write or update") CREATE TABLE t2(a INT, b INT generated always as (a+1) virtual, INDEX(b)); DROP TABLE t3; DROP TABLE t2; @@ -927,6 +927,8 @@ INSERT INTO t VALUES (13, 4, "ss"); INSERT INTO t VALUES (14, 0, "ss"); alter table t add c INT GENERATED ALWAYS AS(a/b); create index idx on t(c); +Warnings: +Warning 1365 Division by 0 DROP TABLE t; CREATE TABLE t ( pk INTEGER AUTO_INCREMENT, diff --git a/mysql-test/suite/gcol/r/innodb_virtual_fk.result b/mysql-test/suite/gcol/r/innodb_virtual_fk.result index 38a13edd8fa..17ea0341049 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_fk.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_fk.result @@ -345,7 +345,9 @@ FOREIGN KEY(fld1) REFERENCES t1(fld1) ON UPDATE CASCADE); INSERT INTO t1 VALUES(1), (2); INSERT INTO t2 VALUES(1, DEFAULT), (2, default); -UPDATE t1 SET fld1= 0 WHERE fld1= 2; +UPDATE IGNORE t1 SET fld1= 0 WHERE fld1= 2; +Warnings: +Warning 1365 Division by 0 SELECT fld2 FROM t2; fld2 NULL diff --git a/mysql-test/suite/gcol/t/innodb_virtual_fk.test b/mysql-test/suite/gcol/t/innodb_virtual_fk.test index bd8f3664839..78b2159e020 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_fk.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_fk.test @@ -291,7 +291,7 @@ CREATE TABLE t2(fld1 INT NOT NULL, INSERT INTO t1 VALUES(1), (2); INSERT INTO t2 VALUES(1, DEFAULT), (2, default); #--error ER_DIVISION_BY_ZERO -UPDATE t1 SET fld1= 0 WHERE fld1= 2; +UPDATE IGNORE t1 SET fld1= 0 WHERE fld1= 2; SELECT fld2 FROM t2; DROP TABLE t2, t1; diff --git a/mysql-test/suite/gcol/t/innodb_virtual_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_purge.test index f9fd02d970b..ab6ba52c2c3 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_purge.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_purge.test @@ -32,7 +32,7 @@ COMMIT; UPDATE t1 SET a=1; connection default; -# wait for purge to process the update_undo record. +# wait for purge to process the update_undo record (in debug builds) --source include/wait_innodb_all_purged.inc CHECK TABLE t1; @@ -118,7 +118,7 @@ COMMIT; disconnect con1; connection default; -# wait for purge to process the update_undo record. +# wait for purge to process the update_undo record (in debug builds) --source include/wait_innodb_all_purged.inc CHECK TABLE t1; diff --git a/mysql-test/suite/heap/heap.result b/mysql-test/suite/heap/heap.result index 4b88eed4bfc..9e97d5a17fb 100644 --- a/mysql-test/suite/heap/heap.result +++ b/mysql-test/suite/heap/heap.result @@ -299,6 +299,7 @@ t1 CREATE TABLE `t1` ( `c` varchar(10) DEFAULT NULL, `t` varchar(50) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify t varchar(10); Warnings: Warning 1265 Data truncated for column 't' at row 2 diff --git a/mysql-test/suite/heap/heap.test b/mysql-test/suite/heap/heap.test index c839cc48884..ea07d020e4d 100644 --- a/mysql-test/suite/heap/heap.test +++ b/mysql-test/suite/heap/heap.test @@ -224,6 +224,7 @@ alter table t1 modify c varchar(10); show create table t1; alter table t1 modify v char(10); show create table t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify t varchar(10); show create table t1; select concat('*',v,'*',c,'*',t,'*') from t1; diff --git a/mysql-test/suite/innodb/include/dml_ops.inc b/mysql-test/suite/innodb/include/dml_ops.inc new file mode 100644 index 00000000000..4908dfb6bee --- /dev/null +++ b/mysql-test/suite/innodb/include/dml_ops.inc @@ -0,0 +1,82 @@ +delimiter |; +create procedure populate_t1() +begin + declare i int default 1; + while (i <= 200) do + insert into t1 values (i, 'a', 'b'); + set i = i + 1; + end while; +end| +create procedure populate_t1_small() +begin + declare i int default 1; + while (i <= 20) do + insert into t1 values (i, 'c', 'd'); + set i = i + 1; + end while; +end| +create procedure populate_t1_small2() +begin + declare i int default 30; + while (i <= 50) do + insert into t1 values (i, 'e', 'f'); + set i = i + 1; + end while; +end| +delimiter ;| +# +begin; +select count(*) from t1; +call populate_t1(); +select count(*) from t1; +select * from t1 limit 10; +rollback; +select count(*) from t1; +# +begin; +call populate_t1(); +select count(*) from t1; +commit; +select count(*) from t1; +# +truncate table t1; +select count(*) from t1; +# +call populate_t1_small(); +select count(*) from t1; +rollback; +select count(*) from t1; +truncate table t1; +# +call populate_t1(); +select count(*) from t1; +delete from t1 where keyc <= 60; +select count(*) from t1; +call populate_t1_small(); +select count(*) from t1; +select * from t1 limit 10; +begin; +call populate_t1_small2(); +select count(*) from t1; +select * from t1 where keyc > 30 limit 10; +rollback; +select count(*) from t1; +select * from t1 where keyc > 30 limit 10; +# +update t1 set keyc = keyc + 2000; +select * from t1 limit 10; +rollback; +begin; +update t1 set keyc = keyc + 2000; +select * from t1 limit 10; +rollback; +select * from t1 limit 10; +commit; +select * from t1 limit 10; +# +insert into t2 select * from t1 where keyc < 2101; +select count(*) from t2; +# +drop procedure populate_t1; +drop procedure populate_t1_small; +drop procedure populate_t1_small2; diff --git a/mysql-test/suite/innodb/include/have_innodb_punchhole.inc b/mysql-test/suite/innodb/include/have_innodb_punchhole.inc new file mode 100644 index 00000000000..74cd5c4e0f2 --- /dev/null +++ b/mysql-test/suite/innodb/include/have_innodb_punchhole.inc @@ -0,0 +1,4 @@ +if (!`SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_have_punch_hole' AND variable_value = 'ON'`) +{ + --skip Test requires InnoDB compiled with fallocate(FALLOC_PUNCH_HOLE| FALLOC_KEEP_SIZE) +} diff --git a/mysql-test/suite/innodb/include/ibd_convert.pl b/mysql-test/suite/innodb/include/ibd_convert.pl new file mode 100644 index 00000000000..32eef96fd23 --- /dev/null +++ b/mysql-test/suite/innodb/include/ibd_convert.pl @@ -0,0 +1,25 @@ +#!/usr/bin/perl +# Convert tablespace flags to the format understood by MariaDB 10.1.0..10.1.20, +# with the assumption that the flags were correct. + +sub convert_to_mariadb_101 +{ + my ($file, $page_size) = @_; + open(FILE, "+<", $file) or die "Unable to open $file\n"; + sysread(FILE, $_, $page_size)==$page_size||die "Unable to read $file\n"; + sysseek(FILE, 0, 0)||die "Unable to seek $file\n"; + + # FIL_PAGE_DATA + FSP_SPACE_FLAGS = 38 + 16 = 54 bytes from the start + my($flags) = unpack "x[54]N", $_; + my $badflags = ($flags & 0x3f); + my $compression_level=6; + $badflags |= 1<<6|$compression_level<<7 if ($flags & 1 << 16); + $badflags |= ($flags & 15 << 6) << 7; # PAGE_SSIZE + + substr ($_, 54, 4) = pack("N", $badflags); + # Replace the innodb_checksum_algorithm=none checksum + substr ($_, 0, 4) = pack("N", 0xdeadbeef); + substr ($_, $page_size - 8, 4) = pack("N", 0xdeadbeef); + syswrite(FILE, $_, $page_size)==$page_size||die "Unable to write $file\n"; + close(FILE); +} diff --git a/mysql-test/suite/innodb/include/innodb_merge_threshold_delete.inc b/mysql-test/suite/innodb/include/innodb_merge_threshold_delete.inc new file mode 100644 index 00000000000..6aad7afa878 --- /dev/null +++ b/mysql-test/suite/innodb/include/innodb_merge_threshold_delete.inc @@ -0,0 +1,119 @@ +# +# Test to cause merge of the pages (by deleting) +# test/tab1 should be created already with innodb_file_per_table=ON +# The definition is intended to be based on +# "create table tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB;" +# + +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_innodb_16k.inc + +# turn on flags +--disable_query_log +SET GLOBAL innodb_monitor_enable=index_page_merge_attempts; +SET GLOBAL innodb_monitor_reset=index_page_merge_attempts; +SET GLOBAL innodb_monitor_enable=index_page_merge_successful; +SET GLOBAL innodb_monitor_reset=index_page_merge_successful; +--enable_query_log + +--echo # check MERGE_THRESHOLD +--replace_result tab1#P tab1#p +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; + +insert into tab1 values (1, repeat('a',2048)); +insert into tab1 values (2, repeat('a',2048)); +insert into tab1 values (3, repeat('a',2048)); +insert into tab1 values (8, repeat('a',2048)); +insert into tab1 values (9, repeat('a',2048)); +insert into tab1 values (10, repeat('a',2048)); +insert into tab1 values (11, repeat('a',2048)); +insert into tab1 values (12, repeat('a',2048)); +insert into tab1 values (4, repeat('a',2048)); +insert into tab1 values (5, repeat('a',2048)); +insert into tab1 values (6, repeat('a',2048)); +insert into tab1 values (7, repeat('a',2048)); +insert into tab1 values (13, repeat('a',2048)); +insert into tab1 values (14, repeat('a',2048)); + +# filled 2 leaf pages have been prepared +# | 1,..,7 | 8,..,14 | + +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; + +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 12; +delete from tab1 where a = 13; +delete from tab1 where a = 14; +delete from tab1 where a = 5; +delete from tab1 where a = 6; +delete from tab1 where a = 7; +set global innodb_purge_run_now=ON; + +# wait for purge view progress (records are deleted actually by purge) +--source include/wait_innodb_all_purged.inc + +# not merged yet +# | 1,2,3,4 | 8,9,10,11 | + +--echo # check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; + +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; + + +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 11; +set global innodb_purge_run_now=ON; +# wait for purge view progress (records are deleted actually by purge) +--source include/wait_innodb_all_purged.inc + +--echo # check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; + + +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 10; +set global innodb_purge_run_now=ON; +# wait for purge view progress (records are deleted actually by purge) +--source include/wait_innodb_all_purged.inc + +--echo # check page merge happens (MERGE_THRESHOLD=35 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; + + +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 9; +set global innodb_purge_run_now=ON; +# wait for purge view progress (records are deleted actually by purge) +--source include/wait_innodb_all_purged.inc + +--echo # check page merge happens (MERGE_THRESHOLD=25 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; + +--disable_query_log +# Reset flags +SET GLOBAL innodb_monitor_disable=index_page_merge_attempts; +SET GLOBAL innodb_monitor_disable=index_page_merge_successful; + +--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 +--enable_query_log diff --git a/mysql-test/suite/innodb/include/innodb_merge_threshold_secondary.inc b/mysql-test/suite/innodb/include/innodb_merge_threshold_secondary.inc new file mode 100644 index 00000000000..72242ea2e1b --- /dev/null +++ b/mysql-test/suite/innodb/include/innodb_merge_threshold_secondary.inc @@ -0,0 +1,165 @@ +# +# Test to cause merge of the pages (at secondary index by deleting) +# test/tab1 should be created already with innodb_file_per_table=ON +# The definition is intended to be based on +# "create table tab1 (a bigint primary key, b blob) engine=InnoDB row_format=dynamic;" +# "create index index1 on tab1(b(750));" +# + +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_innodb_16k.inc + +# turn on flags +--disable_query_log +SET GLOBAL innodb_monitor_enable=index_page_merge_attempts; +SET GLOBAL innodb_monitor_reset=index_page_merge_attempts; +SET GLOBAL innodb_monitor_enable=index_page_merge_successful; +SET GLOBAL innodb_monitor_reset=index_page_merge_successful; +--enable_query_log + +--echo # check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; + +INSERT INTO tab1 VALUES (1, concat("01", repeat('a',8190))); +INSERT INTO tab1 VALUES (2, concat("02", repeat('a',8190))); +INSERT INTO tab1 VALUES (3, concat("03", repeat('a',8190))); +INSERT INTO tab1 VALUES (4, concat("04", repeat('a',8190))); +INSERT INTO tab1 VALUES (5, concat("05", repeat('a',8190))); +INSERT INTO tab1 VALUES (6, concat("06", repeat('a',8190))); +INSERT INTO tab1 VALUES (7, concat("07", repeat('a',8190))); +INSERT INTO tab1 VALUES (8, concat("08", repeat('a',8190))); +INSERT INTO tab1 VALUES (9, concat("09", repeat('a',8190))); +INSERT INTO tab1 VALUES (10, concat("10", repeat('a',8190))); + +INSERT INTO tab1 VALUES (22, concat("22", repeat('a',8190))); +INSERT INTO tab1 VALUES (23, concat("23", repeat('a',8190))); +INSERT INTO tab1 VALUES (24, concat("24", repeat('a',8190))); +INSERT INTO tab1 VALUES (25, concat("25", repeat('a',8190))); +INSERT INTO tab1 VALUES (26, concat("26", repeat('a',8190))); +INSERT INTO tab1 VALUES (27, concat("27", repeat('a',8190))); +INSERT INTO tab1 VALUES (28, concat("28", repeat('a',8190))); +INSERT INTO tab1 VALUES (29, concat("29", repeat('a',8190))); +INSERT INTO tab1 VALUES (30, concat("30", repeat('a',8190))); +INSERT INTO tab1 VALUES (31, concat("31", repeat('a',8190))); +INSERT INTO tab1 VALUES (32, concat("32", repeat('a',8190))); +INSERT INTO tab1 VALUES (33, concat("33", repeat('a',8190))); + +INSERT INTO tab1 VALUES (11, concat("11", repeat('a',8190))); +INSERT INTO tab1 VALUES (12, concat("12", repeat('a',8190))); +INSERT INTO tab1 VALUES (13, concat("13", repeat('a',8190))); +INSERT INTO tab1 VALUES (14, concat("14", repeat('a',8190))); +INSERT INTO tab1 VALUES (15, concat("15", repeat('a',8190))); +INSERT INTO tab1 VALUES (16, concat("16", repeat('a',8190))); +INSERT INTO tab1 VALUES (17, concat("17", repeat('a',8190))); +INSERT INTO tab1 VALUES (18, concat("18", repeat('a',8190))); +INSERT INTO tab1 VALUES (19, concat("19", repeat('a',8190))); +INSERT INTO tab1 VALUES (20, concat("20", repeat('a',8190))); +INSERT INTO tab1 VALUES (21, concat("21", repeat('a',8190))); + +INSERT INTO tab1 VALUES (34, concat("34", repeat('a',8190))); +INSERT INTO tab1 VALUES (35, concat("35", repeat('a',8190))); +INSERT INTO tab1 VALUES (36, concat("36", repeat('a',8190))); +INSERT INTO tab1 VALUES (37, concat("37", repeat('a',8190))); +INSERT INTO tab1 VALUES (38, concat("38", repeat('a',8190))); +INSERT INTO tab1 VALUES (39, concat("39", repeat('a',8190))); +INSERT INTO tab1 VALUES (40, concat("40", repeat('a',8190))); +INSERT INTO tab1 VALUES (41, concat("41", repeat('a',8190))); +INSERT INTO tab1 VALUES (42, concat("42", repeat('a',8190))); + +# clustered index is still root page only with the 42 records. +# secondary index is filled 2 leaf pages have been prepared +# | 1,..,21 | 22,..,42 | + +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; + +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 33; +delete from tab1 where a = 34; +delete from tab1 where a = 35; +delete from tab1 where a = 36; +delete from tab1 where a = 37; +delete from tab1 where a = 38; +delete from tab1 where a = 39; +delete from tab1 where a = 40; +delete from tab1 where a = 41; +delete from tab1 where a = 42; +delete from tab1 where a = 12; +delete from tab1 where a = 13; +delete from tab1 where a = 14; +delete from tab1 where a = 15; +delete from tab1 where a = 16; +delete from tab1 where a = 17; +delete from tab1 where a = 18; +delete from tab1 where a = 19; +delete from tab1 where a = 20; +delete from tab1 where a = 21; +set global innodb_purge_run_now=ON; + +# wait for purge view progress (records are deleted actually by purge) +--source include/wait_innodb_all_purged.inc + +# secondary index is not merged yet +# | 1,..,11 | 22,..,32 | + +--echo # check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; + +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; + + +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 32; +set global innodb_purge_run_now=ON; +# wait for purge view progress (records are deleted actually by purge) +--source include/wait_innodb_all_purged.inc + +--echo # check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; + + +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 31; +set global innodb_purge_run_now=ON; +# wait for purge view progress (records are deleted actually by purge) +--source include/wait_innodb_all_purged.inc + +--echo # check page merge happens (MERGE_THRESHOLD=45 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; + + +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 30; +set global innodb_purge_run_now=ON; +# wait for purge view progress (records are deleted actually by purge) +--source include/wait_innodb_all_purged.inc + +--echo # check page merge happens (MERGE_THRESHOLD=40 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; + +--disable_query_log +# Reset flags +SET GLOBAL innodb_monitor_disable=index_page_merge_attempts; +SET GLOBAL innodb_monitor_disable=index_page_merge_successful; + +--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 +--enable_query_log diff --git a/mysql-test/suite/innodb/include/innodb_merge_threshold_update.inc b/mysql-test/suite/innodb/include/innodb_merge_threshold_update.inc new file mode 100644 index 00000000000..ff34cafd24a --- /dev/null +++ b/mysql-test/suite/innodb/include/innodb_merge_threshold_update.inc @@ -0,0 +1,101 @@ +# +# Test to cause merge of the pages (by updating to smaller) +# test/tab1 should be created already with innodb_file_per_table=ON +# The definition is intended to be based on +# "create table tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB;" +# + +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_innodb_16k.inc + +# turn on flags +--disable_query_log +SET GLOBAL innodb_monitor_enable=index_page_merge_attempts; +SET GLOBAL innodb_monitor_reset=index_page_merge_attempts; +SET GLOBAL innodb_monitor_enable=index_page_merge_successful; +SET GLOBAL innodb_monitor_reset=index_page_merge_successful; +--enable_query_log + +--echo # check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; + +insert into tab1 values (1, repeat('a',2048)); +insert into tab1 values (2, repeat('a',2048)); +insert into tab1 values (3, repeat('a',2048)); +insert into tab1 values (8, repeat('a',2048)); +insert into tab1 values (9, repeat('a',2048)); +insert into tab1 values (10, repeat('a',2048)); +insert into tab1 values (11, repeat('a',2048)); +insert into tab1 values (12, repeat('a',2048)); +insert into tab1 values (4, repeat('a',2048)); +insert into tab1 values (5, repeat('a',2048)); +insert into tab1 values (6, repeat('a',2048)); +insert into tab1 values (7, repeat('a',2048)); +insert into tab1 values (13, repeat('a',2048)); +insert into tab1 values (14, repeat('a',2048)); + +# filled 2 leaf pages have been prepared +# | 1,..,7 | 8,..,14 | + +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; + +update tab1 set b='' where a = 12; +update tab1 set b='' where a = 13; +update tab1 set b='' where a = 14; +update tab1 set b='' where a = 5; +update tab1 set b='' where a = 6; +update tab1 set b='' where a = 7; + +# not merged yet +# | 1,2,3,4 | 8,9,10,11 | + +--echo # check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; + +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; + + +update tab1 set b='' where a = 11; + +--echo # check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; + + +update tab1 set b='' where a = 10; + +--echo # check page merge happens (MERGE_THRESHOLD=35 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; + + +update tab1 set b='' where a = 9; + +--echo # check page merge happens (MERGE_THRESHOLD=25 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; + +--disable_query_log +# Reset flags +SET GLOBAL innodb_monitor_disable=index_page_merge_attempts; +SET GLOBAL innodb_monitor_disable=index_page_merge_successful; + +--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 +--enable_query_log diff --git a/mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc b/mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc index 75cab775528..d9c0294faf5 100644 --- a/mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc +++ b/mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc @@ -5,19 +5,10 @@ --source include/not_embedded.inc --source include/have_innodb.inc ---disable_query_log -# record the file format in order to restore in the end. ---let $file_format_save = `SELECT @@innodb_file_format` ---let $file_format_max_save = `SELECT @@innodb_file_format_max` --let $simulate_comp_failures_save = `SELECT @@innodb_simulate_comp_failures` ---disable_warnings -DROP TABLE IF EXISTS t1; -SET GLOBAL INNODB_FILE_FORMAT='Barracuda'; ---enable_warnings - -# since this test generates lot of errors in log, suppress checking errors -call mtr.add_suppression(".*"); +--disable_query_log +call mtr.add_suppression("InnoDB: Simulating a compression failure for table `test`\\.`t1`"); --enable_query_log # create the table with compressed pages of size 8K. @@ -156,9 +147,6 @@ COMMIT; # final cleanup DROP TABLE t1; -# restore innodb_file_format and innodb_file_format_max -eval SET GLOBAL innodb_file_format = \"$file_format_save\"; -eval SET GLOBAL innodb_file_format_max = \"$file_format_max_save\"; eval SET GLOBAL innodb_simulate_comp_failures = $simulate_comp_failures_save; --enable_query_log diff --git a/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc b/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc index 047be4dba34..93eca7ec060 100644 --- a/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc +++ b/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc @@ -37,7 +37,6 @@ call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'"); # create test-bed # let $per_table = `select @@innodb_file_per_table`; -let $format = `select @@innodb_file_format`; eval set global innodb_file_per_table = on; let $WL6501_TMP_DIR = `select @@tmpdir`; @@ -51,7 +50,6 @@ let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err; --echo "1. Hit crash point while writing redo log." use test; eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; SET innodb_strict_mode=OFF; --disable_warnings eval create $wl6501_temp table t ( @@ -82,7 +80,6 @@ drop table t; --echo "2. Hit crash point on completion of redo log write." use test; eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; SET innodb_strict_mode=OFF; --disable_warnings eval create $wl6501_temp table t ( @@ -115,7 +112,6 @@ drop table t; --echo "3. Hit crash point while dropping indexes." use test; eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; SET innodb_strict_mode=OFF; --disable_warnings eval create $wl6501_temp table t ( @@ -144,7 +140,6 @@ drop table t; # use test; eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; SET innodb_strict_mode=OFF; --disable_warnings eval create $wl6501_temp table t ( @@ -174,7 +169,6 @@ drop table t; # use test; eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; SET innodb_strict_mode=OFF; --disable_warnings eval create $wl6501_temp table t ( @@ -209,7 +203,6 @@ drop table t; --echo " of index is commenced." use test; eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; SET innodb_strict_mode=OFF; --disable_warnings eval create $wl6501_temp table t ( @@ -242,7 +235,6 @@ drop table t; --echo "5. Hit crash point while creating indexes." use test; eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; SET innodb_strict_mode=OFF; --disable_warnings eval create $wl6501_temp table t ( @@ -271,7 +263,6 @@ drop table t; # use test; eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; SET innodb_strict_mode=OFF; --disable_warnings eval create $wl6501_temp table t ( @@ -300,7 +291,6 @@ drop table t; # use test; eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; SET innodb_strict_mode=OFF; --disable_warnings eval create $wl6501_temp table t ( @@ -334,7 +324,6 @@ drop table t; --echo " in-memory dict." use test; eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; SET innodb_strict_mode=OFF; --disable_warnings eval create $wl6501_temp table t ( @@ -367,7 +356,6 @@ drop table t; --echo "7. Hit crash point before/after log checkpoint is done." use test; eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; SET innodb_strict_mode=OFF; --disable_warnings eval create $wl6501_temp table t ( @@ -395,7 +383,6 @@ drop table t; # use test; eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; SET innodb_strict_mode=OFF; --disable_warnings eval create $wl6501_temp table t ( @@ -426,5 +413,4 @@ drop table t; # # remove test-bed # -eval set global innodb_file_format = $format; eval set global innodb_file_per_table = $per_table; diff --git a/mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc b/mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc index 76b7b5d59b5..edec93b875c 100644 --- a/mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc +++ b/mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc @@ -30,7 +30,6 @@ call mtr.add_suppression("does not exist in the InnoDB internal"); # create test-bed # let $per_table = `select @@innodb_file_per_table`; -let $format = `select @@innodb_file_format`; eval set global innodb_file_per_table = on; let $WL6501_TMP_DIR = `select @@tmpdir`; @@ -45,7 +44,6 @@ let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err; --echo "1. Hit crash point on completing drop of all indexes before creation" --echo " of index is commenced." eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; set innodb_strict_mode=off; --disable_warnings eval create $wl6501_temp table t ( @@ -73,7 +71,6 @@ check table t; --echo "2. Hit crash point after data is updated to system-table and" --echo " in-memory dict." eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; set innodb_strict_mode=off; --disable_warnings eval create $wl6501_temp table t ( @@ -98,5 +95,4 @@ check table t; # # remove test-bed # -eval set global innodb_file_format = $format; eval set global innodb_file_per_table = $per_table; diff --git a/mysql-test/suite/innodb/include/log_file_cleanup.inc b/mysql-test/suite/innodb/include/log_file_cleanup.inc new file mode 100644 index 00000000000..ef57d58b788 --- /dev/null +++ b/mysql-test/suite/innodb/include/log_file_cleanup.inc @@ -0,0 +1,16 @@ +# Remove ibtmp* which are re-generated after each mysqld invocation +# skip auto generated auto.cnf from list_files +--remove_files_wildcard $bugdir ibtmp* +--remove_files_wildcard $bugdir auto.cnf +--list_files $bugdir +--remove_files_wildcard $bugdir ibdata* +--remove_files_wildcard $bugdir ib_logfile* +--remove_files_wildcard $bugdir undo00* +--copy_file $bugdir/bak_ibdata1 $bugdir/ibdata1 +--copy_file $bugdir/bak_ibdata2 $bugdir/ibdata2 +--copy_file $bugdir/bak_ib_logfile0 $bugdir/ib_logfile0 +--copy_file $bugdir/bak_ib_logfile1 $bugdir/ib_logfile1 +--copy_file $bugdir/bak_ib_logfile2 $bugdir/ib_logfile2 +--copy_file $bugdir/bak_undo001 $bugdir/undo001 +--copy_file $bugdir/bak_undo002 $bugdir/undo002 +--copy_file $bugdir/bak_undo003 $bugdir/undo003 diff --git a/mysql-test/suite/innodb/r/101_compatibility.result b/mysql-test/suite/innodb/r/101_compatibility.result new file mode 100644 index 00000000000..bc4d37916df --- /dev/null +++ b/mysql-test/suite/innodb/r/101_compatibility.result @@ -0,0 +1,47 @@ +# +# MDEV-11623 MariaDB 10.1 fails to start datadir created with +# MariaDB 10.0/MySQL 5.6 using innodb-page-size!=16K +# +CREATE TABLE tr(a INT)ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT; +CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +SET INNODB_STRICT_MODE=OFF; +CREATE TABLE tz(a INT)ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SET INNODB_STRICT_MODE=ON; +CREATE TABLE tdd(a INT) ENGINE=InnoDB, DATA DIRECTORY='MYSQL_TMP_DIR'; +CREATE TABLE tp(a INT) ENGINE=InnoDB page_compressed=1; +CREATE TABLE ti(a INT) ENGINE=InnoDB; +FLUSH TABLES ti FOR EXPORT; +backup: ti +UNLOCK TABLES; +ALTER TABLE ti DISCARD TABLESPACE; +restore: ti .ibd and .cfg files +ALTER TABLE ti IMPORT TABLESPACE; +BEGIN; +INSERT INTO tr VALUES(1); +INSERT INTO tc VALUES(1); +INSERT INTO td VALUES(1); +INSERT INTO tz VALUES(1); +INSERT INTO tdd VALUES(1); +INSERT INTO tp VALUES(1); +INSERT INTO ti VALUES(1); +# Kill the server +CHECK TABLE tr,tc,td,tz,tdd,tp,ti; +Table Op Msg_type Msg_text +test.tr check status OK +test.tc check status OK +test.td check status OK +test.tz check status OK +test.tdd check status OK +test.tp check status OK +test.ti check status OK +CHECK TABLE tr,tc,td,tz,tdd,tp,ti; +Table Op Msg_type Msg_text +test.tr check status OK +test.tc check status OK +test.td check status OK +test.tz check status OK +test.tdd check status OK +test.tp check status OK +test.ti check status OK +DROP TABLE tr,tc,td,tz,tdd,tp,ti; diff --git a/mysql-test/suite/innodb/r/alter_missing_tablespace.result b/mysql-test/suite/innodb/r/alter_missing_tablespace.result new file mode 100644 index 00000000000..1517afd1a39 --- /dev/null +++ b/mysql-test/suite/innodb/r/alter_missing_tablespace.result @@ -0,0 +1,34 @@ +# +# Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING +# OR DISCARDED TABLESPACES +# +SET GLOBAL innodb_file_per_table=1; +CREATE TABLE t(a INT)ENGINE=InnoDB; +CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; +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 +SHOW WARNINGS; +Level Code Message +Warning 1812 Tablespace is missing for table 'test/t' +Error 1932 Table 'test.t' doesn't exist in engine +ALTER TABLE t1 ADD INDEX (a), ALGORITHM=COPY; +ERROR 42S02: Table 'test.t1' doesn't exist +SHOW WARNINGS; +Level Code Message +Error 1146 Table 'test.t1' doesn't exist +ALTER TABLE t ALGORITHM=INPLACE, DISCARD TABLESPACE; +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 'DISCARD TABLESPACE' at line 1 +ALTER TABLE t ALGORITHM=COPY, DISCARD TABLESPACE; +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 'DISCARD TABLESPACE' at line 1 +ALTER TABLE t ALGORITHM=DEFAULT, DISCARD TABLESPACE; +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 'DISCARD TABLESPACE' at line 1 +ALTER TABLE t DISCARD TABLESPACE; +Warnings: +Warning 1812 Tablespace is missing for table 'test/t' +Warning 1812 Tablespace is missing for table 'test/t' +DROP TABLE t; +SELECT * FROM `x..d`; +ERROR 42S02: Table 'test.x..d' doesn't exist in engine +DROP TABLE `x..d`; diff --git a/mysql-test/suite/innodb/r/doublewrite.result b/mysql-test/suite/innodb/r/doublewrite.result index aa96a5f2d93..6b913f49972 100644 --- a/mysql-test/suite/innodb/r/doublewrite.result +++ b/mysql-test/suite/innodb/r/doublewrite.result @@ -39,6 +39,8 @@ set global innodb_buf_flush_list_now = 1; # Kill the server # Make the first page (page_no=0) of the user tablespace # full of zeroes. +# +# MDEV-11623: Use old FSP_SPACE_FLAGS in the doublewrite buffer. check table t1; Table Op Msg_type Msg_text test.t1 check status OK diff --git a/mysql-test/suite/innodb/r/group_commit_crash.result b/mysql-test/suite/innodb/r/group_commit_crash.result index 80a780ba2c5..f07df897453 100644 --- a/mysql-test/suite/innodb/r/group_commit_crash.result +++ b/mysql-test/suite/innodb/r/group_commit_crash.result @@ -1,4 +1,3 @@ -call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); CREATE TABLE t1(a CHAR(255), b CHAR(255), c CHAR(255), diff --git a/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result b/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result index 06fdeaef6a7..2cd9f01d7ed 100644 --- a/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result +++ b/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result @@ -1,4 +1,3 @@ -call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); CREATE TABLE t1(a CHAR(255), b CHAR(255), c CHAR(255), diff --git a/mysql-test/suite/innodb/r/index_merge_threshold.result b/mysql-test/suite/innodb/r/index_merge_threshold.result new file mode 100644 index 00000000000..092bb69aa65 --- /dev/null +++ b/mysql-test/suite/innodb/r/index_merge_threshold.result @@ -0,0 +1,1325 @@ +CREATE TABLE tab(a BIGINT PRIMARY KEY,c1 TINYTEXT,c2 TEXT,c3 MEDIUMTEXT, +c4 TINYBLOB,c5 BLOB,c6 MEDIUMBLOB,c7 LONGBLOB) ENGINE=InnoDB; +CREATE INDEX index1 ON tab(c1(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=51'; +Warnings: +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +CREATE INDEX index2 ON tab(c2(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=-1'; +Warnings: +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +CREATE INDEX index3 ON tab(c3(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=20'; +Warnings: +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +CREATE INDEX index4 ON tab(c4(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=25'; +Warnings: +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +CREATE INDEX index5 ON tab(c5(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=30'; +Warnings: +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +CREATE INDEX index6 ON tab(c6(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=35'; +Warnings: +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +CREATE INDEX index7 ON tab(c7(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=40'; +Warnings: +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +SHOW CREATE TABLE tab; +Table Create Table +tab CREATE TABLE `tab` ( + `a` bigint(20) NOT NULL, + `c1` tinytext DEFAULT NULL, + `c2` text DEFAULT NULL, + `c3` mediumtext DEFAULT NULL, + `c4` tinyblob DEFAULT NULL, + `c5` blob DEFAULT NULL, + `c6` mediumblob DEFAULT NULL, + `c7` longblob DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `index1` (`c1`(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=51', + KEY `index2` (`c2`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=-1', + KEY `index3` (`c3`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=20', + KEY `index4` (`c4`(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=25', + KEY `index5` (`c5`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=30', + KEY `index6` (`c6`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=35', + KEY `index7` (`c7`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=40' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +WHERE t.TABLE_ID = i.TABLE_ID AND t.NAME = 'test/tab'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab PRIMARY 50 +test/tab index1 50 +test/tab index2 50 +test/tab index3 20 +test/tab index4 25 +test/tab index5 30 +test/tab index6 35 +test/tab index7 40 +ALTER TABLE tab comment='MERGE_THRESHOLD=49'; +Warnings: +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +SHOW CREATE TABLE tab; +Table Create Table +tab CREATE TABLE `tab` ( + `a` bigint(20) NOT NULL, + `c1` tinytext DEFAULT NULL, + `c2` text DEFAULT NULL, + `c3` mediumtext DEFAULT NULL, + `c4` tinyblob DEFAULT NULL, + `c5` blob DEFAULT NULL, + `c6` mediumblob DEFAULT NULL, + `c7` longblob DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `index1` (`c1`(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=51', + KEY `index2` (`c2`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=-1', + KEY `index3` (`c3`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=20', + KEY `index4` (`c4`(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=25', + KEY `index5` (`c5`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=30', + KEY `index6` (`c6`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=35', + KEY `index7` (`c7`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=40' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='MERGE_THRESHOLD=49' +SELECT t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +WHERE t.TABLE_ID = i.TABLE_ID AND t.NAME = 'test/tab'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab PRIMARY 49 +test/tab index1 49 +test/tab index2 49 +test/tab index3 20 +test/tab index4 25 +test/tab index5 30 +test/tab index6 35 +test/tab index7 40 +ALTER TABLE tab MODIFY COLUMN c7 VARCHAR(2048) ; +Warnings: +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +SHOW CREATE TABLE tab; +Table Create Table +tab CREATE TABLE `tab` ( + `a` bigint(20) NOT NULL, + `c1` tinytext DEFAULT NULL, + `c2` text DEFAULT NULL, + `c3` mediumtext DEFAULT NULL, + `c4` tinyblob DEFAULT NULL, + `c5` blob DEFAULT NULL, + `c6` mediumblob DEFAULT NULL, + `c7` varchar(2048) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `index1` (`c1`(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=51', + KEY `index2` (`c2`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=-1', + KEY `index3` (`c3`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=20', + KEY `index4` (`c4`(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=25', + KEY `index5` (`c5`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=30', + KEY `index6` (`c6`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=35', + KEY `index7` (`c7`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=40' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='MERGE_THRESHOLD=49' +SELECT t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +WHERE t.TABLE_ID = i.TABLE_ID AND t.NAME = 'test/tab'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab PRIMARY 49 +test/tab index1 49 +test/tab index2 49 +test/tab index3 20 +test/tab index4 25 +test/tab index5 30 +test/tab index6 35 +test/tab index7 40 +ALTER TABLE tab ADD INDEX index8 (c7(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=45'; +Warnings: +Note 1831 Duplicate index `index8`. This is deprecated and will be disallowed in a future release +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +Warning 1478 InnoDB: Invalid value for MERGE_THRESHOLD in the CREATE TABLE statement. The value is ignored. +SHOW CREATE TABLE tab; +Table Create Table +tab CREATE TABLE `tab` ( + `a` bigint(20) NOT NULL, + `c1` tinytext DEFAULT NULL, + `c2` text DEFAULT NULL, + `c3` mediumtext DEFAULT NULL, + `c4` tinyblob DEFAULT NULL, + `c5` blob DEFAULT NULL, + `c6` mediumblob DEFAULT NULL, + `c7` varchar(2048) DEFAULT NULL, + PRIMARY KEY (`a`), + KEY `index1` (`c1`(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=51', + KEY `index2` (`c2`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=-1', + KEY `index3` (`c3`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=20', + KEY `index4` (`c4`(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=25', + KEY `index5` (`c5`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=30', + KEY `index6` (`c6`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=35', + KEY `index7` (`c7`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=40', + KEY `index8` (`c7`(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=45' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='MERGE_THRESHOLD=49' +SELECT t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +WHERE t.TABLE_ID = i.TABLE_ID AND t.NAME = 'test/tab'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab PRIMARY 49 +test/tab index1 49 +test/tab index2 49 +test/tab index3 20 +test/tab index4 25 +test/tab index5 30 +test/tab index6 35 +test/tab index7 40 +test/tab index8 45 +DROP TABLE tab; +# +# behavior for deleting records +# +# test to confirm behavior (MERGE_THRESHOLD=50 (default)) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB; +# check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab1 PRIMARY 50 +insert into tab1 values (1, repeat('a',2048)); +insert into tab1 values (2, repeat('a',2048)); +insert into tab1 values (3, repeat('a',2048)); +insert into tab1 values (8, repeat('a',2048)); +insert into tab1 values (9, repeat('a',2048)); +insert into tab1 values (10, repeat('a',2048)); +insert into tab1 values (11, repeat('a',2048)); +insert into tab1 values (12, repeat('a',2048)); +insert into tab1 values (4, repeat('a',2048)); +insert into tab1 values (5, repeat('a',2048)); +insert into tab1 values (6, repeat('a',2048)); +insert into tab1 values (7, repeat('a',2048)); +insert into tab1 values (13, repeat('a',2048)); +insert into tab1 values (14, repeat('a',2048)); +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 2 +4 7 +5 7 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 12; +delete from tab1 where a = 13; +delete from tab1 where a = 14; +delete from tab1 where a = 5; +delete from tab1 where a = 6; +delete from tab1 where a = 7; +set global innodb_purge_run_now=ON; +# check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 2 +4 4 +5 4 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 11; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 10; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=35 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 2 +index_page_merge_successful 2 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 9; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=25 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 2 +index_page_merge_successful 2 +DROP TABLE tab1; +# test to confirm behavior (MERGE_THRESHOLD=35) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB +COMMENT='MERGE_THRESHOLD=35'; +# check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab1 PRIMARY 35 +insert into tab1 values (1, repeat('a',2048)); +insert into tab1 values (2, repeat('a',2048)); +insert into tab1 values (3, repeat('a',2048)); +insert into tab1 values (8, repeat('a',2048)); +insert into tab1 values (9, repeat('a',2048)); +insert into tab1 values (10, repeat('a',2048)); +insert into tab1 values (11, repeat('a',2048)); +insert into tab1 values (12, repeat('a',2048)); +insert into tab1 values (4, repeat('a',2048)); +insert into tab1 values (5, repeat('a',2048)); +insert into tab1 values (6, repeat('a',2048)); +insert into tab1 values (7, repeat('a',2048)); +insert into tab1 values (13, repeat('a',2048)); +insert into tab1 values (14, repeat('a',2048)); +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 2 +4 7 +5 7 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 12; +delete from tab1 where a = 13; +delete from tab1 where a = 14; +delete from tab1 where a = 5; +delete from tab1 where a = 6; +delete from tab1 where a = 7; +set global innodb_purge_run_now=ON; +# check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 2 +4 4 +5 4 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 11; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 10; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=35 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 9; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=25 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 2 +index_page_merge_successful 2 +DROP TABLE tab1; +# test to confirm behavior (MERGE_THRESHOLD=25) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB +COMMENT='MERGE_THRESHOLD=25'; +# check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab1 PRIMARY 25 +insert into tab1 values (1, repeat('a',2048)); +insert into tab1 values (2, repeat('a',2048)); +insert into tab1 values (3, repeat('a',2048)); +insert into tab1 values (8, repeat('a',2048)); +insert into tab1 values (9, repeat('a',2048)); +insert into tab1 values (10, repeat('a',2048)); +insert into tab1 values (11, repeat('a',2048)); +insert into tab1 values (12, repeat('a',2048)); +insert into tab1 values (4, repeat('a',2048)); +insert into tab1 values (5, repeat('a',2048)); +insert into tab1 values (6, repeat('a',2048)); +insert into tab1 values (7, repeat('a',2048)); +insert into tab1 values (13, repeat('a',2048)); +insert into tab1 values (14, repeat('a',2048)); +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 2 +4 7 +5 7 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 12; +delete from tab1 where a = 13; +delete from tab1 where a = 14; +delete from tab1 where a = 5; +delete from tab1 where a = 6; +delete from tab1 where a = 7; +set global innodb_purge_run_now=ON; +# check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 2 +4 4 +5 4 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 11; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 10; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=35 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 9; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=25 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +DROP TABLE tab1; +# test to confirm partitioned table (MERGE_THRESHOLD=35) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) +COMMENT='MERGE_THRESHOLD=35' +PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (20) ENGINE = InnoDB, +PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB); +# check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab1#p#p0 PRIMARY 35 +test/tab1#p#p1 PRIMARY 35 +insert into tab1 values (1, repeat('a',2048)); +insert into tab1 values (2, repeat('a',2048)); +insert into tab1 values (3, repeat('a',2048)); +insert into tab1 values (8, repeat('a',2048)); +insert into tab1 values (9, repeat('a',2048)); +insert into tab1 values (10, repeat('a',2048)); +insert into tab1 values (11, repeat('a',2048)); +insert into tab1 values (12, repeat('a',2048)); +insert into tab1 values (4, repeat('a',2048)); +insert into tab1 values (5, repeat('a',2048)); +insert into tab1 values (6, repeat('a',2048)); +insert into tab1 values (7, repeat('a',2048)); +insert into tab1 values (13, repeat('a',2048)); +insert into tab1 values (14, repeat('a',2048)); +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 0 +3 2 +4 7 +5 7 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 12; +delete from tab1 where a = 13; +delete from tab1 where a = 14; +delete from tab1 where a = 5; +delete from tab1 where a = 6; +delete from tab1 where a = 7; +set global innodb_purge_run_now=ON; +# check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 0 +3 2 +4 4 +5 4 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 11; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 10; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=35 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 9; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=25 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 2 +index_page_merge_successful 2 +DROP TABLE tab1; +# +# behavior for updating to smaller records +# +# test to confirm behavior (MERGE_THRESHOLD=50 (default)) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB; +# check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab1 PRIMARY 50 +insert into tab1 values (1, repeat('a',2048)); +insert into tab1 values (2, repeat('a',2048)); +insert into tab1 values (3, repeat('a',2048)); +insert into tab1 values (8, repeat('a',2048)); +insert into tab1 values (9, repeat('a',2048)); +insert into tab1 values (10, repeat('a',2048)); +insert into tab1 values (11, repeat('a',2048)); +insert into tab1 values (12, repeat('a',2048)); +insert into tab1 values (4, repeat('a',2048)); +insert into tab1 values (5, repeat('a',2048)); +insert into tab1 values (6, repeat('a',2048)); +insert into tab1 values (7, repeat('a',2048)); +insert into tab1 values (13, repeat('a',2048)); +insert into tab1 values (14, repeat('a',2048)); +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 2 +4 7 +5 7 +update tab1 set b='' where a = 12; +update tab1 set b='' where a = 13; +update tab1 set b='' where a = 14; +update tab1 set b='' where a = 5; +update tab1 set b='' where a = 6; +update tab1 set b='' where a = 7; +# check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 2 +4 7 +5 7 +update tab1 set b='' where a = 11; +# check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +update tab1 set b='' where a = 10; +# check page merge happens (MERGE_THRESHOLD=35 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +update tab1 set b='' where a = 9; +# check page merge happens (MERGE_THRESHOLD=25 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +DROP TABLE tab1; +# test to confirm behavior (MERGE_THRESHOLD=35) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB +COMMENT='MERGE_THRESHOLD=35'; +# check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab1 PRIMARY 35 +insert into tab1 values (1, repeat('a',2048)); +insert into tab1 values (2, repeat('a',2048)); +insert into tab1 values (3, repeat('a',2048)); +insert into tab1 values (8, repeat('a',2048)); +insert into tab1 values (9, repeat('a',2048)); +insert into tab1 values (10, repeat('a',2048)); +insert into tab1 values (11, repeat('a',2048)); +insert into tab1 values (12, repeat('a',2048)); +insert into tab1 values (4, repeat('a',2048)); +insert into tab1 values (5, repeat('a',2048)); +insert into tab1 values (6, repeat('a',2048)); +insert into tab1 values (7, repeat('a',2048)); +insert into tab1 values (13, repeat('a',2048)); +insert into tab1 values (14, repeat('a',2048)); +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 2 +4 7 +5 7 +update tab1 set b='' where a = 12; +update tab1 set b='' where a = 13; +update tab1 set b='' where a = 14; +update tab1 set b='' where a = 5; +update tab1 set b='' where a = 6; +update tab1 set b='' where a = 7; +# check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 2 +4 7 +5 7 +update tab1 set b='' where a = 11; +# check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +update tab1 set b='' where a = 10; +# check page merge happens (MERGE_THRESHOLD=35 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +update tab1 set b='' where a = 9; +# check page merge happens (MERGE_THRESHOLD=25 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +DROP TABLE tab1; +# test to confirm behavior (MERGE_THRESHOLD=25) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB +COMMENT='MERGE_THRESHOLD=25'; +# check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab1 PRIMARY 25 +insert into tab1 values (1, repeat('a',2048)); +insert into tab1 values (2, repeat('a',2048)); +insert into tab1 values (3, repeat('a',2048)); +insert into tab1 values (8, repeat('a',2048)); +insert into tab1 values (9, repeat('a',2048)); +insert into tab1 values (10, repeat('a',2048)); +insert into tab1 values (11, repeat('a',2048)); +insert into tab1 values (12, repeat('a',2048)); +insert into tab1 values (4, repeat('a',2048)); +insert into tab1 values (5, repeat('a',2048)); +insert into tab1 values (6, repeat('a',2048)); +insert into tab1 values (7, repeat('a',2048)); +insert into tab1 values (13, repeat('a',2048)); +insert into tab1 values (14, repeat('a',2048)); +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 2 +4 7 +5 7 +update tab1 set b='' where a = 12; +update tab1 set b='' where a = 13; +update tab1 set b='' where a = 14; +update tab1 set b='' where a = 5; +update tab1 set b='' where a = 6; +update tab1 set b='' where a = 7; +# check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 2 +4 7 +5 7 +update tab1 set b='' where a = 11; +# check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +update tab1 set b='' where a = 10; +# check page merge happens (MERGE_THRESHOLD=35 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +update tab1 set b='' where a = 9; +# check page merge happens (MERGE_THRESHOLD=25 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +DROP TABLE tab1; +# test to confirm explicit temporary table (MERGE_THRESHOLD=35) +# (though not registered to SYS_TABLES,SYS_INDEXES, it works correctly) +CREATE TEMPORARY TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB +COMMENT='MERGE_THRESHOLD=35'; +# check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +insert into tab1 values (1, repeat('a',2048)); +insert into tab1 values (2, repeat('a',2048)); +insert into tab1 values (3, repeat('a',2048)); +insert into tab1 values (8, repeat('a',2048)); +insert into tab1 values (9, repeat('a',2048)); +insert into tab1 values (10, repeat('a',2048)); +insert into tab1 values (11, repeat('a',2048)); +insert into tab1 values (12, repeat('a',2048)); +insert into tab1 values (4, repeat('a',2048)); +insert into tab1 values (5, repeat('a',2048)); +insert into tab1 values (6, repeat('a',2048)); +insert into tab1 values (7, repeat('a',2048)); +insert into tab1 values (13, repeat('a',2048)); +insert into tab1 values (14, repeat('a',2048)); +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +update tab1 set b='' where a = 12; +update tab1 set b='' where a = 13; +update tab1 set b='' where a = 14; +update tab1 set b='' where a = 5; +update tab1 set b='' where a = 6; +update tab1 set b='' where a = 7; +# check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +update tab1 set b='' where a = 11; +# check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +update tab1 set b='' where a = 10; +# check page merge happens (MERGE_THRESHOLD=35 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +update tab1 set b='' where a = 9; +# check page merge happens (MERGE_THRESHOLD=25 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +DROP TABLE tab1; +# +# behavior for secondary index with blob +# +# test to confirm behavior (MERGE_THRESHOLD=50 (default)) +CREATE TABLE tab1 (a bigint primary key, b blob) engine=InnoDB row_format=dynamic; +CREATE INDEX index1 ON tab1(b(750)); +# check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab1 PRIMARY 50 +test/tab1 index1 50 +INSERT INTO tab1 VALUES (1, concat("01", repeat('a',8190))); +INSERT INTO tab1 VALUES (2, concat("02", repeat('a',8190))); +INSERT INTO tab1 VALUES (3, concat("03", repeat('a',8190))); +INSERT INTO tab1 VALUES (4, concat("04", repeat('a',8190))); +INSERT INTO tab1 VALUES (5, concat("05", repeat('a',8190))); +INSERT INTO tab1 VALUES (6, concat("06", repeat('a',8190))); +INSERT INTO tab1 VALUES (7, concat("07", repeat('a',8190))); +INSERT INTO tab1 VALUES (8, concat("08", repeat('a',8190))); +INSERT INTO tab1 VALUES (9, concat("09", repeat('a',8190))); +INSERT INTO tab1 VALUES (10, concat("10", repeat('a',8190))); +INSERT INTO tab1 VALUES (22, concat("22", repeat('a',8190))); +INSERT INTO tab1 VALUES (23, concat("23", repeat('a',8190))); +INSERT INTO tab1 VALUES (24, concat("24", repeat('a',8190))); +INSERT INTO tab1 VALUES (25, concat("25", repeat('a',8190))); +INSERT INTO tab1 VALUES (26, concat("26", repeat('a',8190))); +INSERT INTO tab1 VALUES (27, concat("27", repeat('a',8190))); +INSERT INTO tab1 VALUES (28, concat("28", repeat('a',8190))); +INSERT INTO tab1 VALUES (29, concat("29", repeat('a',8190))); +INSERT INTO tab1 VALUES (30, concat("30", repeat('a',8190))); +INSERT INTO tab1 VALUES (31, concat("31", repeat('a',8190))); +INSERT INTO tab1 VALUES (32, concat("32", repeat('a',8190))); +INSERT INTO tab1 VALUES (33, concat("33", repeat('a',8190))); +INSERT INTO tab1 VALUES (11, concat("11", repeat('a',8190))); +INSERT INTO tab1 VALUES (12, concat("12", repeat('a',8190))); +INSERT INTO tab1 VALUES (13, concat("13", repeat('a',8190))); +INSERT INTO tab1 VALUES (14, concat("14", repeat('a',8190))); +INSERT INTO tab1 VALUES (15, concat("15", repeat('a',8190))); +INSERT INTO tab1 VALUES (16, concat("16", repeat('a',8190))); +INSERT INTO tab1 VALUES (17, concat("17", repeat('a',8190))); +INSERT INTO tab1 VALUES (18, concat("18", repeat('a',8190))); +INSERT INTO tab1 VALUES (19, concat("19", repeat('a',8190))); +INSERT INTO tab1 VALUES (20, concat("20", repeat('a',8190))); +INSERT INTO tab1 VALUES (21, concat("21", repeat('a',8190))); +INSERT INTO tab1 VALUES (34, concat("34", repeat('a',8190))); +INSERT INTO tab1 VALUES (35, concat("35", repeat('a',8190))); +INSERT INTO tab1 VALUES (36, concat("36", repeat('a',8190))); +INSERT INTO tab1 VALUES (37, concat("37", repeat('a',8190))); +INSERT INTO tab1 VALUES (38, concat("38", repeat('a',8190))); +INSERT INTO tab1 VALUES (39, concat("39", repeat('a',8190))); +INSERT INTO tab1 VALUES (40, concat("40", repeat('a',8190))); +INSERT INTO tab1 VALUES (41, concat("41", repeat('a',8190))); +INSERT INTO tab1 VALUES (42, concat("42", repeat('a',8190))); +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 42 +4 2 +27 21 +28 21 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 33; +delete from tab1 where a = 34; +delete from tab1 where a = 35; +delete from tab1 where a = 36; +delete from tab1 where a = 37; +delete from tab1 where a = 38; +delete from tab1 where a = 39; +delete from tab1 where a = 40; +delete from tab1 where a = 41; +delete from tab1 where a = 42; +delete from tab1 where a = 12; +delete from tab1 where a = 13; +delete from tab1 where a = 14; +delete from tab1 where a = 15; +delete from tab1 where a = 16; +delete from tab1 where a = 17; +delete from tab1 where a = 18; +delete from tab1 where a = 19; +delete from tab1 where a = 20; +delete from tab1 where a = 21; +set global innodb_purge_run_now=ON; +# check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 22 +4 2 +27 11 +28 11 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 32; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 31; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=45 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 2 +index_page_merge_successful 2 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 30; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=40 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 2 +index_page_merge_successful 2 +DROP TABLE tab1; +# test to confirm behavior (MERGE_THRESHOLD=45) +CREATE TABLE tab1 (a bigint primary key, b blob) engine=InnoDB row_format=dynamic; +CREATE INDEX index1 ON tab1(b(750)) COMMENT 'MERGE_THRESHOLD=45'; +# check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab1 PRIMARY 50 +test/tab1 index1 45 +INSERT INTO tab1 VALUES (1, concat("01", repeat('a',8190))); +INSERT INTO tab1 VALUES (2, concat("02", repeat('a',8190))); +INSERT INTO tab1 VALUES (3, concat("03", repeat('a',8190))); +INSERT INTO tab1 VALUES (4, concat("04", repeat('a',8190))); +INSERT INTO tab1 VALUES (5, concat("05", repeat('a',8190))); +INSERT INTO tab1 VALUES (6, concat("06", repeat('a',8190))); +INSERT INTO tab1 VALUES (7, concat("07", repeat('a',8190))); +INSERT INTO tab1 VALUES (8, concat("08", repeat('a',8190))); +INSERT INTO tab1 VALUES (9, concat("09", repeat('a',8190))); +INSERT INTO tab1 VALUES (10, concat("10", repeat('a',8190))); +INSERT INTO tab1 VALUES (22, concat("22", repeat('a',8190))); +INSERT INTO tab1 VALUES (23, concat("23", repeat('a',8190))); +INSERT INTO tab1 VALUES (24, concat("24", repeat('a',8190))); +INSERT INTO tab1 VALUES (25, concat("25", repeat('a',8190))); +INSERT INTO tab1 VALUES (26, concat("26", repeat('a',8190))); +INSERT INTO tab1 VALUES (27, concat("27", repeat('a',8190))); +INSERT INTO tab1 VALUES (28, concat("28", repeat('a',8190))); +INSERT INTO tab1 VALUES (29, concat("29", repeat('a',8190))); +INSERT INTO tab1 VALUES (30, concat("30", repeat('a',8190))); +INSERT INTO tab1 VALUES (31, concat("31", repeat('a',8190))); +INSERT INTO tab1 VALUES (32, concat("32", repeat('a',8190))); +INSERT INTO tab1 VALUES (33, concat("33", repeat('a',8190))); +INSERT INTO tab1 VALUES (11, concat("11", repeat('a',8190))); +INSERT INTO tab1 VALUES (12, concat("12", repeat('a',8190))); +INSERT INTO tab1 VALUES (13, concat("13", repeat('a',8190))); +INSERT INTO tab1 VALUES (14, concat("14", repeat('a',8190))); +INSERT INTO tab1 VALUES (15, concat("15", repeat('a',8190))); +INSERT INTO tab1 VALUES (16, concat("16", repeat('a',8190))); +INSERT INTO tab1 VALUES (17, concat("17", repeat('a',8190))); +INSERT INTO tab1 VALUES (18, concat("18", repeat('a',8190))); +INSERT INTO tab1 VALUES (19, concat("19", repeat('a',8190))); +INSERT INTO tab1 VALUES (20, concat("20", repeat('a',8190))); +INSERT INTO tab1 VALUES (21, concat("21", repeat('a',8190))); +INSERT INTO tab1 VALUES (34, concat("34", repeat('a',8190))); +INSERT INTO tab1 VALUES (35, concat("35", repeat('a',8190))); +INSERT INTO tab1 VALUES (36, concat("36", repeat('a',8190))); +INSERT INTO tab1 VALUES (37, concat("37", repeat('a',8190))); +INSERT INTO tab1 VALUES (38, concat("38", repeat('a',8190))); +INSERT INTO tab1 VALUES (39, concat("39", repeat('a',8190))); +INSERT INTO tab1 VALUES (40, concat("40", repeat('a',8190))); +INSERT INTO tab1 VALUES (41, concat("41", repeat('a',8190))); +INSERT INTO tab1 VALUES (42, concat("42", repeat('a',8190))); +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 42 +4 2 +27 21 +28 21 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 33; +delete from tab1 where a = 34; +delete from tab1 where a = 35; +delete from tab1 where a = 36; +delete from tab1 where a = 37; +delete from tab1 where a = 38; +delete from tab1 where a = 39; +delete from tab1 where a = 40; +delete from tab1 where a = 41; +delete from tab1 where a = 42; +delete from tab1 where a = 12; +delete from tab1 where a = 13; +delete from tab1 where a = 14; +delete from tab1 where a = 15; +delete from tab1 where a = 16; +delete from tab1 where a = 17; +delete from tab1 where a = 18; +delete from tab1 where a = 19; +delete from tab1 where a = 20; +delete from tab1 where a = 21; +set global innodb_purge_run_now=ON; +# check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 22 +4 2 +27 11 +28 11 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 32; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 31; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=45 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 30; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=40 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 2 +index_page_merge_successful 2 +DROP TABLE tab1; +# test to confirm behavior (MERGE_THRESHOLD=40) +CREATE TABLE tab1 (a bigint primary key, b blob) engine=InnoDB row_format=dynamic; +CREATE INDEX index1 ON tab1(b(750)) COMMENT 'MERGE_THRESHOLD=40'; +# check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab1 PRIMARY 50 +test/tab1 index1 40 +INSERT INTO tab1 VALUES (1, concat("01", repeat('a',8190))); +INSERT INTO tab1 VALUES (2, concat("02", repeat('a',8190))); +INSERT INTO tab1 VALUES (3, concat("03", repeat('a',8190))); +INSERT INTO tab1 VALUES (4, concat("04", repeat('a',8190))); +INSERT INTO tab1 VALUES (5, concat("05", repeat('a',8190))); +INSERT INTO tab1 VALUES (6, concat("06", repeat('a',8190))); +INSERT INTO tab1 VALUES (7, concat("07", repeat('a',8190))); +INSERT INTO tab1 VALUES (8, concat("08", repeat('a',8190))); +INSERT INTO tab1 VALUES (9, concat("09", repeat('a',8190))); +INSERT INTO tab1 VALUES (10, concat("10", repeat('a',8190))); +INSERT INTO tab1 VALUES (22, concat("22", repeat('a',8190))); +INSERT INTO tab1 VALUES (23, concat("23", repeat('a',8190))); +INSERT INTO tab1 VALUES (24, concat("24", repeat('a',8190))); +INSERT INTO tab1 VALUES (25, concat("25", repeat('a',8190))); +INSERT INTO tab1 VALUES (26, concat("26", repeat('a',8190))); +INSERT INTO tab1 VALUES (27, concat("27", repeat('a',8190))); +INSERT INTO tab1 VALUES (28, concat("28", repeat('a',8190))); +INSERT INTO tab1 VALUES (29, concat("29", repeat('a',8190))); +INSERT INTO tab1 VALUES (30, concat("30", repeat('a',8190))); +INSERT INTO tab1 VALUES (31, concat("31", repeat('a',8190))); +INSERT INTO tab1 VALUES (32, concat("32", repeat('a',8190))); +INSERT INTO tab1 VALUES (33, concat("33", repeat('a',8190))); +INSERT INTO tab1 VALUES (11, concat("11", repeat('a',8190))); +INSERT INTO tab1 VALUES (12, concat("12", repeat('a',8190))); +INSERT INTO tab1 VALUES (13, concat("13", repeat('a',8190))); +INSERT INTO tab1 VALUES (14, concat("14", repeat('a',8190))); +INSERT INTO tab1 VALUES (15, concat("15", repeat('a',8190))); +INSERT INTO tab1 VALUES (16, concat("16", repeat('a',8190))); +INSERT INTO tab1 VALUES (17, concat("17", repeat('a',8190))); +INSERT INTO tab1 VALUES (18, concat("18", repeat('a',8190))); +INSERT INTO tab1 VALUES (19, concat("19", repeat('a',8190))); +INSERT INTO tab1 VALUES (20, concat("20", repeat('a',8190))); +INSERT INTO tab1 VALUES (21, concat("21", repeat('a',8190))); +INSERT INTO tab1 VALUES (34, concat("34", repeat('a',8190))); +INSERT INTO tab1 VALUES (35, concat("35", repeat('a',8190))); +INSERT INTO tab1 VALUES (36, concat("36", repeat('a',8190))); +INSERT INTO tab1 VALUES (37, concat("37", repeat('a',8190))); +INSERT INTO tab1 VALUES (38, concat("38", repeat('a',8190))); +INSERT INTO tab1 VALUES (39, concat("39", repeat('a',8190))); +INSERT INTO tab1 VALUES (40, concat("40", repeat('a',8190))); +INSERT INTO tab1 VALUES (41, concat("41", repeat('a',8190))); +INSERT INTO tab1 VALUES (42, concat("42", repeat('a',8190))); +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 42 +4 2 +27 21 +28 21 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 33; +delete from tab1 where a = 34; +delete from tab1 where a = 35; +delete from tab1 where a = 36; +delete from tab1 where a = 37; +delete from tab1 where a = 38; +delete from tab1 where a = 39; +delete from tab1 where a = 40; +delete from tab1 where a = 41; +delete from tab1 where a = 42; +delete from tab1 where a = 12; +delete from tab1 where a = 13; +delete from tab1 where a = 14; +delete from tab1 where a = 15; +delete from tab1 where a = 16; +delete from tab1 where a = 17; +delete from tab1 where a = 18; +delete from tab1 where a = 19; +delete from tab1 where a = 20; +delete from tab1 where a = 21; +set global innodb_purge_run_now=ON; +# check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 22 +4 2 +27 11 +28 11 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 32; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 31; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=45 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 30; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=40 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +DROP TABLE tab1; +# compressed table behaves same (MERGE_THRESHOLD=45) +CREATE TABLE tab1 (a bigint primary key, b blob) engine=InnoDB +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +CREATE INDEX index1 ON tab1(b(750)) COMMENT 'MERGE_THRESHOLD=45'; +# check MERGE_THRESHOLD +select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%'; +TABLE_NAME INDEX_NAME MERGE_THRESHOLD +test/tab1 PRIMARY 50 +test/tab1 index1 45 +INSERT INTO tab1 VALUES (1, concat("01", repeat('a',8190))); +INSERT INTO tab1 VALUES (2, concat("02", repeat('a',8190))); +INSERT INTO tab1 VALUES (3, concat("03", repeat('a',8190))); +INSERT INTO tab1 VALUES (4, concat("04", repeat('a',8190))); +INSERT INTO tab1 VALUES (5, concat("05", repeat('a',8190))); +INSERT INTO tab1 VALUES (6, concat("06", repeat('a',8190))); +INSERT INTO tab1 VALUES (7, concat("07", repeat('a',8190))); +INSERT INTO tab1 VALUES (8, concat("08", repeat('a',8190))); +INSERT INTO tab1 VALUES (9, concat("09", repeat('a',8190))); +INSERT INTO tab1 VALUES (10, concat("10", repeat('a',8190))); +INSERT INTO tab1 VALUES (22, concat("22", repeat('a',8190))); +INSERT INTO tab1 VALUES (23, concat("23", repeat('a',8190))); +INSERT INTO tab1 VALUES (24, concat("24", repeat('a',8190))); +INSERT INTO tab1 VALUES (25, concat("25", repeat('a',8190))); +INSERT INTO tab1 VALUES (26, concat("26", repeat('a',8190))); +INSERT INTO tab1 VALUES (27, concat("27", repeat('a',8190))); +INSERT INTO tab1 VALUES (28, concat("28", repeat('a',8190))); +INSERT INTO tab1 VALUES (29, concat("29", repeat('a',8190))); +INSERT INTO tab1 VALUES (30, concat("30", repeat('a',8190))); +INSERT INTO tab1 VALUES (31, concat("31", repeat('a',8190))); +INSERT INTO tab1 VALUES (32, concat("32", repeat('a',8190))); +INSERT INTO tab1 VALUES (33, concat("33", repeat('a',8190))); +INSERT INTO tab1 VALUES (11, concat("11", repeat('a',8190))); +INSERT INTO tab1 VALUES (12, concat("12", repeat('a',8190))); +INSERT INTO tab1 VALUES (13, concat("13", repeat('a',8190))); +INSERT INTO tab1 VALUES (14, concat("14", repeat('a',8190))); +INSERT INTO tab1 VALUES (15, concat("15", repeat('a',8190))); +INSERT INTO tab1 VALUES (16, concat("16", repeat('a',8190))); +INSERT INTO tab1 VALUES (17, concat("17", repeat('a',8190))); +INSERT INTO tab1 VALUES (18, concat("18", repeat('a',8190))); +INSERT INTO tab1 VALUES (19, concat("19", repeat('a',8190))); +INSERT INTO tab1 VALUES (20, concat("20", repeat('a',8190))); +INSERT INTO tab1 VALUES (21, concat("21", repeat('a',8190))); +INSERT INTO tab1 VALUES (34, concat("34", repeat('a',8190))); +INSERT INTO tab1 VALUES (35, concat("35", repeat('a',8190))); +INSERT INTO tab1 VALUES (36, concat("36", repeat('a',8190))); +INSERT INTO tab1 VALUES (37, concat("37", repeat('a',8190))); +INSERT INTO tab1 VALUES (38, concat("38", repeat('a',8190))); +INSERT INTO tab1 VALUES (39, concat("39", repeat('a',8190))); +INSERT INTO tab1 VALUES (40, concat("40", repeat('a',8190))); +INSERT INTO tab1 VALUES (41, concat("41", repeat('a',8190))); +INSERT INTO tab1 VALUES (42, concat("42", repeat('a',8190))); +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 42 +4 2 +27 21 +28 21 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 33; +delete from tab1 where a = 34; +delete from tab1 where a = 35; +delete from tab1 where a = 36; +delete from tab1 where a = 37; +delete from tab1 where a = 38; +delete from tab1 where a = 39; +delete from tab1 where a = 40; +delete from tab1 where a = 41; +delete from tab1 where a = 42; +delete from tab1 where a = 12; +delete from tab1 where a = 13; +delete from tab1 where a = 14; +delete from tab1 where a = 15; +delete from tab1 where a = 16; +delete from tab1 where a = 17; +delete from tab1 where a = 18; +delete from tab1 where a = 19; +delete from tab1 where a = 20; +delete from tab1 where a = 21; +set global innodb_purge_run_now=ON; +# check page merge happens (nothing is expected) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +select PAGE_NUMBER, NUMBER_RECORDS +from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1, +INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2 +where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%' +and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS; +PAGE_NUMBER NUMBER_RECORDS +3 22 +4 2 +27 11 +28 11 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 32; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=50 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 0 +index_page_merge_successful 0 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 31; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=45 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 1 +index_page_merge_successful 1 +set global innodb_purge_stop_now=ON; +delete from tab1 where a = 30; +set global innodb_purge_run_now=ON; +# check page merge happens (MERGE_THRESHOLD=40 causes merge here) +SELECT name,count_reset FROM information_schema.innodb_metrics +WHERE name like 'index_page_merge_%'; +name count_reset +index_page_merge_attempts 2 +index_page_merge_successful 2 +DROP TABLE tab1; diff --git a/mysql-test/suite/innodb/r/innochecksum.result b/mysql-test/suite/innodb/r/innochecksum.result index 6fc613f3d1f..2d8a2652309 100644 --- a/mysql-test/suite/innodb/r/innochecksum.result +++ b/mysql-test/suite/innodb/r/innochecksum.result @@ -1,22 +1,5 @@ -# Create and populate a table CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB; INSERT INTO t1 (b) VALUES ('corrupt me'); INSERT INTO t1 (b) VALUES ('corrupt me'); -CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) -ROW_FORMAT=COMPRESSED ENGINE=InnoDB ; -INSERT INTO t2(b) SELECT b from t1; -CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) -ROW_FORMAT=COMPRESSED ENGINE=InnoDB KEY_BLOCK_SIZE=16; -INSERT INTO t3(b) SELECT b from t1; -# Write file to make mysql-test-run.pl expect the "crash", but don't -# start it until it's told to -# We give 30 seconds to do a clean shutdown because we do not want -# to redo apply the pages of t1.ibd at the time of recovery. -# We want SQL to initiate the first access to t1.ibd. -# Wait until disconnected. # Run innochecksum on t1 -# Run innochecksum on t2 -# Run innochecksum on t3 -# Write file to make mysql-test-run.pl start up the server again -# Cleanup -DROP TABLE t1, t2, t3; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/innodb-16k.result b/mysql-test/suite/innodb/r/innodb-16k.result index 63637c6428f..206abe45887 100644 --- a/mysql-test/suite/innodb/r/innodb-16k.result +++ b/mysql-test/suite/innodb/r/innodb-16k.result @@ -1,8 +1,4 @@ call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page."); -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_large_prefix = OFF; Warnings: Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html @@ -229,9 +225,6 @@ FROM information_schema.tables WHERE table_name = 't1'; table_name row_format create_options t1 Compressed row_format=COMPRESSED DROP TABLE t1; -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html CREATE TABLE t2(d varchar(17) PRIMARY KEY) ENGINE=innodb DEFAULT CHARSET=utf8; CREATE TABLE t3(a int PRIMARY KEY) ENGINE=innodb; INSERT INTO t3 VALUES (22),(44),(33),(55),(66); @@ -422,10 +415,6 @@ t1 CREATE TABLE `t1` ( KEY `t1t` (`t`(767)) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DROP TABLE t1; -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; Test an assertion failure on purge. CREATE TABLE t1_purge ( A int, @@ -466,10 +455,6 @@ DELETE FROM t1_purge; DELETE FROM t2_purge; DELETE FROM t3_purge; DELETE FROM t4_purge; -SET GLOBAL innodb_file_per_table=on; -SET GLOBAL innodb_file_format='Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET @r=REPEAT('a',500); CREATE TABLE tlong(a int, v1 varchar(500), v2 varchar(500), v3 varchar(500), @@ -984,6 +969,4 @@ COL197 TEXT) row_format=compact,ENGINE=INNODB; ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -Warnings: Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb/r/innodb-32k-crash.result b/mysql-test/suite/innodb/r/innodb-32k-crash.result index c9b21bf414a..1fd5cd9b521 100644 --- a/mysql-test/suite/innodb/r/innodb-32k-crash.result +++ b/mysql-test/suite/innodb/r/innodb-32k-crash.result @@ -1,6 +1,4 @@ call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, h blob,i blob,j blob,k blob,l blob,m blob,n blob, o blob,p blob,q blob,r blob,s blob,t blob,u blob, @@ -161,58 +159,58 @@ COMMIT; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob, - `b` blob, - `c` blob, - `d` blob, - `e` blob, - `f` blob, - `g` blob, - `h` blob, - `i` blob, - `j` blob, - `k` blob, - `l` blob, - `m` blob, - `n` blob, - `o` blob, - `p` blob, - `q` blob, - `r` blob, - `s` blob, - `t` blob, - `u` blob, - `v` blob, - `w` blob, - `x` blob, - `y` blob, - `z` blob, - `aa` blob, - `ba` blob, - `ca` blob, - `da` blob, - `ea` blob, - `fa` blob, - `ga` blob, - `ha` blob, - `ia` blob, - `ja` blob, - `ka` blob, - `la` blob, - `ma` blob, - `na` blob, - `oa` blob, - `pa` blob, - `qa` blob, - `ra` blob, - `sa` blob, - `ta` blob, - `ua` blob, - `va` blob, - `wa` blob, - `xa` blob, - `ya` blob, - `za` blob, + `a` blob DEFAULT NULL, + `b` blob DEFAULT NULL, + `c` blob DEFAULT NULL, + `d` blob DEFAULT NULL, + `e` blob DEFAULT NULL, + `f` blob DEFAULT NULL, + `g` blob DEFAULT NULL, + `h` blob DEFAULT NULL, + `i` blob DEFAULT NULL, + `j` blob DEFAULT NULL, + `k` blob DEFAULT NULL, + `l` blob DEFAULT NULL, + `m` blob DEFAULT NULL, + `n` blob DEFAULT NULL, + `o` blob DEFAULT NULL, + `p` blob DEFAULT NULL, + `q` blob DEFAULT NULL, + `r` blob DEFAULT NULL, + `s` blob DEFAULT NULL, + `t` blob DEFAULT NULL, + `u` blob DEFAULT NULL, + `v` blob DEFAULT NULL, + `w` blob DEFAULT NULL, + `x` blob DEFAULT NULL, + `y` blob DEFAULT NULL, + `z` blob DEFAULT NULL, + `aa` blob DEFAULT NULL, + `ba` blob DEFAULT NULL, + `ca` blob DEFAULT NULL, + `da` blob DEFAULT NULL, + `ea` blob DEFAULT NULL, + `fa` blob DEFAULT NULL, + `ga` blob DEFAULT NULL, + `ha` blob DEFAULT NULL, + `ia` blob DEFAULT NULL, + `ja` blob DEFAULT NULL, + `ka` blob DEFAULT NULL, + `la` blob DEFAULT NULL, + `ma` blob DEFAULT NULL, + `na` blob DEFAULT NULL, + `oa` blob DEFAULT NULL, + `pa` blob DEFAULT NULL, + `qa` blob DEFAULT NULL, + `ra` blob DEFAULT NULL, + `sa` blob DEFAULT NULL, + `ta` blob DEFAULT NULL, + `ua` blob DEFAULT NULL, + `va` blob DEFAULT NULL, + `wa` blob DEFAULT NULL, + `xa` blob DEFAULT NULL, + `ya` blob DEFAULT NULL, + `za` blob DEFAULT NULL, KEY `t1a` (`a`(767)), KEY `t1b` (`b`(767)), KEY `t1c` (`c`(767)), @@ -227,58 +225,58 @@ t1 CREATE TABLE `t1` ( show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` blob, - `b` blob, - `c` blob, - `d` blob, - `e` blob, - `f` blob, - `g` blob, - `h` blob, - `i` blob, - `j` blob, - `k` blob, - `l` blob, - `m` blob, - `n` blob, - `o` blob, - `p` blob, - `q` blob, - `r` blob, - `s` blob, - `t` blob, - `u` blob, - `v` blob, - `w` blob, - `x` blob, - `y` blob, - `z` blob, - `aa` blob, - `ba` blob, - `ca` blob, - `da` blob, - `ea` blob, - `fa` blob, - `ga` blob, - `ha` blob, - `ia` blob, - `ja` blob, - `ka` blob, - `la` blob, - `ma` blob, - `na` blob, - `oa` blob, - `pa` blob, - `qa` blob, - `ra` blob, - `sa` blob, - `ta` blob, - `ua` blob, - `va` blob, - `wa` blob, - `xa` blob, - `ya` blob, - `za` blob, + `a` blob DEFAULT NULL, + `b` blob DEFAULT NULL, + `c` blob DEFAULT NULL, + `d` blob DEFAULT NULL, + `e` blob DEFAULT NULL, + `f` blob DEFAULT NULL, + `g` blob DEFAULT NULL, + `h` blob DEFAULT NULL, + `i` blob DEFAULT NULL, + `j` blob DEFAULT NULL, + `k` blob DEFAULT NULL, + `l` blob DEFAULT NULL, + `m` blob DEFAULT NULL, + `n` blob DEFAULT NULL, + `o` blob DEFAULT NULL, + `p` blob DEFAULT NULL, + `q` blob DEFAULT NULL, + `r` blob DEFAULT NULL, + `s` blob DEFAULT NULL, + `t` blob DEFAULT NULL, + `u` blob DEFAULT NULL, + `v` blob DEFAULT NULL, + `w` blob DEFAULT NULL, + `x` blob DEFAULT NULL, + `y` blob DEFAULT NULL, + `z` blob DEFAULT NULL, + `aa` blob DEFAULT NULL, + `ba` blob DEFAULT NULL, + `ca` blob DEFAULT NULL, + `da` blob DEFAULT NULL, + `ea` blob DEFAULT NULL, + `fa` blob DEFAULT NULL, + `ga` blob DEFAULT NULL, + `ha` blob DEFAULT NULL, + `ia` blob DEFAULT NULL, + `ja` blob DEFAULT NULL, + `ka` blob DEFAULT NULL, + `la` blob DEFAULT NULL, + `ma` blob DEFAULT NULL, + `na` blob DEFAULT NULL, + `oa` blob DEFAULT NULL, + `pa` blob DEFAULT NULL, + `qa` blob DEFAULT NULL, + `ra` blob DEFAULT NULL, + `sa` blob DEFAULT NULL, + `ta` blob DEFAULT NULL, + `ua` blob DEFAULT NULL, + `va` blob DEFAULT NULL, + `wa` blob DEFAULT NULL, + `xa` blob DEFAULT NULL, + `ya` blob DEFAULT NULL, + `za` blob DEFAULT NULL, KEY `t1a` (`a`(767)), KEY `t1b` (`b`(767)), KEY `t1c` (`c`(767)), diff --git a/mysql-test/suite/innodb/r/innodb-32k.result b/mysql-test/suite/innodb/r/innodb-32k.result index 2253ba5588f..140b9b87c2f 100644 --- a/mysql-test/suite/innodb/r/innodb-32k.result +++ b/mysql-test/suite/innodb/r/innodb-32k.result @@ -1,9 +1,4 @@ -call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); -call mtr.add_suppression("InnoDB: Resizing redo log from *"); -call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files."); -call mtr.add_suppression("InnoDB: New log files created, LSN=*"); -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; +call mtr.add_suppression("Innodb: Cannot add field.*row size is"); # Test 1) Show the page size from Information Schema SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; @@ -234,7 +229,7 @@ v=@d,w=@d,x=@d,y=@d,z=@d, aa=@d,ba=@d,ca=@d,da=@d,ea=@d,fa=@d,ga=@d,ha=@d,ia=@d,ja=@d, ka=@d,la=@d,ma=@d,na=@d,oa=@d,pa=@d,qa=@d,ra=@d,sa=@d,ta=@d,ua=@d, va=@d,wa=@d,xa=@d,ya=@d,za=@d; -ERROR HY000: Undo log record is too big. +ERROR HY000: Undo log record is too big BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d; @@ -278,7 +273,6 @@ CREATE INDEX tn1f9 ON t1 (oa(767)); CREATE INDEX to1f11 ON t1 (pa(767)); UPDATE t1 SET t=@e; CREATE INDEX t1f6 ON t1 (l(767)); -ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 16318. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs drop table t1; Test an assertion failure on purge. CREATE TABLE t1_purge ( @@ -320,8 +314,6 @@ DELETE FROM t1_purge; DELETE FROM t2_purge; DELETE FROM t3_purge; DELETE FROM t4_purge; -SET GLOBAL innodb_file_per_table=on; -SET GLOBAL innodb_file_format='Barracuda'; SET @r=REPEAT('a',500); CREATE TABLE tlong(a int, v1 varchar(500), v2 varchar(500), v3 varchar(500), @@ -366,22 +358,22 @@ CREATE INDEX ndx_p ON tlong2 (p(500)); SHOW CREATE TABLE tlong2; Table Create Table tlong2 CREATE TABLE `tlong2` ( - `a` blob, - `b` blob, - `c` blob, - `d` blob, - `e` blob, - `f` blob, - `g` blob, - `h` blob, - `i` blob, - `j` blob, - `k` blob, - `l` blob, - `m` blob, - `n` blob, - `o` blob, - `p` blob, + `a` blob DEFAULT NULL, + `b` blob DEFAULT NULL, + `c` blob DEFAULT NULL, + `d` blob DEFAULT NULL, + `e` blob DEFAULT NULL, + `f` blob DEFAULT NULL, + `g` blob DEFAULT NULL, + `h` blob DEFAULT NULL, + `i` blob DEFAULT NULL, + `j` blob DEFAULT NULL, + `k` blob DEFAULT NULL, + `l` blob DEFAULT NULL, + `m` blob DEFAULT NULL, + `n` blob DEFAULT NULL, + `o` blob DEFAULT NULL, + `p` blob DEFAULT NULL, KEY `ndx_c` (`c`(500)), KEY `ndx_d` (`d`(500)), KEY `ndx_e` (`e`(500)), @@ -665,203 +657,203 @@ set @b = repeat('zyxwvutsrqponmlkjihgfedcba', 2000); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `COL1` text, - `COL2` text, - `COL3` text, - `COL4` text, - `COL5` text, - `COL6` text, - `COL7` text, - `COL8` text, - `COL9` text, - `COL10` text, - `COL11` text, - `COL12` text, - `COL13` text, - `COL14` text, - `COL15` text, - `COL16` text, - `COL17` text, - `COL18` text, - `COL19` text, - `COL20` text, - `COL21` text, - `COL22` text, - `COL23` text, - `COL24` text, - `COL25` text, - `COL26` text, - `COL27` text, - `COL28` text, - `COL29` text, - `COL30` text, - `COL31` text, - `COL32` text, - `COL33` text, - `COL34` text, - `COL35` text, - `COL36` text, - `COL37` text, - `COL38` text, - `COL39` text, - `COL40` text, - `COL41` text, - `COL42` text, - `COL43` text, - `COL44` text, - `COL45` text, - `COL46` text, - `COL47` text, - `COL48` text, - `COL49` text, - `COL50` text, - `COL51` text, - `COL52` text, - `COL53` text, - `COL54` text, - `COL55` text, - `COL56` text, - `COL57` text, - `COL58` text, - `COL59` text, - `COL60` text, - `COL61` text, - `COL62` text, - `COL63` text, - `COL64` text, - `COL65` text, - `COL66` text, - `COL67` text, - `COL68` text, - `COL69` text, - `COL70` text, - `COL71` text, - `COL72` text, - `COL73` text, - `COL74` text, - `COL75` text, - `COL76` text, - `COL77` text, - `COL78` text, - `COL79` text, - `COL80` text, - `COL81` text, - `COL82` text, - `COL83` text, - `COL84` text, - `COL85` text, - `COL86` text, - `COL87` text, - `COL88` text, - `COL89` text, - `COL90` text, - `COL91` text, - `COL92` text, - `COL93` text, - `COL94` text, - `COL95` text, - `COL96` text, - `COL97` text, - `COL98` text, - `COL99` text, - `COL100` text, - `COL101` text, - `COL102` text, - `COL103` text, - `COL104` text, - `COL105` text, - `COL106` text, - `COL107` text, - `COL108` text, - `COL109` text, - `COL110` text, - `COL111` text, - `COL112` text, - `COL113` text, - `COL114` text, - `COL115` text, - `COL116` text, - `COL117` text, - `COL118` text, - `COL119` text, - `COL120` text, - `COL121` text, - `COL122` text, - `COL123` text, - `COL124` text, - `COL125` text, - `COL126` text, - `COL127` text, - `COL128` text, - `COL129` text, - `COL130` text, - `COL131` text, - `COL132` text, - `COL133` text, - `COL134` text, - `COL135` text, - `COL136` text, - `COL137` text, - `COL138` text, - `COL139` text, - `COL140` text, - `COL141` text, - `COL142` text, - `COL143` text, - `COL144` text, - `COL145` text, - `COL146` text, - `COL147` text, - `COL148` text, - `COL149` text, - `COL150` text, - `COL151` text, - `COL152` text, - `COL153` text, - `COL154` text, - `COL155` text, - `COL156` text, - `COL157` text, - `COL158` text, - `COL159` text, - `COL160` text, - `COL161` text, - `COL162` text, - `COL163` text, - `COL164` text, - `COL165` text, - `COL166` text, - `COL167` text, - `COL168` text, - `COL169` text, - `COL170` text, - `COL171` text, - `COL172` text, - `COL173` text, - `COL174` text, - `COL175` text, - `COL176` text, - `COL177` text, - `COL178` text, - `COL179` text, - `COL180` text, - `COL181` text, - `COL182` text, - `COL183` text, - `COL184` text, - `COL185` text, - `COL186` text, - `COL187` text, - `COL188` text, - `COL189` text, - `COL190` text, - `COL191` text, - `COL192` text, - `COL193` text, - `COL194` text, - `COL195` text, - `COL196` text, - `COL197` text + `COL1` text DEFAULT NULL, + `COL2` text DEFAULT NULL, + `COL3` text DEFAULT NULL, + `COL4` text DEFAULT NULL, + `COL5` text DEFAULT NULL, + `COL6` text DEFAULT NULL, + `COL7` text DEFAULT NULL, + `COL8` text DEFAULT NULL, + `COL9` text DEFAULT NULL, + `COL10` text DEFAULT NULL, + `COL11` text DEFAULT NULL, + `COL12` text DEFAULT NULL, + `COL13` text DEFAULT NULL, + `COL14` text DEFAULT NULL, + `COL15` text DEFAULT NULL, + `COL16` text DEFAULT NULL, + `COL17` text DEFAULT NULL, + `COL18` text DEFAULT NULL, + `COL19` text DEFAULT NULL, + `COL20` text DEFAULT NULL, + `COL21` text DEFAULT NULL, + `COL22` text DEFAULT NULL, + `COL23` text DEFAULT NULL, + `COL24` text DEFAULT NULL, + `COL25` text DEFAULT NULL, + `COL26` text DEFAULT NULL, + `COL27` text DEFAULT NULL, + `COL28` text DEFAULT NULL, + `COL29` text DEFAULT NULL, + `COL30` text DEFAULT NULL, + `COL31` text DEFAULT NULL, + `COL32` text DEFAULT NULL, + `COL33` text DEFAULT NULL, + `COL34` text DEFAULT NULL, + `COL35` text DEFAULT NULL, + `COL36` text DEFAULT NULL, + `COL37` text DEFAULT NULL, + `COL38` text DEFAULT NULL, + `COL39` text DEFAULT NULL, + `COL40` text DEFAULT NULL, + `COL41` text DEFAULT NULL, + `COL42` text DEFAULT NULL, + `COL43` text DEFAULT NULL, + `COL44` text DEFAULT NULL, + `COL45` text DEFAULT NULL, + `COL46` text DEFAULT NULL, + `COL47` text DEFAULT NULL, + `COL48` text DEFAULT NULL, + `COL49` text DEFAULT NULL, + `COL50` text DEFAULT NULL, + `COL51` text DEFAULT NULL, + `COL52` text DEFAULT NULL, + `COL53` text DEFAULT NULL, + `COL54` text DEFAULT NULL, + `COL55` text DEFAULT NULL, + `COL56` text DEFAULT NULL, + `COL57` text DEFAULT NULL, + `COL58` text DEFAULT NULL, + `COL59` text DEFAULT NULL, + `COL60` text DEFAULT NULL, + `COL61` text DEFAULT NULL, + `COL62` text DEFAULT NULL, + `COL63` text DEFAULT NULL, + `COL64` text DEFAULT NULL, + `COL65` text DEFAULT NULL, + `COL66` text DEFAULT NULL, + `COL67` text DEFAULT NULL, + `COL68` text DEFAULT NULL, + `COL69` text DEFAULT NULL, + `COL70` text DEFAULT NULL, + `COL71` text DEFAULT NULL, + `COL72` text DEFAULT NULL, + `COL73` text DEFAULT NULL, + `COL74` text DEFAULT NULL, + `COL75` text DEFAULT NULL, + `COL76` text DEFAULT NULL, + `COL77` text DEFAULT NULL, + `COL78` text DEFAULT NULL, + `COL79` text DEFAULT NULL, + `COL80` text DEFAULT NULL, + `COL81` text DEFAULT NULL, + `COL82` text DEFAULT NULL, + `COL83` text DEFAULT NULL, + `COL84` text DEFAULT NULL, + `COL85` text DEFAULT NULL, + `COL86` text DEFAULT NULL, + `COL87` text DEFAULT NULL, + `COL88` text DEFAULT NULL, + `COL89` text DEFAULT NULL, + `COL90` text DEFAULT NULL, + `COL91` text DEFAULT NULL, + `COL92` text DEFAULT NULL, + `COL93` text DEFAULT NULL, + `COL94` text DEFAULT NULL, + `COL95` text DEFAULT NULL, + `COL96` text DEFAULT NULL, + `COL97` text DEFAULT NULL, + `COL98` text DEFAULT NULL, + `COL99` text DEFAULT NULL, + `COL100` text DEFAULT NULL, + `COL101` text DEFAULT NULL, + `COL102` text DEFAULT NULL, + `COL103` text DEFAULT NULL, + `COL104` text DEFAULT NULL, + `COL105` text DEFAULT NULL, + `COL106` text DEFAULT NULL, + `COL107` text DEFAULT NULL, + `COL108` text DEFAULT NULL, + `COL109` text DEFAULT NULL, + `COL110` text DEFAULT NULL, + `COL111` text DEFAULT NULL, + `COL112` text DEFAULT NULL, + `COL113` text DEFAULT NULL, + `COL114` text DEFAULT NULL, + `COL115` text DEFAULT NULL, + `COL116` text DEFAULT NULL, + `COL117` text DEFAULT NULL, + `COL118` text DEFAULT NULL, + `COL119` text DEFAULT NULL, + `COL120` text DEFAULT NULL, + `COL121` text DEFAULT NULL, + `COL122` text DEFAULT NULL, + `COL123` text DEFAULT NULL, + `COL124` text DEFAULT NULL, + `COL125` text DEFAULT NULL, + `COL126` text DEFAULT NULL, + `COL127` text DEFAULT NULL, + `COL128` text DEFAULT NULL, + `COL129` text DEFAULT NULL, + `COL130` text DEFAULT NULL, + `COL131` text DEFAULT NULL, + `COL132` text DEFAULT NULL, + `COL133` text DEFAULT NULL, + `COL134` text DEFAULT NULL, + `COL135` text DEFAULT NULL, + `COL136` text DEFAULT NULL, + `COL137` text DEFAULT NULL, + `COL138` text DEFAULT NULL, + `COL139` text DEFAULT NULL, + `COL140` text DEFAULT NULL, + `COL141` text DEFAULT NULL, + `COL142` text DEFAULT NULL, + `COL143` text DEFAULT NULL, + `COL144` text DEFAULT NULL, + `COL145` text DEFAULT NULL, + `COL146` text DEFAULT NULL, + `COL147` text DEFAULT NULL, + `COL148` text DEFAULT NULL, + `COL149` text DEFAULT NULL, + `COL150` text DEFAULT NULL, + `COL151` text DEFAULT NULL, + `COL152` text DEFAULT NULL, + `COL153` text DEFAULT NULL, + `COL154` text DEFAULT NULL, + `COL155` text DEFAULT NULL, + `COL156` text DEFAULT NULL, + `COL157` text DEFAULT NULL, + `COL158` text DEFAULT NULL, + `COL159` text DEFAULT NULL, + `COL160` text DEFAULT NULL, + `COL161` text DEFAULT NULL, + `COL162` text DEFAULT NULL, + `COL163` text DEFAULT NULL, + `COL164` text DEFAULT NULL, + `COL165` text DEFAULT NULL, + `COL166` text DEFAULT NULL, + `COL167` text DEFAULT NULL, + `COL168` text DEFAULT NULL, + `COL169` text DEFAULT NULL, + `COL170` text DEFAULT NULL, + `COL171` text DEFAULT NULL, + `COL172` text DEFAULT NULL, + `COL173` text DEFAULT NULL, + `COL174` text DEFAULT NULL, + `COL175` text DEFAULT NULL, + `COL176` text DEFAULT NULL, + `COL177` text DEFAULT NULL, + `COL178` text DEFAULT NULL, + `COL179` text DEFAULT NULL, + `COL180` text DEFAULT NULL, + `COL181` text DEFAULT NULL, + `COL182` text DEFAULT NULL, + `COL183` text DEFAULT NULL, + `COL184` text DEFAULT NULL, + `COL185` text DEFAULT NULL, + `COL186` text DEFAULT NULL, + `COL187` text DEFAULT NULL, + `COL188` text DEFAULT NULL, + `COL189` text DEFAULT NULL, + `COL190` text DEFAULT NULL, + `COL191` text DEFAULT NULL, + `COL192` text DEFAULT NULL, + `COL193` text DEFAULT NULL, + `COL194` text DEFAULT NULL, + `COL195` text DEFAULT NULL, + `COL196` text DEFAULT NULL, + `COL197` text DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC update t2 set col150=@a; update t2 set col145=@b; diff --git a/mysql-test/suite/innodb/r/innodb-64k-crash.result b/mysql-test/suite/innodb/r/innodb-64k-crash.result index 9371c4a09e5..7e2941b8e3b 100644 --- a/mysql-test/suite/innodb/r/innodb-64k-crash.result +++ b/mysql-test/suite/innodb/r/innodb-64k-crash.result @@ -1,6 +1,4 @@ call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, h blob,i blob,j blob,k blob,l blob,m blob,n blob, o blob,p blob,q blob,r blob,s blob,t blob,u blob, @@ -347,110 +345,110 @@ COMMIT; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob, - `b` blob, - `c` blob, - `d` blob, - `e` blob, - `f` blob, - `g` blob, - `h` blob, - `i` blob, - `j` blob, - `k` blob, - `l` blob, - `m` blob, - `n` blob, - `o` blob, - `p` blob, - `q` blob, - `r` blob, - `s` blob, - `t` blob, - `u` blob, - `v` blob, - `w` blob, - `x` blob, - `y` blob, - `z` blob, - `aa` blob, - `ba` blob, - `ca` blob, - `da` blob, - `ea` blob, - `fa` blob, - `ga` blob, - `ha` blob, - `ia` blob, - `ja` blob, - `ka` blob, - `la` blob, - `ma` blob, - `na` blob, - `oa` blob, - `pa` blob, - `qa` blob, - `ra` blob, - `sa` blob, - `ta` blob, - `ua` blob, - `va` blob, - `wa` blob, - `xa` blob, - `ya` blob, - `za` blob, - `ab` blob, - `bb` blob, - `cb` blob, - `db` blob, - `eb` blob, - `fb` blob, - `gb` blob, - `hb` blob, - `ib` blob, - `jb` blob, - `kb` blob, - `lb` blob, - `mb` blob, - `nb` blob, - `ob` blob, - `pb` blob, - `qb` blob, - `rb` blob, - `sb` blob, - `tb` blob, - `ub` blob, - `vb` blob, - `wb` blob, - `xb` blob, - `yb` blob, - `zb` blob, - `ac` blob, - `bc` blob, - `cc` blob, - `dc` blob, - `ec` blob, - `fc` blob, - `gc` blob, - `hc` blob, - `ic` blob, - `jc` blob, - `kc` blob, - `lc` blob, - `mc` blob, - `nc` blob, - `oc` blob, - `pc` blob, - `qc` blob, - `rc` blob, - `sc` blob, - `tc` blob, - `uc` blob, - `vc` blob, - `wc` blob, - `xc` blob, - `yc` blob, - `zc` blob, + `a` blob DEFAULT NULL, + `b` blob DEFAULT NULL, + `c` blob DEFAULT NULL, + `d` blob DEFAULT NULL, + `e` blob DEFAULT NULL, + `f` blob DEFAULT NULL, + `g` blob DEFAULT NULL, + `h` blob DEFAULT NULL, + `i` blob DEFAULT NULL, + `j` blob DEFAULT NULL, + `k` blob DEFAULT NULL, + `l` blob DEFAULT NULL, + `m` blob DEFAULT NULL, + `n` blob DEFAULT NULL, + `o` blob DEFAULT NULL, + `p` blob DEFAULT NULL, + `q` blob DEFAULT NULL, + `r` blob DEFAULT NULL, + `s` blob DEFAULT NULL, + `t` blob DEFAULT NULL, + `u` blob DEFAULT NULL, + `v` blob DEFAULT NULL, + `w` blob DEFAULT NULL, + `x` blob DEFAULT NULL, + `y` blob DEFAULT NULL, + `z` blob DEFAULT NULL, + `aa` blob DEFAULT NULL, + `ba` blob DEFAULT NULL, + `ca` blob DEFAULT NULL, + `da` blob DEFAULT NULL, + `ea` blob DEFAULT NULL, + `fa` blob DEFAULT NULL, + `ga` blob DEFAULT NULL, + `ha` blob DEFAULT NULL, + `ia` blob DEFAULT NULL, + `ja` blob DEFAULT NULL, + `ka` blob DEFAULT NULL, + `la` blob DEFAULT NULL, + `ma` blob DEFAULT NULL, + `na` blob DEFAULT NULL, + `oa` blob DEFAULT NULL, + `pa` blob DEFAULT NULL, + `qa` blob DEFAULT NULL, + `ra` blob DEFAULT NULL, + `sa` blob DEFAULT NULL, + `ta` blob DEFAULT NULL, + `ua` blob DEFAULT NULL, + `va` blob DEFAULT NULL, + `wa` blob DEFAULT NULL, + `xa` blob DEFAULT NULL, + `ya` blob DEFAULT NULL, + `za` blob DEFAULT NULL, + `ab` blob DEFAULT NULL, + `bb` blob DEFAULT NULL, + `cb` blob DEFAULT NULL, + `db` blob DEFAULT NULL, + `eb` blob DEFAULT NULL, + `fb` blob DEFAULT NULL, + `gb` blob DEFAULT NULL, + `hb` blob DEFAULT NULL, + `ib` blob DEFAULT NULL, + `jb` blob DEFAULT NULL, + `kb` blob DEFAULT NULL, + `lb` blob DEFAULT NULL, + `mb` blob DEFAULT NULL, + `nb` blob DEFAULT NULL, + `ob` blob DEFAULT NULL, + `pb` blob DEFAULT NULL, + `qb` blob DEFAULT NULL, + `rb` blob DEFAULT NULL, + `sb` blob DEFAULT NULL, + `tb` blob DEFAULT NULL, + `ub` blob DEFAULT NULL, + `vb` blob DEFAULT NULL, + `wb` blob DEFAULT NULL, + `xb` blob DEFAULT NULL, + `yb` blob DEFAULT NULL, + `zb` blob DEFAULT NULL, + `ac` blob DEFAULT NULL, + `bc` blob DEFAULT NULL, + `cc` blob DEFAULT NULL, + `dc` blob DEFAULT NULL, + `ec` blob DEFAULT NULL, + `fc` blob DEFAULT NULL, + `gc` blob DEFAULT NULL, + `hc` blob DEFAULT NULL, + `ic` blob DEFAULT NULL, + `jc` blob DEFAULT NULL, + `kc` blob DEFAULT NULL, + `lc` blob DEFAULT NULL, + `mc` blob DEFAULT NULL, + `nc` blob DEFAULT NULL, + `oc` blob DEFAULT NULL, + `pc` blob DEFAULT NULL, + `qc` blob DEFAULT NULL, + `rc` blob DEFAULT NULL, + `sc` blob DEFAULT NULL, + `tc` blob DEFAULT NULL, + `uc` blob DEFAULT NULL, + `vc` blob DEFAULT NULL, + `wc` blob DEFAULT NULL, + `xc` blob DEFAULT NULL, + `yc` blob DEFAULT NULL, + `zc` blob DEFAULT NULL, KEY `t1a` (`a`(767),`b`(767)), KEY `t1c` (`c`(767),`d`(767)), KEY `t1e` (`e`(767),`f`(767)), @@ -470,110 +468,110 @@ t1 CREATE TABLE `t1` ( show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` blob, - `b` blob, - `c` blob, - `d` blob, - `e` blob, - `f` blob, - `g` blob, - `h` blob, - `i` blob, - `j` blob, - `k` blob, - `l` blob, - `m` blob, - `n` blob, - `o` blob, - `p` blob, - `q` blob, - `r` blob, - `s` blob, - `t` blob, - `u` blob, - `v` blob, - `w` blob, - `x` blob, - `y` blob, - `z` blob, - `aa` blob, - `ba` blob, - `ca` blob, - `da` blob, - `ea` blob, - `fa` blob, - `ga` blob, - `ha` blob, - `ia` blob, - `ja` blob, - `ka` blob, - `la` blob, - `ma` blob, - `na` blob, - `oa` blob, - `pa` blob, - `qa` blob, - `ra` blob, - `sa` blob, - `ta` blob, - `ua` blob, - `va` blob, - `wa` blob, - `xa` blob, - `ya` blob, - `za` blob, - `ab` blob, - `bb` blob, - `cb` blob, - `db` blob, - `eb` blob, - `fb` blob, - `gb` blob, - `hb` blob, - `ib` blob, - `jb` blob, - `kb` blob, - `lb` blob, - `mb` blob, - `nb` blob, - `ob` blob, - `pb` blob, - `qb` blob, - `rb` blob, - `sb` blob, - `tb` blob, - `ub` blob, - `vb` blob, - `wb` blob, - `xb` blob, - `yb` blob, - `zb` blob, - `ac` blob, - `bc` blob, - `cc` blob, - `dc` blob, - `ec` blob, - `fc` blob, - `gc` blob, - `hc` blob, - `ic` blob, - `jc` blob, - `kc` blob, - `lc` blob, - `mc` blob, - `nc` blob, - `oc` blob, - `pc` blob, - `qc` blob, - `rc` blob, - `sc` blob, - `tc` blob, - `uc` blob, - `vc` blob, - `wc` blob, - `xc` blob, - `yc` blob, - `zc` blob, + `a` blob DEFAULT NULL, + `b` blob DEFAULT NULL, + `c` blob DEFAULT NULL, + `d` blob DEFAULT NULL, + `e` blob DEFAULT NULL, + `f` blob DEFAULT NULL, + `g` blob DEFAULT NULL, + `h` blob DEFAULT NULL, + `i` blob DEFAULT NULL, + `j` blob DEFAULT NULL, + `k` blob DEFAULT NULL, + `l` blob DEFAULT NULL, + `m` blob DEFAULT NULL, + `n` blob DEFAULT NULL, + `o` blob DEFAULT NULL, + `p` blob DEFAULT NULL, + `q` blob DEFAULT NULL, + `r` blob DEFAULT NULL, + `s` blob DEFAULT NULL, + `t` blob DEFAULT NULL, + `u` blob DEFAULT NULL, + `v` blob DEFAULT NULL, + `w` blob DEFAULT NULL, + `x` blob DEFAULT NULL, + `y` blob DEFAULT NULL, + `z` blob DEFAULT NULL, + `aa` blob DEFAULT NULL, + `ba` blob DEFAULT NULL, + `ca` blob DEFAULT NULL, + `da` blob DEFAULT NULL, + `ea` blob DEFAULT NULL, + `fa` blob DEFAULT NULL, + `ga` blob DEFAULT NULL, + `ha` blob DEFAULT NULL, + `ia` blob DEFAULT NULL, + `ja` blob DEFAULT NULL, + `ka` blob DEFAULT NULL, + `la` blob DEFAULT NULL, + `ma` blob DEFAULT NULL, + `na` blob DEFAULT NULL, + `oa` blob DEFAULT NULL, + `pa` blob DEFAULT NULL, + `qa` blob DEFAULT NULL, + `ra` blob DEFAULT NULL, + `sa` blob DEFAULT NULL, + `ta` blob DEFAULT NULL, + `ua` blob DEFAULT NULL, + `va` blob DEFAULT NULL, + `wa` blob DEFAULT NULL, + `xa` blob DEFAULT NULL, + `ya` blob DEFAULT NULL, + `za` blob DEFAULT NULL, + `ab` blob DEFAULT NULL, + `bb` blob DEFAULT NULL, + `cb` blob DEFAULT NULL, + `db` blob DEFAULT NULL, + `eb` blob DEFAULT NULL, + `fb` blob DEFAULT NULL, + `gb` blob DEFAULT NULL, + `hb` blob DEFAULT NULL, + `ib` blob DEFAULT NULL, + `jb` blob DEFAULT NULL, + `kb` blob DEFAULT NULL, + `lb` blob DEFAULT NULL, + `mb` blob DEFAULT NULL, + `nb` blob DEFAULT NULL, + `ob` blob DEFAULT NULL, + `pb` blob DEFAULT NULL, + `qb` blob DEFAULT NULL, + `rb` blob DEFAULT NULL, + `sb` blob DEFAULT NULL, + `tb` blob DEFAULT NULL, + `ub` blob DEFAULT NULL, + `vb` blob DEFAULT NULL, + `wb` blob DEFAULT NULL, + `xb` blob DEFAULT NULL, + `yb` blob DEFAULT NULL, + `zb` blob DEFAULT NULL, + `ac` blob DEFAULT NULL, + `bc` blob DEFAULT NULL, + `cc` blob DEFAULT NULL, + `dc` blob DEFAULT NULL, + `ec` blob DEFAULT NULL, + `fc` blob DEFAULT NULL, + `gc` blob DEFAULT NULL, + `hc` blob DEFAULT NULL, + `ic` blob DEFAULT NULL, + `jc` blob DEFAULT NULL, + `kc` blob DEFAULT NULL, + `lc` blob DEFAULT NULL, + `mc` blob DEFAULT NULL, + `nc` blob DEFAULT NULL, + `oc` blob DEFAULT NULL, + `pc` blob DEFAULT NULL, + `qc` blob DEFAULT NULL, + `rc` blob DEFAULT NULL, + `sc` blob DEFAULT NULL, + `tc` blob DEFAULT NULL, + `uc` blob DEFAULT NULL, + `vc` blob DEFAULT NULL, + `wc` blob DEFAULT NULL, + `xc` blob DEFAULT NULL, + `yc` blob DEFAULT NULL, + `zc` blob DEFAULT NULL, KEY `t2a` (`a`(767),`b`(767)), KEY `t2c` (`c`(767),`d`(767)), KEY `t2e` (`e`(767),`f`(767)), diff --git a/mysql-test/suite/innodb/r/innodb-64k.result b/mysql-test/suite/innodb/r/innodb-64k.result index c84ad8caf88..f72ba8ef8b5 100644 --- a/mysql-test/suite/innodb/r/innodb-64k.result +++ b/mysql-test/suite/innodb/r/innodb-64k.result @@ -1,9 +1,3 @@ -call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); -call mtr.add_suppression("InnoDB: Resizing redo log from *"); -call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files."); -call mtr.add_suppression("InnoDB: New log files created, LSN=*"); -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; # Test 1) Show the page size from Information Schema SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; diff --git a/mysql-test/suite/innodb/r/innodb-alter-discard.result b/mysql-test/suite/innodb/r/innodb-alter-discard.result deleted file mode 100644 index b05b905bc34..00000000000 --- a/mysql-test/suite/innodb/r/innodb-alter-discard.result +++ /dev/null @@ -1,28 +0,0 @@ -call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*"); -SET GLOBAL innodb_file_per_table=1; -CREATE TABLE t(a INT)ENGINE=InnoDB; -call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation."); -call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified."); -call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them."); -call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: './test/t.ibd' OS error: .*"); -call mtr.add_suppression("InnoDB: Ignoring tablespace `test/t` because it could not be opened."); -call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .*"); -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 'test/t' -DROP TABLE t; diff --git a/mysql-test/suite/innodb/r/innodb-alter-tempfile.result b/mysql-test/suite/innodb/r/innodb-alter-tempfile.result index 3cc973ca3a3..ce13ad0978b 100644 --- a/mysql-test/suite/innodb/r/innodb-alter-tempfile.result +++ b/mysql-test/suite/innodb/r/innodb-alter-tempfile.result @@ -4,10 +4,6 @@ # Temporary tablename will be unique. This makes sure that future # in-place ALTERs of the same table will not be blocked due to # temporary tablename. -call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed -"); -call mtr.add_suppression("InnoDB: file read of space .* page .*"); -call mtr.add_suppression("InnoDB: Trying to recover it from the doublewrite buffer."); # Crash the server in ha_innobase::commit_inplace_alter_table() CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb; SET debug='d,innodb_alter_commit_crash_before_commit'; diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result index 52c5bb6157b..e276303557e 100644 --- a/mysql-test/suite/innodb/r/innodb-autoinc.result +++ b/mysql-test/suite/innodb/r/innodb-autoinc.result @@ -323,7 +323,7 @@ DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 'test.t1' CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; -INSERT INTO t1 VALUES(-1); +INSERT IGNORE INTO t1 VALUES(-1); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 SELECT * FROM t1; @@ -334,7 +334,7 @@ SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 100 auto_increment_offset 10 -INSERT INTO t1 VALUES (-2); +INSERT IGNORE INTO t1 VALUES (-2); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t1 VALUES (NULL); @@ -378,7 +378,7 @@ DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 'test.t1' CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; -INSERT INTO t1 VALUES(-1); +INSERT IGNORE INTO t1 VALUES(-1); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 SELECT * FROM t1; @@ -389,7 +389,7 @@ SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 100 auto_increment_offset 10 -INSERT INTO t1 VALUES (-2),(NULL),(2),(NULL); +INSERT IGNORE INTO t1 VALUES (-2),(NULL),(2),(NULL); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t1 VALUES (250),(NULL); @@ -860,6 +860,7 @@ Note 1051 Unknown table 'test.t1' DROP TABLE IF EXISTS t2; Warnings: Note 1051 Unknown table 'test.t2' +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1( c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; @@ -873,6 +874,7 @@ INSERT INTO t2 SELECT NULL FROM t1; ERROR 22003: Out of range value for column 'c1' at row 1 DROP TABLE t1; DROP TABLE t2; +SET sql_mode = DEFAULT; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value @@ -899,10 +901,10 @@ c1 c2 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-1, 'innodb'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t1 VALUES (-127, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-127, 'innodb'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t1 VALUES (NULL, NULL); @@ -941,10 +943,10 @@ c1 c2 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-1, 'innodb'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t1 VALUES (-32757, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-32757, 'innodb'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t1 VALUES (NULL, NULL); @@ -983,10 +985,10 @@ c1 c2 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-1, 'innodb'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t1 VALUES (-8388607, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-8388607, 'innodb'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t1 VALUES (NULL, NULL); @@ -1025,10 +1027,10 @@ c1 c2 DROP TABLE t1; CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-1, 'innodb'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t1 VALUES (-2147483647, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-2147483647, 'innodb'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t1 VALUES (NULL, NULL); @@ -1067,10 +1069,10 @@ c1 c2 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-1, 'innodb'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 -INSERT INTO t1 VALUES (-9223372036854775807, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-9223372036854775807, 'innodb'); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 INSERT INTO t1 VALUES (NULL, NULL); @@ -1298,6 +1300,7 @@ t1 CREATE TABLE `t1` ( SELECT * FROM t1; c1 c2 2147483648 a +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 CHANGE c1 c1 INT default 0; Warnings: Warning 1264 Out of range value for column 'c1' at row 1 diff --git a/mysql-test/suite/innodb/r/innodb-bigblob.result b/mysql-test/suite/innodb/r/innodb-bigblob.result index 20fe0ce5c43..dcde9804cdc 100644 --- a/mysql-test/suite/innodb/r/innodb-bigblob.result +++ b/mysql-test/suite/innodb/r/innodb-bigblob.result @@ -1,7 +1,3 @@ -call mtr.add_suppression("Resizing redo log from *"); -call mtr.add_suppression("Starting to delete and rewrite log files."); -call mtr.add_suppression("New log files created, LSN=*"); -call mtr.add_suppression("Writer thread is waiting this semaphore"); create table foo (id varchar(37) not null, content longblob) engine=INNODB; insert into foo (id, content) values('xyz', ''); update foo set content=repeat('a', 43941888) where id='xyz'; diff --git a/mysql-test/suite/innodb/r/innodb-bug-14068765.result b/mysql-test/suite/innodb/r/innodb-bug-14068765.result index f6d37b23114..f7a2644cbf9 100644 --- a/mysql-test/suite/innodb/r/innodb-bug-14068765.result +++ b/mysql-test/suite/innodb/r/innodb-bug-14068765.result @@ -1,8 +1,3 @@ -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); @@ -38,7 +33,3 @@ COUNT(*) 2 DROP TABLE testdb_wl5522.t1; DROP DATABASE testdb_wl5522; -SET GLOBAL INNODB_FILE_FORMAT=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -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 index 3ba8e0e8440..b8e0e3a579d 100644 --- a/mysql-test/suite/innodb/r/innodb-bug-14084530.result +++ b/mysql-test/suite/innodb/r/innodb-bug-14084530.result @@ -1,8 +1,3 @@ -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; @@ -24,10 +19,4 @@ 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=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL INNODB_FILE_PER_TABLE=1; diff --git a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result index 5abfb8cffa7..ca58b77a21e 100644 --- a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result +++ b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result @@ -30,15 +30,14 @@ x x x connect con1,localhost,root,,; -connection con1; BEGIN; DELETE FROM t1 WHERE a=1; INSERT INTO t1 VALUES(1,'X',1); -SET DEBUG='+d,crash_after_log_ibuf_upd_inplace'; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace'; SELECT b FROM t1 LIMIT 3; ERROR HY000: Lost connection to MySQL server during query +disconnect con1; +connection default; FOUND /Wrote log record for ibuf update in place operation/ in my_restart.err CHECK TABLE t1; Table Op Msg_type Msg_text diff --git a/mysql-test/suite/innodb/r/innodb-fk-virtual.result b/mysql-test/suite/innodb/r/innodb-fk-virtual.result new file mode 100644 index 00000000000..a79cd133aa3 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-fk-virtual.result @@ -0,0 +1,86 @@ +create or replace table a ( +cola int(10) primary key, +v_cola int(10) as (cola mod 10) virtual, +p_cola int(10) as (cola mod 10) persistent +) engine=innodb; +create index v_cola on a (v_cola); +create index p_cola on a (p_cola); +create or replace table b( +cola int(10), +v_cola int(10), +p_cola int(10), +c_cola int(10) as (cola + 2) virtual +) engine=innodb; +alter table b add constraint `p_cola_fk` +foreign key (p_cola) references a (p_cola) +on delete restrict +on update restrict; +show warnings; +Level Code Message +show create table b; +Table Create Table +b CREATE TABLE `b` ( + `cola` int(10) DEFAULT NULL, + `v_cola` int(10) DEFAULT NULL, + `p_cola` int(10) DEFAULT NULL, + `c_cola` int(10) GENERATED ALWAYS AS (`cola` + 2) VIRTUAL, + KEY `p_cola_fk` (`p_cola`), + CONSTRAINT `p_cola_fk` FOREIGN KEY (`p_cola`) REFERENCES `a` (`p_cola`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +alter table b add constraint `v_cola_fk` +foreign key (v_cola) references a (v_cola) +on delete restrict +on update restrict; +show warnings; +Level Code Message +show create table b; +Table Create Table +b CREATE TABLE `b` ( + `cola` int(10) DEFAULT NULL, + `v_cola` int(10) DEFAULT NULL, + `p_cola` int(10) DEFAULT NULL, + `c_cola` int(10) GENERATED ALWAYS AS (`cola` + 2) VIRTUAL, + KEY `p_cola_fk` (`p_cola`), + KEY `v_cola_fk` (`v_cola`), + CONSTRAINT `p_cola_fk` FOREIGN KEY (`p_cola`) REFERENCES `a` (`p_cola`), + CONSTRAINT `v_cola_fk` FOREIGN KEY (`v_cola`) REFERENCES `a` (`v_cola`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +alter table b add constraint `c_cola_fk` +foreign key (c_cola) references a (cola) +on delete restrict +on update restrict; +show warnings; +Level Code Message +show create table b; +Table Create Table +b CREATE TABLE `b` ( + `cola` int(10) DEFAULT NULL, + `v_cola` int(10) DEFAULT NULL, + `p_cola` int(10) DEFAULT NULL, + `c_cola` int(10) GENERATED ALWAYS AS (`cola` + 2) VIRTUAL, + KEY `p_cola_fk` (`p_cola`), + KEY `v_cola_fk` (`v_cola`), + KEY `c_cola_fk` (`c_cola`), + CONSTRAINT `c_cola_fk` FOREIGN KEY (`c_cola`) REFERENCES `a` (`cola`), + CONSTRAINT `p_cola_fk` FOREIGN KEY (`p_cola`) REFERENCES `a` (`p_cola`), + CONSTRAINT `v_cola_fk` FOREIGN KEY (`v_cola`) REFERENCES `a` (`v_cola`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +insert into a(cola) values (12); +select * from a; +cola v_cola p_cola +12 2 2 +insert into b(cola, v_cola, p_cola) values (10,2,2); +select * from b; +cola v_cola p_cola c_cola +10 2 2 12 +insert into b(cola, v_cola, p_cola) values (10,1,1); +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`b`, CONSTRAINT `p_cola_fk` FOREIGN KEY (`p_cola`) REFERENCES `a` (`p_cola`)) +delete from a; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`b`, CONSTRAINT `c_cola_fk` FOREIGN KEY (`c_cola`) REFERENCES `a` (`cola`)) +select * from a; +cola v_cola p_cola +12 2 2 +select * from b; +cola v_cola p_cola c_cola +10 2 2 12 +drop table b, a; diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result index 2b5e7bf214d..1b7f44fa8c4 100644 --- a/mysql-test/suite/innodb/r/innodb-index.result +++ b/mysql-test/suite/innodb/r/innodb-index.result @@ -1,7 +1,3 @@ -set global innodb_file_per_table=on; -set global innodb_file_format='Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS; create table t1(a varchar(2) primary key) engine=innodb; insert into t1 values(''); @@ -858,13 +854,6 @@ explain select * from t1 order by a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index drop table t1; -set global innodb_file_per_table=1; -set global innodb_file_format=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -set global innodb_file_format_max=Barracuda; -Warnings: -Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET FOREIGN_KEY_CHECKS=0; CREATE TABLE t1( @@ -1195,7 +1184,3 @@ t2c CREATE TABLE `t2c` ( KEY `t2a` (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t1,t2,t2c,t2i; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -Warnings: -Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result b/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result index a566c94bd3b..61507ddbe5c 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result @@ -1,7 +1,3 @@ -set global innodb_file_format = `barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -set global innodb_file_per_table = on; set global innodb_compression_algorithm = 5; create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8; show warnings; @@ -437,5 +433,3 @@ drop table innodb_page_compressed6; drop table innodb_page_compressed7; drop table innodb_page_compressed8; drop table innodb_page_compressed9; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_default.result b/mysql-test/suite/innodb/r/innodb-page_compression_default.result new file mode 100644 index 00000000000..10e1d6c766c --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-page_compression_default.result @@ -0,0 +1,20 @@ +SET GLOBAL innodb_file_format = `Barracuda`; +SET GLOBAL innodb_file_per_table = ON; +create table t1 (c1 int not null primary key auto_increment, b char(200)) engine=innodb page_compressed=1; +insert into t1 values(NULL,'compressed_text_aaaaaaaaabbbbbbbbbbbbbccccccccccccc'); +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +# t1 compressed expected NOT FOUND +NOT FOUND /compressed_text/ in t1.ibd +drop table t1; diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result b/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result index 76cd5b16f28..6cef1978ca0 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result @@ -1,7 +1,3 @@ -set global innodb_file_format = `barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -set global innodb_file_per_table = on; set global innodb_compression_algorithm = 2; create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8; show warnings; @@ -438,5 +434,3 @@ drop table innodb_page_compressed6; drop table innodb_page_compressed7; drop table innodb_page_compressed8; drop table innodb_page_compressed9; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result b/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result index cceff820ee0..c7ab859e102 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result @@ -1,7 +1,3 @@ -set global innodb_file_format = `barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -set global innodb_file_per_table = on; set global innodb_compression_algorithm = 4; create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8; show warnings; @@ -437,5 +433,3 @@ drop table innodb_page_compressed6; drop table innodb_page_compressed7; drop table innodb_page_compressed8; drop table innodb_page_compressed9; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result b/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result index 1a9235fab62..379abcc9968 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result @@ -1,7 +1,3 @@ -set global innodb_file_format = `barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -set global innodb_file_per_table = on; set global innodb_compression_algorithm = 3; create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8; show warnings; @@ -351,5 +347,3 @@ drop table innodb_page_compressed6; drop table innodb_page_compressed7; drop table innodb_page_compressed8; drop table innodb_page_compressed9; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result b/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result index e1d46b04a7f..442885755fd 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result @@ -1,102 +1,98 @@ -call mtr.add_suppression("Compression failed for space*"); -set global innodb_file_format = `barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -set global innodb_file_per_table = on; +call mtr.add_suppression("InnoDB: Compression failed for space.*"); set global innodb_compression_algorithm = 6; -create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8; +create table innodb_compressed(c1 int, b char(200)) engine=innodb row_format=compressed key_block_size=8; show warnings; Level Code Message -create table innodb_normal (c1 int, b char(20)) engine=innodb; +create table innodb_normal (c1 int, b char(200)) engine=innodb; show warnings; Level Code Message -create table innodb_page_compressed1 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=1; +create table innodb_page_compressed1 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=1; show warnings; Level Code Message show create table innodb_page_compressed1; Table Create Table innodb_page_compressed1 CREATE TABLE `innodb_page_compressed1` ( `c1` int(11) DEFAULT NULL, - `b` char(20) DEFAULT NULL + `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=1 -create table innodb_page_compressed2 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=2; +create table innodb_page_compressed2 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=2; show warnings; Level Code Message show create table innodb_page_compressed2; Table Create Table innodb_page_compressed2 CREATE TABLE `innodb_page_compressed2` ( `c1` int(11) DEFAULT NULL, - `b` char(20) DEFAULT NULL + `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=2 -create table innodb_page_compressed3 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=3; +create table innodb_page_compressed3 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=3; show warnings; Level Code Message show create table innodb_page_compressed3; Table Create Table innodb_page_compressed3 CREATE TABLE `innodb_page_compressed3` ( `c1` int(11) DEFAULT NULL, - `b` char(20) DEFAULT NULL + `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=3 -create table innodb_page_compressed4 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=4; +create table innodb_page_compressed4 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=4; show warnings; Level Code Message show create table innodb_page_compressed4; Table Create Table innodb_page_compressed4 CREATE TABLE `innodb_page_compressed4` ( `c1` int(11) DEFAULT NULL, - `b` char(20) DEFAULT NULL + `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=4 -create table innodb_page_compressed5 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=5; +create table innodb_page_compressed5 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=5; show warnings; Level Code Message show create table innodb_page_compressed5; Table Create Table innodb_page_compressed5 CREATE TABLE `innodb_page_compressed5` ( `c1` int(11) DEFAULT NULL, - `b` char(20) DEFAULT NULL + `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=5 -create table innodb_page_compressed6 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=6; +create table innodb_page_compressed6 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=6; show warnings; Level Code Message show create table innodb_page_compressed6; Table Create Table innodb_page_compressed6 CREATE TABLE `innodb_page_compressed6` ( `c1` int(11) DEFAULT NULL, - `b` char(20) DEFAULT NULL + `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=6 -create table innodb_page_compressed7 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=7; +create table innodb_page_compressed7 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=7; show warnings; Level Code Message show create table innodb_page_compressed7; Table Create Table innodb_page_compressed7 CREATE TABLE `innodb_page_compressed7` ( `c1` int(11) DEFAULT NULL, - `b` char(20) DEFAULT NULL + `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=7 -create table innodb_page_compressed8 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=8; +create table innodb_page_compressed8 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=8; show warnings; Level Code Message show create table innodb_page_compressed8; Table Create Table innodb_page_compressed8 CREATE TABLE `innodb_page_compressed8` ( `c1` int(11) DEFAULT NULL, - `b` char(20) DEFAULT NULL + `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=8 -create table innodb_page_compressed9 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=9; +create table innodb_page_compressed9 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=9; show warnings; Level Code Message show create table innodb_page_compressed9; Table Create Table innodb_page_compressed9 CREATE TABLE `innodb_page_compressed9` ( `c1` int(11) DEFAULT NULL, - `b` char(20) DEFAULT NULL + `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=9 create procedure innodb_insert_proc (repeat_count int) begin declare current_num int; set current_num = 0; while current_num < repeat_count do -insert into innodb_normal values(current_num,'testing..'); +insert into innodb_normal values(current_num,'aaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccc'); set current_num = current_num + 1; end while; end// @@ -159,7 +155,7 @@ show create table innodb_normal; Table Create Table innodb_normal CREATE TABLE `innodb_normal` ( `c1` int(11) DEFAULT NULL, - `b` char(20) DEFAULT NULL + `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=8 alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; show warnings; @@ -168,7 +164,7 @@ show create table innodb_compressed; Table Create Table innodb_compressed CREATE TABLE `innodb_compressed` ( `c1` int(11) DEFAULT NULL, - `b` char(20) DEFAULT NULL + `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=8 update innodb_page_compressed1 set c1 = c1 + 1; update innodb_page_compressed2 set c1 = c1 + 1; @@ -438,5 +434,3 @@ drop table innodb_page_compressed6; drop table innodb_page_compressed7; drop table innodb_page_compressed8; drop table innodb_page_compressed9; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result index 7d825e73aa4..94420e5397d 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; set global innodb_compression_algorithm = 1; create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact page_compressed=1; @@ -92,10 +88,6 @@ count(*) select count(*) from innodb_dynamic where c1 < 1500000; count(*) 5000 -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; set global innodb_compression_algorithm = 0; alter table innodb_compact engine=innodb page_compressed=DEFAULT; alter table innodb_dynamic engine=innodb page_compressed=DEFAULT; @@ -149,5 +141,3 @@ DROP TABLE no_compression; DROP TABLE default_compression; DROP TABLE explicit_no_compression; SET SESSION innodb_compression_default = 0; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_zip.result b/mysql-test/suite/innodb/r/innodb-page_compression_zip.result index a8078c02e13..bb9ceb29e17 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_zip.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_zip.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; set global innodb_compression_algorithm = 1; create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8; show warnings; @@ -351,5 +347,3 @@ drop table innodb_page_compressed6; drop table innodb_page_compressed7; drop table innodb_page_compressed8; drop table innodb_page_compressed9; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb/r/innodb-trim.result b/mysql-test/suite/innodb/r/innodb-trim.result new file mode 100644 index 00000000000..40eac2f8b40 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-trim.result @@ -0,0 +1,20 @@ +set global innodb_compression_algorithm = 1; +create table innodb_page_compressed (c1 int not null primary key auto_increment, b char(200), c char(200), d char(200)) engine=innodb page_compressed=1 page_compression_level=9; +show warnings; +Level Code Message +create procedure innodb_insert_proc (repeat_count int) +begin +declare current_num int; +set current_num = 0; +while current_num < repeat_count do +insert into innodb_page_compressed values (NULL,repeat('A',150),repeat('AB',75),repeat('B', 175)); +set current_num = current_num + 1; +end while; +end// +commit; +set autocommit=0; +call innodb_insert_proc(16000); +commit; +set autocommit=1; +DROP PROCEDURE innodb_insert_proc; +DROP TABLE innodb_page_compressed; diff --git a/mysql-test/suite/innodb/r/innodb-update-insert.result b/mysql-test/suite/innodb/r/innodb-update-insert.result index 333618ff7be..6265adb6e21 100644 --- a/mysql-test/suite/innodb/r/innodb-update-insert.result +++ b/mysql-test/suite/innodb/r/innodb-update-insert.result @@ -25,6 +25,7 @@ drop table t1; # create table t1 (f1 char(1), f2 longblob, f3 blob, primary key(f1)) charset=utf8 engine=innodb; +set statement sql_mode = '' for replace into t1 set f1=0xa3; Warnings: Warning 1366 Incorrect string value: '\xA3' for column 'f1' at row 1 @@ -34,7 +35,7 @@ f1 update t1 set f1=0x6a; update t1 set f3=repeat(0xb1,8103); update t1 set f1=0x4a; -update t1 set f1=0x82; +update ignore t1 set f1=0x82; Warnings: Warning 1366 Incorrect string value: '\x82' for column 'f1' at row 1 select f1 from t1; diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-1.result b/mysql-test/suite/innodb/r/innodb-wl5522-1.result index 0660ee1fae2..b2a5f49a9ad 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-1.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522-1.result @@ -1,18 +1,4 @@ call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT."); -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`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -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); @@ -44,37 +30,37 @@ CREATE TABLE testdb_wl5522.t1 ( col1 BIT(1), col2 BOOLEAN, col3 TINYINT, -col4 SMALLINT, +col4 SMALLINT, col5 MEDIUMINT, col6 INT, -col7 BIGINT, +col7 BIGINT, col8 FLOAT (14,3) , -col9 DOUBLE (14,3), -col10 VARCHAR(20), +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) , +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 , +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 +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 +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, @@ -112,7 +98,7 @@ col18 INT NOT NULL PRIMARY KEY, col19 DATE , col20 DATETIME , col21 TIMESTAMP , -col22 TIME , +col22 TIME, col23 YEAR ) ENGINE = Innodb; CREATE INDEX idx1 ON testdb_wl5522.t1(col18); CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10)); @@ -128,9 +114,6 @@ SELECT COUNT(*) FROM testdb_wl5522.t1; COUNT(*) 2 DROP TABLE testdb_wl5522.t1; -SET GLOBAL innodb_file_format='Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html CREATE TABLE testdb_wl5522.t1 ( col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000), @@ -143,13 +126,13 @@ col_7_binary BINARY (255) 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) , +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) +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 @@ -175,14 +158,14 @@ 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) +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), +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'); @@ -245,7 +228,7 @@ 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), +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'); @@ -702,19 +685,19 @@ 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 , +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), +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 +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); @@ -812,7 +795,3 @@ 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=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL INNODB_FILE_PER_TABLE=1; diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result index 8327ef36909..54f8797f0cb 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result @@ -2,13 +2,13 @@ call mtr.add_suppression("InnoDB: Operating system error number .* in a file ope call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified."); call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them."); call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*"); -call mtr.add_suppression("InnoDB: Tablespace flags: .*"); call mtr.add_suppression("InnoDB: Ignoring tablespace .* because it could not be opened."); call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .*"); -call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*"); -call mtr.add_suppression("InnoDB: Page for tablespace .* "); -flush tables; +call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file"); +call mtr.add_suppression("InnoDB: Page for tablespace "); +call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS="); +FLUSH TABLES; SET GLOBAL innodb_file_per_table = 1; SELECT @@innodb_file_per_table; @@innodb_file_per_table @@ -17,23 +17,18 @@ 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); +SET SESSION debug_dbug="+d,ib_discard_before_commit_crash"; 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); +SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; 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; @@ -51,21 +46,18 @@ 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` +SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; 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` +SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; 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; @@ -94,13 +86,14 @@ c1 DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); +SET @saved_debug_dbug = @@SESSION.debug_dbug; 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -110,7 +103,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -120,7 +113,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -130,7 +123,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -140,7 +133,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -150,7 +143,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -160,7 +153,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -170,7 +163,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -180,7 +173,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -190,7 +183,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -200,7 +193,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -210,7 +203,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (100), (200), (300); @@ -230,7 +223,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -241,7 +234,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -252,7 +245,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -263,7 +256,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -274,7 +267,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -285,7 +278,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -296,7 +289,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -307,7 +300,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -318,7 +311,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -329,7 +322,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); @@ -340,7 +333,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -353,7 +346,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -366,7 +359,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -379,7 +372,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -392,7 +385,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -405,7 +398,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -418,7 +411,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -431,7 +424,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -444,7 +437,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -456,7 +449,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; restore: t1 .ibd and .cfg files ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; DROP TABLE test_wl5522.t1; @@ -469,36 +462,36 @@ 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=@saved_debug_dbug; 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"; +SET SESSION debug_dbug=@saved_debug_dbug; 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: Index for table 't1' is corrupt; try to repair it -SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; 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: Index for table 't1' is corrupt; try to repair it -SET SESSION debug_dbug="-d,ib_import_cluster_root_adjust_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,ib_import_cluster_failure"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; ERROR HY000: Index for table 't1' is corrupt; try to repair it -SET SESSION debug_dbug="-d,ib_import_cluster_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; 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: Index for table 't1' is corrupt; try to repair it -SET SESSION debug_dbug="-d,ib_import_sec_root_adjust_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; 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: Index for table 't1' is corrupt; try to repair it -SET SESSION debug_dbug="-d,ib_import_set_max_rowid_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; unlink: t1.ibd unlink: t1.cfg DROP TABLE test_wl5522.t1; @@ -811,7 +804,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB AUTO_INCREMENT=248 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 +INSERT IGNORE INTO test_wl5522.t1 VALUES (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); Warnings: Warning 1265 Data truncated for column 'c2' at row 1 @@ -838,7 +831,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -847,10 +840,10 @@ 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"; +SET SESSION debug_dbug="+d,buf_page_import_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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -862,7 +855,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -874,7 +867,7 @@ 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: Index for table 't1' is corrupt; try to repair it -SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -886,7 +879,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -898,7 +891,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -910,7 +903,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -921,8 +914,8 @@ 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"; +ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Data structure corruption +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg diff --git a/mysql-test/suite/innodb/r/innodb-wl5522.result b/mysql-test/suite/innodb/r/innodb-wl5522.result index 2f8f56e9550..e5782755dd8 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522.result @@ -1,15 +1,6 @@ call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT."); -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`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SELECT @@innodb_file_format; -@@innodb_file_format -Barracuda +call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it"); +FLUSH TABLES; CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b char(22), @@ -39,15 +30,19 @@ a b c 823 Evolution lsjndofiabsoibeg 822 Devotion asdfuihknaskdf 821 Cavalry ..asdasdfaeraf +CREATE TABLE t2(a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPACT; t1.frm t1.ibd -# Restarting server -# Done restarting server -FLUSH TABLE t1 FOR EXPORT; +t2.frm +t2.ibd +FLUSH TABLE t1, t2 FOR EXPORT; # List before copying files t1.cfg t1.frm t1.ibd +t2.cfg +t2.frm +t2.ibd UNLOCK TABLES; INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; SELECT COUNT(*) FROM t1; @@ -68,9 +63,13 @@ a b c # List before t1 DISCARD t1.frm t1.ibd +t2.frm +t2.ibd ALTER TABLE t1 DISCARD TABLESPACE; # List after t1 DISCARD t1.frm +t2.frm +t2.ibd ALTER TABLE t1 IMPORT TABLESPACE; ALTER TABLE t1 ENGINE InnoDB; SELECT COUNT(*) FROM t1; @@ -89,6 +88,8 @@ a b c t1.cfg t1.frm t1.ibd +t2.frm +t2.ibd SELECT COUNT(*) FROM t1; COUNT(*) 640 @@ -103,16 +104,19 @@ a b c 822 Devotion asdfuihknaskdf 821 Cavalry ..asdasdfaeraf DROP TABLE t1; +ALTER TABLE t2 ROW_FORMAT=DYNAMIC; +ALTER TABLE t2 DISCARD TABLESPACE; +# List after t2 DISCARD +t2.frm +ALTER TABLE t2 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x4 and the meta-data file has 0x1) +ALTER TABLE t2 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Expected FSP_SPACE_FLAGS=0x*, .ibd file contains 0x*.) +DROP TABLE t2; SET GLOBAL innodb_file_per_table = 1; SELECT @@innodb_file_per_table; @@innodb_file_per_table 1 -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SELECT @@innodb_file_format; -@@innodb_file_format -Barracuda CREATE TABLE t1( c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 INT) ENGINE=InnoDB; @@ -1034,7 +1038,4 @@ 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=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL INNODB_FILE_PER_TABLE=1; +FLUSH TABLES; diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result index c142042fd5a..1b62854efef 100644 --- a/mysql-test/suite/innodb/r/innodb.result +++ b/mysql-test/suite/innodb/r/innodb.result @@ -1398,7 +1398,7 @@ CREATE TABLE t1 (col1 int(1))ENGINE=InnoDB; CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx (stamp))ENGINE=InnoDB; insert into t1 values (1),(2),(3); -insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000); +insert ignore into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000); Warnings: Warning 1265 Data truncated for column 'stamp' at row 3 SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp < diff --git a/mysql-test/suite/innodb/r/innodb_blob_truncate.result b/mysql-test/suite/innodb/r/innodb_blob_truncate.result index a71dd7678c0..b10d4a94eb7 100644 --- a/mysql-test/suite/innodb/r/innodb_blob_truncate.result +++ b/mysql-test/suite/innodb/r/innodb_blob_truncate.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table = ON; create table t1(a blob) engine=innodb key_block_size=8; create function generate_blob() returns varchar(20000) @@ -19,5 +15,3 @@ truncate t1; insert into t1 select generate_blob(); drop table t1; drop function generate_blob; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb/r/innodb_bug11754376.result b/mysql-test/suite/innodb/r/innodb_bug11754376.result index 034e4f07403..b9f2a169a73 100644 --- a/mysql-test/suite/innodb/r/innodb_bug11754376.result +++ b/mysql-test/suite/innodb/r/innodb_bug11754376.result @@ -1,4 +1,3 @@ CREATE TABLE bug11754376 (c INT) ENGINE=INNODB; SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low'; DROP TABLE bug11754376; -SET SESSION DEBUG_DBUG='-d,test_normalize_table_name_low'; diff --git a/mysql-test/suite/innodb/r/innodb_bug14676111.result b/mysql-test/suite/innodb/r/innodb_bug14676111.result index c2fdfee5522..1135259cfbf 100644 --- a/mysql-test/suite/innodb/r/innodb_bug14676111.result +++ b/mysql-test/suite/innodb/r/innodb_bug14676111.result @@ -1,7 +1,4 @@ -drop table if exists t1; -call mtr.add_suppression("option 'innodb-purge-threads': unsigned value 0 adjusted to*"); -set global innodb_stats_persistent = false; -CREATE TABLE t1 (a int not null primary key) engine=InnoDB; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0; set global innodb_limit_optimistic_insert_debug = 2; insert into t1 values (1); insert into t1 values (5); diff --git a/mysql-test/suite/innodb/r/innodb_bug42419.result b/mysql-test/suite/innodb/r/innodb_bug42419.result index cf10ef3e12a..41c400bc74d 100644 --- a/mysql-test/suite/innodb/r/innodb_bug42419.result +++ b/mysql-test/suite/innodb/r/innodb_bug42419.result @@ -21,3 +21,4 @@ UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 3; connection default; disconnect user2; DROP TABLE t1; +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); diff --git a/mysql-test/suite/innodb/r/innodb_bug53592.result b/mysql-test/suite/innodb/r/innodb_bug53592.result index ae4773de13a..8befcbd48cd 100644 --- a/mysql-test/suite/innodb/r/innodb_bug53592.result +++ b/mysql-test/suite/innodb/r/innodb_bug53592.result @@ -4,6 +4,7 @@ alter table bug53592 add column b text charset utf8; alter table bug53592 add column c blob not null; create index bug53592_b on bug53592(b(81)); create unique index bug53592_c on bug53592(c(1)); +set statement sql_mode = '' for replace into bug53592 values (),(); Warnings: Warning 1364 Field 'c' doesn't have a default value @@ -17,6 +18,7 @@ alter table bug53592 add column b text charset utf8; alter table bug53592 add column c blob not null; create index bug53592_b on bug53592(b(81)); create unique index bug53592_c on bug53592(c(1)); +set statement sql_mode = '' for replace into bug53592 values (),(); Warnings: Warning 1364 Field 'c' doesn't have a default value diff --git a/mysql-test/suite/innodb/r/innodb_bug56947.result b/mysql-test/suite/innodb/r/innodb_bug56947.result index 878450144a2..4248013b088 100644 --- a/mysql-test/suite/innodb/r/innodb_bug56947.result +++ b/mysql-test/suite/innodb/r/innodb_bug56947.result @@ -3,7 +3,6 @@ create table bug56947(a int not null) engine = innodb; SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename'; alter table bug56947 add unique index (a); ERROR HY000: Got error 11 "xxx" from storage engine InnoDB -SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename'; check table bug56947; Table Op Msg_type Msg_text test.bug56947 check status OK diff --git a/mysql-test/suite/innodb/r/innodb_bug59641.result b/mysql-test/suite/innodb/r/innodb_bug59641.result index f22d39654de..2c042585745 100644 --- a/mysql-test/suite/innodb/r/innodb_bug59641.result +++ b/mysql-test/suite/innodb/r/innodb_bug59641.result @@ -1,5 +1,3 @@ -call mtr.add_suppression("Found 3 prepared XA transactions"); -flush tables; CREATE TABLE t(a INT PRIMARY KEY, b INT)ENGINE=InnoDB; INSERT INTO t VALUES(2,2),(4,4),(8,8),(16,16),(32,32); COMMIT; @@ -8,20 +6,18 @@ INSERT INTO t VALUES(1,1); XA END '123'; XA PREPARE '123'; CONNECT con1,localhost,root,,; -connection con1; XA START '456'; INSERT INTO t VALUES(3,47),(5,67); UPDATE t SET b=2*b WHERE a BETWEEN 5 AND 8; XA END '456'; XA PREPARE '456'; CONNECT con2,localhost,root,,; -connection con2; XA START '789'; UPDATE t SET b=4*a WHERE a=32; XA END '789'; XA PREPARE '789'; CONNECT con3,localhost,root,,; -connection con3; +# Kill and restart SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SELECT * FROM t; a b diff --git a/mysql-test/suite/innodb/r/innodb_ctype_ldml.result b/mysql-test/suite/innodb/r/innodb_ctype_ldml.result index 12a234a1bde..1f3b271941d 100644 --- a/mysql-test/suite/innodb/r/innodb_ctype_ldml.result +++ b/mysql-test/suite/innodb/r/innodb_ctype_ldml.result @@ -101,7 +101,7 @@ DROP TABLE t1; # Bug#43827 Server closes connections and restarts # CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci); -INSERT INTO t1 SELECT REPEAT('a',11); +INSERT IGNORE INTO t1 SELECT REPEAT('a',11); Warnings: Warning 1265 Data truncated for column 'c1' at row 1 DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/innodb_defrag_binlog.result b/mysql-test/suite/innodb/r/innodb_defrag_binlog.result index 6ff32726f57..b97061cc9db 100644 --- a/mysql-test/suite/innodb/r/innodb_defrag_binlog.result +++ b/mysql-test/suite/innodb/r/innodb_defrag_binlog.result @@ -15,10 +15,12 @@ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1(a int not null primary key auto_increment, b varchar(256), key second(b)) engine=innodb master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (1, REPEAT("a", 256)) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (2, REPEAT("a", 256)) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/innodb/r/innodb_information_schema.result b/mysql-test/suite/innodb/r/innodb_information_schema.result index 15c3af325ad..36c76b03bd0 100644 --- a/mysql-test/suite/innodb/r/innodb_information_schema.result +++ b/mysql-test/suite/innodb/r/innodb_information_schema.result @@ -43,7 +43,6 @@ trx_unique_checks int(1) NO 0 trx_foreign_key_checks int(1) NO 0 trx_last_foreign_key_error varchar(256) YES NULL trx_adaptive_hash_latched int(1) NO 0 -trx_adaptive_hash_timeout bigint(21) unsigned NO 0 trx_is_read_only int(1) NO 0 trx_autocommit_non_locking int(1) NO 0 trx_state trx_weight trx_tables_in_use trx_tables_locked trx_rows_locked trx_rows_modified trx_concurrency_tickets trx_isolation_level trx_unique_checks trx_foreign_key_checks diff --git a/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result index 3a17d4a273b..d43da0cb7b7 100644 --- a/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result +++ b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result @@ -18,7 +18,7 @@ connection addconroot; BEGIN; SELECT b FROM t2 WHERE b=7 FOR UPDATE; ERROR HY000: Lock wait timeout exceeded; try restarting transaction -INSERT INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7)); +INSERT IGNORE INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7)); ERROR HY000: Lock wait timeout exceeded; try restarting transaction UPDATE t1 SET a='7000000' WHERE a=(SELECT a FROM t2 WHERE b=7); ERROR HY000: Lock wait timeout exceeded; try restarting transaction diff --git a/mysql-test/suite/innodb/r/innodb_monitor.result b/mysql-test/suite/innodb/r/innodb_monitor.result deleted file mode 100644 index 0a163193b58..00000000000 --- a/mysql-test/suite/innodb/r/innodb_monitor.result +++ /dev/null @@ -1,627 +0,0 @@ -set global innodb_monitor_disable = All; -select name, status from information_schema.innodb_metrics; -name status -metadata_table_handles_opened disabled -metadata_table_handles_closed disabled -metadata_table_reference_count disabled -lock_deadlocks disabled -lock_timeouts disabled -lock_rec_lock_waits disabled -lock_table_lock_waits disabled -lock_rec_lock_requests disabled -lock_rec_lock_created disabled -lock_rec_lock_removed disabled -lock_rec_locks disabled -lock_table_lock_created disabled -lock_table_lock_removed disabled -lock_table_locks disabled -lock_row_lock_current_waits disabled -lock_row_lock_time disabled -lock_row_lock_time_max disabled -lock_row_lock_waits disabled -lock_row_lock_time_avg disabled -buffer_pool_size disabled -buffer_pool_reads disabled -buffer_pool_read_requests disabled -buffer_pool_write_requests disabled -buffer_pool_wait_free disabled -buffer_pool_read_ahead disabled -buffer_pool_read_ahead_evicted disabled -buffer_pool_pages_total disabled -buffer_pool_pages_misc disabled -buffer_pool_pages_data disabled -buffer_pool_bytes_data disabled -buffer_pool_pages_dirty disabled -buffer_pool_bytes_dirty disabled -buffer_pool_pages_free disabled -buffer_pages_created disabled -buffer_pages_written disabled -buffer_index_pages_written disabled -buffer_non_index_pages_written disabled -buffer_pages_read disabled -buffer_pages0_read disabled -buffer_index_sec_rec_cluster_reads disabled -buffer_index_sec_rec_cluster_reads_avoided disabled -buffer_data_reads disabled -buffer_data_written disabled -buffer_flush_batch_scanned disabled -buffer_flush_batch_num_scan disabled -buffer_flush_batch_scanned_per_call disabled -buffer_flush_batch_total_pages disabled -buffer_flush_batches disabled -buffer_flush_batch_pages disabled -buffer_flush_neighbor_total_pages disabled -buffer_flush_neighbor disabled -buffer_flush_neighbor_pages disabled -buffer_flush_n_to_flush_requested disabled -buffer_flush_n_to_flush_by_age disabled -buffer_flush_adaptive_avg_time_slot disabled -buffer_LRU_batch_flush_avg_time_slot disabled -buffer_flush_adaptive_avg_time_thread disabled -buffer_LRU_batch_flush_avg_time_thread disabled -buffer_flush_adaptive_avg_time_est disabled -buffer_LRU_batch_flush_avg_time_est disabled -buffer_flush_avg_time disabled -buffer_flush_adaptive_avg_pass disabled -buffer_LRU_batch_flush_avg_pass disabled -buffer_flush_avg_pass disabled -buffer_LRU_get_free_loops disabled -buffer_LRU_get_free_waits disabled -buffer_flush_avg_page_rate disabled -buffer_flush_lsn_avg_rate disabled -buffer_flush_pct_for_dirty disabled -buffer_flush_pct_for_lsn disabled -buffer_flush_sync_waits disabled -buffer_flush_adaptive_total_pages disabled -buffer_flush_adaptive disabled -buffer_flush_adaptive_pages disabled -buffer_flush_sync_total_pages disabled -buffer_flush_sync disabled -buffer_flush_sync_pages disabled -buffer_flush_background_total_pages disabled -buffer_flush_background disabled -buffer_flush_background_pages disabled -buffer_LRU_batch_scanned disabled -buffer_LRU_batch_num_scan disabled -buffer_LRU_batch_scanned_per_call disabled -buffer_LRU_batch_flush_total_pages disabled -buffer_LRU_batches_flush disabled -buffer_LRU_batch_flush_pages disabled -buffer_LRU_batch_evict_total_pages disabled -buffer_LRU_batches_evict disabled -buffer_LRU_batch_evict_pages disabled -buffer_LRU_single_flush_scanned disabled -buffer_LRU_single_flush_num_scan disabled -buffer_LRU_single_flush_scanned_per_call disabled -buffer_LRU_single_flush_failure_count disabled -buffer_LRU_get_free_search disabled -buffer_LRU_search_scanned disabled -buffer_LRU_search_num_scan disabled -buffer_LRU_search_scanned_per_call disabled -buffer_LRU_unzip_search_scanned disabled -buffer_LRU_unzip_search_num_scan disabled -buffer_LRU_unzip_search_scanned_per_call disabled -buffer_page_read_index_leaf disabled -buffer_page_read_index_non_leaf disabled -buffer_page_read_index_ibuf_leaf disabled -buffer_page_read_index_ibuf_non_leaf disabled -buffer_page_read_undo_log disabled -buffer_page_read_index_inode disabled -buffer_page_read_ibuf_free_list disabled -buffer_page_read_ibuf_bitmap disabled -buffer_page_read_system_page disabled -buffer_page_read_trx_system disabled -buffer_page_read_fsp_hdr disabled -buffer_page_read_xdes disabled -buffer_page_read_blob disabled -buffer_page_read_zblob disabled -buffer_page_read_zblob2 disabled -buffer_page_read_other disabled -buffer_page_written_index_leaf disabled -buffer_page_written_index_non_leaf disabled -buffer_page_written_index_ibuf_leaf disabled -buffer_page_written_index_ibuf_non_leaf disabled -buffer_page_written_undo_log disabled -buffer_page_written_index_inode disabled -buffer_page_written_ibuf_free_list disabled -buffer_page_written_ibuf_bitmap disabled -buffer_page_written_system_page disabled -buffer_page_written_trx_system disabled -buffer_page_written_fsp_hdr disabled -buffer_page_written_xdes disabled -buffer_page_written_blob disabled -buffer_page_written_zblob disabled -buffer_page_written_zblob2 disabled -buffer_page_written_other disabled -os_data_reads disabled -os_data_writes disabled -os_data_fsyncs disabled -os_pending_reads disabled -os_pending_writes disabled -os_log_bytes_written disabled -os_log_fsyncs disabled -os_log_pending_fsyncs disabled -os_log_pending_writes disabled -trx_rw_commits disabled -trx_ro_commits disabled -trx_nl_ro_commits disabled -trx_commits_insert_update disabled -trx_rollbacks disabled -trx_rollbacks_savepoint disabled -trx_rollback_active disabled -trx_active_transactions disabled -trx_rseg_history_len disabled -trx_undo_slots_used disabled -trx_undo_slots_cached disabled -trx_rseg_current_size disabled -purge_del_mark_records disabled -purge_upd_exist_or_extern_records disabled -purge_invoked disabled -purge_undo_log_pages disabled -purge_dml_delay_usec disabled -purge_stop_count disabled -purge_resume_count disabled -log_checkpoints disabled -log_lsn_last_flush disabled -log_lsn_last_checkpoint disabled -log_lsn_current disabled -log_lsn_checkpoint_age disabled -log_lsn_buf_pool_oldest disabled -log_max_modified_age_async disabled -log_max_modified_age_sync disabled -log_pending_log_flushes disabled -log_pending_checkpoint_writes disabled -log_num_log_io disabled -log_waits disabled -log_write_requests disabled -log_writes disabled -log_padded disabled -compress_pages_compressed disabled -compress_pages_decompressed disabled -compression_pad_increments disabled -compression_pad_decrements disabled -compress_saved disabled -compress_trim_sect512 disabled -compress_trim_sect1024 disabled -compress_trim_sect2048 disabled -compress_trim_sect4096 disabled -compress_trim_sect8192 disabled -compress_trim_sect16384 disabled -compress_trim_sect32768 disabled -compress_pages_page_compressed disabled -compress_page_compressed_trim_op disabled -compress_page_compressed_trim_op_saved disabled -compress_pages_page_decompressed disabled -compress_pages_page_compression_error disabled -compress_pages_encrypted disabled -compress_pages_decrypted disabled -index_page_splits disabled -index_page_merge_attempts disabled -index_page_merge_successful disabled -index_page_reorg_attempts disabled -index_page_reorg_successful disabled -index_page_discards disabled -adaptive_hash_searches disabled -adaptive_hash_searches_btree disabled -adaptive_hash_pages_added disabled -adaptive_hash_pages_removed disabled -adaptive_hash_rows_added disabled -adaptive_hash_rows_removed disabled -adaptive_hash_rows_deleted_no_hash_entry disabled -adaptive_hash_rows_updated disabled -file_num_open_files disabled -ibuf_merges_insert disabled -ibuf_merges_delete_mark disabled -ibuf_merges_delete disabled -ibuf_merges_discard_insert disabled -ibuf_merges_discard_delete_mark disabled -ibuf_merges_discard_delete disabled -ibuf_merges disabled -ibuf_size disabled -innodb_master_thread_sleeps disabled -innodb_activity_count disabled -innodb_master_active_loops disabled -innodb_master_idle_loops disabled -innodb_background_drop_table_usec disabled -innodb_ibuf_merge_usec disabled -innodb_log_flush_usec disabled -innodb_mem_validate_usec disabled -innodb_master_purge_usec disabled -innodb_dict_lru_usec disabled -innodb_dict_lru_count_active disabled -innodb_dict_lru_count_idle disabled -innodb_checkpoint_usec disabled -innodb_dblwr_writes disabled -innodb_dblwr_pages_written disabled -innodb_page_size disabled -innodb_rwlock_s_spin_waits disabled -innodb_rwlock_x_spin_waits disabled -innodb_rwlock_sx_spin_waits disabled -innodb_rwlock_s_spin_rounds disabled -innodb_rwlock_x_spin_rounds disabled -innodb_rwlock_sx_spin_rounds disabled -innodb_rwlock_s_os_waits disabled -innodb_rwlock_x_os_waits disabled -innodb_rwlock_sx_os_waits disabled -dml_reads disabled -dml_inserts disabled -dml_deletes disabled -dml_updates disabled -dml_system_reads disabled -dml_system_inserts disabled -dml_system_deletes disabled -dml_system_updates disabled -ddl_background_drop_indexes disabled -ddl_background_drop_tables disabled -ddl_online_create_index disabled -ddl_pending_alter_table disabled -ddl_sort_file_alter_table disabled -ddl_log_file_alter_table disabled -icp_attempts disabled -icp_no_match disabled -icp_out_of_range disabled -icp_match disabled -set global innodb_monitor_enable = all; -select name from information_schema.innodb_metrics where status!='enabled'; -name -set global innodb_monitor_enable = aaa; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of 'aaa' -set global innodb_monitor_disable = All; -select name from information_schema.innodb_metrics where status!='disabled'; -name -set global innodb_monitor_reset_all = all; -select name from information_schema.innodb_metrics where count!=0; -name -set global innodb_monitor_enable = "%lock%"; -select name from information_schema.innodb_metrics -where status != IF(name like "%lock%", 'enabled', 'disabled'); -name -set global innodb_monitor_disable = "%lock%"; -select name, status from information_schema.innodb_metrics -where name like "%lock%"; -name status -lock_deadlocks disabled -lock_timeouts disabled -lock_rec_lock_waits disabled -lock_table_lock_waits disabled -lock_rec_lock_requests disabled -lock_rec_lock_created disabled -lock_rec_lock_removed disabled -lock_rec_locks disabled -lock_table_lock_created disabled -lock_table_lock_removed disabled -lock_table_locks disabled -lock_row_lock_current_waits disabled -lock_row_lock_time disabled -lock_row_lock_time_max disabled -lock_row_lock_waits disabled -lock_row_lock_time_avg disabled -innodb_rwlock_s_spin_waits disabled -innodb_rwlock_x_spin_waits disabled -innodb_rwlock_sx_spin_waits disabled -innodb_rwlock_s_spin_rounds disabled -innodb_rwlock_x_spin_rounds disabled -innodb_rwlock_sx_spin_rounds disabled -innodb_rwlock_s_os_waits disabled -innodb_rwlock_x_os_waits disabled -innodb_rwlock_sx_os_waits disabled -set global innodb_monitor_enable = "%lock*"; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '%lock*' -set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%"; -select name from information_schema.innodb_metrics where status!='enabled'; -name -set global innodb_monitor_disable="%%%%%"; -select name from information_schema.innodb_metrics where status!='disabled'; -name -set global innodb_monitor_enable="%"; -select name from information_schema.innodb_metrics where status!='enabled'; -name -set global innodb_monitor_disable="%_%"; -select name from information_schema.innodb_metrics where status!='disabled'; -name -set global innodb_monitor_enable="log%%%%"; -select name from information_schema.innodb_metrics -where status != IF(name like "log%", 'enabled', 'disabled'); -name -set global innodb_monitor_enable="os_%a_fs_ncs"; -set global innodb_monitor_enable="os%pending%"; -select name, status from information_schema.innodb_metrics -where name like "os%"; -name status -os_data_reads disabled -os_data_writes disabled -os_data_fsyncs enabled -os_pending_reads enabled -os_pending_writes enabled -os_log_bytes_written disabled -os_log_fsyncs disabled -os_log_pending_fsyncs enabled -os_log_pending_writes enabled -set global innodb_monitor_enable=""; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '' -set global innodb_monitor_enable="_"; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '_' -set global innodb_monitor_disable = module_metadata; -set global innodb_monitor_reset_all = module_metadata; -set global innodb_monitor_enable = metadata_table_handles_opened; -create table monitor_test(col int) engine = innodb; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled -set global innodb_monitor_reset = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 1 NULL 1 NULL NULL 0 enabled -drop table monitor_test; -create table monitor_test(col int) engine = innodb; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 1 NULL 1 enabled -set global innodb_monitor_reset_all = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 1 NULL 1 enabled -set global innodb_monitor_disable = metadata_table_handles_opened; -set global innodb_monitor_reset = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled -drop table monitor_test; -create table monitor_test(col int) engine = innodb; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled -set global innodb_monitor_reset_all = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_enable = metadata_table_handles_opened; -drop table monitor_test; -create table monitor_test(col int) engine = innodb stats_persistent=0; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled -set global innodb_monitor_enable = metadata_table_handles_closed; -create index idx on monitor_test(col); -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_closed"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 2 NULL 2 enabled -metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled -metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_disable = module_metadata; -set global innodb_monitor_reset = module_metadata; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled -metadata_table_handles_closed 1 NULL 1 NULL NULL 0 disabled -metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_reset_all = module_metadata; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened NULL NULL 0 NULL NULL 0 disabled -metadata_table_handles_closed NULL NULL 0 NULL NULL 0 disabled -metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_enable = module_trx; -begin; -insert into monitor_test values(9); -commit; -begin; -insert into monitor_test values(9); -rollback; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "trx_rollbacks" or name like "trx_active_transactions"; -name max_count min_count count max_count_reset min_count_reset count_reset status -trx_rollbacks 1 NULL 1 1 NULL 1 enabled -trx_active_transactions 1 0 0 1 0 0 enabled -set global innodb_monitor_disable = module_trx; -set global innodb_monitor_enable = module_dml; -insert into monitor_test values(9); -update monitor_test set col = 10 where col = 9; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 4 NULL 4 4 NULL 4 enabled -dml_inserts 1 NULL 1 1 NULL 1 enabled -dml_deletes 0 NULL 0 0 NULL 0 enabled -dml_updates 2 NULL 2 2 NULL 2 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -delete from monitor_test; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 6 NULL 6 6 NULL 6 enabled -dml_inserts 1 NULL 1 1 NULL 1 enabled -dml_deletes 2 NULL 2 2 NULL 2 enabled -dml_updates 2 NULL 2 2 NULL 2 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -set global innodb_monitor_reset = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 6 NULL 6 0 NULL 0 enabled -dml_inserts 1 NULL 1 0 NULL 0 enabled -dml_deletes 2 NULL 2 0 NULL 0 enabled -dml_updates 2 NULL 2 0 NULL 0 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -insert into monitor_test values(9); -insert into monitor_test values(1); -delete from monitor_test; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 8 NULL 8 2 NULL 2 enabled -dml_inserts 3 NULL 3 2 NULL 2 enabled -dml_deletes 4 NULL 4 2 NULL 2 enabled -dml_updates 2 NULL 2 0 NULL 0 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -set global innodb_monitor_reset_all = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 8 NULL 8 2 NULL 2 enabled -dml_inserts 3 NULL 3 2 NULL 2 enabled -dml_deletes 4 NULL 4 2 NULL 2 enabled -dml_updates 2 NULL 2 0 NULL 0 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -set global innodb_monitor_disable = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 8 NULL 8 2 NULL 2 disabled -dml_inserts 3 NULL 3 2 NULL 2 disabled -dml_deletes 4 NULL 4 2 NULL 2 disabled -dml_updates 2 NULL 2 0 NULL 0 disabled -dml_system_reads 0 NULL 0 0 NULL 0 disabled -dml_system_inserts 0 NULL 0 0 NULL 0 disabled -dml_system_deletes 0 NULL 0 0 NULL 0 disabled -dml_system_updates 0 NULL 0 0 NULL 0 disabled -set global innodb_monitor_reset_all = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads NULL NULL 0 NULL NULL 0 disabled -dml_inserts NULL NULL 0 NULL NULL 0 disabled -dml_deletes NULL NULL 0 NULL NULL 0 disabled -dml_updates NULL NULL 0 NULL NULL 0 disabled -dml_system_reads NULL NULL 0 NULL NULL 0 disabled -dml_system_inserts NULL NULL 0 NULL NULL 0 disabled -dml_system_deletes NULL NULL 0 NULL NULL 0 disabled -dml_system_updates NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_enable = dml_inserts; -insert into monitor_test values(9); -insert into monitor_test values(1); -delete from monitor_test; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads NULL NULL 0 NULL NULL 0 disabled -dml_inserts 2 NULL 2 2 NULL 2 enabled -dml_deletes NULL NULL 0 NULL NULL 0 disabled -dml_updates NULL NULL 0 NULL NULL 0 disabled -dml_system_reads NULL NULL 0 NULL NULL 0 disabled -dml_system_inserts NULL NULL 0 NULL NULL 0 disabled -dml_system_deletes NULL NULL 0 NULL NULL 0 disabled -dml_system_updates NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_disable = module_dml; -drop table monitor_test; -set global innodb_monitor_enable = file_num_open_files; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "file_num_open_files"; -name max_count min_count count max_count_reset min_count_reset count_reset status -file_num_open_files # # # # # # enabled -set global innodb_monitor_disable = file_num_open_files; -set global innodb_monitor_enable = "icp%"; -create table monitor_test(a char(3), b int, c char(2), -primary key (a(1), c(1)), key(b)) engine = innodb; -insert into monitor_test values("13", 2, "aa"); -select a from monitor_test where b < 1 for update; -a -select name, count from information_schema.innodb_metrics -where name like "icp%"; -name count -icp_attempts 1 -icp_no_match 0 -icp_out_of_range 1 -icp_match 0 -select a from monitor_test where b < 3 for update; -a -13 -select name, count from information_schema.innodb_metrics -where name like "icp%"; -name count -icp_attempts 2 -icp_no_match 0 -icp_out_of_range 1 -icp_match 1 -drop table monitor_test; -set global innodb_monitor_disable = all; -set global innodb_monitor_reset_all = all; -select 1 from `information_schema`.`INNODB_METRICS` -where case (1) when (1) then (AVG_COUNT_RESET) else (1) end; -1 -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; diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 72e8c30f96f..8bbe562e0f6 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -581,14 +581,384 @@ INSERT INTO t1(stat_id,acct_id) VALUES INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; -INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 UPDATE t1 SET acct_id=785 WHERE MOD(stat_id,2)=0 AND MOD(id,stat_id)=MOD(acct_id,stat_id); OPTIMIZE TABLE t1; @@ -1174,6 +1544,7 @@ DROP PROCEDURE p1; DROP TABLE t1; create table t1(a text) engine=innodb default charset=utf8; insert into t1 values('aaa'); +set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for alter table t1 add index(a(1024)); Warnings: Warning 1071 Specified key was too long; max key length is 767 bytes @@ -1764,6 +2135,7 @@ t2 CREATE TABLE `t2` ( DROP TABLE t2; DROP TABLE t1; create table t1 (a int auto_increment primary key) engine=innodb; +set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for alter table t1 order by a; Warnings: Warning 1105 ORDER BY ignored as there is a user-defined clustered index in the table 't1' diff --git a/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result b/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result index 5ae138477b9..a3ac78aadce 100644 --- a/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result +++ b/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result @@ -1,11 +1,6 @@ -set global innodb_file_format="Barracuda"; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -set global innodb_file_per_table=1; set global innodb_large_prefix=1; Warnings: Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -DROP TABLE IF EXISTS worklog5743; CREATE TABLE worklog5743 ( col_1_text TEXT(4000) , col_2_text TEXT(4000) , PRIMARY KEY (col_1_text(3072)) @@ -92,10 +87,6 @@ worklog5743; col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500) 1 1 DROP TABLE worklog5743; -SET GLOBAL innodb_file_format=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table=1; SET GLOBAL innodb_large_prefix=1; Warnings: Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result index 4875dfaeb2a..a031cfaa278 100644 --- a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result +++ b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result @@ -1,5 +1,5 @@ select * from information_schema.innodb_trx; -trx_id trx_state trx_started trx_requested_lock_id trx_wait_started trx_weight trx_mysql_thread_id trx_query trx_operation_state trx_tables_in_use trx_tables_locked trx_lock_structs trx_lock_memory_bytes trx_rows_locked trx_rows_modified trx_concurrency_tickets trx_isolation_level trx_unique_checks trx_foreign_key_checks trx_last_foreign_key_error trx_adaptive_hash_latched trx_adaptive_hash_timeout trx_is_read_only trx_autocommit_non_locking +trx_id trx_state trx_started trx_requested_lock_id trx_wait_started trx_weight trx_mysql_thread_id trx_query trx_operation_state trx_tables_in_use trx_tables_locked trx_lock_structs trx_lock_memory_bytes trx_rows_locked trx_rows_modified trx_concurrency_tickets trx_isolation_level trx_unique_checks trx_foreign_key_checks trx_last_foreign_key_error trx_adaptive_hash_latched trx_is_read_only trx_autocommit_non_locking Warnings: Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_trx but the InnoDB storage engine is not installed select * from information_schema.innodb_locks; @@ -216,16 +216,8 @@ compress_pages_decompressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL N compression_pad_increments compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times padding is incremented to avoid compression failures compression_pad_decrements compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times padding is decremented due to good compressibility compress_saved compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of bytes saved by page compression -compress_trim_sect512 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-512 TRIMed by page compression -compress_trim_sect1024 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-1024 TRIMed by page compression -compress_trim_sect2048 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-2048 TRIMed by page compression -compress_trim_sect4096 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-4K TRIMed by page compression -compress_trim_sect8192 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-8K TRIMed by page compression -compress_trim_sect16384 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-16K TRIMed by page compression -compress_trim_sect32768 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-32K TRIMed by page compression compress_pages_page_compressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages compressed by page compression compress_page_compressed_trim_op compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of TRIM operation performed by page compression -compress_page_compressed_trim_op_saved compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of TRIM operation saved by page compression compress_pages_page_decompressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages decompressed by page compression compress_pages_page_compression_error compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of page compression errors compress_pages_encrypted compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages encrypted diff --git a/mysql-test/suite/innodb/r/log_alter_table.result b/mysql-test/suite/innodb/r/log_alter_table.result new file mode 100644 index 00000000000..f1ee61e7572 --- /dev/null +++ b/mysql-test/suite/innodb/r/log_alter_table.result @@ -0,0 +1,16 @@ +# +# Bug#21801423 INNODB REDO LOG DOES NOT INDICATE WHEN +# FILES ARE CREATED +# +# Bug#21796691 INNODB REDO LOG DOES NOT INDICATE WHEN +# REDO LOGGING IS SKIPPED +# +CREATE TABLE t1 (a INT NOT NULL, b INT UNIQUE) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,2); +ALTER TABLE t1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE; +ALTER TABLE t1 DROP INDEX b, ADD INDEX (b); +# Kill the server +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/log_corruption.result b/mysql-test/suite/innodb/r/log_corruption.result new file mode 100644 index 00000000000..a932efeca62 --- /dev/null +++ b/mysql-test/suite/innodb/r/log_corruption.result @@ -0,0 +1,105 @@ +# redo log from before MariaDB 10.2.2/MySQL 5.7.9 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2\./ in mysqld.1.err +# redo log from before MariaDB 10.2.2, with corrupted log checkpoint +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and we did not find a valid checkpoint/ in mysqld.1.err +FOUND /Plugin 'InnoDB' registration as a STORAGE ENGINE failed/ in mysqld.1.err +# redo log from before MariaDB 10.2.2, with corrupted log block +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err +# redo log from "after" MariaDB 10.2.2, but with invalid header checksum +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Invalid redo log header checksum/ in mysqld.1.err +# distant future redo log format, with valid header checksum +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Unsupported redo log format. The redo log was created with malicious intentions, or perhaps\. Please follow the instructions at http://dev.mysql.com/doc/refman/5.7/en/upgrading-downgrading.html/ in mysqld.1.err +# valid header, but old-format checkpoint blocks +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: No valid checkpoint found .corrupted redo log/ in mysqld.1.err +# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122/ in mysqld.1.err +FOUND /InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\./ in mysqld.1.err +# --innodb-force-recovery=6 (skip the entire redo log) +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES +FOUND /\[Note\] InnoDB: .* started; log sequence number 0/ in mysqld.1.err +# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +# --innodb-force-recovery=6 (skip the entire redo log) +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES +# Test a corrupted MLOG_FILE_NAME record. +# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Starting crash recovery from checkpoint LSN=1213964/ in mysqld.1.err +FOUND /InnoDB: MLOG_FILE_NAME incorrect:bogus/ in mysqld.1.err +FOUND /InnoDB: ############### CORRUPT LOG RECORD FOUND ##################/ in mysqld.1.err +FOUND /InnoDB: Log record type 55, page 151:488\. Log parsing proceeded successfully up to 1213973\. Previous log record type 56, is multi 0 Recv offset 9, prev 0/ in mysqld.1.err +FOUND /len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8 bogus / in mysqld.1.err +FOUND /InnoDB: Set innodb_force_recovery to ignore this error/ in mysqld.1.err +# Test a corrupted MLOG_FILE_NAME record. +# valid header, invalid checkpoint 1, valid checkpoint 2, invalid block +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 2454333373 found: 150151/ in mysqld.1.err +# valid header, invalid checkpoint 1, valid checkpoint 2, invalid log record +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: MLOG_FILE_NAME incorrect:bigot/ in mysqld.1.err +FOUND /len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;/ in mysqld.1.err +# missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +NOT FOUND /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42$/ in mysqld.1.err +# Minimal MariaDB 10.1.21 encrypted redo log +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Obtaining redo log encryption key version 1 failed/ in mysqld.1.err +FOUND /InnoDB: Decrypting checkpoint failed/ in mysqld.1.err +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ibdata1 diff --git a/mysql-test/suite/innodb/r/log_file.result b/mysql-test/suite/innodb/r/log_file.result new file mode 100644 index 00000000000..352e4b76cf1 --- /dev/null +++ b/mysql-test/suite/innodb/r/log_file.result @@ -0,0 +1,361 @@ +# Testcase for the following bugs +# Bug#16691130 - ASSERT WHEN INNODB_LOG_GROUP_HOME_DIR DOES NOT EXIST +# Bug#16418661 - CHANGING NAME IN FOR INNODB_DATA_FILE_PATH SHOULD NOT SUCCEED WITH LOG FILES +# Start mysqld without the possibility to create innodb_undo_tablespaces +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /\[ERROR\] InnoDB: Could not create undo tablespace '.*undo002'/ in mysqld.1.err +# Remove undo001,undo002,ibdata1,ibdata2,ib_logfile1,ib_logfile2,ib_logfile101 +# Start mysqld with non existent innodb_log_group_home_dir +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+/ in mysqld.1.err +# Remove ibdata1 & ibdata2 +# Successfully let InnoDB create tablespaces +SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES +WHERE engine='innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +1 +1 +# Backup tmp/logfile/* +# 1. With ibdata2, Without ibdata1 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /The innodb_system data file 'ibdata1' was not found but one of the other data files 'ibdata2' exists/ in mysqld.1.err +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ib_logfile2 +ibdata2 +undo001 +undo002 +undo003 +# 2. With ibdata1, without ibdata2 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Tablespace size stored in header is \d+ pages, but the sum of data file sizes is \d+ pages/ in mysqld.1.err +FOUND /InnoDB: Cannot start InnoDB. The tail of the system tablespace is missing/ in mysqld.1.err +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ib_logfile2 +ibdata1 +ibdata2 +undo001 +undo002 +undo003 +# 3. Without ibdata1 & ibdata2 +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ib_logfile2 +undo001 +undo002 +undo003 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: undo tablespace .*undo001.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\./ in mysqld.1.err +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ib_logfile2 +undo001 +undo002 +undo003 +# 4. Without ibdata*, ib_logfile* and with undo00* +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +undo001 +undo002 +undo003 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +undo001 +undo002 +undo003 +# 5. Without ibdata*,ib_logfile* files & Without undo002 +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +undo001 +undo003 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +undo001 +undo003 +# 6. Without ibdata*,ib_logfile* files & Without undo001, undo002 +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +undo003 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /undo tablespace .*undo003.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\./ in mysqld.1.err +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +undo003 +# 7. With ibdata files & Without undo002 +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ib_logfile2 +ibdata1 +ibdata2 +undo001 +undo003 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /Expected to open 3 undo tablespaces but was able to find only 1 undo tablespaces/ in mysqld.1.err +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ib_logfile2 +ibdata1 +ibdata2 +undo001 +undo003 +# 8. With ibdata files & Without undo001, undo002 +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ib_logfile2 +ibdata1 +ibdata2 +undo003 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /Expected to open 3 undo tablespaces but was able to find only 0 undo tablespaces/ in mysqld.1.err +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ib_logfile2 +ibdata1 +ibdata2 +undo003 +# 9. Without ibdata*, without undo*, Without ib_logfile1 and with ib_logfile2 +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile2 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES +NOT FOUND /redo log file .*ib_logfile0.* exists\. Creating system tablespace with existing redo log files is not recommended\. Please delete all redo log files before creating new system tablespace\./ in mysqld.1.err +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ib_logfile2 +ibdata1 +ibdata2 +undo001 +undo002 +undo003 +# 10. With ibdata*, without ib_logfile0 +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ib_logfile2 +ibdata1 +ibdata2 +undo001 +undo002 +undo003 +# 11. With ibdata*, without ib_logfile1 +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile2 +ibdata1 +ibdata2 +undo001 +undo002 +undo003 +SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES +WHERE engine='innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +1 +1 +FOUND /Resizing redo log from 1\*\d+ to 3\*\d+ pages; LSN=\d+/ in mysqld.1.err +# Cleanup +bak_ib_logfile0 +bak_ib_logfile1 +bak_ib_logfile2 +bak_ibdata1 +bak_ibdata2 +bak_undo001 +bak_undo002 +bak_undo003 +ib_buffer_pool +ib_logfile0 +ib_logfile1 +ib_logfile2 +ibdata1 +ibdata2 +undo001 +undo002 +undo003 diff --git a/mysql-test/suite/innodb/r/log_file_name.result b/mysql-test/suite/innodb/r/log_file_name.result new file mode 100644 index 00000000000..e5904165781 --- /dev/null +++ b/mysql-test/suite/innodb/r/log_file_name.result @@ -0,0 +1,101 @@ +SET GLOBAL innodb_file_per_table=ON; +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t3(a INT PRIMARY KEY) ENGINE=InnoDB; +BEGIN; +INSERT INTO t3 VALUES (33101),(347); +INSERT INTO t1 VALUES (42),(9),(101); +RENAME TABLE t1 TO t2; +UPDATE t2 SET a=347 where a=42; +COMMIT; +# Kill the server +# Fault 0 (no real fault): Orphan file with duplicate space_id. +# Fault 1: Two dirty files with the same space_id. +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Ignoring data file '.*t2.ibd' with space ID \d+. Another data file called .*t1.ibd exists with the same space ID/ in mysqld.1.err +# Fault 2: Wrong space_id in a dirty file, and a missing file. +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Ignoring data file '.*t1.ibd' with space ID/ in mysqld.1.err +FOUND /InnoDB: Tablespace \d+ was not found at.*t3.ibd/ in mysqld.1.err +# Fault 3: Wrong space_id in a dirty file, and no missing file. +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Ignoring data file '.*t[23].ibd' with space ID/ in mysqld.1.err +FOUND /InnoDB: Tablespace \d+ was not found at .*t1.ibd/ in mysqld.1.err +FOUND /InnoDB: Tablespace \d+ was not found at .*t3.ibd/ in mysqld.1.err +FOUND /InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace/ in mysqld.1.err +# Fault 4: Missing data file +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /InnoDB: Tablespace \d+ was not found at .*t[12].ibd. +.*InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace/ in mysqld.1.err +# Fault 5: Wrong type of data file +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /\[ERROR\] InnoDB: Cannot read first page of .*t2.ibd/ in mysqld.1.err +FOUND /\[ERROR\] InnoDB: Datafile .*t2.*\. Cannot determine the space ID from the first 64 pages/ in mysqld.1.err +SELECT * FROM t2; +a +9 +101 +347 +SELECT * FROM t3; +a +347 +33101 +SHOW TABLES; +Tables_in_test +t2 +t3 +DROP TABLE t2,t3; +CREATE TABLE t0(a INT PRIMARY KEY) ENGINE=InnoDB; +ERROR HY000: Tablespace for table '`test`.`t0`' exists. Please DISCARD the tablespace before IMPORT +CREATE TABLE t0(a INT PRIMARY KEY) ENGINE=InnoDB; +DROP TABLE t0; +CREATE TABLE u1(a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE u2(a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE u3(a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE u4(a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO u4 VALUES(1); +RENAME TABLE u4 TO u5; +RENAME TABLE u5 TO u6; +INSERT INTO u6 VALUES(2); +# Kill the server +# Fault 6: All-zero data file and innodb_force_recovery +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /\[ERROR\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd/ in mysqld.1.err +FOUND /\[ERROR\] InnoDB: Datafile .*u1.*\. Cannot determine the space ID from the first 64 pages/ in mysqld.1.err +FOUND /\[ERROR\] InnoDB: Cannot read first page of .*u2.ibd/ in mysqld.1.err +# Fault 7: Missing or wrong data file and innodb_force_recovery +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND /\[ERROR\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd/ in mysqld.1.err +FOUND /InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace/ in mysqld.1.err +FOUND /\[ERROR\] InnoDB: Cannot rename '.*u5.ibd' to '.*u6.ibd' for space ID \d+ because the target file exists/ in mysqld.1.err +FOUND /\[ERROR\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd/ in mysqld.1.err +FOUND /InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace/ in mysqld.1.err +FOUND /\[Warning\] InnoDB: Tablespace \d+ was not found at .*u[1-5].ibd, and innodb_force_recovery was set. All redo log for this tablespace will be ignored!/ in mysqld.1.err +DROP TABLE u1,u2,u3,u6; +# List of files: +SHOW TABLES; +Tables_in_test diff --git a/mysql-test/suite/innodb/r/log_file_name_debug.result b/mysql-test/suite/innodb/r/log_file_name_debug.result new file mode 100644 index 00000000000..e33ce36d1f2 --- /dev/null +++ b/mysql-test/suite/innodb/r/log_file_name_debug.result @@ -0,0 +1,14 @@ +# +# Bug#19685095 DO NOT CARE ABOUT UNRESOLVED MLOG_FILE_NAME +# IF THERE ARE NO OPERATIONS TO APPLY +# +SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus'; +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; +# Kill the server +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +FOUND /InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either/ in mysqld.1.err +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +FOUND /srv_prepare_to_delete_redo_log_files: ib_log: MLOG_CHECKPOINT.* written/ in mysqld.1.err +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/log_file_size.result b/mysql-test/suite/innodb/r/log_file_size.result new file mode 100644 index 00000000000..e07dba67a7b --- /dev/null +++ b/mysql-test/suite/innodb/r/log_file_size.result @@ -0,0 +1,59 @@ +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; +BEGIN; +INSERT INTO t1 VALUES (42); +# Kill and restart: --innodb-log-file-size=6M +SELECT * FROM t1; +a +INSERT INTO t1 VALUES (42); +BEGIN; +DELETE FROM t1; +# Kill and restart: --innodb-log-files-in-group=3 --innodb-log-file-size=5M +SELECT * FROM t1; +a +42 +INSERT INTO t1 VALUES (0),(123); +BEGIN; +DELETE FROM t1 WHERE a>0; +# Persist the state of the above incomplete transaction by +# causing a redo log write for another transaction. +connect con1, localhost, root; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1 WHERE a=0; +disconnect con1; +connection default; +# Kill the server +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +ERROR 42000: Unknown storage engine 'InnoDB' +SELECT * FROM t1; +a +42 +123 +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/mdev-117.result b/mysql-test/suite/innodb/r/mdev-117.result index 997470fea6f..979f1ae021c 100644 --- a/mysql-test/suite/innodb/r/mdev-117.result +++ b/mysql-test/suite/innodb/r/mdev-117.result @@ -15,3 +15,4 @@ connection default; disconnect con1; drop table t1; SET GLOBAL innodb_lock_wait_timeout=default; +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result b/mysql-test/suite/innodb/r/monitor.result similarity index 92% rename from mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result rename to mysql-test/suite/innodb/r/monitor.result index 2a66a0d0931..33a09a553b9 100644 --- a/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result +++ b/mysql-test/suite/innodb/r/monitor.result @@ -181,16 +181,8 @@ compress_pages_decompressed disabled compression_pad_increments disabled compression_pad_decrements disabled compress_saved disabled -compress_trim_sect512 disabled -compress_trim_sect1024 disabled -compress_trim_sect2048 disabled -compress_trim_sect4096 disabled -compress_trim_sect8192 disabled -compress_trim_sect16384 disabled -compress_trim_sect32768 disabled compress_pages_page_compressed disabled compress_page_compressed_trim_op disabled -compress_page_compressed_trim_op_saved disabled compress_pages_page_decompressed disabled compress_pages_page_compression_error disabled compress_pages_encrypted disabled @@ -618,7 +610,59 @@ icp_match 1 drop table monitor_test; set global innodb_monitor_disable = All; set global innodb_monitor_reset_all = all; +select 1 from `information_schema`.`INNODB_METRICS` +where case (1) when (1) then (AVG_COUNT_RESET) else (1) end; +1 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; +# +# Bug#22576241 SETTING INNODB_MONITOR_ENABLE TO ALL DOES NOT ENABLE ALL +# MONITORS +# +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; +NAME COUNT +buffer_page_written_index_leaf 0 +SET GLOBAL innodb_monitor_enable='module_buffer_page'; +INSERT INTO t1 VALUES (1), (2), (3), (4); +FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; +NAME COUNT +buffer_page_written_index_leaf NNNN +SET GLOBAL innodb_monitor_disable='module_buffer_page'; +SET GLOBAL innodb_monitor_reset_all='module_buffer_page'; +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; +NAME COUNT +buffer_page_written_index_leaf 0 +SET GLOBAL innodb_monitor_enable='%'; +INSERT INTO t1 VALUES (5), (6), (7), (8); +FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; +NAME COUNT +buffer_page_written_index_leaf NNNN +SET GLOBAL innodb_monitor_disable='%'; +SET GLOBAL innodb_monitor_reset_all='%'; +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; +NAME COUNT +buffer_page_written_index_leaf 0 +SET GLOBAL innodb_monitor_enable='ALL'; +INSERT INTO t1 VALUES (9), (10), (11), (12); +FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; +NAME COUNT +buffer_page_written_index_leaf NNNN +SET GLOBAL innodb_monitor_enable=default; +SET GLOBAL innodb_monitor_disable=default; +SET GLOBAL innodb_monitor_reset_all=default; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/read_only_recovery.result b/mysql-test/suite/innodb/r/read_only_recovery.result new file mode 100644 index 00000000000..7fcbfddf33e --- /dev/null +++ b/mysql-test/suite/innodb/r/read_only_recovery.result @@ -0,0 +1,36 @@ +connect con1, localhost, root; +CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB; +BEGIN; +INSERT INTO t VALUES(1),(2); +DELETE FROM t WHERE a=2; +connection default; +# Normal MariaDB shutdown would roll back the above transaction. +# We want the transaction to remain open, so we will kill the server +# after ensuring that any non-transactional files are clean. +FLUSH TABLES; +# Ensure that the above incomplete transaction becomes durable. +SET GLOBAL innodb_flush_log_at_trx_commit=1; +BEGIN; +INSERT INTO t VALUES(0); +ROLLBACK; +# Kill and restart: --innodb-force-recovery=3 +disconnect con1; +SELECT * FROM t; +a +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT * FROM t; +a +1 +# Starting with MariaDB 10.2, innodb_read_only implies READ UNCOMMITTED. +# In earlier versions, this would return the last committed version +# (empty table)! +SELECT * FROM t; +a +1 +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT * FROM t; +a +1 +SELECT * FROM t; +a +DROP TABLE t; diff --git a/mysql-test/suite/innodb/r/row_lock.result b/mysql-test/suite/innodb/r/row_lock.result index 7ea09fa3bad..bfd7656d778 100644 --- a/mysql-test/suite/innodb/r/row_lock.result +++ b/mysql-test/suite/innodb/r/row_lock.result @@ -19,3 +19,5 @@ connection default; disconnect con12; disconnect con11; drop table t1,t2,t3,t4; +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); +call mtr.add_suppression("Sort aborted.*"); diff --git a/mysql-test/suite/innodb_zip/r/wl6470_1.result b/mysql-test/suite/innodb/r/temp_table.result similarity index 96% rename from mysql-test/suite/innodb_zip/r/wl6470_1.result rename to mysql-test/suite/innodb/r/temp_table.result index ea1866d69eb..e90da0d5e77 100644 --- a/mysql-test/suite/innodb_zip/r/wl6470_1.result +++ b/mysql-test/suite/innodb/r/temp_table.result @@ -194,18 +194,22 @@ count(*) drop procedure populate_t1; drop procedure populate_t1_small; drop procedure populate_t1_small2; -drop table t1; -drop table t2; +drop temporary table t1,t2; create temporary table t1 (keyc int, c1 char(100), c2 char(100), primary key(keyc), index sec_index(c1) ) engine = innodb key_block_size = 4; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +create temporary table t1 +(keyc int, c1 char(100), c2 char(100), +primary key(keyc), index sec_index(c1) +) engine = innodb; set innodb_strict_mode=off; create temporary table t2 (keyc int, c1 char(100), c2 char(100), primary key(keyc), index sec_index(c1) ) engine = innodb key_block_size = 8; -set innodb_strict_mode=default; +set innodb_strict_mode=on; create procedure populate_t1() begin declare i int default 1; @@ -394,9 +398,7 @@ count(*) drop procedure populate_t1; drop procedure populate_t1_small; drop procedure populate_t1_small2; -drop table t1; -drop table t2; -set global innodb_file_per_table = 0; +drop temporary table t1, t2; create temporary table t1 (keyc int, c1 char(100), c2 char(100), primary key(keyc), index sec_index(c1) @@ -593,6 +595,3 @@ count(*) drop procedure populate_t1; drop procedure populate_t1_small; drop procedure populate_t1_small2; -drop table t1; -drop table t2; -set global innodb_file_per_table = 1; diff --git a/mysql-test/suite/innodb_zip/r/wl6470_2.result b/mysql-test/suite/innodb/r/temp_table_savepoint.result similarity index 71% rename from mysql-test/suite/innodb_zip/r/wl6470_2.result rename to mysql-test/suite/innodb/r/temp_table_savepoint.result index b001cd73882..c2bf70ca9ee 100644 --- a/mysql-test/suite/innodb_zip/r/wl6470_2.result +++ b/mysql-test/suite/innodb/r/temp_table_savepoint.result @@ -2,8 +2,6 @@ create procedure populate_tables() begin declare n int default 20; declare inner_loop int default 100; -set global innodb_file_per_table=on; -drop table if exists t1,t2,t3,t4; create temporary table t1(c1 int not null, c2 int not null, c3 char(255) not null, @@ -14,7 +12,7 @@ c7 varchar(2000) not null, c8 datetime, c9 decimal(6,3), primary key (c1), -index (c3,c4(50),c5(50)), +index (c3,c4(50),c5(50)), index (c2)) engine=innodb row_format=redundant; create temporary table t2(c1 int not null, @@ -30,19 +28,6 @@ primary key (c1), index (c3,c4(50),c5(50)), index (c2)) engine=innodb row_format=compact; -create temporary table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(6000) not null, -c5 blob(6000) not null, -c6 varchar(2000) not null, -c7 varchar(2000) not null, -c8 datetime, -c9 decimal(6,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; create temporary table t4(c1 int not null, c2 int not null, c3 char(255) not null, @@ -74,106 +59,86 @@ insert into t6 values (50),(100),(150),(190); while (n > 0) do start transaction; insert into t1 values(n,n,repeat(concat(' tc3_',n),30), -repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800), -repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800), +repeat(concat(' tc4_',n),8),repeat(concat(' tc_',n),8), +repeat(concat(' tc6_',n),8),repeat(concat(' tc7_',n),8), now(),(100.55+n)); insert into t2 values(n,n,repeat(concat(' tc3_',n),30), +repeat(concat(' tc4_',n),8),repeat(concat(' tc_',n),8), +repeat(concat(' tc6_',n),8),repeat(concat(' tc7_',n),8), +now(),(100.55+n)); +insert ignore into t4 values(n,n,repeat(concat(' tc3_',n),30), repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800), repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800), now(),(100.55+n)); -insert into t3 values(n,n,repeat(concat(' tc3_',n),30), -repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800), -repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800), -now(),(100.55+n)); -insert into t4 values(n,n,repeat(concat(' tc3_',n),30), -repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800), -repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800), -now(),(100.55+n)); -insert into t5 values(n,n,repeat(concat(' tc3_',n),30), +insert ignore into t5 values(n,n,repeat(concat(' tc3_',n),30), repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800), repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800), now(),(100.55+n)); if (n > 10) then commit; -else +else delete from t1 where c1 > 10 ; delete from t2 where c1 > 10 ; -delete from t3 where c1 > 10 ; delete from t4 where c1 > 10 ; delete from t5 where c1 > 10 ; rollback; start transaction; update t1 set c1 = c1 + 1000 where c1 > 10; update t2 set c1 = c1 + 1000 where c1 > 10; -update t3 set c1 = c1 + 1000 where c1 > 10; update t4 set c1 = c1 + 1000 where c1 > 10; update t5 set c1 = c1 + 1000 where c1 > 10; rollback; -end if; +end if; start transaction; insert into t1 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), -repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), -repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), +repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8), +repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2), now(),(100.55+n+inner_loop)); insert into t2 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), +repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8), +repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2), +now(),(100.55+n+inner_loop)); +insert ignore into t4 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), now(),(100.55+n+inner_loop)); -insert into t3 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), -repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), -repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), -now(),(100.55+n+inner_loop)); -insert into t4 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), -repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), -repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), -now(),(100.55+n+inner_loop)); -insert into t5 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), +insert ignore into t5 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), now(),(100.55+n+inner_loop)); delete from t1 where c1 between 100 and 110; delete from t2 where c1 between 100 and 110; -delete from t3 where c1 between 100 and 110; delete from t4 where c1 between 100 and 110; delete from t5 where c1 between 100 and 110; -update t1 set c1 = c1+1 where c1>110; -update t2 set c1 = c1+1 where c1>110; -update t3 set c1 = c1+1 where c1>110; -update t4 set c1 = c1+1 where c1>110; -update t5 set c1 = c1+1 where c1>110; +update t1 set c1 = c1+1 where c1>110; +update t2 set c1 = c1+1 where c1>110; +update t4 set c1 = c1+1 where c1>110; +update t5 set c1 = c1+1 where c1>110; savepoint a; insert into t1 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), -repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), -repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), +repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8), +repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2), now(),(100.55+n+inner_loop)); insert into t2 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), +repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8), +repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2), +now(),(100.55+n+inner_loop)); +insert ignore into t4 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), now(),(100.55+n+inner_loop)); -insert into t3 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), -repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), -repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), -now(),(100.55+n+inner_loop)); -insert into t4 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), -repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), -repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), -now(),(100.55+n+inner_loop)); -insert into t5 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), +insert ignore into t5 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), now(),(100.55+n+inner_loop)); savepoint b; insert into t1 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), -repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), -repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), +repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8), +repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2), now(),(100.55+n+inner_loop)); insert into t2 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), -repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), -repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), -now(),(100.55+n+inner_loop)); -insert into t3 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), -repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), -repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), +repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8), +repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2), now(),(100.55+n+inner_loop)); insert into t4 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), @@ -189,16 +154,13 @@ rollback to a; commit; commit; rollback; -set n = n - 1; +set n = n - 1; end while; end| connect con1,localhost,root,,; +call populate_tables();; connect con2,localhost,root,,; -#---client 1 : dml operation ---" -connection con1; -#---client 2 : dml operation ---" -connection con2; -# In connection 1 +call populate_tables();; connection con1; select count(*) from t1; count(*) @@ -206,9 +168,6 @@ count(*) select count(*) from t2; count(*) 20 -select count(*) from t3; -count(*) -20 select count(*) from t4; count(*) 20 @@ -259,28 +218,6 @@ c1 136 138 140 -select c1 from t3; -c1 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 select c1 from t4; c1 11 @@ -325,7 +262,6 @@ c1 136 138 140 -# In connection 2 connection con2; select count(*) from t1; count(*) @@ -333,9 +269,6 @@ count(*) select count(*) from t2; count(*) 20 -select count(*) from t3; -count(*) -20 select count(*) from t4; count(*) 20 @@ -386,28 +319,6 @@ c1 136 138 140 -select c1 from t3; -c1 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 select c1 from t4; c1 11 @@ -452,7 +363,6 @@ c1 136 138 140 -# In connection 1 connection con1; set autocommit = 0; insert into t1 values (20,1,'a','a','a','a','a',now(),100.55); @@ -465,11 +375,6 @@ ERROR 23000: Duplicate entry '20' for key 'PRIMARY' insert ignore into t2 values (20,1,'a','a','a','a','a',now(),100.55); Warnings: Warning 1062 Duplicate entry '20' for key 'PRIMARY' -insert into t3 values (20,1,'a','a','a','a','a',now(),100.55); -ERROR 23000: Duplicate entry '20' for key 'PRIMARY' -insert ignore into t3 values (20,1,'a','a','a','a','a',now(),100.55); -Warnings: -Warning 1062 Duplicate entry '20' for key 'PRIMARY' insert into t4 values (20,1,'a','a','a','a','a',now(),100.55); ERROR 23000: Duplicate entry '20' for key 'PRIMARY' insert ignore into t4 values (20,1,'a','a','a','a','a',now(),100.55); @@ -486,9 +391,6 @@ ERROR 23000: Duplicate entry '20' for key 'PRIMARY' insert into t2 values (1,1,'a','a','a','a','a',now(),100.55), (20,1,'a','a','a','a','a',now(),100.55); ERROR 23000: Duplicate entry '20' for key 'PRIMARY' -insert into t3 values (1,1,'a','a','a','a','a',now(),100.55), -(20,1,'a','a','a','a','a',now(),100.55); -ERROR 23000: Duplicate entry '20' for key 'PRIMARY' insert into t4 values (1,1,'a','a','a','a','a',now(),100.55), (20,1,'a','a','a','a','a',now(),100.55); ERROR 23000: Duplicate entry '20' for key 'PRIMARY' @@ -502,9 +404,6 @@ c1 c2 select c1,c2 from t2 where c1 in (20,1); c1 c2 20 20 -select c1,c2 from t3 where c1 in (20,1); -c1 c2 -20 20 select c1,c2 from t4 where c1 in (20,1); c1 c2 20 20 @@ -513,7 +412,6 @@ c1 c2 20 20 replace into t1 values (20,1,'a','a','a','a','a',now(),100.55); replace into t2 values (20,1,'a','a','a','a','a',now(),100.55); -replace into t3 values (20,1,'a','a','a','a','a',now(),100.55); replace into t4 values (20,1,'a','a','a','a','a',now(),100.55); replace into t5 values (20,1,'a','a','a','a','a',now(),100.55); select c1,c2,c3,c4,c5,c6,c7,c9 from t1 where c1 = 20; @@ -522,9 +420,6 @@ c1 c2 c3 c4 c5 c6 c7 c9 select c1,c2,c3,c4,c5,c6,c7,c9 from t2 where c1 = 20; c1 c2 c3 c4 c5 c6 c7 c9 20 1 a a a a a 100.550 -select c1,c2,c3,c4,c5,c6,c7,c9 from t3 where c1 = 20; -c1 c2 c3 c4 c5 c6 c7 c9 -20 1 a a a a a 100.550 select c1,c2,c3,c4,c5,c6,c7,c9 from t4 where c1 = 20; c1 c2 c3 c4 c5 c6 c7 c9 20 1 a a a a a 100.550 @@ -533,7 +428,6 @@ c1 c2 c3 c4 c5 c6 c7 c9 20 1 a a a a a 100.550 update ignore t1 set c1 = 20 where c1 = 140 ; update ignore t2 set c1 = 20 where c1 = 140 ; -update ignore t3 set c1 = 20 where c1 = 140 ; update ignore t4 set c1 = 20 where c1 = 140 ; update ignore t5 set c1 = 20 where c1 = 140 ; select count(*) from t1 where c1 = 140; @@ -542,25 +436,22 @@ count(*) select count(*) from t2 where c1 = 140; count(*) 1 -select count(*) from t3 where c1 = 140; -count(*) -1 select count(*) from t4 where c1 = 140; count(*) 1 select count(*) from t5 where c1 = 140; count(*) 1 -"running select * into outfile from t1 ; +select * into outfile "VARDIR/tmp/t1.outfile" from t1; create temporary table temp_1 engine = innodb as select * from t1 where 1=2; select count(*) from temp_1; count(*) 0 -"running load data infile into temp_1 ; +load data infile 'VARDIR/tmp/t1.outfile' into table temp_1; select count(*) from temp_1; count(*) 20 -alter table temp_1 add column c10 int default 99 , +alter table temp_1 add column c10 int default 99 , add column c11 varchar(100) default 'test'; alter table temp_1 add primary key (c1); insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55); @@ -570,15 +461,12 @@ c1 c2 c3 c4 c5 c6 c7 c9 c10 c11 select count(*) from temp_1 where c10 = 99 and c11 like 'test'; count(*) 21 -insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55) +insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55) on duplicate key update c1=-2,c2=-2; select c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 from temp_1 where c1 < 0; c1 c2 c3 c4 c5 c6 c7 c9 c10 c11 -2 -2 a a a a a 100.550 99 test -drop table t1 ,t2 ,t3,t4,t5,t6,temp_1; disconnect con1; -connection con2; -drop table t1 ,t2 ,t3,t4,t5,t6; disconnect con2; connection default; drop procedure populate_tables; @@ -664,4 +552,3 @@ count(*) drop prepare stm; drop prepare stm_1; drop prepare stm_2; -drop table prep_1; diff --git a/mysql-test/suite/innodb/r/temporary_table.result b/mysql-test/suite/innodb/r/temporary_table.result new file mode 100644 index 00000000000..1fb73f4e775 --- /dev/null +++ b/mysql-test/suite/innodb/r/temporary_table.result @@ -0,0 +1,639 @@ +# files in MYSQL_DATA_DIR +ibtmp1 +create temporary table t1 (i int, f float, c char(100)) engine=innodb; +insert into t1 values (100, 1.1, 'pune'); +insert into t1 values (99, 1.2, 'mumbai'); +insert into t1 values (98, 1.3, 'jaipur'); +insert into t1 values (97, 1.4, 'delhi'); +insert into t1 values (96, 1.5, 'ahmedabad'); +select * from t1; +i f c +100 1.1 pune +99 1.2 mumbai +98 1.3 jaipur +97 1.4 delhi +96 1.5 ahmedabad +select * from t1 where i = 98; +i f c +98 1.3 jaipur +select * from t1 where i < 100; +i f c +99 1.2 mumbai +98 1.3 jaipur +97 1.4 delhi +96 1.5 ahmedabad +explain select * from t1 where f > 1.29999; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +alter table t1 add index sec_index(f); +explain select * from t1 where f > 1.29999; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL sec_index NULL NULL NULL 5 Using where +select * from t1 where f > 1.29999; +i f c +98 1.3 jaipur +97 1.4 delhi +96 1.5 ahmedabad +explain select * from t1 where i = 100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +alter table t1 add unique index pri_index(i); +explain select * from t1 where i = 100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const pri_index pri_index 5 const 1 +select * from t1 where i = 100; +i f c +100 1.1 pune +delete from t1 where i < 97; +select * from t1; +i f c +100 1.1 pune +99 1.2 mumbai +98 1.3 jaipur +97 1.4 delhi +insert into t1 values (96, 1.5, 'kolkata'); +select * from t1; +i f c +100 1.1 pune +99 1.2 mumbai +98 1.3 jaipur +97 1.4 delhi +96 1.5 kolkata +update t1 set f = 1.44 where c = 'delhi'; +select * from t1; +i f c +100 1.1 pune +99 1.2 mumbai +98 1.3 jaipur +97 1.44 delhi +96 1.5 kolkata +truncate table t1; +insert into t1 values (100, 1.1, 'pune'); +insert into t1 values (99, 1.2, 'mumbai'); +insert into t1 values (98, 1.3, 'jaipur'); +insert into t1 values (97, 1.4, 'delhi'); +insert into t1 values (96, 1.5, 'ahmedabad'); +select * from t1; +i f c +100 1.1 pune +99 1.2 mumbai +98 1.3 jaipur +97 1.4 delhi +96 1.5 ahmedabad +alter table t1 discard tablespace; +ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table +alter table t1 import tablespace; +ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table +drop temporary table t1; +create temporary table t1 +(keyc int, c1 char(100), c2 char(100), +primary key(keyc)) engine = innodb; +CREATE PROCEDURE populate_t1() +BEGIN +DECLARE i INT DEFAULT 1; +while (i <= 20000) DO +insert into t1 values (i, 'a', 'b'); +SET i = i + 1; +END WHILE; +END| +set autocommit=0; +select count(*) from t1; +count(*) +0 +call populate_t1(); +select count(*) from t1; +count(*) +20000 +select * from t1 limit 10; +keyc c1 c2 +1 a b +2 a b +3 a b +4 a b +5 a b +6 a b +7 a b +8 a b +9 a b +10 a b +set autocommit=1; +truncate table t1; +select * from t1; +keyc c1 c2 +# test condition of full-temp-tablespace +create temporary table t1 +(keyc int, c1 char(100), c2 char(100), +primary key(keyc)) engine = innodb; +begin; +call populate_t1(); +ERROR HY000: The table 't1' is full +drop procedure populate_t1; +# test read-only mode +# files in MYSQL_DATA_DIR +ibtmp1 +select * from t1; +ERROR 42S02: Table 'test.t1' doesn't exist +show tables; +Tables_in_test +create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb; +ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only") +# test various bad start-up parameters +SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +create temporary table t ( +i int) +engine = innodb row_format = compressed; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +create temporary table t ( +i int) +engine = innodb row_format = compressed key_block_size = 8; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +create temporary table t ( +i int) +engine = innodb row_format = dynamic; +show warnings; +Level Code Message +drop table t; +create temporary table t ( +i int) +engine = innodb row_format = dynamic; +show warnings; +Level Code Message +drop table t; +set innodb_strict_mode = off; +create temporary table t ( +i int) +engine = innodb row_format = compressed key_block_size = 8; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +set innodb_strict_mode = default; +drop table t; +create temporary table t ( +i int) +engine = innodb row_format = compressed; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +#files in MYSQL_TMP_DIR, expecting only default temporary tablespace file +ibtmp1 +create temporary table t ( +i int) +engine = innodb row_format = dynamic; +show warnings; +Level Code Message +drop table t; +create temporary table t ( +i int) +engine = innodb row_format = dynamic; +show warnings; +Level Code Message +drop table t; +set innodb_strict_mode = off; +create temporary table t ( +i int) +engine = innodb row_format = dynamic key_block_size = 4; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +drop table t; +create temporary table t ( +i int) +engine = innodb row_format = compact; +show warnings; +Level Code Message +drop table t; +create temporary table t ( +i int) +engine = innodb key_block_size = 4; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +drop table t; +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB KEY_BLOCK_SIZE = 4; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + `c` char(10) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4 +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = REDUNDANT; +SHOW WARNINGS; +Level Code Message +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + `c` char(10) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = COMPACT; +SHOW WARNINGS; +Level Code Message +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + `c` char(10) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB KEY_BLOCK_SIZE = 4; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + `c` char(10) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4 +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = COMPRESSED; +Warnings: +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + `c` char(10) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE = 8; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + `c` char(10) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 8; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8. +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + `c` char(10) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=8 +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = DYNAMIC; +SHOW WARNINGS; +Level Code Message +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + `c` char(10) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY +) ENGINE = InnoDB ROW_FORMAT = REDUNDANT; +ALTER TABLE t1 ROW_FORMAT = COMPRESSED; +Warnings: +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED +ALTER TABLE t1 KEY_BLOCK_SIZE = 4; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 +ALTER TABLE t1 KEY_BLOCK_SIZE = 4 ROW_FORMAT = COMPRESSED; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 +ALTER TABLE t1 ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 4; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4 +ALTER TABLE t1 ROW_FORMAT = DYNAMIC; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4 +DROP TABLE t1; +set innodb_strict_mode = ON; +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB KEY_BLOCK_SIZE = 4; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +SHOW WARNINGS; +Level Code Message +Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB KEY_BLOCK_SIZE = 4, ROW_FORMAT = COMPACT; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +SHOW WARNINGS; +Level Code Message +Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = REDUNDANT; +SHOW WARNINGS; +Level Code Message +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + `c` char(10) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB KEY_BLOCK_SIZE = 4; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +SHOW WARNINGS; +Level Code Message +Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = COMPRESSED; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +SHOW WARNINGS; +Level Code Message +Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE = 8; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +SHOW WARNINGS; +Level Code Message +Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE = 7; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +SHOW WARNINGS; +Level Code Message +Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY, +c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = DYNAMIC; +SHOW WARNINGS; +Level Code Message +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + `c` char(10) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 ( +i INT NOT NULL PRIMARY KEY +) ENGINE = InnoDB ROW_FORMAT = REDUNDANT; +ALTER TABLE t1 ROW_FORMAT = COMPRESSED; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +SHOW WARNINGS; +Level Code Message +Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +ALTER TABLE t1 KEY_BLOCK_SIZE = 4; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +SHOW WARNINGS; +Level Code Message +Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +ALTER TABLE t1 ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 4; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +SHOW WARNINGS; +Level Code Message +Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +ALTER TABLE t1 ROW_FORMAT = DYNAMIC; +set innodb_strict_mode = OFF; +ALTER TABLE t1 ROW_FORMAT = COMPRESSED; +Warnings: +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +set innodb_strict_mode = ON; +ALTER TABLE t1 ROW_FORMAT = DYNAMIC; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +set innodb_strict_mode = OFF; +ALTER TABLE t1 ROW_FORMAT = COMPRESSED; +Warnings: +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +ALTER TABLE t1 KEY_BLOCK_SIZE = 8; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +set innodb_strict_mode = ON; +ALTER TABLE t1 ADD COLUMN j INT; +ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +SHOW WARNINGS; +Level Code Message +Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 +set innodb_strict_mode = OFF; +ALTER TABLE t1 KEY_BLOCK_SIZE = 0; +Warnings: +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + PRIMARY KEY (`i`) KEY_BLOCK_SIZE=8 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED +ALTER TABLE t1 ROW_FORMAT = DYNAMIC; +set innodb_strict_mode = ON; +ALTER TABLE t1 ADD COLUMN j INT; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `i` int(11) NOT NULL, + `j` int(11) DEFAULT NULL, + PRIMARY KEY (`i`) KEY_BLOCK_SIZE=8 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC diff --git a/mysql-test/suite/innodb/r/temporary_table_optimization.result b/mysql-test/suite/innodb/r/temporary_table_optimization.result new file mode 100644 index 00000000000..63c4f388bf7 --- /dev/null +++ b/mysql-test/suite/innodb/r/temporary_table_optimization.result @@ -0,0 +1,266 @@ +create temporary table t1 (i int) engine = innodb; +insert into t1 values (1), (2), (3), (4); +select * from t1; +i +1 +2 +3 +4 +select * from t1 where i = 4; +i +4 +drop table t1; +create temporary table t1 (i int) engine = innodb; +insert into t1 values (1), (2), (3), (4); +select * from t1; +i +1 +2 +3 +4 +select * from t1 where i = 4; +i +4 +drop table t1; +create temporary table t2 (i int) engine = innodb; +insert into t2 values (1), (2), (3), (4); +select * from t2; +i +1 +2 +3 +4 +select * from t2 where i = 4; +i +4 +drop table t2; +create temporary table t1 +(keyc int, c1 char(100), c2 char(100), +primary key(keyc)) engine = innodb; +create procedure populate_t1() +begin +declare i int default 1; +while (i <= 200) DO +insert into t1 values (i, 'a', 'b'); +set i = i + 1; +end while; +end| +set autocommit=0; +select count(*) from t1; +count(*) +0 +call populate_t1(); +select count(*) from t1; +count(*) +200 +select * from t1 limit 10; +keyc c1 c2 +1 a b +2 a b +3 a b +4 a b +5 a b +6 a b +7 a b +8 a b +9 a b +10 a b +set autocommit=1; +truncate table t1; +select count(*) from t1; +count(*) +0 +drop table t1; +create temporary table t1 (i int) engine = innodb; +insert into t1 values (1), (2), (3), (4); +select * from t1; +i +1 +2 +3 +4 +select * from t1 where i = 4; +i +4 +drop table t1; +create temporary table t1 +(keyc int, c1 char(100), c2 char(100), +primary key(keyc)) +engine = innodb; +begin; +select count(*) from t1; +count(*) +0 +call populate_t1(); +select count(*) from t1; +count(*) +200 +rollback; +select count(*) from t1; +count(*) +0 +begin; +call populate_t1(); +commit; +select count(*) from t1; +count(*) +200 +truncate table t1; +select count(*) from t1; +count(*) +0 +drop table t1; +drop procedure populate_t1; +create temporary table t1 (t1_i int, t1_f float) engine = innodb; +insert into t1 values (1, 1.1), (2, 2.2), (3, 2.2), (4, 4.4); +explain select * from t1 where t1_i = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where +alter table t1 add unique index pri_index(t1_i); +explain select * from t1 where t1_i = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const pri_index pri_index 5 const 1 +select * from t1 where t1_i = 1; +t1_i t1_f +1 1.1 +alter table t1 add unique index sec_index(t1_f); +ERROR 23000: Duplicate entry '2.2' for key 'sec_index' +alter table t1 add index sec_index(t1_f); +explain select * from t1 where t1_f > 2.2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL sec_index NULL NULL NULL 4 Using where +select * from t1 where t1_f > 2.2; +t1_i t1_f +2 2.2 +3 2.2 +4 4.4 +alter table t1 add column (t1_c char(10)); +select * from t1; +t1_i t1_f t1_c +1 1.1 NULL +2 2.2 NULL +3 2.2 NULL +4 4.4 NULL +insert into t1 values (5, 5.5, 'krunal'); +alter table t1 drop column t1_f; +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `t1_i` int(11) DEFAULT NULL, + `t1_c` char(10) DEFAULT NULL, + UNIQUE KEY `pri_index` (`t1_i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +select * from t1 where t1_f > 2.2; +ERROR 42S22: Unknown column 't1_f' in 'where clause' +alter table t1 add index sec_index2(t1_c), algorithm=inplace; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY +drop table t1; +create temporary table t1 (i int, f float) engine = innodb; +insert into t1 values (10, 1.1), (20, 2.2); +select * from t1; +i f +10 1.1 +20 2.2 +alter table t1 discard tablespace; +ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table +alter table t1 import tablespace; +ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table +drop table t1; +create temporary table t1 (i int) engine=innodb; +insert into t1 values (1), (2), (3); +select * from t1; +i +1 +2 +3 +alter table t1 rename t2; +select * from t1; +ERROR 42S02: Table 'test.t1' doesn't exist +select * from t2; +i +1 +2 +3 +insert into t2 values (1), (2), (6), (7); +select * from t2; +i +1 +2 +3 +1 +2 +6 +7 +drop table t2; +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; +create temporary table t ( +a int not null, +b blob not null, +index sk (b(3021)) +) row_format = dynamic engine=innodb; +drop table t; +create temporary table t ( +a int not null, +b blob not null, +index sk (b(3021)) +) row_format = dynamic engine=innodb; +drop table t; +create temporary table t ( +a int not null, +b blob not null, +index sk (b(3021)) +) row_format = dynamic engine=innodb; +drop table t; +SET innodb_strict_mode=OFF; +create temporary table t ( +a int not null, +b blob not null, +index sk (b(3021)) +) row_format = compact engine=innodb; +ERROR HY000: Index column size too large. The maximum column size is 767 bytes +create temporary table t ( +a int not null, +b blob not null, +index sk (b(3021)) +) row_format = dynamic engine=innodb; +drop table t; +create temporary table t ( +a int not null, +b blob not null, +index sk (b(3021)) +) row_format = compressed engine=innodb; +drop table t; +create temporary table t ( +a int not null, +b blob not null, +index sk (b(3021)) +) row_format = compact engine=innodb; +ERROR HY000: Index column size too large. The maximum column size is 767 bytes +create temporary table t ( +a int not null, +b blob not null, +index sk (b(3021)) +) row_format = dynamic engine=innodb; +drop table t; +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +CREATE TEMPORARY TABLE t2 ( i INT ) ENGINE = Innodb; +SELECT COUNT(*) FROM information_schema.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%t_'; +COUNT(*) +0 +SELECT COUNT(*) FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE '%test%t_'; +COUNT(*) +1 +CREATE TEMPORARY table t3 ( i INT ) ENGINE = Innodb; +SELECT COUNT(*) FROM information_schema.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%t_'; +COUNT(*) +0 +SELECT COUNT(*) FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE '%test%t_'; +COUNT(*) +1 +DROP TABLE t1,t2,t3; +SELECT COUNT(*) FROM information_schema.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%t_'; +COUNT(*) +0 +SELECT COUNT(*) FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE '%test%t_'; +COUNT(*) +0 diff --git a/mysql-test/suite/innodb/r/xa_recovery.result b/mysql-test/suite/innodb/r/xa_recovery.result index 666a65f8ee1..7a9448ad9f0 100644 --- a/mysql-test/suite/innodb/r/xa_recovery.result +++ b/mysql-test/suite/innodb/r/xa_recovery.result @@ -1,4 +1,3 @@ -call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); CREATE TABLE t1 (a INT) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); connect con1,localhost,root; @@ -7,7 +6,7 @@ UPDATE t1 set a=2; XA END 'x'; XA PREPARE 'x'; connection default; -call mtr.add_suppression("Found 1 prepared XA transactions"); +# Kill and restart disconnect con1; connect con1,localhost,root; SELECT * FROM t1 LOCK IN SHARE MODE; diff --git a/mysql-test/suite/innodb/t/101_compatibility.test b/mysql-test/suite/innodb/t/101_compatibility.test new file mode 100644 index 00000000000..83ab7914a69 --- /dev/null +++ b/mysql-test/suite/innodb/t/101_compatibility.test @@ -0,0 +1,105 @@ +--source include/have_innodb.inc +--source include/not_embedded.inc + +-- echo # +-- echo # MDEV-11623 MariaDB 10.1 fails to start datadir created with +-- echo # MariaDB 10.0/MySQL 5.6 using innodb-page-size!=16K +-- echo # + +# This is actually testing the opposite: starting the fixed 10.1 with +# buggy 10.1 files (by manually converting the flags in the files). + +--disable_query_log +call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of tablespace"); +FLUSH TABLES; +--enable_query_log +let INNODB_PAGE_SIZE=`select @@innodb_page_size`; +let MYSQLD_DATADIR=`select @@datadir`; + +CREATE TABLE tr(a INT)ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT; +CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +--disable_warnings +# ROW_FORMAT=COMPRESSED is not available with innodb_page_size>16k +SET INNODB_STRICT_MODE=OFF; +CREATE TABLE tz(a INT)ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SET INNODB_STRICT_MODE=ON; +--enable_warnings + +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +EVAL CREATE TABLE tdd(a INT) ENGINE=InnoDB, DATA DIRECTORY='$MYSQL_TMP_DIR'; + +CREATE TABLE tp(a INT) ENGINE=InnoDB page_compressed=1; +CREATE TABLE ti(a INT) ENGINE=InnoDB; +FLUSH TABLES ti FOR EXPORT; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "ti"); +EOF +UNLOCK TABLES; +ALTER TABLE ti DISCARD TABLESPACE; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "ti"); +ib_restore_tablespaces("test", "ti"); +do "$ENV{MTR_SUITE_DIR}/include/ibd_convert.pl"; +my $ps = $ENV{INNODB_PAGE_SIZE}; +my $dd = $ENV{MYSQLD_DATADIR}; +convert_to_mariadb_101("$dd/test/ti.ibd", $ps); +EOF + +ALTER TABLE ti IMPORT TABLESPACE; + +BEGIN; +INSERT INTO tr VALUES(1); +INSERT INTO tc VALUES(1); +INSERT INTO td VALUES(1); +INSERT INTO tz VALUES(1); +INSERT INTO tdd VALUES(1); +INSERT INTO tp VALUES(1); +INSERT INTO ti VALUES(1); + +--source include/kill_mysqld.inc + +perl; +do "$ENV{MTR_SUITE_DIR}/include/ibd_convert.pl"; +my $ps = $ENV{INNODB_PAGE_SIZE}; +my $dd = $ENV{MYSQLD_DATADIR}; + +convert_to_mariadb_101("$dd/ibdata1", $ps); +convert_to_mariadb_101("$dd/test/tr.ibd", $ps); +convert_to_mariadb_101("$dd/test/tc.ibd", $ps); +convert_to_mariadb_101("$dd/test/td.ibd", $ps); +convert_to_mariadb_101("$dd/test/tz.ibd", 1024) if $ps<32768; +convert_to_mariadb_101("$dd/test/tp.ibd", $ps); +convert_to_mariadb_101("$dd/test/ti.ibd", $ps); +convert_to_mariadb_101("$ENV{MYSQL_TMP_DIR}/test/tdd.ibd", $ps); +EOF + +--source include/start_mysqld.inc +CHECK TABLE tr,tc,td,tz,tdd,tp,ti; +--source include/shutdown_mysqld.inc + +perl; +do "$ENV{MTR_SUITE_DIR}/include/ibd_convert.pl"; +my $ps = $ENV{INNODB_PAGE_SIZE}; +my $dd = $ENV{MYSQLD_DATADIR}; + +convert_to_mariadb_101("$dd/ibdata1", $ps); +convert_to_mariadb_101("$dd/test/tr.ibd", $ps); +convert_to_mariadb_101("$dd/test/tc.ibd", $ps); +convert_to_mariadb_101("$dd/test/td.ibd", $ps); +convert_to_mariadb_101("$dd/test/tz.ibd", 1024) if $ps<32768; +convert_to_mariadb_101("$dd/test/tp.ibd", $ps); +convert_to_mariadb_101("$dd/test/ti.ibd", $ps); +convert_to_mariadb_101("$ENV{MYSQL_TMP_DIR}/test/tdd.ibd", $ps); +EOF + +--let $restart_parameters=--innodb-read-only +--source include/start_mysqld.inc +CHECK TABLE tr,tc,td,tz,tdd,tp,ti; +--source include/shutdown_mysqld.inc + +--let $restart_parameters= +--source include/start_mysqld.inc +DROP TABLE tr,tc,td,tz,tdd,tp,ti; diff --git a/mysql-test/suite/innodb/t/alter_missing_tablespace.test b/mysql-test/suite/innodb/t/alter_missing_tablespace.test new file mode 100644 index 00000000000..643b7a4833d --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_missing_tablespace.test @@ -0,0 +1,58 @@ +--source include/not_embedded.inc +--source include/have_innodb.inc + +--echo # +--echo # Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING +--echo # OR DISCARDED TABLESPACES +--echo # + +--disable_query_log +call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: "); +call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation"); +call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified"); +call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them"); +call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`.`\(t\|x\.\.d\)` because it could not be opened"); +call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing"); +call mtr.add_suppression("Could not find a valid tablespace file for"); +call mtr.add_suppression("InnoDB: Failed to find tablespace for table `test`\.`\(t\|x\.\.d\)` in the cache"); +call mtr.add_suppression("InnoDB: Cannot delete tablespace [0-9]+.*not found"); +call mtr.add_suppression("Table .* in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist"); +--enable_query_log + +let $MYSQLD_DATADIR=`select @@datadir`; +SET GLOBAL innodb_file_per_table=1; +CREATE TABLE t(a INT)ENGINE=InnoDB; +CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; + +--source include/shutdown_mysqld.inc + +# Remove the tablespace files. +--remove_file $MYSQLD_DATADIR/test/t.ibd +--remove_file $MYSQLD_DATADIR/test/x@002e@002ed.ibd + +--source include/start_mysqld.inc + +# 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; +SHOW WARNINGS; + +--error ER_NO_SUCH_TABLE +ALTER TABLE t1 ADD INDEX (a), ALGORITHM=COPY; +SHOW WARNINGS; + +--error ER_PARSE_ERROR +ALTER TABLE t ALGORITHM=INPLACE, DISCARD TABLESPACE; +--error ER_PARSE_ERROR +ALTER TABLE t ALGORITHM=COPY, DISCARD TABLESPACE; +--error ER_PARSE_ERROR +ALTER TABLE t ALGORITHM=DEFAULT, DISCARD TABLESPACE; +ALTER TABLE t DISCARD TABLESPACE; +DROP TABLE t; +--error ER_NO_SUCH_TABLE_IN_ENGINE +SELECT * FROM `x..d`; +DROP TABLE `x..d`; diff --git a/mysql-test/suite/innodb/t/create_isl_with_direct.test b/mysql-test/suite/innodb/t/create_isl_with_direct.test index 83c7507e025..1427264e13e 100644 --- a/mysql-test/suite/innodb/t/create_isl_with_direct.test +++ b/mysql-test/suite/innodb/t/create_isl_with_direct.test @@ -1,6 +1,5 @@ --source include/not_embedded.inc --source include/have_innodb.inc ---source include/not_windows.inc --disable_query_log CALL mtr.add_suppression(".*Failed to set O_DIRECT on file.*"); diff --git a/mysql-test/suite/innodb/t/doublewrite.test b/mysql-test/suite/innodb/t/doublewrite.test index e1984319cb7..a153ad66b19 100644 --- a/mysql-test/suite/innodb/t/doublewrite.test +++ b/mysql-test/suite/innodb/t/doublewrite.test @@ -10,15 +10,13 @@ # Slow shutdown and restart to make sure ibuf merge is finished SET GLOBAL innodb_fast_shutdown = 0; ---source include/restart_mysqld.inc - --disable_query_log -call mtr.add_suppression("InnoDB: Database page [0-9]+:1 contained only zeroes."); call mtr.add_suppression("Header page consists of zero bytes"); call mtr.add_suppression("Checksum mismatch in datafile"); call mtr.add_suppression("but the innodb_page_size start-up parameter is"); -call mtr.add_suppression("Database page corruption"); +call mtr.add_suppression("adjusting FSP_SPACE_FLAGS"); --enable_query_log +--source include/restart_mysqld.inc let INNODB_PAGE_SIZE=`select @@innodb_page_size`; let MYSQLD_DATADIR=`select @@datadir`; @@ -65,14 +63,48 @@ set global innodb_buf_flush_list_now = 1; --echo # Make the first page (page_no=0) of the user tablespace --echo # full of zeroes. +--echo # +--echo # MDEV-11623: Use old FSP_SPACE_FLAGS in the doublewrite buffer. + perl; use IO::Handle; my $fname= "$ENV{'MYSQLD_DATADIR'}test/t1.ibd"; +my $page_size = $ENV{INNODB_PAGE_SIZE}; +my $page; open(FILE, "+<", $fname) or die; -FILE->autoflush(1); -binmode FILE; -print FILE chr(0) x ($ENV{'INNODB_PAGE_SIZE'}); +sysread(FILE, $page, $page_size)==$page_size||die "Unable to read $name\n"; +sysseek(FILE, 0, 0)||die "Unable to seek $fname\n"; +die unless syswrite(FILE, chr(0) x $page_size, $page_size) == $page_size; close FILE; + +open(FILE, "+<", "$ENV{MYSQLD_DATADIR}ibdata1")||die "cannot open ibdata1\n"; +sysseek(FILE, 6 * $page_size - 190, 0)||die "Unable to seek ibdata1\n"; +sysread(FILE, $_, 12) == 12||die "Unable to read TRX_SYS\n"; +my($magic,$d1,$d2)=unpack "NNN", $_; +die "magic=$magic, $d1, $d2\n" unless $magic == 536853855 && $d2 >= $d1 + 64; +sysseek(FILE, $d1 * $page_size, 0)||die "Unable to seek ibdata1\n"; +# Find the page in the doublewrite buffer +for (my $d = $d1; $d < $d2 + 64; $d++) +{ + sysread(FILE, $_, $page_size)==$page_size||die "Cannot read doublewrite\n"; + next unless $_ eq $page; + sysseek(FILE, $d * $page_size, 0)||die "Unable to seek ibdata1\n"; + # Write buggy MariaDB 10.1.x FSP_SPACE_FLAGS to the doublewrite buffer + my($flags) = unpack "x[54]N", $_; + my $badflags = ($flags & 0x3f); + my $compression_level=6; + $badflags |= 1<<6|$compression_level<<7 if ($flags & 1 << 16); + $badflags |= ($flags & 15 << 6) << 7; # PAGE_SSIZE + + substr ($_, 54, 4) = pack("N", $badflags); + # Replace the innodb_checksum_algorithm=none checksum + substr ($_, 0, 4) = pack("N", 0xdeadbeef); + substr ($_, $page_size - 8, 4) = pack("N", 0xdeadbeef); + syswrite(FILE, $_, $page_size)==$page_size||die; + close(FILE); + exit 0; +} +die "Did not find the page in the doublewrite buffer ($d1,$d2)\n"; EOF --source include/start_mysqld.inc diff --git a/mysql-test/suite/innodb/t/group_commit_crash.test b/mysql-test/suite/innodb/t/group_commit_crash.test index cad349819bd..7ad0d9d1e74 100644 --- a/mysql-test/suite/innodb/t/group_commit_crash.test +++ b/mysql-test/suite/innodb/t/group_commit_crash.test @@ -9,8 +9,6 @@ --source include/have_debug.inc --source include/have_log_bin.inc -call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); - let $file_format_max=`SELECT @@innodb_file_format_max`; CREATE TABLE t1(a CHAR(255), b CHAR(255), diff --git a/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test b/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test index 8d1f460b64b..9dc2557e687 100644 --- a/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test +++ b/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test @@ -9,8 +9,6 @@ --source include/have_debug.inc --source include/have_log_bin.inc -call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); - let $file_format_max=`SELECT @@innodb_file_format_max`; CREATE TABLE t1(a CHAR(255), b CHAR(255), diff --git a/mysql-test/suite/innodb/t/index_merge_threshold.opt b/mysql-test/suite/innodb/t/index_merge_threshold.opt new file mode 100644 index 00000000000..56434e883de --- /dev/null +++ b/mysql-test/suite/innodb/t/index_merge_threshold.opt @@ -0,0 +1 @@ +--loose-innodb_sys_tablespaces diff --git a/mysql-test/suite/innodb/t/index_merge_threshold.test b/mysql-test/suite/innodb/t/index_merge_threshold.test new file mode 100644 index 00000000000..7cbde0acf03 --- /dev/null +++ b/mysql-test/suite/innodb/t/index_merge_threshold.test @@ -0,0 +1,189 @@ +# ############################################################# +# wl6747 : Set merge threshold at index level +# Check with CREATE INDEX on all datatypes +# Check with by ALTER TABLE MODIFY COLUMN TYPE +# Check with ALTER TABLE ADD Index +# Check by setting at index level with CREATE TABLE +# Check with BLOB column at index level with CREATE Index +# Check with row_format=compressed and key_block_size=8k +# Check withe valid and invalid merge_threshold values. +# +# Check actual behavior for table, partitioned table and temporary table +# ############################################################# +--source include/have_innodb_16k.inc +--source include/have_debug.inc +--source include/have_partition.inc + +# Check index merge threshold by create index on all datatypes + +CREATE TABLE tab(a BIGINT PRIMARY KEY,c1 TINYTEXT,c2 TEXT,c3 MEDIUMTEXT, +c4 TINYBLOB,c5 BLOB,c6 MEDIUMBLOB,c7 LONGBLOB) ENGINE=InnoDB; + +# check index merge threshold on all datatypes +CREATE INDEX index1 ON tab(c1(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=51'; +CREATE INDEX index2 ON tab(c2(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=-1'; +CREATE INDEX index3 ON tab(c3(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=20'; +CREATE INDEX index4 ON tab(c4(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=25'; +CREATE INDEX index5 ON tab(c5(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=30'; +CREATE INDEX index6 ON tab(c6(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=35'; +CREATE INDEX index7 ON tab(c7(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=40'; + +SHOW CREATE TABLE tab; + +SELECT t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +WHERE t.TABLE_ID = i.TABLE_ID AND t.NAME = 'test/tab'; + +ALTER TABLE tab comment='MERGE_THRESHOLD=49'; + +SHOW CREATE TABLE tab; + +SELECT t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +WHERE t.TABLE_ID = i.TABLE_ID AND t.NAME = 'test/tab'; + +ALTER TABLE tab MODIFY COLUMN c7 VARCHAR(2048) ; + +SHOW CREATE TABLE tab; + +SELECT t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +WHERE t.TABLE_ID = i.TABLE_ID AND t.NAME = 'test/tab'; + +ALTER TABLE tab ADD INDEX index8 (c7(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=45'; + +SHOW CREATE TABLE tab; + +SELECT t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD +FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i +WHERE t.TABLE_ID = i.TABLE_ID AND t.NAME = 'test/tab'; +# Cleanup +DROP TABLE tab; + + + +--echo # +--echo # behavior for deleting records +--echo # + +--echo # test to confirm behavior (MERGE_THRESHOLD=50 (default)) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB; + +--source suite/innodb/include/innodb_merge_threshold_delete.inc + +DROP TABLE tab1; + + +--echo # test to confirm behavior (MERGE_THRESHOLD=35) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB +COMMENT='MERGE_THRESHOLD=35'; + +--source suite/innodb/include/innodb_merge_threshold_delete.inc + +DROP TABLE tab1; + + +--echo # test to confirm behavior (MERGE_THRESHOLD=25) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB +COMMENT='MERGE_THRESHOLD=25'; + +--source suite/innodb/include/innodb_merge_threshold_delete.inc + +DROP TABLE tab1; + + +--echo # test to confirm partitioned table (MERGE_THRESHOLD=35) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) +COMMENT='MERGE_THRESHOLD=35' +PARTITION BY RANGE (a) +(PARTITION p0 VALUES LESS THAN (20) ENGINE = InnoDB, + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB); + +--source suite/innodb/include/innodb_merge_threshold_delete.inc + +DROP TABLE tab1; + + + +--echo # +--echo # behavior for updating to smaller records +--echo # + +--echo # test to confirm behavior (MERGE_THRESHOLD=50 (default)) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB; + +--source suite/innodb/include/innodb_merge_threshold_update.inc + +DROP TABLE tab1; + + +--echo # test to confirm behavior (MERGE_THRESHOLD=35) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB +COMMENT='MERGE_THRESHOLD=35'; + +--source suite/innodb/include/innodb_merge_threshold_update.inc + +DROP TABLE tab1; + + +--echo # test to confirm behavior (MERGE_THRESHOLD=25) +CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB +COMMENT='MERGE_THRESHOLD=25'; + +--source suite/innodb/include/innodb_merge_threshold_update.inc + +DROP TABLE tab1; + + +--echo # test to confirm explicit temporary table (MERGE_THRESHOLD=35) +--echo # (though not registered to SYS_TABLES,SYS_INDEXES, it works correctly) +# Temporary tables are not purged. so deleting records is not caused +# So, should be tested by updating case only +CREATE TEMPORARY TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB +COMMENT='MERGE_THRESHOLD=35'; + +--source suite/innodb/include/innodb_merge_threshold_update.inc + +DROP TABLE tab1; + + +--echo # +--echo # behavior for secondary index with blob +--echo # + +--echo # test to confirm behavior (MERGE_THRESHOLD=50 (default)) +# not to cause page operation at primary key, row_format=dynamic and the key is blob +CREATE TABLE tab1 (a bigint primary key, b blob) engine=InnoDB row_format=dynamic; +CREATE INDEX index1 ON tab1(b(750)); + +--source suite/innodb/include/innodb_merge_threshold_secondary.inc + +DROP TABLE tab1; + + +--echo # test to confirm behavior (MERGE_THRESHOLD=45) +CREATE TABLE tab1 (a bigint primary key, b blob) engine=InnoDB row_format=dynamic; +CREATE INDEX index1 ON tab1(b(750)) COMMENT 'MERGE_THRESHOLD=45'; + +--source suite/innodb/include/innodb_merge_threshold_secondary.inc + +DROP TABLE tab1; + + +--echo # test to confirm behavior (MERGE_THRESHOLD=40) +CREATE TABLE tab1 (a bigint primary key, b blob) engine=InnoDB row_format=dynamic; +CREATE INDEX index1 ON tab1(b(750)) COMMENT 'MERGE_THRESHOLD=40'; + +--source suite/innodb/include/innodb_merge_threshold_secondary.inc + +DROP TABLE tab1; + + +--echo # compressed table behaves same (MERGE_THRESHOLD=45) +CREATE TABLE tab1 (a bigint primary key, b blob) engine=InnoDB +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +CREATE INDEX index1 ON tab1(b(750)) COMMENT 'MERGE_THRESHOLD=45'; + +--source suite/innodb/include/innodb_merge_threshold_secondary.inc + +DROP TABLE tab1; diff --git a/mysql-test/suite/innodb/t/innochecksum.opt b/mysql-test/suite/innodb/t/innochecksum.opt deleted file mode 100644 index cc738d97434..00000000000 --- a/mysql-test/suite/innodb/t/innochecksum.opt +++ /dev/null @@ -1,2 +0,0 @@ ---innodb_file_per_table=1 ---innodb_file_format=Barracuda diff --git a/mysql-test/suite/innodb/t/innochecksum.test b/mysql-test/suite/innodb/t/innochecksum.test index 11720ce926d..79896ed1e3f 100644 --- a/mysql-test/suite/innodb/t/innochecksum.test +++ b/mysql-test/suite/innodb/t/innochecksum.test @@ -2,17 +2,10 @@ # Test innochecksum # -# Don't test under embedded -source include/not_embedded.inc; -# Require InnoDB -source include/have_innodb.inc; +--source include/have_innodb.inc +# Embedded server test does not support restarting +--source include/not_embedded.inc -if (!$INNOCHECKSUM) { - --echo Need innochecksum binary - --die Need innochecksum binary -} - ---echo # Create and populate a table CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB; INSERT INTO t1 (b) VALUES ('corrupt me'); --disable_query_log @@ -25,50 +18,15 @@ while ($i) --enable_query_log INSERT INTO t1 (b) VALUES ('corrupt me'); -CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) -ROW_FORMAT=COMPRESSED ENGINE=InnoDB ; - -INSERT INTO t2(b) SELECT b from t1; - -CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) -ROW_FORMAT=COMPRESSED ENGINE=InnoDB KEY_BLOCK_SIZE=16; - -INSERT INTO t3(b) SELECT b from t1; - let $MYSQLD_DATADIR=`select @@datadir`; -let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd; -let t2_IBD = $MYSQLD_DATADIR/test/t2.ibd; -let t3_IBD = $MYSQLD_DATADIR/test/t3.ibd; ---echo # Write file to make mysql-test-run.pl expect the "crash", but don't ---echo # start it until it's told to ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - ---echo # We give 30 seconds to do a clean shutdown because we do not want ---echo # to redo apply the pages of t1.ibd at the time of recovery. ---echo # We want SQL to initiate the first access to t1.ibd. -shutdown_server 30; - ---echo # Wait until disconnected. ---source include/wait_until_disconnected.inc +--source include/shutdown_mysqld.inc --echo # Run innochecksum on t1 --- disable_result_log ---exec $INNOCHECKSUM $t1_IBD - ---echo # Run innochecksum on t2 - ---exec $INNOCHECKSUM $t2_IBD - ---echo # Run innochecksum on t3 - ---exec $INNOCHECKSUM $t3_IBD +--disable_result_log +--exec $INNOCHECKSUM $MYSQLD_DATADIR/test/t1.ibd --enable_result_log ---echo # Write file to make mysql-test-run.pl start up the server again ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---enable_reconnect ---source include/wait_until_connected_again.inc +--source include/start_mysqld.inc ---echo # Cleanup -DROP TABLE t1, t2, t3; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/innodb-16k.test b/mysql-test/suite/innodb/t/innodb-16k.test index ad09666442d..a771fac27ed 100644 --- a/mysql-test/suite/innodb/t/innodb-16k.test +++ b/mysql-test/suite/innodb/t/innodb-16k.test @@ -8,17 +8,11 @@ call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after --disable_query_log let $MYSQLD_DATADIR= `select @@datadir`; # These values can change during the test -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; -let $innodb_strict_mode_orig = `SELECT @@session.innodb_strict_mode`; let $innodb_large_prefix_orig = `SELECT @@innodb_large_prefix`; --enable_query_log -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_large_prefix = OFF; - --echo # Test 1) Show the page size from Information Schema SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; @@ -263,8 +257,6 @@ SELECT table_name, row_format, create_options DROP TABLE t1; -SET GLOBAL innodb_file_format = `Barracuda`; - CREATE TABLE t2(d varchar(17) PRIMARY KEY) ENGINE=innodb DEFAULT CHARSET=utf8; CREATE TABLE t3(a int PRIMARY KEY) ENGINE=innodb; INSERT INTO t3 VALUES (22),(44),(33),(55),(66); @@ -381,9 +373,6 @@ UPDATE t1 SET t=@e; SHOW CREATE TABLE t1; DROP TABLE t1; -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - --echo Test an assertion failure on purge. # This test is not in innodb_8k or innodb_4k since the bug is not about @@ -440,8 +429,6 @@ DELETE FROM t3_purge; DELETE FROM t4_purge; # A secondary index tuple is found to be too long to fit into a page. -SET GLOBAL innodb_file_per_table=on; -SET GLOBAL innodb_file_format='Barracuda'; SET @r=REPEAT('a',500); CREATE TABLE tlong(a int, @@ -961,8 +948,5 @@ row_format=compact,ENGINE=INNODB; # --disable_query_log -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET SESSION innodb_strict_mode = $innodb_strict_mode_orig; EVAL SET GLOBAL innodb_large_prefix = $innodb_large_prefix_orig; --enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-32k-crash.test b/mysql-test/suite/innodb/t/innodb-32k-crash.test index 8f2e7d6c1e2..b9d96fd92c8 100644 --- a/mysql-test/suite/innodb/t/innodb-32k-crash.test +++ b/mysql-test/suite/innodb/t/innodb-32k-crash.test @@ -10,16 +10,7 @@ call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); ---disable_query_log let $MYSQLD_DATADIR= `select @@datadir`; -# These values can change during the test -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; -let $innodb_strict_mode_orig = `SELECT @@session.innodb_strict_mode`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, h blob,i blob,j blob,k blob,l blob,m blob,n blob, @@ -210,13 +201,3 @@ COMMIT; show create table t1; show create table t2; drop table t1,t2; - -# -# restore environment to the state it was before this test execution -# - ---disable_query_log -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET SESSION innodb_strict_mode = $innodb_strict_mode_orig; ---enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-32k.test b/mysql-test/suite/innodb/t/innodb-32k.test index 65c1d4bbc76..80a05c350d0 100644 --- a/mysql-test/suite/innodb/t/innodb-32k.test +++ b/mysql-test/suite/innodb/t/innodb-32k.test @@ -3,21 +3,9 @@ --source include/have_innodb.inc --source include/have_innodb_32k.inc -call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); -call mtr.add_suppression("InnoDB: Resizing redo log from *"); -call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files."); -call mtr.add_suppression("InnoDB: New log files created, LSN=*"); +call mtr.add_suppression("Innodb: Cannot add field.*row size is"); ---disable_query_log let $MYSQLD_DATADIR= `select @@datadir`; -# These values can change during the test -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; -let $innodb_strict_mode_orig = `SELECT @@session.innodb_strict_mode`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; --echo # Test 1) Show the page size from Information Schema SELECT variable_value FROM information_schema.global_status @@ -347,9 +335,9 @@ CREATE INDEX tn1f9 ON t1 (oa(767)); CREATE INDEX to1f11 ON t1 (pa(767)); UPDATE t1 SET t=@e; -# One more index and row size is too big ---replace_regex /> [0-9]*/> max_row_size/ ---error ER_TOO_BIG_ROWSIZE +# One more index and row size is too big (not any more!) +#--replace_regex /> [0-9]*/> max_row_size/ +#--error ER_TOO_BIG_ROWSIZE CREATE INDEX t1f6 ON t1 (l(767)); drop table t1; @@ -410,8 +398,6 @@ DELETE FROM t3_purge; DELETE FROM t4_purge; # A secondary index tuple is found to be too long to fit into a page. -SET GLOBAL innodb_file_per_table=on; -SET GLOBAL innodb_file_format='Barracuda'; SET @r=REPEAT('a',500); CREATE TABLE tlong(a int, @@ -758,12 +744,3 @@ show create table t2; update t2 set col150=@a; update t2 set col145=@b; drop table t2; -# -# restore environment to the state it was before this test execution -# - ---disable_query_log -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET SESSION innodb_strict_mode = $innodb_strict_mode_orig; ---enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-64k-crash.test b/mysql-test/suite/innodb/t/innodb-64k-crash.test index 9d2d0d66415..b61396bf22c 100644 --- a/mysql-test/suite/innodb/t/innodb-64k-crash.test +++ b/mysql-test/suite/innodb/t/innodb-64k-crash.test @@ -10,16 +10,7 @@ call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); ---disable_query_log let $MYSQLD_DATADIR= `select @@datadir`; -# These values can change during the test -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; -let $innodb_strict_mode_orig = `SELECT @@session.innodb_strict_mode`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, h blob,i blob,j blob,k blob,l blob,m blob,n blob, @@ -400,13 +391,3 @@ COMMIT; show create table t1; show create table t2; drop table t1,t2; - -# -# restore environment to the state it was before this test execution -# - ---disable_query_log -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET SESSION innodb_strict_mode = $innodb_strict_mode_orig; ---enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-64k.test b/mysql-test/suite/innodb/t/innodb-64k.test index bd0da6b66ad..13351450cfc 100644 --- a/mysql-test/suite/innodb/t/innodb-64k.test +++ b/mysql-test/suite/innodb/t/innodb-64k.test @@ -1,23 +1,9 @@ --source include/no_valgrind_without_big.inc -# Tests for setting innodb-page-size=64k; +# Tests for setting innodb-page-size=64k; --source include/have_innodb.inc --source include/have_innodb_64k.inc -call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *"); -call mtr.add_suppression("InnoDB: Resizing redo log from *"); -call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files."); -call mtr.add_suppression("InnoDB: New log files created, LSN=*"); - ---disable_query_log let $MYSQLD_DATADIR= `select @@datadir`; -# These values can change during the test -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; -let $innodb_strict_mode_orig = `SELECT @@session.innodb_strict_mode`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; --echo # Test 1) Show the page size from Information Schema SELECT variable_value FROM information_schema.global_status @@ -29,6 +15,7 @@ SET SESSION innodb_strict_mode = ON; # Redundant table; 32698 bytes +# MDEV-11828 FIXME: The length must be less! CREATE TABLE t1 ( c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), @@ -432,9 +419,9 @@ CREATE INDEX xtc1c5 ON t1 (cc(767),dc(767)); CREATE INDEX xte1e5 ON t1 (ec(767),fc(767)); UPDATE t1 SET t=@e; -# One more index and row size is too big ---replace_regex /> [0-9]*/> max_row_size/ ---error ER_TOO_BIG_ROWSIZE +# One more index and row size is too big (not any more!) +#--replace_regex /> [0-9]*/> max_row_size/ +#--error ER_TOO_BIG_ROWSIZE CREATE INDEX xt5k1f6 ON t1 (lc(767),mc(767)); SHOW CREATE TABLE t1; SHOW WARNINGS; @@ -712,12 +699,3 @@ COMMIT; drop table t2; DROP TABLE t1; -# -# restore environment to the state it was before this test execution -# - ---disable_query_log -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET SESSION innodb_strict_mode = $innodb_strict_mode_orig; ---enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-alter-discard.test b/mysql-test/suite/innodb/t/innodb-alter-discard.test deleted file mode 100644 index 19ba7c3a3ca..00000000000 --- a/mysql-test/suite/innodb/t/innodb-alter-discard.test +++ /dev/null @@ -1,54 +0,0 @@ -#Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING OR DISCARDED TABLESPACES - ---source include/not_embedded.inc ---source include/have_innodb.inc - -call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*"); - -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: Operating system error number .* in a file operation."); -call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified."); -call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them."); -call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: './test/t.ibd' OS error: .*"); -call mtr.add_suppression("InnoDB: Ignoring tablespace `test/t` because it could not be opened."); -call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .*"); -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-alter-tempfile.test b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test index e1e736fc678..ec1ea35f1cf 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test +++ b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test @@ -20,13 +20,6 @@ --echo # in-place ALTERs of the same table will not be blocked due to --echo # temporary tablename. -# As we intentionally crash below, there could be partially written -# pages that are then recovered from the doublewrite buffer -call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed -"); -call mtr.add_suppression("InnoDB: file read of space .* page .*"); -call mtr.add_suppression("InnoDB: Trying to recover it from the doublewrite buffer."); - let datadir= `select @@datadir`; --let $_server_id= `SELECT @@server_id` diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test index dd4c4ae8603..9b526c7c433 100644 --- a/mysql-test/suite/innodb/t/innodb-autoinc.test +++ b/mysql-test/suite/innodb/t/innodb-autoinc.test @@ -217,11 +217,11 @@ SET @@INSERT_ID=1; SHOW VARIABLES LIKE "auto_inc%"; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; -INSERT INTO t1 VALUES(-1); +INSERT IGNORE INTO t1 VALUES(-1); SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; SHOW VARIABLES LIKE "auto_inc%"; -INSERT INTO t1 VALUES (-2); +INSERT IGNORE INTO t1 VALUES (-2); INSERT INTO t1 VALUES (NULL); INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (NULL); @@ -243,11 +243,11 @@ SET @@INSERT_ID=1; SHOW VARIABLES LIKE "auto_inc%"; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; -INSERT INTO t1 VALUES(-1); +INSERT IGNORE INTO t1 VALUES(-1); SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; SHOW VARIABLES LIKE "auto_inc%"; -INSERT INTO t1 VALUES (-2),(NULL),(2),(NULL); +INSERT IGNORE INTO t1 VALUES (-2),(NULL),(2),(NULL); INSERT INTO t1 VALUES (250),(NULL); SELECT * FROM t1; INSERT INTO t1 VALUES (1000); @@ -429,6 +429,7 @@ DROP TABLE t2; DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1( c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; @@ -442,6 +443,7 @@ INSERT INTO t2 SELECT c1 FROM t1; INSERT INTO t2 SELECT NULL FROM t1; DROP TABLE t1; DROP TABLE t2; +SET sql_mode = DEFAULT; # If the user has specified negative values for an AUTOINC column then # InnoDB should ignore those values when setting the table's max value. @@ -459,8 +461,8 @@ DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (-1, 'innodb'); -INSERT INTO t1 VALUES (-127, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-1, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-127, 'innodb'); INSERT INTO t1 VALUES (NULL, NULL); SHOW CREATE TABLE t1; SELECT * FROM t1; @@ -479,8 +481,8 @@ DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (-1, 'innodb'); -INSERT INTO t1 VALUES (-32757, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-1, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-32757, 'innodb'); INSERT INTO t1 VALUES (NULL, NULL); SHOW CREATE TABLE t1; SELECT * FROM t1; @@ -499,8 +501,8 @@ DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (-1, 'innodb'); -INSERT INTO t1 VALUES (-8388607, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-1, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-8388607, 'innodb'); INSERT INTO t1 VALUES (NULL, NULL); SHOW CREATE TABLE t1; SELECT * FROM t1; @@ -519,8 +521,8 @@ DROP TABLE t1; CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (-1, 'innodb'); -INSERT INTO t1 VALUES (-2147483647, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-1, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-2147483647, 'innodb'); INSERT INTO t1 VALUES (NULL, NULL); SHOW CREATE TABLE t1; SELECT * FROM t1; @@ -539,8 +541,8 @@ DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); -INSERT INTO t1 VALUES (-1, 'innodb'); -INSERT INTO t1 VALUES (-9223372036854775807, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-1, 'innodb'); +INSERT IGNORE INTO t1 VALUES (-9223372036854775807, 'innodb'); INSERT INTO t1 VALUES (NULL, NULL); SHOW CREATE TABLE t1; SELECT * FROM t1; @@ -660,6 +662,7 @@ CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENG INSERT INTO t1 VALUES (2147483648, 'a'); SHOW CREATE TABLE t1; SELECT * FROM t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 CHANGE c1 c1 INT default 0; SHOW CREATE TABLE t1; INSERT INTO t1(c2) VALUES('b'); diff --git a/mysql-test/suite/innodb/t/innodb-bigblob.test b/mysql-test/suite/innodb/t/innodb-bigblob.test index d72e20487e4..799dfe42d48 100644 --- a/mysql-test/suite/innodb/t/innodb-bigblob.test +++ b/mysql-test/suite/innodb/t/innodb-bigblob.test @@ -6,11 +6,6 @@ let $status_orig=`SELECT @@innodb_status_output`; --enable_query_log -call mtr.add_suppression("Resizing redo log from *"); -call mtr.add_suppression("Starting to delete and rewrite log files."); -call mtr.add_suppression("New log files created, LSN=*"); -call mtr.add_suppression("Writer thread is waiting this semaphore"); - create table foo (id varchar(37) not null, content longblob) engine=INNODB; insert into foo (id, content) values('xyz', ''); update foo set content=repeat('a', 43941888) where id='xyz'; diff --git a/mysql-test/suite/innodb/t/innodb-bug-14068765.test b/mysql-test/suite/innodb/t/innodb-bug-14068765.test index 185e8849e21..c2446e0fecf 100644 --- a/mysql-test/suite/innodb/t/innodb-bug-14068765.test +++ b/mysql-test/suite/innodb/t/innodb-bug-14068765.test @@ -1,17 +1,6 @@ -- 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; @@ -68,6 +57,3 @@ 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 index 94a2d6b2252..f27fbbe31d7 100644 --- a/mysql-test/suite/innodb/t/innodb-bug-14084530.test +++ b/mysql-test/suite/innodb/t/innodb-bug-14084530.test @@ -1,15 +1,6 @@ -- 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; @@ -45,8 +36,4 @@ ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; CHECK TABLE testdb_wl5522.t1; SELECT c1 FROM testdb_wl5522.t1; -SET AUTOCOMMIT = 1; -DROP TABLE testdb_wl5522.t1; DROP DATABASE testdb_wl5522; -eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format; -eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test index cbf2d0c9805..6b52e386525 100644 --- a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test +++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test @@ -17,6 +17,9 @@ CREATE TABLE t1( INDEX(b)) ENGINE=InnoDB STATS_PERSISTENT=0; +--let $_server_id= `SELECT @@server_id` +--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect + # The flag innodb_change_buffering_debug is only available in debug builds. # It instructs InnoDB to try to evict pages from the buffer pool when # change buffering is possible, so that the change buffer will be used @@ -46,27 +49,22 @@ BEGIN; SELECT b FROM t1 LIMIT 3; connect (con1,localhost,root,,); -connection con1; BEGIN; DELETE FROM t1 WHERE a=1; # This should be buffered, if innodb_change_buffering_debug = 1 is in effect. INSERT INTO t1 VALUES(1,'X',1); -SET DEBUG='+d,crash_after_log_ibuf_upd_inplace'; ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace'; +--exec echo "wait" > $_expect_file_name --error 2013 # This should force a change buffer merge SELECT b FROM t1 LIMIT 3; +disconnect con1; +connection default; let SEARCH_PATTERN=Wrote log record for ibuf update in place operation; --source include/search_pattern_in_file.inc - -# Write file to make mysql-test-run.pl start up the server again ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---enable_reconnect ---source include/wait_until_connected_again.inc +--source include/start_mysqld.inc CHECK TABLE t1; - -# Cleanup DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/innodb-fk-virtual.test b/mysql-test/suite/innodb/t/innodb-fk-virtual.test new file mode 100644 index 00000000000..094fda35abb --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-fk-virtual.test @@ -0,0 +1,61 @@ +--source include/have_innodb.inc + +# +# MDEV-11850: Can't create foreign key referencing a virtual column +# + +create or replace table a ( + cola int(10) primary key, + v_cola int(10) as (cola mod 10) virtual, + p_cola int(10) as (cola mod 10) persistent +) engine=innodb; + +create index v_cola on a (v_cola); +create index p_cola on a (p_cola); + +create or replace table b( +cola int(10), +v_cola int(10), +p_cola int(10), +c_cola int(10) as (cola + 2) virtual +) engine=innodb; + +alter table b add constraint `p_cola_fk` +foreign key (p_cola) references a (p_cola) +on delete restrict +on update restrict; + +show warnings; +show create table b; + +alter table b add constraint `v_cola_fk` +foreign key (v_cola) references a (v_cola) +on delete restrict +on update restrict; + +show warnings; +show create table b; + +alter table b add constraint `c_cola_fk` +foreign key (c_cola) references a (cola) +on delete restrict +on update restrict; + +show warnings; +show create table b; + +# +# Test that fk really works +# + +insert into a(cola) values (12); +select * from a; +insert into b(cola, v_cola, p_cola) values (10,2,2); +select * from b; +--error 1452 +insert into b(cola, v_cola, p_cola) values (10,1,1); +--error 1451 +delete from a; +select * from a; +select * from b; +drop table b, a; diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test index 8598647de66..4549b3b6b47 100644 --- a/mysql-test/suite/innodb/t/innodb-index.test +++ b/mysql-test/suite/innodb/t/innodb-index.test @@ -1,15 +1,7 @@ -- source include/have_innodb.inc -let $innodb_file_format_orig=`select @@innodb_file_format`; -let $innodb_file_format_max_orig=`select @@innodb_file_format_max`; - let $MYSQLD_DATADIR= `select @@datadir`; -let $per_table=`select @@innodb_file_per_table`; -let $format=`select @@innodb_file_format`; -set global innodb_file_per_table=on; -set global innodb_file_format='Barracuda'; - SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS; # Bug#13654923 BOGUS DEBUG ASSERTION IN INDEX CREATION FOR ZERO-LENGTH RECORD @@ -336,10 +328,6 @@ explain select * from t1; explain select * from t1 order by a; drop table t1; -eval set global innodb_file_per_table=$per_table; -eval set global innodb_file_format=$format; -eval set global innodb_file_format_max=$format; - # # Test to check whether CREATE INDEX handles implicit foreign key # constraint modifications (Issue #70, Bug #38786) @@ -558,8 +546,3 @@ show create table t2c; --disable_info DROP TABLE t1,t2,t2c,t2i; - ---disable_query_log -eval SET GLOBAL innodb_file_format=$innodb_file_format_orig; -eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig; ---enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test b/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test index 51493266a60..69a632d6010 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test @@ -2,14 +2,7 @@ -- source include/have_innodb_bzip2.inc -- source include/not_embedded.inc ---disable_query_log let $innodb_compression_algorithm_orig=`select @@innodb_compression_algorithm`; -let $innodb_file_format_orig = `select @@innodb_file_format`; -let $innodb_file_per_table_orig = `select @@innodb_file_per_table`; ---enable_query_log - -set global innodb_file_format = `barracuda`; -set global innodb_file_per_table = on; # bzip2 set global innodb_compression_algorithm = 5; @@ -247,6 +240,4 @@ drop table innodb_page_compressed9; # reset system --disable_query_log EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; --enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_default.test b/mysql-test/suite/innodb/t/innodb-page_compression_default.test new file mode 100644 index 00000000000..28f184c278c --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-page_compression_default.test @@ -0,0 +1,51 @@ +--source include/have_innodb.inc + +--disable_query_log +let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; +let $innodb_file_format_orig = `SELECT @@innodb_file_format`; +let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; +--enable_query_log + +--disable_warnings +SET GLOBAL innodb_file_format = `Barracuda`; +SET GLOBAL innodb_file_per_table = ON; +--enable_warnings + +create table t1 (c1 int not null primary key auto_increment, b char(200)) engine=innodb page_compressed=1; +insert into t1 values(NULL,'compressed_text_aaaaaaaaabbbbbbbbbbbbbccccccccccccc'); +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; + +let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED'; +--source include/wait_condition.inc + +--let $MYSQLD_DATADIR=`select @@datadir` +--let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd +--let SEARCH_RANGE = 10000000 +--let SEARCH_PATTERN=compressed_text + +--echo # t1 compressed expected NOT FOUND +-- let SEARCH_FILE=$t1_IBD +-- source include/search_pattern_in_file.inc + +drop table t1; + +# reset system +--disable_query_log +--disable_warnings +EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; +EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; +EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; +--enable_warnings +--enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test b/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test index f36ea9684e9..1b1df674e3c 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test @@ -2,14 +2,7 @@ -- source include/have_innodb_lz4.inc -- source include/not_embedded.inc ---disable_query_log let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -set global innodb_file_format = `barracuda`; -set global innodb_file_per_table = on; # lz4 set global innodb_compression_algorithm = 2; @@ -248,6 +241,4 @@ drop table innodb_page_compressed9; # reset system --disable_query_log EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; --enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test b/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test index 6ea686bca04..9cec3e7a947 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test @@ -2,14 +2,7 @@ -- source include/have_innodb_lzma.inc -- source include/not_embedded.inc ---disable_query_log let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -set global innodb_file_format = `barracuda`; -set global innodb_file_per_table = on; # lzma set global innodb_compression_algorithm = 4; @@ -247,6 +240,4 @@ drop table innodb_page_compressed9; # reset system --disable_query_log EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; --enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test b/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test index 96ba18f5112..65c7e5dd3d9 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test @@ -2,15 +2,7 @@ -- source include/have_innodb_lzo.inc -- source include/not_embedded.inc - ---disable_query_log let $innodb_compression_algorithm_orig=`select @@innodb_compression_algorithm`; -let $innodb_file_format_orig = `select @@innodb_file_format`; -let $innodb_file_per_table_orig = `select @@innodb_file_per_table`; ---enable_query_log - -set global innodb_file_format = `barracuda`; -set global innodb_file_per_table = on; # lzo set global innodb_compression_algorithm = 3; @@ -201,6 +193,4 @@ drop table innodb_page_compressed9; # reset system --disable_query_log eval set global innodb_compression_algorithm = $innodb_compression_algorithm_orig; -eval set global innodb_file_per_table = $innodb_file_per_table_orig; -eval set global innodb_file_format = $innodb_file_format_orig; --enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test b/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test index 929f547b6ac..b90d15f1fa3 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test @@ -1,49 +1,42 @@ -- source include/have_innodb.inc -- source include/have_innodb_snappy.inc -call mtr.add_suppression("Compression failed for space*"); +call mtr.add_suppression("InnoDB: Compression failed for space.*"); ---disable_query_log let $innodb_compression_algorithm_orig=`select @@innodb_compression_algorithm`; -let $innodb_file_format_orig = `select @@innodb_file_format`; -let $innodb_file_per_table_orig = `select @@innodb_file_per_table`; ---enable_query_log - -set global innodb_file_format = `barracuda`; -set global innodb_file_per_table = on; # snappy set global innodb_compression_algorithm = 6; -create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8; +create table innodb_compressed(c1 int, b char(200)) engine=innodb row_format=compressed key_block_size=8; show warnings; -create table innodb_normal (c1 int, b char(20)) engine=innodb; +create table innodb_normal (c1 int, b char(200)) engine=innodb; show warnings; -create table innodb_page_compressed1 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=1; +create table innodb_page_compressed1 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=1; show warnings; show create table innodb_page_compressed1; -create table innodb_page_compressed2 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=2; +create table innodb_page_compressed2 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=2; show warnings; show create table innodb_page_compressed2; -create table innodb_page_compressed3 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=3; +create table innodb_page_compressed3 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=3; show warnings; show create table innodb_page_compressed3; -create table innodb_page_compressed4 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=4; +create table innodb_page_compressed4 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=4; show warnings; show create table innodb_page_compressed4; -create table innodb_page_compressed5 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=5; +create table innodb_page_compressed5 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=5; show warnings; show create table innodb_page_compressed5; -create table innodb_page_compressed6 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=6; +create table innodb_page_compressed6 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=6; show warnings; show create table innodb_page_compressed6; -create table innodb_page_compressed7 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=7; +create table innodb_page_compressed7 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=7; show warnings; show create table innodb_page_compressed7; -create table innodb_page_compressed8 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=8; +create table innodb_page_compressed8 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=8; show warnings; show create table innodb_page_compressed8; -create table innodb_page_compressed9 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=9; +create table innodb_page_compressed9 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=9; show warnings; show create table innodb_page_compressed9; delimiter //; @@ -52,7 +45,7 @@ begin declare current_num int; set current_num = 0; while current_num < repeat_count do - insert into innodb_normal values(current_num,'testing..'); + insert into innodb_normal values(current_num,'aaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccc'); set current_num = current_num + 1; end while; end// @@ -248,6 +241,4 @@ drop table innodb_page_compressed9; # reset system --disable_query_log EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; --enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test index 3a241810bbc..be8300b39aa 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test @@ -1,14 +1,8 @@ --source include/have_innodb.inc --source include/not_embedded.inc ---disable_query_log let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; # zlib set global innodb_compression_algorithm = 1; @@ -75,8 +69,6 @@ update innodb_dynamic set c1 = c1 + 1; select count(*) from innodb_compact where c1 < 1500000; select count(*) from innodb_dynamic where c1 < 1500000; -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; # none set global innodb_compression_algorithm = 0; @@ -112,6 +104,4 @@ SET SESSION innodb_compression_default = 0; # reset system --disable_query_log EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; --enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_zip.test b/mysql-test/suite/innodb/t/innodb-page_compression_zip.test index 67fafdb9e83..0c843314eee 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_zip.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_zip.test @@ -1,14 +1,7 @@ --source include/have_innodb.inc --source include/not_embedded.inc ---disable_query_log let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; # zlib set global innodb_compression_algorithm = 1; @@ -198,6 +191,4 @@ drop table innodb_page_compressed9; # reset system --disable_query_log EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; --enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-trim.opt b/mysql-test/suite/innodb/t/innodb-trim.opt new file mode 100644 index 00000000000..c33d075b002 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-trim.opt @@ -0,0 +1 @@ +--loose-innodb-use-trim=1 diff --git a/mysql-test/suite/innodb/t/innodb-trim.test b/mysql-test/suite/innodb/t/innodb-trim.test new file mode 100644 index 00000000000..0f38ea5ba84 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-trim.test @@ -0,0 +1,54 @@ +--source include/have_innodb.inc +--source include/have_innodb_punchhole.inc + +--disable_query_log +--disable_warnings +let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; +--enable_warnings +--enable_query_log + +# zlib +set global innodb_compression_algorithm = 1; + +create table innodb_page_compressed (c1 int not null primary key auto_increment, b char(200), c char(200), d char(200)) engine=innodb page_compressed=1 page_compression_level=9; +show warnings; + +delimiter //; +create procedure innodb_insert_proc (repeat_count int) +begin + declare current_num int; + set current_num = 0; + while current_num < repeat_count do + insert into innodb_page_compressed values (NULL,repeat('A',150),repeat('AB',75),repeat('B', 175)); + set current_num = current_num + 1; + end while; +end// +delimiter ;// +commit; + +set autocommit=0; +call innodb_insert_proc(16000); +commit; +set autocommit=1; + + +let $success= `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'innodb_num_page_compressed_trim_op'`; + +if (!$success) { +--disable_query_log +--disable_result_log + DROP PROCEDURE innodb_insert_proc; + DROP TABLE innodb_page_compressed; +--enable_query_log +--enable_result_log + --skip "Test requires TRIM"; +} + +DROP PROCEDURE innodb_insert_proc; +DROP TABLE innodb_page_compressed; + +--disable_query_log +--disable_warnings +EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; +--enable_warnings +--enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-update-insert.test b/mysql-test/suite/innodb/t/innodb-update-insert.test index 95387e0564e..d7a706611c9 100644 --- a/mysql-test/suite/innodb/t/innodb-update-insert.test +++ b/mysql-test/suite/innodb/t/innodb-update-insert.test @@ -27,12 +27,13 @@ drop table t1; create table t1 (f1 char(1), f2 longblob, f3 blob, primary key(f1)) charset=utf8 engine=innodb; +set statement sql_mode = '' for replace into t1 set f1=0xa3; select f1 from t1; update t1 set f1=0x6a; update t1 set f3=repeat(0xb1,8103); update t1 set f1=0x4a; -update t1 set f1=0x82; +update ignore t1 set f1=0x82; select f1 from t1; drop table t1; diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-1.test b/mysql-test/suite/innodb/t/innodb-wl5522-1.test index 6c2607effe8..0d59df11c44 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-1.test +++ b/mysql-test/suite/innodb/t/innodb-wl5522-1.test @@ -5,30 +5,15 @@ call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT."); ---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 +# 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; @@ -57,43 +42,43 @@ ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; SELECT * FROM testdb_wl5522.t1 ORDER BY c1; DROP TABLE testdb_wl5522.t1; -# case 2 +# case 2 CREATE TABLE testdb_wl5522.t1 ( col1 BIT(1), col2 BOOLEAN, col3 TINYINT, -col4 SMALLINT, +col4 SMALLINT, col5 MEDIUMINT, col6 INT, -col7 BIGINT, +col7 BIGINT, col8 FLOAT (14,3) , -col9 DOUBLE (14,3), -col10 VARCHAR(20), +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) , +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 , +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 +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 +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 @@ -136,7 +121,7 @@ col18 INT NOT NULL PRIMARY KEY, col19 DATE , col20 DATETIME , col21 TIMESTAMP , -col22 TIME , +col22 TIME, col23 YEAR ) ENGINE = Innodb; CREATE INDEX idx1 ON testdb_wl5522.t1(col18); @@ -162,8 +147,6 @@ 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), @@ -178,13 +161,13 @@ 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) , +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) +col_7_binary = REPEAT("a", 255) FROM testdb_wl5522.t1; FLUSH TABLES testdb_wl5522.t1 FOR EXPORT; @@ -223,7 +206,7 @@ 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) +col_7_binary = REPEAT("a", 255) FROM testdb_wl5522.t1; DROP TABLE testdb_wl5522.t1; @@ -231,7 +214,7 @@ 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), +col_2_varchar VARCHAR (20), PRIMARY KEY (col_1_int)) ENGINE = Innodb; INSERT INTO testdb_wl5522.t1 VALUES (1,'a1'),(2,'a2'),(3,'a3'); @@ -268,7 +251,7 @@ 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 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 @@ -284,7 +267,7 @@ 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), +PRIMARY KEY (col_1_int), FOREIGN KEY (col_2_varchar) REFERENCES testdb_wl5522.t1(col_2_varchar) ) ENGINE = Innodb; @@ -452,7 +435,7 @@ UNLOCK TABLES; DROP TABLE testdb_wl5522.t1; -# create table with incorrect schema +# create table with incorrect schema CREATE TABLE testdb_wl5522.t1 ( i bigint) ENGINE = Innodb; ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; @@ -820,14 +803,14 @@ SET AUTOCOMMIT = 1; CREATE TABLE testdb_wl5522.t1(col1 bit(1) , col2 boolean,col3 tinyint , col4 smallint , -col5 mediumint ,col6 int , col7 bigint , +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), +col16 BINARY(40), col17 BLOB (400), col18 int not null primary key, col19 DATE ,col20 DATETIME , col21 TIMESTAMP , col22 TIME , col23 YEAR ) ENGINE = Innodb; @@ -835,7 +818,7 @@ 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 +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; @@ -917,7 +900,7 @@ 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 +# 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; @@ -949,6 +932,3 @@ call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tabl --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.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test index e537f5c0fc3..b57ac62e1d8 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test +++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test @@ -1,4 +1,4 @@ -# Not supported in embedded +# mysql-test-run.pl --embedded cannot restart the server. --source include/not_embedded.inc # Adding big test option for this test. @@ -19,13 +19,13 @@ call mtr.add_suppression("InnoDB: Operating system error number .* in a file ope call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified."); call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them."); call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*"); -call mtr.add_suppression("InnoDB: Tablespace flags: .*"); call mtr.add_suppression("InnoDB: Ignoring tablespace .* because it could not be opened."); call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .*"); -call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*"); -call mtr.add_suppression("InnoDB: Page for tablespace .* "); -flush tables; +call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file"); +call mtr.add_suppression("InnoDB: Page for tablespace "); +call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS="); +FLUSH TABLES; let MYSQLD_DATADIR =`SELECT @@datadir`; let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; @@ -38,50 +38,34 @@ SELECT @@innodb_file_per_table; DROP DATABASE IF EXISTS test_wl5522; CREATE DATABASE test_wl5522; -##### Before DISCARD commit crash +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; +INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); + +--let $_server_id= `SELECT @@server_id` +--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect + +--exec echo wait > $_expect_file_name 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 +--source include/start_mysqld.inc -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 +--exec echo wait > $_expect_file_name +SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; --error 2013 ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect +--source include/start_mysqld.inc -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; @@ -116,61 +100,35 @@ 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 +--exec echo wait > $_expect_file_name +SET SESSION debug_dbug="+d,ib_import_before_commit_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 +--source include/start_mysqld.inc # 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 +--exec echo wait > $_expect_file_name +SET SESSION debug_dbug="+d,ib_import_before_checkpoint_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. +--source include/start_mysqld.inc DROP TABLE test_wl5522.t1; @@ -202,6 +160,7 @@ DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb; INSERT INTO test_wl5522.t1 VALUES (1); +SET @saved_debug_dbug = @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,ib_export_io_write_failure_1"; --replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/ @@ -210,7 +169,7 @@ FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; -SET SESSION debug_dbug="-d,ib_export_io_write_failure_1"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -226,7 +185,7 @@ FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; -SET SESSION debug_dbug="-d,ib_export_io_write_failure_2"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -241,7 +200,7 @@ FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; -SET SESSION debug_dbug="-d,ib_export_io_write_failure_3"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -256,7 +215,7 @@ FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; -SET SESSION debug_dbug="-d,ib_export_io_write_failure_4"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -271,7 +230,7 @@ FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; -SET SESSION debug_dbug="-d,ib_export_io_write_failure_5"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -287,7 +246,7 @@ FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; -SET SESSION debug_dbug="-d,ib_export_io_write_failure_6"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -303,7 +262,7 @@ FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; -SET SESSION debug_dbug="-d,ib_export_io_write_failure_7"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -319,7 +278,7 @@ FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; -SET SESSION debug_dbug="-d,ib_export_io_write_failure_8"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -334,7 +293,7 @@ FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; -SET SESSION debug_dbug="-d,ib_export_io_write_failure_9"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -350,7 +309,7 @@ FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; -SET SESSION debug_dbug="-d,ib_export_io_write_failure_10"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -366,7 +325,7 @@ FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; -SET SESSION debug_dbug="-d,ib_export_io_write_failure_11"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -382,7 +341,7 @@ FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; -SET SESSION debug_dbug="-d,ib_export_io_write_failure_12"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -422,7 +381,7 @@ EOF --error ER_IO_READ_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_io_read_error_1"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -446,7 +405,7 @@ EOF --error ER_IO_READ_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_io_read_error_2"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -470,7 +429,7 @@ EOF --error ER_IO_READ_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_io_read_error_3"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -494,7 +453,7 @@ EOF --error ER_IO_READ_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_io_read_error_4"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -518,7 +477,7 @@ EOF --error ER_IO_READ_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_io_read_error_5"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -542,7 +501,7 @@ EOF --error ER_IO_READ_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_io_read_error_6"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -566,7 +525,7 @@ EOF --error ER_IO_READ_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_io_read_error_7"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -590,7 +549,7 @@ EOF --error ER_IO_READ_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_io_read_error_8"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -614,7 +573,7 @@ EOF --error ER_IO_READ_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_io_read_error_9"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -639,7 +598,7 @@ EOF --error ER_IO_READ_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_string_read_error"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -666,7 +625,7 @@ SET SESSION debug_dbug="+d,ib_import_OOM_1"; --error ER_OUT_OF_RESOURCES ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_OOM_1"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -698,7 +657,7 @@ SET SESSION debug_dbug="+d,ib_import_OOM_2"; --error ER_OUT_OF_RESOURCES ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_OOM_2"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -730,7 +689,7 @@ SET SESSION debug_dbug="+d,ib_import_OOM_4"; --error ER_OUT_OF_RESOURCES ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_OOM_4"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -762,7 +721,7 @@ SET SESSION debug_dbug="+d,ib_import_OOM_5"; --error ER_OUT_OF_RESOURCES ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_OOM_5"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -793,7 +752,7 @@ SET SESSION debug_dbug="+d,ib_import_OOM_6"; --error ER_OUT_OF_RESOURCES ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_OOM_6"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -823,7 +782,7 @@ SET SESSION debug_dbug="+d,ib_import_OOM_7"; --error ER_OUT_OF_RESOURCES ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_OOM_7"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -853,7 +812,7 @@ SET SESSION debug_dbug="+d,ib_import_OOM_8"; --error ER_OUT_OF_RESOURCES ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_OOM_8"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -883,7 +842,7 @@ SET SESSION debug_dbug="+d,ib_import_OOM_9"; --error ER_OUT_OF_RESOURCES ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_OOM_9"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -913,7 +872,7 @@ SET SESSION debug_dbug="+d,ib_import_OOM_10"; --error ER_OUT_OF_RESOURCES ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_OOM_10"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -945,7 +904,7 @@ SET SESSION debug_dbug="+d,ib_import_internal_error"; --error ER_INTERNAL_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_internal_error"; +SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; @@ -986,7 +945,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; # Test failure after attempting a tablespace open SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; @@ -996,7 +955,7 @@ SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; --error ER_GET_ERRMSG ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; @@ -1011,7 +970,7 @@ SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure"; --error ER_NOT_KEYFILE ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; @@ -1025,7 +984,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; @@ -1039,7 +998,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; @@ -1053,7 +1012,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; @@ -1067,7 +1026,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; # Left over from the failed IMPORT perl; @@ -1207,7 +1166,7 @@ DROP TABLE test_wl5522.t1; # 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 +INSERT IGNORE INTO test_wl5522.t1 VALUES (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; @@ -1250,7 +1209,7 @@ SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1"; --error ER_INTERNAL_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -1274,14 +1233,14 @@ 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"; +SET SESSION debug_dbug="+d,buf_page_import_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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -1311,7 +1270,7 @@ SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2"; --error ER_INNODB_INDEX_CORRUPT ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -1341,7 +1300,7 @@ SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3"; --error ER_NOT_KEYFILE ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -1361,7 +1320,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -1392,7 +1351,7 @@ SET SESSION debug_dbug="+d,fil_space_create_failure"; --error ER_GET_ERRMSG ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,fil_space_create_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -1423,7 +1382,7 @@ SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; --error ER_GET_ERRMSG ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -1454,7 +1413,7 @@ SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure"; --error ER_INTERNAL_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -1496,6 +1455,7 @@ 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"); +call mtr.add_suppression("Index for table 't1' is corrupt; try to repair it"); --enable_query_log #cleanup diff --git a/mysql-test/suite/innodb/t/innodb-wl5522.test b/mysql-test/suite/innodb/t/innodb-wl5522.test index b04c726b74a..fc328cfd71f 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522.test +++ b/mysql-test/suite/innodb/t/innodb-wl5522.test @@ -4,19 +4,8 @@ -- source include/have_innodb.inc call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT."); - ---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; +call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it"); +FLUSH TABLES; let $MYSQLD_TMPDIR = `SELECT @@tmpdir`; let $MYSQLD_DATADIR = `SELECT @@datadir`; @@ -42,15 +31,18 @@ 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; + +CREATE TABLE t2(a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPACT; + --list_files $MYSQLD_DATADIR/test ---echo # Restarting server --- source include/restart_mysqld.inc ---echo # Done restarting server -FLUSH TABLE t1 FOR EXPORT; +--source include/restart_mysqld.inc +FLUSH TABLE t1, t2 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 +--move_file $MYSQLD_DATADIR/test/t2.cfg $MYSQLD_TMPDIR/t2.cfg +--copy_file $MYSQLD_DATADIR/test/t2.ibd $MYSQLD_TMPDIR/t2.ibd UNLOCK TABLES; INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a; SELECT COUNT(*) FROM t1; @@ -76,16 +68,27 @@ 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 +ALTER TABLE t2 ROW_FORMAT=DYNAMIC; +ALTER TABLE t2 DISCARD TABLESPACE; +--echo # List after t2 DISCARD +--list_files $MYSQLD_DATADIR/test +--move_file $MYSQLD_TMPDIR/t2.ibd $MYSQLD_DATADIR/test/t2.ibd +--move_file $MYSQLD_TMPDIR/t2.cfg $MYSQLD_DATADIR/test/t2.cfg +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t2 IMPORT TABLESPACE; +--remove_file $MYSQLD_DATADIR/test/t2.cfg +--replace_regex /(FSP_SPACE_FLAGS=0x)[0-9a-f]+(,.*0x)[0-9a-f]+(.*)/\1*\2*\3/ +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t2 IMPORT TABLESPACE; +DROP TABLE t2; +--remove_file $MYSQLD_DATADIR/test/t2.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 @@ -877,10 +880,8 @@ 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"); +FLUSH TABLES; # cleanup --remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg --remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd - -eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format; -eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test index e5e4b45a861..c3908abcf34 100644 --- a/mysql-test/suite/innodb/t/innodb.test +++ b/mysql-test/suite/innodb/t/innodb.test @@ -1143,7 +1143,7 @@ CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx (stamp))ENGINE=InnoDB; insert into t1 values (1),(2),(3); # Note that timestamp 3 is wrong -insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000); +insert ignore into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000); SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp < '20020204120000' GROUP BY col1; drop table t1,t2; diff --git a/mysql-test/suite/innodb/t/innodb_blob_truncate.test b/mysql-test/suite/innodb/t/innodb_blob_truncate.test index 8a4248c795e..3e54ec80e2b 100644 --- a/mysql-test/suite/innodb/t/innodb_blob_truncate.test +++ b/mysql-test/suite/innodb/t/innodb_blob_truncate.test @@ -1,14 +1,6 @@ --source include/have_innodb.inc --source include/have_innodb_16k.inc ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; ---enable_query_log - -SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; - create table t1(a blob) engine=innodb key_block_size=8; delimiter //; create function generate_blob() @@ -38,8 +30,3 @@ if ($x) { } drop table t1; drop function generate_blob; - ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; ---enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb_bug11754376.test b/mysql-test/suite/innodb/t/innodb_bug11754376.test index b740b7e08fe..a7f35c1a960 100644 --- a/mysql-test/suite/innodb/t/innodb_bug11754376.test +++ b/mysql-test/suite/innodb/t/innodb_bug11754376.test @@ -12,5 +12,3 @@ CREATE TABLE bug11754376 (c INT) ENGINE=INNODB; SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low'; DROP TABLE bug11754376; - -SET SESSION DEBUG_DBUG='-d,test_normalize_table_name_low'; diff --git a/mysql-test/suite/innodb/t/innodb_bug14676111-master.opt b/mysql-test/suite/innodb/t/innodb_bug14676111-master.opt deleted file mode 100644 index e16b9b0b895..00000000000 --- a/mysql-test/suite/innodb/t/innodb_bug14676111-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb-purge-threads=0 diff --git a/mysql-test/suite/innodb/t/innodb_bug14676111.test b/mysql-test/suite/innodb/t/innodb_bug14676111.test index ba04d421fde..02ef5e5e7f0 100644 --- a/mysql-test/suite/innodb/t/innodb_bug14676111.test +++ b/mysql-test/suite/innodb/t/innodb_bug14676111.test @@ -10,20 +10,12 @@ if (`select count(*)=0 from information_schema.global_variables where variable_n --disable_query_log set @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug; -set @old_innodb_stats_persistent = @@innodb_stats_persistent; set @old_innodb_undo_logs = @@innodb_undo_logs; # Limit undo segments for stable progress of purge. set global innodb_undo_logs = 1; --enable_query_log ---disable_warnings -drop table if exists t1; ---enable_warnings -call mtr.add_suppression("option 'innodb-purge-threads': unsigned value 0 adjusted to*"); - -set global innodb_stats_persistent = false; - -CREATE TABLE t1 (a int not null primary key) engine=InnoDB; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0; # # make 4 leveled straight tree @@ -139,6 +131,5 @@ drop table t1; --disable_query_log set global innodb_limit_optimistic_insert_debug = @old_innodb_limit_optimistic_insert_debug; -set global innodb_stats_persistent = @old_innodb_stats_persistent; set global innodb_undo_logs = @old_innodb_undo_logs; --enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb_bug42419.test b/mysql-test/suite/innodb/t/innodb_bug42419.test index 788437b0394..ef350529604 100644 --- a/mysql-test/suite/innodb/t/innodb_bug42419.test +++ b/mysql-test/suite/innodb/t/innodb_bug42419.test @@ -76,3 +76,5 @@ DROP TABLE t1; # Wait till all disconnects are completed --source include/wait_until_count_sessions.inc + +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); diff --git a/mysql-test/suite/innodb/t/innodb_bug53592.test b/mysql-test/suite/innodb/t/innodb_bug53592.test index 6c0f5a8422d..a809afeb5db 100644 --- a/mysql-test/suite/innodb/t/innodb_bug53592.test +++ b/mysql-test/suite/innodb/t/innodb_bug53592.test @@ -26,6 +26,7 @@ create unique index bug53592_c on bug53592(c(1)); # To get the correct index number, the code should go through index # translation table. Otherwise, it will get the wrong index # number and later trigger a server crash. +set statement sql_mode = '' for replace into bug53592 values (),(); check table bug53592; @@ -52,6 +53,7 @@ create unique index bug53592_c on bug53592(c(1)); # To get the correct index number, the code should go through index # translation table. Otherwise, it will get the wrong index # number and later trigger a server crash. +set statement sql_mode = '' for replace into bug53592 values (),(); check table bug53592; diff --git a/mysql-test/suite/innodb/t/innodb_bug56947.test b/mysql-test/suite/innodb/t/innodb_bug56947.test index 7883cafe291..84c5e70e1b5 100644 --- a/mysql-test/suite/innodb/t/innodb_bug56947.test +++ b/mysql-test/suite/innodb/t/innodb_bug56947.test @@ -11,7 +11,6 @@ SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename'; --replace_regex /"[^"]*"/"xxx"/ --error ER_GET_ERRNO alter table bug56947 add unique index (a); -SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename'; check table bug56947; drop table bug56947; diff --git a/mysql-test/suite/innodb/t/innodb_bug59641.test b/mysql-test/suite/innodb/t/innodb_bug59641.test index bca3f4a92c1..5f7528cf01a 100644 --- a/mysql-test/suite/innodb/t/innodb_bug59641.test +++ b/mysql-test/suite/innodb/t/innodb_bug59641.test @@ -2,11 +2,11 @@ # Bug #59641 Prepared XA transaction causes shutdown hang after a crash -- source include/not_embedded.inc -# The server would issue this warning on restart. -call mtr.add_suppression("Found 3 prepared XA transactions"); -# Close tables used by other tests (to not get crashed myisam tables) -flush tables; +--disable_query_log +call mtr.add_suppression("Found 3 prepared XA transactions"); +FLUSH TABLES; +--enable_query_log CREATE TABLE t(a INT PRIMARY KEY, b INT)ENGINE=InnoDB; INSERT INTO t VALUES(2,2),(4,4),(8,8),(16,16),(32,32); @@ -17,7 +17,6 @@ XA END '123'; XA PREPARE '123'; CONNECT (con1,localhost,root,,); -CONNECTION con1; XA START '456'; INSERT INTO t VALUES(3,47),(5,67); @@ -26,7 +25,6 @@ XA END '456'; XA PREPARE '456'; CONNECT (con2,localhost,root,,); -CONNECTION con2; XA START '789'; UPDATE t SET b=4*a WHERE a=32; @@ -34,30 +32,13 @@ XA END '789'; XA PREPARE '789'; CONNECT (con3,localhost,root,,); -CONNECTION con3; -# Kill the server without sending a shutdown command --- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --- shutdown_server 0 --- source include/wait_until_disconnected.inc - -# Restart the server. --- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --- enable_reconnect --- source include/wait_until_connected_again.inc +--source include/kill_and_restart_mysqld.inc SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SELECT * FROM t; COMMIT; -# Shut down the server. This would hang because of the bug. --- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --- shutdown_server --- source include/wait_until_disconnected.inc - -# Restart the server. --- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --- enable_reconnect --- source include/wait_until_connected_again.inc +--source include/restart_mysqld.inc SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SELECT * FROM t; diff --git a/mysql-test/suite/innodb/t/innodb_ctype_ldml.test b/mysql-test/suite/innodb/t/innodb_ctype_ldml.test index 011271e4e22..26af717b15a 100644 --- a/mysql-test/suite/innodb/t/innodb_ctype_ldml.test +++ b/mysql-test/suite/innodb/t/innodb_ctype_ldml.test @@ -116,7 +116,7 @@ DROP TABLE t1; # Crash happened with a user-defined utf8 collation, # on attempt to insert a string longer than the column can store. CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci); -INSERT INTO t1 SELECT REPEAT('a',11); +INSERT IGNORE INTO t1 SELECT REPEAT('a',11); DROP TABLE t1; # diff --git a/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test index 3968321d7d5..23e8b40b010 100644 --- a/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test +++ b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test @@ -28,7 +28,7 @@ BEGIN; SELECT b FROM t2 WHERE b=7 FOR UPDATE; --error ER_LOCK_WAIT_TIMEOUT -INSERT INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7)); +INSERT IGNORE INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7)); --error ER_LOCK_WAIT_TIMEOUT UPDATE t1 SET a='7000000' WHERE a=(SELECT a FROM t2 WHERE b=7); diff --git a/mysql-test/suite/innodb/t/innodb_monitor.test b/mysql-test/suite/innodb/t/innodb_monitor.test deleted file mode 100644 index 864e0cae862..00000000000 --- a/mysql-test/suite/innodb/t/innodb_monitor.test +++ /dev/null @@ -1,387 +0,0 @@ -# This is the test for Metrics Monitor Table feature. -# Test the metrics monitor system's control system -# and counter accuracy. - ---source include/have_innodb.inc - -set global innodb_monitor_disable = All; - -# Test turn on/off the monitor counter with "all" option -# By default, they will be off -select name, status from information_schema.innodb_metrics; - -# Turn on all monitor counters -set global innodb_monitor_enable = all; - -# status should all change to "enabled" -select name from information_schema.innodb_metrics where status!='enabled'; - -# Test wrong argument to the global configure option ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable = aaa; - -# We require a valid monitor counter/module name. There is no default -# counter name or module. A warning will be printed asking user to -# specify a valid counter name. -#--disable_warnings -#set global innodb_monitor_enable = default; -#--enable_warnings - -# Turn off all monitor counters, option name should be case -# insensitive -set global innodb_monitor_disable = All; - -# status should all change to "disabled" -select name from information_schema.innodb_metrics where status!='disabled'; - -# Reset all counter values -set global innodb_monitor_reset_all = all; - -# count should all change to 0 -select name from information_schema.innodb_metrics where count!=0; - -# Test wildcard match, turn on all counters contain string "lock" -set global innodb_monitor_enable = "%lock%"; - -# All lock related counter should be enabled -select name from information_schema.innodb_metrics -where status != IF(name like "%lock%", 'enabled', 'disabled'); - -# Disable them -set global innodb_monitor_disable = "%lock%"; - -# All lock related counter should be disabled -select name, status from information_schema.innodb_metrics -where name like "%lock%"; - -# No match for "%lock*" ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable = "%lock*"; - -# All counters will be turned on with wildcard match string with all "%" -set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%"; - -select name from information_schema.innodb_metrics where status!='enabled'; - -# Turn off all counters -set global innodb_monitor_disable="%%%%%"; - -select name from information_schema.innodb_metrics where status!='disabled'; - -# One more round testing. All counters will be turned on with -# single wildcard character "%" -set global innodb_monitor_enable="%"; - -select name from information_schema.innodb_metrics where status!='enabled'; - -# Turn off all the counters with "%_%" -set global innodb_monitor_disable="%_%"; - -select name from information_schema.innodb_metrics where status!='disabled'; - -# Turn on all counters start with "log" -set global innodb_monitor_enable="log%%%%"; - -select name from information_schema.innodb_metrics -where status != IF(name like "log%", 'enabled', 'disabled'); - -# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_" -# is single character wildcard match word -set global innodb_monitor_enable="os_%a_fs_ncs"; - -# Turn on counters whose name contains "os" and "pending" with -# wildcard match "os%pending%" -set global innodb_monitor_enable="os%pending%"; - -select name, status from information_schema.innodb_metrics -where name like "os%"; - -# Empty string is an invalid option ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable=""; - ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable="_"; - -# Reset counters only in "module_metadata" module -set global innodb_monitor_disable = module_metadata; - -set global innodb_monitor_reset_all = module_metadata; - -# Only turn on "table_open" counter -set global innodb_monitor_enable = metadata_table_handles_opened; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb; - -# This will open the monitor_test table -select * from monitor_test; - -# "metadata_table_handles_opened" should increment by 1 -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Reset the counter value while counter is still on (started) -# This will reset value "count_reset" but not -# "count" -set global innodb_monitor_reset = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# re-create table again to increment "metadata_table_handles_opened" again -drop table monitor_test; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb; - -select * from monitor_test; - -# "metadata_table_handles_opened" should increment -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Cannot reset all monitor value while the counter is on -set global innodb_monitor_reset_all = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Turn off the counter "metadata_table_handles_opened" -set global innodb_monitor_disable = metadata_table_handles_opened; - -# Reset the counter value while counter is off (disabled) -set global innodb_monitor_reset = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# re-create table again. Since monitor is off, "metadata_table_handles_opened" -# should not be incremented -drop table monitor_test; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb; - -# "metadata_table_handles_opened" should increment -select * from monitor_test; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Reset all the counters, include those counter *_since_start -set global innodb_monitor_reset_all = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Turn on "table_open" counter again -set global innodb_monitor_enable = metadata_table_handles_opened; - -# Test metadata_table_handles_opened again to see if it is working correctly -# after above round of turning on/off/reset -drop table monitor_test; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb stats_persistent=0; - -select * from monitor_test; - -# "metadata_table_handles_opened" should increment -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Test counter "metadata_table_handles_closed", -# create index will close the old handle -set global innodb_monitor_enable = metadata_table_handles_closed; - -create index idx on monitor_test(col); - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_closed"; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; - -# Reset counters only in "module_metadata" module -set global innodb_monitor_disable = module_metadata; - -set global innodb_monitor_reset = module_metadata; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; - -set global innodb_monitor_reset_all = module_metadata; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; - -# Test Transaction Module -set global innodb_monitor_enable = module_trx; - -begin; -insert into monitor_test values(9); -commit; - -begin; -insert into monitor_test values(9); -rollback; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "trx_rollbacks" or name like "trx_active_transactions"; - -set global innodb_monitor_disable = module_trx; - -# Test DML Module -set global innodb_monitor_enable = module_dml; - -insert into monitor_test values(9); - -update monitor_test set col = 10 where col = 9; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -delete from monitor_test; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status - from information_schema.innodb_metrics - where name like "dml%"; - -# test reset counter while the counter is on -set global innodb_monitor_reset = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# insert/delete some rows after the reset -insert into monitor_test values(9); -insert into monitor_test values(1); - -delete from monitor_test; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# We do not allow reset_all while the counter is on, nothing -# should be reset here -set global innodb_monitor_reset_all = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# Turn off the counter -set global innodb_monitor_disable = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# Reset all counter values -set global innodb_monitor_reset_all = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# Open individual counter "dml_inserts" -set global innodb_monitor_enable = dml_inserts; - -insert into monitor_test values(9); -insert into monitor_test values(1); - -delete from monitor_test; - -# Only counter "dml_inserts" should be updated -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -set global innodb_monitor_disable = module_dml; - -drop table monitor_test; - -set global innodb_monitor_enable = file_num_open_files; - -# Counters are unpredictable when innodb-file-per-table is on ---replace_column 2 # 3 # 4 # 5 # 6 # 7 # -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "file_num_open_files"; - -set global innodb_monitor_disable = file_num_open_files; - -# Test ICP module counters -set global innodb_monitor_enable = "icp%"; - -create table monitor_test(a char(3), b int, c char(2), -primary key (a(1), c(1)), key(b)) engine = innodb; - -insert into monitor_test values("13", 2, "aa"); - -select a from monitor_test where b < 1 for update; - -# should have icp_attempts = 1 and icp_out_of_range = 1 -select name, count from information_schema.innodb_metrics -where name like "icp%"; - -# should have icp_attempts = 2 and icp_match = 1 -select a from monitor_test where b < 3 for update; - -select name, count from information_schema.innodb_metrics -where name like "icp%"; - -drop table monitor_test; - -set global innodb_monitor_disable = all; -set global innodb_monitor_reset_all = all; - -# Test for bug #13966091 -select 1 from `information_schema`.`INNODB_METRICS` -where case (1) when (1) then (AVG_COUNT_RESET) else (1) end; - --- 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 diff --git a/mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test b/mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test index adae10df2ad..7fb4037e6bb 100644 --- a/mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test +++ b/mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test @@ -16,20 +16,10 @@ # which is not there with embedded mode --source include/not_embedded.inc # Save innodb variables -let $innodb_file_format_orig=`select @@innodb_file_format`; -let $innodb_file_per_table_orig=`select @@innodb_file_per_table`; let $innodb_large_prefix_orig=`select @@innodb_large_prefix`; -# Set Innodb file format as feature works for Barracuda file format -set global innodb_file_format="Barracuda"; -set global innodb_file_per_table=1; set global innodb_large_prefix=1; --- disable_warnings -DROP TABLE IF EXISTS worklog5743; --- enable_warnings - - #------------------------------------------------------------------------------ # Stop the server in between when prefix index are created and see if state is # correct when server is restarted. @@ -111,6 +101,4 @@ DROP TABLE worklog5743; #------------------------------------------------------------------------------ -eval SET GLOBAL innodb_file_format=$innodb_file_format_orig; -eval SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig; eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig; diff --git a/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits-master.opt b/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits-master.opt index 22272485540..dbac5bb16a9 100644 --- a/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits-master.opt +++ b/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits-master.opt @@ -1,3 +1,2 @@ --innodb-fatal-semaphore-wait-threshold=1 --innodb-sys-semaphore-waits=1 ---innodb-instrument-semaphores=1 diff --git a/mysql-test/suite/innodb/t/innodb_trx_weight.test b/mysql-test/suite/innodb/t/innodb_trx_weight.test index b72eaad345f..8af311a532e 100644 --- a/mysql-test/suite/innodb/t/innodb_trx_weight.test +++ b/mysql-test/suite/innodb/t/innodb_trx_weight.test @@ -106,3 +106,5 @@ INSERT INTO t3 SELECT * FROM t3; -- source include/innodb_trx_weight.inc DROP TABLE t1, t2, t3, t4, t5_nontrans; + +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); diff --git a/mysql-test/suite/innodb/t/log_alter_table.test b/mysql-test/suite/innodb/t/log_alter_table.test new file mode 100644 index 00000000000..f479c6695aa --- /dev/null +++ b/mysql-test/suite/innodb/t/log_alter_table.test @@ -0,0 +1,51 @@ +--source include/have_innodb.inc +--source include/have_debug.inc + +# Embedded server does not support crashing +--source include/not_embedded.inc + +--echo # +--echo # Bug#21801423 INNODB REDO LOG DOES NOT INDICATE WHEN +--echo # FILES ARE CREATED +--echo # +--echo # Bug#21796691 INNODB REDO LOG DOES NOT INDICATE WHEN +--echo # REDO LOGGING IS SKIPPED +--echo # +--source include/no_checkpoint_start.inc +CREATE TABLE t1 (a INT NOT NULL, b INT UNIQUE) ENGINE=InnoDB; +# MLOG_INDEX_LOAD will not be emitted for empty tables. Insert a row. +INSERT INTO t1 VALUES (1,2); +# We should get two MLOG_INDEX_LOAD for this. +ALTER TABLE t1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE; +# And one MLOG_INDEX_LOAD for this. +ALTER TABLE t1 DROP INDEX b, ADD INDEX (b); + +--let CLEANUP_IF_CHECKPOINT=DROP TABLE t1; +--source include/no_checkpoint_end.inc + +--let $restart_parameters= --debug=d,ib_log +--source include/start_mysqld.inc + +let SEARCH_RANGE = -50000; +let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err; +let SEARCH_ABORT=NOT FOUND; +# Look for at least one MLOG_FILE_CREATE2 in the error log. +# Theoretically, it may have been written by this test or an earlier test. +# FIXME: redirect the error log of the restart to a new file, +# and ensure that we have exactly 2 records there. +let SEARCH_PATTERN=scan .*: multi-log rec MLOG_FILE_CREATE2.*page .*:0; +--source include/search_pattern_in_file.inc +# Look for at least one MLOG_INDEX_LOAD in the error log. +# Theoretically, it may have been written by this test or an earlier test. +# FIXME: redirect the error log of the restart to a new file, +# and ensure that we have exactly 3 records there. +let SEARCH_PATTERN=scan .*: log rec MLOG_INDEX_LOAD; +--source include/search_pattern_in_file.inc + +CHECK TABLE t1; + +# Remove the --debug=d,ib_log setting. +--let $restart_parameters= +--source include/restart_mysqld.inc + +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/log_corruption.test b/mysql-test/suite/innodb/t/log_corruption.test new file mode 100644 index 00000000000..2e628065199 --- /dev/null +++ b/mysql-test/suite/innodb/t/log_corruption.test @@ -0,0 +1,387 @@ +--source include/have_innodb.inc +--source include/have_innodb_16k.inc + +--disable_query_log +call mtr.add_suppression("InnoDB: Upgrade after a crash is not supported"); +call mtr.add_suppression("InnoDB: Plugin initialization aborted"); +call mtr.add_suppression("Plugin 'InnoDB' init function returned error"); +call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); +call mtr.add_suppression("InnoDB: Unsupported redo log format"); +call mtr.add_suppression("InnoDB: No valid checkpoint found"); +call mtr.add_suppression("InnoDB: Invalid (log block|redo log header) checksum"); +call mtr.add_suppression("InnoDB: Missing MLOG_CHECKPOINT"); +call mtr.add_suppression("InnoDB: MLOG_FILE_NAME incorrect"); +call mtr.add_suppression("InnoDB: ############### CORRUPT LOG RECORD FOUND"); +call mtr.add_suppression("InnoDB: Log scan aborted at LSN"); +call mtr.add_suppression("InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42\\r?$"); +call mtr.add_suppression("InnoDB: Obtaining redo log encryption key version 1 failed"); +call mtr.add_suppression("InnoDB: Decrypting checkpoint failed"); +--enable_query_log + +let bugdir= $MYSQLTEST_VARDIR/tmp/log_corruption; +--mkdir $bugdir +--let SEARCH_RANGE = -50000 +--let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err + +let $check_no_innodb=SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); + +write_file $bugdir/ib_buffer_pool; +EOF + +--let $dirs= --innodb-data-home-dir=$bugdir --innodb-log-group-home-dir=$bugdir + +perl; +# Create a dummy system tablespace file using the default innodb_page_size=16k +die unless open OUT, ">", "$ENV{bugdir}/ibdata1"; +binmode OUT; + +# Tablespace header page with valid FSP_SIZE=768 pages. +# Also, write a dummy FSEG_MAGIC_N at offset 60 to keep fseg_inode_try_get() +# happy when fseg_n_reserved_pages() is following an invalid pointer +# from the all-zero change buffer header page (page 3). +print OUT pack("Nx[42]Nx[10]Nx[16312]Nx[4]", + 0xdeadbeef, # checksum + 768, # FSP_PAGE_SIZE + 97937874, # FSEG_MAGIC_N + 0xdeadbeef); # checksum +# Dummy pages 1..6. +print OUT chr(0) x (6 * 16384); +# Dictionary header page. +print OUT pack("NNx[62]Nx[8]Nx[16290]Nx[4]", + 0xdeadbeef, # checksum + 7, # FIL_PAGE_OFFSET + 8, # DICT_HDR_TABLES + 9, # DICT_HDR_INDEXES + 0xdeadbeef); # checksum + +# Empty SYS_TABLES page (page 8). +print OUT pack("NNNNx[8]nx[12]nnx[31]Cx[20]", + 0xdeadbeef, # checksum + 8, # FIL_PAGE_OFFSET + ~0, ~0, # FIL_PAGE_PREV, FIL_PAGE_NEXT + 17855, # FIL_PAGE_TYPE == FIL_PAGE_INDEX + 2, # PAGE_N_DIR_SLOTS + 124, # PAGE_HEAP_TOP + 1); # PAGE_INDEX_ID == DICT_TABLES_ID +print OUT pack("nxnn", 0x801, 3, 116), "infimum"; +print OUT pack("xnxnxx", 0x901, 0x803), "supremum"; +print OUT pack("x[16248]nnNx[4]", 116, 101, 0xdeadbeef); + +# Empty SYS_INDEXES page (page 9). +print OUT pack("NNNNx[8]nx[12]nnx[31]Cx[20]", + 0xdeadbeef, # checksum + 9, # FIL_PAGE_OFFSET + ~0, ~0, # FIL_PAGE_PREV, FIL_PAGE_NEXT + 17855, # FIL_PAGE_TYPE == FIL_PAGE_INDEX + 2, # PAGE_N_DIR_SLOTS + 124, # PAGE_HEAP_TOP + 3); # PAGE_INDEX_ID == DICT_INDEXES_ID + +print OUT pack("nxnn", 0x801, 3, 116), "infimum"; +print OUT pack("xnxnxx", 0x901, 0x803), "supremum"; +print OUT pack("x[16248]nnNx[4]", 116, 101, 0xdeadbeef); +print OUT chr(0) x (759 * 16384); +close OUT or die; + +# Create a dummy second redo log file +die unless open OUT, ">", "$ENV{bugdir}/ib_logfile1"; +binmode OUT; +print OUT chr(0) x 1048576; +close OUT or die; + +# Create a redo log from before MariaDB 10.2.2/MySQL 5.7.9 +die unless open OUT, ">", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +print OUT pack("x[9]nx[5]", 0x1286), " ", chr(0) x 492; +print OUT pack("x[13]nCNnxxNNx[256]", 0x1286, 12, 0x80c, 0xf0, ~0, ~0); +print OUT pack("H*x[1240]", "590DBAACFE922582"); +print OUT pack("H*x[5]", "800009440022000c0000000138"); +print OUT pack("H*x[475]H*", "12860cb7809781e80006626f677573", "089C0ADA"); +print OUT chr(0) x 1046016; +close OUT or die; +EOF + +--echo # redo log from before MariaDB 10.2.2/MySQL 5.7.9 +--let $restart_parameters= $dirs +--source include/restart_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc + +let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\\.2\\.2\\.; +--source include/search_pattern_in_file.inc + +--echo # redo log from before MariaDB 10.2.2, with corrupted log checkpoint +--move_file $bugdir/ib_logfile0 $bugdir/ib_logfile +--copy_file $bugdir/ib_logfile1 $bugdir/ib_logfile0 +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc + +let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\\.2\\.2, and we did not find a valid checkpoint; +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN=Plugin 'InnoDB' registration as a STORAGE ENGINE failed; +--source include/search_pattern_in_file.inc + +--echo # redo log from before MariaDB 10.2.2, with corrupted log block +--remove_file $bugdir/ib_logfile0 +--move_file $bugdir/ib_logfile $bugdir/ib_logfile0 +perl; +die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +die unless seek(OUT, 0x800, 0); +print OUT pack("Nx[508]", 0xc0deba5e); +close OUT or die; +EOF + +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\\.2\\.2, and it appears corrupted; +--source include/search_pattern_in_file.inc + +--echo # redo log from "after" MariaDB 10.2.2, but with invalid header checksum +perl; +die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +print OUT pack("N",2); +close OUT or die; +EOF +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=InnoDB: Invalid redo log header checksum; +--source include/search_pattern_in_file.inc + +--echo # distant future redo log format, with valid header checksum +perl; +die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +print OUT pack("Nx[5]nx[5]", ~0, 0x1286); +print OUT "malicious intentions, or perhaps not"; +print OUT pack("x[456]N", 0x8a1bb475); +close OUT or die; +EOF +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=InnoDB: Unsupported redo log format. The redo log was created with malicious intentions, or perhaps\. Please follow the instructions at http://dev.mysql.com/doc/refman/5.7/en/upgrading-downgrading.html; +--source include/search_pattern_in_file.inc + +--echo # valid header, but old-format checkpoint blocks +perl; +die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +# header block +print OUT pack("Nx[5]nx[5]", 1, 0x1286); +print OUT "malicious intentions, or perhaps not"; +print OUT pack("x[456]N", 0xd42d53a2); +# old-format checkpoint block 1 +print OUT pack("x[13]nCNnxxNNx[256]", 0x1286, 12, 0x80c, 0xf0, ~0, ~0); +print OUT pack("H*x[1240]", "590DBAACFE922582"); +print OUT pack("H*x[5]", "800009440022000c0000000138"); +print OUT pack("H*x[475]H*", "12860cb7809781e80006626f677573", "089C0ADA"); +close OUT or die; +EOF +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=InnoDB: No valid checkpoint found .corrupted redo log; +--source include/search_pattern_in_file.inc + +--echo # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum +perl; +die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +die unless seek(OUT, 0x210, 0); +print OUT pack("NNx[264]", 0, 0x80c); +print OUT pack("NNx[212]N", 0x590dbaac, 0xfe922582, 0xc72d49c4); +close OUT or die; +EOF +# Anything below innodb_force_recovery=6 must find a valid redo log. +# Missing tablespace files are tolerated already with innodb_force_recovery=1. +--let $restart_parameters= $dirs --innodb-force-recovery=5 +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 3362026715 found: 144444122; +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN=InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\.; +--source include/search_pattern_in_file.inc +--echo # --innodb-force-recovery=6 (skip the entire redo log) +--let $restart_parameters= $dirs --innodb-force-recovery=6 +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +--let SEARCH_PATTERN=\\[Note\\] InnoDB: .* started; log sequence number 0 +--source include/search_pattern_in_file.inc + +--echo # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number +perl; +die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +# header block +print OUT pack("Nx[5]nx[5]", 1, 0x1286); +print OUT "malicious intentions, or perhaps not"; +print OUT pack("x[456]N", 0xd42d53a2); +# checkpoint page 1 and all-zero checkpoint 2 +print OUT pack("x[13]nCNNx[264]", 0x1286, 12, 0, 0x80c); +print OUT pack("H*x[212]Nx[1024]", "590DBAACFE922582", 0xc72d49c4); +# redo log data +print OUT pack("H*x[5]", "C0DEBA5E0022000c0000000138"); +print OUT pack("H*x[475]H*", "12860cb7809781e80006626f677573", "089C0ADA"); +EOF +--copy_file $bugdir/ib_logfile0 $bugdir/ib_logfile +# Anything below innodb_force_recovery=6 must find an invalid redo log. +# Missing tablespace files are tolerated already with innodb_force_recovery=1. +--let $restart_parameters= $dirs --innodb-force-recovery=5 +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +--echo # --innodb-force-recovery=6 (skip the entire redo log) +--let $restart_parameters= $dirs --innodb-force-recovery=6 +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc + +--echo # Test a corrupted MLOG_FILE_NAME record. +--echo # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2 +--remove_file $bugdir/ib_logfile0 +--move_file $bugdir/ib_logfile $bugdir/ib_logfile0 +perl; +die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +die unless seek(OUT, 0x800, 0); +print OUT pack("N", 0x80000944); +die unless seek(OUT, 0x9fc, 0); +print OUT pack("N", 0xc86474db); +close OUT or die; +EOF +--let $restart_parameters= $dirs +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=InnoDB: Starting crash recovery from checkpoint LSN=1213964; +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN=InnoDB: MLOG_FILE_NAME incorrect:bogus; +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN=InnoDB: ############### CORRUPT LOG RECORD FOUND ##################; +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN=InnoDB: Log record type 55, page 151:488\. Log parsing proceeded successfully up to 1213973\. Previous log record type 56, is multi 0 Recv offset 9, prev 0; +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN= len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8 bogus ; +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN=InnoDB: Set innodb_force_recovery to ignore this error; +--source include/search_pattern_in_file.inc + +--echo # Test a corrupted MLOG_FILE_NAME record. +--echo # valid header, invalid checkpoint 1, valid checkpoint 2, invalid block +perl; +die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +# header block +print OUT pack("Nx[5]nx[5]", 1, 0x1286); +print OUT "ibbackup was here!!!1!"; +print OUT pack("x[470]N", 0x52b54540); +# invalid (all-zero) checkpoint page 1 and an empty log page +print OUT chr(0) x 1024; +# valid checkpoint block 2 +print OUT pack("x[13]nCNNx[264]", 0x1286, 12, 0, 0x80c); +print OUT pack("H*x[212]N", "590DBAACFE922582", 0xc72d49c4); +# log page +print OUT pack("H*", "800009440022000c00000001"); +# MLOG_CHECKPOINT record +print OUT pack("H*", "38000000000012860c"); +# MLOG_FILE_NAME record +print OUT pack("H*", "b7809781e80006"), "bigot"; +# padding and wrong log block checksum +print OUT pack("x[475]N", 150151); +close OUT or die; +EOF +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=InnoDB: Invalid log block checksum. block: 2372 checkpoint no: 1 expected: 2454333373 found: 150151; +--source include/search_pattern_in_file.inc +--echo # valid header, invalid checkpoint 1, valid checkpoint 2, invalid log record +perl; +die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +die unless seek(OUT, 0x9fc, 0); +print OUT pack("N", 2454333373); +close OUT or die; +EOF + +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=InnoDB: MLOG_FILE_NAME incorrect:bigot; +--source include/search_pattern_in_file.inc +--let SEARCH_PATTERN= len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ; +--source include/search_pattern_in_file.inc + +--echo # missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT +perl; +die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +# header block +print OUT pack("Nx[5]nx[5]", 1, 0x1286); +print OUT "ibbackup was here!!!1!"; +print OUT pack("x[470]N", 0x52b54540); +# invalid (all-zero) checkpoint page 1 and an empty log page +print OUT chr(0) x 1024; +# valid checkpoint block 2 +print OUT pack("x[12]NNNx[264]", 0x12860c, 0, 0x80c); +# pointer to the MLOG_CHECKPOINT record, and checkpoint page checksum +print OUT pack("H*x[204]NNN", "590DBAACFE922582", 0x128612, 0, 0x101741b); +# log page +print OUT pack("H*", "800009440022000c00000001"); +# MLOG_1BYTE record for missing tablespace 42 page 123 +print OUT pack("CCCnC", 128 | 1, 42, 123, 4567, 89); +# MLOG_CHECKPOINT record +print OUT pack("CNN", 56, 0, 0x12860c); +# padding (MLOG_DUMMY_RECORD) and block checksum +print OUT " " x 481, pack("N", 0x644e6db8); +close OUT or die; +EOF + +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +--let SEARCH_PATTERN= InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42\$ +--source include/search_pattern_in_file.inc + +--echo # Minimal MariaDB 10.1.21 encrypted redo log +perl; +die unless open OUT, "+<", "$ENV{bugdir}/ib_logfile0"; +binmode OUT; +# header and empty checkpoint page 1 (not encrypted) +print OUT pack("x[9]nx[5]A[4]x[46]Cx[1469]", 0x186e, "", 2); +# checkpoint page 2 (not encrypted) +print OUT pack("NNNNNNNN", 0, 1, 0, 0x186e16, 0x816, 0x1000000, ~0, ~0); +print OUT pack("x[6]Cx[249]", 0x20); +print OUT pack("H*x[12]nNNn", "FDE012DE6D3BD6AC", 0x201, 1, 1, 0xEFC); +print OUT pack("H*x[162]", + "75774015174BE4723904C88E110E3B50FF5C634167DB058D02A415D2A4A3"); +# log block (encrypted) +print OUT pack("H*", "80000c380016000c000000015cf22e8aff355642045605c22b97f7cba94cc9932b6032b9c828ef85269024127d3863193b44e52d22eccdd0a8b197ce837f6b530c3042a022738bbac803adc5e7607333409b35c1f6351601a9da83d9b0bc3f389fb288d2bd6a0783066e3b07cae0e276fe83aa522d3f2b59b9549e2338031674383bbef87d7a42f415870fa33685afd3894a9d8214d60b5cde0c776489f45ad0c759e0495bc5d0c91018750070ed21ec1a41bcb9054007851df28e1da15fb662ab219bd558f1569b22671c943bfb0c12e97b604feb0d96a53c05c868e2eea9d4692cd0b6f4625a52adc8251ac955957e33d8c32eb964e416b246b950321a71d5b2e8e95c26e00333abe24ca827cd2eb95cff7b21dce639073f526614816fa2151afdb967aa049b4625cd70881fbd73827c1eb6f70447dcb7755055fa939a2c8ec38fc24f135c22f9f9691bd34a91be7047e5fd68d2e68b0d072cb69c253e14c7111b950b9d6df327f3ffb2a0dc6eff045d64baeb3c75c4ae4aeb41235757f40291540148d79deaff983851247134d7513a550ed7e21bf2e209d8dec51b252f0e9ba6fa33cc2ad0b28d05c04442dac9d233d0ca93d8ef0b81ba82e7396ffaec979b2df97f7249a20d8cb8036b582c245f27e64ac12c8b1d46248b670936893c7c737ba8a4ecf623689c18d79755865626993a43d607611d0736d1c626ebf88946"); +close OUT or die; +EOF + +--let $restart_parameters= $dirs --innodb-force-recovery=5 +--source include/start_mysqld.inc +if (!$no_cleanup) { +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +--let SEARCH_PATTERN= InnoDB: Obtaining redo log encryption key version 1 failed +--source include/search_pattern_in_file.inc +--let SEARCH_PATTERN= InnoDB: Decrypting checkpoint failed +--source include/search_pattern_in_file.inc + +--list_files $bugdir +--remove_files_wildcard $bugdir +--rmdir $bugdir +--let $restart_parameters= +--source include/start_mysqld.inc +} diff --git a/mysql-test/suite/innodb/t/log_data_file_size.test b/mysql-test/suite/innodb/t/log_data_file_size.test index 0f40474e09b..56a9d35bd92 100644 --- a/mysql-test/suite/innodb/t/log_data_file_size.test +++ b/mysql-test/suite/innodb/t/log_data_file_size.test @@ -22,7 +22,7 @@ perl; use Fcntl 'SEEK_CUR', 'SEEK_END'; my $page_size = $ENV{'INNODB_PAGE_SIZE'}; -my $restart = 'restart'; +my $restart; if ($ENV{'MYSQLD_IS_DEBUG'}) { # It is impractical to ensure that CREATE TABLE t will extend ibdata1. @@ -36,17 +36,14 @@ if ($ENV{'MYSQLD_IS_DEBUG'}) while() { unless (/\0*/gso) { $empty_tail= 0; last } } if ($empty_tail) { - $restart = 'restart: --innodb-data-file-size-debug=' . $size; + $restart = "--innodb-data-file-size-debug=$size"; truncate(FILE, $page_size * $root); } close FILE; } open(FILE, ">$ENV{MYSQLTEST_VARDIR}/log/start_mysqld.txt") || die; -print FILE '--exec echo "', $restart, '" > $_expect_file_name ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect -'; +print FILE "--let \$restart_parameters=$restart\n" if $restart; +print FILE "--source include/start_mysqld.inc\n"; close FILE; open(FILE, "+<", "$ENV{'MYSQLD_DATADIR'}test/ibd4.ibd") or die; truncate(FILE, $page_size * 4); diff --git a/mysql-test/suite/innodb/t/log_file.test b/mysql-test/suite/innodb/t/log_file.test new file mode 100644 index 00000000000..c50257a69be --- /dev/null +++ b/mysql-test/suite/innodb/t/log_file.test @@ -0,0 +1,231 @@ +--echo # Testcase for the following bugs +--echo # Bug#16691130 - ASSERT WHEN INNODB_LOG_GROUP_HOME_DIR DOES NOT EXIST +--echo # Bug#16418661 - CHANGING NAME IN FOR INNODB_DATA_FILE_PATH SHOULD NOT SUCCEED WITH LOG FILES + +--source include/have_innodb.inc + +--disable_query_log +call mtr.add_suppression("InnoDB: Could not create undo tablespace.*undo002"); +call mtr.add_suppression("InnoDB: InnoDB Database creation was aborted"); +call mtr.add_suppression("Plugin 'InnoDB' init function returned error"); +call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); +call mtr.add_suppression("InnoDB: Operating system error number \d+ in a file operation"); +call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified"); +call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself"); +call mtr.add_suppression("InnoDB: File .path.to.non-existent.ib_logfile101: 'create' returned OS error \d+"); +call mtr.add_suppression("InnoDB: Cannot create .path.to.non-existent.ib_logfile101"); +call mtr.add_suppression("InnoDB: The innodb_system data file 'ibdata1' was not found but one of the other data files 'ibdata2' exists"); +call mtr.add_suppression("InnoDB: Tablespace size stored in header is \d+ pages, but the sum of data file sizes is \d+ pages"); +call mtr.add_suppression("InnoDB: Cannot start InnoDB. The tail of the system tablespace is missing"); +call mtr.add_suppression("InnoDB: undo tablespace '.*undo001' exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\."); +call mtr.add_suppression(""); +call mtr.add_suppression(""); +--enable_query_log + +let bugdir= $MYSQLTEST_VARDIR/tmp/log_file; +--mkdir $bugdir + +let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; +let SEARCH_RANGE = -100000; +let $check_no_innodb=SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); + +let $check_yes_innodb=SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES +WHERE engine='innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); + +--let $ibp=--innodb-log-files-in-group=3 --innodb-log-group-home-dir=$bugdir +--let $ibp=$ibp --innodb-data-home-dir=$bugdir --innodb-undo-directory=$bugdir +--let $ibp=$ibp --innodb-undo-logs=20 --innodb-undo-tablespaces=3 +--let $ibp=$ibp --innodb-data-file-path=ibdata1:16M;ibdata2:10M:autoextend + +--echo # Start mysqld without the possibility to create innodb_undo_tablespaces +--let $restart_parameters= $ibp --innodb-undo-tablespaces=3 +--mkdir $bugdir/undo002 +--source include/restart_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc + +let SEARCH_PATTERN=\[ERROR\] InnoDB: Could not create undo tablespace '.*undo002'; +--source include/search_pattern_in_file.inc + +--echo # Remove undo001,undo002,ibdata1,ibdata2,ib_logfile1,ib_logfile2,ib_logfile101 +--remove_file $bugdir/undo001 +--rmdir $bugdir/undo002 +--remove_file $bugdir/ibdata1 +--remove_file $bugdir/ibdata2 +--remove_file $bugdir/ib_logfile1 +--remove_file $bugdir/ib_logfile2 +--remove_file $bugdir/ib_logfile101 +--list_files $bugdir + +--echo # Start mysqld with non existent innodb_log_group_home_dir +--let $restart_parameters= $ibp --innodb_log_group_home_dir=/path/to/non-existent/ +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+; +--source include/search_pattern_in_file.inc + +--echo # Remove ibdata1 & ibdata2 +--remove_file $bugdir/ibdata1 +--remove_file $bugdir/ibdata2 +--list_files $bugdir + +--echo # Successfully let InnoDB create tablespaces +--let $restart_parameters= $ibp +--source include/start_mysqld.inc +eval $check_yes_innodb; +--source include/shutdown_mysqld.inc + +--echo # Backup tmp/logfile/* +--copy_file $bugdir/ibdata1 $bugdir/bak_ibdata1 +--copy_file $bugdir/ibdata2 $bugdir/bak_ibdata2 +--copy_file $bugdir/ib_logfile0 $bugdir/bak_ib_logfile0 +--copy_file $bugdir/ib_logfile1 $bugdir/bak_ib_logfile1 +--copy_file $bugdir/ib_logfile2 $bugdir/bak_ib_logfile2 +--copy_file $bugdir/undo001 $bugdir/bak_undo001 +--copy_file $bugdir/undo002 $bugdir/bak_undo002 +--copy_file $bugdir/undo003 $bugdir/bak_undo003 + +--echo # 1. With ibdata2, Without ibdata1 +--remove_file $bugdir/ibdata1 + +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=The innodb_system data file 'ibdata1' was not found but one of the other data files 'ibdata2' exists; +--source include/search_pattern_in_file.inc + +# clean up & Restore +--source ../include/log_file_cleanup.inc + +--echo # 2. With ibdata1, without ibdata2 +--remove_file $bugdir/ibdata2 +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=InnoDB: Tablespace size stored in header is \d+ pages, but the sum of data file sizes is \d+ pages; +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN=InnoDB: Cannot start InnoDB. The tail of the system tablespace is missing; +--source include/search_pattern_in_file.inc + +# clean up & Restore +--source ../include/log_file_cleanup.inc + +--echo # 3. Without ibdata1 & ibdata2 +--remove_file $bugdir/ibdata1 +--remove_file $bugdir/ibdata2 +--list_files $bugdir +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=InnoDB: undo tablespace .*undo001.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\.; +--source include/search_pattern_in_file.inc + +# clean up & Restore +--source ../include/log_file_cleanup.inc + +--echo # 4. Without ibdata*, ib_logfile* and with undo00* +--remove_files_wildcard $bugdir ibdata* +--remove_files_wildcard $bugdir ib_logfile* +--list_files $bugdir +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc + +# clean up & Restore +--source ../include/log_file_cleanup.inc + +--echo # 5. Without ibdata*,ib_logfile* files & Without undo002 +--remove_files_wildcard $bugdir ibdata* +--remove_files_wildcard $bugdir ib_logfile* +--remove_file $bugdir/undo002 +--list_files $bugdir +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc + +# clean up & Restore +--source ../include/log_file_cleanup.inc + +--echo # 6. Without ibdata*,ib_logfile* files & Without undo001, undo002 +# and with undo003 +--remove_files_wildcard $bugdir ibdata* +--remove_files_wildcard $bugdir ib_logfile* +--remove_file $bugdir/undo001 +--remove_file $bugdir/undo002 +--list_files $bugdir +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=undo tablespace .*undo003.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\.; +--source include/search_pattern_in_file.inc + +# clean up & Restore +--source ../include/log_file_cleanup.inc + +--echo # 7. With ibdata files & Without undo002 +--remove_file $bugdir/undo002 +--list_files $bugdir +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=Expected to open 3 undo tablespaces but was able to find only 1 undo tablespaces; +--source include/search_pattern_in_file.inc +# clean up & Restore +--source ../include/log_file_cleanup.inc + +--echo # 8. With ibdata files & Without undo001, undo002 +--remove_file $bugdir/undo001 +--remove_file $bugdir/undo002 +--list_files $bugdir +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=Expected to open 3 undo tablespaces but was able to find only 0 undo tablespaces; +--source include/search_pattern_in_file.inc + +# clean up & Restore +--source ../include/log_file_cleanup.inc + +--echo # 9. Without ibdata*, without undo*, Without ib_logfile1 and with ib_logfile2 +--remove_files_wildcard $bugdir ibdata* +--remove_files_wildcard $bugdir undo00* +--remove_file $bugdir/ib_logfile1 +--list_files $bugdir +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=redo log file .*ib_logfile0.* exists\. Creating system tablespace with existing redo log files is not recommended\. Please delete all redo log files before creating new system tablespace\.; +--source include/search_pattern_in_file.inc + +# clean up & Restore +--source ../include/log_file_cleanup.inc + +--echo # 10. With ibdata*, without ib_logfile0 +--remove_file $bugdir/ib_logfile0 + +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc + +--source ../include/log_file_cleanup.inc + +--echo # 11. With ibdata*, without ib_logfile1 +--remove_file $bugdir/ib_logfile1 +--list_files $bugdir +--source include/start_mysqld.inc +eval $check_yes_innodb; +--source include/shutdown_mysqld.inc +--let SEARCH_PATTERN=Resizing redo log from 1\*\d+ to 3\*\d+ pages; LSN=\d+ +--source include/search_pattern_in_file.inc + +--let $restart_parameters= +--source include/start_mysqld.inc + +--echo # Cleanup +--list_files $bugdir +--remove_files_wildcard $bugdir +--rmdir $bugdir diff --git a/mysql-test/suite/innodb/t/log_file_name.test b/mysql-test/suite/innodb/t/log_file_name.test new file mode 100644 index 00000000000..e528abc80d5 --- /dev/null +++ b/mysql-test/suite/innodb/t/log_file_name.test @@ -0,0 +1,273 @@ +# WL#7142 InnoDB: Simplify tablespace discovery during crash recovery +# Test the detection of duplicate tablespaces. + +--source include/have_innodb.inc + +# Embedded server does not support crashing +--source include/not_embedded.inc + +SET GLOBAL innodb_file_per_table=ON; + +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; + +--source include/no_checkpoint_start.inc +CREATE TABLE t3(a INT PRIMARY KEY) ENGINE=InnoDB; + +BEGIN; +INSERT INTO t3 VALUES (33101),(347); +INSERT INTO t1 VALUES (42),(9),(101); +RENAME TABLE t1 TO t2; +UPDATE t2 SET a=347 where a=42; +COMMIT; + +--let CLEANUP_IF_CHECKPOINT=DROP TABLE t2,t3; +--source include/no_checkpoint_end.inc + +--echo # Fault 0 (no real fault): Orphan file with duplicate space_id. +--copy_file $MYSQLD_DATADIR/test/t2.ibd $MYSQLD_DATADIR/test/t0.ibd + +--echo # Fault 1: Two dirty files with the same space_id. +--copy_file $MYSQLD_DATADIR/test/t2.ibd $MYSQLD_DATADIR/test/t1.ibd + +let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; +let SEARCH_RANGE= -50000; +let $check_no_innodb=SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); + +# This could fail to refuse InnoDB startup, in case there was a log +# checkpoint after the INSERT. That is what we checked above. +--source include/start_mysqld.inc +eval $check_no_innodb; +let SEARCH_PATTERN= InnoDB: Ignoring data file '.*t2.ibd' with space ID \d+. Another data file called .*t1.ibd exists with the same space ID; +--source include/search_pattern_in_file.inc + +--source include/shutdown_mysqld.inc + +--remove_file $MYSQLD_DATADIR/test/t1.ibd + +# This could fail to refuse InnoDB startup, in case there was a log +# checkpoint after the CREATE TABLE t3. That is what we checked above. +--echo # Fault 2: Wrong space_id in a dirty file, and a missing file. +--move_file $MYSQLD_DATADIR/test/t3.ibd $MYSQLD_DATADIR/test/t1.ibd + +--source include/start_mysqld.inc +eval $check_no_innodb; + +let SEARCH_PATTERN= InnoDB: Ignoring data file '.*t1.ibd' with space ID; +--source include/search_pattern_in_file.inc + +let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at.*t3.ibd; +--source include/search_pattern_in_file.inc + +--source include/shutdown_mysqld.inc + +--move_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t3.ibd + +--echo # Fault 3: Wrong space_id in a dirty file, and no missing file. +# Swap t2.ibd and t3.ibd. +--move_file $MYSQLD_DATADIR/test/t3.ibd $MYSQLD_DATADIR/test/t.ibd +--move_file $MYSQLD_DATADIR/test/t2.ibd $MYSQLD_DATADIR/test/t3.ibd +--move_file $MYSQLD_DATADIR/test/t.ibd $MYSQLD_DATADIR/test/t2.ibd + +--source include/start_mysqld.inc +eval $check_no_innodb; + +let SEARCH_PATTERN= InnoDB: Ignoring data file '.*t[23].ibd' with space ID; +--source include/search_pattern_in_file.inc + +let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at .*t1.ibd; +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at .*t3.ibd; +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN= InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace; +--source include/search_pattern_in_file.inc + +--source include/shutdown_mysqld.inc + +# Swap back t3.ibd, but hide t2.ibd (which the redo log also knows as t1.ibd). +--move_file $MYSQLD_DATADIR/test/t3.ibd $MYSQLD_DATADIR/test/t.ibd +--move_file $MYSQLD_DATADIR/test/t2.ibd $MYSQLD_DATADIR/test/t3.ibd + +--echo # Fault 4: Missing data file + +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc + +let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at .*t[12].ibd. +.*InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace; +--source include/search_pattern_in_file.inc + +--echo # Fault 5: Wrong type of data file + +--mkdir $MYSQLD_DATADIR/test/t2.ibd + +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc +# On Windows, this error message is not output when t2.ibd is a directory! +#let SEARCH_PATTERN= \[ERROR\] InnoDB: Cannot read first page of .*t2.ibd; +#--source include/search_pattern_in_file.inc + +--rmdir $MYSQLD_DATADIR/test/t2.ibd + +# Create a short file. +--write_file $MYSQLD_DATADIR/test/t2.ibd +EOF + +--source include/start_mysqld.inc +eval $check_no_innodb; +--source include/shutdown_mysqld.inc + +let SEARCH_PATTERN= \[ERROR\] InnoDB: Cannot read first page of .*t2.ibd; +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN= \[ERROR\] InnoDB: Datafile .*t2.*\. Cannot determine the space ID from the first 64 pages; +--source include/search_pattern_in_file.inc + +# Restore t2.ibd +--remove_file $MYSQLD_DATADIR/test/t2.ibd +--move_file $MYSQLD_DATADIR/test/t.ibd $MYSQLD_DATADIR/test/t2.ibd + +--source include/start_mysqld.inc + +SELECT * FROM t2; +SELECT * FROM t3; +SHOW TABLES; +DROP TABLE t2,t3; + +--error ER_TABLESPACE_EXISTS +CREATE TABLE t0(a INT PRIMARY KEY) ENGINE=InnoDB; + +# Remove the orphan file from fault 0. +--remove_file $MYSQLD_DATADIR/test/t0.ibd + +CREATE TABLE t0(a INT PRIMARY KEY) ENGINE=InnoDB; +DROP TABLE t0; + +--disable_query_log +# The following are for the orphan file t0.ibd or for the directory t2.ibd: +call mtr.add_suppression("InnoDB: Operating system error number [0-9]* in a file operation"); +call mtr.add_suppression("InnoDB: Error number [0-9]* means '(File exists|Is a directory)'"); +call mtr.add_suppression("InnoDB: Cannot create file '.*t0.ibd'"); +call mtr.add_suppression("InnoDB: The file '.*t0\.ibd' already exists"); +call mtr.add_suppression("InnoDB: Cannot open datafile for read-write: '.*t2\.ibd'"); +# The following are for aborted startup without --innodb-force-recovery: +call mtr.add_suppression("InnoDB: Tablespace .* was not found at .*test"); +call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace"); +call mtr.add_suppression("InnoDB: Cannot read first page of '.*test.[tu]2.ibd' I/O error"); +call mtr.add_suppression("InnoDB: Cannot read first page in datafile: .*test.*ibd"); +call mtr.add_suppression("InnoDB: Datafile '.*test.*ibd' is corrupted"); +call mtr.add_suppression("InnoDB: Cannot replay file rename. Remove either file and try again"); +call mtr.add_suppression("InnoDB: Cannot rename.*because the target file exists"); +call mtr.add_suppression("InnoDB: Log scan aborted at LSN"); +# The following are for the --innodb-force-recovery=1 with broken u* tables: +call mtr.add_suppression("InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd"); +call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified"); +call mtr.add_suppression("InnoDB: .*you must create directories"); +call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: '.*u[1-5]\.ibd'"); +call mtr.add_suppression("InnoDB: Could not find a valid tablespace file for `test/u[1-5]`"); +call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`.`u[1-3]` because it could not be opened."); +call mtr.add_suppression("InnoDB: Failed to find tablespace for table .* in the cache. Attempting to load the tablespace with space id"); +call mtr.add_suppression("InnoDB: Plugin initialization aborted"); +call mtr.add_suppression("Plugin 'InnoDB' \(init function returned error\|registration as a STORAGE ENGINE failed\)"); +FLUSH TABLES; +--enable_query_log + +--source include/no_checkpoint_start.inc + +CREATE TABLE u1(a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE u2(a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE u3(a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE u4(a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO u4 VALUES(1); +RENAME TABLE u4 TO u5; +RENAME TABLE u5 TO u6; +INSERT INTO u6 VALUES(2); + +--let CLEANUP_IF_CHECKPOINT=DROP TABLE u1,u2,u3,u6; +--source include/no_checkpoint_end.inc + +--echo # Fault 6: All-zero data file and innodb_force_recovery + +--remove_file $MYSQLD_DATADIR/test/u1.ibd +--remove_file $MYSQLD_DATADIR/test/u2.ibd +--remove_file $MYSQLD_DATADIR/test/u3.ibd + +# InnoDB: Header page consists of zero bytes +--perl +die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/test/u1.ibd"); +print FILE "\0" x 16384; +close(FILE); +EOF + +--exec echo "" > $MYSQLD_DATADIR/test/u2.ibd + +# TODO: Test with this, once +# Bug#18131883 IMPROVE INNODB ERROR MESSAGES REGARDING FILES +# has been fixed: +#--mkdir $MYSQLD_DATADIR/test/u3.ibd + +--copy_file $MYSQLD_DATADIR/test/u6.ibd $MYSQLD_DATADIR/test/u4.ibd + +--let $restart_parameters= --innodb-force-recovery=1 +--source include/start_mysqld.inc +eval $check_no_innodb; + +let SEARCH_PATTERN= \[ERROR\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd; +--source include/search_pattern_in_file.inc + +let SEARCH_PATTERN= \[ERROR\] InnoDB: Datafile .*u1.*\. Cannot determine the space ID from the first 64 pages; +--source include/search_pattern_in_file.inc + +# TODO: These errors should state the file name (u2.ibd) and be ignored +# in innodb-force-recovery mode once +# Bug#18131883 IMPROVE INNODB ERROR MESSAGES REGARDING FILES +# has been fixed: +let SEARCH_PATTERN= \[ERROR\] InnoDB: Cannot read first page of .*u2.ibd; +--source include/search_pattern_in_file.inc + +--source include/shutdown_mysqld.inc + +# Allow --innodb-force-recovery to start despite the broken file. +# TODO: Remove this workaround, and make --innodb-force-recovery=1 +# ignore the broken file. +--remove_file $MYSQLD_DATADIR/test/u2.ibd + +--echo # Fault 7: Missing or wrong data file and innodb_force_recovery + +--source include/start_mysqld.inc +eval $check_no_innodb; + +let SEARCH_PATTERN= \[ERROR\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd; +--source include/search_pattern_in_file.inc + +let SEARCH_PATTERN= InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace; +--source include/search_pattern_in_file.inc + +let SEARCH_PATTERN= \[ERROR\] InnoDB: Cannot rename '.*u5.ibd' to '.*u6.ibd' for space ID \d+ because the target file exists; +--source include/search_pattern_in_file.inc + +--remove_file $MYSQLD_DATADIR/test/u6.ibd + +--source include/restart_mysqld.inc + +let SEARCH_PATTERN= \[ERROR\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd; +--source include/search_pattern_in_file.inc + +let SEARCH_PATTERN= InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace; +--source include/search_pattern_in_file.inc + +let SEARCH_PATTERN= \[Warning\] InnoDB: Tablespace \d+ was not found at .*u[1-5].ibd, and innodb_force_recovery was set. All redo log for this tablespace will be ignored!; +--source include/search_pattern_in_file.inc + +--let $restart_parameters= +--source include/restart_mysqld.inc + +DROP TABLE u1,u2,u3,u6; + +--remove_file $MYSQLD_DATADIR/test/u1.ibd +--echo # List of files: +--list_files $MYSQLD_DATADIR/test + +SHOW TABLES; diff --git a/mysql-test/suite/innodb/t/log_file_name_debug.test b/mysql-test/suite/innodb/t/log_file_name_debug.test new file mode 100644 index 00000000000..44012d38c8e --- /dev/null +++ b/mysql-test/suite/innodb/t/log_file_name_debug.test @@ -0,0 +1,49 @@ +--source include/have_innodb.inc +# Embedded server does not support restarting +--source include/not_embedded.inc +--source include/have_debug.inc + +--echo # +--echo # Bug#19685095 DO NOT CARE ABOUT UNRESOLVED MLOG_FILE_NAME +--echo # IF THERE ARE NO OPERATIONS TO APPLY +--echo # + +SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus'; +--disable_query_log +call mtr.add_suppression("InnoDB: Plugin initialization aborted"); +call mtr.add_suppression("Plugin 'InnoDB' init function returned error"); +call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); +FLUSH TABLES; +--enable_query_log + +--let $n_logs=`SELECT if(@@innodb_log_files_in_group = 1, 2, 1)` +--let $resize= --innodb-log-files-in-group=$n_logs --innodb-log-file-size=4M + +--source include/no_checkpoint_start.inc + +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; + +--let CLEANUP_IF_CHECKPOINT=DROP TABLE t1; +--source include/no_checkpoint_end.inc + +--let $restart_parameters= --debug=d,innodb_log_abort_1 $resize +--source include/start_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; + +--let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err +--let SEARCH_RANGE = -50000 +--let SEARCH_PATTERN = InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either +--source include/search_pattern_in_file.inc + +--let $restart_parameters= --debug=d,innodb_log_abort_3,ib_log $resize +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; +--let SEARCH_PATTERN= srv_prepare_to_delete_redo_log_files: ib_log: MLOG_CHECKPOINT.* written +--source include/search_pattern_in_file.inc + +--let $restart_parameters= +--source include/restart_mysqld.inc +DROP TABLE t1; + diff --git a/mysql-test/suite/innodb/t/log_file_size.test b/mysql-test/suite/innodb/t/log_file_size.test new file mode 100644 index 00000000000..4705ca68091 --- /dev/null +++ b/mysql-test/suite/innodb/t/log_file_size.test @@ -0,0 +1,201 @@ +# Test resizing the InnoDB redo log. +--source include/have_innodb.inc +# Embedded server tests do not support restarting +--source include/not_embedded.inc +# DBUG_EXECUTE_IF is needed +--source include/have_debug.inc + +if (`SELECT @@innodb_log_file_size = 1048576`) { + --skip Test requires innodb_log_file_size>1M. +} + +--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("syntax error in innodb_log_group_home_dir"); +call mtr.add_suppression("Plugin 'InnoDB' init function returned error"); +call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); +call mtr.add_suppression("InnoDB: Plugin initialization aborted"); +call mtr.add_suppression("InnoDB: innodb_read_only prevents crash recovery"); +call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfiles"); +call mtr.add_suppression("InnoDB: Cannot create log files in read-only mode"); +call mtr.add_suppression("InnoDB: Only one log file found"); +call mtr.add_suppression("InnoDB: Log file .*ib_logfile[01].* size"); +call mtr.add_suppression("InnoDB: Unable to open .*ib_logfile0. to check native AIO read support"); +FLUSH TABLES; +--enable_query_log + +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB; +BEGIN; +INSERT INTO t1 VALUES (42); + +let $restart_parameters = --innodb-log-file-size=6M; +--source include/kill_and_restart_mysqld.inc + +SELECT * FROM t1; + +INSERT INTO t1 VALUES (42); +BEGIN; +DELETE FROM t1; + +let $restart_parameters = --innodb-log-files-in-group=3 --innodb-log-file-size=5M; +--source include/kill_and_restart_mysqld.inc + +SELECT * FROM t1; + +INSERT INTO t1 VALUES (0),(123); + +let MYSQLD_DATADIR= `select @@datadir`; +let SEARCH_ABORT = NOT FOUND; +let SEARCH_RANGE= -50000; +let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; + +BEGIN; +DELETE FROM t1 WHERE a>0; + +--echo # Persist the state of the above incomplete transaction by +--echo # causing a redo log write for another transaction. +--connect(con1, localhost, root) +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1 WHERE a=0; +--disconnect con1 +--connection default + +--source include/kill_mysqld.inc + +--let $restart_parameters= --innodb-log-group-home-dir=foo\;bar +--source include/start_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; +let SEARCH_PATTERN= syntax error in innodb_log_group_home_dir; +--source include/search_pattern_in_file.inc + +--let $restart_parameters= --debug=d,innodb_log_abort_1 +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; +let SEARCH_PATTERN= InnoDB: Starting crash recovery from checkpoint LSN=; +--source include/search_pattern_in_file.inc + +--let $restart_parameters= --debug=d,innodb_log_abort_3 +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; + +--let $restart_parameters= --innodb-read-only +--source include/restart_mysqld.inc + +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; +let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery; +--source include/search_pattern_in_file.inc + +--let $restart_parameters= --debug=d,innodb_log_abort_4 +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; +let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ pages; +--source include/search_pattern_in_file.inc + +--let $restart_parameters= --debug=d,innodb_log_abort_5 +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; +let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ pages; +--source include/search_pattern_in_file.inc + +--let $restart_parameters= --innodb-read-only +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; +let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery; +--source include/search_pattern_in_file.inc + +--let $restart_parameters= --debug=d,innodb_log_abort_6 +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; + +let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ pages; +--source include/search_pattern_in_file.inc + +--let $restart_parameters= --debug=d,innodb_log_abort_7 +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; + +# this aborts right after deleting all log files + +--let $restart_parameters= --innodb-read-only +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; + +let SEARCH_PATTERN= InnoDB: Cannot create log files in read-only mode; +--source include/search_pattern_in_file.inc + +--let $restart_parameters= --debug=d,innodb_log_abort_8 +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; + +let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to; +--source include/search_pattern_in_file.inc + +--let $restart_parameters= --debug=d,innodb_log_abort_9 +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; + +let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to; +--source include/search_pattern_in_file.inc +--source include/shutdown_mysqld.inc + +# We should have perfectly synced files here. +# Rename the log files, and trigger an error in recovery. +--move_file $MYSQLD_DATADIR/ib_logfile1 $MYSQLD_DATADIR/ib_logfile1_hidden + +perl; +die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/ib_logfile0"); +print FILE "garbage"; +close(FILE); +EOF + +--source include/start_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; +let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of innodb_page_size; +--source include/search_pattern_in_file.inc +--remove_file $MYSQLD_DATADIR/ib_logfile0 +--move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0 + +perl; +die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/ib_logfile1"); +print FILE "junkfill" x 131072; +close(FILE); +EOF + +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; + +let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files; +--source include/search_pattern_in_file.inc +--remove_file $MYSQLD_DATADIR/ib_logfile1 +--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101 +--move_file $MYSQLD_DATADIR/ib_logfile1_hidden $MYSQLD_DATADIR/ib_logfile1 + +--let $restart_parameters= --debug=d,innodb_log_abort_10 +--source include/restart_mysqld.inc +--error ER_UNKNOWN_STORAGE_ENGINE +SELECT * FROM t1; + +let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to; +--source include/search_pattern_in_file.inc +let SEARCH_PATTERN= InnoDB: Renaming log file .*ib_logfile101 to .*ib_logfile0; +--source include/search_pattern_in_file.inc + +--let $restart_parameters= +--source include/restart_mysqld.inc + +SELECT * FROM t1; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/mdev-117.test b/mysql-test/suite/innodb/t/mdev-117.test index 6b77a1f3379..991221b6f6f 100644 --- a/mysql-test/suite/innodb/t/mdev-117.test +++ b/mysql-test/suite/innodb/t/mdev-117.test @@ -28,3 +28,5 @@ DELETE FROM t1 WHERE col_int_key IN (1, 40000000); --disconnect con1 drop table t1; SET GLOBAL innodb_lock_wait_timeout=default; + +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); diff --git a/mysql-test/suite/sys_vars/t/innodb_monitor_disable_basic.test b/mysql-test/suite/innodb/t/monitor.test similarity index 84% rename from mysql-test/suite/sys_vars/t/innodb_monitor_disable_basic.test rename to mysql-test/suite/innodb/t/monitor.test index 1b23ae14e49..98aa4505e34 100644 --- a/mysql-test/suite/sys_vars/t/innodb_monitor_disable_basic.test +++ b/mysql-test/suite/innodb/t/monitor.test @@ -1,11 +1,13 @@ -# This is the test for Metrics Monitor Table feature. -# Test the metrics monitor system's control system -# and counter accuracy. +# This test used to be duplicated in the following: +# sys_vars.innodb_monitor_reset_basic +# sys_vars.innodb_monitor_reset_all_basic +# sys_vars.innodb_monitor_disable_basic +# sys_vars.innodb_monitor_enable_basic --source include/have_innodb.inc set global innodb_monitor_disable = All; # Test turn on/off the monitor counter with "all" option -# By default, they will be off +# By default, they will be off. select name, status from information_schema.innodb_metrics; # Turn on all monitor counters @@ -370,9 +372,66 @@ drop table monitor_test; set global innodb_monitor_disable = All; set global innodb_monitor_reset_all = all; +# Test for bug #13966091 +select 1 from `information_schema`.`INNODB_METRICS` +where case (1) when (1) then (AVG_COUNT_RESET) else (1) end; + -- 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 + +--echo # +--echo # Bug#22576241 SETTING INNODB_MONITOR_ENABLE TO ALL DOES NOT ENABLE ALL +--echo # MONITORS +--echo # +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; + +let $innodb_monitor_enable = `SELECT @@innodb_monitor_enable`; + +--replace_regex /[1-9]/NNNN/ +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; + +SET GLOBAL innodb_monitor_enable='module_buffer_page'; +INSERT INTO t1 VALUES (1), (2), (3), (4); FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +--replace_regex /[1-9]/NNNN/ +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; + +SET GLOBAL innodb_monitor_disable='module_buffer_page'; +SET GLOBAL innodb_monitor_reset_all='module_buffer_page'; +--replace_regex /[1-9]/NNNN/ +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; + +SET GLOBAL innodb_monitor_enable='%'; +INSERT INTO t1 VALUES (5), (6), (7), (8); FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +--replace_regex /[1-9]/NNNN/ +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; + +SET GLOBAL innodb_monitor_disable='%'; +SET GLOBAL innodb_monitor_reset_all='%'; +--replace_regex /[1-9]/NNNN/ +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; + +SET GLOBAL innodb_monitor_enable='ALL'; +INSERT INTO t1 VALUES (9), (10), (11), (12); FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +--replace_regex /[1-9]/NNNN/ +SELECT NAME, COUNT FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME +LIKE 'buffer_page_written_index_leaf'; + +--disable_warnings +SET GLOBAL innodb_monitor_enable=default; +SET GLOBAL innodb_monitor_disable=default; +SET GLOBAL innodb_monitor_reset_all=default; +--enable_warnings + +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/read_only_recovery.test b/mysql-test/suite/innodb/t/read_only_recovery.test new file mode 100644 index 00000000000..b111d96debe --- /dev/null +++ b/mysql-test/suite/innodb/t/read_only_recovery.test @@ -0,0 +1,39 @@ +--source include/have_innodb.inc +# need to restart server +--source include/not_embedded.inc + +--connect(con1, localhost, root) +CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB; +BEGIN; +# Generate insert_undo log. +INSERT INTO t VALUES(1),(2); +# Generate update_undo log. +DELETE FROM t WHERE a=2; +--connection default +--echo # Normal MariaDB shutdown would roll back the above transaction. +--echo # We want the transaction to remain open, so we will kill the server +--echo # after ensuring that any non-transactional files are clean. +FLUSH TABLES; +--echo # Ensure that the above incomplete transaction becomes durable. +SET GLOBAL innodb_flush_log_at_trx_commit=1; +BEGIN; +INSERT INTO t VALUES(0); +ROLLBACK; +--let $restart_parameters= --innodb-force-recovery=3 +--source include/kill_and_restart_mysqld.inc +--disconnect con1 +SELECT * FROM t; +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT * FROM t; +--let $restart_parameters= --innodb-read-only +--source include/restart_mysqld.inc +--echo # Starting with MariaDB 10.2, innodb_read_only implies READ UNCOMMITTED. +--echo # In earlier versions, this would return the last committed version +--echo # (empty table)! +SELECT * FROM t; +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT * FROM t; +--let $restart_parameters= +--source include/restart_mysqld.inc +SELECT * FROM t; +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/row_lock.test b/mysql-test/suite/innodb/t/row_lock.test index d9f9a7289c4..361bce461f7 100644 --- a/mysql-test/suite/innodb/t/row_lock.test +++ b/mysql-test/suite/innodb/t/row_lock.test @@ -45,3 +45,6 @@ commit; --disconnect con12 --disconnect con11 drop table t1,t2,t3,t4; + +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); +call mtr.add_suppression("Sort aborted.*"); diff --git a/mysql-test/suite/innodb_zip/t/wl6470_1.test b/mysql-test/suite/innodb/t/temp_table.test similarity index 74% rename from mysql-test/suite/innodb_zip/t/wl6470_1.test rename to mysql-test/suite/innodb/t/temp_table.test index ecf6b601d3d..4809f278fb6 100644 --- a/mysql-test/suite/innodb_zip/t/wl6470_1.test +++ b/mysql-test/suite/innodb/t/temp_table.test @@ -1,6 +1,4 @@ --source include/have_innodb.inc ---source include/have_innodb_zip.inc ---source include/big_test.inc #################################################################### # TC to test temp-table DML optimization changes for correctness # @@ -22,28 +20,29 @@ create temporary table t2 (keyc int, c1 char(100), c2 char(100), primary key(keyc), index sec_index(c1) ) engine = innodb; ---source suite/innodb_zip/include/innodb_dml_ops.inc -drop table t1; -drop table t2; +--source suite/innodb/include/dml_ops.inc +drop temporary table t1,t2; # ---disable_warnings +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE create temporary table t1 (keyc int, c1 char(100), c2 char(100), primary key(keyc), index sec_index(c1) ) engine = innodb key_block_size = 4; +create temporary table t1 + (keyc int, c1 char(100), c2 char(100), + primary key(keyc), index sec_index(c1) + ) engine = innodb; set innodb_strict_mode=off; +--disable_warnings create temporary table t2 (keyc int, c1 char(100), c2 char(100), primary key(keyc), index sec_index(c1) ) engine = innodb key_block_size = 8; -set innodb_strict_mode=default; +set innodb_strict_mode=on; --enable_warnings ---source suite/innodb_zip/include/innodb_dml_ops.inc -drop table t1; -drop table t2; +--source suite/innodb/include/dml_ops.inc +drop temporary table t1, t2; # -let $file_per_table = `select @@innodb_file_per_table`; -set global innodb_file_per_table = 0; create temporary table t1 (keyc int, c1 char(100), c2 char(100), primary key(keyc), index sec_index(c1) @@ -52,9 +51,4 @@ create temporary table t2 (keyc int, c1 char(100), c2 char(100), primary key(keyc), index sec_index(c1) ) engine = innodb; ---source suite/innodb_zip/include/innodb_dml_ops.inc -drop table t1; -drop table t2; -eval set global innodb_file_per_table = $file_per_table; -# - +--source suite/innodb/include/dml_ops.inc diff --git a/mysql-test/suite/innodb_zip/t/wl6470_2.test b/mysql-test/suite/innodb/t/temp_table_savepoint.test similarity index 64% rename from mysql-test/suite/innodb_zip/t/wl6470_2.test rename to mysql-test/suite/innodb/t/temp_table_savepoint.test index 020c27b97b9..c8a4bc870a7 100644 --- a/mysql-test/suite/innodb_zip/t/wl6470_2.test +++ b/mysql-test/suite/innodb/t/temp_table_savepoint.test @@ -1,11 +1,10 @@ --source include/have_innodb.inc ---source include/have_innodb_zip.inc --source include/no_valgrind_without_big.inc #################################################################### # TC to test temp-table DML optimization changes for correctness # # Sceanrio covered in single testcase : # -# - Tables with row format(redundant,compressed,dynamic,compact # +# - Tables with row format(redundant,dynamic,compact) # # - Table with primary,composite,prefix,secondary index # # - Insert/delete/update with transactioons # # - Transaction with commit,rollback,savepoint statements # @@ -14,37 +13,20 @@ # - Inserting data using # # - Insert into .. , Load data infile..,insert ignore # # - Insert into .. on duplicate update # -# - Check basic delete and upadte [ignore] # +# - Check basic delete and update [ignore] # # - Check constraints like duplicate key,default value # # - Alter add column , add primary key # # - with prepare and execute statement # #################################################################### -# run for page size >= 8k ---disable_warnings -if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value >= 8192`) -{ - --skip Test requires InnoDB with page size >= 8k. -} ---enable_warnings - - -# Save initial values of server variable ---disable_query_log -let $innodb_file_per_table_orig=`select @@innodb_file_per_table`; -SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; ---enable_query_log - -# Create procedure to perform +# Create procedure to perform # 1. Create temp table with row types , index , sufficent data types -# 2. Perform DML with transaction +# 2. Perform DML with transaction delimiter |; create procedure populate_tables() begin declare n int default 20; declare inner_loop int default 100; - set global innodb_file_per_table=on; - drop table if exists t1,t2,t3,t4; create temporary table t1(c1 int not null, c2 int not null, @@ -56,7 +38,7 @@ create procedure populate_tables() c8 datetime, c9 decimal(6,3), primary key (c1), - index (c3,c4(50),c5(50)), + index (c3,c4(50),c5(50)), index (c2)) engine=innodb row_format=redundant; @@ -74,20 +56,6 @@ create procedure populate_tables() index (c2)) engine=innodb row_format=compact; - create temporary table t3(c1 int not null, - c2 int not null, - c3 char(255) not null, - c4 text(6000) not null, - c5 blob(6000) not null, - c6 varchar(2000) not null, - c7 varchar(2000) not null, - c8 datetime, - c9 decimal(6,3), - primary key (c1), - index (c3,c4(50),c5(50)), - index (c2)) - engine=innodb row_format=compressed key_block_size=4; - create temporary table t4(c1 int not null, c2 int not null, c3 char(255) not null, @@ -115,121 +83,101 @@ create procedure populate_tables() index (c3,c4(50),c5(50)), index (c2)) engine=innodb; - + create temporary table t6 ( a int ) engine = innodb; insert into t6 values (50),(100),(150),(190); while (n > 0) do start transaction; insert into t1 values(n,n,repeat(concat(' tc3_',n),30), - repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800), - repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800), + repeat(concat(' tc4_',n),8),repeat(concat(' tc_',n),8), + repeat(concat(' tc6_',n),8),repeat(concat(' tc7_',n),8), now(),(100.55+n)); insert into t2 values(n,n,repeat(concat(' tc3_',n),30), + repeat(concat(' tc4_',n),8),repeat(concat(' tc_',n),8), + repeat(concat(' tc6_',n),8),repeat(concat(' tc7_',n),8), + now(),(100.55+n)); + insert ignore into t4 values(n,n,repeat(concat(' tc3_',n),30), repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800), repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800), now(),(100.55+n)); - insert into t3 values(n,n,repeat(concat(' tc3_',n),30), - repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800), - repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800), - now(),(100.55+n)); - insert into t4 values(n,n,repeat(concat(' tc3_',n),30), - repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800), - repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800), - now(),(100.55+n)); - insert into t5 values(n,n,repeat(concat(' tc3_',n),30), + insert ignore into t5 values(n,n,repeat(concat(' tc3_',n),30), repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800), repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800), now(),(100.55+n)); if (n > 10) then commit; - else + else delete from t1 where c1 > 10 ; delete from t2 where c1 > 10 ; - delete from t3 where c1 > 10 ; delete from t4 where c1 > 10 ; delete from t5 where c1 > 10 ; - + rollback; start transaction; update t1 set c1 = c1 + 1000 where c1 > 10; update t2 set c1 = c1 + 1000 where c1 > 10; - update t3 set c1 = c1 + 1000 where c1 > 10; update t4 set c1 = c1 + 1000 where c1 > 10; update t5 set c1 = c1 + 1000 where c1 > 10; rollback; - end if; + end if; start transaction; insert into t1 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), - repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), - repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), + repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8), + repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2), now(),(100.55+n+inner_loop)); insert into t2 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), + repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8), + repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2), + now(),(100.55+n+inner_loop)); + insert ignore into t4 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), now(),(100.55+n+inner_loop)); - insert into t3 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), - repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), - repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), - now(),(100.55+n+inner_loop)); - insert into t4 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), - repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), - repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), - now(),(100.55+n+inner_loop)); - insert into t5 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), + insert ignore into t5 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), now(),(100.55+n+inner_loop)); delete from t1 where c1 between 100 and 110; delete from t2 where c1 between 100 and 110; - delete from t3 where c1 between 100 and 110; delete from t4 where c1 between 100 and 110; delete from t5 where c1 between 100 and 110; - update t1 set c1 = c1+1 where c1>110; - update t2 set c1 = c1+1 where c1>110; - update t3 set c1 = c1+1 where c1>110; - update t4 set c1 = c1+1 where c1>110; - update t5 set c1 = c1+1 where c1>110; + update t1 set c1 = c1+1 where c1>110; + update t2 set c1 = c1+1 where c1>110; + update t4 set c1 = c1+1 where c1>110; + update t5 set c1 = c1+1 where c1>110; savepoint a; insert into t1 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), - repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), - repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), + repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8), + repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2), now(),(100.55+n+inner_loop)); insert into t2 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), + repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8), + repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2), + now(),(100.55+n+inner_loop)); + insert ignore into t4 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), now(),(100.55+n+inner_loop)); - insert into t3 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), - repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), - repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), - now(),(100.55+n+inner_loop)); - insert into t4 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), - repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), - repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), - now(),(100.55+n+inner_loop)); - insert into t5 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), + insert ignore into t5 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), now(),(100.55+n+inner_loop)); savepoint b; insert into t1 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), - repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), - repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), + repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8), + repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2), now(),(100.55+n+inner_loop)); insert into t2 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), - repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), - repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), - now(),(100.55+n+inner_loop)); - insert into t3 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), - repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), - repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245), + repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8), + repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2), now(),(100.55+n+inner_loop)); insert into t4 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30), repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800), @@ -245,67 +193,42 @@ create procedure populate_tables() commit; commit; rollback; - set n = n - 1; + set n = n - 1; end while; end| delimiter ;| # Create two client for concurrent execution connect (con1,localhost,root,,); +--send call populate_tables(); + connect (con2,localhost,root,,); - ---echo #---client 1 : dml operation ---" -connection con1; --- disable_query_log -eval set global innodb_file_per_table=$innodb_file_per_table_orig; --- enable_query_log --- disable_query_log -# call procedure --send call populate_tables(); --- enable_query_log ---echo #---client 2 : dml operation ---" -connection con2; --- disable_query_log -eval set global innodb_file_per_table=$innodb_file_per_table_orig; --- enable_query_log --- disable_query_log -# call procedure ---send call populate_tables(); --- enable_query_log - -# check data of client connection 1 ---echo # In connection 1 connection con1; --reap -# 20 rows exepceted in 5 tables +# 20 rows expected select count(*) from t1; select count(*) from t2; -select count(*) from t3; select count(*) from t4; select count(*) from t5; select c1 from t1; select c1 from t2; -select c1 from t3; select c1 from t4; select c1 from t5; -# check data of client connection 2 ---echo # In connection 2 + connection con2; --reap -# 20 rows exepceted in 5 tables +# 20 rows expected select count(*) from t1; select count(*) from t2; -select count(*) from t3; select count(*) from t4; select count(*) from t5; select c1 from t1; select c1 from t2; -select c1 from t3; select c1 from t4; select c1 from t5; ---echo # In connection 1 connection con1; set autocommit = 0; @@ -317,9 +240,6 @@ insert ignore into t1 values (20,1,'a','a','a','a','a',now(),100.55); insert into t2 values (20,1,'a','a','a','a','a',now(),100.55); insert ignore into t2 values (20,1,'a','a','a','a','a',now(),100.55); --error ER_DUP_ENTRY -insert into t3 values (20,1,'a','a','a','a','a',now(),100.55); -insert ignore into t3 values (20,1,'a','a','a','a','a',now(),100.55); ---error ER_DUP_ENTRY insert into t4 values (20,1,'a','a','a','a','a',now(),100.55); insert ignore into t4 values (20,1,'a','a','a','a','a',now(),100.55); --error ER_DUP_ENTRY @@ -334,9 +254,6 @@ insert into t1 values (1,1,'a','a','a','a','a',now(),100.55), insert into t2 values (1,1,'a','a','a','a','a',now(),100.55), (20,1,'a','a','a','a','a',now(),100.55); --error ER_DUP_ENTRY -insert into t3 values (1,1,'a','a','a','a','a',now(),100.55), -(20,1,'a','a','a','a','a',now(),100.55); ---error ER_DUP_ENTRY insert into t4 values (1,1,'a','a','a','a','a',now(),100.55), (20,1,'a','a','a','a','a',now(),100.55); --error ER_DUP_ENTRY @@ -347,74 +264,59 @@ set autocommit = 1; select c1,c2 from t1 where c1 in (20,1); select c1,c2 from t2 where c1 in (20,1); -select c1,c2 from t3 where c1 in (20,1); select c1,c2 from t4 where c1 in (20,1); select c1,c2 from t5 where c1 in (20,1); #replace statement replace into t1 values (20,1,'a','a','a','a','a',now(),100.55); replace into t2 values (20,1,'a','a','a','a','a',now(),100.55); -replace into t3 values (20,1,'a','a','a','a','a',now(),100.55); replace into t4 values (20,1,'a','a','a','a','a',now(),100.55); replace into t5 values (20,1,'a','a','a','a','a',now(),100.55); # verify row is replaced from (20,20) to (20,1) select c1,c2,c3,c4,c5,c6,c7,c9 from t1 where c1 = 20; select c1,c2,c3,c4,c5,c6,c7,c9 from t2 where c1 = 20; -select c1,c2,c3,c4,c5,c6,c7,c9 from t3 where c1 = 20; select c1,c2,c3,c4,c5,c6,c7,c9 from t4 where c1 = 20; select c1,c2,c3,c4,c5,c6,c7,c9 from t5 where c1 = 20; -# Update ignore. statement is gonored as 20 value exits +# Update ignore. statement is ignored as 20 value exists update ignore t1 set c1 = 20 where c1 = 140 ; update ignore t2 set c1 = 20 where c1 = 140 ; -update ignore t3 set c1 = 20 where c1 = 140 ; update ignore t4 set c1 = 20 where c1 = 140 ; update ignore t5 set c1 = 20 where c1 = 140 ; # see record 140 is present as last update ignored select count(*) from t1 where c1 = 140; select count(*) from t2 where c1 = 140; -select count(*) from t3 where c1 = 140; select count(*) from t4 where c1 = 140; select count(*) from t5 where c1 = 140; -# Load data infile ---echo "running select * into outfile from t1 ; ---disable_query_log +--replace_result $MYSQLTEST_VARDIR VARDIR eval select * into outfile "$MYSQLTEST_VARDIR/tmp/t1.outfile" from t1; ---enable_query_log -# Create table as select + create temporary table temp_1 engine = innodb as select * from t1 where 1=2; select count(*) from temp_1; ---echo "running load data infile into temp_1 ; ---disable_query_log + +--replace_result $MYSQLTEST_VARDIR VARDIR eval load data infile '$MYSQLTEST_VARDIR/tmp/t1.outfile' into table temp_1; ---enable_query_log select count(*) from temp_1; +--remove_file $MYSQLTEST_VARDIR/tmp/t1.outfile # Alter table to add column and primary key -alter table temp_1 add column c10 int default 99 , +alter table temp_1 add column c10 int default 99 , add column c11 varchar(100) default 'test'; alter table temp_1 add primary key (c1); insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55); select c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 from temp_1 where c1 < 0; select count(*) from temp_1 where c10 = 99 and c11 like 'test'; # insert on duplicate key update -insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55) +insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55) on duplicate key update c1=-2,c2=-2; select c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 from temp_1 where c1 < 0; -#cleanup -drop table t1 ,t2 ,t3,t4,t5,t6,temp_1; disconnect con1; - -connection con2; -drop table t1 ,t2 ,t3,t4,t5,t6; disconnect con2; - connection default; drop procedure populate_tables; - # case 2 - with prepare and execute let $prep_loop= 5; create temporary table prep_1(c1 int not null, @@ -457,12 +359,3 @@ select count(*) from prep_1; drop prepare stm; drop prepare stm_1; drop prepare stm_2; -drop table prep_1; - ---remove_file $MYSQLTEST_VARDIR/tmp/t1.outfile - --- disable_query_log -eval set global innodb_file_per_table=$innodb_file_per_table_orig; -SET sql_mode = default; --- enable_query_log - diff --git a/mysql-test/suite/innodb/t/temporary_table.test b/mysql-test/suite/innodb/t/temporary_table.test new file mode 100644 index 00000000000..9f63fe52f3b --- /dev/null +++ b/mysql-test/suite/innodb/t/temporary_table.test @@ -0,0 +1,445 @@ +# +# InnoDB temporary table test case, including +# WL#6560: InnoDB: separate tablespace for innodb-temp-tables. +# WL#7899: InnoDB: Map compressed temporary tables to uncompressed +# + +--source include/have_innodb.inc +# Embedded server does not restart of server +--source include/not_embedded.inc +--source include/no_valgrind_without_big.inc + +--disable_query_log +call mtr.add_suppression("last file in setting innodb_temp_data_file_path"); +call mtr.add_suppression("The table 't1' is full"); +call mtr.add_suppression("Plugin 'InnoDB' init function returned error"); +call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); +call mtr.add_suppression("InnoDB: Tablespace doesn't support raw devices"); +call mtr.add_suppression("InnoDB: The innodb_temporary data file 'ibtmp1' must be at least"); +call mtr.add_suppression("InnoDB: Plugin initialization aborted"); +call mtr.add_suppression("innodb_temporary and innodb_system file names seem to be the same"); +call mtr.add_suppression("Could not create the shared innodb_temporary"); +call mtr.add_suppression("InnoDB: syntax error in file path"); +--enable_query_log + +let $MYSQL_TMP_DIR = `select @@tmpdir`; +let $MYSQL_DATA_DIR = `select @@datadir`; + +--echo # files in MYSQL_DATA_DIR +--list_files $MYSQL_DATA_DIR/ ibtmp* + +create temporary table t1 (i int, f float, c char(100)) engine=innodb; +insert into t1 values (100, 1.1, 'pune'); +insert into t1 values (99, 1.2, 'mumbai'); +insert into t1 values (98, 1.3, 'jaipur'); +insert into t1 values (97, 1.4, 'delhi'); +insert into t1 values (96, 1.5, 'ahmedabad'); +select * from t1; +select * from t1 where i = 98; +select * from t1 where i < 100; + +explain select * from t1 where f > 1.29999; +alter table t1 add index sec_index(f); +explain select * from t1 where f > 1.29999; +select * from t1 where f > 1.29999; + +explain select * from t1 where i = 100; +alter table t1 add unique index pri_index(i); +explain select * from t1 where i = 100; +select * from t1 where i = 100; + +delete from t1 where i < 97; +select * from t1; +insert into t1 values (96, 1.5, 'kolkata'); +select * from t1; + +update t1 set f = 1.44 where c = 'delhi'; +select * from t1; + +truncate table t1; +insert into t1 values (100, 1.1, 'pune'); +insert into t1 values (99, 1.2, 'mumbai'); +insert into t1 values (98, 1.3, 'jaipur'); +insert into t1 values (97, 1.4, 'delhi'); +insert into t1 values (96, 1.5, 'ahmedabad'); +select * from t1; + +--error ER_CANNOT_DISCARD_TEMPORARY_TABLE +alter table t1 discard tablespace; +--error ER_CANNOT_DISCARD_TEMPORARY_TABLE +alter table t1 import tablespace; +drop temporary table t1; + +create temporary table t1 + (keyc int, c1 char(100), c2 char(100), + primary key(keyc)) engine = innodb; +delimiter |; +CREATE PROCEDURE populate_t1() +BEGIN + DECLARE i INT DEFAULT 1; + while (i <= 20000) DO + insert into t1 values (i, 'a', 'b'); + SET i = i + 1; + END WHILE; +END| +delimiter ;| +set autocommit=0; +select count(*) from t1; +call populate_t1(); +select count(*) from t1; +select * from t1 limit 10; +set autocommit=1; +truncate table t1; +select * from t1; +# + +--echo # test condition of full-temp-tablespace +--let $restart_parameters= --innodb_temp_data_file_path=ibtmp1:12M +--source include/restart_mysqld.inc + +create temporary table t1 + (keyc int, c1 char(100), c2 char(100), + primary key(keyc)) engine = innodb; +begin; +--error ER_RECORD_FILE_FULL +call populate_t1(); + +drop procedure populate_t1; + +--echo # test read-only mode +--let $restart_parameters = --innodb-read-only +--source include/restart_mysqld.inc + +--echo # files in MYSQL_DATA_DIR +--list_files $MYSQL_DATA_DIR/ ibtmp* + +--error ER_NO_SUCH_TABLE +select * from t1; +show tables; +--error ER_CANT_CREATE_TABLE +create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb; + +--echo # test various bad start-up parameters + +let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err; +let SEARCH_RANGE = -50000; +let SEARCH_ABORT = NOT FOUND; +let $check_no_innodb=SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); + +--let $restart_parameters= --innodb_data_file_path=ibdata1:12M:autoextend --innodb_temp_data_file_path=ibdata1:12M:autoextend +--source include/restart_mysqld.inc +--let SEARCH_PATTERN = innodb_temporary and innodb_system file names seem to be the same +--source include/search_pattern_in_file.inc +eval $check_no_innodb; + +--let $restart_parameters= --innodb_temp_data_file_path=foobar:3Gnewraw +--source include/restart_mysqld.inc +--let SEARCH_PATTERN = support raw device +--source include/search_pattern_in_file.inc +eval $check_no_innodb; + +--let $restart_parameters= --innodb_temp_data_file_path=barbar:3Graw +--source include/restart_mysqld.inc +--source include/search_pattern_in_file.inc +eval $check_no_innodb; + +--let $restart_parameters= --innodb_temp_data_file_path=ibtmp1:2M:autoextend +--source include/restart_mysqld.inc +--let SEARCH_PATTERN = The innodb_temporary data file 'ibtmp1' must be at least +--source include/search_pattern_in_file.inc +eval $check_no_innodb; + +--let $restart_parameters= --innodb_temp_data_file_path= +--source include/restart_mysqld.inc +--let SEARCH_PATTERN = InnoDB: syntax error in file path +--source include/search_pattern_in_file.inc +eval $check_no_innodb; + +--let $restart_parameters= +--source include/restart_mysqld.inc + +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +create temporary table t ( + i int) + engine = innodb row_format = compressed; +# +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +create temporary table t ( + i int) + engine = innodb row_format = compressed key_block_size = 8; +# +create temporary table t ( + i int) + engine = innodb row_format = dynamic; +show warnings; +drop table t; +# +create temporary table t ( + i int) + engine = innodb row_format = dynamic; +show warnings; +drop table t; +set innodb_strict_mode = off; +# +create temporary table t ( + i int) + engine = innodb row_format = compressed key_block_size = 8; +show warnings; +set innodb_strict_mode = default; +# +drop table t; +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +create temporary table t ( + i int) + engine = innodb row_format = compressed; +--echo #files in MYSQL_TMP_DIR, expecting only default temporary tablespace file +--list_files $MYSQL_TMP_DIR/ *.ibd +--list_files $MYSQL_DATA_DIR/ ibtmp* +# +create temporary table t ( + i int) + engine = innodb row_format = dynamic; +show warnings; +drop table t; +# +create temporary table t ( + i int) + engine = innodb row_format = dynamic; +show warnings; +drop table t; +set innodb_strict_mode = off; +# +create temporary table t ( + i int) + engine = innodb row_format = dynamic key_block_size = 4; +show warnings; +drop table t; +# +create temporary table t ( + i int) + engine = innodb row_format = compact; +show warnings; +drop table t; +# +create temporary table t ( + i int) + engine = innodb key_block_size = 4; +show warnings; +drop table t; +# + +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB KEY_BLOCK_SIZE = 4; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +DROP TABLE t1; +# +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = REDUNDANT; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +DROP TABLE t1; +# +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = COMPACT; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +DROP TABLE t1; +# + +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB KEY_BLOCK_SIZE = 4; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +DROP TABLE t1; +# +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = COMPRESSED; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +DROP TABLE t1; +# +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE = 8; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +DROP TABLE t1; +# +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 8; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +DROP TABLE t1; +# +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = DYNAMIC; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +DROP TABLE t1; +# + +# Test alter table for temporary tables with row format = compressed or +# key_block_size +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY +) ENGINE = InnoDB ROW_FORMAT = REDUNDANT; + +ALTER TABLE t1 ROW_FORMAT = COMPRESSED; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +ALTER TABLE t1 KEY_BLOCK_SIZE = 4; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +ALTER TABLE t1 KEY_BLOCK_SIZE = 4 ROW_FORMAT = COMPRESSED; +SHOW WARNINGS; +SHOW CREATE TABLE t1; + +ALTER TABLE t1 ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 4; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +ALTER TABLE t1 ROW_FORMAT = DYNAMIC; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +# Set innodb_strict_mode=ON and test compressed temporary tables again. +set innodb_strict_mode = ON; + +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB KEY_BLOCK_SIZE = 4; +SHOW WARNINGS; +# + +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB KEY_BLOCK_SIZE = 4, ROW_FORMAT = COMPACT; +SHOW WARNINGS; +# + +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = REDUNDANT; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +DROP TABLE t1; +# + +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB KEY_BLOCK_SIZE = 4; +SHOW WARNINGS; +# + +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = COMPRESSED; +SHOW WARNINGS; +# + +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE = 8; +SHOW WARNINGS; +# + +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE = 7; +SHOW WARNINGS; +# + +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY, + c CHAR(10) NOT NULL +) ENGINE = InnoDB ROW_FORMAT = DYNAMIC; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +DROP TABLE t1; +# + +CREATE TEMPORARY TABLE t1 ( + i INT NOT NULL PRIMARY KEY +) ENGINE = InnoDB ROW_FORMAT = REDUNDANT; + +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +ALTER TABLE t1 ROW_FORMAT = COMPRESSED; +SHOW WARNINGS; + +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +ALTER TABLE t1 KEY_BLOCK_SIZE = 4; +SHOW WARNINGS; + +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +ALTER TABLE t1 ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 4; +SHOW WARNINGS; + +ALTER TABLE t1 ROW_FORMAT = DYNAMIC; + +# +# Some checking for turning innodb_strict_mode ON and OFF. +set innodb_strict_mode = OFF; + +ALTER TABLE t1 ROW_FORMAT = COMPRESSED; +SHOW WARNINGS; + +set innodb_strict_mode = ON; + +ALTER TABLE t1 ROW_FORMAT = DYNAMIC; +SHOW CREATE TABLE t1; + +set innodb_strict_mode = OFF; + +ALTER TABLE t1 ROW_FORMAT = COMPRESSED; +SHOW WARNINGS; + +ALTER TABLE t1 KEY_BLOCK_SIZE = 8; +SHOW WARNINGS; + +set innodb_strict_mode = ON; + +--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE +ALTER TABLE t1 ADD COLUMN j INT; +SHOW WARNINGS; +SHOW CREATE TABLE t1; + +set innodb_strict_mode = OFF; + +ALTER TABLE t1 KEY_BLOCK_SIZE = 0; +SHOW CREATE TABLE t1; + +ALTER TABLE t1 ROW_FORMAT = DYNAMIC; + +set innodb_strict_mode = ON; +ALTER TABLE t1 ADD COLUMN j INT; +SHOW CREATE TABLE t1; diff --git a/mysql-test/suite/innodb/t/temporary_table_optimization.opt b/mysql-test/suite/innodb/t/temporary_table_optimization.opt new file mode 100644 index 00000000000..2f73da1ead6 --- /dev/null +++ b/mysql-test/suite/innodb/t/temporary_table_optimization.opt @@ -0,0 +1 @@ +--loose-innodb-sys-datafiles --loose-innodb-sys-tables diff --git a/mysql-test/suite/innodb/t/temporary_table_optimization.test b/mysql-test/suite/innodb/t/temporary_table_optimization.test new file mode 100644 index 00000000000..ae41c87839b --- /dev/null +++ b/mysql-test/suite/innodb/t/temporary_table_optimization.test @@ -0,0 +1,243 @@ +# +# WL#6469: Optimizing CREATE/DROP performance for temporary tables +# +--source include/no_valgrind_without_big.inc +--source include/have_innodb.inc + +######################################################################### +# # +# Will test following scenarios: # +# 1. Create/Drop of temp-table. (with and w/o explicit pk) # +# 2. Truncate temp-table (result in table drop and recreate). # +# 3. Alter of temp-table. # +# 4. Import/Discard of temp-table (to check blocked action) # +# 5. Renaming of temp-table # +# 6. Creating temp-table with large prefix. # +# 7. Check Temp table info not stored in I_S datafile and tables # +######################################################################### + + +#------------------------------------------------------------- +# +# 1. Create/Drop of temp-table. (with and w/o explicit pk) # +# +create temporary table t1 (i int) engine = innodb; +insert into t1 values (1), (2), (3), (4); +select * from t1; +select * from t1 where i = 4; +drop table t1; +# +# recreate table wih same name to ensure entries are removed. +create temporary table t1 (i int) engine = innodb; +insert into t1 values (1), (2), (3), (4); +select * from t1; +select * from t1 where i = 4; +drop table t1; +# +create temporary table t2 (i int) engine = innodb; +insert into t2 values (1), (2), (3), (4); +select * from t2; +select * from t2 where i = 4; +drop table t2; + +#------------------------------------------------------------- +# +# 2. Truncate temp-table (result in table drop and recreate). # +# +create temporary table t1 + (keyc int, c1 char(100), c2 char(100), + primary key(keyc)) engine = innodb; +delimiter |; +create procedure populate_t1() +begin + declare i int default 1; + while (i <= 200) DO + insert into t1 values (i, 'a', 'b'); + set i = i + 1; + end while; +end| +delimiter ;| +set autocommit=0; +select count(*) from t1; +call populate_t1(); +select count(*) from t1; +select * from t1 limit 10; +set autocommit=1; +truncate table t1; +select count(*) from t1; +drop table t1; +# +# recreate table wih same name to ensure entries are removed. +create temporary table t1 (i int) engine = innodb; +insert into t1 values (1), (2), (3), (4); +select * from t1; +select * from t1 where i = 4; +drop table t1; +# +create temporary table t1 + (keyc int, c1 char(100), c2 char(100), + primary key(keyc)) + engine = innodb; +begin; +select count(*) from t1; +call populate_t1(); +select count(*) from t1; +rollback; +select count(*) from t1; +begin; +call populate_t1(); +commit; +select count(*) from t1; +truncate table t1; +select count(*) from t1; +drop table t1; +# +drop procedure populate_t1; + + +#------------------------------------------------------------- +# +# 3. Alter of temp-table. +# +create temporary table t1 (t1_i int, t1_f float) engine = innodb; +insert into t1 values (1, 1.1), (2, 2.2), (3, 2.2), (4, 4.4); +# +explain select * from t1 where t1_i = 1; +alter table t1 add unique index pri_index(t1_i); +explain select * from t1 where t1_i = 1; +select * from t1 where t1_i = 1; +# +--error ER_DUP_ENTRY +alter table t1 add unique index sec_index(t1_f); +alter table t1 add index sec_index(t1_f); +explain select * from t1 where t1_f > 2.2; +select * from t1 where t1_f > 2.2; +# +alter table t1 add column (t1_c char(10)); +select * from t1; +insert into t1 values (5, 5.5, 'krunal'); +# +alter table t1 drop column t1_f; +show create table t1; +--error ER_BAD_FIELD_ERROR +select * from t1 where t1_f > 2.2; +# +--error ER_ALTER_OPERATION_NOT_SUPPORTED +alter table t1 add index sec_index2(t1_c), algorithm=inplace; +# +drop table t1; + +#------------------------------------------------------------- +# +# 4. Import/Discard of temp-table (to check blocked action) +# +create temporary table t1 (i int, f float) engine = innodb; +insert into t1 values (10, 1.1), (20, 2.2); +select * from t1; +# +--error ER_CANNOT_DISCARD_TEMPORARY_TABLE +alter table t1 discard tablespace; +--error ER_CANNOT_DISCARD_TEMPORARY_TABLE +alter table t1 import tablespace; +drop table t1; + +#------------------------------------------------------------- +# +# 5. Renaming of temp-table # +# +create temporary table t1 (i int) engine=innodb; +insert into t1 values (1), (2), (3); +select * from t1; +# +alter table t1 rename t2; +--error ER_NO_SUCH_TABLE +select * from t1; +select * from t2; +insert into t2 values (1), (2), (6), (7); +select * from t2; +drop table t2; + + +#------------------------------------------------------------- +# +# 6. Creating temp-table with large prefix. # +# +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; +# This will lead to warnings on innodb_page_size=8k or 4k: +# 8k: Specified key was too long; max key length is 1536 bytes +# 4k: Specified key was too long; max key length is 768 bytes +--disable_warnings +# +create temporary table t ( + a int not null, + b blob not null, + index sk (b(3021)) + ) row_format = dynamic engine=innodb; +drop table t; +# +create temporary table t ( + a int not null, + b blob not null, + index sk (b(3021)) + ) row_format = dynamic engine=innodb; +drop table t; +# +create temporary table t ( + a int not null, + b blob not null, + index sk (b(3021)) + ) row_format = dynamic engine=innodb; +drop table t; +# +SET innodb_strict_mode=OFF; +--error ER_INDEX_COLUMN_TOO_LONG +create temporary table t ( + a int not null, + b blob not null, + index sk (b(3021)) + ) row_format = compact engine=innodb; +# +create temporary table t ( + a int not null, + b blob not null, + index sk (b(3021)) + ) row_format = dynamic engine=innodb; +drop table t; +# +create temporary table t ( + a int not null, + b blob not null, + index sk (b(3021)) + ) row_format = compressed engine=innodb; +drop table t; +# +--error ER_INDEX_COLUMN_TOO_LONG +create temporary table t ( + a int not null, + b blob not null, + index sk (b(3021)) + ) row_format = compact engine=innodb; +# +create temporary table t ( + a int not null, + b blob not null, + index sk (b(3021)) + ) row_format = dynamic engine=innodb; +drop table t; +--enable_warnings +# + +#------------------------------------------------------------- +# +# 7. Temp table info not stored in I_S +# +CREATE TABLE t1 ( i INT ) ENGINE = Innodb; +CREATE TEMPORARY TABLE t2 ( i INT ) ENGINE = Innodb; +SELECT COUNT(*) FROM information_schema.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%t_'; +SELECT COUNT(*) FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE '%test%t_'; +CREATE TEMPORARY table t3 ( i INT ) ENGINE = Innodb; +SELECT COUNT(*) FROM information_schema.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%t_'; +SELECT COUNT(*) FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE '%test%t_'; +DROP TABLE t1,t2,t3; +SELECT COUNT(*) FROM information_schema.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%t_'; +SELECT COUNT(*) FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE '%test%t_'; diff --git a/mysql-test/suite/innodb/t/xa_recovery.test b/mysql-test/suite/innodb/t/xa_recovery.test index 32373d63d14..f5c2b655545 100644 --- a/mysql-test/suite/innodb/t/xa_recovery.test +++ b/mysql-test/suite/innodb/t/xa_recovery.test @@ -1,7 +1,3 @@ -if (`select plugin_auth_version <= "5.6.24" from information_schema.plugins where plugin_name='innodb'`) -{ - --skip Not fixed in InnoDB as of 5.6.24 or earlier -} --source include/have_innodb.inc # Embedded server does not support restarting. --source include/not_embedded.inc @@ -9,31 +5,17 @@ if (`select plugin_auth_version <= "5.6.24" from information_schema.plugins wher # MDEV-8841 - close tables opened by previous tests, # so they don't get marked crashed when the server gets crashed --disable_query_log +call mtr.add_suppression("Found 1 prepared XA transactions"); FLUSH TABLES; --enable_query_log -# -# We kill server belown with timeout 0 that is not fully safe -# -call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); - CREATE TABLE t1 (a INT) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); connect (con1,localhost,root); XA START 'x'; UPDATE t1 set a=2; XA END 'x'; XA PREPARE 'x'; connection default; -call mtr.add_suppression("Found 1 prepared XA transactions"); - -# Kill and restart the server. --- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --- shutdown_server 0 --- source include/wait_until_disconnected.inc - --- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --- enable_reconnect --- source include/wait_until_connected_again.inc --- disable_reconnect +--source include/kill_and_restart_mysqld.inc disconnect con1; connect (con1,localhost,root); diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_misc_debug.result b/mysql-test/suite/innodb_fts/r/crash_recovery.result similarity index 72% rename from mysql-test/suite/innodb_fts/r/innodb_fts_misc_debug.result rename to mysql-test/suite/innodb_fts/r/crash_recovery.result index b09fe632116..2ff867b70fe 100644 --- a/mysql-test/suite/innodb_fts/r/innodb_fts_misc_debug.result +++ b/mysql-test/suite/innodb_fts/r/crash_recovery.result @@ -15,9 +15,15 @@ INSERT INTO articles (title,body) VALUES BEGIN; INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...'); -SET SESSION debug_dbug="+d,crash_commit_before"; -COMMIT; -ERROR HY000: Lost connection to MySQL server during query +# Make durable the AUTO_INCREMENT in the above incomplete transaction. +connect flush_redo_log,localhost,root,,; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +BEGIN; +DELETE FROM articles LIMIT 1; +ROLLBACK; +disconnect flush_redo_log; +connection default; +# Kill and restart INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...'); CREATE FULLTEXT INDEX idx ON articles (title,body); @@ -27,7 +33,7 @@ AGAINST ('Database' IN NATURAL LANGUAGE MODE); id title body 1 MySQL Tutorial DBMS stands for DataBase ... 5 MySQL vs. YourSQL In the following database comparison ... -7 MySQL Tutorial DBMS stands for DataBase ... +8 MySQL Tutorial DBMS stands for DataBase ... INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...') , ('How To Use MySQL Well','After you went through a ...'), @@ -38,9 +44,15 @@ INSERT INTO articles (title,body) VALUES BEGIN; INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...'); -SET SESSION debug_dbug="+d,crash_commit_before"; -COMMIT; -ERROR HY000: Lost connection to MySQL server during query +# Make durable the AUTO_INCREMENT in the above incomplete transaction. +connect flush_redo_log,localhost,root,,; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +BEGIN; +DELETE FROM articles LIMIT 1; +ROLLBACK; +disconnect flush_redo_log; +connection default; +# Kill and restart INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...'); SELECT * FROM articles @@ -49,10 +61,10 @@ AGAINST ('Database' IN NATURAL LANGUAGE MODE); id title body 1 MySQL Tutorial DBMS stands for DataBase ... 5 MySQL vs. YourSQL In the following database comparison ... -7 MySQL Tutorial DBMS stands for DataBase ... 8 MySQL Tutorial DBMS stands for DataBase ... -12 MySQL vs. YourSQL In the following database comparison ... -14 MySQL Tutorial DBMS stands for DataBase ... +9 MySQL Tutorial DBMS stands for DataBase ... +13 MySQL vs. YourSQL In the following database comparison ... +16 MySQL Tutorial DBMS stands for DataBase ... DROP TABLE articles; CREATE TABLE articles ( id int PRIMARY KEY, @@ -71,9 +83,7 @@ INSERT INTO articles VALUES BEGIN; INSERT INTO articles VALUES (100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...'); -SET SESSION debug_dbug="+d,crash_commit_before"; -COMMIT; -ERROR HY000: Lost connection to MySQL server during query +# Kill and restart INSERT INTO articles VALUES (8, 12, 'MySQL Tutorial','DBMS stands for DataBase ...'); SELECT * FROM articles WHERE MATCH (title, body) AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE); @@ -82,15 +92,3 @@ id FTS_DOC_ID title body 1 10 MySQL Tutorial DBMS stands for DataBase ... 8 12 MySQL Tutorial DBMS stands for DataBase ... DROP TABLE articles; -CREATE TABLE articles ( -id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, -title VARCHAR(200), -body TEXT, -FULLTEXT (title,body) -) ENGINE=InnoDB; -SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail"; -CREATE FULLTEXT INDEX idx ON articles(body); -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_dict_create_index_tree_fail"; -ALTER TABLE articles STATS_PERSISTENT=DEFAULT; -DROP TABLE articles; diff --git a/mysql-test/suite/innodb_fts/r/create.result b/mysql-test/suite/innodb_fts/r/create.result index c537aa81efd..615f0368599 100644 --- a/mysql-test/suite/innodb_fts/r/create.result +++ b/mysql-test/suite/innodb_fts/r/create.result @@ -16,10 +16,10 @@ INSERT INTO t SET t=REPEAT(_utf8 0xefbc91,84); INSERT INTO t SET t=REPEAT('after',17); INSERT INTO t SET t=REPEAT(_utf8mb3 0xe794b2e9aaa8e69687, 15); # The data below is not 3-byte UTF-8, but 4-byte chars. -INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84); +INSERT IGNORE INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84); Warnings: Warning 1366 Incorrect string value: '\xF0\x9F\x96\x95\xF0\x9F...' for column 't' at row 1 -INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85); +INSERT IGNORE INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85); Warnings: Warning 1366 Incorrect string value: '\xF0\x9F\x96\x96\xF0\x9F...' for column 't' at row 1 SELECT COUNT(*) FROM t WHERE MATCH t AGAINST diff --git a/mysql-test/suite/innodb_fts/r/innobase_drop_fts_index_table.result b/mysql-test/suite/innodb_fts/r/innobase_drop_fts_index_table.result deleted file mode 100644 index 8c0658cbf0f..00000000000 --- a/mysql-test/suite/innodb_fts/r/innobase_drop_fts_index_table.result +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE t (a INT, b TEXT) engine=innodb; -SET debug_dbug='+d,alter_table_rollback_new_index'; -ALTER TABLE t ADD FULLTEXT INDEX (b(64)); -ERROR HY000: Unknown error -SET debug_dbug='-d,alter_table_rollback_new_index'; -DROP TABLE t; 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 index b4fe5154cc3..40a38e62a1e 100644 --- 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 @@ -16,6 +16,7 @@ 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 ...'); +SET @saved_debug_dbug = @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,fts_instrument_result_cache_limit"; SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('mysql' IN BOOLEAN MODE); COUNT(*) @@ -26,6 +27,6 @@ SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database"' IN BOOLEAN 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"; +SET SESSION debug_dbug=@saved_debug_dbug; 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 index 5f8d5e37680..adec37c930f 100644 --- a/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result +++ b/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result @@ -13,7 +13,7 @@ CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200) ) ENGINE=InnoDB; -INSERT INTO articles (title) VALUES +INSERT IGNORE 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); @@ -42,7 +42,7 @@ 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 +INSERT IGNORE 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); @@ -72,7 +72,7 @@ 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 +INSERT IGNORE 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); @@ -233,7 +233,7 @@ CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200) ) ENGINE=InnoDB; -INSERT INTO articles (title) VALUES +INSERT IGNORE 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); @@ -257,7 +257,7 @@ AGAINST ('love' IN NATURAL LANGUAGE MODE); id title # Shutdown and restart mysqld SET NAMES utf8; -INSERT INTO articles (title) VALUES +INSERT IGNORE 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) @@ -273,7 +273,7 @@ CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200) ) ENGINE=InnoDB; -INSERT INTO articles (title) VALUES +INSERT IGNORE 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); @@ -298,7 +298,7 @@ id title DROP TABLE user_stopword; # Shutdown and restart mysqld SET NAMES utf8; -INSERT INTO articles (title) VALUES +INSERT IGNORE 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) diff --git a/mysql-test/suite/innodb_fts/r/misc_debug.result b/mysql-test/suite/innodb_fts/r/misc_debug.result new file mode 100644 index 00000000000..1fcc89b165b --- /dev/null +++ b/mysql-test/suite/innodb_fts/r/misc_debug.result @@ -0,0 +1,19 @@ +CREATE TABLE articles ( +id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, +title VARCHAR(200), +body TEXT, +FULLTEXT (title,body) +) ENGINE=InnoDB; +SET @saved_debug_dbug = @@SESSION.debug_dbug; +SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail"; +CREATE FULLTEXT INDEX idx ON articles(body); +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=@saved_debug_dbug; +ALTER TABLE articles STATS_PERSISTENT=DEFAULT; +DROP TABLE articles; +CREATE TABLE t (a INT, b TEXT) engine=innodb; +SET debug_dbug='+d,alter_table_rollback_new_index'; +ALTER TABLE t ADD FULLTEXT INDEX (b(64)); +ERROR HY000: Unknown error +SET SESSION debug_dbug=@saved_debug_dbug; +DROP TABLE t; diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_misc_debug.test b/mysql-test/suite/innodb_fts/t/crash_recovery.test similarity index 55% rename from mysql-test/suite/innodb_fts/t/innodb_fts_misc_debug.test rename to mysql-test/suite/innodb_fts/t/crash_recovery.test index db1d226990f..63c920a91ec 100644 --- a/mysql-test/suite/innodb_fts/t/innodb_fts_misc_debug.test +++ b/mysql-test/suite/innodb_fts/t/crash_recovery.test @@ -1,20 +1,12 @@ -#------------------------------------------------------------------------------ -# Misc FTS test on debug servers only -#------------------------------------------------------------------------------ +# Crash recovery tests for FULLTEXT INDEX. +# Note: These tests used to be part of a larger test, innodb_fts_misc_debug +# or innodb_fts.misc_debug. The part of the test that actually needs debug +# instrumentation been moved to innodb_fts.misc_debug. + --source include/have_innodb.inc - -# Must have debug code to use SET SESSION debug ---source include/have_debug.inc - -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc - -# Embedded server does not support crashing +# The embedded server tests do not support restarting. --source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - # Following are test for crash recovery on FTS index, the first scenario # is for bug Bug #14586855 INNODB: FAILING ASSERTION: (DICT_INDEX_GET_N_UNIQUE( # PLAN->INDEX) <= PLAN->N_EXAC @@ -46,27 +38,16 @@ BEGIN; INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...'); -# Request a crash on next execution of commit. -SET SESSION debug_dbug="+d,crash_commit_before"; -# -# 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 -COMMIT; +--echo # Make durable the AUTO_INCREMENT in the above incomplete transaction. +--connect (flush_redo_log,localhost,root,,) +SET GLOBAL innodb_flush_log_at_trx_commit=1; +BEGIN; +DELETE FROM articles LIMIT 1; +ROLLBACK; +--disconnect flush_redo_log +--connection default ---source include/wait_until_disconnected.inc ---sleep 2 - -# Turn on reconnect ---enable_reconnect -# -# Call script that will poll the server waiting for it to be back online again ---source include/wait_until_connected_again.inc -# -# Turn off reconnect again ---disable_reconnect +--source include/kill_and_restart_mysqld.inc # This insert will re-initialize the Doc ID counter, it should not crash INSERT INTO articles (title,body) VALUES @@ -90,33 +71,21 @@ INSERT INTO articles (title,body) VALUES ('MySQL vs. YourSQL','In the following database comparison ...'), ('MySQL Security','When configured properly, MySQL ...'); -# Now let's crash the server with "crash_commit_before" BEGIN; INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...'); -# Request a crash on next execution of commit. -SET SESSION debug_dbug="+d,crash_commit_before"; -# -# 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 -COMMIT; +--echo # Make durable the AUTO_INCREMENT in the above incomplete transaction. +--connect (flush_redo_log,localhost,root,,) +SET GLOBAL innodb_flush_log_at_trx_commit=1; +BEGIN; +DELETE FROM articles LIMIT 1; +ROLLBACK; +--disconnect flush_redo_log +--connection default ---source include/wait_until_disconnected.inc ---sleep 2 - -# Turn on reconnect ---enable_reconnect -# -# Call script that will poll the server waiting for it to be back online again ---source include/wait_until_connected_again.inc -# -# Turn off reconnect again ---disable_reconnect +--source include/kill_and_restart_mysqld.inc # This insert will re-initialize the Doc ID counter, it should not crash INSERT INTO articles (title,body) VALUES @@ -150,31 +119,14 @@ INSERT INTO articles VALUES (5, 6, 'MySQL vs. YourSQL','In the following database comparison ...'), (7, 4, 'MySQL Security','When configured properly, MySQL ...'); -# Now let's crash the server with "crash_commit_before" BEGIN; +# Below we do not depend on the durability of the AUTO_INCREMENT sequence, +# so we can skip the above flush_redo_log trick. INSERT INTO articles VALUES (100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...'); -# Request a crash on next execution of commit. -SET SESSION debug_dbug="+d,crash_commit_before"; -# -# 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 -COMMIT; - ---source include/wait_until_disconnected.inc ---sleep 2 - -# Turn on reconnect ---enable_reconnect -# -# Call script that will poll the server waiting for it to be back online again ---source include/wait_until_connected_again.inc -# +--source include/kill_and_restart_mysqld.inc # This would re-initialize the FTS index and do the re-tokenization # of above records @@ -184,26 +136,3 @@ SELECT * FROM articles WHERE MATCH (title, body) AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE); DROP TABLE articles; - -# Following test is for Bug 14668777 - ASSERT ON IB_VECTOR_SIZE( -# TABLE->FTS->INDEXES, ALTER TABLE -CREATE TABLE articles ( - id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, - title VARCHAR(200), - body TEXT, - FULLTEXT (title,body) - ) ENGINE=InnoDB; - -# Abort the operation in dict_create_index_step by setting -# return status of dict_create_index_tree_step() to DB_OUT_OF_MEMORY -# The newly create dict_index_t should be removed from fts cache -SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail"; ---error ER_OUT_OF_RESOURCES -CREATE FULLTEXT INDEX idx ON articles(body); -SET SESSION debug_dbug="-d,ib_dict_create_index_tree_fail"; - -# This simply go through ha_innobase::commit_inplace_alter_table -# and do a fts_check_cached_index() -ALTER TABLE articles STATS_PERSISTENT=DEFAULT; - -DROP TABLE articles; diff --git a/mysql-test/suite/innodb_fts/t/create.test b/mysql-test/suite/innodb_fts/t/create.test index f0329602ed1..fe0273af750 100644 --- a/mysql-test/suite/innodb_fts/t/create.test +++ b/mysql-test/suite/innodb_fts/t/create.test @@ -26,8 +26,8 @@ INSERT INTO t SET t=REPEAT(_utf8 0xefbc91,84); INSERT INTO t SET t=REPEAT('after',17); # too long, will not be indexed INSERT INTO t SET t=REPEAT(_utf8mb3 0xe794b2e9aaa8e69687, 15); --echo # The data below is not 3-byte UTF-8, but 4-byte chars. -INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84); -INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85); +INSERT IGNORE INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84); +INSERT IGNORE INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85); SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(CONCAT(REPEAT(_utf8mb3 0xE0B987, 4), REPEAT(_utf8mb3 0xE0B989, 5)), 5)); SELECT COUNT(*) FROM t WHERE MATCH t AGAINST ('BeforeTheIndexCreation'); diff --git a/mysql-test/suite/innodb_fts/t/innobase_drop_fts_index_table.test b/mysql-test/suite/innodb_fts/t/innobase_drop_fts_index_table.test deleted file mode 100644 index 9d60160c14e..00000000000 --- a/mysql-test/suite/innodb_fts/t/innobase_drop_fts_index_table.test +++ /dev/null @@ -1,19 +0,0 @@ -# -# Test innobase_drop_fts_index_table() -# - --- source include/have_innodb.inc -# Must have debug code to use SET SESSION debug --- source include/have_debug.inc --- source include/not_embedded.inc - -CREATE TABLE t (a INT, b TEXT) engine=innodb; - -SET debug_dbug='+d,alter_table_rollback_new_index'; - --- error ER_UNKNOWN_ERROR -ALTER TABLE t ADD FULLTEXT INDEX (b(64)); - -SET debug_dbug='-d,alter_table_rollback_new_index'; - -DROP TABLE t; 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 index dc55712b47c..669808edbf6 100644 --- 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 @@ -27,6 +27,7 @@ INSERT INTO t1 (a,b) VALUES ('when To Use MySQL Well','After that you went through a ...'), ('where will Optimizing MySQL','what In this tutorial we will show ...'); +SET @saved_debug_dbug = @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,fts_instrument_result_cache_limit"; # Simple term search @@ -44,7 +45,7 @@ SELECT COUNT(*) FROM t1 WHERE MATCH (a,b) AGAINST ('"mysql database"' IN BOOLEAN --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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE t1; 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 index cb49ca0e39f..4974783b9be 100644 --- a/mysql-test/suite/innodb_fts/t/innodb_fts_stopword_charset.test +++ b/mysql-test/suite/innodb_fts/t/innodb_fts_stopword_charset.test @@ -27,7 +27,7 @@ CREATE TABLE articles ( ) ENGINE=InnoDB; --disable_warnings -INSERT INTO articles (title) VALUES +INSERT IGNORE INTO articles (title) VALUES ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), ('lṓve'),('Lá¹’VE'); @@ -66,7 +66,7 @@ CREATE TABLE articles ( ) ENGINE=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci; --disable_warnings -INSERT INTO articles (title) VALUES +INSERT IGNORE INTO articles (title) VALUES ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), ('lṓve'),('Lá¹’VE'); @@ -106,7 +106,7 @@ CREATE TABLE articles ( ) ENGINE=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_spanish_ci; --disable_warnings -INSERT INTO articles (title) VALUES +INSERT IGNORE INTO articles (title) VALUES ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), ('lṓve'),('Lá¹’VE'); @@ -305,7 +305,7 @@ CREATE TABLE articles ( ) ENGINE=InnoDB; --disable_warnings -INSERT INTO articles (title) VALUES +INSERT IGNORE INTO articles (title) VALUES ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), ('lṓve'),('Lá¹’VE'); @@ -340,7 +340,7 @@ SET NAMES utf8; # Insert rows to check if it uses user stopword --disable_warnings -INSERT INTO articles (title) VALUES +INSERT IGNORE INTO articles (title) VALUES ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), ('lṓve'),('Lá¹’VE'); --enable_warnings @@ -363,7 +363,7 @@ CREATE TABLE articles ( ) ENGINE=InnoDB; --disable_warnings -INSERT INTO articles (title) VALUES +INSERT IGNORE INTO articles (title) VALUES ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), ('lṓve'),('Lá¹’VE'); @@ -401,7 +401,7 @@ SET NAMES utf8; # Insert rows to check if it uses user stopword --disable_warnings -INSERT INTO articles (title) VALUES +INSERT IGNORE INTO articles (title) VALUES ('love'),('LOVE'),('lòve'),('LÃ’VE'),('löve'),('LÖVE'),('løve'),('LØVE'), ('lṓve'),('Lá¹’VE'); --enable_warnings diff --git a/mysql-test/suite/innodb_fts/t/misc_debug.test b/mysql-test/suite/innodb_fts/t/misc_debug.test new file mode 100644 index 00000000000..4b32afb848c --- /dev/null +++ b/mysql-test/suite/innodb_fts/t/misc_debug.test @@ -0,0 +1,41 @@ +# Miscellanous FULLTEXT INDEX tests for debug-instrumented servers. +# Note: These tests used to be part of a larger test, innodb_fts_misc_debug +# or innodb_fts.misc_debug. A large part of that test can be run on a +# non-debug server and has been renamed to innodb_fts.crash_recovery. + +--source include/have_innodb.inc +--source include/have_debug.inc + +# Following test is for Bug 14668777 - ASSERT ON IB_VECTOR_SIZE( +# TABLE->FTS->INDEXES, ALTER TABLE +CREATE TABLE articles ( + id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, + title VARCHAR(200), + body TEXT, + FULLTEXT (title,body) + ) ENGINE=InnoDB; + +# Abort the operation in dict_create_index_step by setting +# return status of dict_create_index_tree_step() to DB_OUT_OF_MEMORY +# The newly create dict_index_t should be removed from fts cache +SET @saved_debug_dbug = @@SESSION.debug_dbug; +SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail"; +--error ER_OUT_OF_RESOURCES +CREATE FULLTEXT INDEX idx ON articles(body); +SET SESSION debug_dbug=@saved_debug_dbug; + +# This simply go through ha_innobase::commit_inplace_alter_table +# and do a fts_check_cached_index() +ALTER TABLE articles STATS_PERSISTENT=DEFAULT; + +DROP TABLE articles; + +# This test used to be called innodb_fts.innobase_drop_fts_index_table: + +CREATE TABLE t (a INT, b TEXT) engine=innodb; +SET debug_dbug='+d,alter_table_rollback_new_index'; +-- error ER_UNKNOWN_ERROR +ALTER TABLE t ADD FULLTEXT INDEX (b(64)); +SET SESSION debug_dbug=@saved_debug_dbug; + +DROP TABLE t; diff --git a/mysql-test/suite/innodb_gis/r/1.result b/mysql-test/suite/innodb_gis/r/1.result index 94bd5f3b2e8..094ec0185f8 100644 --- a/mysql-test/suite/innodb_gis/r/1.result +++ b/mysql-test/suite/innodb_gis/r/1.result @@ -787,7 +787,7 @@ drop procedure if exists fn3; create function fn3 () returns point deterministic return ST_GeomFromText("point(1 1)"); show create function fn3; Function sql_mode Create Function character_set_client collation_connection Database Collation -fn3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS point +fn3 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS point DETERMINISTIC return ST_GeomFromText("point(1 1)") latin1 latin1_swedish_ci latin1_swedish_ci select ST_astext(fn3()); diff --git a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result index 78d5f79e311..b8bef9946ec 100644 --- a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result +++ b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result @@ -255,6 +255,7 @@ c1 ST_Astext(c2) ST_Astext(c4) INSERT INTO tab SELECT * FROM tab1; ALTER TABLE tab DROP PRIMARY KEY; ALTER TABLE tab DROP INDEX idx2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TEMPORARY TABLE temp_tab AS SELECT * FROM tab where c1 = c2; INSERT INTO temp_tab SELECT * FROM tab; CREATE SPATIAL INDEX idx2 ON temp_tab(c2); diff --git a/mysql-test/suite/innodb_gis/r/gis.result b/mysql-test/suite/innodb_gis/r/gis.result index fed7592f42b..c0a24a25feb 100644 --- a/mysql-test/suite/innodb_gis/r/gis.result +++ b/mysql-test/suite/innodb_gis/r/gis.result @@ -783,7 +783,7 @@ drop procedure if exists fn3; create function fn3 () returns point deterministic return ST_GeomFromText("point(1 1)"); show create function fn3; Function sql_mode Create Function character_set_client collation_connection Database Collation -fn3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS point +fn3 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS point DETERMINISTIC return ST_GeomFromText("point(1 1)") latin1 latin1_swedish_ci latin1_swedish_ci select ST_astext(fn3()); diff --git a/mysql-test/suite/innodb_gis/t/alter_spatial_index.test b/mysql-test/suite/innodb_gis/t/alter_spatial_index.test index efd6cb6c867..80ecf95bef9 100644 --- a/mysql-test/suite/innodb_gis/t/alter_spatial_index.test +++ b/mysql-test/suite/innodb_gis/t/alter_spatial_index.test @@ -303,7 +303,7 @@ ALTER TABLE tab DROP PRIMARY KEY; ALTER TABLE tab DROP INDEX idx2; # Check spatial index on temp tables - +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TEMPORARY TABLE temp_tab AS SELECT * FROM tab where c1 = c2; INSERT INTO temp_tab SELECT * FROM tab; diff --git a/mysql-test/suite/innodb_gis/t/precise.test b/mysql-test/suite/innodb_gis/t/precise.test index 43cd906782e..9174a100003 100644 --- a/mysql-test/suite/innodb_gis/t/precise.test +++ b/mysql-test/suite/innodb_gis/t/precise.test @@ -65,19 +65,22 @@ select ST_DISTANCE(ST_geomfromtext('linestring(0 0, 3 6, 6 3, 0 0)'), ST_geomfro # Operations tests ---replace_result 23.85542168674699 23.855421686746986 +--replace_result 23.85542168674699 23.855421686746986 7.999999999999999 8 select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))'))); --replace_result 23.85542168674699 23.855421686746986 select ST_astext(ST_Intersection(ST_GeomFromText('LINESTRING(0 0, 50 45, 40 50, 0 0)'), ST_GeomFromText('LINESTRING(50 5, 55 10, 0 45, 50 5)'))); select ST_astext(ST_Intersection(ST_GeomFromText('LINESTRING(0 0, 50 45, 40 50)'), ST_GeomFromText('LINESTRING(50 5, 55 10, 0 45)'))); select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POINT(20 20)'))); select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200)'))); +--replace_result 7.999999999999999 8 select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))); +--replace_result 7.999999999999999 8 select ST_astext(ST_UNION(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))); select ST_astext(ST_intersection(ST_geomfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), ST_geomfromtext('polygon((0 0, 1 1, 0 2, 0 0))'))); select ST_astext(ST_symdifference(ST_geomfromtext('polygon((0 0, 1 0, 0 1, 0 0))'), ST_geomfromtext('polygon((0 0, 1 1, 0 2, 0 0))'))); +--replace_result 7.999999999999999 8 select ST_astext(ST_UNION(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))); # Buffer() tests diff --git a/mysql-test/suite/innodb_zip/disabled.def b/mysql-test/suite/innodb_zip/disabled.def new file mode 100644 index 00000000000..294204f409c --- /dev/null +++ b/mysql-test/suite/innodb_zip/disabled.def @@ -0,0 +1 @@ +cmp_per_index: MDEV-11629 diff --git a/mysql-test/suite/innodb_zip/include/innodb_temp_table_dml.inc b/mysql-test/suite/innodb_zip/include/innodb_temp_table_dml.inc deleted file mode 100644 index 42e0908f810..00000000000 --- a/mysql-test/suite/innodb_zip/include/innodb_temp_table_dml.inc +++ /dev/null @@ -1,40 +0,0 @@ -# insert test -insert into t1 values (100, 1.1, 'pune'); -insert into t1 values (99, 1.2, 'mumbai'); -insert into t1 values (98, 1.3, 'jaipur'); -insert into t1 values (97, 1.4, 'delhi'); -insert into t1 values (96, 1.5, 'ahmedabad'); -select * from t1; -select * from t1 where i = 98; -select * from t1 where i < 100; -# -# add index using alter table table -explain select * from t1 where f > 1.29999; -alter table t1 add index sec_index(f); -explain select * from t1 where f > 1.29999; -select * from t1 where f > 1.29999; -# -explain select * from t1 where i = 100; -alter table t1 add unique index pri_index(i); -explain select * from t1 where i = 100; -select * from t1 where i = 100; -# -# delete test -delete from t1 where i < 97; -select * from t1; -insert into t1 values (96, 1.5, 'kolkata'); -select * from t1; -# -# update test -update t1 set f = 1.44 where c = 'delhi'; -select * from t1; -# -# truncate table -truncate table t1; -insert into t1 values (100, 1.1, 'pune'); -insert into t1 values (99, 1.2, 'mumbai'); -insert into t1 values (98, 1.3, 'jaipur'); -insert into t1 values (97, 1.4, 'delhi'); -insert into t1 values (96, 1.5, 'ahmedabad'); -select * from t1; - diff --git a/mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_stripped.inc b/mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_stripped.inc deleted file mode 100644 index fcefd0cdf7e..00000000000 --- a/mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_stripped.inc +++ /dev/null @@ -1,144 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - ---source include/have_innodb.inc ---source include/have_debug.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 - -# suppress expected warnings. -call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary"); -call mtr.add_suppression("Cannot create file '.*'"); -call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'"); - -################################################################################ -# -# Will test following scenarios: -# 1. Hit crash point on completing drop of all indexes before creation of index -# is commenced. -# 2. Hit crash point after data is updated to system-table and in-memory dict. -# 3. Post truncate recovery, abruptly shutdown the server. -# On restart ensure table state is maintained. -# -################################################################################ - -#----------------------------------------------------------------------------- -# -# create test-bed -# - -let $WL6501_TMP_DIR = `select @@tmpdir`; -let $WL6501_DATA_DIR = `select @@datadir`; -let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err; - -#----------------------------------------------------------------------------- -# -# 1. Hit crash point on completing drop of all indexes before creation of index -# is commenced. -# ---echo "1. Hit crash point on completing drop of all indexes before creation" ---echo " of index is commenced." -eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; -set innodb_strict_mode=off; ---disable_warnings -eval create $wl6501_temp table t ( - i int, f float, c char, - primary key pk(i), unique findex(f), index ck(c)) - engine = innodb row_format = $wl6501_row_fmt - key_block_size = $wl6501_kbs; ---enable_warnings -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -check table t; -# -set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start"; ---source include/expect_crash.inc ---error 2013 -truncate table t; -# ---source include/start_mysqld.inc - -check table t; -select * from t; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -select * from t where f < 2.5; -drop table t; - -#----------------------------------------------------------------------------- -# -# 2. Hit crash point after data is updated to system-table and in-memory dict. -# ---echo "2. Hit crash point after data is updated to system-table and" ---echo " in-memory dict." -eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; -set innodb_strict_mode=off; ---disable_warnings -eval create $wl6501_temp table t ( - i int, f float, c char, - primary key pk(i), unique findex(f), index ck(c)) - engine = innodb row_format = $wl6501_row_fmt - key_block_size = $wl6501_kbs; ---enable_warnings -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -check table t; -# -set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info"; ---source include/expect_crash.inc ---error 2013 -truncate table t; -# ---source include/start_mysqld.inc -check table t; -select * from t; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -select * from t where f < 2.5; -drop table t; - -#----------------------------------------------------------------------------- -# -# 3. Post truncate recovery, abruptly shutdown the server. -# On restart ensure table state is maintained. -# ---echo "3. Post truncate recovery, abruptly shutdown the server." ---echo " On restart ensure table state is maintained." -eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; -set innodb_strict_mode=off; ---disable_warnings -eval create $wl6501_temp table t ( - i int, f float, c char, - primary key pk(i), unique findex(f), index ck(c)) - engine = innodb row_format = $wl6501_row_fmt - key_block_size = $wl6501_kbs; ---enable_warnings -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -check table t; -# -set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete"; ---source include/expect_crash.inc ---error 2013 -truncate table t; -# ---source include/start_mysqld.inc -check table t; -select * from t; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -# ---source include/kill_and_restart_mysqld.inc -# -check table t; -select * from t; -select * from t where f < 2.5; -drop table t; diff --git a/mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc b/mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc index 0939d452dae..424608f251b 100644 --- a/mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc +++ b/mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc @@ -44,7 +44,6 @@ set innodb_strict_mode=off; # --echo "1. Error in assigning undo logs for truncate action." eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; --disable_warnings eval create $wl6501_temp table t ( i int, f float, c char, @@ -71,7 +70,6 @@ drop table t; # --echo "2. Error while preparing for truncate." eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; --disable_warnings eval create $wl6501_temp table t ( i int, f float, c char, @@ -98,7 +96,6 @@ drop table t; # --echo "3. Error while dropping/creating indexes" eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; --disable_warnings eval create $wl6501_temp table t ( i int, f float, c char, @@ -122,7 +119,6 @@ drop table t; # # eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; --disable_warnings eval create $wl6501_temp table t ( i int, f float, c char, @@ -146,7 +142,6 @@ drop table t; # # eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; --disable_warnings eval create temporary table t ( i int, f float, c char, @@ -174,7 +169,6 @@ drop table t; # --echo "4. Error while completing truncate of table involving FTS." eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; --disable_warnings eval create $wl6501_temp table t (i int, f float, c char(100), primary key pk(i), index fk(f), fulltext index ck(c)) @@ -203,7 +197,6 @@ drop table t; # --echo "5. Error while updating sys-tables." eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; --disable_warnings eval create $wl6501_temp table t (i int, f float, c char(100), primary key pk(i), index fk(f), fulltext index ck(c)) @@ -230,5 +223,4 @@ drop table t; # # remove test-bed # -eval set global innodb_file_format = $format; eval set global innodb_file_per_table = $per_table; diff --git a/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc b/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc index 67569d3dae9..bef28a9c484 100644 --- a/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc +++ b/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc @@ -45,7 +45,6 @@ delimiter ;| # create and load the tables. # eval set global innodb_file_per_table = $wl6501_file_per_table; -eval set global innodb_file_format = $wl6501_file_format; --replace_regex /[0-9]+/NUMBER/ eval create table t1 (i int, c1 char(100), c2 char(100), diff --git a/mysql-test/suite/innodb_zip/r/16k.result b/mysql-test/suite/innodb_zip/r/16k.result index 9e8534417b7..bfef368ad15 100644 --- a/mysql-test/suite/innodb_zip/r/16k.result +++ b/mysql-test/suite/innodb_zip/r/16k.result @@ -395,7 +395,7 @@ Table Op Msg_type Msg_text test.t1 check status OK EXPLAIN SELECT * FROM t1 WHERE b LIKE 'adfd%'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL b NULL NULL NULL 15 Using where +1 SIMPLE t1 range b b 769 NULL 12 Using where DROP TABLE t1; # Test 8) Test creating a table that could lead to undo log overflow. CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, diff --git a/mysql-test/suite/innodb_zip/r/create_options.result b/mysql-test/suite/innodb_zip/r/create_options.result index 2d80894c8cd..1c152229b3c 100644 --- a/mysql-test/suite/innodb_zip/r/create_options.result +++ b/mysql-test/suite/innodb_zip/r/create_options.result @@ -1,4 +1,7 @@ SET default_storage_engine=InnoDB; +SET GLOBAL innodb_file_format=`Barracuda`; +Warnings: +Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET GLOBAL innodb_file_per_table=ON; SET SESSION innodb_strict_mode = ON; # Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 @@ -309,6 +312,10 @@ Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelop Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' ALTER TABLE t1 ROW_FORMAT=DYNAMIC; ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. +Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' SET GLOBAL innodb_file_format=Barracuda; Warnings: Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html @@ -340,7 +347,7 @@ Level Code Message SET GLOBAL innodb_file_format=Barracuda; Warnings: Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -# Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and +# Test 8) StrictMode=ON, Make sure ROW_FORMAT=COMPRESSED # and a valid non-zero KEY_BLOCK_SIZE are rejected with # innodb_file_per_table=OFF and that they can be set to default # values during strict mode. @@ -361,7 +368,12 @@ 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 +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +DROP TABLE t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; SHOW WARNINGS; Level Code Message @@ -392,7 +404,11 @@ Level Code Message Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +SHOW WARNINGS; +Level Code Message ALTER TABLE t1 ROW_FORMAT=COMPACT; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; TABLE_NAME ROW_FORMAT CREATE_OPTIONS @@ -837,3 +853,5 @@ TABLE_NAME ROW_FORMAT CREATE_OPTIONS t1 Dynamic row_format=DYNAMIC # Cleanup DROP TABLE t1; +Warnings: +Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb_zip/r/index_large_prefix.result b/mysql-test/suite/innodb_zip/r/index_large_prefix.result index f7591462803..4e57b27dec8 100644 --- a/mysql-test/suite/innodb_zip/r/index_large_prefix.result +++ b/mysql-test/suite/innodb_zip/r/index_large_prefix.result @@ -101,7 +101,7 @@ create index idx1 on worklog5743_1(a2(4000)); Got one of the listed errors show warnings; Level Code Message -Warning 1071 Specified key was too long; max key length is 767 bytes +Error 1071 Specified key was too long; max key length is 767 bytes Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs set global innodb_large_prefix=1; Warnings: @@ -110,7 +110,7 @@ create index idx2 on worklog5743_1(a2(4000)); Got one of the listed errors show warnings; Level Code Message -Warning 1071 Specified key was too long; max key length is 3072 bytes +Error 1071 Specified key was too long; max key length is 3072 bytes Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs create index idx3 on worklog5743_1(a2(436)); ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs @@ -419,7 +419,7 @@ create index idx4 on worklog5743(a1, a2); ERROR 42000: Specified key was too long; max key length is 3072 bytes show warnings; Level Code Message -Warning 1071 Specified key was too long; max key length is 3072 bytes +Error 1071 Specified key was too long; max key length is 3072 bytes Error 1071 Specified key was too long; max key length is 3072 bytes create index idx5 on worklog5743(a1, a5); ERROR 42000: Specified key was too long; max key length is 3072 bytes diff --git a/mysql-test/suite/innodb_zip/r/innochecksum.result b/mysql-test/suite/innodb_zip/r/innochecksum.result index d05f93bd5af..ff1bccfb60c 100644 --- a/mysql-test/suite/innodb_zip/r/innochecksum.result +++ b/mysql-test/suite/innodb_zip/r/innochecksum.result @@ -1,7 +1,6 @@ # Set the environmental variables call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts"); call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); -SET GLOBAL innodb_file_per_table=on; CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB; CREATE INDEX idx1 ON tab1(c2(10)); INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1'); @@ -89,6 +88,4 @@ c1 c2 FOUND /Error while setting value \'strict_crc32\' to \'write\'/ in my_restart.err FOUND /Error while setting value \'strict_innodb\' to \'write\'/ in my_restart.err FOUND /Error while setting value \'crc23\' to \'write\'/ in my_restart.err -# Restart the server DROP TABLE tab1; -SET GLOBAL innodb_file_per_table=default; diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_2.result b/mysql-test/suite/innodb_zip/r/innochecksum_2.result index 649c32b1a87..78d8a1cbf90 100644 --- a/mysql-test/suite/innodb_zip/r/innochecksum_2.result +++ b/mysql-test/suite/innodb_zip/r/innochecksum_2.result @@ -41,7 +41,7 @@ innochecksum Ver #.#.# Copyright (c) YEAR, YEAR , Oracle, MariaDB Corporation Ab and others. InnoDB offline file checksum utility. -Usage: innochecksum [-c] [-s ] [-e ] [-p ] [-v] [-a ] [-n] [-C ] [-w ] [-S] [-D ] [-l ] +Usage: innochecksum [-c] [-s ] [-e ] [-p ] [-v] [-a ] [-n] [-C ] [-w ] [-S] [-D ] [-l ] [-e] -?, --help Displays this help and exits. -I, --info Synonym for --help. -V, --version Displays version information and exits. @@ -63,7 +63,7 @@ Usage: innochecksum [-c] [-s ] [-e ] [-p ] [-v] [-a -D, --page-type-dump=name Dump the page type info for each page in a tablespace. -l, --log=name log output. - -l, --leaf Examine leaf index pages + -e, --leaf Examine leaf index pages -m, --merge=# leaf page count if merge given number of consecutive pages diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_3.result b/mysql-test/suite/innodb_zip/r/innochecksum_3.result index c5c2a7673b3..da7de031f42 100644 --- a/mysql-test/suite/innodb_zip/r/innochecksum_3.result +++ b/mysql-test/suite/innodb_zip/r/innochecksum_3.result @@ -1,6 +1,5 @@ # Set the environmental variables call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts"); -SET GLOBAL innodb_file_per_table=on; [1]: Further Test are for rewrite checksum (innodb|crc32|none) for all ibd file & start the server. CREATE TABLE tab1 (pk INTEGER NOT NULL PRIMARY KEY, linestring_key GEOMETRY NOT NULL, @@ -207,10 +206,10 @@ Filename::tab#.ibd # allow-mismatches,page,start-page,end-page [9]: check the both short and long options "page" and "start-page" when # seek value is larger than file size. -NOT FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err -NOT FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err -NOT FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err -NOT FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err +FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err +FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err +FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err +FOUND /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err [34]: check the invalid upper bound values for options, allow-mismatches, end-page, start-page and page. # innochecksum will fail with error code: 1 NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err @@ -221,7 +220,4 @@ NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_resta NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err -# Restart the server -DROP TABLE tab1; -DROP TABLE tab2; -SET GLOBAL innodb_file_per_table=default; +DROP TABLE tab1,tab2; diff --git a/mysql-test/suite/innodb_zip/r/innodb-create-options.result b/mysql-test/suite/innodb_zip/r/innodb-create-options.result deleted file mode 100644 index 1b92eb71fba..00000000000 --- a/mysql-test/suite/innodb_zip/r/innodb-create-options.result +++ /dev/null @@ -1,870 +0,0 @@ -SET default_storage_engine=InnoDB; -SET GLOBAL innodb_file_format=`Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table=ON; -SET SESSION innodb_strict_mode = ON; -# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 -# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' -DROP TABLE IF EXISTS t1; -Warnings: -Note 1051 Unknown table 'test.t1' -# 'FIXED' is sent to InnoDB since it is used by MyISAM. -# But it is an invalid mode in InnoDB -CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; -ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") -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 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: invalid ROW_FORMAT specifier. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE' -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic -# Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE -# KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -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 = 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 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=2 -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=2 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed key_block_size=1 -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed key_block_size=1 -# Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: invalid ROW_FORMAT specifier. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE' -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed key_block_size=1 -ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=1 -# Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT -ALTER TABLE t1 KEY_BLOCK_SIZE=4; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=1 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed key_block_size=1 -# Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE -# ALTER with each ROW_FORMAT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2 -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL, - `f1` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2 -ALTER TABLE t1 ROW_FORMAT=COMPACT; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=2 -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -# Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE. -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9; -ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") -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. -SET GLOBAL innodb_file_format=Antelope; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -DROP TABLE IF EXISTS t1; -Warnings: -Note 1051 Unknown table 'test.t1' -CREATE TABLE t1 ( i INT ) 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: 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 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; -SHOW WARNINGS; -Level Code Message -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' -SET GLOBAL innodb_file_format=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SET GLOBAL innodb_file_format=Antelope; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -ALTER TABLE t1 ADD COLUMN f1 INT; -Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. -Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL, - `f1` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 -SHOW WARNINGS; -Level Code Message -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -Level Code Message -SET GLOBAL innodb_file_format=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -# Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and -# and a valid non-zero KEY_BLOCK_SIZE are rejected with -# innodb_file_per_table=OFF and that they can be set to default -# values during strict mode. -SET GLOBAL innodb_file_per_table=OFF; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1; -ERROR HY000: Can't create table `test`.`t1` (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 `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 -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; -SHOW WARNINGS; -Level Code Message -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE' -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. -Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT' -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT -ALTER TABLE t1 ROW_FORMAT=DEFAULT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic -SET GLOBAL innodb_file_per_table=ON; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SET GLOBAL innodb_file_per_table=OFF; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -Level Code Message -SET GLOBAL innodb_file_per_table=ON; -################################################## -SET SESSION innodb_strict_mode = OFF; -# Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 -# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' -# 'FIXED' is sent to InnoDB since it is used by MyISAM. -# It is an invalid mode in InnoDB, use COMPACT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; -Warnings: -Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=FIXED -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; -Warnings: -Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=FIXED -# Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE -# KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT key_block_size=1 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT key_block_size=2 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC key_block_size=4 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=2 -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=2 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed key_block_size=1 -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed key_block_size=1 -# Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=FIXED key_block_size=1 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT key_block_size=2 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC key_block_size=4 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT key_block_size=2 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed key_block_size=1 -ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=1 -# Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT key_block_size=2 -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT key_block_size=2 -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC key_block_size=2 -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=2 -ALTER TABLE t1 KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=4 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed key_block_size=2 -# Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE -# ALTER with each ROW_FORMAT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1 -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL, - `f1` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1 -ALTER TABLE t1 ROW_FORMAT=COMPACT; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT key_block_size=1 -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT key_block_size=1 -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC key_block_size=1 -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=1 -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -# Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE, -# it defaults to half of the page size. -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic key_block_size=15 -# Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a -valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT -is reverted to Antelope and then used again when ROW_FORMAT=Barracuda. -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=1 -SET GLOBAL innodb_file_format=Antelope; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -ALTER TABLE t1 ADD COLUMN f1 INT; -Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. -Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. -Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=COMPRESSED key_block_size=1 -SET GLOBAL innodb_file_format=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=1 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -SET GLOBAL innodb_file_format=Antelope; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -SET GLOBAL innodb_file_format=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -# Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a -valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF -and then used again when innodb_file_per_table=ON. -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=2 -SET GLOBAL innodb_file_per_table=OFF; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=2 -SET GLOBAL innodb_file_per_table=ON; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED key_block_size=2 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -SET GLOBAL innodb_file_per_table=OFF; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -SET GLOBAL innodb_file_per_table=ON; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -# Cleanup -DROP TABLE IF EXISTS t1; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb_zip/r/innodb-zip.result b/mysql-test/suite/innodb_zip/r/innodb-zip.result index 47215a1e077..c715f77b9ba 100644 --- a/mysql-test/suite/innodb_zip/r/innodb-zip.result +++ b/mysql-test/suite/innodb_zip/r/innodb-zip.result @@ -1,4 +1,3 @@ -DROP DATABASE IF EXISTS mysqltest_innodb_zip; CREATE DATABASE mysqltest_innodb_zip; USE mysqltest_innodb_zip; SELECT table_name, row_format, data_length, index_length @@ -316,19 +315,16 @@ 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'; table_schema table_name row_format data_length index_length +mysqltest_innodb_zip t7 Dynamic {valid} 0 mysqltest_innodb_zip t8 Compact {valid} 0 mysqltest_innodb_zip t9 Redundant {valid} 0 -drop table t8, t9; +drop table t7, t8, t9; set global innodb_file_per_table = on; set global innodb_file_format = `0`; Warnings: @@ -409,5 +405,4 @@ select @@innodb_file_format_max; @@innodb_file_format_max Barracuda drop table normal_table, zip_table; -USE test; DROP DATABASE mysqltest_innodb_zip; diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug36169.result b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result index 161cef10ad5..bae08bd54a2 100644 --- a/mysql-test/suite/innodb_zip/r/innodb_bug36169.result +++ b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result @@ -1,5 +1 @@ call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size .* for a record on index leaf page."); -SET GLOBAL innodb_file_format='Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table=ON; diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug52745.result b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result index 5ba26753ea6..1556c313994 100644 --- a/mysql-test/suite/innodb_zip/r/innodb_bug52745.result +++ b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result @@ -1,7 +1,4 @@ -SET GLOBAL innodb_file_format='Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table=on; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE bug52745 ( a2 int(10) unsigned DEFAULT NULL, col37 time DEFAULT NULL, @@ -63,7 +60,7 @@ Warnings: Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead Note 1291 Column 'col82' has duplicated value '' in ENUM Note 1291 Column 'col82' has duplicated value '' in ENUM -INSERT INTO bug52745 SET +INSERT IGNORE INTO bug52745 SET col40='0000-00-00 00:00:00', col51=16547, col53='7711484', @@ -128,7 +125,3 @@ Warning 1264 Out of range value for column 'col78' at row 1 Warning 1265 Data truncated for column 'col79' at row 1 Warning 1264 Out of range value for column 'col84' at row 1 DROP TABLE bug52745; -SET GLOBAL innodb_file_format=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table=1; diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug53591.result b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result index 3b10942c2de..0222ad64fa2 100644 --- a/mysql-test/suite/innodb_zip/r/innodb_bug53591.result +++ b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result @@ -1,7 +1,3 @@ -SET GLOBAL innodb_file_format='Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table=on; SET GLOBAL innodb_strict_mode=on; set old_alter_table=0; CREATE TABLE bug53591(a text charset utf8 not null) @@ -12,8 +8,4 @@ SHOW WARNINGS; Level Code Message Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs DROP TABLE bug53591; -SET GLOBAL innodb_file_format=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table=1; SET GLOBAL innodb_strict_mode=DEFAULT; diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug56680.result b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result index 92b589c6b7e..c509c5bad21 100644 --- a/mysql-test/suite/innodb_zip/r/innodb_bug56680.result +++ b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result @@ -1,8 +1,4 @@ SET GLOBAL tx_isolation='REPEATABLE-READ'; -SET GLOBAL innodb_file_format=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table=on; CREATE TABLE bug56680( a INT AUTO_INCREMENT PRIMARY KEY, b CHAR(1), @@ -121,5 +117,3 @@ Table Op Msg_type Msg_text test.bug56680_2 check status OK DROP TABLE bug56680_2; DROP TABLE bug56680; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html diff --git a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result index d44c7e33fe3..20deee57d46 100644 --- a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result +++ b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result @@ -1,9 +1,5 @@ SET default_storage_engine=InnoDB; call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page."); -set global innodb_file_format="Barracuda"; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -set global innodb_file_per_table=1; set global innodb_large_prefix=1; Warnings: Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html @@ -102,6 +98,7 @@ create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2; create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4; create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8; create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16; +set sql_mode=''; set global innodb_large_prefix=0; Warnings: Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html @@ -284,6 +281,7 @@ Error 1071 Specified key was too long; max key length is 3072 bytes create index idx7 on worklog5743_16(a1, a2(2000), a3(1068)); show warnings; Level Code Message +set sql_mode=default; insert into worklog5743_1 values(9, repeat("a", 10000)); insert into worklog5743_2 values(9, repeat("a", 10000)); insert into worklog5743_4 values(9, repeat("a", 10000)); @@ -410,6 +408,7 @@ a4 varchar(3072), a5 varchar(3069), a6 varchar(3068)) ROW_FORMAT=DYNAMIC; +set sql_mode=''; create index idx1 on worklog5743(a2); Warnings: Warning 1071 Specified key was too long; max key length is 3072 bytes @@ -447,6 +446,7 @@ worklog5743 CREATE TABLE `worklog5743` ( KEY `idx3` (`a4`), KEY `idx6` (`a1`,`a6`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +set sql_mode=default; insert into worklog5743 values(9, repeat("a", 20000), repeat("a", 3073), repeat("a", 3072), repeat("a", 3069), @@ -491,6 +491,7 @@ connection con1; select a = repeat("a", 20000) from worklog5743; a = repeat("a", 20000) 1 +disconnect con1; connection con2; SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; select @@session.tx_isolation; @@ -500,11 +501,13 @@ select a = repeat("x", 25000) from worklog5743; a = repeat("x", 25000) 1 1 +disconnect con2; connection default; rollback; drop table worklog5743; ### Test 7 ### create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC; +set statement sql_mode = '' for create index idx1 on worklog5743(a(3073)); Warnings: Warning 1071 Specified key was too long; max key length is 3072 bytes @@ -529,16 +532,7 @@ create index idx on worklog5743(a(768)); ERROR HY000: Index column size too large. The maximum column size is 767 bytes create index idx2 on worklog5743(a(767)); drop table worklog5743; -SET GLOBAL innodb_file_format=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL innodb_file_per_table=1; SET GLOBAL innodb_large_prefix=1; Warnings: Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET GLOBAL innodb_strict_mode = DEFAULT; -connection con1; -disconnect con1; -connection con2; -disconnect con2; -connection default; diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result similarity index 83% rename from mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result rename to mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result index cb19c66914e..d20cc452612 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result +++ b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result @@ -1,27 +1,10 @@ call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); -call mtr.add_suppression("InnoDB: Error: Tablespace flags .* corrupted unused .*"); -call mtr.add_suppression("InnoDB: Tablespace flags: .* corrupted in file: .* "); call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*"); -call mtr.add_suppression("InnoDB: Page for tablespace .* "); -flush tables; -SET GLOBAL innodb_file_per_table = 1; -SELECT @@innodb_file_per_table; -@@innodb_file_per_table -1 -SET GLOBAL innodb_file_format = `Barracuda`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SELECT @@innodb_file_format; -@@innodb_file_format -Barracuda +call mtr.add_suppression("InnoDB: Page for tablespace "); +call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x"); +FLUSH TABLES; 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; @@ -42,7 +25,6 @@ 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` @@ -51,22 +33,8 @@ 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`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -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; @@ -95,10 +63,11 @@ 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 @saved_debug_dbug = @@SESSION.debug_dbug; 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"; +SET SESSION debug_dbug=@saved_debug_dbug; restore: t1 .ibd and .cfg files ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; DROP TABLE test_wl5522.t1; @@ -112,36 +81,36 @@ 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=@saved_debug_dbug; SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; ERROR HY000: Got error 44 't1.ibd -SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; 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: Index for table 't1' is corrupt; try to repair it -SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; 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: Index for table 't1' is corrupt; try to repair it -SET SESSION debug_dbug="-d,ib_import_cluster_root_adjust_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,ib_import_cluster_failure"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; ERROR HY000: Index for table 't1' is corrupt; try to repair it -SET SESSION debug_dbug="-d,ib_import_cluster_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; 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: Index for table 't1' is corrupt; try to repair it -SET SESSION debug_dbug="-d,ib_import_sec_root_adjust_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; 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: Index for table 't1' is corrupt; try to repair it -SET SESSION debug_dbug="-d,ib_import_set_max_rowid_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; unlink: t1.ibd unlink: t1.cfg DROP TABLE test_wl5522.t1; @@ -153,7 +122,7 @@ c4 VARCHAR(2048), INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +ROW_FORMAT=COMPRESSED; SET GLOBAL INNODB_PURGE_STOP_NOW=ON; SET GLOBAL innodb_disable_background_merge=ON; SET GLOBAL innodb_monitor_reset = ibuf_merges; @@ -197,7 +166,7 @@ t1 CREATE TABLE `t1` ( 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 +) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED SELECT c1, c2 FROM test_wl5522.t1; c1 c2 2 32 @@ -329,7 +298,7 @@ c4 VARCHAR(2048), INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +ROW_FORMAT=COMPRESSED; SELECT c1, c2 FROM test_wl5522.t1; c1 c2 ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; @@ -453,11 +422,11 @@ t1 CREATE TABLE `t1` ( 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 +) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED 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 +INSERT IGNORE INTO test_wl5522.t1 VALUES (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); Warnings: Warning 1265 Data truncated for column 'c2' at row 1 @@ -485,7 +454,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -495,10 +464,10 @@ 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"; +SET SESSION debug_dbug="+d,buf_page_import_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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -511,7 +480,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -524,7 +493,7 @@ 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: Index for table 't1' is corrupt; try to repair it -SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -537,7 +506,7 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -550,7 +519,7 @@ 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 't1.ibd -SET SESSION debug_dbug="-d,fil_space_create_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -563,7 +532,7 @@ 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 't1.ibd -SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -575,8 +544,8 @@ 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"; +ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Data structure corruption +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd unlink: t1.cfg @@ -587,8 +556,3 @@ 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=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET SESSION innodb_strict_mode=1; diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-zip.result b/mysql-test/suite/innodb_zip/r/wl5522_zip.result similarity index 88% rename from mysql-test/suite/innodb/r/innodb-wl5522-zip.result rename to mysql-test/suite/innodb_zip/r/wl5522_zip.result index 42b2b6a527b..b4c0597dcf9 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-zip.result +++ b/mysql-test/suite/innodb_zip/r/wl5522_zip.result @@ -1,19 +1,5 @@ call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT."); -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`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -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), @@ -107,20 +93,7 @@ a b c 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`; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -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; @@ -213,8 +186,8 @@ COUNT(*) 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; +c2 INT, INDEX(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; @@ -234,8 +207,8 @@ 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; +c2 INT, INDEX(c2)) ENGINE=InnoDB +ROW_FORMAT=COMPRESSED; ALTER TABLE t1 DISCARD TABLESPACE; SELECT * FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` @@ -431,7 +404,7 @@ 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; +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; ALTER TABLE t1 DISCARD TABLESPACE; SELECT * FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` @@ -500,8 +473,3 @@ 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=Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -SET GLOBAL INNODB_FILE_PER_TABLE=1; -SET SESSION innodb_strict_mode=1; diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result index e874ab1a37a..554bb2892f6 100644 --- a/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result +++ b/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result @@ -5,9 +5,6 @@ set global innodb_file_per_table = on; "1. Hit crash point while writing redo log." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -44,9 +41,6 @@ drop table t; "2. Hit crash point on completion of redo log write." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -86,9 +80,6 @@ drop table t; "3. Hit crash point while dropping indexes." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -127,9 +118,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -168,9 +156,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -211,9 +196,6 @@ drop table t; " of index is commenced." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -253,9 +235,6 @@ drop table t; "5. Hit crash point while creating indexes." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -294,9 +273,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -335,9 +311,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -378,9 +351,6 @@ drop table t; " in-memory dict." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -420,9 +390,6 @@ drop table t; "7. Hit crash point before/after log checkpoint is done." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -456,9 +423,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -495,7 +459,4 @@ i f c 1 1.1 a 2 2.2 b drop table t; -set global innodb_file_format = Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html set global innodb_file_per_table = 1; diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result index cb8a4d5a157..1a02c1a711a 100644 --- a/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result +++ b/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result @@ -5,9 +5,6 @@ set global innodb_file_per_table = on; "1. Hit crash point while writing redo log." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -24,9 +21,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_while_writing_redo_log"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -43,9 +41,6 @@ drop table t; "2. Hit crash point on completion of redo log write." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -62,9 +57,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -84,9 +80,6 @@ drop table t; "3. Hit crash point while dropping indexes." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -103,9 +96,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -124,9 +118,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -143,9 +134,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -164,9 +156,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -183,9 +172,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -206,9 +196,6 @@ drop table t; " of index is commenced." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -225,9 +212,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -247,9 +235,6 @@ drop table t; "5. Hit crash point while creating indexes." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -266,9 +251,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_create_of_clust_index"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -287,9 +273,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -306,9 +289,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -327,9 +311,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -346,9 +327,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_create_of_sec_index"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -369,9 +351,6 @@ drop table t; " in-memory dict." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -388,9 +367,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -410,9 +390,6 @@ drop table t; "7. Hit crash point before/after log checkpoint is done." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -429,9 +406,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_before_log_removal"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -445,9 +423,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -464,9 +439,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_after_truncate_done"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -483,18 +459,16 @@ i f c 1 1.1 a 2 2.2 b drop table t; -set global innodb_file_format = Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html set global innodb_file_per_table = 1; call mtr.add_suppression("does not exist in the InnoDB internal"); +Warnings: +Error 145 Table './mtr/test_suppressions' is marked as crashed and should be repaired +Error 1194 Table 'test_suppressions' is marked as crashed and should be repaired +Error 1034 1 client is using or hasn't closed the table properly set global innodb_file_per_table = on; "1. Hit crash point on completing drop of all indexes before creation" " of index is commenced." set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html set innodb_strict_mode=off; create temporary table t ( i int, f float, c char, @@ -511,9 +485,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check Error Table 'test.t' doesn't exist @@ -521,9 +496,6 @@ test.t check status Operation failed "2. Hit crash point after data is updated to system-table and" " in-memory dict." set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html set innodb_strict_mode=off; create temporary table t ( i int, f float, c char, @@ -540,14 +512,11 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check Error Table 'test.t' doesn't exist test.t check status Operation failed -set global innodb_file_format = Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html -set global innodb_file_per_table = 1; diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result index 74f1e9dd1ad..b5fea6382ff 100644 --- a/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result +++ b/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result @@ -5,9 +5,6 @@ set global innodb_file_per_table = on; "1. Hit crash point while writing redo log." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -24,9 +21,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_while_writing_redo_log"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -43,9 +41,6 @@ drop table t; "2. Hit crash point on completion of redo log write." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -62,9 +57,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -84,9 +80,6 @@ drop table t; "3. Hit crash point while dropping indexes." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -103,9 +96,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -124,9 +118,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -143,9 +134,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -164,9 +156,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -183,9 +172,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -206,9 +196,6 @@ drop table t; " of index is commenced." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -225,9 +212,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -247,9 +235,6 @@ drop table t; "5. Hit crash point while creating indexes." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -266,9 +251,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_create_of_clust_index"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -287,9 +273,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -306,9 +289,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -327,9 +311,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -346,9 +327,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_create_of_sec_index"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -369,9 +351,6 @@ drop table t; " in-memory dict." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -388,9 +367,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -410,9 +390,6 @@ drop table t; "7. Hit crash point before/after log checkpoint is done." use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -429,9 +406,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_before_log_removal"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -445,9 +423,6 @@ i f c drop table t; use test; set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html SET innodb_strict_mode=OFF; create table t ( i int, f float, c char, @@ -464,9 +439,10 @@ check table t; Table Op Msg_type Msg_text test.t check status OK set session debug = "+d,ib_trunc_crash_after_truncate_done"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead truncate table t; ERROR HY000: Lost connection to MySQL server during query -# restart check table t; Table Op Msg_type Msg_text test.t check status OK @@ -483,7 +459,4 @@ i f c 1 1.1 a 2 2.2 b drop table t; -set global innodb_file_format = Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html set global innodb_file_per_table = 1; diff --git a/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result b/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result index 9c197737137..0064cf2a469 100644 --- a/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result +++ b/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result @@ -20,32 +20,27 @@ set i = i + 1; end while; end| set global innodb_file_per_table = 1; -set global innodb_file_format = 'Antelope'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html create table tNUMBER (i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER), index cNUMBER_idx(cNUMBER)) engine=innodb row_format=compact key_block_size=NUMBER; Warnings: -Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER. +Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER unless ROW_FORMAT=COMPRESSED. create table t2 (i int, c1 char(100), c2 char(100), index c1_idx(c1)) engine=innodb row_format=compact key_block_size=16; Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. create temporary table t3 (i int, c1 char(100), c2 char(100), index c1_idx(c1)) engine=innodb row_format=compact key_block_size=16; Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. select count(*) from t1; count(*) @@ -140,9 +135,6 @@ set i = i + 1; end while; end| set global innodb_file_per_table = 1; -set global innodb_file_format = 'Barracuda'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html create table tNUMBER (i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER), index cNUMBER_idx(cNUMBER)) @@ -158,6 +150,11 @@ create temporary table t3 index c1_idx(c1)) engine=innodb row_format=compressed key_block_size=16; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE. +Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC. select count(*) from t1; count(*) 0 @@ -251,9 +248,6 @@ set i = i + 1; end while; end| set global innodb_file_per_table = 0; -set global innodb_file_format = 'Antelope'; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html create table tNUMBER (i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER), index cNUMBER_idx(cNUMBER)) @@ -261,7 +255,6 @@ engine=innodb row_format=compact key_block_size=NUMBER; Warnings: Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER. create table t2 (i int, c1 char(100), c2 char(100), @@ -270,7 +263,6 @@ engine=innodb row_format=compact key_block_size=16; Warnings: Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. create temporary table t3 (i int, c1 char(100), c2 char(100), @@ -278,8 +270,7 @@ index c1_idx(c1)) engine=innodb row_format=compact key_block_size=16; Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. select count(*) from t1; count(*) diff --git a/mysql-test/suite/innodb_zip/r/wl6915_1.result b/mysql-test/suite/innodb_zip/r/wl6915_1.result deleted file mode 100644 index bba81098e9d..00000000000 --- a/mysql-test/suite/innodb_zip/r/wl6915_1.result +++ /dev/null @@ -1,2079 +0,0 @@ -call mtr.ADD_suppression(".*Resizing redo log.*"); -call mtr.ADD_suppression(".*Starting to delete and rewrite log files.*"); -call mtr.ADD_suppression(".*New log files created.*"); -SELECT @@global.innodb_undo_tablespaces; -@@global.innodb_undo_tablespaces -0 -CREATE PROCEDURE populate_tables(IN id VARCHAR(10)) -begin -declare n int default 20; -set global innodb_file_per_table=on; -DROP TABLE IF EXISTS t1,t2,t3,t4; -CREATE TEMPORARY TABLE t1_temp(c1 int NOT NULL, -c2 int NOT NULL, -c3 char(255) NOT NULL, -c4 text(600) NOT NULL, -c5 blob(600) NOT NULL, -c6 varchar(600) NOT NULL, -c7 varchar(600) NOT NULL, -c8 datetime, -c9 decimal(6,3), -PRIMARY KEY (c1), -INDEX (c3,c4(50),c5(50)), -INDEX (c2)) -ENGINE=InnoDB ROW_FORMAT=redundant; -set @s = concat("CREATE TABLE t1",id," ( c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=redundant;"); -PREPARE createTable FROM @s; -EXECUTE createTable; -DEALLOCATE PREPARE createTable; -CREATE TEMPORARY TABLE t2_temp(c1 int NOT NULL, -c2 int NOT NULL, -c3 char(255) NOT NULL, -c4 text(600) NOT NULL, -c5 blob(600) NOT NULL, -c6 varchar(600) NOT NULL, -c7 varchar(600) NOT NULL, -c8 datetime, -c9 decimal(6,3), -PRIMARY KEY (c1), -INDEX (c3,c4(50),c5(50)), -INDEX (c2)) -ENGINE=InnoDB ROW_FORMAT=compact; -set @s = concat("CREATE TABLE t2",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compact;"); -PREPARE createTable FROM @s; -EXECUTE createTable; -DEALLOCATE PREPARE createTable; -CREATE TEMPORARY TABLE t3_temp(c1 int NOT NULL, -c2 int NOT NULL, -c3 char(255) NOT NULL, -c4 text(600) NOT NULL, -c5 blob(600) NOT NULL, -c6 varchar(600) NOT NULL, -c7 varchar(600) NOT NULL, -c8 datetime, -c9 decimal(6,3), -PRIMARY KEY (c1), -INDEX (c3,c4(50),c5(50)), -INDEX (c2)) -ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4; -set @s = concat("CREATE TABLE t3",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4;"); -PREPARE createTable FROM @s; -EXECUTE createTable; -DEALLOCATE PREPARE createTable; -CREATE TEMPORARY TABLE t4_temp(c1 int NOT NULL, -c2 int NOT NULL, -c3 char(255) NOT NULL, -c4 text(600) NOT NULL, -c5 blob(600) NOT NULL, -c6 varchar(600) NOT NULL, -c7 varchar(600) NOT NULL, -c8 datetime, -c9 decimal(6,3), -PRIMARY KEY (c1), -INDEX (c3,c4(50),c5(50)), -INDEX (c2)) -ENGINE=InnoDB ROW_FORMAT=dynamic; -set @s = concat("CREATE TABLE t4",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=dynamic;"); -PREPARE createTable FROM @s; -EXECUTE createTable; -DEALLOCATE PREPARE createTable; -while (n > 0) do -START TRANSACTION; -set @s = concat("INSERT INTO t1",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t1_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30), -REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70), -REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70), -NOW(),(100.55+n)); -set @s = concat("INSERT INTO t2",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t2_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30), -REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70), -REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70), -NOW(),(100.55+n)); -savepoint a; -set @s = concat("INSERT INTO t3",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t3_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30), -REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70), -REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70), -NOW(),(100.55+n)); -savepoint b; -set @s = concat("INSERT INTO t4",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t4_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30), -REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70), -REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70), -NOW(),(100.55+n)); -if (n > 10) then -if (n > 10 and n <=12) then -ROLLBACK TO SAVEPOINT a; -COMMIT; -end if; -if (n > 12 and n < 15) then -ROLLBACK TO SAVEPOINT b; -COMMIT; -end if; -if (n > 15) then -COMMIT; -end if; -else -if (n > 5) then -START TRANSACTION; -DELETE FROM t1_temp WHERE c1 > 10 ; -DELETE FROM t2_temp WHERE c1 > 10 ; -DELETE FROM t3_temp WHERE c1 > 10 ; -DELETE FROM t4_temp WHERE c1 > 10 ; -rollback; -START TRANSACTION; -update t1_temp set c1 = c1 + 1000 WHERE c1 > 10; -update t2_temp set c1 = c1 + 1000 WHERE c1 > 10; -update t3_temp set c1 = c1 + 1000 WHERE c1 > 10; -update t4_temp set c1 = c1 + 1000 WHERE c1 > 10; -rollback; -end if; -end if; -if (n < 5) then -rollback; -end if; -FLUSH logs; -ALTER TABLE t1_temp DROP PRIMARY KEY; -ALTER TABLE t1_temp ADD PRIMARY KEY (c1,c3(10),c4(10)); -ALTER TABLE t2_temp DROP PRIMARY KEY; -ALTER TABLE t2_temp ADD PRIMARY KEY (c1,c3(10),c4(10)); -ALTER TABLE t3_temp DROP PRIMARY KEY; -ALTER TABLE t3_temp ADD PRIMARY KEY (c1,c3(10),c4(10)); -ALTER TABLE t4_temp DROP PRIMARY KEY; -ALTER TABLE t4_temp ADD PRIMARY KEY (c1,c3(10),c4(10)); -FLUSH tables; -START TRANSACTION; -set @s = concat("INSERT INTO t1",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t1_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30), -REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), -REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), -NOW(),(100.55+n+100)); -set @s = concat("INSERT INTO t2",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t2_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30), -REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), -REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), -NOW(),(100.55+n+100)); -set @s = concat("INSERT INTO t3",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t3_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30), -REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), -REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), -NOW(),(100.55+n+100)); -set @s = concat("INSERT INTO t4",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t4_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30), -REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), -REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), -NOW(),(100.55+n+100)); -DELETE FROM t1_temp WHERE c1 between 100 and 110; -DELETE FROM t2_temp WHERE c1 between 100 and 110; -DELETE FROM t3_temp WHERE c1 between 100 and 110; -DELETE FROM t4_temp WHERE c1 between 100 and 110; -update t1_temp set c1 = c1+1 WHERE c1>110; -update t2_temp set c1 = c1+1 WHERE c1>110; -update t3_temp set c1 = c1+1 WHERE c1>110; -update t4_temp set c1 = c1+1 WHERE c1>110; -savepoint a; -set @s = concat("INSERT INTO t1",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t1_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), -REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), -REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), -NOW(),(100.55+n+100)); -set @s = concat("INSERT INTO t2",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t2_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), -REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), -REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), -NOW(),(100.55+n+100)); -set @s = concat("INSERT INTO t3",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t3_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), -REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), -REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), -NOW(),(100.55+n+100)); -set @s = concat("INSERT INTO t4",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t4_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), -REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), -REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), -NOW(),(100.55+n+100)); -savepoint b; -set @s = concat("INSERT INTO t1",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t1_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), -REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), -REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), -NOW(),(100.55+n+100)); -set @s = concat("INSERT INTO t2",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t2_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), -REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), -REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), -NOW(),(100.55+n+100)); -set @s = concat("INSERT INTO t3",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t3_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), -REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), -REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), -NOW(),(100.55+n+100)); -set @s = concat("INSERT INTO t4",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); -PREPARE insertIntoTable FROM @s; -EXECUTE insertIntoTable; -DEALLOCATE PREPARE insertIntoTable; -INSERT INTO t4_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), -REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), -REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), -NOW(),(100.55+n+100)); -savepoint c; -rollback to b; -rollback to a; -COMMIT; -COMMIT; -rollback; -set n = n - 1; -end while; -end| -connect con1,localhost,root,,; -connect con2,localhost,root,,; -#---client 1 : dml operation ---" -connection con1; -#---client 2 : dml operation ---" -connection con2; -# In connection 1 -connection con1; -SELECT count(*) FROM t1_1; -count(*) -36 -SELECT count(*) FROM t2_1; -count(*) -36 -SELECT count(*) FROM t3_1; -count(*) -34 -SELECT count(*) FROM t4_1; -count(*) -32 -SELECT c1 FROM t1_1; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t2_1; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t3_1; -c1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t4_1; -c1 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT count(*) FROM t1_temp; -count(*) -26 -SELECT count(*) FROM t2_temp; -count(*) -26 -SELECT count(*) FROM t3_temp; -count(*) -24 -SELECT count(*) FROM t4_temp; -count(*) -22 -SELECT c1 FROM t1_temp; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t2_temp; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t3_temp; -c1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t4_temp; -c1 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -# In connection 2 -connection con2; -SELECT count(*) FROM t1_2; -count(*) -36 -SELECT count(*) FROM t2_2; -count(*) -36 -SELECT count(*) FROM t3_2; -count(*) -34 -SELECT count(*) FROM t4_2; -count(*) -32 -SELECT c1 FROM t1_2; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t2_2; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t3_2; -c1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t4_2; -c1 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT count(*) FROM t1_temp; -count(*) -26 -SELECT count(*) FROM t2_temp; -count(*) -26 -SELECT count(*) FROM t3_temp; -count(*) -24 -SELECT count(*) FROM t4_temp; -count(*) -22 -SELECT c1 FROM t1_temp; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t2_temp; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t3_temp; -c1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t4_temp; -c1 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -# In connection 1 -connection con1; -set AUTOCOMMIT = 0; -ALTER TABLE t1_temp DROP PRIMARY KEY; -ALTER TABLE t1_temp ADD PRIMARY KEY (c1); -ALTER TABLE t2_temp DROP PRIMARY KEY; -ALTER TABLE t2_temp ADD PRIMARY KEY (c1); -ALTER TABLE t3_temp DROP PRIMARY KEY; -ALTER TABLE t3_temp ADD PRIMARY KEY (c1); -ALTER TABLE t4_temp DROP PRIMARY KEY; -ALTER TABLE t4_temp ADD PRIMARY KEY (c1); -INSERT INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -ERROR 23000: Duplicate entry '20' for key 'PRIMARY' -insert ignore into t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -Warnings: -Warning 1062 Duplicate entry '20' for key 'PRIMARY' -INSERT INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -ERROR 23000: Duplicate entry '20' for key 'PRIMARY' -insert ignore into t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -Warnings: -Warning 1062 Duplicate entry '20' for key 'PRIMARY' -INSERT INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -ERROR 23000: Duplicate entry '20' for key 'PRIMARY' -insert ignore into t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -Warnings: -Warning 1062 Duplicate entry '20' for key 'PRIMARY' -INSERT INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -ERROR 23000: Duplicate entry '20' for key 'PRIMARY' -insert ignore into t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -Warnings: -Warning 1062 Duplicate entry '20' for key 'PRIMARY' -INSERT INTO t1_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55), -(20,1,'a','a','a','a','a',NOW(),100.55); -ERROR 23000: Duplicate entry '20' for key 'PRIMARY' -INSERT INTO t2_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55), -(20,1,'a','a','a','a','a',NOW(),100.55); -ERROR 23000: Duplicate entry '20' for key 'PRIMARY' -INSERT INTO t3_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55), -(20,1,'a','a','a','a','a',NOW(),100.55); -ERROR 23000: Duplicate entry '20' for key 'PRIMARY' -INSERT INTO t4_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55), -(20,1,'a','a','a','a','a',NOW(),100.55); -ERROR 23000: Duplicate entry '20' for key 'PRIMARY' -set AUTOCOMMIT = 1; -SELECT c1,c2 FROM t1_temp WHERE c1 in (20,1); -c1 c2 -20 20 -SELECT c1,c2 FROM t2_temp WHERE c1 in (20,1); -c1 c2 -20 20 -SELECT c1,c2 FROM t3_temp WHERE c1 in (20,1); -c1 c2 -20 20 -SELECT c1,c2 FROM t4_temp WHERE c1 in (20,1); -c1 c2 -20 20 -REPLACE INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -REPLACE INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -REPLACE INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -REPLACE INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t1_temp WHERE c1 = 20; -c1 c2 c3 c4 c5 c6 c7 c9 -20 1 a a a a a 100.550 -SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t2_temp WHERE c1 = 20; -c1 c2 c3 c4 c5 c6 c7 c9 -20 1 a a a a a 100.550 -SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t3_temp WHERE c1 = 20; -c1 c2 c3 c4 c5 c6 c7 c9 -20 1 a a a a a 100.550 -SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t4_temp WHERE c1 = 20; -c1 c2 c3 c4 c5 c6 c7 c9 -20 1 a a a a a 100.550 -update ignore t1_temp set c1 = 20 WHERE c1 = 140 ; -update ignore t2_temp set c1 = 20 WHERE c1 = 140 ; -update ignore t3_temp set c1 = 20 WHERE c1 = 140 ; -update ignore t4_temp set c1 = 20 WHERE c1 = 140 ; -SELECT count(*) FROM t1_temp WHERE c1 = 140; -count(*) -1 -SELECT count(*) FROM t2_temp WHERE c1 = 140; -count(*) -1 -SELECT count(*) FROM t3_temp WHERE c1 = 140; -count(*) -1 -SELECT count(*) FROM t4_temp WHERE c1 = 140; -count(*) -1 -ALTER TABLE t1_temp ADD COLUMN c10 int default 99 , -ADD COLUMN c11 varchar(100) default 'test'; -ALTER TABLE t1_temp DROP PRIMARY KEY; -ALTER TABLE t1_temp ADD PRIMARY KEY (c1); -INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55); -SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0; -c1 c2 c3 c4 c5 c6 c7 c9 c10 c11 --1 -1 a a a a a 100.550 99 test -SELECT count(*) FROM t1_temp WHERE c10 = 99 and c11 like 'test'; -count(*) -27 -INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55) -ON DUPLICATE KEY UPDATE c1=-2,c2=-2; -SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0; -c1 c2 c3 c4 c5 c6 c7 c9 c10 c11 --2 -2 a a a a a 100.550 99 test -DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1; -disconnect con1; -connection con2; -DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2; -disconnect con2; -connection default; -connect con1,localhost,root,,; -connect con2,localhost,root,,; -connection con1; -call populate_tables('_1');; -connection con2; -call populate_tables('_2');; -"#connection 1 - verify tables" -connection con1; -SELECT count(*) FROM t1_1; -count(*) -36 -SELECT count(*) FROM t2_1; -count(*) -36 -SELECT count(*) FROM t3_1; -count(*) -34 -SELECT count(*) FROM t4_1; -count(*) -32 -SELECT c1 FROM t1_1; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t2_1; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t3_1; -c1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t4_1; -c1 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT count(*) FROM t1_temp; -count(*) -26 -SELECT count(*) FROM t2_temp; -count(*) -26 -SELECT count(*) FROM t3_temp; -count(*) -24 -SELECT count(*) FROM t4_temp; -count(*) -22 -SELECT c1 FROM t1_temp; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t2_temp; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t3_temp; -c1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t4_temp; -c1 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1; -disconnect con1; -"#connection 2 - verify tables" -connection con2; -SELECT count(*) FROM t1_2; -count(*) -36 -SELECT count(*) FROM t2_2; -count(*) -36 -SELECT count(*) FROM t3_2; -count(*) -34 -SELECT count(*) FROM t4_2; -count(*) -32 -SELECT c1 FROM t1_2; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t2_2; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t3_2; -c1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t4_2; -c1 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT count(*) FROM t1_temp; -count(*) -26 -SELECT count(*) FROM t2_temp; -count(*) -26 -SELECT count(*) FROM t3_temp; -count(*) -24 -SELECT count(*) FROM t4_temp; -count(*) -22 -SELECT c1 FROM t1_temp; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t2_temp; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t3_temp; -c1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t4_temp; -c1 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2; -disconnect con2; -connection default; -connect con1,localhost,root,,; -connect con2,localhost,root,,; -connection con1; -call populate_tables('_1');; -connection con2; -call populate_tables('_2');; -"#connection 1 - verify tables" -connection con1; -SELECT count(*) FROM t1_1; -count(*) -36 -SELECT count(*) FROM t2_1; -count(*) -36 -SELECT count(*) FROM t3_1; -count(*) -34 -SELECT count(*) FROM t4_1; -count(*) -32 -SELECT c1 FROM t1_1; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t2_1; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t3_1; -c1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t4_1; -c1 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT count(*) FROM t1_temp; -count(*) -26 -SELECT count(*) FROM t2_temp; -count(*) -26 -SELECT count(*) FROM t3_temp; -count(*) -24 -SELECT count(*) FROM t4_temp; -count(*) -22 -SELECT c1 FROM t1_temp; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t2_temp; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t3_temp; -c1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t4_temp; -c1 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1; -disconnect con1; -"#connection 2 - verify tables" -connection con2; -SELECT count(*) FROM t1_2; -count(*) -36 -SELECT count(*) FROM t2_2; -count(*) -36 -SELECT count(*) FROM t3_2; -count(*) -34 -SELECT count(*) FROM t4_2; -count(*) -32 -SELECT c1 FROM t1_2; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t2_2; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t3_2; -c1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT c1 FROM t4_2; -c1 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -SELECT count(*) FROM t1_temp; -count(*) -26 -SELECT count(*) FROM t2_temp; -count(*) -26 -SELECT count(*) FROM t3_temp; -count(*) -24 -SELECT count(*) FROM t4_temp; -count(*) -22 -SELECT c1 FROM t1_temp; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t2_temp; -c1 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t3_temp; -c1 -5 -6 -7 -8 -9 -10 -13 -14 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -SELECT c1 FROM t4_temp; -c1 -5 -6 -7 -8 -9 -10 -15 -16 -17 -18 -19 -20 -122 -124 -126 -128 -130 -132 -134 -136 -138 -140 -DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2; -disconnect con2; -connection default; -DROP PROCEDURE populate_tables; diff --git a/mysql-test/suite/innodb_zip/t/create_options.test b/mysql-test/suite/innodb_zip/t/create_options.test index 1a3dbdff90a..86ef141cae8 100644 --- a/mysql-test/suite/innodb_zip/t/create_options.test +++ b/mysql-test/suite/innodb_zip/t/create_options.test @@ -63,10 +63,11 @@ SET default_storage_engine=InnoDB; --disable_query_log # These values can change during the test +LET $innodb_file_format_orig=`select @@innodb_file_format`; LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`; -LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; --enable_query_log +SET GLOBAL innodb_file_format=`Barracuda`; SET GLOBAL innodb_file_per_table=ON; # The first half of these tests are with strict mode ON. @@ -242,8 +243,9 @@ SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION ALTER TABLE t1 ROW_FORMAT=COMPRESSED; SHOW WARNINGS; ---error 1478 +--error ER_ILLEGAL_HA_CREATE_OPTION ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; SET GLOBAL innodb_file_format=Barracuda; DROP TABLE t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; @@ -257,7 +259,7 @@ ALTER TABLE t1 ADD COLUMN f2 INT; SHOW WARNINGS; SET GLOBAL innodb_file_format=Barracuda; ---echo # Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and +--echo # Test 8) StrictMode=ON, Make sure ROW_FORMAT=COMPRESSED --echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with --echo # innodb_file_per_table=OFF and that they can be set to default --echo # values during strict mode. @@ -269,8 +271,10 @@ SHOW WARNINGS; --error ER_ILLEGAL_HA,1005 CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; SHOW WARNINGS; ---error 1005 CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE t1; CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; SHOW WARNINGS; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; @@ -287,8 +291,9 @@ SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION ALTER TABLE t1 ROW_FORMAT=COMPRESSED; SHOW WARNINGS; ---error 1478 ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SHOW WARNINGS; ALTER TABLE t1 ROW_FORMAT=COMPACT; SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ALTER TABLE t1 ROW_FORMAT=REDUNDANT; @@ -522,7 +527,6 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE DROP TABLE t1; --disable_query_log +EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig; EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig; -EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig; --enable_query_log - diff --git a/mysql-test/suite/innodb_zip/t/disabled.def b/mysql-test/suite/innodb_zip/t/disabled.def deleted file mode 100644 index 02adb097c9d..00000000000 --- a/mysql-test/suite/innodb_zip/t/disabled.def +++ /dev/null @@ -1,14 +0,0 @@ -############################################################################## -# -# List the test cases that are to be disabled temporarily. -# -# Separate the test case name and the comment with ':'. -# -# : BUG# -# -# Do not use any TAB characters for whitespace. -# -############################################################################## - -wl6560 : Very long, timeout - diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.opt b/mysql-test/suite/innodb_zip/t/innochecksum.opt new file mode 100644 index 00000000000..ac26eca328c --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innochecksum.opt @@ -0,0 +1 @@ +--skip-innodb-doublewrite diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.test b/mysql-test/suite/innodb_zip/t/innochecksum.test index 3ef311ed154..0403251bf64 100644 --- a/mysql-test/suite/innodb_zip/t/innochecksum.test +++ b/mysql-test/suite/innodb_zip/t/innochecksum.test @@ -17,8 +17,6 @@ let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err; call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts"); call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); -SET GLOBAL innodb_file_per_table=on; - CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB; CREATE INDEX idx1 ON tab1(c2(10)); INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1'); @@ -163,7 +161,7 @@ let SEARCH_PATTERN= Error while setting value \'no\' to \'strict-check\'; --exec $INNOCHECKSUM --strict-check=innodb $MYSQLD_DATADIR/test/tab1.ibd --echo # start the server with innodb_checksum_algorithm=InnoDB ---let restart_options= : --innodb_checksum_algorithm=innodb +--let $restart_parameters= --innodb_checksum_algorithm=innodb --source include/start_mysqld.inc INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32'); @@ -181,7 +179,7 @@ SELECT c1,c2 FROM tab1 order by c1,c2; --exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/t1.ibd --echo # Start the server with checksum algorithm=none ---let restart_options= : --innodb_checksum_algorithm=none +--let $restart_parameters= --innodb_checksum_algorithm=none --source include/start_mysqld.inc INSERT INTO tab1 VALUES(3, 'Innochecksum None'); @@ -195,7 +193,7 @@ DROP TABLE t1; --exec $INNOCHECKSUM --no-check --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd --echo # Restart the DB server with innodb_checksum_algorithm=crc32 ---let restart_options= : --innodb_checksum_algorithm=crc32 --innodb_file_per_table=on +--let $restart_parameters= --innodb_checksum_algorithm=crc32 --source include/start_mysqld.inc SELECT * FROM tab1; @@ -209,7 +207,7 @@ SELECT c1,c2 FROM tab1 order by c1,c2; --exec $INNOCHECKSUM --no-check --write=InnoDB $MYSQLD_DATADIR/test/tab1.ibd --echo # Restart the DB server with innodb_checksum_algorithm=InnoDB ---let restart_options= : --innodb_checksum_algorithm=innodb --innodb_file_per_table=on +--let $restart_parameters= --innodb_checksum_algorithm=innodb --source include/start_mysqld.inc DELETE FROM tab1 where c1=2; @@ -236,8 +234,7 @@ let SEARCH_PATTERN=Error while setting value \'crc23\' to \'write\'; --remove_file $SEARCH_FILE # Cleanup ---echo # Restart the server +--let $restart_parameters= --source include/start_mysqld.inc DROP TABLE tab1; -SET GLOBAL innodb_file_per_table=default; diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_2.opt b/mysql-test/suite/innodb_zip/t/innochecksum_2.opt new file mode 100644 index 00000000000..ac26eca328c --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innochecksum_2.opt @@ -0,0 +1 @@ +--skip-innodb-doublewrite diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_2.test b/mysql-test/suite/innodb_zip/t/innochecksum_2.test index a290a9fc449..7f4ad336805 100644 --- a/mysql-test/suite/innodb_zip/t/innochecksum_2.test +++ b/mysql-test/suite/innodb_zip/t/innochecksum_2.test @@ -4,8 +4,7 @@ --source include/have_innodb.inc --source include/have_innodb_zip.inc --source include/have_debug.inc -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc +--source include/no_valgrind_without_big.inc # Avoid CrashReporter popup on Mac. --source include/not_crashrep.inc diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_3.test b/mysql-test/suite/innodb_zip/t/innochecksum_3.test index 4b386099f86..7895510b335 100644 --- a/mysql-test/suite/innodb_zip/t/innochecksum_3.test +++ b/mysql-test/suite/innodb_zip/t/innochecksum_3.test @@ -4,8 +4,7 @@ --source include/have_innodb.inc --source include/have_innodb_zip.inc -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc +--source include/no_valgrind_without_big.inc # Embedded server does not support crashing. --source include/not_embedded.inc @@ -19,8 +18,6 @@ let MYSQLD_DATADIR= `SELECT @@datadir`; let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err; call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts"); -SET GLOBAL innodb_file_per_table=on; - --echo [1]: Further Test are for rewrite checksum (innodb|crc32|none) for all ibd file & start the server. CREATE TABLE tab1 (pk INTEGER NOT NULL PRIMARY KEY, @@ -78,7 +75,7 @@ foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) { EOF --echo : start the server with innodb_checksum_algorithm=strict_innodb ---let restart_options= : --innodb_checksum_algorithm=strict_innodb --default_storage_engine=InnoDB +--let $restart_parameters= --innodb_checksum_algorithm=strict_innodb --source include/start_mysqld.inc INSERT INTO tab1 (pk, linestring_key, linestring_nokey) @@ -118,7 +115,7 @@ foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) { EOF --echo # start the server with innodb_checksum_algorithm=strict_crc32 ---let restart_options= : --innodb_checksum_algorithm=strict_crc32 --default_storage_engine=InnoDB +--let $restart_parameters= --innodb_checksum_algorithm=strict_crc32 --source include/start_mysqld.inc # check the table status is GOOD with DML @@ -163,9 +160,9 @@ foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) { } EOF -let $restart_parameters = restart: --innodb_checksum_algorithm=strict_none --default_storage_engine=InnoDB; +--let $restart_parameters= --innodb_checksum_algorithm=strict_none --source include/start_mysqld.inc - +--let $restart_parameters= # check the table status is GOOD with DML INSERT INTO tab1 (pk, linestring_key, linestring_nokey) VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) ')); @@ -403,9 +400,6 @@ let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616'; --remove_file $SEARCH_FILE # Cleanup ---echo # Restart the server --source include/start_mysqld.inc -DROP TABLE tab1; -DROP TABLE tab2; -SET GLOBAL innodb_file_per_table=default; +DROP TABLE tab1,tab2; diff --git a/mysql-test/suite/innodb_zip/t/innodb-create-options.test b/mysql-test/suite/innodb_zip/t/innodb-create-options.test deleted file mode 100644 index aeb22514bf6..00000000000 --- a/mysql-test/suite/innodb_zip/t/innodb-create-options.test +++ /dev/null @@ -1,561 +0,0 @@ ---source include/have_innodb.inc -# Tests for various combinations of ROW_FORMAT and KEY_BLOCK_SIZE -# Related bugs; -# Bug#54679: ALTER TABLE causes compressed row_format to revert to compact -# Bug#56628: ALTER TABLE .. KEY_BLOCK_SIZE=0 produces untrue warning or unnecessary error -# Bug#56632: ALTER TABLE implicitly changes ROW_FORMAT to COMPRESSED -# Rules for interpreting CREATE_OPTIONS -# 1) Create options on an ALTER are added to the options on the -# previous CREATE or ALTER statements. -# 2) KEY_BLOCK_SIZE=0 is considered a unspecified value. -# If the current ROW_FORMAT has explicitly been set to COMPRESSED, -# InnoDB will use a default value of 8. Otherwise KEY_BLOCK_SIZE -# will not be used. -# 3) ROW_FORMAT=DEFAULT allows InnoDB to choose its own default, COMPACT. -# 4) ROW_FORMAT=DEFAULT and KEY_BLOCK_SIZE=0 can be used at any time to -# unset or erase the values persisted in the MySQL dictionary and -# by SHOW CTREATE TABLE. -# 5) When incompatible values for ROW_FORMAT and KEY_BLOCK_SIZE are -# both explicitly given, the ROW_FORMAT is always used in non-strict -# mode. -# 6) InnoDB will automatically convert a table to COMPRESSED only if a -# valid non-zero KEY_BLOCK_SIZE has been given and ROW_FORMAT=DEFAULT -# or has not been used on a previous CREATE TABLE or ALTER TABLE. -# 7) InnoDB strict mode is designed to prevent incompatible create -# options from being used together. -# 8) The non-strict behavior is intended to permit you to import a -# mysqldump file into a database that does not support compressed -# tables, even if the source database contained compressed tables. -# All invalid values and/or incompatible combinations of ROW_FORMAT -# and KEY_BLOCK_SIZE are automatically corrected -# -# *** innodb_strict_mode=ON *** -# 1) Valid ROW_FORMATs are COMPRESSED, COMPACT, DEFAULT, DYNAMIC -# & REDUNDANT. All others are rejected. -# 2) Valid KEY_BLOCK_SIZEs are 0,1,2,4,8,16. All others are rejected. -# 3) KEY_BLOCK_SIZE=0 can be used to set it to 'unspecified'. -# 4) KEY_BLOCK_SIZE=1,2,4,8 & 16 are incompatible with COMPACT, DYNAMIC & -# REDUNDANT. -# 5) KEY_BLOCK_SIZE=1,2,4,8 & 16 as well as ROW_FORMAT=COMPRESSED and -# ROW_FORMAT=DYNAMIC are incompatible with innodb_file_format=Antelope -# and innodb_file_per_table=OFF -# 6) KEY_BLOCK_SIZE on an ALTER must occur with ROW_FORMAT=COMPRESSED -# or ROW_FORMAT=DEFAULT if the ROW_FORMAT was previously specified -# as COMPACT, DYNAMIC or REDUNDANT. -# 7) KEY_BLOCK_SIZE on an ALTER can occur without a ROW_FORMAT if the -# previous ROW_FORMAT was DEFAULT, COMPRESSED, or unspecified. -# -# *** innodb_strict_mode=OFF *** -# 1. Ignore a bad KEY_BLOCK_SIZE, defaulting it to 8. -# 2. Ignore a bad ROW_FORMAT, defaulting to COMPACT. -# 3. Ignore a valid KEY_BLOCK_SIZE when an incompatible but valid -# ROW_FORMAT is specified. -# 4. If innodb_file_format=Antelope or innodb_file_per_table=OFF -# it will ignore ROW_FORMAT=COMPRESSED or DYNAMIC and it will -# ignore all non-zero KEY_BLOCK_SIZEs. -# -# See InnoDB documentation page "SQL Compression Syntax Warnings and Errors" -# This test case does not try to create tables with KEY_BLOCK_SIZE > 4 -# since they are rejected for InnoDB page sizes of 8k and 16k. -# See innodb_16k and innodb_8k for those tests. - --- source include/have_innodb.inc -SET default_storage_engine=InnoDB; - ---disable_query_log -# These values can change during the test -LET $innodb_file_format_orig=`select @@innodb_file_format`; -LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`; -LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; ---enable_query_log - -SET GLOBAL innodb_file_format=`Barracuda`; -SET GLOBAL innodb_file_per_table=ON; - -# The first half of these tests are with strict mode ON. -SET SESSION innodb_strict_mode = ON; - ---echo # Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 ---echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' -DROP TABLE IF EXISTS t1; ---echo # 'FIXED' is sent to InnoDB since it is used by MyISAM. ---echo # But it is an invalid mode in InnoDB ---replace_regex / - .*[0-9]*[)]/)/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; ---replace_regex / - .*[0-9]*[)]/)/ -SHOW WARNINGS; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - - - ---echo # Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE ---echo # KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC -DROP TABLE IF EXISTS t1; ---replace_regex / - .*[0-9]*[)]/)/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; ---replace_regex / - .*[0-9]*[)]/)/ -SHOW WARNINGS; ---replace_regex / - .*[0-9]*[)]/)/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; ---replace_regex / - .*[0-9]*[)]/)/ -SHOW WARNINGS; ---replace_regex / - .*[0-9]*[)]/)/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; ---replace_regex / - .*[0-9]*[)]/)/ -SHOW WARNINGS; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - - ---echo # Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; -SHOW WARNINGS; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -SHOW WARNINGS; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - - ---echo # Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE ---echo # ALTER with each ROW_FORMAT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2; -SHOW CREATE TABLE t1; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW CREATE TABLE t1; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE. -DROP TABLE IF EXISTS t1; ---replace_regex / - .*[0-9]*[)]/)/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9; ---replace_regex / - .*[0-9]*[)]/)/ -SHOW WARNINGS; - ---echo # Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and ---echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope ---echo # and that they can be set to default values during strict mode. -SET GLOBAL innodb_file_format=Antelope; -DROP TABLE IF EXISTS t1; ---replace_regex / - .*[0-9]*[)]/)/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4; ---replace_regex / - .*[0-9]*[)]/)/ -SHOW WARNINGS; ---replace_regex / - .*[0-9]*[)]/)/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; ---replace_regex / - .*[0-9]*[)]/)/ -SHOW WARNINGS; ---replace_regex / - .*[0-9]*[)]/)/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; ---replace_regex / - .*[0-9]*[)]/)/ -SHOW WARNINGS; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; -SHOW WARNINGS; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -SET GLOBAL innodb_file_format=Barracuda; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SET GLOBAL innodb_file_format=Antelope; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW CREATE TABLE t1; -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -SET GLOBAL innodb_file_format=Barracuda; - ---echo # Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and ---echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with ---echo # innodb_file_per_table=OFF and that they can be set to default ---echo # values during strict mode. -SET GLOBAL innodb_file_per_table=OFF; -DROP TABLE IF EXISTS t1; ---replace_regex / - .*[0-9]*[)]/)/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1; ---replace_regex / - .*[0-9]*[)]/)/ -SHOW WARNINGS; ---replace_regex / - .*[0-9]*[)]/)/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; ---replace_regex / - .*[0-9]*[)]/)/ -SHOW WARNINGS; ---replace_regex / - .*[0-9]*[)]/)/ ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; ---replace_regex / - .*[0-9]*[)]/)/ -SHOW WARNINGS; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; -SHOW WARNINGS; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; ---error ER_ILLEGAL_HA_CREATE_OPTION -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DEFAULT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_per_table=ON; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SET GLOBAL innodb_file_per_table=OFF; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -SET GLOBAL innodb_file_per_table=ON; - ---echo ################################################## -SET SESSION innodb_strict_mode = OFF; - ---echo # Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 ---echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' ---echo # 'FIXED' is sent to InnoDB since it is used by MyISAM. ---echo # It is an invalid mode in InnoDB, use COMPACT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE ---echo # KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - - ---echo # Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - - ---echo # Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE ---echo # ALTER with each ROW_FORMAT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SHOW CREATE TABLE t1; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SHOW CREATE TABLE t1; -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE, ---echo # it defaults to half of the page size. -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a ---echo valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT ---echo is reverted to Antelope and then used again when ROW_FORMAT=Barracuda. -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_format=Antelope; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_format=Barracuda; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_format=Antelope; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_format=Barracuda; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a ---echo valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF ---echo and then used again when innodb_file_per_table=ON. -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_per_table=OFF; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_per_table=ON; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_per_table=OFF; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_per_table=ON; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - - ---echo # Cleanup -DROP TABLE IF EXISTS t1; - ---disable_query_log -EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig; -EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig; -EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig; ---enable_query_log - diff --git a/mysql-test/suite/innodb_zip/t/innodb-zip.test b/mysql-test/suite/innodb_zip/t/innodb-zip.test index 1c7c7c8c419..8a201cb37ae 100644 --- a/mysql-test/suite/innodb_zip/t/innodb-zip.test +++ b/mysql-test/suite/innodb_zip/t/innodb-zip.test @@ -1,10 +1,5 @@ -- source include/have_innodb.inc - ---disable_warnings -DROP DATABASE IF EXISTS mysqltest_innodb_zip; ---enable_warnings - CREATE DATABASE mysqltest_innodb_zip; USE mysqltest_innodb_zip; SELECT table_name, row_format, data_length, index_length @@ -18,14 +13,13 @@ let $innodb_file_format_orig=`select @@innodb_file_format`; let $innodb_file_format_max_orig=`select @@innodb_file_format_max`; SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata; - --let $query_i_s = SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql' set session innodb_strict_mode=0; set global innodb_file_per_table=off; set global innodb_file_format=`0`; SET @@global.innodb_stats_on_metadata=ON; - + create table t0(a int primary key) engine=innodb row_format=compressed; create table t00(a int primary key) engine=innodb key_block_size=4 row_format=compressed; @@ -280,21 +274,18 @@ show warnings; create table t6 (id int primary key) engine = innodb row_format = compressed; --replace_regex / - .*[0-9]*[)]/)/ show warnings; ---replace_regex / - .*[0-9]*[)]/)/ ---error ER_CANT_CREATE_TABLE create table t7 (id int primary key) engine = innodb row_format = dynamic; ---replace_regex / - .*[0-9]*[)]/)/ show warnings; create table t8 (id int primary key) engine = innodb row_format = compact; create table t9 (id int primary key) engine = innodb row_format = redundant; --replace_result 16384 {valid} 8192 {valid} 4096 {valid} --eval $query_i_s -drop table t8, t9; +drop table t7, t8, t9; #test valid values with innodb_file_format unset set global innodb_file_per_table = on; -set global innodb_file_format = `0`; +set global innodb_file_format = `0`; --replace_regex / - .*[0-9]*[)]/)/ --error ER_CANT_CREATE_TABLE @@ -369,6 +360,4 @@ eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig; SET @@global.innodb_stats_on_metadata=@save_innodb_stats_on_metadata; --enable_query_log -USE test; DROP DATABASE mysqltest_innodb_zip; - diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test index 1d82b95a602..93051d56639 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test @@ -6,11 +6,6 @@ call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size .* for a record on index leaf page."); -let $file_format=`select @@innodb_file_format`; -let $file_per_table=`select @@innodb_file_per_table`; -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=ON; - # # The following is copied from http://bugs.mysql.com/36169 # (http://bugs.mysql.com/file.php?id=9121) @@ -1156,6 +1151,3 @@ DROP TABLE IF EXISTS table3; DROP TABLE IF EXISTS table4; DROP TABLE IF EXISTS table5; DROP TABLE IF EXISTS table6; - -EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36172.test b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test index 015f461e532..622e0c56b15 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug36172.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test @@ -14,17 +14,9 @@ SET storage_engine=InnoDB; -- disable_query_log -- disable_result_log -let $file_format=`select @@innodb_file_format`; -let $file_per_table=`select @@innodb_file_per_table`; -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=on; - -DROP TABLE IF EXISTS `table0`; CREATE TABLE `table0` ( `col0` tinyint(1) DEFAULT NULL, `col1` tinyint(1) DEFAULT NULL, `col2` tinyint(4) DEFAULT NULL, `col3` date DEFAULT NULL, `col4` time DEFAULT NULL, `col5` set('test1','test2','test3') DEFAULT NULL, `col6` time DEFAULT NULL, `col7` text, `col8` decimal(10,0) DEFAULT NULL, `col9` set('test1','test2','test3') DEFAULT NULL, `col10` float DEFAULT NULL, `col11` double DEFAULT NULL, `col12` enum('test1','test2','test3') DEFAULT NULL, `col13` tinyblob, `col14` year(4) DEFAULT NULL, `col15` set('test1','test2','test3') DEFAULT NULL, `col16` decimal(10,0) DEFAULT NULL, `col17` decimal(10,0) DEFAULT NULL, `col18` blob, `col19` datetime DEFAULT NULL, `col20` double DEFAULT NULL, `col21` decimal(10,0) DEFAULT NULL, `col22` datetime DEFAULT NULL, `col23` decimal(10,0) DEFAULT NULL, `col24` decimal(10,0) DEFAULT NULL, `col25` longtext, `col26` tinyblob, `col27` time DEFAULT NULL, `col28` tinyblob, `col29` enum('test1','test2','test3') DEFAULT NULL, `col30` smallint(6) DEFAULT NULL, `col31` double DEFAULT NULL, `col32` float DEFAULT NULL, `col33` char(175) DEFAULT NULL, `col34` tinytext, `col35` tinytext, `col36` tinyblob, `col37` tinyblob, `col38` tinytext, `col39` mediumblob, `col40` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `col41` double DEFAULT NULL, `col42` smallint(6) DEFAULT NULL, `col43` longblob, `col44` varchar(80) DEFAULT NULL, `col45` mediumtext, `col46` decimal(10,0) DEFAULT NULL, `col47` bigint(20) DEFAULT NULL, `col48` date DEFAULT NULL, `col49` tinyblob, `col50` date DEFAULT NULL, `col51` tinyint(1) DEFAULT NULL, `col52` mediumint(9) DEFAULT NULL, `col53` float DEFAULT NULL, `col54` tinyblob, `col55` longtext, `col56` smallint(6) DEFAULT NULL, `col57` enum('test1','test2','test3') DEFAULT NULL, `col58` datetime DEFAULT NULL, `col59` mediumtext, `col60` varchar(232) DEFAULT NULL, `col61` decimal(10,0) DEFAULT NULL, `col62` year(4) DEFAULT NULL, `col63` smallint(6) DEFAULT NULL, `col64` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col65` blob, `col66` longblob, `col67` int(11) DEFAULT NULL, `col68` longtext, `col69` enum('test1','test2','test3') DEFAULT NULL, `col70` int(11) DEFAULT NULL, `col71` time DEFAULT NULL, `col72` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col73` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col74` varchar(170) DEFAULT NULL, `col75` set('test1','test2','test3') DEFAULT NULL, `col76` tinyblob, `col77` bigint(20) DEFAULT NULL, `col78` decimal(10,0) DEFAULT NULL, `col79` datetime DEFAULT NULL, `col80` year(4) DEFAULT NULL, `col81` decimal(10,0) DEFAULT NULL, `col82` longblob, `col83` text, `col84` char(83) DEFAULT NULL, `col85` decimal(10,0) DEFAULT NULL, `col86` float DEFAULT NULL, `col87` int(11) DEFAULT NULL, `col88` varchar(145) DEFAULT NULL, `col89` date DEFAULT NULL, `col90` decimal(10,0) DEFAULT NULL, `col91` decimal(10,0) DEFAULT NULL, `col92` mediumblob, `col93` time DEFAULT NULL, KEY `idx0` (`col69`,`col90`,`col8`), KEY `idx1` (`col60`), KEY `idx2` (`col60`,`col70`,`col74`), KEY `idx3` (`col22`,`col32`,`col72`,`col30`), KEY `idx4` (`col29`), KEY `idx5` (`col19`,`col45`(143)), KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), KEY `idx7` (`col48`,`col61`), KEY `idx8` (`col93`), KEY `idx9` (`col31`), KEY `idx10` (`col30`,`col21`), KEY `idx11` (`col67`), KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), KEY `idx14` (`col78`), KEY `idx15` (`col63`,`col67`,`col64`), KEY `idx16` (`col17`,`col86`), KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), KEY `idx18` (`col62`), KEY `idx19` (`col31`,`col57`,`col56`,`col53`), KEY `idx20` (`col46`), KEY `idx21` (`col83`(54)), KEY `idx22` (`col51`,`col7`(120)), KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; insert ignore into `table0` set `col23` = 7887371.5084383683, `col24` = 4293854615.6906948000, `col25` = 'vitalist', `col26` = 'widespread', `col27` = '3570490', `col28` = 'habitual', `col30` = -5471, `col31` = 4286985783.6771750000, `col32` = 6354540.9826654866, `col33` = 'defoliation', `col34` = 'logarithms', `col35` = 'tegument\'s', `col36` = 'scouting\'s', `col37` = 'intermittency', `col38` = 'elongates', `col39` = 'prophecies', `col40` = '20560103035939', `col41` = 4292809130.0544143000, `col42` = 22057, `col43` = 'Hess\'s', `col44` = 'bandstand', `col45` = 'phenylketonuria', `col46` = 6338767.4018677324, `col47` = 5310247, `col48` = '12592418', `col49` = 'churchman\'s', `col50` = '32226125', `col51` = -58, `col52` = -6207968, `col53` = 1244839.3255104220, `col54` = 'robotized', `col55` = 'monotonous', `col56` = -26909, `col58` = '20720107023550', `col59` = 'suggestiveness\'s', `col60` = 'gemology', `col61` = 4287800670.2229986000, `col62` = '1944', `col63` = -16827, `col64` = '20700107212324', `col65` = 'Nicolais', `col66` = 'apteryx', `col67` = 6935317, `col68` = 'stroganoff', `col70` = 3316430, `col71` = '3277608', `col72` = '19300511045918', `col73` = '20421201003327', `col74` = 'attenuant', `col75` = '15173', `col76` = 'upstroke\'s', `col77` = 8118987, `col78` = 6791516.2735374002, `col79` = '20780701144624', `col80` = '2134', `col81` = 4290682351.3127537000, `col82` = 'unexplainably', `col83` = 'Storm', `col84` = 'Greyso\'s', `col85` = 4289119212.4306774000, `col86` = 7617575.8796655172, `col87` = -6325335, `col88` = 'fondue\'s', `col89` = '40608940', `col90` = 1659421.8093508712, `col91` = 8346904.6584368423, `col92` = 'reloads', `col93` = '5188366'; CHECK TABLE table0 EXTENDED; INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278'; CHECK TABLE table0 EXTENDED; DROP TABLE table0; -EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug52745.test b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test index 3c5d79826f0..5882278ab9b 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug52745.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test @@ -1,10 +1,6 @@ -- source include/have_innodb.inc -let $file_format=`select @@innodb_file_format`; -let $file_per_table=`select @@innodb_file_per_table`; -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=on; - +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE bug52745 ( a2 int(10) unsigned DEFAULT NULL, col37 time DEFAULT NULL, @@ -63,7 +59,7 @@ CREATE TABLE bug52745 ( col90 tinyblob ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -INSERT INTO bug52745 SET +INSERT IGNORE INTO bug52745 SET col40='0000-00-00 00:00:00', col51=16547, col53='7711484', @@ -102,6 +98,3 @@ col90=repeat('gale',48); SHOW WARNINGS; DROP TABLE bug52745; - -EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug53591.test b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test index 6c80165f6eb..1366e0e43ac 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug53591.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test @@ -1,10 +1,5 @@ -- source include/have_innodb.inc -let $file_format=`select @@innodb_file_format`; -let $file_per_table=`select @@innodb_file_per_table`; - -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=on; SET GLOBAL innodb_strict_mode=on; set old_alter_table=0; @@ -18,6 +13,4 @@ SHOW WARNINGS; DROP TABLE bug53591; -EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_per_table=$file_per_table; SET GLOBAL innodb_strict_mode=DEFAULT; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug56680.test b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test index f592bd16942..4e73b1fce0f 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug56680.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test @@ -4,8 +4,6 @@ # -- disable_query_log SET @tx_isolation_orig = @@tx_isolation; -SET @innodb_file_per_table_orig = @@innodb_file_per_table; -SET @innodb_file_format_orig = @@innodb_file_format; # The flag innodb_change_buffering_debug is only available in debug builds. # It instructs InnoDB to try to evict pages from the buffer pool when # change buffering is possible, so that the change buffer will be used @@ -16,8 +14,6 @@ SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug; SET GLOBAL innodb_change_buffering_debug = 1; -- enable_query_log SET GLOBAL tx_isolation='REPEATABLE-READ'; -SET GLOBAL innodb_file_format=Barracuda; -SET GLOBAL innodb_file_per_table=on; CREATE TABLE bug56680( a INT AUTO_INCREMENT PRIMARY KEY, @@ -133,7 +129,5 @@ DROP TABLE bug56680; -- disable_query_log SET GLOBAL tx_isolation = @tx_isolation_orig; -SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig; -SET GLOBAL innodb_file_format = @innodb_file_format_orig; -- error 0, ER_UNKNOWN_SYSTEM_VARIABLE SET GLOBAL innodb_change_buffering_debug = @innodb_change_buffering_debug_orig; diff --git a/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test index 8af2bc7ffc7..d071e3833e9 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test +++ b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test @@ -6,12 +6,8 @@ SET default_storage_engine=InnoDB; call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page."); -let $innodb_file_format_orig=`select @@innodb_file_format`; -let $innodb_file_per_table_orig=`select @@innodb_file_per_table`; let $innodb_large_prefix_orig=`select @@innodb_large_prefix`; -set global innodb_file_format="Barracuda"; -set global innodb_file_per_table=1; set global innodb_large_prefix=1; set global innodb_strict_mode=1; @@ -140,6 +136,7 @@ create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16; # See page_zip_empty_size() and Bug #47495 for more detail. # Test edge cases for indexes using key_block_size=1 +set sql_mode=''; set global innodb_large_prefix=0; -- error ER_TOO_BIG_ROWSIZE create index idx1 on worklog5743_1(a2(4000)); @@ -242,6 +239,7 @@ create index idx6 on worklog5743_16(a1, a2(2000), a3(1069)); show warnings; create index idx7 on worklog5743_16(a1, a2(2000), a3(1068)); show warnings; +set sql_mode=default; # Insert a large record into each of these tables. insert into worklog5743_1 values(9, repeat("a", 10000)); @@ -325,6 +323,7 @@ create table worklog5743(a1 int, a5 varchar(3069), a6 varchar(3068)) ROW_FORMAT=DYNAMIC; +set sql_mode=''; create index idx1 on worklog5743(a2); create index idx2 on worklog5743(a3); create index idx3 on worklog5743(a4); @@ -338,6 +337,7 @@ show warnings; create index idx6 on worklog5743(a1, a6); show warnings; show create table worklog5743; +set sql_mode=default; insert into worklog5743 values(9, repeat("a", 20000), repeat("a", 3073), @@ -391,11 +391,13 @@ update worklog5743 set a = (repeat("x", 25000)); select @@session.tx_isolation; --connection con1 select a = repeat("a", 20000) from worklog5743; +--disconnect con1 --connection con2 SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; select @@session.tx_isolation; select a = repeat("x", 25000) from worklog5743; +--disconnect con2 --connection default rollback; @@ -409,6 +411,7 @@ create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC; # Length exceeds maximum supported key length # It will be auto-truncated to 3072 +set statement sql_mode = '' for create index idx1 on worklog5743(a(3073)); create index idx2 on worklog5743(a(3072)); show create table worklog5743; @@ -427,16 +430,5 @@ create index idx on worklog5743(a(768)); create index idx2 on worklog5743(a(767)); drop table worklog5743; - -eval SET GLOBAL innodb_file_format=$innodb_file_format_orig; -eval SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig; eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig; SET GLOBAL innodb_strict_mode = DEFAULT; ---connection con1 ---disconnect con1 ---source include/wait_until_disconnected.inc ---connection con2 ---disconnect con2 ---source include/wait_until_disconnected.inc ---connection default - diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test similarity index 80% rename from mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test rename to mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test index 1f15c81b90b..392a3ed2879 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test +++ b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test @@ -1,48 +1,30 @@ -# Not supported in embedded +# mysql-test-run.pl --embedded cannot restart the server. --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. +# Valgrind can hang or return spurious messages on DBUG_SUICIDE --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 +-- source include/have_innodb_zip.inc call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); -call mtr.add_suppression("InnoDB: Error: Tablespace flags .* corrupted unused .*"); -call mtr.add_suppression("InnoDB: Tablespace flags: .* corrupted in file: .* "); call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*"); -call mtr.add_suppression("InnoDB: Page for tablespace .* "); -flush tables; +call mtr.add_suppression("InnoDB: Page for tablespace "); +call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x"); +FLUSH TABLES; 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) @@ -55,7 +37,7 @@ INSERT INTO test_wl5522.t1 VALUES (1), (2), (3), (4); FLUSH TABLES test_wl5522.t1 FOR EXPORT; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test_wl5522", "t1"); EOF UNLOCK TABLES; @@ -69,7 +51,7 @@ INSERT INTO test_wl5522.t1 VALUES (1); ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_discard_tablespaces("test_wl5522", "t1"); EOF @@ -78,7 +60,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -99,7 +81,6 @@ ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; --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 @@ -122,7 +103,7 @@ ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; # recreate the table and do a proper import. -- source include/wait_until_disconnected.inc perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -132,7 +113,6 @@ EOF --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 @@ -140,14 +120,7 @@ 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; - -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; @@ -155,7 +128,7 @@ ROW_FORMAT=COMPRESSED; ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -181,11 +154,12 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF # Test failure after reset of space id and LSN in the tablespace +SET @saved_debug_dbug = @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,ib_import_internal_error"; --replace_regex /'.*t1.cfg'/'t1.cfg'/ @@ -193,11 +167,11 @@ SET SESSION debug_dbug="+d,ib_import_internal_error"; --error ER_INTERNAL_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_internal_error"; +SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -217,7 +191,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -231,11 +205,11 @@ ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF -SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; # Test failure after attempting a tablespace open SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; @@ -244,11 +218,11 @@ SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; --error ER_GET_ERRMSG ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -259,11 +233,11 @@ SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure"; --error ER_NOT_KEYFILE ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -273,11 +247,11 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -287,11 +261,11 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -301,11 +275,11 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -315,11 +289,11 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; # Left over from the failed IMPORT perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -345,7 +319,7 @@ CREATE TABLE test_wl5522.t1 ( INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB - ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; + ROW_FORMAT=COMPRESSED; # Stop purge so that it doesn't remove the delete marked entries. SET GLOBAL INNODB_PURGE_STOP_NOW=ON; @@ -401,7 +375,7 @@ SELECT name FLUSH TABLES test_wl5522.t1 FOR EXPORT; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test_wl5522", "t1"); EOF @@ -430,14 +404,14 @@ CREATE TABLE test_wl5522.t1 ( INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB - ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; + ROW_FORMAT=COMPRESSED; SELECT c1, c2 FROM test_wl5522.t1; ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -458,7 +432,7 @@ 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 +INSERT IGNORE INTO test_wl5522.t1 VALUES (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; @@ -473,7 +447,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; FLUSH TABLES test_wl5522.t1 FOR EXPORT; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test_wl5522", "t1"); EOF @@ -491,7 +465,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -502,12 +476,12 @@ SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1"; --error ER_INTERNAL_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -523,24 +497,24 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF -SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; +SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; --replace_regex /'.*t1.cfg'/'t1.cfg'/ -# Following alter is failing +# Following alter is failing --error ER_INTERNAL_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,buf_page_is_corrupt_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -554,7 +528,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -565,12 +539,12 @@ SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2"; --error ER_INNODB_INDEX_CORRUPT ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -584,7 +558,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -595,12 +569,12 @@ SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3"; --error ER_NOT_KEYFILE ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -616,12 +590,12 @@ 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"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -637,7 +611,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -647,12 +621,12 @@ SET SESSION debug_dbug="+d,fil_space_create_failure"; --error ER_GET_ERRMSG ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,fil_space_create_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -668,7 +642,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -678,12 +652,12 @@ SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; --error ER_GET_ERRMSG ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -699,7 +673,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -710,12 +684,12 @@ SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure"; --error ER_INTERNAL_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; -SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure"; +SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -750,12 +724,9 @@ 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("Index for table 't1' is corrupt; try to repair it"); --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-zip.test b/mysql-test/suite/innodb_zip/t/wl5522_zip.test similarity index 82% rename from mysql-test/suite/innodb/t/innodb-wl5522-zip.test rename to mysql-test/suite/innodb_zip/t/wl5522_zip.test index 395e4def85d..7863c2b3ffb 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-zip.test +++ b/mysql-test/suite/innodb_zip/t/wl5522_zip.test @@ -2,29 +2,11 @@ --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 +-- source include/have_innodb_zip.inc call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT."); ---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`; @@ -87,15 +69,8 @@ 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`; @@ -126,7 +101,7 @@ INSERT INTO t1(c2) SELECT c2 FROM t1; FLUSH TABLES t1 FOR EXPORT; SELECT COUNT(*) FROM t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test", "t1"); EOF @@ -145,7 +120,7 @@ ALTER TABLE t1 DISCARD TABLESPACE; SELECT * FROM t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_discard_tablespaces("test", "t1"); ib_restore_tablespaces("test", "t1"); EOF @@ -176,7 +151,7 @@ INSERT INTO t1(c2) SELECT c2 FROM t1; FLUSH TABLES t1 FOR EXPORT; SELECT COUNT(*) FROM t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test", "t1"); EOF --list_files $MYSQLD_DATADIR/test @@ -199,7 +174,7 @@ ALTER TABLE t1 DISCARD TABLESPACE; SELECT * FROM t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_discard_tablespaces("test", "t1"); ib_restore_tablespaces("test", "t1"); EOF @@ -218,8 +193,8 @@ DROP TABLE t1; # 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; + c2 INT, INDEX(c2)) ENGINE=InnoDB + ROW_FORMAT=COMPRESSED; INSERT INTO t1(c2) VALUES(1); INSERT INTO t1(c2) SELECT c2 FROM t1; @@ -230,7 +205,7 @@ 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"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test", "t1"); EOF --list_files $MYSQLD_DATADIR/test @@ -244,15 +219,15 @@ 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; + c2 INT, INDEX(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"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_discard_tablespaces("test", "t1"); ib_restore_tablespaces("test", "t1"); EOF @@ -269,10 +244,12 @@ DROP TABLE t1; # 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( +let $KEY_BLOCK_SIZE=`SELECT CONCAT('KEY_BLOCK_SIZE=', FLOOR(@@innodb_page_size/1024))`; +--replace_result $KEY_BLOCK_SIZE KEY_BLOCK_SIZE=16 +eval 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; + ROW_FORMAT=COMPRESSED $KEY_BLOCK_SIZE; INSERT INTO t1(c2) VALUES(1); INSERT INTO t1(c2) SELECT c2 FROM t1; @@ -283,7 +260,7 @@ 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"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test", "t1"); EOF UNLOCK TABLES; @@ -294,17 +271,18 @@ INSERT INTO t1(c2) SELECT c2 FROM t1; DROP TABLE t1; -CREATE TABLE t1( +--replace_result $KEY_BLOCK_SIZE KEY_BLOCK_SIZE=16 +eval 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; + ROW_FORMAT=COMPRESSED $KEY_BLOCK_SIZE; ALTER TABLE t1 DISCARD TABLESPACE; --error ER_TABLESPACE_DISCARDED SELECT * FROM t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_discard_tablespaces("test", "t1"); ib_restore_tablespaces("test", "t1"); EOF @@ -317,7 +295,7 @@ ALTER TABLE t1 DROP INDEX x; ALTER TABLE t1 ADD INDEX idx(c2); perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test", "t1"); EOF @@ -327,7 +305,7 @@ CHECK TABLE t1; SELECT * FROM t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_cleanup("test", "t1"); EOF @@ -383,7 +361,7 @@ SELECT * FROM t1; FLUSH TABLES t1 FOR EXPORT; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test", "t1"); EOF @@ -402,7 +380,7 @@ ALTER TABLE t1 DISCARD TABLESPACE; SELECT * FROM t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_discard_tablespaces("test", "t1"); ib_restore_tablespaces("test", "t1"); EOF @@ -412,7 +390,7 @@ EOF ALTER TABLE t1 IMPORT TABLESPACE; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test", "t1"); EOF @@ -430,7 +408,7 @@ ALTER TABLE t1 DISCARD TABLESPACE; SELECT * FROM t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_discard_tablespaces("test", "t1"); ib_restore_tablespaces("test", "t1"); EOF @@ -440,7 +418,7 @@ EOF ALTER TABLE t1 IMPORT TABLESPACE; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test", "t1"); EOF @@ -457,7 +435,7 @@ ALTER TABLE t1 DISCARD TABLESPACE; SELECT * FROM t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_discard_tablespaces("test", "t1"); ib_restore_tablespaces("test", "t1"); EOF @@ -467,7 +445,7 @@ EOF ALTER TABLE t1 IMPORT TABLESPACE; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test", "t1"); EOF @@ -477,27 +455,27 @@ 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; + ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; ALTER TABLE t1 DISCARD TABLESPACE; --error ER_TABLESPACE_DISCARDED SELECT * FROM t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/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 +# This should fail because KEY_BLOCK_SIZE=1 +# does not match the implicit KEY_BLOCK_SIZE of the 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"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test", "t1"); EOF @@ -515,7 +493,7 @@ ALTER TABLE t1 DISCARD TABLESPACE; SELECT * FROM t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_discard_tablespaces("test", "t1"); ib_restore_tablespaces("test", "t1"); EOF @@ -524,7 +502,7 @@ ALTER TABLE t1 IMPORT TABLESPACE; CHECK TABLE t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_cleanup("test", "t1"); EOF @@ -540,7 +518,3 @@ call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tabl # 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_zip/t/wl6501_crash_3.test b/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test index eb4c23aa66e..3ec990b4715 100644 --- a/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test +++ b/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test @@ -21,6 +21,5 @@ let $wl6501_file_per_table = 1; let $wl6501_row_fmt = compressed; let $wl6501_kbs = 16; -let $wl6501_file_format = 'Barracuda'; --source suite/innodb/include/innodb_wl6501_crash.inc diff --git a/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test b/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test index 870af3dfc94..f54df3c128c 100644 --- a/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test +++ b/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test @@ -21,9 +21,7 @@ let $wl6501_file_per_table = 1; let $wl6501_row_fmt = compressed; let $wl6501_kbs = 4; -let $wl6501_file_format = 'Barracuda'; --source suite/innodb/include/innodb_wl6501_crash.inc let $wl6501_temp = temporary; --source suite/innodb/include/innodb_wl6501_crash_temp.inc - diff --git a/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test b/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test index 3432a5a5c76..2f9847ae5fb 100644 --- a/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test +++ b/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test @@ -21,6 +21,5 @@ let $wl6501_file_per_table = 1; let $wl6501_row_fmt = compressed; let $wl6501_kbs = 8; -let $wl6501_file_format = 'Barracuda'; --source suite/innodb/include/innodb_wl6501_crash.inc diff --git a/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test b/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test index 8c746fe8abf..e6392759d5e 100644 --- a/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test +++ b/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test @@ -22,20 +22,16 @@ let $wl6501_file_per_table = 1; let $wl6501_row_fmt = compact; let $wl6501_kbs = 16; -let $wl6501_file_format = 'Antelope'; --source suite/innodb_zip/include/innodb_wl6501_scale.inc # Single-Tablespace/Compressed let $wl6501_file_per_table = 1; let $wl6501_row_fmt = compressed; let $wl6501_kbs = 16; -let $wl6501_file_format = 'Barracuda'; --source suite/innodb_zip/include/innodb_wl6501_scale.inc # System-Tablespace/Non-Compressed let $wl6501_file_per_table = 0; let $wl6501_row_fmt = compact; let $wl6501_kbs = 16; -let $wl6501_file_format = 'Antelope'; --source suite/innodb_zip/include/innodb_wl6501_scale.inc - diff --git a/mysql-test/suite/innodb_zip/t/wl6560.test b/mysql-test/suite/innodb_zip/t/wl6560.test deleted file mode 100644 index 55d36747938..00000000000 --- a/mysql-test/suite/innodb_zip/t/wl6560.test +++ /dev/null @@ -1,422 +0,0 @@ -# -# WL#6560: InnoDB: separate tablespace for innodb-temp-tables. -# - ---source include/have_innodb.inc ---source include/have_innodb_zip.inc -# Embedded server does not restart of server ---source include/not_embedded.inc --- source include/big_test.inc - ---disable_query_log -call mtr.add_suppression("Tablespace innodb_temporary ran out of space. Please add another file or use 'autoextend' for the last file in setting innodb_temp_data_file_path."); -call mtr.add_suppression("The table 't1' is full"); ---enable_query_log - -################################################################################ -# -# Will test following scenarios: -# 1. creation of shared temp-tablespace. -# 2. ddl + dml operation involving temp-tablespace. -# insert/delete/update/select -# create/drop/alter/truncate/import-discard (though blocked). -# 3. ddl + dml operation on compressed table. -# (table doesn't reside in shared temp-tablespace). -# 4. Test bulk-loading that result in auto-extension of temp-tablespace. -# 5. re-creation of temp-tablespace on re-start. -# also to ensure non-existence of existing temp-table. -# 6. restart server in innodb-read-only mode. this will also -# block creation of temp-tables. -# 7. try starting server with shared and temp-tablespace filename same. -# 8. try re-starting server with param so that temp-tablespace can't be -# expanded and insert enough data to make it full. -# 9. tests for different row format types and key block sizes for -# compressed tables. -# 10. try restarting server with raw device specified for temp-tablespace. -# 11. try restarting server with temp-tablespace less than min. threshold -# 12. no file specified for temp-tablespace. -################################################################################ - -#----------------------------------------------------------------------------- -# -# create test-bed -# -let $per_table = `select @@innodb_file_per_table`; - -set global innodb_file_per_table = off; -let $MYSQL_TMP_DIR = `select @@tmpdir`; -let $MYSQL_DATA_DIR = `select @@datadir`; -let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err; -let $args = --loose-console --core-file > $SEARCH_FILE 2>&1; -let crash = --loose-console > $SEARCH_FILE 2>&1 --innodb-force-recovery-crash; -let readonly = $args --innodb_read_only; -let nameconflicts = $args --innodb_data_file_path="ibdata1:12M:autoextend:max:134217728" --innodb_temp_data_file_path="ibdata1:12M:autoextend"; -let rawdevice1 = $args --innodb_temp_data_file_path="/dev/hdd1:3Gnewraw;/dev/hdd2:2Gnewraw"; -let rawdevice2 = $args --innodb_temp_data_file_path="/dev/hdd1:3Graw;/dev/hdd2:2Graw"; -let sizeoftempfile1 = $args --innodb_temp_data_file_path="ibtmp1:2M:autoextend"; -let sizeoftempfile2 = $args --innodb_data_file_path="ibdata1:2M:autoextend"; -let notemptablespacefile = $args --innodb_temp_data_file_path=""; - -#----------------------------------------------------------------------------- -# -# 1. creation of shared temp-tablespace. -# ---echo # files in MYSQL_DATA_DIR ---list_files $MYSQL_DATA_DIR/ ibtmp* - - -#----------------------------------------------------------------------------- -# -# 2. ddl + dml operation involving temp-tablespace. -# insert/delete/update/select -# create/drop/alter/truncate/import-discard (though blocked). -# -select @@global.innodb_file_per_table; -create temporary table t1 (i int, f float, c char(100)) engine=innodb; -# ---source suite/innodb_zip/include/innodb_temp_table_dml.inc -# -# alter table ---error ER_CANNOT_DISCARD_TEMPORARY_TABLE -alter table t1 discard tablespace; ---error ER_CANNOT_DISCARD_TEMPORARY_TABLE -alter table t1 import tablespace; -# -# drop table -drop table t1; - -#----------------------------------------------------------------------------- -# -# 3. ddl + dml operation on compressed table. -# (table doesn't reside in shared temp-tablespace). -# ---echo #files in MYSQL_TMP_DIR ---list_files $MYSQL_TMP_DIR/ *.ibd -set global innodb_file_per_table = 1; -select @@global.innodb_file_per_table; -create temporary table t1 - (i int, f float, c char(100)) engine = innodb key_block_size = 4; -show create table t1; ---echo #files in MYSQL_TMP_DIR ---replace_regex /#sql[0-9a-f_]*/#sql/ ---list_files $MYSQL_TMP_DIR/ *.ibd -# ---source suite/innodb_zip/include/innodb_temp_table_dml.inc -# -# alter table ---error ER_CANNOT_DISCARD_TEMPORARY_TABLE -alter table t1 discard tablespace; -# -# drop table -drop table t1; -set global innodb_file_per_table = off; - -#----------------------------------------------------------------------------- -# -# 4. Test bulk-loading that result in auto-extension of temp-tablespace. -# -create temporary table t1 - (keyc int, c1 char(100), c2 char(100), - primary key(keyc)) engine = innodb; -delimiter |; -CREATE PROCEDURE populate_t1() -BEGIN - DECLARE i INT DEFAULT 1; - while (i <= 20000) DO - insert into t1 values (i, 'a', 'b'); - SET i = i + 1; - END WHILE; -END| -delimiter ;| -set autocommit=0; -select count(*) from t1; -call populate_t1(); -select count(*) from t1; -select * from t1 limit 10; -set autocommit=1; -truncate table t1; -select count(*) from t1; -# -drop procedure populate_t1; -drop table t1; - -#----------------------------------------------------------------------------- -# -# 5. re-creation of temp-tablespace on re-start. -# also to ensure non-existence of existing temp-table. -# -create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb; -insert into t1 values (1, 'c', 'b'); -select * from t1; -# ---source include/restart_mysqld.inc -# ---echo # files in MYSQL_DATA_DIR ---list_files $MYSQL_DATA_DIR/ ibtmp* -use test; ---error ER_NO_SUCH_TABLE -select * from t1; - -#----------------------------------------------------------------------------- -# -# 6. restart server in innodb-read-only mode. this will also -# block creation of temp-tables. -# -# ---echo "testing temp-table creation in --innodb_read_only mode" -let $restart_parameters=--innodb-read-only; ---source include/restart_mysqld.inc -# -use test; -show tables; ---error ER_INNODB_READ_ONLY, 1005 -create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb; - -#----------------------------------------------------------------------------- -# -# 7. try starting server with shared and temp-tablespace filename same. -# ---source include/shutdown_mysqld.inc ---echo "testing system and temp tablespace name conflict" ---error 1 ---exec $MYSQLD_CMD $nameconflicts -let SEARCH_PATTERN = innodb_temporary and innodb_system file names seem to be the same; ---source ./include/search_pattern_in_file.inc ---remove_file $SEARCH_FILE ---echo "restarting server in normal mode" ---enable_reconnect -let $restart_parameters = restart; ---source include/start_mysqld.inc -# -show tables; -create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb; -drop table t1; - -#----------------------------------------------------------------------------- -# -# 8. try re-starting server with param so that temp-tablespace can't be expanded -# and insert enough data to make it full. -# ---echo # test condition of full-temp-tablespace -let $restart_parameters=--innodb_temp_data_file_path=ibtmp1:12M; ---source include/restart_mysqld.inc -# -create temporary table t1 - (keyc int, c1 char(100), c2 char(100), - primary key(keyc)) engine = innodb; -delimiter |; -CREATE PROCEDURE populate_t1() -BEGIN - DECLARE i INT DEFAULT 1; - while (i <= 20000) DO - insert into t1 values (i, 'a', 'b'); - SET i = i + 1; - END WHILE; -END| -delimiter ;| -set autocommit=0; -select count(*) from t1; ---error ER_RECORD_FILE_FULL -call populate_t1(); -# -drop procedure populate_t1; -drop table t1; - -#----------------------------------------------------------------------------- -# -# 9. tests for different row format types and key block sizes for -# compressed tables. -# -set innodb_strict_mode = off; ---disable_warnings -set global innodb_file_per_table = 0; -set global innodb_file_format = 'Antelope'; -create temporary table t ( - i int) - engine = innodb row_format = compressed; ---replace_regex /[0-9]+/NUMBER/ -show warnings; -drop table t; -# -create temporary table t ( - i int) - engine = innodb row_format = compressed key_block_size = 8; ---replace_regex /[0-9]+/NUMBER/ -show warnings; -# -drop table t; -set global innodb_file_per_table = 1; -create temporary table t ( - i int) - engine = innodb row_format = compressed key_block_size = 8; ---replace_regex /[0-9]+/NUMBER/ -show warnings; -drop table t; -# -create temporary table t ( - i int) - engine = innodb row_format = dynamic; ---replace_regex /[0-9]+/NUMBER/ -show warnings; ---echo #files in MYSQL_TMP_DIR ---replace_regex /#sql[0-9a-f_]*/#sql/ ---list_files $MYSQL_TMP_DIR/ *.ibd -drop table t; -# -set innodb_strict_mode = on; -create temporary table t ( - i int) - engine = innodb row_format = dynamic; ---replace_regex /[0-9]+/NUMBER/ -drop table t; -# -set global innodb_file_format = 'Barracuda'; -set innodb_strict_mode = off; -create temporary table t ( - i int) - engine = innodb row_format = compressed key_block_size = 8; ---replace_regex /[0-9]+/NUMBER/ -# explicitly disabling it else it will generate warning of ignoring -# key_block_size when suite is run with innodb-page-size=4k -#show warnings; -set innodb_strict_mode = default; ---echo #files in MYSQL_TMP_DIR ---replace_regex /#sql[0-9a-f_]*/#sql/ ---list_files $MYSQL_TMP_DIR/ *.ibd -# -drop table t; -create temporary table t ( - i int) - engine = innodb row_format = compressed; ---replace_regex /[0-9]+/NUMBER/ -show warnings; ---echo #files in MYSQL_TMP_DIR ---replace_regex /#sql[0-9a-f_]*/#sql/ ---list_files $MYSQL_TMP_DIR/ *.ibd -drop table t; -# -create temporary table t ( - i int) - engine = innodb row_format = dynamic; ---replace_regex /[0-9]+/NUMBER/ -show warnings; ---echo #files in MYSQL_TMP_DIR ---replace_regex /#sql[0-9a-f_]*/#sql/ ---list_files $MYSQL_TMP_DIR/ *.ibd -drop table t; -# -set innodb_strict_mode = on; -create temporary table t ( - i int) - engine = innodb row_format = dynamic; ---replace_regex /[0-9]+/NUMBER/ -show warnings; -drop table t; -set innodb_strict_mode = off; -# ---echo #files in MYSQL_TMP_DIR ---replace_regex /#sql[0-9a-f_]*/#sql/ ---list_files $MYSQL_TMP_DIR/ *.ibd -create temporary table t ( - i int) - engine = innodb row_format = dynamic key_block_size = 4; ---replace_regex /[0-9]+/NUMBER/ -show warnings; ---echo #files in MYSQL_TMP_DIR ---replace_regex /#sql[0-9a-f_]*/#sql/ ---list_files $MYSQL_TMP_DIR/ *.ibd -drop table t; -# -create temporary table t ( - i int) - engine = innodb row_format = compact; ---replace_regex /[0-9]+/NUMBER/ -show warnings; ---echo #files in MYSQL_TMP_DIR ---replace_regex /#sql[0-9a-f_]*/#sql/ ---list_files $MYSQL_TMP_DIR/ *.ibd -drop table t; -# -create temporary table t ( - i int) - engine = innodb key_block_size = 4; ---replace_regex /[0-9]+/NUMBER/ -show warnings; ---echo #files in MYSQL_TMP_DIR ---replace_regex /#sql[0-9a-f_]*/#sql/ ---list_files $MYSQL_TMP_DIR/ *.ibd -drop table t; -# - -#----------------------------------------------------------------------------- -# -# 10. try restarting server with raw device specified for temp-tablespace. -# ---source include/shutdown_mysqld.inc ---echo "testing temp tablespace non-support for raw device" ---error 1 ---exec $MYSQLD_CMD $rawdevice1 -let SEARCH_PATTERN = support raw device; ---source include/search_pattern_in_file.inc ---remove_file $SEARCH_FILE ---echo "testing temp tablespace non-support for raw device" ---error 1 ---exec $MYSQLD_CMD $rawdevice2 -let SEARCH_PATTERN = support raw device; ---source include/search_pattern_in_file.inc ---remove_file $SEARCH_FILE - ---source include/start_mysqld.inc - -show tables; -create temporary table t1 ( - keyc int, c1 char(100), c2 char(100) - ) engine = innodb; -drop table t1; - -#----------------------------------------------------------------------------- -# -# 11. try restarting server with temp-tablespace less than min. threshold -# ---source include/shutdown_mysqld.inc ---echo "try starting server with temp-tablespace size < min. threshold" ---error 1 ---exec $MYSQLD_CMD $sizeoftempfile1 -let SEARCH_PATTERN = Tablespace size must be at least; ---source ./include/search_pattern_in_file.inc ---remove_file $SEARCH_FILE ---echo "try starting server with sys-tablespace size < min. threshold" ---error 1 ---exec $MYSQLD_CMD $sizeoftempfile2 -let SEARCH_PATTERN = Tablespace size must be at least; ---source ./include/search_pattern_in_file.inc ---remove_file $SEARCH_FILE - ---source include/start_mysqld.inc - -show tables; -create temporary table t1 ( - keyc int, c1 char(100), c2 char(100) - ) engine = innodb; -drop table t1; - -#----------------------------------------------------------------------------- -# -# 12. no file specified for temp-tablespace. -# ---source include/shutdown_mysqld.inc - ---echo "try starting server with no file specified for temp-tablespace" ---error 1 ---exec $MYSQLD_CMD $notemptablespacefile -let SEARCH_PATTERN = init function returned error; ---source ./include/search_pattern_in_file.inc ---remove_file $SEARCH_FILE - ---source include/start_mysqld.inc - -show tables; -create temporary table t1 ( - keyc int, c1 char(100), c2 char(100) - ) engine = innodb; -drop table t1; diff --git a/mysql-test/suite/innodb_zip/t/wl6915_1.test b/mysql-test/suite/innodb_zip/t/wl6915_1.test deleted file mode 100644 index 7f0f734d16a..00000000000 --- a/mysql-test/suite/innodb_zip/t/wl6915_1.test +++ /dev/null @@ -1,650 +0,0 @@ ---source include/have_innodb.inc ---source include/have_innodb_zip.inc ---source include/have_no_undo_tablespaces.inc ---source include/big_test.inc - -# Embedded server does not support restarting ---source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - -#################################################################### -# TC to test temp-table undolog changes correctness # -# Sceanrio covered in single testcase : # -# - Tables with row format(redundant,compressed,dynamic,compact # -# - Table with primary,composite,prefix,secondary INDEX # -# - Insert/delete/update with transactioons # -# - Transaction with COMMIT,rollback,savepoint statements # -# - Transaction having temporary table and normal table # -# - Concurrency by execution of two clients creating tables with # -# same names # -# - Inserting data using # -# - Insert into .. , Load data infile..,insert ignore # -# - Insert into .. on duplicate update # -# - Check basic delete and upadte [ignore] # -# - Check constraints like duplicate key,default value # -# - Alter ADD COLUMN , ADD PRIMARY KEY # -# - Flush Tables, logs command # -# - Vary innodb_undo_tablespaces=0,innodb_undo_logs # -# innodb_log_files_in_group # -# - Verify rseg message from server log # -#################################################################### - -# run for page size >= 8k ---disable_warnings -if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value >= 8192`) -{ - --skip Test requires InnoDB with page size >= 8k. -} ---enable_warnings - -call mtr.ADD_suppression(".*Resizing redo log.*"); -call mtr.ADD_suppression(".*Starting to delete and rewrite log files.*"); -call mtr.ADD_suppression(".*New log files created.*"); -# Save initial VALUES of server variable ---disable_query_log -let $innodb_file_per_table_orig=`SELECT @@innodb_file_per_table`; ---enable_query_log - -SELECT @@global.innodb_undo_tablespaces; - -# Create procedure to perform -# 1. Create temp table with row types , INDEX , sufficent data types -# 2. Perform DML with transaction -delimiter |; -CREATE PROCEDURE populate_tables(IN id VARCHAR(10)) - begin - declare n int default 20; - set global innodb_file_per_table=on; - DROP TABLE IF EXISTS t1,t2,t3,t4; - - CREATE TEMPORARY TABLE t1_temp(c1 int NOT NULL, - c2 int NOT NULL, - c3 char(255) NOT NULL, - c4 text(600) NOT NULL, - c5 blob(600) NOT NULL, - c6 varchar(600) NOT NULL, - c7 varchar(600) NOT NULL, - c8 datetime, - c9 decimal(6,3), - PRIMARY KEY (c1), - INDEX (c3,c4(50),c5(50)), - INDEX (c2)) - ENGINE=InnoDB ROW_FORMAT=redundant; - - set @s = concat("CREATE TABLE t1",id," ( c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=redundant;"); - PREPARE createTable FROM @s; - EXECUTE createTable; - DEALLOCATE PREPARE createTable; - - - CREATE TEMPORARY TABLE t2_temp(c1 int NOT NULL, - c2 int NOT NULL, - c3 char(255) NOT NULL, - c4 text(600) NOT NULL, - c5 blob(600) NOT NULL, - c6 varchar(600) NOT NULL, - c7 varchar(600) NOT NULL, - c8 datetime, - c9 decimal(6,3), - PRIMARY KEY (c1), - INDEX (c3,c4(50),c5(50)), - INDEX (c2)) - ENGINE=InnoDB ROW_FORMAT=compact; - - set @s = concat("CREATE TABLE t2",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compact;"); - PREPARE createTable FROM @s; - EXECUTE createTable; - DEALLOCATE PREPARE createTable; - - CREATE TEMPORARY TABLE t3_temp(c1 int NOT NULL, - c2 int NOT NULL, - c3 char(255) NOT NULL, - c4 text(600) NOT NULL, - c5 blob(600) NOT NULL, - c6 varchar(600) NOT NULL, - c7 varchar(600) NOT NULL, - c8 datetime, - c9 decimal(6,3), - PRIMARY KEY (c1), - INDEX (c3,c4(50),c5(50)), - INDEX (c2)) - ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4; - - set @s = concat("CREATE TABLE t3",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4;"); - PREPARE createTable FROM @s; - EXECUTE createTable; - DEALLOCATE PREPARE createTable; - - CREATE TEMPORARY TABLE t4_temp(c1 int NOT NULL, - c2 int NOT NULL, - c3 char(255) NOT NULL, - c4 text(600) NOT NULL, - c5 blob(600) NOT NULL, - c6 varchar(600) NOT NULL, - c7 varchar(600) NOT NULL, - c8 datetime, - c9 decimal(6,3), - PRIMARY KEY (c1), - INDEX (c3,c4(50),c5(50)), - INDEX (c2)) - ENGINE=InnoDB ROW_FORMAT=dynamic; - - set @s = concat("CREATE TABLE t4",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=dynamic;"); - PREPARE createTable FROM @s; - EXECUTE createTable; - DEALLOCATE PREPARE createTable; - - while (n > 0) do - START TRANSACTION; - set @s = concat("INSERT INTO t1",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t1_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30), - REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70), - REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70), - NOW(),(100.55+n)); - - set @s = concat("INSERT INTO t2",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - - INSERT INTO t2_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30), - REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70), - REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70), - NOW(),(100.55+n)); - - savepoint a; - - set @s = concat("INSERT INTO t3",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - - INSERT INTO t3_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30), - REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70), - REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70), - NOW(),(100.55+n)); - - savepoint b; - - set @s = concat("INSERT INTO t4",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - - INSERT INTO t4_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30), - REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70), - REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70), - NOW(),(100.55+n)); - - - if (n > 10) then - if (n > 10 and n <=12) then - ROLLBACK TO SAVEPOINT a; - COMMIT; - end if; - if (n > 12 and n < 15) then - ROLLBACK TO SAVEPOINT b; - COMMIT; - end if; - if (n > 15) then - COMMIT; - end if; - - else - if (n > 5) then - START TRANSACTION; - DELETE FROM t1_temp WHERE c1 > 10 ; - DELETE FROM t2_temp WHERE c1 > 10 ; - DELETE FROM t3_temp WHERE c1 > 10 ; - DELETE FROM t4_temp WHERE c1 > 10 ; - - rollback; - START TRANSACTION; - update t1_temp set c1 = c1 + 1000 WHERE c1 > 10; - update t2_temp set c1 = c1 + 1000 WHERE c1 > 10; - update t3_temp set c1 = c1 + 1000 WHERE c1 > 10; - update t4_temp set c1 = c1 + 1000 WHERE c1 > 10; - rollback; - end if; - end if; - - if (n < 5) then - rollback; - end if; - - FLUSH logs; - ALTER TABLE t1_temp DROP PRIMARY KEY; - ALTER TABLE t1_temp ADD PRIMARY KEY (c1,c3(10),c4(10)); - ALTER TABLE t2_temp DROP PRIMARY KEY; - ALTER TABLE t2_temp ADD PRIMARY KEY (c1,c3(10),c4(10)); - ALTER TABLE t3_temp DROP PRIMARY KEY; - ALTER TABLE t3_temp ADD PRIMARY KEY (c1,c3(10),c4(10)); - ALTER TABLE t4_temp DROP PRIMARY KEY; - ALTER TABLE t4_temp ADD PRIMARY KEY (c1,c3(10),c4(10)); - FLUSH tables; - - START TRANSACTION; - set @s = concat("INSERT INTO t1",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t1_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30), - REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), - REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), - NOW(),(100.55+n+100)); - set @s = concat("INSERT INTO t2",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t2_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30), - REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), - REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), - NOW(),(100.55+n+100)); - set @s = concat("INSERT INTO t3",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t3_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30), - REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), - REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), - NOW(),(100.55+n+100)); - set @s = concat("INSERT INTO t4",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t4_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30), - REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), - REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), - NOW(),(100.55+n+100)); - - - DELETE FROM t1_temp WHERE c1 between 100 and 110; - DELETE FROM t2_temp WHERE c1 between 100 and 110; - DELETE FROM t3_temp WHERE c1 between 100 and 110; - DELETE FROM t4_temp WHERE c1 between 100 and 110; - - update t1_temp set c1 = c1+1 WHERE c1>110; - update t2_temp set c1 = c1+1 WHERE c1>110; - update t3_temp set c1 = c1+1 WHERE c1>110; - update t4_temp set c1 = c1+1 WHERE c1>110; - - savepoint a; - - set @s = concat("INSERT INTO t1",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t1_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), - REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), - REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), - NOW(),(100.55+n+100)); - set @s = concat("INSERT INTO t2",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t2_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), - REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), - REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), - NOW(),(100.55+n+100)); - set @s = concat("INSERT INTO t3",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t3_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), - REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), - REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), - NOW(),(100.55+n+100)); - set @s = concat("INSERT INTO t4",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t4_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), - REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), - REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), - NOW(),(100.55+n+100)); - savepoint b; - - set @s = concat("INSERT INTO t1",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t1_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), - REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), - REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), - NOW(),(100.55+n+100)); - set @s = concat("INSERT INTO t2",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t2_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), - REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), - REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), - NOW(),(100.55+n+100)); - set @s = concat("INSERT INTO t3",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t3_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), - REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), - REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), - NOW(),(100.55+n+100)); - set @s = concat("INSERT INTO t4",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));"); - PREPARE insertIntoTable FROM @s; - EXECUTE insertIntoTable; - DEALLOCATE PREPARE insertIntoTable; - INSERT INTO t4_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30), - REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70), - REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60), - NOW(),(100.55+n+100)); - savepoint c; - rollback to b; - rollback to a; - COMMIT; - COMMIT; - rollback; - set n = n - 1; - end while; -end| -delimiter ;| - -# Create two client for concurrent execution -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); - ---echo #---client 1 : dml operation ---" -connection con1; --- disable_query_log -eval set global innodb_file_per_table=$innodb_file_per_table_orig; - --- enable_query_log --- disable_query_log -# call procedure ---send call populate_tables('_1'); --- enable_query_log - ---echo #---client 2 : dml operation ---" -connection con2; --- disable_query_log -eval set global innodb_file_per_table=$innodb_file_per_table_orig; --- enable_query_log --- disable_query_log -# call procedure ---send call populate_tables('_2'); - --- enable_query_log - -# check data of client connection 1 ---echo # In connection 1 -connection con1; ---reap -# 20 rows exepceted in 5 tables -SELECT count(*) FROM t1_1; -SELECT count(*) FROM t2_1; -SELECT count(*) FROM t3_1; -SELECT count(*) FROM t4_1; -SELECT c1 FROM t1_1; -SELECT c1 FROM t2_1; -SELECT c1 FROM t3_1; -SELECT c1 FROM t4_1; -SELECT count(*) FROM t1_temp; -SELECT count(*) FROM t2_temp; -SELECT count(*) FROM t3_temp; -SELECT count(*) FROM t4_temp; -SELECT c1 FROM t1_temp; -SELECT c1 FROM t2_temp; -SELECT c1 FROM t3_temp; -SELECT c1 FROM t4_temp; -# check data of client connection 2 ---echo # In connection 2 -connection con2; ---reap -# 20 rows exepceted in 5 tables -SELECT count(*) FROM t1_2; -SELECT count(*) FROM t2_2; -SELECT count(*) FROM t3_2; -SELECT count(*) FROM t4_2; -SELECT c1 FROM t1_2; -SELECT c1 FROM t2_2; -SELECT c1 FROM t3_2; -SELECT c1 FROM t4_2; -SELECT count(*) FROM t1_temp; -SELECT count(*) FROM t2_temp; -SELECT count(*) FROM t3_temp; -SELECT count(*) FROM t4_temp; -SELECT c1 FROM t1_temp; -SELECT c1 FROM t2_temp; -SELECT c1 FROM t3_temp; -SELECT c1 FROM t4_temp; - ---echo # In connection 1 -connection con1; - -set AUTOCOMMIT = 0; -ALTER TABLE t1_temp DROP PRIMARY KEY; -ALTER TABLE t1_temp ADD PRIMARY KEY (c1); -ALTER TABLE t2_temp DROP PRIMARY KEY; -ALTER TABLE t2_temp ADD PRIMARY KEY (c1); -ALTER TABLE t3_temp DROP PRIMARY KEY; -ALTER TABLE t3_temp ADD PRIMARY KEY (c1); -ALTER TABLE t4_temp DROP PRIMARY KEY; -ALTER TABLE t4_temp ADD PRIMARY KEY (c1); -# Check duplicate key constraint + insert ignore ---error ER_DUP_ENTRY -INSERT INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -insert ignore into t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); ---error ER_DUP_ENTRY -INSERT INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -insert ignore into t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); ---error ER_DUP_ENTRY -INSERT INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -insert ignore into t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); ---error ER_DUP_ENTRY -INSERT INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -insert ignore into t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); - -# check rollback due to duplicate value in second record of insert ---error ER_DUP_ENTRY -INSERT INTO t1_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55), -(20,1,'a','a','a','a','a',NOW(),100.55); ---error ER_DUP_ENTRY -INSERT INTO t2_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55), -(20,1,'a','a','a','a','a',NOW(),100.55); ---error ER_DUP_ENTRY -INSERT INTO t3_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55), -(20,1,'a','a','a','a','a',NOW(),100.55); ---error ER_DUP_ENTRY -INSERT INTO t4_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55), -(20,1,'a','a','a','a','a',NOW(),100.55); - -set AUTOCOMMIT = 1; - -SELECT c1,c2 FROM t1_temp WHERE c1 in (20,1); -SELECT c1,c2 FROM t2_temp WHERE c1 in (20,1); -SELECT c1,c2 FROM t3_temp WHERE c1 in (20,1); -SELECT c1,c2 FROM t4_temp WHERE c1 in (20,1); - -#replace statement -REPLACE INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -REPLACE INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -REPLACE INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -REPLACE INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55); -# verify row is replaced FROM (20,20) to (20,1) -SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t1_temp WHERE c1 = 20; -SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t2_temp WHERE c1 = 20; -SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t3_temp WHERE c1 = 20; -SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t4_temp WHERE c1 = 20; - -# Update ignore. statement is gonored as 20 value exits -update ignore t1_temp set c1 = 20 WHERE c1 = 140 ; -update ignore t2_temp set c1 = 20 WHERE c1 = 140 ; -update ignore t3_temp set c1 = 20 WHERE c1 = 140 ; -update ignore t4_temp set c1 = 20 WHERE c1 = 140 ; -# see record 140 is present as last update ignored -SELECT count(*) FROM t1_temp WHERE c1 = 140; -SELECT count(*) FROM t2_temp WHERE c1 = 140; -SELECT count(*) FROM t3_temp WHERE c1 = 140; -SELECT count(*) FROM t4_temp WHERE c1 = 140; - -# Alter table to ADD COLUMN and PRIMARY KEY -ALTER TABLE t1_temp ADD COLUMN c10 int default 99 , -ADD COLUMN c11 varchar(100) default 'test'; -ALTER TABLE t1_temp DROP PRIMARY KEY; -ALTER TABLE t1_temp ADD PRIMARY KEY (c1); -INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55); -SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0; -SELECT count(*) FROM t1_temp WHERE c10 = 99 and c11 like 'test'; -# insert on duplicate key update -INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55) -ON DUPLICATE KEY UPDATE c1=-2,c2=-2; -SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0; - -# - -#cleanup -DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1; -disconnect con1; - -connection con2; -DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2; -disconnect con2; - - -connection default; -# -## trying with VALUES innodb_undo_tablespaces, innodb_undo_logs ,innodb_log_files_in_group -## -let $restart_parameters=--innodb_undo_tablespaces=0 --innodb_rollback_segments=20 --innodb_undo_logs=20 --innodb_log_files_in_group=4; ---source include/restart_mysqld.inc - -# Create two client for concurrent execution -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); -# -# -connection con1; ---send call populate_tables('_1'); -connection con2; ---send call populate_tables('_2'); ---echo "#connection 1 - verify tables" -connection con1; ---reap -SELECT count(*) FROM t1_1; -SELECT count(*) FROM t2_1; -SELECT count(*) FROM t3_1; -SELECT count(*) FROM t4_1; -SELECT c1 FROM t1_1; -SELECT c1 FROM t2_1; -SELECT c1 FROM t3_1; -SELECT c1 FROM t4_1; -SELECT count(*) FROM t1_temp; -SELECT count(*) FROM t2_temp; -SELECT count(*) FROM t3_temp; -SELECT count(*) FROM t4_temp; -SELECT c1 FROM t1_temp; -SELECT c1 FROM t2_temp; -SELECT c1 FROM t3_temp; -SELECT c1 FROM t4_temp; -DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1; -disconnect con1; ---echo "#connection 2 - verify tables" -connection con2; ---reap -SELECT count(*) FROM t1_2; -SELECT count(*) FROM t2_2; -SELECT count(*) FROM t3_2; -SELECT count(*) FROM t4_2; -SELECT c1 FROM t1_2; -SELECT c1 FROM t2_2; -SELECT c1 FROM t3_2; -SELECT c1 FROM t4_2; -SELECT count(*) FROM t1_temp; -SELECT count(*) FROM t2_temp; -SELECT count(*) FROM t3_temp; -SELECT count(*) FROM t4_temp; -SELECT c1 FROM t1_temp; -SELECT c1 FROM t2_temp; -SELECT c1 FROM t3_temp; -SELECT c1 FROM t4_temp; -DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2; -disconnect con2; - -connection default; -# innodb_undo_logs > non redo rsegment -let $restart_parameters=--innodb_undo_tablespaces=0 --innodb_rollback_segments=30 --innodb_undo_logs=20 --innodb_log_files_in_group=4; ---source include/restart_mysqld.inc - -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); - -connection con1; ---send call populate_tables('_1'); -connection con2; ---send call populate_tables('_2'); ---echo "#connection 1 - verify tables" -connection con1; ---reap -SELECT count(*) FROM t1_1; -SELECT count(*) FROM t2_1; -SELECT count(*) FROM t3_1; -SELECT count(*) FROM t4_1; -SELECT c1 FROM t1_1; -SELECT c1 FROM t2_1; -SELECT c1 FROM t3_1; -SELECT c1 FROM t4_1; -SELECT count(*) FROM t1_temp; -SELECT count(*) FROM t2_temp; -SELECT count(*) FROM t3_temp; -SELECT count(*) FROM t4_temp; -SELECT c1 FROM t1_temp; -SELECT c1 FROM t2_temp; -SELECT c1 FROM t3_temp; -SELECT c1 FROM t4_temp; -DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1; -disconnect con1; ---echo "#connection 2 - verify tables" -connection con2; ---reap -SELECT count(*) FROM t1_2; -SELECT count(*) FROM t2_2; -SELECT count(*) FROM t3_2; -SELECT count(*) FROM t4_2; -SELECT c1 FROM t1_2; -SELECT c1 FROM t2_2; -SELECT c1 FROM t3_2; -SELECT c1 FROM t4_2; -SELECT count(*) FROM t1_temp; -SELECT count(*) FROM t2_temp; -SELECT count(*) FROM t3_temp; -SELECT count(*) FROM t4_temp; -SELECT c1 FROM t1_temp; -SELECT c1 FROM t2_temp; -SELECT c1 FROM t3_temp; -SELECT c1 FROM t4_temp; -DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2; -disconnect con2; - -# - -connection default; -DROP PROCEDURE populate_tables; - -# check message in log -let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err; -let SEARCH_FILE= $error_log; -# We get depending on the platform either "./ibdata1" or ".\ibdata1". -let SEARCH_PATTERN=redo rollback segment.*found.*redo rollback segment.*active ---source include/search_pattern_in_file.inc -let SEARCH_PATTERN=non-redo rollback.*active ---source include/search_pattern_in_file.inc - - -SHOW TABLES; - --- disable_query_log -eval set global innodb_file_per_table=$innodb_file_per_table_orig; --- enable_query_log - diff --git a/mysql-test/suite/jp/r/jp_convert_ucs2.result b/mysql-test/suite/jp/r/jp_convert_ucs2.result index 842ddfa2ea7..aa97d30f745 100644 --- a/mysql-test/suite/jp/r/jp_convert_ucs2.result +++ b/mysql-test/suite/jp/r/jp_convert_ucs2.result @@ -153,13 +153,13 @@ SELECT ` íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£³`; £Ã£± CONVERT(`£Ã£±` using sjis) -¡¦¢µ¢¶~¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ ¡¦??~??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???¡¦¡¦¡¦ -¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦??????????????????? -°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç ???????????????????? -°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û ???????????????????? -°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ???????????????????? -í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ???????????????????? -íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ???????????????????? +¡¦¢µ¢¶~¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ NULL +¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ NULL +°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç NULL +°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û NULL +°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï NULL +í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ NULL +íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ NULL Warnings: Warning 1977 Cannot convert 'ucs2' character 0x02DB to 'sjis' Warning 1977 Cannot convert 'ucs2' character 0x9EF8 to 'sjis' @@ -236,13 +236,13 @@ SELECT ` íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¶`; £Ã£± CONVERT(`£Ã£±` using sjis) -¡¦¢µ¢¶~¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ ¡¦??~??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???¡¦¡¦¡¦ -¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦??????????????????? -°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç ???????????????????? -°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û ???????????????????? -°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ???????????????????? -í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ???????????????????? -íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ???????????????????? +¡¦¢µ¢¶~¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ NULL +¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ NULL +°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç NULL +°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û NULL +°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï NULL +í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ NULL +íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ NULL Warnings: Warning 1977 Cannot convert 'ucs2' character 0x02DB to 'sjis' Warning 1977 Cannot convert 'ucs2' character 0x9EF8 to 'sjis' @@ -319,13 +319,13 @@ SELECT ` íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¹`; £Ã£± CONVERT(`£Ã£±` using sjis) -¡¦¢µ¢¶~¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ ¡¦??~??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???¡¦¡¦¡¦ -°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç ???????????????????? -°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û ???????????????????? -°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ???????????????????? -¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦??????????????????? -í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ???????????????????? -íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ???????????????????? +¡¦¢µ¢¶~¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ NULL +°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç NULL +°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û NULL +°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï NULL +¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ NULL +í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ NULL +íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ NULL Warnings: Warning 1977 Cannot convert 'ucs2' character 0x02DB to 'sjis' Warning 1977 Cannot convert 'ucs2' character 0x4E5A to 'sjis' diff --git a/mysql-test/suite/jp/r/jp_convert_ujis.result b/mysql-test/suite/jp/r/jp_convert_ujis.result index d47f6b4ef25..afbc985df64 100644 --- a/mysql-test/suite/jp/r/jp_convert_ujis.result +++ b/mysql-test/suite/jp/r/jp_convert_ujis.result @@ -353,37 +353,37 @@ SELECT ` ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£³`; £Ã£± CONVERT(`£Ã£±` using sjis) -¢ð¢ñ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -§È§É§Ê§Ë§Ì§Í§Î¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ???????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -©È©É©Ê©Ë©Ì©Í©Î©Ï©Ð¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ?????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -ª´ªµª¶ª·ª¸¡¦ªºª»ª¼ª½ª¾ª¿ªÀªÁªÂªÃªÄªÅªÆªÇ ?????¡¦?????????????? -ªÈªÉªÊªËªÌªÍªÎªÏªÐªÑªÒªÓªÔªÕªÖª×ªØªÙªÚªÛ ???????????????????? -ªÜªÝªÞªßªàªáªâªãªäªåªæªçªèªéªêªëªìªíªîªï ???????????????????? -ªðªñªòªóªôªõªöª÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -«´«µ«¶«·«¸«¹«º«»¡¦«½«¾«¿«À«Á«Â«Ã¡¦«Å«Æ«Ç ????????¡¦???????¡¦??? -«È«É«Ê«Ë«Ì«Í«Î«Ï«Ð«Ñ«Ò«Ó«Ô«Õ«Ö«×«Ø«Ù«Ú«Û ???????????????????? -«Ü«Ý«Þ«ß«à«á«â«ã«ä«å«æ«ç«è«é«ê«ë«ì«í«î«ï ???????????????????? -«ð«ñ«ò«ó«ô«õ«ö«÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç ???????????????????? -°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û ???????????????????? -°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ???????????????????? -°ð°ñ°ò°ó°ô°õ°ö°÷°ø°ù°ú°û°ü°ý°þ¡¦¡¦¡¦¡¦¡¦ ???????????????¡¦¡¦¡¦¡¦¡¦ -í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ???????????????????? -íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ???????????????????? -íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -¡¦¢µ¢¶¢·¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ ¡¦??~??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???¡¦¡¦¡¦ -¡¦¦ñ¦ò¦ó¦ô¦õ¦ö¦÷¦ø¦ù¦ú¦û¦ü¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦????????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -¡¦©¡©¢¡¦©¤¡¦©¦¡¦©¨©©¡¦©«©¬©­¡¦©¯©°¡¦¡¦¡¦ ¡¦??¡¦?¡¦?¡¦??¡¦???¡¦??¡¦¡¦¡¦ -¡¦ª¡ª¢ª£ª¤ª¥ª¦ª§ª¨ª©ªªª«ª¬ª­ª®ª¯ª°ª±ª²ª³ ¡¦??????????????????? -¡¦«¡«¢«£«¤«¥«¦«§«¨«©«ª«««¬«­«®«¯«°«±«²«³ ¡¦??????????????????? -¡¦°¡°¢°£°¤°¥°¦°§°¨°©°ª°«°¬°­°®°¯°°°±°²°³ ¡¦??????????????????? -¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦??????????????????? -¡¦¡¦§ò§ó§ô§õ§ö§÷§ø§ù§ú§û§ü§ý§þ¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦?????????????¡¦¡¦¡¦¡¦¡¦ -¡¦¡¦¡¦¡¦¡¦¦á¦â¦ã¦ä¦å¡¦¦ç¡¦¦é¦ê¡¦¦ì¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦?????¡¦?¡¦??¡¦?¡¦¡¦¡¦ -¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦©Á©Â©Ã©Ä©Å©Æ©Ç ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦??????? -¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦§Â§Ã§Ä§Å§Æ§Ç ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦?????? -¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢¯¢°¢±¢²¢³ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦????? -¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢ë¢ì¢í¢î¢ï ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦????? +¢ð¢ñ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +§È§É§Ê§Ë§Ì§Í§Î¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +©È©É©Ê©Ë©Ì©Í©Î©Ï©Ð¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +ª´ªµª¶ª·ª¸¡¦ªºª»ª¼ª½ª¾ª¿ªÀªÁªÂªÃªÄªÅªÆªÇ NULL +ªÈªÉªÊªËªÌªÍªÎªÏªÐªÑªÒªÓªÔªÕªÖª×ªØªÙªÚªÛ NULL +ªÜªÝªÞªßªàªáªâªãªäªåªæªçªèªéªêªëªìªíªîªï NULL +ªðªñªòªóªôªõªöª÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +«´«µ«¶«·«¸«¹«º«»¡¦«½«¾«¿«À«Á«Â«Ã¡¦«Å«Æ«Ç NULL +«È«É«Ê«Ë«Ì«Í«Î«Ï«Ð«Ñ«Ò«Ó«Ô«Õ«Ö«×«Ø«Ù«Ú«Û NULL +«Ü«Ý«Þ«ß«à«á«â«ã«ä«å«æ«ç«è«é«ê«ë«ì«í«î«ï NULL +«ð«ñ«ò«ó«ô«õ«ö«÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç NULL +°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û NULL +°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï NULL +°ð°ñ°ò°ó°ô°õ°ö°÷°ø°ù°ú°û°ü°ý°þ¡¦¡¦¡¦¡¦¡¦ NULL +í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ NULL +íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ NULL +íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +¡¦¢µ¢¶¢·¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ NULL +¡¦¦ñ¦ò¦ó¦ô¦õ¦ö¦÷¦ø¦ù¦ú¦û¦ü¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +¡¦©¡©¢¡¦©¤¡¦©¦¡¦©¨©©¡¦©«©¬©­¡¦©¯©°¡¦¡¦¡¦ NULL +¡¦ª¡ª¢ª£ª¤ª¥ª¦ª§ª¨ª©ªªª«ª¬ª­ª®ª¯ª°ª±ª²ª³ NULL +¡¦«¡«¢«£«¤«¥«¦«§«¨«©«ª«««¬«­«®«¯«°«±«²«³ NULL +¡¦°¡°¢°£°¤°¥°¦°§°¨°©°ª°«°¬°­°®°¯°°°±°²°³ NULL +¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ NULL +¡¦¡¦§ò§ó§ô§õ§ö§÷§ø§ù§ú§û§ü§ý§þ¡¦¡¦¡¦¡¦¡¦ NULL +¡¦¡¦¡¦¡¦¡¦¦á¦â¦ã¦ä¦å¡¦¦ç¡¦¦é¦ê¡¦¦ì¡¦¡¦¡¦ NULL +¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦©Á©Â©Ã©Ä©Å©Æ©Ç NULL +¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦§Â§Ã§Ä§Å§Æ§Ç NULL +¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢¯¢°¢±¢²¢³ NULL +¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢ë¢ì¢í¢î¢ï NULL ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ @@ -751,37 +751,37 @@ SELECT ` ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¶`; £Ã£± CONVERT(`£Ã£±` using sjis) -¢ð¢ñ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -§È§É§Ê§Ë§Ì§Í§Î¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ???????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -©È©É©Ê©Ë©Ì©Í©Î©Ï©Ð¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ?????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -ª´ªµª¶ª·ª¸¡¦ªºª»ª¼ª½ª¾ª¿ªÀªÁªÂªÃªÄªÅªÆªÇ ?????¡¦?????????????? -ªÈªÉªÊªËªÌªÍªÎªÏªÐªÑªÒªÓªÔªÕªÖª×ªØªÙªÚªÛ ???????????????????? -ªÜªÝªÞªßªàªáªâªãªäªåªæªçªèªéªêªëªìªíªîªï ???????????????????? -ªðªñªòªóªôªõªöª÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -«´«µ«¶«·«¸«¹«º«»¡¦«½«¾«¿«À«Á«Â«Ã¡¦«Å«Æ«Ç ????????¡¦???????¡¦??? -«È«É«Ê«Ë«Ì«Í«Î«Ï«Ð«Ñ«Ò«Ó«Ô«Õ«Ö«×«Ø«Ù«Ú«Û ???????????????????? -«Ü«Ý«Þ«ß«à«á«â«ã«ä«å«æ«ç«è«é«ê«ë«ì«í«î«ï ???????????????????? -«ð«ñ«ò«ó«ô«õ«ö«÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç ???????????????????? -°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û ???????????????????? -°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ???????????????????? -°ð°ñ°ò°ó°ô°õ°ö°÷°ø°ù°ú°û°ü°ý°þ¡¦¡¦¡¦¡¦¡¦ ???????????????¡¦¡¦¡¦¡¦¡¦ -í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ???????????????????? -íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ???????????????????? -íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -¡¦¢µ¢¶¢·¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ ¡¦??~??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???¡¦¡¦¡¦ -¡¦¦ñ¦ò¦ó¦ô¦õ¦ö¦÷¦ø¦ù¦ú¦û¦ü¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦????????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -¡¦©¡©¢¡¦©¤¡¦©¦¡¦©¨©©¡¦©«©¬©­¡¦©¯©°¡¦¡¦¡¦ ¡¦??¡¦?¡¦?¡¦??¡¦???¡¦??¡¦¡¦¡¦ -¡¦ª¡ª¢ª£ª¤ª¥ª¦ª§ª¨ª©ªªª«ª¬ª­ª®ª¯ª°ª±ª²ª³ ¡¦??????????????????? -¡¦«¡«¢«£«¤«¥«¦«§«¨«©«ª«««¬«­«®«¯«°«±«²«³ ¡¦??????????????????? -¡¦°¡°¢°£°¤°¥°¦°§°¨°©°ª°«°¬°­°®°¯°°°±°²°³ ¡¦??????????????????? -¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦??????????????????? -¡¦¡¦§ò§ó§ô§õ§ö§÷§ø§ù§ú§û§ü§ý§þ¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦?????????????¡¦¡¦¡¦¡¦¡¦ -¡¦¡¦¡¦¡¦¡¦¦á¦â¦ã¦ä¦å¡¦¦ç¡¦¦é¦ê¡¦¦ì¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦?????¡¦?¡¦??¡¦?¡¦¡¦¡¦ -¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦©Á©Â©Ã©Ä©Å©Æ©Ç ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦??????? -¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦§Â§Ã§Ä§Å§Æ§Ç ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦?????? -¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢¯¢°¢±¢²¢³ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦????? -¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢ë¢ì¢í¢î¢ï ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦????? +¢ð¢ñ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +§È§É§Ê§Ë§Ì§Í§Î¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +©È©É©Ê©Ë©Ì©Í©Î©Ï©Ð¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +ª´ªµª¶ª·ª¸¡¦ªºª»ª¼ª½ª¾ª¿ªÀªÁªÂªÃªÄªÅªÆªÇ NULL +ªÈªÉªÊªËªÌªÍªÎªÏªÐªÑªÒªÓªÔªÕªÖª×ªØªÙªÚªÛ NULL +ªÜªÝªÞªßªàªáªâªãªäªåªæªçªèªéªêªëªìªíªîªï NULL +ªðªñªòªóªôªõªöª÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +«´«µ«¶«·«¸«¹«º«»¡¦«½«¾«¿«À«Á«Â«Ã¡¦«Å«Æ«Ç NULL +«È«É«Ê«Ë«Ì«Í«Î«Ï«Ð«Ñ«Ò«Ó«Ô«Õ«Ö«×«Ø«Ù«Ú«Û NULL +«Ü«Ý«Þ«ß«à«á«â«ã«ä«å«æ«ç«è«é«ê«ë«ì«í«î«ï NULL +«ð«ñ«ò«ó«ô«õ«ö«÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç NULL +°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û NULL +°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï NULL +°ð°ñ°ò°ó°ô°õ°ö°÷°ø°ù°ú°û°ü°ý°þ¡¦¡¦¡¦¡¦¡¦ NULL +í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ NULL +íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ NULL +íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +¡¦¢µ¢¶¢·¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ NULL +¡¦¦ñ¦ò¦ó¦ô¦õ¦ö¦÷¦ø¦ù¦ú¦û¦ü¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +¡¦©¡©¢¡¦©¤¡¦©¦¡¦©¨©©¡¦©«©¬©­¡¦©¯©°¡¦¡¦¡¦ NULL +¡¦ª¡ª¢ª£ª¤ª¥ª¦ª§ª¨ª©ªªª«ª¬ª­ª®ª¯ª°ª±ª²ª³ NULL +¡¦«¡«¢«£«¤«¥«¦«§«¨«©«ª«««¬«­«®«¯«°«±«²«³ NULL +¡¦°¡°¢°£°¤°¥°¦°§°¨°©°ª°«°¬°­°®°¯°°°±°²°³ NULL +¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ NULL +¡¦¡¦§ò§ó§ô§õ§ö§÷§ø§ù§ú§û§ü§ý§þ¡¦¡¦¡¦¡¦¡¦ NULL +¡¦¡¦¡¦¡¦¡¦¦á¦â¦ã¦ä¦å¡¦¦ç¡¦¦é¦ê¡¦¦ì¡¦¡¦¡¦ NULL +¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦©Á©Â©Ã©Ä©Å©Æ©Ç NULL +¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦§Â§Ã§Ä§Å§Æ§Ç NULL +¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢¯¢°¢±¢²¢³ NULL +¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢ë¢ì¢í¢î¢ï NULL ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ @@ -1149,45 +1149,45 @@ SELECT ` ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ SELECT `£Ã£±`, CONVERT(`£Ã£±` using sjis) FROM `£Ô£¹`; £Ã£± CONVERT(`£Ã£±` using sjis) -¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢¯¢°¢±¢²¢³ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦????? -¡¦¢µ¢¶¢·¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ ¡¦??~??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦???¡¦¡¦¡¦ +¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢¯¢°¢±¢²¢³ NULL +¡¦¢µ¢¶¢·¢¸¢¹¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢Â¢Ã¢Ä¡¦¡¦¡¦ NULL ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢ë¢ì¢í¢î¢ï ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦????? -¢ð¢ñ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ??¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ +¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢ë¢ì¢í¢î¢ï NULL +¢ð¢ñ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -¡¦¡¦¡¦¡¦¡¦¦á¦â¦ã¦ä¦å¡¦¦ç¡¦¦é¦ê¡¦¦ì¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦?????¡¦?¡¦??¡¦?¡¦¡¦¡¦ -¡¦¦ñ¦ò¦ó¦ô¦õ¦ö¦÷¦ø¦ù¦ú¦û¦ü¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦????????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦ +¡¦¡¦¡¦¡¦¡¦¦á¦â¦ã¦ä¦å¡¦¦ç¡¦¦é¦ê¡¦¦ì¡¦¡¦¡¦ NULL +¡¦¦ñ¦ò¦ó¦ô¦õ¦ö¦÷¦ø¦ù¦ú¦û¦ü¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦§Â§Ã§Ä§Å§Æ§Ç ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦?????? -§È§É§Ê§Ë§Ì§Í§Î¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ???????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ +¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦§Â§Ã§Ä§Å§Æ§Ç NULL +§È§É§Ê§Ë§Ì§Í§Î¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -¡¦¡¦§ò§ó§ô§õ§ö§÷§ø§ù§ú§û§ü§ý§þ¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦?????????????¡¦¡¦¡¦¡¦¡¦ -¡¦©¡©¢¡¦©¤¡¦©¦¡¦©¨©©¡¦©«©¬©­¡¦©¯©°¡¦¡¦¡¦ ¡¦??¡¦?¡¦?¡¦??¡¦???¡¦??¡¦¡¦¡¦ -¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦©Á©Â©Ã©Ä©Å©Æ©Ç ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦??????? -©È©É©Ê©Ë©Ì©Í©Î©Ï©Ð¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ?????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ +¡¦¡¦§ò§ó§ô§õ§ö§÷§ø§ù§ú§û§ü§ý§þ¡¦¡¦¡¦¡¦¡¦ NULL +¡¦©¡©¢¡¦©¤¡¦©¦¡¦©¨©©¡¦©«©¬©­¡¦©¯©°¡¦¡¦¡¦ NULL +¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦©Á©Â©Ã©Ä©Å©Æ©Ç NULL +©È©É©Ê©Ë©Ì©Í©Î©Ï©Ð¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -¡¦ª¡ª¢ª£ª¤ª¥ª¦ª§ª¨ª©ªªª«ª¬ª­ª®ª¯ª°ª±ª²ª³ ¡¦??????????????????? -ª´ªµª¶ª·ª¸¡¦ªºª»ª¼ª½ª¾ª¿ªÀªÁªÂªÃªÄªÅªÆªÇ ?????¡¦?????????????? -ªÈªÉªÊªËªÌªÍªÎªÏªÐªÑªÒªÓªÔªÕªÖª×ªØªÙªÚªÛ ???????????????????? -ªÜªÝªÞªßªàªáªâªãªäªåªæªçªèªéªêªëªìªíªîªï ???????????????????? -ªðªñªòªóªôªõªöª÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -¡¦«¡«¢«£«¤«¥«¦«§«¨«©«ª«««¬«­«®«¯«°«±«²«³ ¡¦??????????????????? -«´«µ«¶«·«¸«¹«º«»¡¦«½«¾«¿«À«Á«Â«Ã¡¦«Å«Æ«Ç ????????¡¦???????¡¦??? -«È«É«Ê«Ë«Ì«Í«Î«Ï«Ð«Ñ«Ò«Ó«Ô«Õ«Ö«×«Ø«Ù«Ú«Û ???????????????????? -«Ü«Ý«Þ«ß«à«á«â«ã«ä«å«æ«ç«è«é«ê«ë«ì«í«î«ï ???????????????????? -«ð«ñ«ò«ó«ô«õ«ö«÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ -¡¦°¡°¢°£°¤°¥°¦°§°¨°©°ª°«°¬°­°®°¯°°°±°²°³ ¡¦??????????????????? -°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç ???????????????????? -°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û ???????????????????? -°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï ???????????????????? -°ð°ñ°ò°ó°ô°õ°ö°÷°ø°ù°ú°û°ü°ý°þ¡¦¡¦¡¦¡¦¡¦ ???????????????¡¦¡¦¡¦¡¦¡¦ -¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ ¡¦??????????????????? -í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ ???????????????????? -íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ ???????????????????? -íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ????????¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ +¡¦ª¡ª¢ª£ª¤ª¥ª¦ª§ª¨ª©ªªª«ª¬ª­ª®ª¯ª°ª±ª²ª³ NULL +ª´ªµª¶ª·ª¸¡¦ªºª»ª¼ª½ª¾ª¿ªÀªÁªÂªÃªÄªÅªÆªÇ NULL +ªÈªÉªÊªËªÌªÍªÎªÏªÐªÑªÒªÓªÔªÕªÖª×ªØªÙªÚªÛ NULL +ªÜªÝªÞªßªàªáªâªãªäªåªæªçªèªéªêªëªìªíªîªï NULL +ªðªñªòªóªôªõªöª÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +¡¦«¡«¢«£«¤«¥«¦«§«¨«©«ª«««¬«­«®«¯«°«±«²«³ NULL +«´«µ«¶«·«¸«¹«º«»¡¦«½«¾«¿«À«Á«Â«Ã¡¦«Å«Æ«Ç NULL +«È«É«Ê«Ë«Ì«Í«Î«Ï«Ð«Ñ«Ò«Ó«Ô«Õ«Ö«×«Ø«Ù«Ú«Û NULL +«Ü«Ý«Þ«ß«à«á«â«ã«ä«å«æ«ç«è«é«ê«ë«ì«í«î«ï NULL +«ð«ñ«ò«ó«ô«õ«ö«÷¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL +¡¦°¡°¢°£°¤°¥°¦°§°¨°©°ª°«°¬°­°®°¯°°°±°²°³ NULL +°´°µ°¶°·°¸°¹°º°»°¼°½°¾°¿°À°Á°Â°Ã°Ä°Å°Æ°Ç NULL +°È°É°Ê°Ë°Ì°Í°Î°Ï°Ð°Ñ°Ò°Ó°Ô°Õ°Ö°×°Ø°Ù°Ú°Û NULL +°Ü°Ý°Þ°ß°à°á°â°ã°ä°å°æ°ç°è°é°ê°ë°ì°í°î°ï NULL +°ð°ñ°ò°ó°ô°õ°ö°÷°ø°ù°ú°û°ü°ý°þ¡¦¡¦¡¦¡¦¡¦ NULL +¡¦í¡í¢í£í¤í¥í¦í§í¨í©íªí«í¬í­í®í¯í°í±í²í³ NULL +í´íµí¶í·í¸í¹íºí»í¼í½í¾í¿íÀíÁíÂíÃíÄíÅíÆíÇ NULL +íÈíÉíÊíËíÌíÍíÎíÏíÐíÑíÒíÓíÔíÕíÖí×íØíÙíÚíÛ NULL +íÜíÝíÞíßíàíáíâí㡦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ NULL ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ ¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦ Warnings: Warning 1977 Cannot convert 'ujis' character 0x8FA2AF to 'sjis' diff --git a/mysql-test/suite/jp/r/jp_convert_utf8.result b/mysql-test/suite/jp/r/jp_convert_utf8.result index e33edfb1c3f..89c8b582c40 100644 --- a/mysql-test/suite/jp/r/jp_convert_utf8.result +++ b/mysql-test/suite/jp/r/jp_convert_utf8.result @@ -111,7 +111,7 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `ï¼´ï¼’`; ・弌ä¸ä¸•个丱丶丼丿乂乖乘亂亅豫亊舒å¼äºŽäºž ・弌ä¸ä¸•个丱丶丼丿乂乖乘亂亅豫亊舒å¼äºŽäºž ・蓮連錬呂魯櫓炉賂路露労å©å»Šå¼„æœ—æ¥¼æ¦”æµªæ¼ ãƒ»è“®é€£éŒ¬å‘‚é­¯æ«“ç‚‰è³‚è·¯éœ²åŠ´å©å»Šå¼„æœ—æ¥¼æ¦”æµªæ¼ ãƒ»éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶» ・éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶» -ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼?〜‖|…‥‘’ +ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ NULL 亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛 ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛 ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛 俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆 俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆 @@ -249,7 +249,7 @@ SELECT `C1`, CONVERT(`C1` using sjis) FROM `ï¼´ï¼’`; ・弌ä¸ä¸•个丱丶丼丿乂乖乘亂亅豫亊舒å¼äºŽäºž ・弌ä¸ä¸•个丱丶丼丿乂乖乘亂亅豫亊舒å¼äºŽäºž ・蓮連錬呂魯櫓炉賂路露労å©å»Šå¼„æœ—æ¥¼æ¦”æµªæ¼ ãƒ»è“®é€£éŒ¬å‘‚é­¯æ«“ç‚‰è³‚è·¯éœ²åŠ´å©å»Šå¼„æœ—æ¥¼æ¦”æµªæ¼ ãƒ»éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶» ・éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶» -ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼?〜‖|…‥‘’ +ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ NULL 亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛 ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛 ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛 俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆 俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆 @@ -287,7 +287,7 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T3`; ・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË ・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË ・áàäâăǎÄąåãćĉÄçċÄéèë ・áàäâăǎÄąåãćĉÄçċÄéèë ・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ ・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ -・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・˛˚?΄΅・・・・・・・・¡¦¿・・・ +・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・άέήίϊÎόςÏϋΰώ・・・・・・・ ・άέήίϊÎόςÏϋΰώ・・・・・・・ ・・ђѓєѕіїјљњћќўџ・・・・・ ・・ђѓєѕіїјљњћќўџ・・・・・ ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ @@ -359,28 +359,28 @@ SELECT `C1`, CONVERT(`C1` using ucs2) FROM `T3`; 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ SELECT `C1`, CONVERT(`C1` using sjis) FROM `T3`; C1 CONVERT(`C1` using sjis) -êěėēęǵÄğ・ġĥíìïîÇ・īįĩ ????????・???????・??? -ÊĚĖĒĘ・ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨ ?????・?????????????? -ĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖ ???????????????????? -ĵķĺľļńňņñóòöôǒőÅõŕřŗ ???????????????????? -ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ ???????????????????? -śŚşťţúùüûŭǔűūųůũǘǜǚ ???????????????????? -ǕŴßŶŹŽŻ・・・・・・・・・・・・ ????????・・・・・・・・・・・・ -ǖŵýÿŷźžż・・・・・・・・・・・・ ????????・・・・・・・・・・・・ -¤№・・・・・・・・・・・・・・・・・・ ??・・・・・・・・・・・・・・・・・・ -łŀʼnŋøœßŧþ・・・・・・・・・・・ ?????????・・・・・・・・・・・ -ЈЉЊЋЌЎÐ・・・・・・・・・・・・・ ???????・・・・・・・・・・・・・ -・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË ・??????????????????? -・áàäâăǎÄąåãćĉÄçċÄéèë ・??????????????????? -・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ ・??・?・?・??・???・??・・・ -・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・?????・・・・・・・・???・・・ -・άέήίϊÎόςÏϋΰώ・・・・・・・ ・????????????・・・・・・・ -・・ђѓєѕіїјљњћќўџ・・・・・ ・・?????????????・・・・・ -・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ ・・・・・?????・?・??・?・・・ -・・・・・・・・・・・・・æđðħıijĸ ・・・・・・・・・・・・・??????? -・・・・・・・・・・・・・・ЂЃЄЅІЇ ・・・・・・・・・・・・・・?????? -・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・????? -ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»????? +êěėēęǵÄğ・ġĥíìïîÇ・īįĩ NULL +ÊĚĖĒĘ・ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨ NULL +ĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖ NULL +ĵķĺľļńňņñóòöôǒőÅõŕřŗ NULL +ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ NULL +śŚşťţúùüûŭǔűūųůũǘǜǚ NULL +ǕŴßŶŹŽŻ・・・・・・・・・・・・ NULL +ǖŵýÿŷźžż・・・・・・・・・・・・ NULL +¤№・・・・・・・・・・・・・・・・・・ NULL +łŀʼnŋøœßŧþ・・・・・・・・・・・ NULL +ЈЉЊЋЌЎÐ・・・・・・・・・・・・・ NULL +・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË NULL +・áàäâăǎÄąåãćĉÄçċÄéèë NULL +・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ NULL +・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL +・άέήίϊÎόςÏϋΰώ・・・・・・・ NULL +・・ђѓєѕіїјљњћќўџ・・・・・ NULL +・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ NULL +・・・・・・・・・・・・・æđðħıijĸ NULL +・・・・・・・・・・・・・・ЂЃЄЅІЇ NULL +・・・・・・・・・・・・・・・ºª©®™ NULL +ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë NULL ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ @@ -390,15 +390,15 @@ SELECT `C1`, CONVERT(`C1` using sjis) FROM `T3`; ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ -・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑 ・??????????????????? -・黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・??????????????????? -乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä»  ???????????????????? -仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ???????????????????? -伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ???????????????????? -佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄・・・・・ ???????????????・・・・・ -鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 ???????????????????? -齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ ???????????????????? -龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・ +・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑 NULL +・黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL +乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä»  NULL +仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL +伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL +佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄・・・・・ NULL +鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 NULL +齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ NULL +龔龖龗龞龡龢龣龥・・・・・・・・・・・・ NULL Warnings: Warning 1977 Cannot convert 'utf8' character 0xC3AA to 'sjis' Warning 1977 Cannot convert 'utf8' character 0xC38A to 'sjis' @@ -515,7 +515,7 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T5`; ・弌ä¸ä¸•个丱丶丼丿乂乖乘亂亅豫亊舒å¼äºŽäºž ・弌ä¸ä¸•个丱丶丼丿乂乖乘亂亅豫亊舒å¼äºŽäºž ・蓮連錬呂魯櫓炉賂路露労å©å»Šå¼„æœ—æ¥¼æ¦”æµªæ¼ ãƒ»è“®é€£éŒ¬å‘‚é­¯æ«“ç‚‰è³‚è·¯éœ²åŠ´å©å»Šå¼„æœ—æ¥¼æ¦”æµªæ¼ ãƒ»éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶» ・éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶» -ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼?〜‖|…‥‘’ +ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ NULL 亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛 ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛 ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛 俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆 俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆 @@ -653,7 +653,7 @@ SELECT `C1`, CONVERT(`C1` using sjis) FROM `T5`; ・弌ä¸ä¸•个丱丶丼丿乂乖乘亂亅豫亊舒å¼äºŽäºž ・弌ä¸ä¸•个丱丶丼丿乂乖乘亂亅豫亊舒å¼äºŽäºž ・蓮連錬呂魯櫓炉賂路露労å©å»Šå¼„æœ—æ¥¼æ¦”æµªæ¼ ãƒ»è“®é€£éŒ¬å‘‚é­¯æ«“ç‚‰è³‚è·¯éœ²åŠ´å©å»Šå¼„æœ—æ¥¼æ¦”æµªæ¼ ãƒ»éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶» ・éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶» -ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼?〜‖|…‥‘’ +ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ NULL 亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛 亟亠亢亰亳亶从ä»ä»„仆仂仗仞仭仟价伉佚估佛 ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛 ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛 俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆 俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆 @@ -691,7 +691,7 @@ SELECT `C1`, CONVERT(`C1` using ujis) FROM `ï¼´ï¼–`; ・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË ・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË ・áàäâăǎÄąåãćĉÄçċÄéèë ・áàäâăǎÄąåãćĉÄçċÄéèë ・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ ・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ -・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・˛˚?΄΅・・・・・・・・¡¦¿・・・ +・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・άέήίϊÎόςÏϋΰώ・・・・・・・ ・άέήίϊÎόςÏϋΰώ・・・・・・・ ・・ђѓєѕіїјљњћќўџ・・・・・ ・・ђѓєѕіїјљњћќўџ・・・・・ ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ ・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ @@ -763,28 +763,28 @@ SELECT `C1`, CONVERT(`C1` using ucs2) FROM `ï¼´ï¼–`; 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ 龔龖龗龞龡龢龣龥・・・・・・・・・・・・ SELECT `C1`, CONVERT(`C1` using sjis) FROM `ï¼´ï¼–`; C1 CONVERT(`C1` using sjis) -êěėēęǵÄğ・ġĥíìïîÇ・īįĩ ????????・???????・??? -ÊĚĖĒĘ・ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨ ?????・?????????????? -ĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖ ???????????????????? -ĵķĺľļńňņñóòöôǒőÅõŕřŗ ???????????????????? -ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ ???????????????????? -śŚşťţúùüûŭǔűūųůũǘǜǚ ???????????????????? -ǕŴßŶŹŽŻ・・・・・・・・・・・・ ????????・・・・・・・・・・・・ -ǖŵýÿŷźžż・・・・・・・・・・・・ ????????・・・・・・・・・・・・ -¤№・・・・・・・・・・・・・・・・・・ ??・・・・・・・・・・・・・・・・・・ -łŀʼnŋøœßŧþ・・・・・・・・・・・ ?????????・・・・・・・・・・・ -ЈЉЊЋЌЎÐ・・・・・・・・・・・・・ ???????・・・・・・・・・・・・・ -・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË ・??????????????????? -・áàäâăǎÄąåãćĉÄçċÄéèë ・??????????????????? -・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ ・??・?・?・??・???・??・・・ -・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・?????・・・・・・・・???・・・ -・άέήίϊÎόςÏϋΰώ・・・・・・・ ・????????????・・・・・・・ -・・ђѓєѕіїјљњћќўџ・・・・・ ・・?????????????・・・・・ -・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ ・・・・・?????・?・??・?・・・ -・・・・・・・・・・・・・æđðħıijĸ ・・・・・・・・・・・・・??????? -・・・・・・・・・・・・・・ЂЃЄЅІЇ ・・・・・・・・・・・・・・?????? -・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・????? -ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»????? +êěėēęǵÄğ・ġĥíìïîÇ・īįĩ NULL +ÊĚĖĒĘ・ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨ NULL +ĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖ NULL +ĵķĺľļńňņñóòöôǒőÅõŕřŗ NULL +ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ NULL +śŚşťţúùüûŭǔűūųůũǘǜǚ NULL +ǕŴßŶŹŽŻ・・・・・・・・・・・・ NULL +ǖŵýÿŷźžż・・・・・・・・・・・・ NULL +¤№・・・・・・・・・・・・・・・・・・ NULL +łŀʼnŋøœßŧþ・・・・・・・・・・・ NULL +ЈЉЊЋЌЎÐ・・・・・・・・・・・・・ NULL +・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË NULL +・áàäâăǎÄąåãćĉÄçċÄéèë NULL +・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ NULL +・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL +・άέήίϊÎόςÏϋΰώ・・・・・・・ NULL +・・ђѓєѕіїјљњћќўџ・・・・・ NULL +・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ NULL +・・・・・・・・・・・・・æđðħıijĸ NULL +・・・・・・・・・・・・・・ЂЃЄЅІЇ NULL +・・・・・・・・・・・・・・・ºª©®™ NULL +ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë NULL ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ @@ -794,15 +794,15 @@ SELECT `C1`, CONVERT(`C1` using sjis) FROM `ï¼´ï¼–`; ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ -・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑 ・??????????????????? -・黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・??????????????????? -乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä»  ???????????????????? -仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ???????????????????? -伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ???????????????????? -佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄・・・・・ ???????????????・・・・・ -鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 ???????????????????? -齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ ???????????????????? -龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・ +・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑 NULL +・黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL +乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä»  NULL +仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL +伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL +佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄・・・・・ NULL +鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 NULL +齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ NULL +龔龖龗龞龡龢龣龥・・・・・・・・・・・・ NULL Warnings: Warning 1977 Cannot convert 'utf8' character 0xC3AA to 'sjis' Warning 1977 Cannot convert 'utf8' character 0xC38A to 'sjis' @@ -874,7 +874,7 @@ pqrstuvwxyz{|}~ pqrstuvwxyz{|}~ SELECT `C1`, CONVERT(`C1` using ujis) FROM `T8`; C1 CONVERT(`C1` using ujis)   ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½   ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½ -ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼?〜‖|…‥‘’ +ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ NULL “â€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆã€‰ã€Šã€‹ã€Œã€ã€Žã€ã€ã€‘ “â€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆã€‰ã€Šã€‹ã€Œã€ã€Žã€ã€ã€‘ +â€Â±Ã—÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚♀°′″℃¥ +â€Â±Ã—÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚♀°′″℃¥ $¢£%#&*@§☆★○â—◎◇・・・・・ $¢£%#&*@§☆★○â—◎◇・・・・・ @@ -1012,7 +1012,7 @@ SELECT `C1`, CONVERT(`C1` using ucs2) FROM `T8`; SELECT `C1`, CONVERT(`C1` using sjis) FROM `T8`; C1 CONVERT(`C1` using sjis)   ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½   ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½ -ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼?〜‖|…‥‘’ +ヾã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ã€œâ€–|…‥‘’ NULL “â€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆã€‰ã€Šã€‹ã€Œã€ã€Žã€ã€ã€‘ “â€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆã€‰ã€Šã€‹ã€Œã€ã€Žã€ã€ã€‘ +â€Â±Ã—÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚♀°′″℃¥ +â€Â±Ã—÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚♀°′″℃¥ $¢£%#&*@§☆★○â—◎◇・・・・・ $¢£%#&*@§☆★○â—◎◇・・・・・ @@ -1082,7 +1082,7 @@ Warning 1977 Cannot convert 'utf8' character 0xEFBCBC to 'sjis' SELECT `C1`, CONVERT(`C1` using ujis) FROM `ï¼´ï¼™`; C1 CONVERT(`C1` using ujis) ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë -・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・˛˚?΄΅・・・・・・・・¡¦¿・・・ +・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・ºª©®™ ¤№・・・・・・・・・・・・・・・・・・ ¤№・・・・・・・・・・・・・・・・・・ @@ -1167,45 +1167,45 @@ SELECT `C1`, CONVERT(`C1` using ucs2) FROM `ï¼´ï¼™`; ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ SELECT `C1`, CONVERT(`C1` using sjis) FROM `ï¼´ï¼™`; C1 CONVERT(`C1` using sjis) -ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»????? -・˛˚~΄΅・・・・・・・・¡¦¿・・・ ・?????・・・・・・・・???・・・ +ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»ãƒ»Ë˜Ë‡Â¸Ë™Ë NULL +・˛˚~΄΅・・・・・・・・¡¦¿・・・ NULL ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ -・・・・・・・・・・・・・・・ºª©®™ ・・・・・・・・・・・・・・・????? -¤№・・・・・・・・・・・・・・・・・・ ??・・・・・・・・・・・・・・・・・・ +・・・・・・・・・・・・・・・ºª©®™ NULL +¤№・・・・・・・・・・・・・・・・・・ NULL ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ -・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ ・・・・・?????・?・??・?・・・ -・άέήίϊÎόςÏϋΰώ・・・・・・・ ・????????????・・・・・・・ +・・・・・ΆΈΉΊΪ・Ό・ΎΫ・Î・・・ NULL +・άέήίϊÎόςÏϋΰώ・・・・・・・ NULL ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ -・・・・・・・・・・・・・・ЂЃЄЅІЇ ・・・・・・・・・・・・・・?????? -ЈЉЊЋЌЎÐ・・・・・・・・・・・・・ ???????・・・・・・・・・・・・・ +・・・・・・・・・・・・・・ЂЃЄЅІЇ NULL +ЈЉЊЋЌЎÐ・・・・・・・・・・・・・ NULL ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ -・・ђѓєѕіїјљњћќўџ・・・・・ ・・?????????????・・・・・ -・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ ・??・?・?・??・???・??・・・ -・・・・・・・・・・・・・æđðħıijĸ ・・・・・・・・・・・・・??????? -łŀʼnŋøœßŧþ・・・・・・・・・・・ ?????????・・・・・・・・・・・ +・・ђѓєѕіїјљњћќўџ・・・・・ NULL +・ÆÄ・Ħ・IJ・ÅĿ・ŊØŒ・ŦÞ・・・ NULL +・・・・・・・・・・・・・æđðħıijĸ NULL +łŀʼnŋøœßŧþ・・・・・・・・・・・ NULL ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ -・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË ・??????????????????? -ÊĚĖĒĘ・ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨ ?????・?????????????? -ĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖ ???????????????????? -ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ ???????????????????? -ǕŴßŶŹŽŻ・・・・・・・・・・・・ ????????・・・・・・・・・・・・ -・áàäâăǎÄąåãćĉÄçċÄéèë ・??????????????????? -êěėēęǵÄğ・ġĥíìïîÇ・īįĩ ????????・???????・??? -ĵķĺľļńňņñóòöôǒőÅõŕřŗ ???????????????????? -śŚşťţúùüûŭǔűūųůũǘǜǚ ???????????????????? -ǖŵýÿŷźžż・・・・・・・・・・・・ ????????・・・・・・・・・・・・ -・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑 ・??????????????????? -乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä»  ???????????????????? -仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 ???????????????????? -伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 ???????????????????? -佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄・・・・・ ???????????????・・・・・ -・黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 ・??????????????????? -鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 ???????????????????? -齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ ???????????????????? -龔龖龗龞龡龢龣龥・・・・・・・・・・・・ ????????・・・・・・・・・・・・ +・ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈË NULL +ÊĚĖĒĘ・ĜĞĢĠĤÃÃŒÃÃŽÇİĪĮĨ NULL +ĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖ NULL +ŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙ NULL +ǕŴßŶŹŽŻ・・・・・・・・・・・・ NULL +・áàäâăǎÄąåãćĉÄçċÄéèë NULL +êěėēęǵÄğ・ġĥíìïîÇ・īįĩ NULL +ĵķĺľļńňņñóòöôǒőÅõŕřŗ NULL +śŚşťţúùüûŭǔűūųůũǘǜǚ NULL +ǖŵýÿŷźžż・・・・・・・・・・・・ NULL +・丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑 NULL +乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä»  NULL +仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众 NULL +伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘 NULL +佟佣佪佬佮佱佷佸佹佺佽佾ä¾ä¾‚侄・・・・・ NULL +・黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪 NULL +鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒé½„齅齆齇齓齕齖 NULL +齗齘齚é½é½žé½¨é½©é½­é½®é½¯é½°é½±é½³é½µé½ºé½½é¾é¾é¾‘é¾’ NULL +龔龖龗龞龡龢龣龥・・・・・・・・・・・・ NULL ・・・・・・・・・・・・・・・・・・・・ ・・・・・・・・・・・・・・・・・・・・ Warnings: Warning 1977 Cannot convert 'utf8' character 0xCB98 to 'sjis' diff --git a/mysql-test/suite/json/r/json_no_table.result b/mysql-test/suite/json/r/json_no_table.result new file mode 100644 index 00000000000..cf4cd5b8af8 --- /dev/null +++ b/mysql-test/suite/json/r/json_no_table.result @@ -0,0 +1,3635 @@ +SELECT JSON_COMPACT(0.0e0) = -0.0e0; +JSON_COMPACT(0.0e0) = -0.0e0 +1 +SELECT JSON_COMPACT(CAST(0 AS DECIMAL)) = CAST(-0.0e0 AS DECIMAL); +JSON_COMPACT(CAST(0 AS DECIMAL)) = CAST(-0.0e0 AS DECIMAL) +1 +SELECT JSON_COMPACT(0.0e0) = CAST(-0.0e0 AS DECIMAL); +JSON_COMPACT(0.0e0) = CAST(-0.0e0 AS DECIMAL) +1 +SELECT JSON_COMPACT(CAST(0 AS DECIMAL)) = -0.0e0; +JSON_COMPACT(CAST(0 AS DECIMAL)) = -0.0e0 +1 +SELECT JSON_COMPACT(CAST(0 AS SIGNED)) = -0.0e0; +JSON_COMPACT(CAST(0 AS SIGNED)) = -0.0e0 +1 +SELECT JSON_COMPACT(CAST(0 AS SIGNED)) = CAST(-0.0e0 AS DECIMAL); +JSON_COMPACT(CAST(0 AS SIGNED)) = CAST(-0.0e0 AS DECIMAL) +1 +SELECT JSON_COMPACT(CAST(0 AS UNSIGNED)) = -0.0e0; +JSON_COMPACT(CAST(0 AS UNSIGNED)) = -0.0e0 +1 +SELECT JSON_COMPACT(CAST(0 AS UNSIGNED)) = CAST(-0.0e0 AS DECIMAL); +JSON_COMPACT(CAST(0 AS UNSIGNED)) = CAST(-0.0e0 AS DECIMAL) +1 +select json_compact('"abc"'); +json_compact('"abc"') +"abc" +error ER_INVALID_JSON_TEXT_IN_PARAM +select json_compact('abc'); +json_compact('abc') +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_compact' at position 1 + +# String literal - valid JSON +select JSON_VALID('123'); +JSON_VALID('123') +1 +select JSON_VALID('-123'); +JSON_VALID('-123') +1 +select JSON_VALID('5000000000'); +JSON_VALID('5000000000') +1 +select JSON_VALID('-5000000000'); +JSON_VALID('-5000000000') +1 +select JSON_VALID('1.23'); +JSON_VALID('1.23') +1 +select JSON_VALID('"123"'); +JSON_VALID('"123"') +1 +select JSON_VALID('true'); +JSON_VALID('true') +1 +select JSON_VALID('false'); +JSON_VALID('false') +1 +select JSON_VALID('null'); +JSON_VALID('null') +1 +select JSON_VALID('{"address": "Trondheim"}'); +JSON_VALID('{"address": "Trondheim"}') +1 + +# String literal - not valid JSON +select JSON_VALID('12 3'); +JSON_VALID('12 3') +0 + +# String literal not in UTF-8 +set names 'ascii'; +select JSON_VALID('123'); +JSON_VALID('123') +1 +set names 'utf8'; + +# Json expression +select JSON_VALID(json_compact('[123]')); +JSON_VALID(json_compact('[123]')) +1 + +# Json expression NULL +select JSON_VALID(json_compact(NULL)); +JSON_VALID(json_compact(NULL)) +NULL + +# Bare NULL +select JSON_VALID( NULL ); +JSON_VALID( NULL ) +NULL + +# Function result - string +select JSON_VALID( UPPER('"abc"') ); +JSON_VALID( UPPER('"abc"') ) +1 +set names 'latin1'; + +# Function result - string +select JSON_VALID( UPPER('"abc"') ); +JSON_VALID( UPPER('"abc"') ) +1 +set names 'utf8'; + +# Function result - date, not valid as JSON without CAST +select JSON_VALID( CAST('2015-01-15' AS DATE) ); +JSON_VALID( CAST('2015-01-15' AS DATE) ) +0 + +# The date string doesn't parse as JSON text, so wrong: +select JSON_VALID( CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8') ); +JSON_VALID( CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8') ) +0 +# OK, though: +select JSON_VALID( json_compact(CURDATE()) ); +JSON_VALID( json_compact(CURDATE()) ) +0 + +# Function result - NULL +select JSON_VALID( UPPER(NULL) ); +JSON_VALID( UPPER(NULL) ) +NULL +select JSON_VALID( UPPER(CAST(NULL as CHAR)) ); +JSON_VALID( UPPER(CAST(NULL as CHAR)) ) +NULL +SELECT JSON_VALID( '{ "firstName" : "Fred", "lastName" : "Flintstone" }' ); +JSON_VALID( '{ "firstName" : "Fred", "lastName" : "Flintstone" }' ) +1 +SELECT JSON_VALID( '3' ); +JSON_VALID( '3' ) +1 +SELECT JSON_VALID( null ); +JSON_VALID( null ) +NULL +# ---------------------------------------------------------------------- +# Test of JSON_CONTAINS_PATH function. +# ---------------------------------------------------------------------- +select json_contains_path(); +ERROR 42000: Incorrect parameter count in the call to native function 'json_contains_path' +select json_contains_path('{ "a": true }' ); +ERROR 42000: Incorrect parameter count in the call to native function 'json_contains_path' +select json_contains_path('{ "a": true }', 'all' ); +ERROR 42000: Incorrect parameter count in the call to native function 'json_contains_path' +error ER_INVALID_JSON_TEXT_IN_PARAM +select json_contains_path('{ "a": tru }', 'all', '$' ); +json_contains_path('{ "a": tru }', 'all', '$' ) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_contains_path' at position 10 +error ER_INVALID_JSON_PATH +select json_contains_path('{ "a": true }', 'all', '$[' ); +json_contains_path('{ "a": true }', 'all', '$[' ) +NULL +Warnings: +Warning 4041 Unexpected end of JSON path in argument 3 to function 'json_contains_path' +error ER_INVALID_JSON_PATH +select json_contains_path('{ "a": true }', 'all', '$a.***[3]' ); +json_contains_path('{ "a": true }', 'all', '$a.***[3]' ) +NULL +Warnings: +Warning 4042 Syntax error in JSON path in argument 3 to function 'json_contains_path' at position 2 +error ER_JSON_BAD_ONE_OR_ALL_ARG +select json_contains_path('{ "a": true }', 'foo', '$.a' ); +json_contains_path('{ "a": true }', 'foo', '$.a' ) +NULL +Warnings: +Warning 4046 Argument 2 to function 'json_contains_path' must be "one" or "all". +error ER_INVALID_JSON_CHARSET +select json_contains_path('{}', 'all', cast('$' as binary)); +json_contains_path('{}', 'all', cast('$' as binary)) +1 +select json_contains_path(null, 'all', '$.a' ); +json_contains_path(null, 'all', '$.a' ) +NULL +select json_contains_path('{ "a": true }', null, '$.a' ); +json_contains_path('{ "a": true }', null, '$.a' ) +NULL +select json_contains_path('{ "a": true }', 'all', null ); +json_contains_path('{ "a": true }', 'all', null ) +NULL +select json_contains_path('{ "a": true }', 'all', '$' ); +json_contains_path('{ "a": true }', 'all', '$' ) +1 +select json_contains_path('{ "a": true }', 'all', '$.a' ); +json_contains_path('{ "a": true }', 'all', '$.a' ) +1 +select json_contains_path('{ "a": true }', 'one', '$.a' ); +json_contains_path('{ "a": true }', 'one', '$.a' ) +1 +select json_contains_path('{ "a": true }', 'all', '$.b' ); +json_contains_path('{ "a": true }', 'all', '$.b' ) +0 +select json_contains_path('{ "a": true }', 'one', '$.b' ); +json_contains_path('{ "a": true }', 'one', '$.b' ) +0 +select json_contains_path('{ "a": true }', 'all', '$.a', '$.b' ); +json_contains_path('{ "a": true }', 'all', '$.a', '$.b' ) +0 +select json_contains_path('{ "a": true }', 'all', '$.b', '$.a' ); +json_contains_path('{ "a": true }', 'all', '$.b', '$.a' ) +0 +select json_contains_path('{ "a": true }', 'ALL', '$.a', '$.b' ); +json_contains_path('{ "a": true }', 'ALL', '$.a', '$.b' ) +0 +select json_contains_path('{ "a": true }', 'aLl', '$.a', '$.b' ); +json_contains_path('{ "a": true }', 'aLl', '$.a', '$.b' ) +0 +select json_contains_path('{ "a": true }', 'one', '$.a', '$.b' ); +json_contains_path('{ "a": true }', 'one', '$.a', '$.b' ) +1 +select json_contains_path('{ "a": true }', 'one', '$.b', '$.a' ); +json_contains_path('{ "a": true }', 'one', '$.b', '$.a' ) +1 +select json_contains_path('{ "a": true }', 'ONE', '$.a', '$.b' ); +json_contains_path('{ "a": true }', 'ONE', '$.a', '$.b' ) +1 +select json_contains_path('{ "a": true }', 'oNe', '$.a', '$.b' ); +json_contains_path('{ "a": true }', 'oNe', '$.a', '$.b' ) +1 +select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**[4]' ); +json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**[4]' ) +1 +select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**[4]', '$**[5]' ); +json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**[4]', '$**[5]' ) +0 +select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**.c[2]' ); +json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**.c[2]' ) +1 +select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**.c[3]' ); +json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**.c[3]' ) +0 +select json_contains_path('{"a":1, "b":2}', 'one', '$.*'); +json_contains_path('{"a":1, "b":2}', 'one', '$.*') +1 +select json_contains_path('[1,2,3]', 'one', '$.*'); +json_contains_path('[1,2,3]', 'one', '$.*') +0 +select json_contains_path('{}', 'one', '$[*]'); +json_contains_path('{}', 'one', '$[*]') +0 +SELECT JSON_CONTAINS_PATH('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', +'one', '$**.a.*'); +JSON_CONTAINS_PATH('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', +'one', '$**.a.*') +1 +SELECT JSON_CONTAINS_PATH('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', +'all', '$**.a.*'); +JSON_CONTAINS_PATH('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', +'all', '$**.a.*') +1 +SELECT JSON_CONTAINS_PATH('[1,2,3]', 'one', '$**[*]'); +JSON_CONTAINS_PATH('[1,2,3]', 'one', '$**[*]') +1 +SELECT JSON_CONTAINS_PATH('[1,2,3]', 'all', '$**[*]'); +JSON_CONTAINS_PATH('[1,2,3]', 'all', '$**[*]') +1 +select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$**[1]', '$.b[0]', '$.c' ); +json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$**[1]', '$.b[0]', '$.c' ) +0 +select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$.c', '$**[1]', '$.b[0]' ); +json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$.c', '$**[1]', '$.b[0]' ) +0 +select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$.b[0]', '$.c', '$**[1]' ); +json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$.b[0]', '$.c', '$**[1]' ) +0 +select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$**[1]', '$.b[0]', '$.c' ); +json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$**[1]', '$.b[0]', '$.c' ) +1 +select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$.c', '$**[1]', '$.b[0]' ); +json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$.c', '$**[1]', '$.b[0]' ) +1 +select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$.b[0]', '$.c', '$**[1]' ); +json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$.b[0]', '$.c', '$**[1]' ) +1 +SELECT JSON_CONTAINS_PATH +( +'{ "a" : 123, "b" : [ 123, 456 ] }', +'all', +'$.a.c', +'$.b[1]' +); +JSON_CONTAINS_PATH +( +'{ "a" : 123, "b" : [ 123, 456 ] }', +'all', +'$.a.c', +'$.b[1]' +) +0 +SELECT JSON_CONTAINS_PATH +( +'{ "a" : 123, "b" : [ 123, 456 ] }', +'one', +'$.a.c', +'$.b[1]' +); +JSON_CONTAINS_PATH +( +'{ "a" : 123, "b" : [ 123, 456 ] }', +'one', +'$.a.c', +'$.b[1]' +) +1 +SELECT JSON_CONTAINS_PATH +( +'{ "a" : 123, "b" : [ 123, 456 ] }', +'all', +'$.c' +); +JSON_CONTAINS_PATH +( +'{ "a" : 123, "b" : [ 123, 456 ] }', +'all', +'$.c' +) +0 +SELECT JSON_CONTAINS_PATH +( +'{ "a" : 123, "b" : [ 123, { "c" : { "d" : true } } ] }', +'all', +'$.b[1].c.d' +); +JSON_CONTAINS_PATH +( +'{ "a" : 123, "b" : [ 123, { "c" : { "d" : true } } ] }', +'all', +'$.b[1].c.d' +) +1 +select json_length( null ); +json_length( null ) +NULL +select json_length( '1' ); +json_length( '1' ) +1 + +# invalid json text +error ER_INVALID_JSON_TEXT_IN_PARAM +select json_length( 'abc' ); +json_length( 'abc' ) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_length' at position 1 +select json_length( '"abc"' ); +json_length( '"abc"' ) +1 +select json_length( 'true' ); +json_length( 'true' ) +1 +select json_length( 'false' ); +json_length( 'false' ) +1 +select json_length( 'null' ); +json_length( 'null' ) +1 +select json_length( '{}' ); +json_length( '{}' ) +0 +select json_length( '{ "a" : 100, "b" : 200 }' ); +json_length( '{ "a" : 100, "b" : 200 }' ) +2 +select json_length( '{ "a" : 100, "b" : [ 300, 400, 500 ] }' ); +json_length( '{ "a" : 100, "b" : [ 300, 400, 500 ] }' ) +2 +select json_length( '[]' ); +json_length( '[]' ) +0 +select json_length( '[ null, "foo", true, 1.1 ]' ); +json_length( '[ null, "foo", true, 1.1 ]' ) +4 +select json_length( '[ null, "foo", true, { "a" : "b", "c" : "d" } ]' ); +json_length( '[ null, "foo", true, { "a" : "b", "c" : "d" } ]' ) +4 +select json_length( '"foo"' ); +json_length( '"foo"' ) +1 +select json_length( '1.2' ); +json_length( '1.2' ) +1 + +# invalid json path +error ER_INVALID_JSON_PATH +select json_length( 'true', 'c$' ); +json_length( 'true', 'c$' ) +NULL +Warnings: +Warning 4042 Syntax error in JSON path in argument 2 to function 'json_length' at position 1 + +# invalid json path +error ER_INVALID_JSON_PATH +select json_length( '{ "foo" : [ true, false ] }', '$.foo[bar]' ); +json_length( '{ "foo" : [ true, false ] }', '$.foo[bar]' ) +NULL +Warnings: +Warning 4042 Syntax error in JSON path in argument 2 to function 'json_length' at position 7 + +# wildcards not allowed in path expressions for this function +error ER_INVALID_JSON_PATH_WILDCARD +select json_length( 'true', '$.*' ); +json_length( 'true', '$.*' ) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_length' + +# wildcards not allowed in path expressions for this function +error ER_INVALID_JSON_PATH_WILDCARD +select json_length( 'true', '$.foo**.bar' ); +json_length( 'true', '$.foo**.bar' ) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_length' +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[0]' ); +json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[0]' ) +1 +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[1]' ); +json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[1]' ) +3 +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2]' ); +json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2]' ) +1 +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0]' ); +json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0]' ) +1 +select json_length( '[ 1, [ 2, 3, 4 ], {"a": 1} ]', '$[2][0]' ); +json_length( '[ 1, [ 2, 3, 4 ], {"a": 1} ]', '$[2][0]' ) +1 +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][1]' ); +json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][1]' ) +NULL +select json_length( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]' ); +json_length( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]' ) +3 +SELECT JSON_LENGTH +( +'{}' +); +JSON_LENGTH +( +'{}' +) +0 +SELECT JSON_LENGTH +( +'3' +); +JSON_LENGTH +( +'3' +) +1 +SELECT JSON_LENGTH +( +'{ "a" : 123, "b" : [ 123, 456, 789 ] }' +); +JSON_LENGTH +( +'{ "a" : 123, "b" : [ 123, 456, 789 ] }' +) +2 +SELECT JSON_LENGTH +( +'{ "a" : 123, "b" : [ 123, 456, 789 ] }', +'$.b' +); +JSON_LENGTH +( +'{ "a" : 123, "b" : [ 123, 456, 789 ] }', +'$.b' +) +3 +SELECT JSON_LENGTH +( +'{ "a" : 123, "b" : [ 123, 456, 789 ] }', +'$.c' +); +JSON_LENGTH +( +'{ "a" : 123, "b" : [ 123, 456, 789 ] }', +'$.c' +) +NULL +# ---------------------------------------------------------------------- +# Test of JSON_DEPTH function. +# ---------------------------------------------------------------------- +select json_depth(null); +json_depth(null) +NULL +select json_depth(json_compact(null)); +json_depth(json_compact(null)) +NULL +select json_depth(json_compact('[]')), +json_depth(json_compact('{}')), +json_depth(json_compact('null')), +json_depth(json_quote('foo')); +json_depth(json_compact('[]')) json_depth(json_compact('{}')) json_depth(json_compact('null')) json_depth(json_quote('foo')) +1 1 1 1 +select json_depth(json_compact('[[2], 3, [[[4]]]]')); +json_depth(json_compact('[[2], 3, [[[4]]]]')) +5 +select json_depth(json_compact('{"a": {"a1": [3]}, "b": {"b1": {"c": {"d": [5]}}}}')); +json_depth(json_compact('{"a": {"a1": [3]}, "b": {"b1": {"c": {"d": [5]}}}}')) +6 +SELECT JSON_DEPTH +( +'{}' +); +JSON_DEPTH +( +'{}' +) +1 +SELECT JSON_DEPTH +( +'[]' +); +JSON_DEPTH +( +'[]' +) +1 +SELECT JSON_DEPTH( '"abc"' ); +JSON_DEPTH( '"abc"' ) +1 +SELECT JSON_DEPTH( json_compact( '"abc"') ); +JSON_DEPTH( json_compact( '"abc"') ) +1 +error ER_INVALID_TYPE_FOR_JSON +SELECT JSON_DEPTH( 1 ); +JSON_DEPTH( 1 ) +1 +error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_DEPTH( 'abc' ); +JSON_DEPTH( 'abc' ) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_depth' at position 1 +SELECT JSON_DEPTH( json_compact( 1) ); +JSON_DEPTH( json_compact( 1) ) +1 +SELECT JSON_DEPTH +( +'{ "a" : true, "b" : false, "c" : null }' +); +JSON_DEPTH +( +'{ "a" : true, "b" : false, "c" : null }' +) +2 +SELECT JSON_DEPTH +( +'[ "a", true, "b" , false, "c" , null ]' +); +JSON_DEPTH +( +'[ "a", true, "b" , false, "c" , null ]' +) +2 +SELECT JSON_DEPTH +( +'{ "a" : true, "b" : {}, "c" : null }' +); +JSON_DEPTH +( +'{ "a" : true, "b" : {}, "c" : null }' +) +2 +SELECT JSON_DEPTH +( +'[ "a", true, "b" , {}, "c" , null ]' +); +JSON_DEPTH +( +'[ "a", true, "b" , {}, "c" , null ]' +) +2 +SELECT JSON_DEPTH +( +'{ "a" : true, "b" : { "e" : false }, "c" : null }' +); +JSON_DEPTH +( +'{ "a" : true, "b" : { "e" : false }, "c" : null }' +) +3 +SELECT JSON_DEPTH +( +'[ "a", true, "b" , { "e" : false }, "c" , null ]' +); +JSON_DEPTH +( +'[ "a", true, "b" , { "e" : false }, "c" , null ]' +) +3 +error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_DEPTH +( +'[ "a", true, "b" , { "e" : false }, "c" , null' +); +JSON_DEPTH +( +'[ "a", true, "b" , { "e" : false }, "c" , null' +) +NULL +Warnings: +Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_depth' +# ---------------------------------------------------------------------- +# Test of JSON_REMOVE function. +# ---------------------------------------------------------------------- +select json_remove( null, '$[1]' ); +json_remove( null, '$[1]' ) +NULL +select json_remove( null, '$[1]' ) is null; +json_remove( null, '$[1]' ) is null +1 +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ); +json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) +NULL +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null; +json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null +1 +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', null ); +json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', null ) +NULL +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', null ) is null; +json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', null ) is null +1 + +# not enough args +select json_remove(); +ERROR 42000: Incorrect parameter count in the call to native function 'json_remove' + +# not enough args +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]' ); +ERROR 42000: Incorrect parameter count in the call to native function 'json_remove' + +# not enough args +select json_remove( '$[1]' ); +ERROR 42000: Incorrect parameter count in the call to native function 'json_remove' + +# invalid json text +error ER_INVALID_JSON_TEXT_IN_PARAM +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ', '$[1]', '$[2]' ); +json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ', '$[1]', '$[2]' ) +NULL +Warnings: +Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_remove' + +# invalid json path +error ER_INVALID_JSON_PATH +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1', '$[2]' ); +json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1', '$[2]' ) +NULL +Warnings: +Warning 4041 Unexpected end of JSON path in argument 2 to function 'json_remove' + +# invalid json path +error ER_INVALID_JSON_PATH +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', '$[2' ); +json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', '$[2' ) +NULL +Warnings: +Warning 4041 Unexpected end of JSON path in argument 3 to function 'json_remove' + +# Vacuous path expression +error ER_JSON_VACUOUS_PATH +select json_remove( '[ 1, 2, 3 ]', '$' ); +json_remove( '[ 1, 2, 3 ]', '$' ) +NULL +Warnings: +Warning 4051 Path expression '$' is not allowed in argument 2 to function 'json_remove'. + +# Vacuous path expression +error ER_JSON_VACUOUS_PATH +select json_remove( '[ 1, 2, 3 ]', '$', '$[2]' ); +json_remove( '[ 1, 2, 3 ]', '$', '$[2]' ) +NULL +Warnings: +Warning 4051 Path expression '$' is not allowed in argument 2 to function 'json_remove'. + +# Vacuous path expression +error ER_JSON_VACUOUS_PATH +select json_remove( '[ 1, 2, 3 ]', '$[1]', '$' ); +json_remove( '[ 1, 2, 3 ]', '$[1]', '$' ) +NULL +Warnings: +Warning 4051 Path expression '$' is not allowed in argument 3 to function 'json_remove'. +error ER_INVALID_JSON_PATH_WILDCARD +select json_remove( '[ 1, 2, 3 ]', '$[*]' ); +json_remove( '[ 1, 2, 3 ]', '$[*]' ) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_remove' +error ER_INVALID_JSON_PATH_WILDCARD +select json_remove( '[ 1, 2, 3 ]', '$**[2]' ); +json_remove( '[ 1, 2, 3 ]', '$**[2]' ) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_remove' +error ER_INVALID_JSON_PATH_WILDCARD +select json_remove( '[ 1, 2, 3 ]', '$[2]', '$[*]' ); +json_remove( '[ 1, 2, 3 ]', '$[2]', '$[*]' ) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 3 to function 'json_remove' +error ER_INVALID_JSON_PATH_WILDCARD +select json_remove( '[ 1, 2, 3 ]', '$[2]', '$**[2]' ); +json_remove( '[ 1, 2, 3 ]', '$[2]', '$**[2]' ) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 3 to function 'json_remove' +select json_remove( '[ 1, 2, 3 ]', '$[0]' ); +json_remove( '[ 1, 2, 3 ]', '$[0]' ) +[2, 3] +select json_remove( '[ 1, 2, 3 ]', '$[1]' ); +json_remove( '[ 1, 2, 3 ]', '$[1]' ) +[1, 3] +select json_remove( '[ 1, 2, 3 ]', '$[2]' ); +json_remove( '[ 1, 2, 3 ]', '$[2]' ) +[1, 2] +select json_remove( '[ 1, 2, 3 ]', '$[3]' ); +json_remove( '[ 1, 2, 3 ]', '$[3]' ) +[1, 2, 3] +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]' ); +json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]' ) +[1, 5] +error ER_INVALID_JSON_PATH_WILDCARD +select json_remove( '[ { "a": { "a": true } } ]', '$**.a' ); +json_remove( '[ { "a": { "a": true } } ]', '$**.a' ) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_remove' +select json_remove( '[ { "a": true }, { "b": false }, { "c": null }, { "a": null } ]', '$[0].a', '$[2].c' ); +json_remove( '[ { "a": true }, { "b": false }, { "c": null }, { "a": null } ]', '$[0].a', '$[2].c' ) +[{}, {"b": false}, {}, {"a": null}] +error ER_INVALID_JSON_PATH_WILDCARD +select json_remove( '[ { "a": true }, { "b": [ { "c": { "a": true } } ] }, { "c": null }, { "a": null } ]', '$**.a' ); +json_remove( '[ { "a": true }, { "b": [ { "c": { "a": true } } ] }, { "c": null }, { "a": null } ]', '$**.a' ) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_remove' +select json_remove( '{"id": 123, "name": "systemQA", "array": [1, 2, 3]}', '$[0]' ); +json_remove( '{"id": 123, "name": "systemQA", "array": [1, 2, 3]}', '$[0]' ) +{"id": 123, "name": "systemQA", "array": [1, 2, 3]} +SELECT JSON_REMOVE +( +'{"a" : "foo", "b" : [true, {"c" : 123}]}', +'$.b[ 1 ]' +); +JSON_REMOVE +( +'{"a" : "foo", "b" : [true, {"c" : 123}]}', +'$.b[ 1 ]' +) +{"a": "foo", "b": [true]} +SELECT JSON_REMOVE +( +'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.b[ 1 ].c' +); +JSON_REMOVE +( +'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.b[ 1 ].c' +) +{"a": "foo", "b": [true, {"c": 456}]} +SELECT JSON_REMOVE +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c' +); +JSON_REMOVE +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c' +) +{"a": "foo", "b": [true, {}]} +SELECT JSON_REMOVE +( +'{ "a" : "foo", "b" : [ true, { "c" : 123, "d" : 456 } ] }', +'$.b[ 1 ].e' +); +JSON_REMOVE +( +'{ "a" : "foo", "b" : [ true, { "c" : 123, "d" : 456 } ] }', +'$.b[ 1 ].e' +) +{"a": "foo", "b": [true, {"c": 123, "d": 456}]} +# ---------------------------------------------------------------------- +# Test of JSON_MERGE function. +# ---------------------------------------------------------------------- + +# not enough args +select json_merge(); +ERROR 42000: Incorrect parameter count in the call to native function 'json_merge' + +# not enough args +select json_merge( '[ 1, 2, 3 ]' ); +ERROR 42000: Incorrect parameter count in the call to native function 'json_merge' +select json_merge( null, null ); +json_merge( null, null ) +NULL +select json_merge( null, '[ 1, 2, 3 ]' ); +json_merge( null, '[ 1, 2, 3 ]' ) +NULL +select json_merge( '[ 1, 2, 3 ]', null ); +json_merge( '[ 1, 2, 3 ]', null ) +NULL +select json_merge( null, '[ 1, 2, 3 ]', '[ 4, 5, 6 ]' ); +json_merge( null, '[ 1, 2, 3 ]', '[ 4, 5, 6 ]' ) +NULL +select json_merge( '[ 1, 2, 3 ]', null, '[ 4, 5, 6 ]' ); +json_merge( '[ 1, 2, 3 ]', null, '[ 4, 5, 6 ]' ) +NULL +select json_merge( '[ 1, 2, 3 ]', '[ 4, 5, 6 ]', null ); +json_merge( '[ 1, 2, 3 ]', '[ 4, 5, 6 ]', null ) +NULL +error ER_INVALID_JSON_TEXT_IN_PARAM +select json_merge( '[1, 2]', '[3, 4' ); +json_merge( '[1, 2]', '[3, 4' ) +NULL +Warnings: +Warning 4037 Unexpected end of JSON text in argument 2 to function 'json_merge' +error ER_INVALID_JSON_TEXT_IN_PARAM +select json_merge( '[1, 2', '[3, 4]' ); +json_merge( '[1, 2', '[3, 4]' ) +NULL +Warnings: +Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_merge' +select json_merge( '1', '2' ); +json_merge( '1', '2' ) +[1, 2] +select json_merge( '1', '[2, 3]' ); +json_merge( '1', '[2, 3]' ) +[1, 2, 3] +select json_merge( '[1, 2]', '3' ); +json_merge( '[1, 2]', '3' ) +[1, 2, 3] +select json_merge( '1', '{ "a": 2 }' ); +json_merge( '1', '{ "a": 2 }' ) +[1, {"a": 2}] +select json_merge( '{ "a": 2 }', '1' ); +json_merge( '{ "a": 2 }', '1' ) +[{"a": 2}, 1] +select json_merge( '[1, 2]', '[3, 4]' ); +json_merge( '[1, 2]', '[3, 4]' ) +[1, 2, 3, 4] +select json_merge( '{ "a": 2 }', '{ "b": 3}' ); +json_merge( '{ "a": 2 }', '{ "b": 3}' ) +{"a": 2, "b": 3} +select json_merge( '[1, 2]', '{ "a": 2 }' ); +json_merge( '[1, 2]', '{ "a": 2 }' ) +[1, 2, {"a": 2}] +select json_merge( '{ "a": 2 }', '[1, 2]' ); +json_merge( '{ "a": 2 }', '[1, 2]' ) +[{"a": 2}, 1, 2] +select json_merge( '{"a": 1, "b": 2 }', '{"b": 3, "d": 4 }' ); +json_merge( '{"a": 1, "b": 2 }', '{"b": 3, "d": 4 }' ) +{"a": 1, "b": [2, 3], "d": 4} +select json_merge( '{"a": 1, "b": 2 }', '{"b": [3, 4], "d": 4 }' ); +json_merge( '{"a": 1, "b": 2 }', '{"b": [3, 4], "d": 4 }' ) +{"a": 1, "b": [2, 3, 4], "d": 4} +select json_merge( '{"a": 1, "b": [2, 3] }', '{"b": 4, "d": 4 }' ); +json_merge( '{"a": 1, "b": [2, 3] }', '{"b": 4, "d": 4 }' ) +{"a": 1, "b": [2, 3, 4], "d": 4} +select json_merge( '{"a": 1, "b": 2 }', '{"b": {"e": 7, "f": 8}, "d": 4 }' ); +json_merge( '{"a": 1, "b": 2 }', '{"b": {"e": 7, "f": 8}, "d": 4 }' ) +{"a": 1, "b": [2, {"e": 7, "f": 8}], "d": 4} +select json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{"a": 1, "b": 2 }' ); +json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{"a": 1, "b": 2 }' ) +{"b": [{"e": 7, "f": 8}, 2], "d": 4, "a": 1} +select json_merge( '{"a": 1, "b": [2, 9] }', '{"b": [10, 11], "d": 4 }' ); +json_merge( '{"a": 1, "b": [2, 9] }', '{"b": [10, 11], "d": 4 }' ) +{"a": 1, "b": [2, 9, 10, 11], "d": 4} +select json_merge( '{"a": 1, "b": [2, 9] }', '{"b": {"e": 7, "f": 8}, "d": 4 }' ); +json_merge( '{"a": 1, "b": [2, 9] }', '{"b": {"e": 7, "f": 8}, "d": 4 }' ) +{"a": 1, "b": [2, 9, {"e": 7, "f": 8}], "d": 4} +select json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{"a": 1, "b": [2, 9] }' ); +json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{"a": 1, "b": [2, 9] }' ) +{"b": [{"e": 7, "f": 8}, 2, 9], "d": 4, "a": 1} +select json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{ "a": 1, "b": {"e": 20, "g": 21 } }' ); +json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{ "a": 1, "b": {"e": 20, "g": 21 } }' ) +{"b": {"e": [7, 20], "f": 8, "g": 21}, "d": 4, "a": 1} +select json_merge( '1', '2', '3' ); +json_merge( '1', '2', '3' ) +[1, 2, 3] +select json_merge( '[1, 2 ]', '3', '[4, 5]' ); +json_merge( '[1, 2 ]', '3', '[4, 5]' ) +[1, 2, 3, 4, 5] +select json_merge +( +'{ "a": true, "b": { "c": 3, "d": 4 }, "e": [ 1, 2 ] }', +'{ "d": false, "b": { "g": 3, "d": 5 }, "f": [ 1, 2 ] }', +'{ "m": true, "b": { "h": 8, "d": 4 }, "e": [ 3, 4 ] }' +); +json_merge +( +'{ "a": true, "b": { "c": 3, "d": 4 }, "e": [ 1, 2 ] }', +'{ "d": false, "b": { "g": 3, "d": 5 }, "f": [ 1, 2 ] }', +'{ "m": true, "b": { "h": 8, "d": 4 }, "e": [ 3, 4 ] }' +) +{"a": true, "b": {"c": 3, "d": [4, 5, 4], "g": 3, "h": 8}, "e": [1, 2, 3, 4], "d": false, "f": [1, 2], "m": true} +SELECT JSON_MERGE +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'[ 5, 6]' +); +JSON_MERGE +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'[ 5, 6]' +) +[{"a": "foo", "b": [true, {"c": 123}]}, 5, 6] +SELECT JSON_MERGE +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'{ "b": [ false, 34 ] }' +); +JSON_MERGE +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'{ "b": [ false, 34 ] }' +) +{"a": "foo", "b": [true, {"c": 123}, false, 34]} +SELECT JSON_MERGE +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'{ "b": "bar" }' +); +JSON_MERGE +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'{ "b": "bar" }' +) +{"a": "foo", "b": [true, {"c": 123}, "bar"]} +SELECT JSON_MERGE +( +'{ "a" : { "b" : 1 } }', +'{ "a" : { "c" : 1 } }' +); +JSON_MERGE +( +'{ "a" : { "b" : 1 } }', +'{ "a" : { "c" : 1 } }' +) +{"a": {"b": 1, "c": 1}} +# ---------------------------------------------------------------------- +# Test of JSON_TYPE function. +# ---------------------------------------------------------------------- +error ER_INVALID_JSON_TEXT_IN_PARAM +select json_type('abc'); +json_type('abc') +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 1 +select json_type('{"a": 2}'); +json_type('{"a": 2}') +OBJECT +select json_type('[1,2]'); +json_type('[1,2]') +ARRAY +select json_type('"scalar string"'); +json_type('"scalar string"') +STRING +select json_type('true'); +json_type('true') +BOOLEAN +select json_type('false'); +json_type('false') +BOOLEAN +select json_type('null'); +json_type('null') +NULL +select json_type('1'); +json_type('1') +INTEGER +select json_type('-0'); +json_type('-0') +INTEGER +select json_type('-0.0'); +json_type('-0.0') +DOUBLE +error ER_INVALID_TYPE_FOR_JSON +select json_type(-1); +json_type(-1) +INTEGER +error ER_INVALID_TYPE_FOR_JSON +select json_type(CAST(1 AS UNSIGNED)); +json_type(CAST(1 AS UNSIGNED)) +INTEGER +select json_type('32767'); +json_type('32767') +INTEGER +error ER_INVALID_TYPE_FOR_JSON +select json_type(PI()); +json_type(PI()) +DOUBLE +select json_type('3.14'); +json_type('3.14') +DOUBLE +error ER_INVALID_JSON_TEXT_IN_PARAM +select json_type(CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8')); +json_type(CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8')) +INTEGER +# ---------------------------------------------------------------------- +# Test of json_compact(literal) +# ---------------------------------------------------------------------- +select json_type(json_compact(cast('2014-11-25 18:00' as datetime))); +json_type(json_compact(cast('2014-11-25 18:00' as datetime))) +INTEGER +select json_type(json_compact(cast('2014-11-25' as date))); +json_type(json_compact(cast('2014-11-25' as date))) +INTEGER +select json_type(json_compact(cast('18:00:59' as time))); +json_type(json_compact(cast('18:00:59' as time))) +INTEGER +select json_type(json_compact(127)); +json_type(json_compact(127)) +INTEGER +select json_type(json_compact(255)); +json_type(json_compact(255)) +INTEGER +select json_type(json_compact(32767)); +json_type(json_compact(32767)) +INTEGER +select json_type(json_compact(65535)); +json_type(json_compact(65535)) +INTEGER +select json_type(json_compact(8388607)); +json_type(json_compact(8388607)) +INTEGER +select json_type(json_compact(16777215)); +json_type(json_compact(16777215)) +INTEGER +select json_type(json_compact(2147483647)); +json_type(json_compact(2147483647)) +INTEGER +select json_type(json_compact(4294967295)); +json_type(json_compact(4294967295)) +INTEGER +select json_type(json_compact(9223372036854775807)); +json_type(json_compact(9223372036854775807)) +INTEGER +select json_type(json_compact(18446744073709551615)); +json_type(json_compact(18446744073709551615)) +INTEGER +select json_type(json_compact(true)); +json_type(json_compact(true)) +INTEGER +select json_type(json_compact(b'10101')); +json_type(json_compact(b'10101')) +NULL +Warnings: +Warning 4036 Character disallowed in JSON in argument 1 to function 'json_type' at position 1 +select json_type(json_compact(cast(3.14 as decimal(5,2)))); +json_type(json_compact(cast(3.14 as decimal(5,2)))) +DOUBLE +select json_type(json_compact(3.14)); +json_type(json_compact(3.14)) +DOUBLE +select json_type(json_compact(3.14E30)); +json_type(json_compact(3.14E30)) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 7 +select json_type(json_compact(cast('10101abcde' as binary))); +json_type(json_compact(cast('10101abcde' as binary))) +INTEGER +select json_type(json_compact(ST_GeomFromText('POINT(1 1)'))); +json_type(json_compact(ST_GeomFromText('POINT(1 1)'))) +NULL +Warnings: +Warning 4036 Character disallowed in JSON in argument 1 to function 'json_type' at position 1 +select json_type(json_compact(ST_GeomFromText('LINESTRING(0 0,1 1,2 2)'))); +json_type(json_compact(ST_GeomFromText('LINESTRING(0 0,1 1,2 2)'))) +NULL +Warnings: +Warning 4036 Character disallowed in JSON in argument 1 to function 'json_type' at position 1 +select json_type(json_compact(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0), + (5 5,7 5,7 7,5 7, 5 5))'))); +json_type(json_compact(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0), + (5 5,7 5,7 7,5 7, 5 5))'))) +NULL +Warnings: +Warning 4036 Character disallowed in JSON in argument 1 to function 'json_type' at position 1 +select json_type(json_compact(null)); +json_type(json_compact(null)) +NULL +select json_type(json_compact(null)) is null; +json_type(json_compact(null)) is null +1 +select json_type(null) is null; +json_type(null) is null +1 +select json_compact(cast('2014-11-25 18:00' as datetime)); +json_compact(cast('2014-11-25 18:00' as datetime)) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_compact' at position 5 +select json_compact(cast('2014-11-25' as date)); +json_compact(cast('2014-11-25' as date)) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_compact' at position 5 +select json_compact(cast('18:00:59' as time)); +json_compact(cast('18:00:59' as time)) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_compact' at position 3 +select json_compact(127); +json_compact(127) +127 +select json_compact(255); +json_compact(255) +255 +select json_compact(32767); +json_compact(32767) +32767 +select json_compact(65535); +json_compact(65535) +65535 +select json_compact(8388607); +json_compact(8388607) +8388607 +select json_compact(16777215); +json_compact(16777215) +16777215 +select json_compact(2147483647); +json_compact(2147483647) +2147483647 +select json_compact(4294967295); +json_compact(4294967295) +4294967295 +select json_compact(9223372036854775807); +json_compact(9223372036854775807) +9223372036854775807 +select json_compact(18446744073709551615); +json_compact(18446744073709551615) +18446744073709551615 +select json_compact(true); +json_compact(true) +1 +select json_compact(b'10101'); +json_compact(b'10101') +NULL +Warnings: +Warning 4036 Character disallowed in JSON in argument 1 to function 'json_compact' at position 1 +select json_compact(cast(3.14 as decimal(5,2))); +json_compact(cast(3.14 as decimal(5,2))) +3.14 +select json_compact(3.14); +json_compact(3.14) +3.14 +select json_compact(3.14e0); +json_compact(3.14e0) +3.14 +select json_compact(cast('10101abcde' as binary)); +json_compact(cast('10101abcde' as binary)) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_compact' at position 6 +select json_compact(ST_GeomFromText('POINT(1 1)')); +json_compact(ST_GeomFromText('POINT(1 1)')) +NULL +Warnings: +Warning 4036 Character disallowed in JSON in argument 1 to function 'json_compact' at position 1 +select json_compact(ST_GeomFromText('LINESTRING(0 0,1 1,2 2)')); +json_compact(ST_GeomFromText('LINESTRING(0 0,1 1,2 2)')) +NULL +Warnings: +Warning 4036 Character disallowed in JSON in argument 1 to function 'json_compact' at position 1 +select json_compact(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0), + (5 5,7 5,7 7,5 7, 5 5))')); +json_compact(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0), + (5 5,7 5,7 7,5 7, 5 5))')) +NULL +Warnings: +Warning 4036 Character disallowed in JSON in argument 1 to function 'json_compact' at position 1 +select json_compact(null); +json_compact(null) +NULL +select json_compact(null) is null; +json_compact(null) is null +1 +# ---------------------------------------------------------------------- +# Test of JSON_KEYS function. +# ---------------------------------------------------------------------- +select json_keys(NULL); +json_keys(NULL) +NULL +select json_keys(NULL, '$.b'); +json_keys(NULL, '$.b') +NULL +select json_keys(NULL, NULL); +json_keys(NULL, NULL) +NULL +select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a'); +json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a') +NULL +select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', NULL); +json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', NULL) +NULL +select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}'); +json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}') +["a", "b"] +select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.b'); +json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.b') +["e", "b"] +error ER_INVALID_JSON_PATH_WILDCARD +select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.*.b'); +json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.*.b') +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_keys' +# returns [ "a", "b" ] +SELECT JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }'); +JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }') +["a", "b"] +# returns [] +SELECT JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : {} } ] }', +'$.b[1].c'); +JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : {} } ] }', +'$.b[1].c') +[] +# returns NULL +SELECT JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : {} } ] }', +'$.a.b[2]'); +JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : {} } ] }', +'$.a.b[2]') +NULL +error ER_INVALID_JSON_PATH +SELECT JSON_KEYS('{"a":1}', '1010'); +JSON_KEYS('{"a":1}', '1010') +NULL +Warnings: +Warning 4042 Syntax error in JSON path in argument 2 to function 'json_keys' at position 1 +error ER_INVALID_JSON_PATH +SELECT JSON_KEYS('{"a":1}', '1010') IS NULL; +JSON_KEYS('{"a":1}', '1010') IS NULL +1 +Warnings: +Warning 4042 Syntax error in JSON path in argument 2 to function 'json_keys' at position 1 +SELECT JSON_KEYS +( +'{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }' +); +JSON_KEYS +( +'{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }' +) +["a", "b"] +SELECT JSON_KEYS +( +'{ "a" : "foo", "b" : [ true, { "c" : {} } ] }', +'$.b[1].c' +); +JSON_KEYS +( +'{ "a" : "foo", "b" : [ true, { "c" : {} } ] }', +'$.b[1].c' +) +[] +SELECT JSON_KEYS +( +'{ "a" : "foo", "b" : [ true, { "c" : {} } ] }', +'$.a.b[2]' +); +JSON_KEYS +( +'{ "a" : "foo", "b" : [ true, { "c" : {} } ] }', +'$.a.b[2]' +) +NULL +SELECT JSON_KEYS(); +ERROR 42000: Incorrect parameter count in the call to native function 'JSON_KEYS' +SELECT JSON_KEYS('{}', '$', '$'); +ERROR 42000: Incorrect parameter count in the call to native function 'JSON_KEYS' +# ---------------------------------------------------------------------- +# CAST( AS CHAR). See also 'json_conversions.test' for other +# conversion tests. +# ---------------------------------------------------------------------- +select cast(json_keys('{"a": 1}') as char); +cast(json_keys('{"a": 1}') as char) +["a"] +select cast(json_compact(1) as char); +cast(json_compact(1) as char) +1 +select cast(json_keys(NULL) as char); +cast(json_keys(NULL) as char) +NULL +# ---------------------------------------------------------------------- +# Path matching with double-quotes +# ---------------------------------------------------------------------- +select json_extract( '{ "one potato" : 1 }', '$."one potato"' ); +json_extract( '{ "one potato" : 1 }', '$."one potato"' ) +1 +select json_extract( '{ "a.b" : 1 }', '$."a.b"' ); +json_extract( '{ "a.b" : 1 }', '$."a.b"' ) +1 +select json_extract( '{ "\\"a\\"": 1}', '$."a"' ); +json_extract( '{ "\\"a\\"": 1}', '$."a"' ) +NULL +select json_extract( '{ "\\"a\\"": 1}', '$."\\"a\\""' ); +json_extract( '{ "\\"a\\"": 1}', '$."\\"a\\""' ) +1 +select json_extract( '{ "a": 1}', '$."a"' ); +json_extract( '{ "a": 1}', '$."a"' ) +1 +select json_extract( '{ "a": 1}', '$.a' ); +json_extract( '{ "a": 1}', '$.a' ) +1 +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[0]' ); +json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[0]' ) +[3, 2] +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[0][1]' ); +json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[0][1]' ) +2 +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1]' ); +json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1]' ) +[{"c": "d"}, 1] +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1][0]' ); +json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1][0]' ) +{"c": "d"} +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1][0].c' ); +json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1][0].c' ) +"d" +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$."one potato"' ); +json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$."one potato"' ) +7 +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.b.c' ); +json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.b.c' ) +6 +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$."b.c"' ); +json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$."b.c"' ) +8 +# ---------------------------------------------------------------------- +# Test of JSON_EXTRACT function. +# ---------------------------------------------------------------------- +select json_extract(NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_extract' +select json_extract('$.b'); +ERROR 42000: Incorrect parameter count in the call to native function 'json_extract' +select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}'); +ERROR 42000: Incorrect parameter count in the call to native function 'json_extract' +error ER_INVALID_JSON_TEXT_IN_PARAM +select json_extract('$.a', '{"a": 1, "b": {"e": "foo", "b": 3}}'); +json_extract('$.a', '{"a": 1, "b": {"e": "foo", "b": 3}}') +NULL +Warnings: +Warning 4042 Syntax error in JSON path in argument 2 to function 'json_extract' at position 1 +select json_extract(NULL, '$.b'); +json_extract(NULL, '$.b') +NULL +select json_extract(NULL, NULL); +json_extract(NULL, NULL) +NULL +select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a'); +json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a') +1 +select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.*'); +json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.*') +[1, {"e": "foo", "b": 3}] +select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a', '$.b.e'); +json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a', '$.b.e') +[1, "foo"] +select json_extract('{"a": 1, "b": [1,2,3]}', '$.b[2]'); +json_extract('{"a": 1, "b": [1,2,3]}', '$.b[2]') +3 +select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a', NULL); +json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a', NULL) +NULL +# returns a JSON value containing just the string "123" +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }', +'$.b[ 1 ].c'); +JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }', +'$.b[ 1 ].c') +"123" +# returns a JSON value containing just the number 123 +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c'); +JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c') +123 +# raises an error because the document is not valid +error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_EXTRACT('{ "a" : [ }', +'$.b[ 1 ].c'); +JSON_EXTRACT('{ "a" : [ }', +'$.b[ 1 ].c') +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 11 +# raises an error because the path is invalid +error ER_INVALID_JSON_PATH +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].'); +JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].') +NULL +Warnings: +Warning 4041 Unexpected end of JSON path in argument 2 to function 'json_extract' +# returns a JSON value containing the number 123 (because of +# auto-wrapping the scalar) +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c[ 0 ]'); +JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c[ 0 ]') +123 +# returns a JSON value containing the object because of auto-wrapping +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : {"not array": 4} } ] }', +'$.b[ 1 ].c[ 0 ]'); +JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : {"not array": 4} } ] }', +'$.b[ 1 ].c[ 0 ]') +{"not array": 4} +# returns null because the path, although valid, does not identify a value +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c[ 1 ]'); +JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c[ 1 ]') +NULL +# returns a JSON value containing the number 123 (due to normalization) +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.b[ 1 ].c'); +JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.b[ 1 ].c') +123 +# returns a JSON array [ "foo", true ] +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.a', '$.b[0]'); +JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.a', '$.b[0]') +["foo", true] +# returns a JSON array [ true ] +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.d', '$.b[0]'); +JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.d', '$.b[0]') +[true] +select json_extract( '[1]', '$[0][0]' ); +json_extract( '[1]', '$[0][0]' ) +1 +select json_extract( '[1]', '$**[0]' ); +json_extract( '[1]', '$**[0]' ) +[1] +select json_extract( '{ "a": 1 }', '$.a[0]' ); +json_extract( '{ "a": 1 }', '$.a[0]' ) +1 +select json_extract( '{ "a": 1 }', '$**[0]' ); +json_extract( '{ "a": 1 }', '$**[0]' ) +[{"a": 1}, 1] +select json_extract( '{ "a": 1 }', '$[0].a' ); +json_extract( '{ "a": 1 }', '$[0].a' ) +1 +select json_extract( '{ "a": 1 }', '$**.a' ); +json_extract( '{ "a": 1 }', '$**.a' ) +[1] +select json_extract( '{ "a": 1 }', '$[0].a[0]' ); +json_extract( '{ "a": 1 }', '$[0].a[0]' ) +1 +select json_extract( '{ "a": 1 }', '$**[0]' ); +json_extract( '{ "a": 1 }', '$**[0]' ) +[{"a": 1}, 1] +select json_extract( '{ "a": 1 }', '$[0].a' ); +json_extract( '{ "a": 1 }', '$[0].a' ) +1 +select json_extract( '{ "a": 1 }', '$**.a' ); +json_extract( '{ "a": 1 }', '$**.a' ) +[1] +select json_extract( '{ "a": 1 }', '$[0][0].a' ); +json_extract( '{ "a": 1 }', '$[0][0].a' ) +1 +select json_extract( '{ "a": 1 }', '$[0][0][0].a' ); +json_extract( '{ "a": 1 }', '$[0][0][0].a' ) +1 +SELECT JSON_EXTRACT('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', '$**.a.*'); +JSON_EXTRACT('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', '$**.a.*') +[{"c": 42}] +SELECT JSON_EXTRACT('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', +'$[1][0][0].x[0].a.*'); +JSON_EXTRACT('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', +'$[1][0][0].x[0].a.*') +[{"c": 42}] +SELECT JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }', +'$.b[ 1 ].c' +); +JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }', +'$.b[ 1 ].c' +) +"123" +SELECT JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c' +); +JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c' +) +123 +error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_EXTRACT +( +'{ "a" : [ }', +'$.b[ 1 ].c' +); +JSON_EXTRACT +( +'{ "a" : [ }', +'$.b[ 1 ].c' +) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 11 +error ER_INVALID_JSON_PATH +SELECT JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].' +); +JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].' +) +NULL +Warnings: +Warning 4041 Unexpected end of JSON path in argument 2 to function 'json_extract' +SELECT JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c[ 0 ]' +); +JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c[ 0 ]' +) +123 +SELECT JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c[ 1 ]' +); +JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', +'$.b[ 1 ].c[ 1 ]' +) +NULL +SELECT JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.b[ 1 ].c' +); +JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.b[ 1 ].c' +) +123 +SELECT JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.a', '$.b[0]' +); +JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.a', '$.b[0]' +) +["foo", true] +SELECT JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.d', '$.b[0]' +); +JSON_EXTRACT +( +'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', +'$.d', '$.b[0]' +) +[true] +select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[*].b' ) jdoc; +jdoc +NULL +select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[0].b' ) jdoc; +jdoc +NULL +select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[0].a' ) jdoc; +jdoc +1 +select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[*].a' ) jdoc; +jdoc +[1, 2] +select json_extract( '[ { "a": 1 }, { "b": 2 } ]', '$[*].a' ) jdoc; +jdoc +[1] +select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[0].a' ) jdoc; +jdoc +[3, 4] +select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[*].a' ) jdoc; +jdoc +[[3, 4]] +select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[0].a', '$[1].a' ) jdoc; +jdoc +[[3, 4]] +# ---------------------------------------------------------------------- +# Test of JSON_ARRAY_APPEND function. +# ---------------------------------------------------------------------- +select json_array_append(NULL, '$.b', json_compact(1)); +json_array_append(NULL, '$.b', json_compact(1)) +NULL +select json_array_append('[1,2,3]', NULL, json_compact(1)); +json_array_append('[1,2,3]', NULL, json_compact(1)) +NULL +select json_array_append('[1,2,3]', '$', NULL); +json_array_append('[1,2,3]', '$', NULL) +[1, 2, 3, null] +select json_array_append(NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_array_append' +select json_array_append(NULL, NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_array_append' +select json_array_append(NULL, NULL, NULL, NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_array_append' +SELECT JSON_ARRAY_APPEND(json_compact('1'), '$', 3); +JSON_ARRAY_APPEND(json_compact('1'), '$', 3) +[1, 3] +SELECT JSON_ARRAY_APPEND(json_compact('{"a": 3}'), '$', 3); +JSON_ARRAY_APPEND(json_compact('{"a": 3}'), '$', 3) +[{"a": 3}, 3] +error ER_INVALID_JSON_PATH_WILDCARD +select json_array_append(json_compact('{"a": {"b": [3]}}'), '$**[0]', 6); +json_array_append(json_compact('{"a": {"b": [3]}}'), '$**[0]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_array_append' +# Auto-wrapping, since because the paths identify scalars. +# should return {"a": "foo", "b": ["bar", 4], "c": ["wibble", "grape"]} +SELECT JSON_ARRAY_APPEND('{"a": "foo", "b": "bar", "c": "wibble"}', +'$.b', json_compact(4), +'$.c', json_compact('"grape"')); +JSON_ARRAY_APPEND('{"a": "foo", "b": "bar", "c": "wibble"}', +'$.b', json_compact(4), +'$.c', json_compact('"grape"')) +{"a": "foo", "b": ["bar", 4], "c": ["wibble", "grape"]} +# should return {"a": "foo", "b": [1, 2, 3, 4], +# "c": ["apple", "pear", "grape"]} +SELECT JSON_ARRAY_APPEND('{"a" : "foo","b": [1, 2, 3], "c": ["apple", "pear"]}', +'$.b', json_compact(4), +'$.c', json_compact('"grape"')); +JSON_ARRAY_APPEND('{"a" : "foo","b": [1, 2, 3], "c": ["apple", "pear"]}', +'$.b', json_compact(4), +'$.c', json_compact('"grape"')) +{"a": "foo", "b": [1, 2, 3, 4], "c": ["apple", "pear", "grape"]} +SELECT JSON_ARRAY_APPEND('{"a" : "foo","b": [1, 2, 3], "c": ["apple", "pear"]}', +'$.b', 4, +'$.c', 'grape'); +JSON_ARRAY_APPEND('{"a" : "foo","b": [1, 2, 3], "c": ["apple", "pear"]}', +'$.b', 4, +'$.c', 'grape') +{"a": "foo", "b": [1, 2, 3, 4], "c": ["apple", "pear", "grape"]} +error ER_INVALID_JSON_PATH_WILDCARD +select json_array_append( '[[], [], []]', '$[*]', 3, '$[*]', 4); +json_array_append( '[[], [], []]', '$[*]', 3, '$[*]', 4) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_array_append' +error ER_INVALID_JSON_PATH_WILDCARD +select json_array_append( '[[], "not array", []]', '$[*]', 3, '$[*]', 4); +json_array_append( '[[], "not array", []]', '$[*]', 3, '$[*]', 4) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_array_append' +SELECT JSON_ARRAY_APPEND +( +'{ "a" : "foo", "b" : "bar", "c" : "wibble" }', +'$.b', 4, +'$.c', "grape" +); +JSON_ARRAY_APPEND +( +'{ "a" : "foo", "b" : "bar", "c" : "wibble" }', +'$.b', 4, +'$.c', "grape" +) +{"a": "foo", "b": ["bar", 4], "c": ["wibble", "grape"]} +SELECT JSON_ARRAY_APPEND +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ "apple", "pear" ] }', +'$.b', 4, +'$.c', "grape" +); +JSON_ARRAY_APPEND +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ "apple", "pear" ] }', +'$.b', 4, +'$.c', "grape" +) +{"a": "foo", "b": [1, 2, 3, 4], "c": ["apple", "pear", "grape"]} +# ---------------------------------------------------------------------- +# Bug#21373874 ASSERTION `PARENT' FAILED +# ---------------------------------------------------------------------- +select json_array_append('{"a":1}', '$[0]', 100); +json_array_append('{"a":1}', '$[0]', 100) +[{"a": 1}, 100] +select json_array_append('3', '$[0]', 100); +json_array_append('3', '$[0]', 100) +[3, 100] +select json_array_append('3', '$[0][0][0][0]', 100); +json_array_append('3', '$[0][0][0][0]', 100) +[3, 100] +# ---------------------------------------------------------------------- +# Test of JSON_INSERT function. +# ---------------------------------------------------------------------- +select json_insert(NULL, '$.b', json_compact(1)); +json_insert(NULL, '$.b', json_compact(1)) +NULL +select json_insert('[1,2,3]', NULL, json_compact(1)); +json_insert('[1,2,3]', NULL, json_compact(1)) +NULL +select json_insert('[1,2,3]', '$[3]', NULL); +json_insert('[1,2,3]', '$[3]', NULL) +[1, 2, 3, null] +select json_insert(NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_insert' +select json_insert(NULL, NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_insert' +select json_insert(NULL, NULL, NULL, NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_insert' +select json_insert('[1,2,3]', '$[2]', 4); +json_insert('[1,2,3]', '$[2]', 4) +[1, 2, 3] +select json_insert('[1,2,3]', '$[3]', 4); +json_insert('[1,2,3]', '$[3]', 4) +[1, 2, 3, 4] +select json_insert('[1,2,3]', '$[10]', 4); +json_insert('[1,2,3]', '$[10]', 4) +[1, 2, 3, 4] +select json_insert('{"c":4}', '$.c', 4); +json_insert('{"c":4}', '$.c', 4) +{"c": 4} +select json_insert('{"c":4}', '$.a', 4); +json_insert('{"c":4}', '$.a', 4) +{"c": 4, "a": 4} +select json_insert('1', '$', 4); +json_insert('1', '$', 4) +1 +select json_insert('1', '$[0]', 4); +json_insert('1', '$[0]', 4) +1 +select json_insert('1', '$[1]', 4); +json_insert('1', '$[1]', 4) +[1, 4] +select json_insert('1', '$[10]', '4', '$[11]', 5); +json_insert('1', '$[10]', '4', '$[11]', 5) +[1, "4", 5] +select json_insert('[1,2,3]', '$[2][0]', 4); +json_insert('[1,2,3]', '$[2][0]', 4) +[1, 2, 3] +select json_insert('[1,2,3]', '$[2][2]', 4); +json_insert('[1,2,3]', '$[2][2]', 4) +[1, 2, [3, 4]] +select json_insert('{"a": 3}', '$.a[0]', 4); +json_insert('{"a": 3}', '$.a[0]', 4) +{"a": 3} +select json_insert('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5'); +json_insert('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5') +{"a": [3, 4, "5"]} +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('{"a": [1], "b": 2}'), '$.*[1]', 6); +json_insert(json_compact('{"a": [1], "b": 2}'), '$.*[1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('{"a": 1, "b": 2}'), '$.*[1]', 6); +json_insert(json_compact('{"a": 1, "b": 2}'), '$.*[1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('{"a": {"b": 3}}'), '$.a.*[1]', 6); +json_insert(json_compact('{"a": {"b": 3}}'), '$.a.*[1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('{"a": {"b": [3]}}'), '$.a.*[1]', 6); +json_insert(json_compact('{"a": {"b": [3]}}'), '$.a.*[1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('{"a": {"b": 3}}'), '$**[1]', 6); +json_insert(json_compact('{"a": {"b": 3}}'), '$**[1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('{"a": {"b": [3]}}'), '$**[1]', 6); +json_insert(json_compact('{"a": {"b": [3]}}'), '$**[1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('[1]'), '$[*][1]', 6); +json_insert(json_compact('[1]'), '$[*][1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('[1]'), '$**[1]', 6); +json_insert(json_compact('[1]'), '$**[1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('[1, [2], 3]'), '$[*][1]', 6); +json_insert(json_compact('[1, [2], 3]'), '$[*][1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('[1, [2], 3]'), '$**[1]', 6); +json_insert(json_compact('[1, [2], 3]'), '$**[1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('[[1]]'), '$[*][1]', 6); +json_insert(json_compact('[[1]]'), '$[*][1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('[[1]]'), '$**[1]', 6); +json_insert(json_compact('[[1]]'), '$**[1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +select json_insert(json_compact('{"a": 3}'), '$[1]', 6); +json_insert(json_compact('{"a": 3}'), '$[1]', 6) +[{"a": 3}, 6] +SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a', true); +JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a', true) +{"a": "foo", "b": [1, 2, 3]} +SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', 123); +JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', 123) +{"a": "foo", "b": [1, 2, 3], "c": 123} +SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', '123'); +JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', '123') +{"a": "foo", "b": [1, 2, 3], "c": "123"} +SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a[1]', true); +JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a[1]', true) +{"a": ["foo", true], "b": [1, 2, 3]} +SELECT JSON_INSERT('{ "a" : "foo"}', '$.b', true, '$.b', false); +JSON_INSERT('{ "a" : "foo"}', '$.b', true, '$.b', false) +{"a": "foo", "b": true} +SELECT JSON_INSERT +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.a', +true +); +JSON_INSERT +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.a', +true +) +{"a": "foo", "b": [1, 2, 3]} +SELECT JSON_INSERT +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.c', +123 +); +JSON_INSERT +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.c', +123 +) +{"a": "foo", "b": [1, 2, 3], "c": 123} +SELECT JSON_INSERT +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.c', +'123' +); +JSON_INSERT +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.c', +'123' +) +{"a": "foo", "b": [1, 2, 3], "c": "123"} +SELECT JSON_INSERT +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.a[1]', +true +); +JSON_INSERT +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.a[1]', +true +) +{"a": ["foo", true], "b": [1, 2, 3]} +SELECT JSON_INSERT +( +'{ "a" : "foo"}', +'$.b', true, +'$.b', false +); +JSON_INSERT +( +'{ "a" : "foo"}', +'$.b', true, +'$.b', false +) +{"a": "foo", "b": true} +# ---------------------------------------------------------------------- +# Test of JSON_ARRAY_INSERT function. +# ---------------------------------------------------------------------- +select json_array_insert(NULL, '$.b[1]', 1); +json_array_insert(NULL, '$.b[1]', 1) +NULL +select json_array_insert('[1,2,3]', NULL, 1); +json_array_insert('[1,2,3]', NULL, 1) +NULL +select json_array_insert('[1,2,3]', '$[3]', NULL); +json_array_insert('[1,2,3]', '$[3]', NULL) +[1, 2, 3, null] +select json_array_insert(NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_array_insert' +select json_array_insert(NULL, NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_array_insert' +select json_array_insert(NULL, NULL, NULL, NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_array_insert' +error ER_INVALID_JSON_PATH_ARRAY_CELL +select json_array_insert('true', '$', 1); +json_array_insert('true', '$', 1) +NULL +error ER_INVALID_JSON_PATH_ARRAY_CELL +select json_array_insert('true', '$.a', 1); +json_array_insert('true', '$.a', 1) +NULL +error ER_INVALID_JSON_PATH_ARRAY_CELL +select json_array_insert('true', '$.a[1].b', 1); +json_array_insert('true', '$.a[1].b', 1) +NULL +select json_array_insert( 'true', '$[0]', false ); +json_array_insert( 'true', '$[0]', false ) +true +select json_array_insert( 'true', '$[1]', false ); +json_array_insert( 'true', '$[1]', false ) +true +select json_array_insert( '{ "a": true }', '$.a[0]', false ); +json_array_insert( '{ "a": true }', '$.a[0]', false ) +{"a": true} +select json_array_insert( '{ "a": true }', '$.a[1]', false ); +json_array_insert( '{ "a": true }', '$.a[1]', false ) +{"a": true} +select json_array_insert( '[]', '$[0]', false ); +json_array_insert( '[]', '$[0]', false ) +[false] +select json_array_insert( '[]', '$[1]', false ); +json_array_insert( '[]', '$[1]', false ) +[false] +select json_array_insert( '[true]', '$[0]', false ); +json_array_insert( '[true]', '$[0]', false ) +[false, true] +select json_array_insert( '[true]', '$[1]', false ); +json_array_insert( '[true]', '$[1]', false ) +[true, false] +select json_array_insert( '[true]', '$[2]', false ); +json_array_insert( '[true]', '$[2]', false ) +[true, false] +select json_array_insert( '{ "a": [] }', '$.a[0]', false ); +json_array_insert( '{ "a": [] }', '$.a[0]', false ) +{"a": [false]} +select json_array_insert( '{ "a": [] }', '$.a[1]', false ); +json_array_insert( '{ "a": [] }', '$.a[1]', false ) +{"a": [false]} +select json_array_insert( '{ "a": [true] }', '$.a[0]', false ); +json_array_insert( '{ "a": [true] }', '$.a[0]', false ) +{"a": [false, true]} +select json_array_insert( '{ "a": [true] }', '$.a[1]', false ); +json_array_insert( '{ "a": [true] }', '$.a[1]', false ) +{"a": [true, false]} +select json_array_insert( '{ "a": [true] }', '$.a[2]', false ); +json_array_insert( '{ "a": [true] }', '$.a[2]', false ) +{"a": [true, false]} +select json_array_insert( '[1, 2, 3, 4]', '$[0]', false ); +json_array_insert( '[1, 2, 3, 4]', '$[0]', false ) +[false, 1, 2, 3, 4] +select json_array_insert( '[1, 2, 3, 4]', '$[1]', false ); +json_array_insert( '[1, 2, 3, 4]', '$[1]', false ) +[1, false, 2, 3, 4] +select json_array_insert( '[1, 2, 3, 4]', '$[2]', false ); +json_array_insert( '[1, 2, 3, 4]', '$[2]', false ) +[1, 2, false, 3, 4] +select json_array_insert( '[1, 2, 3, 4]', '$[3]', false ); +json_array_insert( '[1, 2, 3, 4]', '$[3]', false ) +[1, 2, 3, false, 4] +select json_array_insert( '[1, 2, 3, 4]', '$[4]', false ); +json_array_insert( '[1, 2, 3, 4]', '$[4]', false ) +[1, 2, 3, 4, false] +select json_array_insert( '[1, 2, 3, 4]', '$[5]', false ); +json_array_insert( '[1, 2, 3, 4]', '$[5]', false ) +[1, 2, 3, 4, false] +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[0]', false ); +json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[0]', false ) +{"a": [false, 1, 2, 3, 4]} +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[1]', false ); +json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[1]', false ) +{"a": [1, false, 2, 3, 4]} +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[2]', false ); +json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[2]', false ) +{"a": [1, 2, false, 3, 4]} +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[3]', false ); +json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[3]', false ) +{"a": [1, 2, 3, false, 4]} +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[4]', false ); +json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[4]', false ) +{"a": [1, 2, 3, 4, false]} +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[5]', false ); +json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[5]', false ) +{"a": [1, 2, 3, 4, false]} +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.b[0]', false ); +json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.b[0]', false ) +{"a": [1, 2, 3, 4]} +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.b[1]', false ); +json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.b[1]', false ) +{"a": [1, 2, 3, 4]} +select json_array_insert( '"a"', '$[0]', true ); +json_array_insert( '"a"', '$[0]', true ) +"a" +select json_array_insert( '[ "a" ]', '$[0][0]', true ); +json_array_insert( '[ "a" ]', '$[0][0]', true ) +["a"] +select json_array_insert( '"a"', '$[1]', true ); +json_array_insert( '"a"', '$[1]', true ) +"a" +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert('[]', '$.a.*[1]', 6); +json_insert('[]', '$.a.*[1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert('[]', '$**[1]', 6); +json_insert('[]', '$**[1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +error ER_INVALID_JSON_PATH_WILDCARD +select json_insert('[]', '$[*][1]', 6); +json_insert('[]', '$[*][1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert' +select json_array_insert( '[ 1, 2, 3 ]', '$[1]', true, '$[1]', false ); +json_array_insert( '[ 1, 2, 3 ]', '$[1]', true, '$[1]', false ) +[1, false, true, 2, 3] +select json_array_insert( '[ 1, 2, 3 ]', '$[1]', +json_compact( '[ "a", "b", "c", "d" ]'), '$[1][2]', false ); +json_array_insert( '[ 1, 2, 3 ]', '$[1]', +json_compact( '[ "a", "b", "c", "d" ]'), '$[1][2]', false ) +[1, ["a", "b", false, "c", "d"], 2, 3] +error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_ARRAY_INSERT(JSON_EXTRACT('[1', '$'), '$[0]', 1); +JSON_ARRAY_INSERT(JSON_EXTRACT('[1', '$'), '$[0]', 1) +NULL +Warnings: +Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_extract' +error ER_INVALID_JSON_TEXT_IN_PARAM +select json_array_insert( '[ 1, 2, 3 ]', '$[1]', json_extract( '[', '$' ) ); +json_array_insert( '[ 1, 2, 3 ]', '$[1]', json_extract( '[', '$' ) ) +[1, null, 2, 3] +Warnings: +Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_extract' +# ---------------------------------------------------------------------- +# Test of JSON_SET function. +# ---------------------------------------------------------------------- +select json_set(NULL, '$.b', json_compact(1)); +json_set(NULL, '$.b', json_compact(1)) +NULL +select json_set('[1,2,3]', NULL, json_compact(1)); +json_set('[1,2,3]', NULL, json_compact(1)) +NULL +select json_set('[1,2,3]', '$[3]', NULL); +json_set('[1,2,3]', '$[3]', NULL) +[1, 2, 3, null] +select json_set(NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_set' +select json_set(NULL, NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_set' +select json_set(NULL, NULL, NULL, NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_set' +error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_SET('{}', '$.name', JSON_EXTRACT('', '$')); +JSON_SET('{}', '$.name', JSON_EXTRACT('', '$')) +NULL +Warnings: +Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_extract' +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_set' at position 2 +select json_set('[1,2,3]', '$[2]', 4); +json_set('[1,2,3]', '$[2]', 4) +[1, 2, 4] +select json_set('[1,2,3]', '$[3]', 4); +json_set('[1,2,3]', '$[3]', 4) +[1, 2, 3, 4] +select json_set('[1,2,3]', '$[10]', 4); +json_set('[1,2,3]', '$[10]', 4) +[1, 2, 3, 4] +select json_set('{"c":4}', '$.c', 5); +json_set('{"c":4}', '$.c', 5) +{"c": 5} +select json_set('{"c":4}', '$.a', 5); +json_set('{"c":4}', '$.a', 5) +{"c": 4, "a": 5} +select json_set('1', '$', 4); +json_set('1', '$', 4) +4 +select json_set('1', '$[0]', 4); +json_set('1', '$[0]', 4) +4 +select json_set('1', '$[1]', 4); +json_set('1', '$[1]', 4) +[1, 4] +select json_set('1', '$[10]', '4', '$[11]', 5); +json_set('1', '$[10]', '4', '$[11]', 5) +[1, "4", 5] +select json_set('[1,2,3]', '$[2][0]', 4); +json_set('[1,2,3]', '$[2][0]', 4) +[1, 2, 4] +select json_set('[1,2,3]', '$[2][2]', 4); +json_set('[1,2,3]', '$[2][2]', 4) +[1, 2, [3, 4]] +select json_set('{"a": 3}', '$.a[0]', 4); +json_set('{"a": 3}', '$.a[0]', 4) +{"a": 4} +select json_set('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5'); +json_set('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5') +{"a": [3, 4, "5"]} +error ER_INVALID_JSON_PATH_WILDCARD +select json_set(json_compact('{"a": {"b": [3]}}'), '$**[1]', 6); +json_set(json_compact('{"a": {"b": [3]}}'), '$**[1]', 6) +NULL +Warnings: +Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_set' +SELECT JSON_SET('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.a', +JSON_OBJECT()); +JSON_SET('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.a', +JSON_OBJECT()) +{"a": {}, "b": [1, 2, 3]} +SELECT JSON_SET('{ "a" : "foo"}', '$.a', +JSON_OBJECT( 'b', false ), '$.a.c', true); +JSON_SET('{ "a" : "foo"}', '$.a', +JSON_OBJECT( 'b', false ), '$.a.c', true) +{"a": {"b": false, "c": true}} +select json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.a', +json_compact('{}')); +json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.a', +json_compact('{}')) +{"a": {}, "b": [1, 2, 3]} +select json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.c', +json_compact('[true, false]')); +json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.c', +json_compact('[true, false]')) +{"a": "foo", "b": [1, 2, 3], "c": [true, false]} +select json_set('1', '$[3]', 2); +json_set('1', '$[3]', 2) +[1, 2] +select json_set('{ "a" : "foo"}', '$.a', +json_compact('{"b": false}'), '$.a.c', true); +json_set('{ "a" : "foo"}', '$.a', +json_compact('{"b": false}'), '$.a.c', true) +{"a": {"b": false, "c": true}} +SELECT JSON_SET +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.a', +JSON_OBJECT() +); +JSON_SET +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.a', +JSON_OBJECT() +) +{"a": {}, "b": [1, 2, 3]} +SELECT JSON_SET +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.c', +JSON_ARRAY( true, false ) +); +JSON_SET +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.c', +JSON_ARRAY( true, false ) +) +{"a": "foo", "b": [1, 2, 3], "c": [true, false]} +SELECT JSON_SET +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.c', +JSON_ARRAY( json_compact( 'true'), json_compact( 'false') ) +); +JSON_SET +( +'{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.c', +JSON_ARRAY( json_compact( 'true'), json_compact( 'false') ) +) +{"a": "foo", "b": [1, 2, 3], "c": [true, false]} +SELECT JSON_SET +( +'1', +'$[3]', +2 +); +JSON_SET +( +'1', +'$[3]', +2 +) +[1, 2] +SELECT JSON_SET +( +'{ "a" : "foo"}', +'$.a', JSON_OBJECT( 'b', false ), +'$.a.c', true +); +JSON_SET +( +'{ "a" : "foo"}', +'$.a', JSON_OBJECT( 'b', false ), +'$.a.c', true +) +{"a": {"b": false, "c": true}} +# ---------------------------------------------------------------------- +# Test of JSON_REPLACE function. +# ---------------------------------------------------------------------- +select json_replace(NULL, '$.b', json_compact(1)); +json_replace(NULL, '$.b', json_compact(1)) +NULL +select json_replace('[1,2,3]', NULL, json_compact(1)); +json_replace('[1,2,3]', NULL, json_compact(1)) +NULL +select json_replace('[1,2,3]', '$[2]', NULL); +json_replace('[1,2,3]', '$[2]', NULL) +[1, 2, null] +select json_replace(NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_replace' +select json_replace(NULL, NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_replace' +select json_replace(NULL, NULL, NULL, NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_replace' +select json_replace('[1,2,3]', '$[2]', 4); +json_replace('[1,2,3]', '$[2]', 4) +[1, 2, 4] +select json_replace('[1,2,3]', '$[3]', 4); +json_replace('[1,2,3]', '$[3]', 4) +[1, 2, 3] +select json_replace('[1,2,3]', '$[10]', 4); +json_replace('[1,2,3]', '$[10]', 4) +[1, 2, 3] +select json_replace('{"c":4}', '$.c', 5); +json_replace('{"c":4}', '$.c', 5) +{"c": 5} +select json_replace('{"c":4}', '$.a', 5); +json_replace('{"c":4}', '$.a', 5) +{"c": 4} +select json_replace('1', '$', 4); +json_replace('1', '$', 4) +4 +select json_replace('1', '$[0]', 4); +json_replace('1', '$[0]', 4) +4 +select json_replace('1', '$[1]', 4); +json_replace('1', '$[1]', 4) +1 +select json_replace('1', '$[10]', '4', '$[11]', 5); +json_replace('1', '$[10]', '4', '$[11]', 5) +1 +select json_replace('[1,2,3]', '$[2][0]', 4); +json_replace('[1,2,3]', '$[2][0]', 4) +[1, 2, 4] +select json_replace('[1,2,3]', '$[2][2]', 4); +json_replace('[1,2,3]', '$[2][2]', 4) +[1, 2, 3] +select json_replace('{"a": 3}', '$.a[0]', 4); +json_replace('{"a": 3}', '$.a[0]', 4) +{"a": 4} +select json_replace('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5'); +json_replace('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5') +{"a": 3} +SELECT JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.c', +true); +JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.c', +true) +{"a": "foo", "b": [1, 2, 3]} +SELECT JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.a[0]', +true); +JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.a[0]', +true) +{"a": true, "b": [1, 2, 3]} +SELECT JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.b[5]', +true); +JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +'$.b[5]', +true) +{"a": "foo", "b": [1, 2, 3]} +# ---------------------------------------------------------------------- +# Test of JSON_ARRAY function. +# ---------------------------------------------------------------------- +select json_array(NULL, '$.b', json_compact(1)); +json_array(NULL, '$.b', json_compact(1)) +[null, "$.b", 1] +select json_array('[1,2,3]', NULL, json_compact(1)); +json_array('[1,2,3]', NULL, json_compact(1)) +["[1,2,3]", null, 1] +select json_array('[1,2,3]', '$[3]', NULL); +json_array('[1,2,3]', '$[3]', NULL) +["[1,2,3]", "$[3]", null] +select json_array(); +json_array() +[] +select json_array(3.14); +json_array(3.14) +[3.14] +select json_array('[1,2,3]'); +json_array('[1,2,3]') +["[1,2,3]"] +select json_array(json_compact('[1,2,3]')); +json_array(json_compact('[1,2,3]')) +[[1,2,3]] +select json_array(1,2,3); +json_array(1,2,3) +[1, 2, 3] +select json_array(b'0', b'1', b'10'); +json_array(b'0', b'1', b'10') +["\u0000", "\u0001", "\u0002"] +SELECT JSON_ARRAY(); +JSON_ARRAY() +[] +# ---------------------------------------------------------------------- +# Test of JSON_OBJECT function. +# ---------------------------------------------------------------------- +select json_object( 'a' ); +ERROR 42000: Incorrect parameter count in the call to native function 'json_object' +select json_object( 'a', 1, 'b' ); +ERROR 42000: Incorrect parameter count in the call to native function 'json_object' +error ER_JSON_DOCUMENT_NULL_KEY +select json_object( null, 1 ); +json_object( null, 1 ) +{"": 1} +select json_object(); +json_object() +{} +select json_object( 'a', null ); +json_object( 'a', null ) +{"a": null} +select json_object( 'a', 1 ); +json_object( 'a', 1 ) +{"a": 1} +select json_object( 'a', 1, 'b', 'foo' ); +json_object( 'a', 1, 'b', 'foo' ) +{"a": 1, "b": "foo"} +select json_object( 'a', 1, 'b', 'foo', 'c', json_compact( '{ "d": "wibble" }') ); +json_object( 'a', 1, 'b', 'foo', 'c', json_compact( '{ "d": "wibble" }') ) +{"a": 1, "b": "foo", "c": { "d": "wibble" }} +select json_object( 'a', true, 'b', false, 'c', json_compact( 'null') ); +json_object( 'a', true, 'b', false, 'c', json_compact( 'null') ) +{"a": true, "b": false, "c": null} +select json_valid( json_object( '"a"', 1 ) ); +json_valid( json_object( '"a"', 1 ) ) +0 +select json_object( REPEAT('a', 64 * 1024), 1 ); +json_object( REPEAT('a', 64 * 1024), 1 ) +{"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": 1} +select json_object(json_array(), json_array()); +json_object(json_array(), json_array()) +{"[]": []} +select json_object( cast(json_array() as char), json_array()); +json_object( cast(json_array() as char), json_array()) +{"[]": []} +select json_object( 1, json_array()); +json_object( 1, json_array()) +{"1": []} +select json_object( cast(1 as char), json_array()); +json_object( cast(1 as char), json_array()) +{"1": []} +SELECT JSON_OBJECT(); +JSON_OBJECT() +{} +# ---------------------------------------------------------------------- +# Test of JSON_SEARCH function. +# ---------------------------------------------------------------------- +select json_search(); +ERROR 42000: Incorrect parameter count in the call to native function 'json_search' +select json_search( '{ "a": true }' ); +ERROR 42000: Incorrect parameter count in the call to native function 'json_search' +select json_search( '{ "a": true }', 'one' ); +ERROR 42000: Incorrect parameter count in the call to native function 'json_search' +select json_search( null, 'one', 'foo' ); +json_search( null, 'one', 'foo' ) +NULL +select json_search( '{ "a": "foo" }', null, 'foo' ); +json_search( '{ "a": "foo" }', null, 'foo' ) +NULL +select json_search( '{ "a": "foo" }', 'one', 'foo', null, null ); +json_search( '{ "a": "foo" }', 'one', 'foo', null, null ) +NULL +select json_search( '{ "a": "foo" }', 'one', 'foo', null, '$.a', null ); +json_search( '{ "a": "foo" }', 'one', 'foo', null, '$.a', null ) +NULL +error ER_JSON_BAD_ONE_OR_ALL_ARG +select json_search( '{ "a": "foo" }', 'twof', 'foo' ); +json_search( '{ "a": "foo" }', 'twof', 'foo' ) +NULL +Warnings: +Warning 4046 Argument 2 to function 'json_search' must be "one" or "all". +error ER_JSON_BAD_ONE_OR_ALL_ARG +select json_search( '{ "a": "foo" }', 'two', 'foo' ); +json_search( '{ "a": "foo" }', 'two', 'foo' ) +NULL +Warnings: +Warning 4046 Argument 2 to function 'json_search' must be "one" or "all". +select json_search( '{ "a": "foo" }', 'one', 'foo', 'ab' ); +ERROR HY000: Incorrect arguments to ESCAPE +error ER_INVALID_JSON_PATH +select json_search( '{ "a": "foo" }', 'one', 'foo', null, '$a' ); +json_search( '{ "a": "foo" }', 'one', 'foo', null, '$a' ) +NULL +Warnings: +Warning 4042 Syntax error in JSON path in argument 5 to function 'json_search' at position 2 +error ER_INVALID_JSON_PATH +select json_search( '{ "a": "foo" }', 'all', 'foo', null, '$.a', '$b' ); +json_search( '{ "a": "foo" }', 'all', 'foo', null, '$.a', '$b' ) +NULL +Warnings: +Warning 4042 Syntax error in JSON path in argument 6 to function 'json_search' at position 2 +select json_search(a, b, c); +ERROR 42S22: Unknown column 'a' in 'field list' +select json_search( '{ "a": "foobar" }', 'one', 'foo%' ); +json_search( '{ "a": "foobar" }', 'one', 'foo%' ) +"$.a" +select json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'one', 'foo%' ); +json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'one', 'foo%' ) +"$.a" +select json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'all', 'foo%' ); +json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'all', 'foo%' ) +["$.a", "$.c[1]"] +select json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'all', 'f__us' ); +json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'all', 'f__us' ) +"$.b" +select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'all', 'foo%', null, '$.a' ); +json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'all', 'foo%', null, '$.a' ) +["$.a[0]", "$.a[2]"] +select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'all', 'foo%', null, '$.a', '$.b' ); +json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'all', 'foo%', null, '$.a', '$.b' ) +["$.a[0]", "$.a[2]", "$.b"] +select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'one', 'foo%', null, '$.a', '$.b' ); +json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'one', 'foo%', null, '$.a', '$.b' ) +"$.a[0]" +select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'ALL', 'foo%', null, '$.a' ); +json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'ALL', 'foo%', null, '$.a' ) +["$.a[0]", "$.a[2]"] +select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'aLl', 'foo%', null, '$.a', '$.b' ); +json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'aLl', 'foo%', null, '$.a', '$.b' ) +["$.a[0]", "$.a[2]", "$.b"] +select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'ONE', 'foo%', null, '$.a', '$.b' ); +json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'ONE', 'foo%', null, '$.a', '$.b' ) +"$.a[0]" +select json_search +( +'[ { "a": { "b": { "c": "fool" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "food"} } ]', +'all', +'foo%', +null, +'$**.c' +); +json_search +( +'[ { "a": { "b": { "c": "fool" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "food"} } ]', +'all', +'foo%', +null, +'$**.c' +) +["$[0].a.b.c", "$[2].c.c"] +select json_search +( +'[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]', +'all', +'sho%', +null, +'$**.c' +); +json_search +( +'[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]', +'all', +'sho%', +null, +'$**.c' +) +["$[0].a.b.c", "$[1].b.c", "$[2].c.c"] +select json_search +( +'[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]', +'all', +'sho%e', +null, +'$**.c' +); +json_search +( +'[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]', +'all', +'sho%e', +null, +'$**.c' +) +["$[0].a.b.c", "$[2].c.c"] +select json_search +( +'[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]', +'all', +'sho%', +null, +'$[*].c' +); +json_search +( +'[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]', +'all', +'sho%', +null, +'$[*].c' +) +"$[2].c.c" +select json_search +( +'[ { "a": { "b": { "c": "showtime" } } }, [ { "b": { "c": "shout" } }, { "c": { "c": "shoe"} } ] ]', +'all', +'sho%', +null, +'$[1]**.c' +); +json_search +( +'[ { "a": { "b": { "c": "showtime" } } }, [ { "b": { "c": "shout" } }, { "c": { "c": "shoe"} } ] ]', +'all', +'sho%', +null, +'$[1]**.c' +) +["$[1][0].b.c", "$[1][1].c.c"] +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo%bar' ); +json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo%bar' ) +["$[0]", "$[1]"] +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar' ); +json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar' ) +"$[1]" +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|' ); +json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|' ) +"$[1]" +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]' ); +json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]' ) +NULL +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]', '$[1]' ); +json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]', '$[1]' ) +"$[1]" +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]', '$[1]', '$[2]' ); +json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]', '$[1]', '$[2]' ) +"$[1]" +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null ); +json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null ) +"$[1]" +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null, '$[0]' ); +json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null, '$[0]' ) +NULL +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null, '$[1]' ); +json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null, '$[1]' ) +"$[1]" +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]' ); +json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]' ) +NULL +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[1]' ); +json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[1]' ) +"$[1]" +select json_search( '[ "abc", "ABC" ]', 'all', 'aBc' ); +json_search( '[ "abc", "ABC" ]', 'all', 'aBc' ) +["$[0]", "$[1]"] +select json_search( '[ "abc", "ABC" ]', 'all', 'abc' ); +json_search( '[ "abc", "ABC" ]', 'all', 'abc' ) +["$[0]", "$[1]"] +select json_search( '[ "abc", "ABC" ]', 'all', 'ABC' ); +json_search( '[ "abc", "ABC" ]', 'all', 'ABC' ) +["$[0]", "$[1]"] +select json_search( '[ 10, "10", 1.0, "1.0" ]', 'all', '1%' ); +json_search( '[ 10, "10", 1.0, "1.0" ]', 'all', '1%' ) +["$[0]", "$[1]", "$[2]", "$[3]"] +SELECT JSON_SEARCH +( +'{ "a" : 123, "b" : [ 123, 456 ] }', +'one', +'123' +); +JSON_SEARCH +( +'{ "a" : 123, "b" : [ 123, 456 ] }', +'one', +'123' +) +"$.a" +SELECT JSON_SEARCH +( +'{ "a" : "123", "b" : [ 123, "789", "123", "456", "123" ] }', +'one', +'123', +null, +'$.b' +); +JSON_SEARCH +( +'{ "a" : "123", "b" : [ 123, "789", "123", "456", "123" ] }', +'one', +'123', +null, +'$.b' +) +"$.b[0]" +SELECT JSON_SEARCH +( +'{ "a" : "123", "b" : { "key" : "123" } }', +'one', +'123' +); +JSON_SEARCH +( +'{ "a" : "123", "b" : { "key" : "123" } }', +'one', +'123' +) +"$.a" +SELECT JSON_SEARCH +( +'{ "a" : "1243", "b" : { "key" : "1234" } }', +'one', +'123%' +); +JSON_SEARCH +( +'{ "a" : "1243", "b" : { "key" : "1234" } }', +'one', +'123%' +) +"$.b.key" +SELECT JSON_SEARCH +( +'{ "a" : "1243", "b" : { "key" : "1234", "c": "directorysub%directoryabc" } }', +'one', +'dir%torysub@%dir%', +'@' +); +JSON_SEARCH +( +'{ "a" : "1243", "b" : { "key" : "1234", "c": "directorysub%directoryabc" } }', +'one', +'dir%torysub@%dir%', +'@' +) +"$.b.c" +SELECT JSON_SEARCH +( +'{ "a" : "1243", "b" : { "key" : "1234" } }', +'one', +'123%', +null, +'$.c' +); +JSON_SEARCH +( +'{ "a" : "1243", "b" : { "key" : "1234" } }', +'one', +'123%', +null, +'$.c' +) +NULL +SELECT JSON_UNQUOTE +( +JSON_SEARCH +( +'{ "onepotato": "foot", "one potato": "food" , "one \\"potato": "fool" }', +'all', +'food' + ) +); +JSON_UNQUOTE +( +JSON_SEARCH +( +'{ "onepotato": "foot", "one potato": "food" , "one \\"potato": "fool" }', +'all', +'food' + ) +) +$.one potato +select json_type(case (null is null) when 1 then +json_compact('null') else +json_compact('[1,2,3]') end); +json_type(case (null is null) when 1 then +json_compact('null') else +json_compact('[1,2,3]') end) +NULL +select json_type(case (null is not null) when 1 then +json_compact('null') else +json_compact('[1,2,3]') end); +json_type(case (null is not null) when 1 then +json_compact('null') else +json_compact('[1,2,3]') end) +ARRAY +select json_type( if(null is null, +json_compact('null'), +json_compact('[1,2,3]')) ); +json_type( if(null is null, +json_compact('null'), +json_compact('[1,2,3]')) ) +NULL +select json_type( if(null is not null, +json_compact('null'), +json_compact('[1,2,3]'))); +json_type( if(null is not null, +json_compact('null'), +json_compact('[1,2,3]'))) +ARRAY +select cast(json_extract(json_compact(concat('[', json_compact('["A",2]'), ']')), +'$[0][1]') as char) = 2; +cast(json_extract(json_compact(concat('[', json_compact('["A",2]'), ']')), +'$[0][1]') as char) = 2 +1 +# ---------------------------------------------------------------------- +# Test of aggregate function MAX, MIN. +# ---------------------------------------------------------------------- +select max(json_compact('[1,2,3]')); +max(json_compact('[1,2,3]')) +[1,2,3] +# ---------------------------------------------------------------------- +# Test of JSON_QUOTE, JSON_UNQUOTE +# ---------------------------------------------------------------------- +select json_quote(); +ERROR 42000: Incorrect parameter count in the call to native function 'json_quote' +select json_quote('abc', 'def'); +ERROR 42000: Incorrect parameter count in the call to native function 'json_quote' +select json_quote(NULL, 'def'); +ERROR 42000: Incorrect parameter count in the call to native function 'json_quote' +select json_quote('abc', NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_quote' +select json_unquote(); +ERROR 42000: Incorrect parameter count in the call to native function 'json_unquote' +select json_unquote('"abc"', '"def"'); +ERROR 42000: Incorrect parameter count in the call to native function 'json_unquote' +select json_unquote(NULL, 'def'); +ERROR 42000: Incorrect parameter count in the call to native function 'json_unquote' +select json_unquote('"abc"', NULL); +ERROR 42000: Incorrect parameter count in the call to native function 'json_unquote' +select json_quote(NULL); +json_quote(NULL) +NULL +select json_unquote(NULL); +json_unquote(NULL) +NULL +select json_quote('abc'); +json_quote('abc') +"abc" +select json_quote(convert('abc' using ascii)); +json_quote(convert('abc' using ascii)) +"abc" +select json_quote(convert('abc' using latin1)); +json_quote(convert('abc' using latin1)) +"abc" +select json_quote(convert('abc' using utf8)); +json_quote(convert('abc' using utf8)) +"abc" +select json_quote(convert('abc' using utf8mb4)); +json_quote(convert('abc' using utf8mb4)) +"abc" +select json_unquote('abc'); +json_unquote('abc') +abc +select json_unquote('"abc"'); +json_unquote('"abc"') +abc +select json_unquote(convert('"abc"' using ascii)); +json_unquote(convert('"abc"' using ascii)) +abc +select json_unquote(convert('"abc"' using latin1)); +json_unquote(convert('"abc"' using latin1)) +abc +select json_unquote(convert('"abc"' using utf8)); +json_unquote(convert('"abc"' using utf8)) +abc +select json_unquote(convert('"abc"' using utf8mb4)); +json_unquote(convert('"abc"' using utf8mb4)) +abc +select json_quote('"'); +json_quote('"') +"\"" +select json_unquote('"'); +json_unquote('"') +" +Warnings: +Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_unquote' +error ER_INCORRECT_TYPE +select json_quote(123); +json_quote(123) +NULL +error ER_INCORRECT_TYPE +select json_unquote(123); +json_unquote(123) +123 +select json_unquote('""'); +json_unquote('""') + +select char_length(json_unquote('""')); +char_length(json_unquote('""')) +0 +select json_unquote('"" '); +json_unquote('"" ') + +select json_unquote(json_compact(json_quote('abc'))); +json_unquote(json_compact(json_quote('abc'))) +abc +select json_compact('{"abc": "foo"}'); +json_compact('{"abc": "foo"}') +{"abc":"foo"} +select json_unquote(json_compact('{"abc": "foo"}')); +json_unquote(json_compact('{"abc": "foo"}')) +{"abc": "foo"} +select json_extract(json_compact('{"abc": "foo"}'), '$.abc'); +json_extract(json_compact('{"abc": "foo"}'), '$.abc') +"foo" +select json_unquote(json_extract(json_compact('{"abc": "foo"}'), '$.abc')); +json_unquote(json_extract(json_compact('{"abc": "foo"}'), '$.abc')) +foo +select json_unquote('["a", "b", "c"]'); +json_unquote('["a", "b", "c"]') +["a", "b", "c"] +select json_unquote(json_compact('["a", "b", "c"]')); +json_unquote(json_compact('["a", "b", "c"]')) +["a", "b", "c"] +select charset(json_unquote('"abc"')); +charset(json_unquote('"abc"')) +utf8 +select json_quote(convert(X'e68891' using utf8)); +json_quote(convert(X'e68891' using utf8)) +"我" +select json_quote(convert(X'e68891' using utf8mb4)); +json_quote(convert(X'e68891' using utf8mb4)) +"我" +select json_compact(json_quote(convert(X'e68891' using utf8))); +json_compact(json_quote(convert(X'e68891' using utf8))) +"我" +select json_unquote(convert(X'e68891' using utf8)); +json_unquote(convert(X'e68891' using utf8)) +我 +select json_quote(json_quote(json_quote('abc'))); +json_quote(json_quote(json_quote('abc'))) +"\"\\\"abc\\\"\"" +select json_unquote(json_unquote(json_unquote( # long round trip of it +json_quote(json_quote(json_quote('abc')))))); +json_unquote(json_unquote(json_unquote( # long round trip of it +json_quote(json_quote(json_quote('abc')))))) +abc +select json_compact(cast('2015-01-15 23:24:25' as datetime)); +json_compact(cast('2015-01-15 23:24:25' as datetime)) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_compact' at position 5 +select json_unquote(json_compact(cast('2015-01-15 23:24:25' as datetime))); +json_unquote(json_compact(cast('2015-01-15 23:24:25' as datetime))) +2015-01-15 23:24:25 +select json_compact(st_geomfromtext('point(1 1)')); +json_compact(st_geomfromtext('point(1 1)')) +NULL +Warnings: +Warning 4036 Character disallowed in JSON in argument 1 to function 'json_compact' at position 1 +select json_unquote(json_compact(st_geomfromtext('point(1 1)'))); +json_unquote(json_compact(st_geomfromtext('point(1 1)'))) +ð?ð? +SELECT JSON_UNQUOTE( '"abc"' ); +JSON_UNQUOTE( '"abc"' ) +abc +SELECT JSON_UNQUOTE( '"abc' ); +JSON_UNQUOTE( '"abc' ) +"abc +Warnings: +Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_unquote' +error ER_INCORRECT_TYPE +SELECT JSON_UNQUOTE( 123 ); +JSON_UNQUOTE( 123 ) +123 +SELECT JSON_UNQUOTE +( CAST( json_compact( '"abc"') AS CHAR ) ); +JSON_UNQUOTE +( CAST( json_compact( '"abc"') AS CHAR ) ) +abc +SELECT JSON_UNQUOTE +( +CAST( +JSON_EXTRACT( '{ "userName" : "fred" }', '$.userName' ) +AS CHAR +) +) = 'fred'; +JSON_UNQUOTE +( +CAST( +JSON_EXTRACT( '{ "userName" : "fred" }', '$.userName' ) +AS CHAR +) +) = 'fred' +1 +SELECT +CAST( +JSON_EXTRACT( '{ "userName" : "fred" }', '$.userName' ) +AS CHAR +) = 'fred'; +CAST( +JSON_EXTRACT( '{ "userName" : "fred" }', '$.userName' ) +AS CHAR +) = 'fred' +0 +SELECT JSON_QUOTE( 'abc' ); +JSON_QUOTE( 'abc' ) +"abc" +error ER_INCORRECT_TYPE +SELECT JSON_QUOTE( 123 ); +JSON_QUOTE( 123 ) +NULL +SELECT json_compact( JSON_QUOTE( '123' )); +json_compact( JSON_QUOTE( '123' )) +"123" +# ---------------------------------------------------------------------- +# Test of JSON_CONTAINS +# ---------------------------------------------------------------------- +# should give NULL +select json_contains(NULL, NULL); +json_contains(NULL, NULL) +NULL +select json_contains(json_compact('{"a": 1, "b": 2}'), NULL); +json_contains(json_compact('{"a": 1, "b": 2}'), NULL) +NULL +select json_contains(NULL, json_compact('null')); +json_contains(NULL, json_compact('null')) +NULL +select json_contains(json_compact('[1]'), json_compact('[1]'), NULL); +json_contains(json_compact('[1]'), json_compact('[1]'), NULL) +NULL +# should give 0: +select json_contains(json_compact(3.14), json_compact(3)); +json_contains(json_compact(3.14), json_compact(3)) +0 +# should give 0: not at top level +select json_contains(json_compact('{"a": {"b": 7}}'), json_compact('{"b": 7}')); +json_contains(json_compact('{"a": {"b": 7}}'), json_compact('{"b": 7}')) +0 +# but path argument will fix it: +select json_contains(json_compact('{"a": {"b": 7}}'), json_compact('{"b": 7}'), '$.a'); +json_contains(json_compact('{"a": {"b": 7}}'), json_compact('{"b": 7}'), '$.a') +1 +# but arrays "introspect" +select json_contains(json_compact('[1,[2.0, 3.0]]'), json_compact('[2.0]')); +json_contains(json_compact('[1,[2.0, 3.0]]'), json_compact('[2.0]')) +1 +select json_contains(json_compact('[1, 2, [3, [4, 5]], 6, 7]'), json_compact('5')); +json_contains(json_compact('[1, 2, [3, [4, 5]], 6, 7]'), json_compact('5')) +1 +# should give 0: just a key +select json_contains(json_compact('{"a": 1, "b": 2}'), json_compact('"a"')); +json_contains(json_compact('{"a": 1, "b": 2}'), json_compact('"a"')) +0 +# should give 0: one candidate element doesn't match +select json_contains(json_compact('[1]'), json_compact('[1,2]')); +json_contains(json_compact('[1]'), json_compact('[1,2]')) +0 +# should all give 1 +select json_contains(json_compact('null'), json_compact('null')); +json_contains(json_compact('null'), json_compact('null')) +1 +# simple object subset +select json_contains(json_compact('{"a": 1, "b": 2}'), json_compact( '{"a": 1}')); +json_contains(json_compact('{"a": 1, "b": 2}'), json_compact( '{"a": 1}')) +1 +# simple vector subset +select json_contains(json_compact('[1, 2, 3]'), json_compact('[1, 3]')); +json_contains(json_compact('[1, 2, 3]'), json_compact('[1, 3]')) +1 +# auto-wrap, should give 1 +select json_contains(json_compact('[1, 2, 3]'), json_compact(3)); +json_contains(json_compact('[1, 2, 3]'), json_compact(3)) +1 +# ok even with nested cast off elements +select json_contains(json_compact('{"person": {"id": 1, "country": "norway"}}'), +json_compact('{"person": {"country": "norway"}}')); +json_contains(json_compact('{"person": {"id": 1, "country": "norway"}}'), +json_compact('{"person": {"country": "norway"}}')) +1 +# vector reordering and duplicates is ok +select json_contains(json_compact('[1,3,5]'), json_compact('[5,3,1,5]')); +json_contains(json_compact('[1,3,5]'), json_compact('[5,3,1,5]')) +1 +# ok even with more elts in candidate than in doc +select json_contains(json_compact('[{"b": 4, "a":7}]'), json_compact('[{"a":7},{"b":4}]')); +json_contains(json_compact('[{"b": 4, "a":7}]'), json_compact('[{"a":7},{"b":4}]')) +1 +select json_contains(json_compact('[{"b": 4, "a":7}, 5]'), json_compact('[5, {"a":7, "b":4}]')); +json_contains(json_compact('[{"b": 4, "a":7}, 5]'), json_compact('[5, {"a":7, "b":4}]')) +1 +# ok even with mixed number types that compare equal +select json_contains(json_compact('[{"b": 4, "a":7}, 5.0]'), json_compact('[5, {"a":7.0E0, "b":4}]')); +json_contains(json_compact('[{"b": 4, "a":7}, 5.0]'), json_compact('[5, {"a":7.0E0, "b":4}]')) +1 +select json_contains( '{"customer": "cust3"}', '{"customer": "cust1"}' ); +json_contains( '{"customer": "cust3"}', '{"customer": "cust1"}' ) +0 +SELECT JSON_CONTAINS('[null,1,[2,3],true,false]', '[null,1,[3],false]'); +JSON_CONTAINS('[null,1,[2,3],true,false]', '[null,1,[3],false]') +1 +SELECT JSON_CONTAINS('[null,1,[2,3],true,false]', '[null,1,[4],false]'); +JSON_CONTAINS('[null,1,[2,3],true,false]', '[null,1,[4],false]') +0 +SELECT JSON_CONTAINS('[true,false]', '[[true]]'); +JSON_CONTAINS('[true,false]', '[[true]]') +1 +SELECT JSON_CONTAINS('[1,2]', '[[1]]'); +JSON_CONTAINS('[1,2]', '[[1]]') +1 +SELECT JSON_CONTAINS('[1,2]', '1', '$.abc'); +JSON_CONTAINS('[1,2]', '1', '$.abc') +0 +SELECT JSON_CONTAINS('{}', '{}'); +JSON_CONTAINS('{}', '{}') +1 +SELECT JSON_CONTAINS('{}', '{"a":1}'); +JSON_CONTAINS('{}', '{"a":1}') +0 +SELECT JSON_CONTAINS('{"a":1}', '{"a":1,"b":2}'); +JSON_CONTAINS('{"a":1}', '{"a":1,"b":2}') +0 +SELECT JSON_CONTAINS +( +json_compact('[1, 4, 6]'), +json_compact('[1, 6]') +); +JSON_CONTAINS +( +json_compact('[1, 4, 6]'), +json_compact('[1, 6]') +) +1 +SELECT JSON_CONTAINS +( +json_compact('{"person": {"id": 1, "country": "norway"}}'), +json_compact('{"person": {"country": "norway"}}') +); +JSON_CONTAINS +( +json_compact('{"person": {"id": 1, "country": "norway"}}'), +json_compact('{"person": {"country": "norway"}}') +) +1 +SELECT JSON_CONTAINS +( +json_compact('[1,3,5]'), +json_compact('[5,3,1,5]') +); +JSON_CONTAINS +( +json_compact('[1,3,5]'), +json_compact('[5,3,1,5]') +) +1 +SELECT JSON_CONTAINS +( +json_compact('[3.14]'), +json_compact('[3]') +); +JSON_CONTAINS +( +json_compact('[3.14]'), +json_compact('[3]') +) +0 +SELECT JSON_CONTAINS +( +json_compact('[1, 2, 3]'), +json_compact(3) +); +JSON_CONTAINS +( +json_compact('[1, 2, 3]'), +json_compact(3) +) +1 +SELECT JSON_CONTAINS(); +ERROR 42000: Incorrect parameter count in the call to native function 'JSON_CONTAINS' +SELECT JSON_CONTAINS('[1]'); +ERROR 42000: Incorrect parameter count in the call to native function 'JSON_CONTAINS' +SELECT JSON_CONTAINS('[1]', '[1]', '$', '$[0]'); +ERROR 42000: Incorrect parameter count in the call to native function 'JSON_CONTAINS' +# ---------------------------------------------------------------------- +# Wrong collation from JSON_QUOTE caused problems: Set it in +# Item_func_json_quote::fix_length_and_dec. Bug found by Knut. +# Similar issue for JSON_UNQUOTE and JSON_TYPE. +# ---------------------------------------------------------------------- +select json_object("a", ifnull(json_quote('test'), json_compact('null'))); +json_object("a", ifnull(json_quote('test'), json_compact('null'))) +{"a": "\"test\""} +select json_compact(concat('[', json_quote('ab'), ']')); +json_compact(concat('[', json_quote('ab'), ']')) +["ab"] +select json_compact(concat('[', json_unquote('"12"'), ']')); +json_compact(concat('[', json_unquote('"12"'), ']')) +[12] +select json_compact(concat('["', json_type( json_compact(1)), '"]')); +json_compact(concat('["', json_type( json_compact(1)), '"]')) +["INTEGER"] +# +# Bug#20912438: ITEM_TYPE_HOLDER::DISPLAY_LENGTH(ITEM*): ASSERTION `0' FAILED +# +(SELECT JSON_KEYS('{ "key80": "2015-04-20 11:53:55"}')) UNION ALL +(SELECT JSON_KEYS('{ "key80": "2015-04-20 11:53:55" }') LIMIT 0); +JSON_KEYS('{ "key80": "2015-04-20 11:53:55"}') +["key80"] +SELECT json_compact(1) UNION ALL SELECT json_compact(1); +json_compact(1) +1 +1 +SELECT COUNT(*), json_compact(NULL); +COUNT(*) json_compact(NULL) +1 NULL +error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT COUNT(*), JSON_EXTRACT('not valid json!', '$'); +COUNT(*) JSON_EXTRACT('not valid json!', '$') +1 NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 1 +# ---------------------------------------------------------------------- +# Bug report from John E. +# Crash in Item_copy_json::~Item_copy_json +# ---------------------------------------------------------------------- +EXPLAIN SELECT COUNT(*), JSON_KEYS('{}'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used +select json_search( '{ "a": "foo" }', 'one', 'foo', 'a' ); +json_search( '{ "a": "foo" }', 'one', 'foo', 'a' ) +"$.a" +select json_search( '{ "a": "foo" }', 'one', 'foo', null ); +json_search( '{ "a": "foo" }', 'one', 'foo', null ) +"$.a" +select json_search( '{ "a": "foo" }', 'one', 'foo', convert(x'f8' using latin1) ); +json_search( '{ "a": "foo" }', 'one', 'foo', convert(x'f8' using latin1) ) +"$.a" +select json_search( '{ "a": "foo" }', 'one', 'foo', 'ab' ); +ERROR HY000: Incorrect arguments to ESCAPE +# ---------------------------------------------------------------------- +# Wrong results when Json_path_cache primed is accessed +# during the prepare-phase. +#---------------------------------------------------------------------- +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null; +json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null +1 +prepare stmt1 from 'select json_remove( ''[ 1, { "a": true, "b": false, "c": null }, 5 ]'', null ) is null'; +execute stmt1; +json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null +1 +error ER_INVALID_JSON_PATH +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$.' ) is null; +json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$.' ) is null +1 +Warnings: +Warning 4041 Unexpected end of JSON path in argument 2 to function 'json_remove' +error ER_INVALID_JSON_PATH +prepare stmt1 from 'select json_remove( ''[ 1, { "a": true, "b": false, "c": null }, 5 ]'', ''$.'' ) is null'; +# ---------------------------------------------------------------------- +# Bug#20987329 VALUE OF PREPARED STATEMENT PLACEHOLDER FOR PARAMETER +# IN JSON_EXTRACT IS STICKY +#---------------------------------------------------------------------- +prepare json_stmt1 FROM 'select json_contains( ''{ "keyA": [1, 2, 3], "keyB": [4, 5, 6] }'', ''[2]'', ? )'; +set @mypath = '$.keyA'; +execute json_stmt1 USING @mypath; +json_contains( '{ "keyA": [1, 2, 3], "keyB": [4, 5, 6] }', '[2]', ? ) +1 +set @mypath = '$.keyB'; +execute json_stmt1 USING @mypath; +json_contains( '{ "keyA": [1, 2, 3], "keyB": [4, 5, 6] }', '[2]', ? ) +0 +prepare json_stmt2 FROM 'select json_contains_path( ''{ "keyA": [1, 2, 3] }'', ''all'', ? )'; +set @mypath = '$.keyA'; +execute json_stmt2 USING @mypath; +json_contains_path( '{ "keyA": [1, 2, 3] }', 'all', ? ) +1 +set @mypath = '$.keyB'; +execute json_stmt2 USING @mypath; +json_contains_path( '{ "keyA": [1, 2, 3] }', 'all', ? ) +0 +prepare json_stmt3 FROM 'select json_length( ''{ "keyA": [1, 2, 3], "keyB": [1, 2, 3, 4] }'', ? )'; +set @mypath = '$.keyA'; +execute json_stmt3 USING @mypath; +json_length( '{ "keyA": [1, 2, 3], "keyB": [1, 2, 3, 4] }', ? ) +3 +set @mypath = '$.keyB'; +execute json_stmt3 USING @mypath; +json_length( '{ "keyA": [1, 2, 3], "keyB": [1, 2, 3, 4] }', ? ) +4 +prepare json_stmt4 FROM 'select json_keys( ''[ { "keyA": true }, { "keyB": false } ]'', ? )'; +set @mypath = '$[0]'; +execute json_stmt4 USING @mypath; +json_keys( '[ { "keyA": true }, { "keyB": false } ]', ? ) +["keyA"] +set @mypath = '$[1]'; +execute json_stmt4 USING @mypath; +json_keys( '[ { "keyA": true }, { "keyB": false } ]', ? ) +["keyB"] +prepare json_stmt5 FROM 'select json_array_append( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )'; +set @mypath = '$.keyA'; +execute json_stmt5 USING @mypath; +json_array_append( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 ) +{"keyA": [1, 2, 5], "keyB": [3, 4]} +set @mypath = '$.keyB'; +execute json_stmt5 USING @mypath; +json_array_append( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 ) +{"keyA": [1, 2], "keyB": [3, 4, 5]} +prepare json_stmt6 FROM 'select json_insert( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )'; +set @mypath = '$.keyA[2]'; +execute json_stmt6 USING @mypath; +json_insert( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 ) +{"keyA": [1, 2, 5], "keyB": [3, 4]} +set @mypath = '$.keyB[2]'; +execute json_stmt6 USING @mypath; +json_insert( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 ) +{"keyA": [1, 2], "keyB": [3, 4, 5]} +prepare json_stmt7 FROM 'select json_set( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )'; +set @mypath = '$.keyA[2]'; +execute json_stmt7 USING @mypath; +json_set( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 ) +{"keyA": [1, 2, 5], "keyB": [3, 4]} +set @mypath = '$.keyB[2]'; +execute json_stmt7 USING @mypath; +json_set( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 ) +{"keyA": [1, 2], "keyB": [3, 4, 5]} +prepare json_stmt8 FROM 'select json_replace( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )'; +set @mypath = '$.keyA[1]'; +execute json_stmt8 USING @mypath; +json_replace( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 ) +{"keyA": [1, 5], "keyB": [3, 4]} +set @mypath = '$.keyB[1]'; +execute json_stmt8 USING @mypath; +json_replace( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 ) +{"keyA": [1, 2], "keyB": [3, 5]} +prepare json_stmt9 FROM 'select json_search( ''{ "keyA": [ "foot" ], "keyB": [ "food" ] }'', ''all'', ''foo%'', null, ? )'; +set @mypath = '$.keyA'; +execute json_stmt9 USING @mypath; +json_search( '{ "keyA": [ "foot" ], "keyB": [ "food" ] }', 'all', 'foo%', null, ? ) +"$.keyA[0]" +set @mypath = '$.keyB'; +execute json_stmt9 USING @mypath; +json_search( '{ "keyA": [ "foot" ], "keyB": [ "food" ] }', 'all', 'foo%', null, ? ) +"$.keyB[0]" +prepare json_stmt10 FROM 'select json_remove( ''{ "keyA": [ "foot" ], "keyB": [ "food" ] }'', ? )'; +set @mypath = '$.keyA'; +execute json_stmt10 USING @mypath; +json_remove( '{ "keyA": [ "foot" ], "keyB": [ "food" ] }', ? ) +{"keyB": ["food"]} +set @mypath = '$.keyB'; +execute json_stmt10 USING @mypath; +json_remove( '{ "keyA": [ "foot" ], "keyB": [ "food" ] }', ? ) +{"keyA": ["foot"]} +prepare json_stmt11 FROM 'select json_contains_path( ''{ "keyA": true }'', ?, ''$.keyA'', ''$.keyB'' )'; +set @mypath = 'one'; +execute json_stmt11 USING @mypath; +json_contains_path( '{ "keyA": true }', ?, '$.keyA', '$.keyB' ) +1 +set @mypath = 'all'; +execute json_stmt11 USING @mypath; +json_contains_path( '{ "keyA": true }', ?, '$.keyA', '$.keyB' ) +0 +prepare json_stmt12 FROM 'select json_search( ''{ "keyA": [ "foot" ], "keyB": [ "food" ] }'', ?, ''foo%'' )'; +set @mypath = 'one'; +execute json_stmt12 USING @mypath; +json_search( '{ "keyA": [ "foot" ], "keyB": [ "food" ] }', ?, 'foo%' ) +"$.keyA[0]" +set @mypath = 'all'; +execute json_stmt12 USING @mypath; +json_search( '{ "keyA": [ "foot" ], "keyB": [ "food" ] }', ?, 'foo%' ) +["$.keyA[0]", "$.keyB[0]"] +# +# Bug#21128632 JSON_QUOTE(JSON_TYPE(...)) GIVES ERROR 3139 ER_INVALID_JSON_CHARSET +# +select json_quote( json_type( json_object() ) ); +json_quote( json_type( json_object() ) ) +"OBJECT" +select json_quote( json_type( json_compact('{}') ) ); +json_quote( json_type( json_compact('{}') ) ) +"OBJECT" +# +# Bug#21148020 OUTPUT FROM JSON_TYPE() IS TRUNCATED +# WHEN EXECUTED IN A VIEW OR JOIN +# +SELECT JSON_TYPE(JSON_OBJECT()); +JSON_TYPE(JSON_OBJECT()) +OBJECT +CREATE VIEW v1 AS SELECT JSON_TYPE(JSON_OBJECT()); +SELECT * FROM v1; +JSON_TYPE(JSON_OBJECT()) +OBJE +drop view v1; +# +# Bug#21198333 SIG 6 IN ITEM_CACHE_JSON::CACHE_VALUE AT SQL/ITEM.CC:9470 +# +error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT MIN(JSON_EXTRACT('not json', '$')); +MIN(JSON_EXTRACT('not json', '$')) +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 1 +# +# Bug#21200657 DATA FROM DERIVED TABLE BASED +# ON JSN_QUOTE()/JSN_UNQUOTE() CALL IS TRUNCATED +# +SELECT JSON_QUOTE('This is a string that should not be truncated') AS field1; +field1 +"This is a string that should not be truncated" +SELECT JSON_UNQUOTE(JSON_QUOTE('This is a string that should not be truncated')) AS field1; +field1 +This is a string that should not be truncated +SELECT * FROM (SELECT JSON_QUOTE('This is a string that should not be truncated') AS field1) AS DERIVED_TABLE; +field1 +"This is a string that should not be truncated" +SELECT * FROM (SELECT JSON_UNQUOTE("This is a string that should not be truncated") AS field1) AS DERIVED_TABLE; +field1 +This is a string that should not be truncated +SELECT * FROM (SELECT JSON_UNQUOTE(JSON_QUOTE('This is a string that should not be truncated')) AS field1) AS DERIVED_TABLE; +field1 +This is a string that should not be truncated +# +# Bug#21296173 JSON_OBJECT('KEY', BOOLEAN_LITERAL) USES VALUES 0, 1 +# FOR BOOL WHEN USED VIA VIEW +# +SELECT JSON_OBJECT('key1', false, 'key2', true); +JSON_OBJECT('key1', false, 'key2', true) +{"key1": false, "key2": true} +SELECT JSON_ARRAY('key1', false, 'key2', true); +JSON_ARRAY('key1', false, 'key2', true) +["key1", false, "key2", true] +CREATE VIEW v1 AS SELECT JSON_OBJECT('key1', false, 'key2', true); +SELECT * FROM v1; +JSON_OBJECT('key1', false, 'key2', true) +{"key1": 0, "key2": 1} +CREATE VIEW v2 AS SELECT JSON_ARRAY('key1', false, 'key2', true); +SELECT * FROM v2; +JSON_ARRAY('key1', false, 'key2', true) +["key1", 0, "key2", 1] +drop view v1; +drop view v2; +# +# Bug#21293089 JSON_CONTAINS() RETURNS WRONG RESULT WITH EMPTY JSON ARRAY +# +SELECT JSON_CONTAINS('[]', '{"a" : 1}'); +JSON_CONTAINS('[]', '{"a" : 1}') +0 +SELECT JSON_CONTAINS('[]', '[1, 2, 3, 4, 5]'); +JSON_CONTAINS('[]', '[1, 2, 3, 4, 5]') +0 +SELECT JSON_CONTAINS('[]', '[1, 2, 3, 4, {"a" : 1}]'); +JSON_CONTAINS('[]', '[1, 2, 3, 4, {"a" : 1}]') +0 +SELECT JSON_CONTAINS('[]', '{"a" : [1, 2, 3, 4, 5]}'); +JSON_CONTAINS('[]', '{"a" : [1, 2, 3, 4, 5]}') +0 +SELECT JSON_CONTAINS('[]', '[]'); +JSON_CONTAINS('[]', '[]') +1 +# +# Bug#21377136 STACK OVERFLOW IN RAPIDJSON::GENERICREADER +# +error ER_JSON_DOCUMENT_TOO_DEEP +SELECT JSON_VALID(REPEAT('[', 100000)); +JSON_VALID(REPEAT('[', 100000)) +0 +error ER_JSON_DOCUMENT_TOO_DEEP +SELECT JSON_VALID(REPEAT('{"a":', 100000)); +JSON_VALID(REPEAT('{"a":', 100000)) +0 +error ER_JSON_DOCUMENT_TOO_DEEP +SELECT JSON_VALID(REPEAT('{"a":[', 100000)); +JSON_VALID(REPEAT('{"a":[', 100000)) +0 +error ER_JSON_DOCUMENT_TOO_DEEP +SELECT JSON_VALID(REPEAT('[{"a":', 100000)); +JSON_VALID(REPEAT('[{"a":', 100000)) +0 +# +# Bug#21381806 JSON: ASSERTION FAILED: ARG->NULL_VALUE +# +SELECT JSON_SET(CASE WHEN 1 THEN NULL ELSE NULL END, '{}', '{}'); +JSON_SET(CASE WHEN 1 THEN NULL ELSE NULL END, '{}', '{}') +NULL +SELECT JSON_VALID(CASE WHEN 1 THEN NULL ELSE NULL END); +JSON_VALID(CASE WHEN 1 THEN NULL ELSE NULL END) +NULL +SELECT JSON_ARRAY(CASE WHEN 1 THEN NULL ELSE NULL END); +JSON_ARRAY(CASE WHEN 1 THEN NULL ELSE NULL END) +[null] +# +# Bug#21384048 ASSERTION FAILED: N >= 0 && N <= 308 +# IN RAPIDJSON::INTERNAL::FASTPATH +# +SELECT JSON_EXTRACT('-1E-36181012216111515851075235238', '$'); +JSON_EXTRACT('-1E-36181012216111515851075235238', '$') +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 33 +SELECT JSON_EXTRACT('1E-36181012216111515851075235238', '$'); +JSON_EXTRACT('1E-36181012216111515851075235238', '$') +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 32 +SELECT JSON_EXTRACT('1E-325', '$'); +JSON_EXTRACT('1E-325', '$') +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6 +SELECT JSON_EXTRACT('1E-324', '$'); +JSON_EXTRACT('1E-324', '$') +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6 +SELECT JSON_EXTRACT('1E-323', '$'); +JSON_EXTRACT('1E-323', '$') +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6 +SELECT JSON_EXTRACT('1E+308', '$'); +JSON_EXTRACT('1E+308', '$') +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6 +error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_EXTRACT('1E+309', '$'); +JSON_EXTRACT('1E+309', '$') +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6 +error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_EXTRACT('1E+36181012216111515851075235238', '$'); +JSON_EXTRACT('1E+36181012216111515851075235238', '$') +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 32 +error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_EXTRACT('-1E+36181012216111515851075235238', '$'); +JSON_EXTRACT('-1E+36181012216111515851075235238', '$') +NULL +Warnings: +Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 33 +# +# Bug#21383284: ASSERTION IN SELECT_LEX::SETUP_CONDS +# +SELECT 1 FROM dual WHERE JSON_SEARCH('{}', 'one', 'foo', 'too-long-escape'); +ERROR HY000: Incorrect arguments to ESCAPE +error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT 1 FROM dual WHERE JSON_SEARCH('{}', 'one', 'foo', JSON_EXTRACT('', '$')); +1 +Warnings: +Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_extract' +# +# Bug#21442624 INCORRECT RESULT FROM JSON_SET WITH AUTO-WRAPPING +# +SELECT JSON_SET('1', '$', 100); +JSON_SET('1', '$', 100) +100 +SELECT JSON_SET('1', '$[0]', 100); +JSON_SET('1', '$[0]', 100) +100 +SELECT JSON_SET('1', '$[0][0]', 100); +JSON_SET('1', '$[0][0]', 100) +100 +SELECT JSON_SET('1', '$[0][0][0]', 100); +JSON_SET('1', '$[0][0][0]', 100) +100 +SELECT JSON_SET('[]', '$', 100); +JSON_SET('[]', '$', 100) +100 +SELECT JSON_SET('[]', '$[0]', 100); +JSON_SET('[]', '$[0]', 100) +[100] +SELECT JSON_SET('[]', '$[0][0]', 100); +JSON_SET('[]', '$[0][0]', 100) +[] +SELECT JSON_SET('[]', '$[0][0][0]', 100); +JSON_SET('[]', '$[0][0][0]', 100) +[] +SELECT JSON_SET('[1]', '$', 100); +JSON_SET('[1]', '$', 100) +100 +SELECT JSON_SET('[1]', '$[0]', 100); +JSON_SET('[1]', '$[0]', 100) +[100] +SELECT JSON_SET('[1]', '$[0][0]', 100); +JSON_SET('[1]', '$[0][0]', 100) +[100] +SELECT JSON_SET('[1]', '$[0][0][0]', 100); +JSON_SET('[1]', '$[0][0][0]', 100) +[100] +SELECT JSON_SET('[[1]]', '$', 100); +JSON_SET('[[1]]', '$', 100) +100 +SELECT JSON_SET('[[1]]', '$[0]', 100); +JSON_SET('[[1]]', '$[0]', 100) +[100] +SELECT JSON_SET('[[1]]', '$[0][0]', 100); +JSON_SET('[[1]]', '$[0][0]', 100) +[[100]] +SELECT JSON_SET('[[1]]', '$[0][0][0]', 100); +JSON_SET('[[1]]', '$[0][0][0]', 100) +[[100]] +SELECT JSON_SET('[[[1]]]', '$', 100); +JSON_SET('[[[1]]]', '$', 100) +100 +SELECT JSON_SET('[[[1]]]', '$[0]', 100); +JSON_SET('[[[1]]]', '$[0]', 100) +[100] +SELECT JSON_SET('[[[1]]]', '$[0][0]', 100); +JSON_SET('[[[1]]]', '$[0][0]', 100) +[[100]] +SELECT JSON_SET('[[[1]]]', '$[0][0][0]', 100); +JSON_SET('[[[1]]]', '$[0][0][0]', 100) +[[[100]]] +SELECT JSON_REPLACE('1', '$', 100); +JSON_REPLACE('1', '$', 100) +100 +SELECT JSON_REPLACE('1', '$[0]', 100); +JSON_REPLACE('1', '$[0]', 100) +100 +SELECT JSON_REPLACE('1', '$[0][0]', 100); +JSON_REPLACE('1', '$[0][0]', 100) +100 +SELECT JSON_REPLACE('1', '$[0][0][0]', 100); +JSON_REPLACE('1', '$[0][0][0]', 100) +100 +SELECT JSON_REPLACE('[]', '$', 100); +JSON_REPLACE('[]', '$', 100) +100 +SELECT JSON_REPLACE('[]', '$[0]', 100); +JSON_REPLACE('[]', '$[0]', 100) +[] +SELECT JSON_REPLACE('[]', '$[0][0]', 100); +JSON_REPLACE('[]', '$[0][0]', 100) +[] +SELECT JSON_REPLACE('[]', '$[0][0][0]', 100); +JSON_REPLACE('[]', '$[0][0][0]', 100) +[] +SELECT JSON_REPLACE('[1]', '$', 100); +JSON_REPLACE('[1]', '$', 100) +100 +SELECT JSON_REPLACE('[1]', '$[0]', 100); +JSON_REPLACE('[1]', '$[0]', 100) +[100] +SELECT JSON_REPLACE('[1]', '$[0][0]', 100); +JSON_REPLACE('[1]', '$[0][0]', 100) +[100] +SELECT JSON_REPLACE('[1]', '$[0][0][0]', 100); +JSON_REPLACE('[1]', '$[0][0][0]', 100) +[100] +SELECT JSON_REPLACE('[[1]]', '$', 100); +JSON_REPLACE('[[1]]', '$', 100) +100 +SELECT JSON_REPLACE('[[1]]', '$[0]', 100); +JSON_REPLACE('[[1]]', '$[0]', 100) +[100] +SELECT JSON_REPLACE('[[1]]', '$[0][0]', 100); +JSON_REPLACE('[[1]]', '$[0][0]', 100) +[[100]] +SELECT JSON_REPLACE('[[1]]', '$[0][0][0]', 100); +JSON_REPLACE('[[1]]', '$[0][0][0]', 100) +[[100]] +SELECT JSON_REPLACE('[[[1]]]', '$', 100); +JSON_REPLACE('[[[1]]]', '$', 100) +100 +SELECT JSON_REPLACE('[[[1]]]', '$[0]', 100); +JSON_REPLACE('[[[1]]]', '$[0]', 100) +[100] +SELECT JSON_REPLACE('[[[1]]]', '$[0][0]', 100); +JSON_REPLACE('[[[1]]]', '$[0][0]', 100) +[[100]] +SELECT JSON_REPLACE('[[[1]]]', '$[0][0][0]', 100); +JSON_REPLACE('[[[1]]]', '$[0][0][0]', 100) +[[[100]]] +# +# Bug#21828321: JSON FUNCS CALL DBUG_ABORT OR EXIT() ON WINDOWS! +# +SELECT JSON_ARRAY(LEAST(NULL, NULL), GREATEST(NULL, NULL), LEAST(j1, NULL), +GREATEST(NULL, j2), LEAST(j1, j2), GREATEST(j1, j2)) AS j +FROM (SELECT json_compact('1') AS j1, json_compact('2') AS j2) t; +j +[null, null, null, null, "1", "2"] diff --git a/mysql-test/suite/json/t/json_no_table.test b/mysql-test/suite/json/t/json_no_table.test new file mode 100644 index 00000000000..d7b302c98a6 --- /dev/null +++ b/mysql-test/suite/json/t/json_no_table.test @@ -0,0 +1,2288 @@ +########### suite/json/t/json_notable.test # +# Tests json columns functionality that does not need any tables # +# to be defined (no storage engine functionality) # +# # +# This test copies some tests originally in json.test # +###################################################################### + +# Some extra checks for comparisons between positive and negative zero. +# All should be equal. +SELECT JSON_COMPACT(0.0e0) = -0.0e0; +SELECT JSON_COMPACT(CAST(0 AS DECIMAL)) = CAST(-0.0e0 AS DECIMAL); +SELECT JSON_COMPACT(0.0e0) = CAST(-0.0e0 AS DECIMAL); +SELECT JSON_COMPACT(CAST(0 AS DECIMAL)) = -0.0e0; +SELECT JSON_COMPACT(CAST(0 AS SIGNED)) = -0.0e0; +SELECT JSON_COMPACT(CAST(0 AS SIGNED)) = CAST(-0.0e0 AS DECIMAL); +SELECT JSON_COMPACT(CAST(0 AS UNSIGNED)) = -0.0e0; +SELECT JSON_COMPACT(CAST(0 AS UNSIGNED)) = CAST(-0.0e0 AS DECIMAL); + +# Test that CAST string argument isn't treated as ANY_JSON_ATOM +# in that a MySQL string needs to be parsed to JSON here; it is not +# auto-converted to a JSON string as in ANY_JSON_ATOM contexts. +select json_compact('"abc"'); +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +select json_compact('abc'); + +--echo +--echo # String literal - valid JSON +select JSON_VALID('123'); # uint +select JSON_VALID('-123'); # int +select JSON_VALID('5000000000'); # uint64 +select JSON_VALID('-5000000000'); # int64 +select JSON_VALID('1.23'); # double +select JSON_VALID('"123"'); +select JSON_VALID('true'); +select JSON_VALID('false'); +select JSON_VALID('null'); +select JSON_VALID('{"address": "Trondheim"}'); + +--echo +--echo # String literal - not valid JSON +select JSON_VALID('12 3'); + +--echo +--echo # String literal not in UTF-8 +set names 'ascii'; +# auto-convert to utf-8 +select JSON_VALID('123'); + +set names 'utf8'; + +--echo +--echo # Json expression +select JSON_VALID(json_compact('[123]')); + +--echo +--echo # Json expression NULL +select JSON_VALID(json_compact(NULL)); + +--echo +--echo # Bare NULL +select JSON_VALID( NULL ); + +--echo +--echo # Function result - string +select JSON_VALID( UPPER('"abc"') ); + +set names 'latin1'; +--echo +--echo # Function result - string +# auto-convert to utf-8 +select JSON_VALID( UPPER('"abc"') ); + +set names 'utf8'; + +--echo +--echo # Function result - date, not valid as JSON without CAST +select JSON_VALID( CAST('2015-01-15' AS DATE) ); + +--echo +--echo # The date string doesn't parse as JSON text, so wrong: +select JSON_VALID( CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8') ); +--echo # OK, though: +select JSON_VALID( json_compact(CURDATE()) ); + +--echo +--echo # Function result - NULL +select JSON_VALID( UPPER(NULL) ); +select JSON_VALID( UPPER(CAST(NULL as CHAR)) ); + +# examples from wl7909 spec +# returns 1 +SELECT JSON_VALID( '{ "firstName" : "Fred", "lastName" : "Flintstone" }' ); + +# returns 1 +SELECT JSON_VALID( '3' ); + +# returns NULL as IS JSON would +SELECT JSON_VALID( null ); + + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_CONTAINS_PATH function. +--echo # ---------------------------------------------------------------------- + +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_contains_path(); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_contains_path('{ "a": true }' ); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_contains_path('{ "a": true }', 'all' ); +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +select json_contains_path('{ "a": tru }', 'all', '$' ); +--echo error ER_INVALID_JSON_PATH +select json_contains_path('{ "a": true }', 'all', '$[' ); +--echo error ER_INVALID_JSON_PATH +select json_contains_path('{ "a": true }', 'all', '$a.***[3]' ); +--echo error ER_JSON_BAD_ONE_OR_ALL_ARG +select json_contains_path('{ "a": true }', 'foo', '$.a' ); +--echo error ER_INVALID_JSON_CHARSET +select json_contains_path('{}', 'all', cast('$' as binary)); + +select json_contains_path(null, 'all', '$.a' ); +select json_contains_path('{ "a": true }', null, '$.a' ); +select json_contains_path('{ "a": true }', 'all', null ); + +# degenerate path +select json_contains_path('{ "a": true }', 'all', '$' ); + +# positive, one path +select json_contains_path('{ "a": true }', 'all', '$.a' ); +select json_contains_path('{ "a": true }', 'one', '$.a' ); + +# negative, one path +select json_contains_path('{ "a": true }', 'all', '$.b' ); +select json_contains_path('{ "a": true }', 'one', '$.b' ); + +# all +select json_contains_path('{ "a": true }', 'all', '$.a', '$.b' ); +select json_contains_path('{ "a": true }', 'all', '$.b', '$.a' ); +select json_contains_path('{ "a": true }', 'ALL', '$.a', '$.b' ); +select json_contains_path('{ "a": true }', 'aLl', '$.a', '$.b' ); + +# some +select json_contains_path('{ "a": true }', 'one', '$.a', '$.b' ); +select json_contains_path('{ "a": true }', 'one', '$.b', '$.a' ); +select json_contains_path('{ "a": true }', 'ONE', '$.a', '$.b' ); +select json_contains_path('{ "a": true }', 'oNe', '$.a', '$.b' ); + +# some wildcards +select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**[4]' ); +select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**[4]', '$**[5]' ); +select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**.c[2]' ); +select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**.c[3]' ); +select json_contains_path('{"a":1, "b":2}', 'one', '$.*'); +select json_contains_path('[1,2,3]', 'one', '$.*'); +select json_contains_path('{}', 'one', '$[*]'); + +# combine ellipsis and wildcard +SELECT JSON_CONTAINS_PATH('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', + 'one', '$**.a.*'); +SELECT JSON_CONTAINS_PATH('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', + 'all', '$**.a.*'); +SELECT JSON_CONTAINS_PATH('[1,2,3]', 'one', '$**[*]'); +SELECT JSON_CONTAINS_PATH('[1,2,3]', 'all', '$**[*]'); + +# 3 paths +select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$**[1]', '$.b[0]', '$.c' ); +select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$.c', '$**[1]', '$.b[0]' ); +select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$.b[0]', '$.c', '$**[1]' ); +select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$**[1]', '$.b[0]', '$.c' ); +select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$.c', '$**[1]', '$.b[0]' ); +select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$.b[0]', '$.c', '$**[1]' ); + +# examples from the wl7909 spec +# returns 0 because there is no element at $.a.c +SELECT JSON_CONTAINS_PATH +( + '{ "a" : 123, "b" : [ 123, 456 ] }', + 'all', + '$.a.c', + '$.b[1]' +); + +# returns 1 because there is an element at $.b[1] +SELECT JSON_CONTAINS_PATH +( + '{ "a" : 123, "b" : [ 123, 456 ] }', + 'one', + '$.a.c', + '$.b[1]' +); + +# returns 0 because there is no element at the given path +SELECT JSON_CONTAINS_PATH +( + '{ "a" : 123, "b" : [ 123, 456 ] }', + 'all', + '$.c' +); + +# returns 1 because there is an element at $.b[1].c.d +SELECT JSON_CONTAINS_PATH +( + '{ "a" : 123, "b" : [ 123, { "c" : { "d" : true } } ] }', + 'all', + '$.b[1].c.d' +); + +select json_length( null ); +select json_length( '1' ); +--echo +--echo # invalid json text +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +select json_length( 'abc' ); +select json_length( '"abc"' ); +select json_length( 'true' ); +select json_length( 'false' ); +select json_length( 'null' ); + +select json_length( '{}' ); +select json_length( '{ "a" : 100, "b" : 200 }' ); +select json_length( '{ "a" : 100, "b" : [ 300, 400, 500 ] }' ); +select json_length( '[]' ); +select json_length( '[ null, "foo", true, 1.1 ]' ); +select json_length( '[ null, "foo", true, { "a" : "b", "c" : "d" } ]' ); +select json_length( '"foo"' ); +select json_length( '1.2' ); + + +# bad path expressions +--echo +--echo # invalid json path +--echo error ER_INVALID_JSON_PATH +select json_length( 'true', 'c$' ); +--echo +--echo # invalid json path +--echo error ER_INVALID_JSON_PATH +select json_length( '{ "foo" : [ true, false ] }', '$.foo[bar]' ); +--echo +--echo # wildcards not allowed in path expressions for this function +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_length( 'true', '$.*' ); +--echo +--echo # wildcards not allowed in path expressions for this function +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_length( 'true', '$.foo**.bar' ); + +# json_length() with non-vacuous path expressions + +# 1 +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[0]' ); +# 3 +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[1]' ); +# 1 +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2]' ); +# auto-wrapping: 1 +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0]' ); # auto-wrap scalar +select json_length( '[ 1, [ 2, 3, 4 ], {"a": 1} ]', '$[2][0]' ); # ditto object + +# non-existent path: null +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][1]' ); +# 3 +select json_length( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]' ); + +# examples from the wl7909 spec +# returns 0 +SELECT JSON_LENGTH +( + '{}' +); + +# returns 1 +SELECT JSON_LENGTH +( + '3' +); + +# returns 2 +SELECT JSON_LENGTH +( + '{ "a" : 123, "b" : [ 123, 456, 789 ] }' +); + +# returns 3 +SELECT JSON_LENGTH +( + '{ "a" : 123, "b" : [ 123, 456, 789 ] }', + '$.b' +); + +# returns null because the path does not exist +SELECT JSON_LENGTH +( + '{ "a" : 123, "b" : [ 123, 456, 789 ] }', + '$.c' +); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_DEPTH function. +--echo # ---------------------------------------------------------------------- +select json_depth(null); +select json_depth(json_compact(null)); +#select i, json_depth(j) from t1; +select json_depth(json_compact('[]')), + json_depth(json_compact('{}')), + json_depth(json_compact('null')), + json_depth(json_quote('foo')); +select json_depth(json_compact('[[2], 3, [[[4]]]]')); +select json_depth(json_compact('{"a": {"a1": [3]}, "b": {"b1": {"c": {"d": [5]}}}}')); + +# examples from the wl7909 spec +# returns 1 +SELECT JSON_DEPTH +( + '{}' +); + +# returns 1 +SELECT JSON_DEPTH +( + '[]' +); + +# returns 1 +SELECT JSON_DEPTH( '"abc"' ); + +# returns 1 +SELECT JSON_DEPTH( json_compact( '"abc"') ); + +--echo error ER_INVALID_TYPE_FOR_JSON +SELECT JSON_DEPTH( 1 ); + +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_DEPTH( 'abc' ); + +# returns 1 +SELECT JSON_DEPTH( json_compact( 1) ); + +# returns 2 +SELECT JSON_DEPTH +( + '{ "a" : true, "b" : false, "c" : null }' +); + +# returns 2 +SELECT JSON_DEPTH +( + '[ "a", true, "b" , false, "c" , null ]' +); + +# returns 2 +SELECT JSON_DEPTH +( + '{ "a" : true, "b" : {}, "c" : null }' +); + +# returns 2 +SELECT JSON_DEPTH +( + '[ "a", true, "b" , {}, "c" , null ]' +); + +# returns 3 +SELECT JSON_DEPTH +( + '{ "a" : true, "b" : { "e" : false }, "c" : null }' +); + +# returns 3 +SELECT JSON_DEPTH +( + '[ "a", true, "b" , { "e" : false }, "c" , null ]' +); + +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_DEPTH +( + '[ "a", true, "b" , { "e" : false }, "c" , null' +); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_REMOVE function. +--echo # ---------------------------------------------------------------------- + +# null args +select json_remove( null, '$[1]' ); +select json_remove( null, '$[1]' ) is null; +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ); +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null; +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', null ); +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', null ) is null; + +# too few args + +--echo +--echo # not enough args +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_remove(); +--echo +--echo # not enough args +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]' ); +--echo +--echo # not enough args +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_remove( '$[1]' ); + +# malformed args +--echo +--echo # invalid json text +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ', '$[1]', '$[2]' ); +--echo +--echo # invalid json path +--echo error ER_INVALID_JSON_PATH +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1', '$[2]' ); +--echo +--echo # invalid json path +--echo error ER_INVALID_JSON_PATH +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', '$[2' ); +--echo +--echo # Vacuous path expression +--echo error ER_JSON_VACUOUS_PATH +select json_remove( '[ 1, 2, 3 ]', '$' ); +--echo +--echo # Vacuous path expression +--echo error ER_JSON_VACUOUS_PATH +select json_remove( '[ 1, 2, 3 ]', '$', '$[2]' ); +--echo +--echo # Vacuous path expression +--echo error ER_JSON_VACUOUS_PATH +select json_remove( '[ 1, 2, 3 ]', '$[1]', '$' ); + +# wildcard/ellipsis not allowed in paths +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_remove( '[ 1, 2, 3 ]', '$[*]' ); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_remove( '[ 1, 2, 3 ]', '$**[2]' ); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_remove( '[ 1, 2, 3 ]', '$[2]', '$[*]' ); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_remove( '[ 1, 2, 3 ]', '$[2]', '$**[2]' ); + +# simple matches + +select json_remove( '[ 1, 2, 3 ]', '$[0]' ); +select json_remove( '[ 1, 2, 3 ]', '$[1]' ); +select json_remove( '[ 1, 2, 3 ]', '$[2]' ); +select json_remove( '[ 1, 2, 3 ]', '$[3]' ); +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]' ); + +# one match nested inside another +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_remove( '[ { "a": { "a": true } } ]', '$**.a' ); + +# multiple paths +select json_remove( '[ { "a": true }, { "b": false }, { "c": null }, { "a": null } ]', '$[0].a', '$[2].c' ); + +# ellipsis with matches at different levels +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_remove( '[ { "a": true }, { "b": [ { "c": { "a": true } } ] }, { "c": null }, { "a": null } ]', '$**.a' ); + +# nonsense path +select json_remove( '{"id": 123, "name": "systemQA", "array": [1, 2, 3]}', '$[0]' ); + +# examples from wl7909 spec +# returns the document {"a": "foo", "b": [true]} +SELECT JSON_REMOVE +( + '{"a" : "foo", "b" : [true, {"c" : 123}]}', + '$.b[ 1 ]' +); + +# returns {"a": "foo", "b": [true, {}]} due to normalization +SELECT JSON_REMOVE +( + '{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', + '$.b[ 1 ].c' +); + +# returns {"a": "foo", "b": [true, {}]} +SELECT JSON_REMOVE +( + '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', + '$.b[ 1 ].c' +); + +# returns the original document because the path doesn't identify an element +SELECT JSON_REMOVE +( + '{ "a" : "foo", "b" : [ true, { "c" : 123, "d" : 456 } ] }', + '$.b[ 1 ].e' +); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_MERGE function. +--echo # ---------------------------------------------------------------------- + +--echo +--echo # not enough args +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_merge(); +--echo +--echo # not enough args +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_merge( '[ 1, 2, 3 ]' ); + +# null args result in NULL value +select json_merge( null, null ); +select json_merge( null, '[ 1, 2, 3 ]' ); +select json_merge( '[ 1, 2, 3 ]', null ); +select json_merge( null, '[ 1, 2, 3 ]', '[ 4, 5, 6 ]' ); +select json_merge( '[ 1, 2, 3 ]', null, '[ 4, 5, 6 ]' ); +select json_merge( '[ 1, 2, 3 ]', '[ 4, 5, 6 ]', null ); + +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +select json_merge( '[1, 2]', '[3, 4' ); +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +select json_merge( '[1, 2', '[3, 4]' ); + +# good json_merge() expressions +select json_merge( '1', '2' ); +select json_merge( '1', '[2, 3]' ); +select json_merge( '[1, 2]', '3' ); +select json_merge( '1', '{ "a": 2 }' ); +select json_merge( '{ "a": 2 }', '1' ); +select json_merge( '[1, 2]', '[3, 4]' ); +select json_merge( '{ "a": 2 }', '{ "b": 3}' ); +select json_merge( '[1, 2]', '{ "a": 2 }' ); +select json_merge( '{ "a": 2 }', '[1, 2]' ); + +select json_merge( '{"a": 1, "b": 2 }', '{"b": 3, "d": 4 }' ); +select json_merge( '{"a": 1, "b": 2 }', '{"b": [3, 4], "d": 4 }' ); +select json_merge( '{"a": 1, "b": [2, 3] }', '{"b": 4, "d": 4 }' ); +select json_merge( '{"a": 1, "b": 2 }', '{"b": {"e": 7, "f": 8}, "d": 4 }' ); +select json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{"a": 1, "b": 2 }' ); +select json_merge( '{"a": 1, "b": [2, 9] }', '{"b": [10, 11], "d": 4 }' ); +select json_merge( '{"a": 1, "b": [2, 9] }', '{"b": {"e": 7, "f": 8}, "d": 4 }' ); +select json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{"a": 1, "b": [2, 9] }' ); +select json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{ "a": 1, "b": {"e": 20, "g": 21 } }' ); + +select json_merge( '1', '2', '3' ); +select json_merge( '[1, 2 ]', '3', '[4, 5]' ); +select json_merge +( + '{ "a": true, "b": { "c": 3, "d": 4 }, "e": [ 1, 2 ] }', + '{ "d": false, "b": { "g": 3, "d": 5 }, "f": [ 1, 2 ] }', + '{ "m": true, "b": { "h": 8, "d": 4 }, "e": [ 3, 4 ] }' +); + +# examples from the wl7909 spec +# returns [{"a": "foo", "b": [true, {"c": 123}]}, 5, 6] +SELECT JSON_MERGE +( + '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', + '[ 5, 6]' +); + +# returns {"a": "foo", "b": [true, {"c": 123}, false, 34]} +SELECT JSON_MERGE +( + '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', + '{ "b": [ false, 34 ] }' +); + +# returns {"a": "foo", "b": [true, {"c": 123}, "bar"]} +SELECT JSON_MERGE +( + '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', + '{ "b": "bar" }' +); + +# returns {"a": {"b": 1, "c": 1}} +SELECT JSON_MERGE +( + '{ "a" : { "b" : 1 } }', + '{ "a" : { "c" : 1 } }' +); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_TYPE function. +--echo # ---------------------------------------------------------------------- + +# negative test +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +select json_type('abc'); + +#select i, json_type(j) from t1; +select json_type('{"a": 2}'); +select json_type('[1,2]'); +select json_type('"scalar string"'); +select json_type('true'); +select json_type('false'); +select json_type('null'); +select json_type('1'); +select json_type('-0'); +select json_type('-0.0'); +--echo error ER_INVALID_TYPE_FOR_JSON +select json_type(-1); +--echo error ER_INVALID_TYPE_FOR_JSON +select json_type(CAST(1 AS UNSIGNED)); +select json_type('32767'); +--echo error ER_INVALID_TYPE_FOR_JSON +select json_type(PI()); +select json_type('3.14'); + +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +select json_type(CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8')); + +--echo # ---------------------------------------------------------------------- +--echo # Test of json_compact(literal) +--echo # ---------------------------------------------------------------------- +select json_type(json_compact(cast('2014-11-25 18:00' as datetime))); +select json_type(json_compact(cast('2014-11-25' as date))); +select json_type(json_compact(cast('18:00:59' as time))); +# select json_type(json_compact(cast('2014-11-25 18:00' as timestamp))); -- cast target type not supported + +# select json_type(json_compact(cast('1999' as year))); -- cast target type not supported +select json_type(json_compact(127)); +select json_type(json_compact(255)); +select json_type(json_compact(32767)); +select json_type(json_compact(65535)); +select json_type(json_compact(8388607)); +select json_type(json_compact(16777215)); +select json_type(json_compact(2147483647)); +select json_type(json_compact(4294967295)); +select json_type(json_compact(9223372036854775807)); +select json_type(json_compact(18446744073709551615)); +select json_type(json_compact(true)); +select json_type(json_compact(b'10101')); + +select json_type(json_compact(cast(3.14 as decimal(5,2)))); +select json_type(json_compact(3.14)); +select json_type(json_compact(3.14E30)); +# select json_type(json_compact(cast(3.14 as numeral(5,2)))); -- cast target type not supported + +# select json_type(json_compact(cast(3.14 as double))); -- cast target type not supported +# select json_type(json_compact(cast(3.14 as float))); -- cast target type not supported + +# select json_type(json_compact(cast(b'10101' as bit(10)))); -- cast target type not supported +# select json_type(json_compact(cast('10101abcde' as blob))); -- cast target type not supported +select json_type(json_compact(cast('10101abcde' as binary))); + +# select json_type(json_compact(cast('a' as enum('a','b','c')))); -- cast target type not supported +# select json_type(json_compact(cast('a,c' as set('a','b','c')))); -- cast target type not supported + +select json_type(json_compact(ST_GeomFromText('POINT(1 1)'))); +select json_type(json_compact(ST_GeomFromText('LINESTRING(0 0,1 1,2 2)'))); +select json_type(json_compact(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0), + (5 5,7 5,7 7,5 7, 5 5))'))); +select json_type(json_compact(null)); +select json_type(json_compact(null)) is null; # check that it is an SQL NULL +select json_type(null) is null; # is an SQL NULL + +# +# same, but now show the printable value: +# +select json_compact(cast('2014-11-25 18:00' as datetime)); +select json_compact(cast('2014-11-25' as date)); +select json_compact(cast('18:00:59' as time)); +# select json_compact(cast('2014-11-25 18:00' as timestamp)); -- cast target type not supported + +# select json_compact(cast('1999' as year)); -- cast target type not supported +select json_compact(127); +select json_compact(255); +select json_compact(32767); +select json_compact(65535); +select json_compact(8388607); +select json_compact(16777215); +select json_compact(2147483647); +select json_compact(4294967295); +select json_compact(9223372036854775807); +select json_compact(18446744073709551615); +select json_compact(true); +select json_compact(b'10101'); + +select json_compact(cast(3.14 as decimal(5,2))); +select json_compact(3.14); +select json_compact(3.14e0); +# select json_compact(cast(3.14 as numeral(5,2))); -- cast target type not supported + +# select json_compact(cast(3.14 as double)); -- cast target type not supported +# select json_compact(cast(3.14 as float)); -- cast target type not supported + +# select json_compact(cast(b'10101' as bit(10)); -- cast target type not supported +# select json_compact(cast('10101abcde' as blob)); -- cast target type not supported +select json_compact(cast('10101abcde' as binary)); + +# select json_compact(cast('a' as enum('a','b','c')); -- cast target type not supported +# select json_compact(cast('a,c' as set('a','b','c')); -- cast target type not supported + +select json_compact(ST_GeomFromText('POINT(1 1)')); +select json_compact(ST_GeomFromText('LINESTRING(0 0,1 1,2 2)')); +select json_compact(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0), + (5 5,7 5,7 7,5 7, 5 5))')); +select json_compact(null); +select json_compact(null) is null; # check that it is an SQL NULL + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_KEYS function. +--echo # ---------------------------------------------------------------------- +# should all give NULL: +select json_keys(NULL); +select json_keys(NULL, '$.b'); +select json_keys(NULL, NULL); +select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a'); +select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', NULL); + +# non NULL results +select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}'); +select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.b'); + +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.*.b'); + +# Examples from the specification +--echo # returns [ "a", "b" ] +SELECT JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }'); + +--echo # returns [] +SELECT JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : {} } ] }', + '$.b[1].c'); + +--echo # returns NULL +SELECT JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : {} } ] }', + '$.a.b[2]'); + +--echo error ER_INVALID_JSON_PATH +SELECT JSON_KEYS('{"a":1}', '1010'); +--echo error ER_INVALID_JSON_PATH +SELECT JSON_KEYS('{"a":1}', '1010') IS NULL; + +# examples from the wl7909 spec +# returns [ "a", "b" ] +SELECT JSON_KEYS +( + '{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }' +); + +# returns [] +SELECT JSON_KEYS +( + '{ "a" : "foo", "b" : [ true, { "c" : {} } ] }', + '$.b[1].c' +); + +# returns NULL +SELECT JSON_KEYS +( + '{ "a" : "foo", "b" : [ true, { "c" : {} } ] }', + '$.a.b[2]' +); + +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +SELECT JSON_KEYS(); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +SELECT JSON_KEYS('{}', '$', '$'); + +--echo # ---------------------------------------------------------------------- +--echo # CAST( AS CHAR). See also 'json_conversions.test' for other +--echo # conversion tests. +--echo # ---------------------------------------------------------------------- +select cast(json_keys('{"a": 1}') as char); +select cast(json_compact(1) as char); +select cast(json_keys(NULL) as char); +#select cast(j as char) from keys1; + +--echo # ---------------------------------------------------------------------- +--echo # Path matching with double-quotes +--echo # ---------------------------------------------------------------------- + +# matches +select json_extract( '{ "one potato" : 1 }', '$."one potato"' ); +# matches +select json_extract( '{ "a.b" : 1 }', '$."a.b"' ); + +# doesn't match +select json_extract( '{ "\\"a\\"": 1}', '$."a"' ); +# matches +select json_extract( '{ "\\"a\\"": 1}', '$."\\"a\\""' ); +# matches +select json_extract( '{ "a": 1}', '$."a"' ); +# matches +select json_extract( '{ "a": 1}', '$.a' ); + +# examples from functional spec section on Path Syntax + +# [3, 2] +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[0]' ); +# 2 +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[0][1]' ); +# [ { "c": "d" }, 1 ] +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1]' ); +# { "c": "d" } +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1][0]' ); +# "d" +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1][0].c' ); +# 7 +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$."one potato"' ); +# 6 +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.b.c' ); +# 8 +select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$."b.c"' ); + + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_EXTRACT function. +--echo # ---------------------------------------------------------------------- + +# errors +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_extract(NULL); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_extract('$.b'); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}'); + +# Confused argument order +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +select json_extract('$.a', '{"a": 1, "b": {"e": "foo", "b": 3}}'); + +# NULLs +select json_extract(NULL, '$.b'); +select json_extract(NULL, NULL); + +# non-NULLs +select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a'); +select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.*'); +select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a', '$.b.e'); +select json_extract('{"a": 1, "b": [1,2,3]}', '$.b[2]'); +# one path is NULL +select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a', NULL); + +# Examples from the specification +--echo # returns a JSON value containing just the string "123" +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }', + '$.b[ 1 ].c'); + +--echo # returns a JSON value containing just the number 123 +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', + '$.b[ 1 ].c'); + +--echo # raises an error because the document is not valid +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_EXTRACT('{ "a" : [ }', + '$.b[ 1 ].c'); + +--echo # raises an error because the path is invalid +--echo error ER_INVALID_JSON_PATH +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', + '$.b[ 1 ].'); + +--echo # returns a JSON value containing the number 123 (because of +--echo # auto-wrapping the scalar) +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', + '$.b[ 1 ].c[ 0 ]'); +--echo # returns a JSON value containing the object because of auto-wrapping +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : {"not array": 4} } ] }', + '$.b[ 1 ].c[ 0 ]'); + +--echo # returns null because the path, although valid, does not identify a value +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', + '$.b[ 1 ].c[ 1 ]'); + +--echo # returns a JSON value containing the number 123 (due to normalization) +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', + '$.b[ 1 ].c'); + +--echo # returns a JSON array [ "foo", true ] +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', + '$.a', '$.b[0]'); + +--echo # returns a JSON array [ true ] +SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', + '$.d', '$.b[0]'); + +# some examples verifying ellipsis behavior + +# should have same result +select json_extract( '[1]', '$[0][0]' ); +select json_extract( '[1]', '$**[0]' ); + +# should have same result +select json_extract( '{ "a": 1 }', '$.a[0]' ); +select json_extract( '{ "a": 1 }', '$**[0]' ); + +# should have same result +select json_extract( '{ "a": 1 }', '$[0].a' ); +select json_extract( '{ "a": 1 }', '$**.a' ); + +# should have same result +select json_extract( '{ "a": 1 }', '$[0].a[0]' ); +select json_extract( '{ "a": 1 }', '$**[0]' ); + +# should have the same result +select json_extract( '{ "a": 1 }', '$[0].a' ); +select json_extract( '{ "a": 1 }', '$**.a' ); +select json_extract( '{ "a": 1 }', '$[0][0].a' ); +select json_extract( '{ "a": 1 }', '$[0][0][0].a' ); + +# should have the same result +SELECT JSON_EXTRACT('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', '$**.a.*'); +SELECT JSON_EXTRACT('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', + '$[1][0][0].x[0].a.*'); + +# examples from the wl7909 spec +# returns a JSON value containing just the string "123" +SELECT JSON_EXTRACT +( + '{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }', + '$.b[ 1 ].c' +); + +# returns a JSON value containing just the number 123 +SELECT JSON_EXTRACT +( + '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', + '$.b[ 1 ].c' +); + +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_EXTRACT +( + '{ "a" : [ }', + '$.b[ 1 ].c' +); + +--echo error ER_INVALID_JSON_PATH +SELECT JSON_EXTRACT +( + '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', + '$.b[ 1 ].' +); + +# returns a JSON value containing the number 123 (because of auto-wrapping) +SELECT JSON_EXTRACT +( + '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', + '$.b[ 1 ].c[ 0 ]' +); + +# returns null because the path, although valid, does not identify a value +SELECT JSON_EXTRACT +( + '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }', + '$.b[ 1 ].c[ 1 ]' +); + +# returns a JSON value containing the number 123 (due to normalization) +SELECT JSON_EXTRACT +( + '{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', + '$.b[ 1 ].c' +); + +# returns a JSON array ["foo", true] +SELECT JSON_EXTRACT +( + '{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', + '$.a', '$.b[0]' +); + +# returns a the 'true' literal +SELECT JSON_EXTRACT +( + '{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }', + '$.d', '$.b[0]' +); + +# should return NULL +select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[*].b' ) jdoc; + +# should return NULL +select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[0].b' ) jdoc; + +# should return 1 +select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[0].a' ) jdoc; + +# should return [1, 2] +select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[*].a' ) jdoc; + +# should return [1] +select json_extract( '[ { "a": 1 }, { "b": 2 } ]', '$[*].a' ) jdoc; + +# should return [3, 4] +select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[0].a' ) jdoc; + +# should return [[3, 4]] +select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[*].a' ) jdoc; + +# should return [[3, 4]] +select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[0].a', '$[1].a' ) jdoc; + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_ARRAY_APPEND function. +--echo # ---------------------------------------------------------------------- + +# NULLs +select json_array_append(NULL, '$.b', json_compact(1)); +select json_array_append('[1,2,3]', NULL, json_compact(1)); +select json_array_append('[1,2,3]', '$', NULL); + +# wrong # args +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_array_append(NULL); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_array_append(NULL, NULL); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_array_append(NULL, NULL, NULL, NULL); + +# auto-wrap +SELECT JSON_ARRAY_APPEND(json_compact('1'), '$', 3); +SELECT JSON_ARRAY_APPEND(json_compact('{"a": 3}'), '$', 3); + +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_array_append(json_compact('{"a": {"b": [3]}}'), '$**[0]', 6); + +# Examples from the specification + +--echo # Auto-wrapping, since because the paths identify scalars. +--echo # should return {"a": "foo", "b": ["bar", 4], "c": ["wibble", "grape"]} +SELECT JSON_ARRAY_APPEND('{"a": "foo", "b": "bar", "c": "wibble"}', + '$.b', json_compact(4), + '$.c', json_compact('"grape"')); + +--echo # should return {"a": "foo", "b": [1, 2, 3, 4], +--echo # "c": ["apple", "pear", "grape"]} +SELECT JSON_ARRAY_APPEND('{"a" : "foo","b": [1, 2, 3], "c": ["apple", "pear"]}', + '$.b', json_compact(4), + '$.c', json_compact('"grape"')); + +# without CAST: cf. not required for ANY_JSON_ATOM arguments in specification +SELECT JSON_ARRAY_APPEND('{"a" : "foo","b": [1, 2, 3], "c": ["apple", "pear"]}', + '$.b', 4, + '$.c', 'grape'); + +# wild cards, multiple pairs +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_array_append( '[[], [], []]', '$[*]', 3, '$[*]', 4); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_array_append( '[[], "not array", []]', '$[*]', 3, '$[*]', 4); + +# examples from wl7909 spec +# should return {"a": "foo", "b": ["bar", 4], "c": ["wibble", "grape"]} due to autowrapping +SELECT JSON_ARRAY_APPEND +( + '{ "a" : "foo", "b" : "bar", "c" : "wibble" }', + '$.b', 4, + '$.c', "grape" +); + +# should return {"a": "foo", "b": [1, 2, 3, 4], "c": ["apple", "pear", "grape"]} +SELECT JSON_ARRAY_APPEND +( + '{ "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ "apple", "pear" ] }', + '$.b', 4, + '$.c', "grape" +); + +--echo # ---------------------------------------------------------------------- +--echo # Bug#21373874 ASSERTION `PARENT' FAILED +--echo # ---------------------------------------------------------------------- + +select json_array_append('{"a":1}', '$[0]', 100); +select json_array_append('3', '$[0]', 100); +select json_array_append('3', '$[0][0][0][0]', 100); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_INSERT function. +--echo # ---------------------------------------------------------------------- + +# NULLs +select json_insert(NULL, '$.b', json_compact(1)); +select json_insert('[1,2,3]', NULL, json_compact(1)); +select json_insert('[1,2,3]', '$[3]', NULL); + +# wrong # args +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_insert(NULL); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_insert(NULL, NULL); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_insert(NULL, NULL, NULL, NULL); + +# positive test cases + +select json_insert('[1,2,3]', '$[2]', 4); +select json_insert('[1,2,3]', '$[3]', 4); +select json_insert('[1,2,3]', '$[10]', 4); + +select json_insert('{"c":4}', '$.c', 4); +select json_insert('{"c":4}', '$.a', 4); + +select json_insert('1', '$', 4); +select json_insert('1', '$[0]', 4); +select json_insert('1', '$[1]', 4); +select json_insert('1', '$[10]', '4', '$[11]', 5); + +select json_insert('[1,2,3]', '$[2][0]', 4); +select json_insert('[1,2,3]', '$[2][2]', 4); + +select json_insert('{"a": 3}', '$.a[0]', 4); +select json_insert('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5'); + +# wild card & auto-wrap (scalars) +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('{"a": [1], "b": 2}'), '$.*[1]', 6); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('{"a": 1, "b": 2}'), '$.*[1]', 6); + +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('{"a": {"b": 3}}'), '$.a.*[1]', 6); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('{"a": {"b": [3]}}'), '$.a.*[1]', 6); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('{"a": {"b": 3}}'), '$**[1]', 6); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('{"a": {"b": [3]}}'), '$**[1]', 6); + +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('[1]'), '$[*][1]', 6); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('[1]'), '$**[1]', 6); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('[1, [2], 3]'), '$[*][1]', 6); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('[1, [2], 3]'), '$**[1]', 6); + +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('[[1]]'), '$[*][1]', 6); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert(json_compact('[[1]]'), '$**[1]', 6); + +# auto-wrap object +select json_insert(json_compact('{"a": 3}'), '$[1]', 6); + + +# Examples from the specification + +# returns the original document because the path does exist +SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a', true); + +# inserts a number, returns '{ "a" : "foo", "b" : [ 1, 2, 3 ], "c" : 123 } +SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', 123); + +# inserts a string, returns '{ "a" : "foo", "b" : [ 1, 2, 3 ], "c" : "123" } +SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', '123'); + +# returns '{ "a" : [ "foo", true ], "b" : [ 1, 2, 3 ] }' +SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a[1]', true); + +# should return { "a" : "foo", "b": true } +SELECT JSON_INSERT('{ "a" : "foo"}', '$.b', true, '$.b', false); + +# examples from the wl7909 spec +# returns the original document because the path does exist +SELECT JSON_INSERT +( + '{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.a', + true +); + +# inserts a number, returns '{"a": "foo", "b": [1, 2, 3], "c": 123} +SELECT JSON_INSERT +( + '{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.c', + 123 +); + +# inserts a string, returns '{"a": "foo", "b": [1, 2, 3], "c": "123"} +SELECT JSON_INSERT +( + '{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.c', + '123' +); + +# returns '{"a": ["foo", true], "b": [1, 2, 3]}' +SELECT JSON_INSERT +( + '{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.a[1]', + true +); + +# returns {"a": "foo", "b": true} +SELECT JSON_INSERT +( + '{ "a" : "foo"}', + '$.b', true, + '$.b', false +); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_ARRAY_INSERT function. +--echo # ---------------------------------------------------------------------- + +# NULLs +select json_array_insert(NULL, '$.b[1]', 1); +select json_array_insert('[1,2,3]', NULL, 1); +select json_array_insert('[1,2,3]', '$[3]', NULL); + +# wrong # args +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_array_insert(NULL); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_array_insert(NULL, NULL); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_array_insert(NULL, NULL, NULL, NULL); + +# path does not indicate a cell position +--echo error ER_INVALID_JSON_PATH_ARRAY_CELL +select json_array_insert('true', '$', 1); +--echo error ER_INVALID_JSON_PATH_ARRAY_CELL +select json_array_insert('true', '$.a', 1); +--echo error ER_INVALID_JSON_PATH_ARRAY_CELL +select json_array_insert('true', '$.a[1].b', 1); + +# nop if there is no array at the path's parent +select json_array_insert( 'true', '$[0]', false ); +select json_array_insert( 'true', '$[1]', false ); +select json_array_insert( '{ "a": true }', '$.a[0]', false ); +select json_array_insert( '{ "a": true }', '$.a[1]', false ); + +# positive tests +select json_array_insert( '[]', '$[0]', false ); +select json_array_insert( '[]', '$[1]', false ); +select json_array_insert( '[true]', '$[0]', false ); +select json_array_insert( '[true]', '$[1]', false ); +select json_array_insert( '[true]', '$[2]', false ); +select json_array_insert( '{ "a": [] }', '$.a[0]', false ); +select json_array_insert( '{ "a": [] }', '$.a[1]', false ); +select json_array_insert( '{ "a": [true] }', '$.a[0]', false ); +select json_array_insert( '{ "a": [true] }', '$.a[1]', false ); +select json_array_insert( '{ "a": [true] }', '$.a[2]', false ); + +# insert into the middle of an array +select json_array_insert( '[1, 2, 3, 4]', '$[0]', false ); +select json_array_insert( '[1, 2, 3, 4]', '$[1]', false ); +select json_array_insert( '[1, 2, 3, 4]', '$[2]', false ); +select json_array_insert( '[1, 2, 3, 4]', '$[3]', false ); +select json_array_insert( '[1, 2, 3, 4]', '$[4]', false ); +select json_array_insert( '[1, 2, 3, 4]', '$[5]', false ); + +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[0]', false ); +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[1]', false ); +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[2]', false ); +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[3]', false ); +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[4]', false ); +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[5]', false ); + +# nop +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.b[0]', false ); +select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.b[1]', false ); + +# no auto-wrapping +select json_array_insert( '"a"', '$[0]', true ); +select json_array_insert( '[ "a" ]', '$[0][0]', true ); +select json_array_insert( '"a"', '$[1]', true ); + +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert('[]', '$.a.*[1]', 6); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert('[]', '$**[1]', 6); +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_insert('[]', '$[*][1]', 6); + +# multiple paths, +select json_array_insert( '[ 1, 2, 3 ]', '$[1]', true, '$[1]', false ); +select json_array_insert( '[ 1, 2, 3 ]', '$[1]', + json_compact( '[ "a", "b", "c", "d" ]'), '$[1][2]', false ); + +# test an error while evaluating the document expression +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_ARRAY_INSERT(JSON_EXTRACT('[1', '$'), '$[0]', 1); + +# error in reading new value +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +select json_array_insert( '[ 1, 2, 3 ]', '$[1]', json_extract( '[', '$' ) ); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_SET function. +--echo # ---------------------------------------------------------------------- + +# NULLs +select json_set(NULL, '$.b', json_compact(1)); +select json_set('[1,2,3]', NULL, json_compact(1)); +select json_set('[1,2,3]', '$[3]', NULL); + +# wrong # args +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_set(NULL); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_set(NULL, NULL); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_set(NULL, NULL, NULL, NULL); + +# Detect errors in nested function calls. +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_SET('{}', '$.name', JSON_EXTRACT('', '$')); + +# positive test cases + +select json_set('[1,2,3]', '$[2]', 4); +select json_set('[1,2,3]', '$[3]', 4); +select json_set('[1,2,3]', '$[10]', 4); + +select json_set('{"c":4}', '$.c', 5); +select json_set('{"c":4}', '$.a', 5); + +select json_set('1', '$', 4); +select json_set('1', '$[0]', 4); +select json_set('1', '$[1]', 4); +select json_set('1', '$[10]', '4', '$[11]', 5); + +select json_set('[1,2,3]', '$[2][0]', 4); +select json_set('[1,2,3]', '$[2][2]', 4); + +select json_set('{"a": 3}', '$.a[0]', 4); +select json_set('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5'); + +# auto-wrap plus ellipsis with nested hits should give: {"a": [{"b": [3, 6]}, 6]} +--echo error ER_INVALID_JSON_PATH_WILDCARD +select json_set(json_compact('{"a": {"b": [3]}}'), '$**[1]', 6); + +# Examples from the specification: Include when missing functions are +# available. + +# returns { "a" : {}, "b" : [ 1, 2, 3 ] } + SELECT JSON_SET('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.a', + JSON_OBJECT()); + +# # returns { "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ true, false ] } +# SELECT JSON_SET('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +# '$.c', +# JSON_ARRAY( true, false )); + +# # returns { "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ true, false ] } +# SELECT JSON_SET('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', +# '$.c', +# JSON_ARRAY( json_compact( 'true'), json_compact( 'false') )); + +# # returns [ 1, null, null, 2 ] +# SELECT JSON_SET('1', '$[3]', 2); + +# should return { "a": { "b": false, "c": true } } +SELECT JSON_SET('{ "a" : "foo"}', '$.a', + JSON_OBJECT( 'b', false ), '$.a.c', true); + +# returns { "a" : {}, "b" : [ 1, 2, 3 ] } +select json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.a', + json_compact('{}')); + +# returns { "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ true, false ] } +select json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.c', + json_compact('[true, false]')); + +# returns [ 1, null, null, 2 ] +select json_set('1', '$[3]', 2); + +# should return { "a": { "b": false, "c": true } } +select json_set('{ "a" : "foo"}', '$.a', + json_compact('{"b": false}'), '$.a.c', true); + +# examples from wl7909 spec +# returns {"a": {}, "b": [1, 2, 3]} +SELECT JSON_SET +( + '{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.a', + JSON_OBJECT() +); + +# returns {"a": "foo", "b": [1, 2, 3], "c": [true, false]} +SELECT JSON_SET +( + '{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.c', + JSON_ARRAY( true, false ) +); + +# returns {"a": "foo", "b": [1, 2, 3], "c": [true, false]} +SELECT JSON_SET +( + '{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.c', + JSON_ARRAY( json_compact( 'true'), json_compact( 'false') ) +); + +# returns [1, 2] +SELECT JSON_SET +( + '1', + '$[3]', + 2 +); + +# returns {"a": {"b": false, "c": true}} +SELECT JSON_SET +( + '{ "a" : "foo"}', + '$.a', JSON_OBJECT( 'b', false ), + '$.a.c', true +); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_REPLACE function. +--echo # ---------------------------------------------------------------------- + +# NULLs +select json_replace(NULL, '$.b', json_compact(1)); +select json_replace('[1,2,3]', NULL, json_compact(1)); +select json_replace('[1,2,3]', '$[2]', NULL); + +# wrong # args +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_replace(NULL); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_replace(NULL, NULL); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_replace(NULL, NULL, NULL, NULL); + +# positive test cases + +select json_replace('[1,2,3]', '$[2]', 4); +select json_replace('[1,2,3]', '$[3]', 4); +select json_replace('[1,2,3]', '$[10]', 4); + +select json_replace('{"c":4}', '$.c', 5); +select json_replace('{"c":4}', '$.a', 5); + +select json_replace('1', '$', 4); +select json_replace('1', '$[0]', 4); +select json_replace('1', '$[1]', 4); +select json_replace('1', '$[10]', '4', '$[11]', 5); + +select json_replace('[1,2,3]', '$[2][0]', 4); +select json_replace('[1,2,3]', '$[2][2]', 4); + +select json_replace('{"a": 3}', '$.a[0]', 4); +select json_replace('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5'); + + +# Examples from the specification + +# returns the original document because the path doesn't exist +SELECT JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.c', + true); + +# returns '{ "a" : true, "b" : [ 1, 2, 3 ] }' +SELECT JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.a[0]', + true); + +# returns the original document because the path doesn't exist +SELECT JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', + '$.b[5]', + true); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_ARRAY function. +--echo # ---------------------------------------------------------------------- + +# NULLs +select json_array(NULL, '$.b', json_compact(1)); +select json_array('[1,2,3]', NULL, json_compact(1)); +select json_array('[1,2,3]', '$[3]', NULL); + + +# positive test cases +select json_array(); +select json_array(3.14); +select json_array('[1,2,3]'); +select json_array(json_compact('[1,2,3]')); +select json_array(1,2,3); +select json_array(b'0', b'1', b'10'); + +# returns the empty array: [] +SELECT JSON_ARRAY(); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_OBJECT function. +--echo # ---------------------------------------------------------------------- + +# odd number of args +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_object( 'a' ); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_object( 'a', 1, 'b' ); + +# null arg +--echo error ER_JSON_DOCUMENT_NULL_KEY +select json_object( null, 1 ); + +# positive tests +select json_object(); +select json_object( 'a', null ); +select json_object( 'a', 1 ); +select json_object( 'a', 1, 'b', 'foo' ); +select json_object( 'a', 1, 'b', 'foo', 'c', json_compact( '{ "d": "wibble" }') ); +select json_object( 'a', true, 'b', false, 'c', json_compact( 'null') ); +select json_valid( json_object( '"a"', 1 ) ); + +# long key +select json_object( REPEAT('a', 64 * 1024), 1 ); + +# non-string keyNames are cast to CHAR +select json_object(json_array(), json_array()); +select json_object( cast(json_array() as char), json_array()); + +select json_object( 1, json_array()); +select json_object( cast(1 as char), json_array()); + +# returns the empty object: {} +SELECT JSON_OBJECT(); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_SEARCH function. +--echo # ---------------------------------------------------------------------- + +# wrong number of args +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_search(); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_search( '{ "a": true }' ); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_search( '{ "a": true }', 'one' ); + +# null args +select json_search( null, 'one', 'foo' ); +select json_search( '{ "a": "foo" }', null, 'foo' ); +# FIXME. what should happen here? +#select json_search( '{ "a": "foo" }', 'one', null ); +select json_search( '{ "a": "foo" }', 'one', 'foo', null, null ); +select json_search( '{ "a": "foo" }', 'one', 'foo', null, '$.a', null ); + +# bad values for the oneOrAll arg +--echo error ER_JSON_BAD_ONE_OR_ALL_ARG +select json_search( '{ "a": "foo" }', 'twof', 'foo' ); +--echo error ER_JSON_BAD_ONE_OR_ALL_ARG +select json_search( '{ "a": "foo" }', 'two', 'foo' ); + +# bad escape arg +--error ER_WRONG_ARGUMENTS +select json_search( '{ "a": "foo" }', 'one', 'foo', 'ab' ); + +# bad path args +--echo error ER_INVALID_JSON_PATH +select json_search( '{ "a": "foo" }', 'one', 'foo', null, '$a' ); +--echo error ER_INVALID_JSON_PATH +select json_search( '{ "a": "foo" }', 'all', 'foo', null, '$.a', '$b' ); + +--error ER_BAD_FIELD_ERROR +select json_search(a, b, c); + +# simple tests for search without path arguments +select json_search( '{ "a": "foobar" }', 'one', 'foo%' ); +select json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'one', 'foo%' ); +select json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'all', 'foo%' ); +select json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'all', 'f__us' ); + +select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'all', 'foo%', null, '$.a' ); +select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'all', 'foo%', null, '$.a', '$.b' ); +select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'one', 'foo%', null, '$.a', '$.b' ); + +select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'ALL', 'foo%', null, '$.a' ); +select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'aLl', 'foo%', null, '$.a', '$.b' ); +select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'ONE', 'foo%', null, '$.a', '$.b' ); + +# wildcards in the path expression +select json_search +( + '[ { "a": { "b": { "c": "fool" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "food"} } ]', + 'all', + 'foo%', + null, + '$**.c' +); + +select json_search +( + '[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]', + 'all', + 'sho%', + null, + '$**.c' +); + +select json_search +( + '[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]', + 'all', + 'sho%e', + null, + '$**.c' +); + +select json_search +( + '[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]', + 'all', + 'sho%', + null, + '$[*].c' +); + +select json_search +( + '[ { "a": { "b": { "c": "showtime" } } }, [ { "b": { "c": "shout" } }, { "c": { "c": "shoe"} } ] ]', + 'all', + 'sho%', + null, + '$[1]**.c' +); + +# escape character +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo%bar' ); +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar' ); +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|' ); +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]' ); +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]', '$[1]' ); +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]', '$[1]', '$[2]' ); + +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null ); +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null, '$[0]' ); +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null, '$[1]' ); +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]' ); +select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[1]' ); + +# search is case-sensitive +select json_search( '[ "abc", "ABC" ]', 'all', 'aBc' ); +select json_search( '[ "abc", "ABC" ]', 'all', 'abc' ); +select json_search( '[ "abc", "ABC" ]', 'all', 'ABC' ); + +# only matches strings, not numerics +select json_search( '[ 10, "10", 1.0, "1.0" ]', 'all', '1%' ); + +# examples from the wl7909 spec +# returns null because numeric values don't match string values +SELECT JSON_SEARCH +( + '{ "a" : 123, "b" : [ 123, 456 ] }', + 'one', + '123' +); + +# returns "$.b[2]" +SELECT JSON_SEARCH +( + '{ "a" : "123", "b" : [ 123, "789", "123", "456", "123" ] }', + 'one', + '123', + null, + '$.b' +); + +# could return either "$.a" or "$.b.key" +SELECT JSON_SEARCH +( + '{ "a" : "123", "b" : { "key" : "123" } }', + 'one', + '123' +); + +# returns "$.b.key" +SELECT JSON_SEARCH +( + '{ "a" : "1243", "b" : { "key" : "1234" } }', + 'one', + '123%' +); + +# returns "$.b.c" +SELECT JSON_SEARCH +( + '{ "a" : "1243", "b" : { "key" : "1234", "c": "directorysub%directoryabc" } }', + 'one', + 'dir%torysub@%dir%', + '@' +); + +# returns null because the path doesn't exist +SELECT JSON_SEARCH +( + '{ "a" : "1243", "b" : { "key" : "1234" } }', + 'one', + '123%', + null, + '$.c' +); + +# returns $."one potato" +SELECT JSON_UNQUOTE +( + JSON_SEARCH + ( + '{ "onepotato": "foot", "one potato": "food" , "one \\"potato": "fool" }', + 'all', + 'food' + ) +); + +select json_type(case (null is null) when 1 then + json_compact('null') else + json_compact('[1,2,3]') end); + +select json_type(case (null is not null) when 1 then + json_compact('null') else + json_compact('[1,2,3]') end); + +select json_type( if(null is null, + json_compact('null'), + json_compact('[1,2,3]')) ); + +select json_type( if(null is not null, + json_compact('null'), + json_compact('[1,2,3]'))); + +select cast(json_extract(json_compact(concat('[', json_compact('["A",2]'), ']')), + '$[0][1]') as char) = 2; + +--echo # ---------------------------------------------------------------------- +--echo # Test of aggregate function MAX, MIN. +--echo # ---------------------------------------------------------------------- + +select max(json_compact('[1,2,3]')); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_QUOTE, JSON_UNQUOTE +--echo # ---------------------------------------------------------------------- + +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_quote(); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_quote('abc', 'def'); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_quote(NULL, 'def'); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_quote('abc', NULL); + +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_unquote(); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_unquote('"abc"', '"def"'); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_unquote(NULL, 'def'); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +select json_unquote('"abc"', NULL); + +select json_quote(NULL); +select json_unquote(NULL); + +select json_quote('abc'); +select json_quote(convert('abc' using ascii)); +select json_quote(convert('abc' using latin1)); +select json_quote(convert('abc' using utf8)); +select json_quote(convert('abc' using utf8mb4)); + +select json_unquote('abc'); # should do nothing + +select json_unquote('"abc"'); +select json_unquote(convert('"abc"' using ascii)); +select json_unquote(convert('"abc"' using latin1)); +select json_unquote(convert('"abc"' using utf8)); +select json_unquote(convert('"abc"' using utf8mb4)); + +select json_quote('"'); +select json_unquote('"'); # should do nothing + +--echo error ER_INCORRECT_TYPE +select json_quote(123); # integer not allowed +--echo error ER_INCORRECT_TYPE +select json_unquote(123); # integer not allowed + +select json_unquote('""'); # empty string +select char_length(json_unquote('""')); # verify empty string +select json_unquote('"" '); # unchanged: no final " +select json_unquote(json_compact(json_quote('abc'))); # round trip + +# No change in this JSON string: it is an object +select json_compact('{"abc": "foo"}'); +select json_unquote(json_compact('{"abc": "foo"}')); + +# This is a JSON string, so it is actually unquoted +select json_extract(json_compact('{"abc": "foo"}'), '$.abc'); +select json_unquote(json_extract(json_compact('{"abc": "foo"}'), '$.abc')); + +# Bug fix: thse should be the same +select json_unquote('["a", "b", "c"]'); +select json_unquote(json_compact('["a", "b", "c"]')); + +select charset(json_unquote('"abc"')); + +select json_quote(convert(X'e68891' using utf8)); # chinese "I" (wo3) +select json_quote(convert(X'e68891' using utf8mb4)); # chinese "I" (wo3) + +select json_compact(json_quote(convert(X'e68891' using utf8))); + +select json_unquote(convert(X'e68891' using utf8)); # chinese "I" (wo3) + +select json_quote(json_quote(json_quote('abc'))); # deep quote +select json_unquote(json_unquote(json_unquote( # long round trip of it + json_quote(json_quote(json_quote('abc')))))); + +# DATE/TIME will lose their quotes, too: +select json_compact(cast('2015-01-15 23:24:25' as datetime)); +select json_unquote(json_compact(cast('2015-01-15 23:24:25' as datetime))); + +# as well as opaque values: +select json_compact(st_geomfromtext('point(1 1)')); +select json_unquote(json_compact(st_geomfromtext('point(1 1)'))); + +# examples from the wl7909 spec +# returns the SQL string literal abc +SELECT JSON_UNQUOTE( '"abc"' ); + +# returns the SQL string literal "abc +SELECT JSON_UNQUOTE( '"abc' ); + +--echo error ER_INCORRECT_TYPE +SELECT JSON_UNQUOTE( 123 ); + +# returns the SQL string literal abc +SELECT JSON_UNQUOTE +( CAST( json_compact( '"abc"') AS CHAR ) ); + +# returns 1 +SELECT JSON_UNQUOTE +( + CAST( + JSON_EXTRACT( '{ "userName" : "fred" }', '$.userName' ) + AS CHAR + ) +) = 'fred'; + +# returns 0 +SELECT + CAST( + JSON_EXTRACT( '{ "userName" : "fred" }', '$.userName' ) + AS CHAR + ) = 'fred'; + +# returns "abc" +SELECT JSON_QUOTE( 'abc' ); + +--echo error ER_INCORRECT_TYPE +SELECT JSON_QUOTE( 123 ); + +# returns the JSON document consisting of the string scalar "123" +SELECT json_compact( JSON_QUOTE( '123' )); + +--echo # ---------------------------------------------------------------------- +--echo # Test of JSON_CONTAINS +--echo # ---------------------------------------------------------------------- + +--echo # should give NULL +select json_contains(NULL, NULL); +select json_contains(json_compact('{"a": 1, "b": 2}'), NULL); +select json_contains(NULL, json_compact('null')); +select json_contains(json_compact('[1]'), json_compact('[1]'), NULL); + +--echo # should give 0: +select json_contains(json_compact(3.14), json_compact(3)); + +--echo # should give 0: not at top level +select json_contains(json_compact('{"a": {"b": 7}}'), json_compact('{"b": 7}')); + +--echo # but path argument will fix it: +select json_contains(json_compact('{"a": {"b": 7}}'), json_compact('{"b": 7}'), '$.a'); + +--echo # but arrays "introspect" +select json_contains(json_compact('[1,[2.0, 3.0]]'), json_compact('[2.0]')); +select json_contains(json_compact('[1, 2, [3, [4, 5]], 6, 7]'), json_compact('5')); + +--echo # should give 0: just a key +select json_contains(json_compact('{"a": 1, "b": 2}'), json_compact('"a"')); + +--echo # should give 0: one candidate element doesn't match +select json_contains(json_compact('[1]'), json_compact('[1,2]')); + +--echo # should all give 1 +select json_contains(json_compact('null'), json_compact('null')); +--echo # simple object subset +select json_contains(json_compact('{"a": 1, "b": 2}'), json_compact( '{"a": 1}')); +--echo # simple vector subset +select json_contains(json_compact('[1, 2, 3]'), json_compact('[1, 3]')); +--echo # auto-wrap, should give 1 +select json_contains(json_compact('[1, 2, 3]'), json_compact(3)); +--echo # ok even with nested cast off elements +select json_contains(json_compact('{"person": {"id": 1, "country": "norway"}}'), + json_compact('{"person": {"country": "norway"}}')); +--echo # vector reordering and duplicates is ok +select json_contains(json_compact('[1,3,5]'), json_compact('[5,3,1,5]')); +--echo # ok even with more elts in candidate than in doc +select json_contains(json_compact('[{"b": 4, "a":7}]'), json_compact('[{"a":7},{"b":4}]')); +select json_contains(json_compact('[{"b": 4, "a":7}, 5]'), json_compact('[5, {"a":7, "b":4}]')); +--echo # ok even with mixed number types that compare equal +select json_contains(json_compact('[{"b": 4, "a":7}, 5.0]'), json_compact('[5, {"a":7.0E0, "b":4}]')); + +# Bug discovered by Rick: used to give 1 (true). +select json_contains( '{"customer": "cust3"}', '{"customer": "cust1"}' ); + +SELECT JSON_CONTAINS('[null,1,[2,3],true,false]', '[null,1,[3],false]'); +SELECT JSON_CONTAINS('[null,1,[2,3],true,false]', '[null,1,[4],false]'); +SELECT JSON_CONTAINS('[true,false]', '[[true]]'); +SELECT JSON_CONTAINS('[1,2]', '[[1]]'); +SELECT JSON_CONTAINS('[1,2]', '1', '$.abc'); +SELECT JSON_CONTAINS('{}', '{}'); +SELECT JSON_CONTAINS('{}', '{"a":1}'); +SELECT JSON_CONTAINS('{"a":1}', '{"a":1,"b":2}'); + +# examples from the wl7909 spec +# returns 1 +SELECT JSON_CONTAINS +( + json_compact('[1, 4, 6]'), + json_compact('[1, 6]') +); + +# returns 1; even with nested cast off elements +SELECT JSON_CONTAINS +( + json_compact('{"person": {"id": 1, "country": "norway"}}'), + json_compact('{"person": {"country": "norway"}}') +); + +# returns 1; reordering and duplicates are ok +SELECT JSON_CONTAINS +( + json_compact('[1,3,5]'), + json_compact('[5,3,1,5]') +); + +# return 0; no type conversion is performed +SELECT JSON_CONTAINS +( + json_compact('[3.14]'), + json_compact('[3]') +); + +# returns 1, due to auto-wrapping +SELECT JSON_CONTAINS +( + json_compact('[1, 2, 3]'), + json_compact(3) +); + +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +SELECT JSON_CONTAINS(); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +SELECT JSON_CONTAINS('[1]'); +--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT +SELECT JSON_CONTAINS('[1]', '[1]', '$', '$[0]'); + +--echo # ---------------------------------------------------------------------- +--echo # Wrong collation from JSON_QUOTE caused problems: Set it in +--echo # Item_func_json_quote::fix_length_and_dec. Bug found by Knut. +--echo # Similar issue for JSON_UNQUOTE and JSON_TYPE. +--echo # ---------------------------------------------------------------------- +select json_object("a", ifnull(json_quote('test'), json_compact('null'))); +select json_compact(concat('[', json_quote('ab'), ']')); +select json_compact(concat('[', json_unquote('"12"'), ']')); +select json_compact(concat('["', json_type( json_compact(1)), '"]')); + +--echo # +--echo # Bug#20912438: ITEM_TYPE_HOLDER::DISPLAY_LENGTH(ITEM*): ASSERTION `0' FAILED +--echo # +(SELECT JSON_KEYS('{ "key80": "2015-04-20 11:53:55"}')) UNION ALL +(SELECT JSON_KEYS('{ "key80": "2015-04-20 11:53:55" }') LIMIT 0); +SELECT json_compact(1) UNION ALL SELECT json_compact(1); + +# Exercise NULL handling and error handling in Item_copy_json::copy(). +SELECT COUNT(*), json_compact(NULL); +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT COUNT(*), JSON_EXTRACT('not valid json!', '$'); + +--echo # ---------------------------------------------------------------------- +--echo # Bug report from John E. +--echo # Crash in Item_copy_json::~Item_copy_json +--echo # ---------------------------------------------------------------------- +EXPLAIN SELECT COUNT(*), JSON_KEYS('{}'); + +select json_search( '{ "a": "foo" }', 'one', 'foo', 'a' ); +select json_search( '{ "a": "foo" }', 'one', 'foo', null ); +select json_search( '{ "a": "foo" }', 'one', 'foo', convert(x'f8' using latin1) ); + +# bad escape arg +--error ER_WRONG_ARGUMENTS +select json_search( '{ "a": "foo" }', 'one', 'foo', 'ab' ); + +--echo # ---------------------------------------------------------------------- +--echo # Wrong results when Json_path_cache primed is accessed +--echo # during the prepare-phase. +--echo #---------------------------------------------------------------------- + +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null; + +prepare stmt1 from 'select json_remove( ''[ 1, { "a": true, "b": false, "c": null }, 5 ]'', null ) is null'; +execute stmt1; + +--echo error ER_INVALID_JSON_PATH +select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$.' ) is null; + +--echo error ER_INVALID_JSON_PATH +prepare stmt1 from 'select json_remove( ''[ 1, { "a": true, "b": false, "c": null }, 5 ]'', ''$.'' ) is null'; + +--echo # ---------------------------------------------------------------------- +--echo # Bug#20987329 VALUE OF PREPARED STATEMENT PLACEHOLDER FOR PARAMETER +--echo # IN JSON_EXTRACT IS STICKY +--echo #---------------------------------------------------------------------- + +# should get different results with different parameter values + +# json_extract() + +# json_contains() + +prepare json_stmt1 FROM 'select json_contains( ''{ "keyA": [1, 2, 3], "keyB": [4, 5, 6] }'', ''[2]'', ? )'; +set @mypath = '$.keyA'; +execute json_stmt1 USING @mypath; +set @mypath = '$.keyB'; +execute json_stmt1 USING @mypath; + +# json_contains_path() + +prepare json_stmt2 FROM 'select json_contains_path( ''{ "keyA": [1, 2, 3] }'', ''all'', ? )'; +set @mypath = '$.keyA'; +execute json_stmt2 USING @mypath; +set @mypath = '$.keyB'; +execute json_stmt2 USING @mypath; + +# json_length() + +prepare json_stmt3 FROM 'select json_length( ''{ "keyA": [1, 2, 3], "keyB": [1, 2, 3, 4] }'', ? )'; +set @mypath = '$.keyA'; +execute json_stmt3 USING @mypath; +set @mypath = '$.keyB'; +execute json_stmt3 USING @mypath; + +# json_keys() + +prepare json_stmt4 FROM 'select json_keys( ''[ { "keyA": true }, { "keyB": false } ]'', ? )'; +set @mypath = '$[0]'; +execute json_stmt4 USING @mypath; +set @mypath = '$[1]'; +execute json_stmt4 USING @mypath; + +# json_array_append() + +prepare json_stmt5 FROM 'select json_array_append( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )'; +set @mypath = '$.keyA'; +execute json_stmt5 USING @mypath; +set @mypath = '$.keyB'; +execute json_stmt5 USING @mypath; + +# json_insert() + +prepare json_stmt6 FROM 'select json_insert( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )'; +set @mypath = '$.keyA[2]'; +execute json_stmt6 USING @mypath; +set @mypath = '$.keyB[2]'; +execute json_stmt6 USING @mypath; + +# json_set() + +prepare json_stmt7 FROM 'select json_set( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )'; +set @mypath = '$.keyA[2]'; +execute json_stmt7 USING @mypath; +set @mypath = '$.keyB[2]'; +execute json_stmt7 USING @mypath; + +# json_replace() + +prepare json_stmt8 FROM 'select json_replace( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )'; +set @mypath = '$.keyA[1]'; +execute json_stmt8 USING @mypath; +set @mypath = '$.keyB[1]'; +execute json_stmt8 USING @mypath; + +# json_search() + +prepare json_stmt9 FROM 'select json_search( ''{ "keyA": [ "foot" ], "keyB": [ "food" ] }'', ''all'', ''foo%'', null, ? )'; +set @mypath = '$.keyA'; +execute json_stmt9 USING @mypath; +set @mypath = '$.keyB'; +execute json_stmt9 USING @mypath; + +# json_remove() + +prepare json_stmt10 FROM 'select json_remove( ''{ "keyA": [ "foot" ], "keyB": [ "food" ] }'', ? )'; +set @mypath = '$.keyA'; +execute json_stmt10 USING @mypath; +set @mypath = '$.keyB'; +execute json_stmt10 USING @mypath; + +# similar caching problem for the oneOrAll args + +prepare json_stmt11 FROM 'select json_contains_path( ''{ "keyA": true }'', ?, ''$.keyA'', ''$.keyB'' )'; +set @mypath = 'one'; +execute json_stmt11 USING @mypath; +set @mypath = 'all'; +execute json_stmt11 USING @mypath; + +prepare json_stmt12 FROM 'select json_search( ''{ "keyA": [ "foot" ], "keyB": [ "food" ] }'', ?, ''foo%'' )'; +set @mypath = 'one'; +execute json_stmt12 USING @mypath; +set @mypath = 'all'; +execute json_stmt12 USING @mypath; + +--echo # +--echo # Bug#21128632 JSON_QUOTE(JSON_TYPE(...)) GIVES ERROR 3139 ER_INVALID_JSON_CHARSET +--echo # + +select json_quote( json_type( json_object() ) ); +select json_quote( json_type( json_compact('{}') ) ); + +--echo # +--echo # Bug#21148020 OUTPUT FROM JSON_TYPE() IS TRUNCATED +--echo # WHEN EXECUTED IN A VIEW OR JOIN +--echo # + +SELECT JSON_TYPE(JSON_OBJECT()); +CREATE VIEW v1 AS SELECT JSON_TYPE(JSON_OBJECT()); +SELECT * FROM v1; +drop view v1; + +# SELECT JSON_TYPE(json_compact(CAST('2015-05-25 11:23:55' AS DATETIME))); +# CREATE VIEW v2 AS SELECT JSON_TYPE(json_compact(CAST('2015-05-25 11:23:55' AS +# DATETIME))); +# SELECT * FROM v2; +# drop view v2; + +--echo # +--echo # Bug#21198333 SIG 6 IN ITEM_CACHE_JSON::CACHE_VALUE AT SQL/ITEM.CC:9470 +--echo # +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT MIN(JSON_EXTRACT('not json', '$')); + +--echo # +--echo # Bug#21200657 DATA FROM DERIVED TABLE BASED +--echo # ON JSN_QUOTE()/JSN_UNQUOTE() CALL IS TRUNCATED +--echo # +SELECT JSON_QUOTE('This is a string that should not be truncated') AS field1; +SELECT JSON_UNQUOTE(JSON_QUOTE('This is a string that should not be truncated')) AS field1; + +SELECT * FROM (SELECT JSON_QUOTE('This is a string that should not be truncated') AS field1) AS DERIVED_TABLE; +SELECT * FROM (SELECT JSON_UNQUOTE("This is a string that should not be truncated") AS field1) AS DERIVED_TABLE; +SELECT * FROM (SELECT JSON_UNQUOTE(JSON_QUOTE('This is a string that should not be truncated')) AS field1) AS DERIVED_TABLE; + +--echo # +--echo # Bug#21296173 JSON_OBJECT('KEY', BOOLEAN_LITERAL) USES VALUES 0, 1 +--echo # FOR BOOL WHEN USED VIA VIEW +--echo # + +SELECT JSON_OBJECT('key1', false, 'key2', true); +SELECT JSON_ARRAY('key1', false, 'key2', true); +CREATE VIEW v1 AS SELECT JSON_OBJECT('key1', false, 'key2', true); +SELECT * FROM v1; +CREATE VIEW v2 AS SELECT JSON_ARRAY('key1', false, 'key2', true); +SELECT * FROM v2; + +drop view v1; +drop view v2; + +--echo # +--echo # Bug#21293089 JSON_CONTAINS() RETURNS WRONG RESULT WITH EMPTY JSON ARRAY +--echo # +SELECT JSON_CONTAINS('[]', '{"a" : 1}'); +SELECT JSON_CONTAINS('[]', '[1, 2, 3, 4, 5]'); +SELECT JSON_CONTAINS('[]', '[1, 2, 3, 4, {"a" : 1}]'); +SELECT JSON_CONTAINS('[]', '{"a" : [1, 2, 3, 4, 5]}'); +SELECT JSON_CONTAINS('[]', '[]'); + +--echo # +--echo # Bug#21377136 STACK OVERFLOW IN RAPIDJSON::GENERICREADER +--echo # +--echo error ER_JSON_DOCUMENT_TOO_DEEP +SELECT JSON_VALID(REPEAT('[', 100000)); +--echo error ER_JSON_DOCUMENT_TOO_DEEP +SELECT JSON_VALID(REPEAT('{"a":', 100000)); +--echo error ER_JSON_DOCUMENT_TOO_DEEP +SELECT JSON_VALID(REPEAT('{"a":[', 100000)); +--echo error ER_JSON_DOCUMENT_TOO_DEEP +SELECT JSON_VALID(REPEAT('[{"a":', 100000)); + +--echo # +--echo # Bug#21381806 JSON: ASSERTION FAILED: ARG->NULL_VALUE +--echo # +SELECT JSON_SET(CASE WHEN 1 THEN NULL ELSE NULL END, '{}', '{}'); +SELECT JSON_VALID(CASE WHEN 1 THEN NULL ELSE NULL END); +SELECT JSON_ARRAY(CASE WHEN 1 THEN NULL ELSE NULL END); + +--echo # +--echo # Bug#21384048 ASSERTION FAILED: N >= 0 && N <= 308 +--echo # IN RAPIDJSON::INTERNAL::FASTPATH +--echo # +SELECT JSON_EXTRACT('-1E-36181012216111515851075235238', '$'); +SELECT JSON_EXTRACT('1E-36181012216111515851075235238', '$'); +SELECT JSON_EXTRACT('1E-325', '$'); +SELECT JSON_EXTRACT('1E-324', '$'); +SELECT JSON_EXTRACT('1E-323', '$'); +SELECT JSON_EXTRACT('1E+308', '$'); +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_EXTRACT('1E+309', '$'); +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_EXTRACT('1E+36181012216111515851075235238', '$'); +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT JSON_EXTRACT('-1E+36181012216111515851075235238', '$'); + +--echo # +--echo # Bug#21383284: ASSERTION IN SELECT_LEX::SETUP_CONDS +--echo # +--error ER_WRONG_ARGUMENTS +SELECT 1 FROM dual WHERE JSON_SEARCH('{}', 'one', 'foo', 'too-long-escape'); +--echo error ER_INVALID_JSON_TEXT_IN_PARAM +SELECT 1 FROM dual WHERE JSON_SEARCH('{}', 'one', 'foo', JSON_EXTRACT('', '$')); + +--echo # +--echo # Bug#21442624 INCORRECT RESULT FROM JSON_SET WITH AUTO-WRAPPING +--echo # + +SELECT JSON_SET('1', '$', 100); +SELECT JSON_SET('1', '$[0]', 100); +SELECT JSON_SET('1', '$[0][0]', 100); +SELECT JSON_SET('1', '$[0][0][0]', 100); + +SELECT JSON_SET('[]', '$', 100); +SELECT JSON_SET('[]', '$[0]', 100); +SELECT JSON_SET('[]', '$[0][0]', 100); +SELECT JSON_SET('[]', '$[0][0][0]', 100); + +SELECT JSON_SET('[1]', '$', 100); +SELECT JSON_SET('[1]', '$[0]', 100); +SELECT JSON_SET('[1]', '$[0][0]', 100); +SELECT JSON_SET('[1]', '$[0][0][0]', 100); + +SELECT JSON_SET('[[1]]', '$', 100); +SELECT JSON_SET('[[1]]', '$[0]', 100); +SELECT JSON_SET('[[1]]', '$[0][0]', 100); +SELECT JSON_SET('[[1]]', '$[0][0][0]', 100); + +SELECT JSON_SET('[[[1]]]', '$', 100); +SELECT JSON_SET('[[[1]]]', '$[0]', 100); +SELECT JSON_SET('[[[1]]]', '$[0][0]', 100); +SELECT JSON_SET('[[[1]]]', '$[0][0][0]', 100); + +SELECT JSON_REPLACE('1', '$', 100); +SELECT JSON_REPLACE('1', '$[0]', 100); +SELECT JSON_REPLACE('1', '$[0][0]', 100); +SELECT JSON_REPLACE('1', '$[0][0][0]', 100); + +SELECT JSON_REPLACE('[]', '$', 100); +SELECT JSON_REPLACE('[]', '$[0]', 100); +SELECT JSON_REPLACE('[]', '$[0][0]', 100); +SELECT JSON_REPLACE('[]', '$[0][0][0]', 100); + +SELECT JSON_REPLACE('[1]', '$', 100); +SELECT JSON_REPLACE('[1]', '$[0]', 100); +SELECT JSON_REPLACE('[1]', '$[0][0]', 100); +SELECT JSON_REPLACE('[1]', '$[0][0][0]', 100); + +SELECT JSON_REPLACE('[[1]]', '$', 100); +SELECT JSON_REPLACE('[[1]]', '$[0]', 100); +SELECT JSON_REPLACE('[[1]]', '$[0][0]', 100); +SELECT JSON_REPLACE('[[1]]', '$[0][0][0]', 100); + +SELECT JSON_REPLACE('[[[1]]]', '$', 100); +SELECT JSON_REPLACE('[[[1]]]', '$[0]', 100); +SELECT JSON_REPLACE('[[[1]]]', '$[0][0]', 100); +SELECT JSON_REPLACE('[[[1]]]', '$[0][0][0]', 100); + + +--echo # +--echo # Bug#21828321: JSON FUNCS CALL DBUG_ABORT OR EXIT() ON WINDOWS! +--echo # +# LEAST and GREATEST treat JSON arguments as strings for now. They used to hit +# an assertion if used in a JSON context and all arguments were JSON values, or +# a mix of NULLs and JSON values. +SELECT JSON_ARRAY(LEAST(NULL, NULL), GREATEST(NULL, NULL), LEAST(j1, NULL), + GREATEST(NULL, j2), LEAST(j1, j2), GREATEST(j1, j2)) AS j +FROM (SELECT json_compact('1') AS j1, json_compact('2') AS j2) t; + diff --git a/mysql-test/suite/maria/icp.result b/mysql-test/suite/maria/icp.result index 64ae4f5e057..0ebdd726b4e 100644 --- a/mysql-test/suite/maria/icp.result +++ b/mysql-test/suite/maria/icp.result @@ -474,7 +474,7 @@ CREATE TABLE t2 ( t2_int int PRIMARY KEY, t2_int2 INT ); -INSERT INTO t2 VALUES (); +INSERT IGNORE INTO t2 VALUES (); INSERT INTO t1 VALUES (); SELECT * FROM t1 AS t1a WHERE NOT EXISTS (SELECT * FROM t1 AS t1b @@ -568,7 +568,7 @@ COL1000 VARBINARY(179) NOT NULL, col1003 DATE DEFAULT NULL, KEY idx4267 (col1000, col1003) ); -INSERT INTO t1 VALUES (),(); +INSERT IGNORE INTO t1 VALUES (),(); Warnings: Warning 1364 Field 'col999' doesn't have a default value Warning 1364 Field 'COL1000' doesn't have a default value @@ -849,7 +849,7 @@ Handler_icp_attempts 2 Handler_icp_match 1 DROP TABLE t1; create table t1 (a int,b char(5),primary key (a), key (b(1))); -insert into t1 values ('a','b'); +insert ignore into t1 values ('a','b'); Warnings: Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1 select 1 from t1 where a and b >= 'aa'; diff --git a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result index 024b929646a..a0535026722 100644 --- a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result +++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result @@ -801,7 +801,7 @@ drop table t1; CREATE TABLE t1 (st varchar(100)); INSERT INTO t1 VALUES ("Fake string"); CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom)) row_format=dynamic; -INSERT INTO t2 SELECT GeomFromText(st) FROM t1; +INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1; ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) row_format=dynamic DEFAULT CHARSET=latin1; @@ -1463,7 +1463,7 @@ drop table t1; CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ) row_format=dynamic; INSERT INTO t1(foo) VALUES (NULL); ERROR 23000: Column 'foo' cannot be null -INSERT INTO t1() VALUES (); +INSERT IGNORE INTO t1() VALUES (); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field INSERT INTO t1(foo) VALUES (''); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field diff --git a/mysql-test/suite/maria/maria-gis-rtree-dynamic.test b/mysql-test/suite/maria/maria-gis-rtree-dynamic.test index 668d393d0b8..473f787db53 100644 --- a/mysql-test/suite/maria/maria-gis-rtree-dynamic.test +++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.test @@ -173,7 +173,7 @@ CREATE TABLE t1 (st varchar(100)); INSERT INTO t1 VALUES ("Fake string"); CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom)) row_format=dynamic; --error 1416 -INSERT INTO t2 SELECT GeomFromText(st) FROM t1; +INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1; drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) row_format=dynamic DEFAULT CHARSET=latin1; @@ -849,7 +849,7 @@ CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ) row_format=dynamic; --error 1048 INSERT INTO t1(foo) VALUES (NULL); --error 1416 -INSERT INTO t1() VALUES (); +INSERT IGNORE INTO t1() VALUES (); --error 1416 INSERT INTO t1(foo) VALUES (''); DROP TABLE t1; diff --git a/mysql-test/suite/maria/maria-gis-rtree-trans.result b/mysql-test/suite/maria/maria-gis-rtree-trans.result index 2b94bc0ffad..dbcbdeb1661 100644 --- a/mysql-test/suite/maria/maria-gis-rtree-trans.result +++ b/mysql-test/suite/maria/maria-gis-rtree-trans.result @@ -801,7 +801,7 @@ drop table t1; CREATE TABLE t1 (st varchar(100)); INSERT INTO t1 VALUES ("Fake string"); CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom)) transactional=1 row_format=page; -INSERT INTO t2 SELECT GeomFromText(st) FROM t1; +INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1; ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) transactional=1 row_format=page DEFAULT CHARSET=latin1; @@ -1454,7 +1454,7 @@ drop table t1; CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ) transactional=1 row_format=page; INSERT INTO t1(foo) VALUES (NULL); ERROR 23000: Column 'foo' cannot be null -INSERT INTO t1() VALUES (); +INSERT IGNORE INTO t1() VALUES (); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field INSERT INTO t1(foo) VALUES (''); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field diff --git a/mysql-test/suite/maria/maria-gis-rtree-trans.test b/mysql-test/suite/maria/maria-gis-rtree-trans.test index 73f129d8df9..84678b68693 100644 --- a/mysql-test/suite/maria/maria-gis-rtree-trans.test +++ b/mysql-test/suite/maria/maria-gis-rtree-trans.test @@ -176,7 +176,7 @@ CREATE TABLE t1 (st varchar(100)); INSERT INTO t1 VALUES ("Fake string"); CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom)) transactional=1 row_format=page; --error 1416 -INSERT INTO t2 SELECT GeomFromText(st) FROM t1; +INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1; drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) transactional=1 row_format=page DEFAULT CHARSET=latin1; @@ -849,7 +849,7 @@ CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ) transactional=1 row_ --error 1048 INSERT INTO t1(foo) VALUES (NULL); --error 1416 -INSERT INTO t1() VALUES (); +INSERT IGNORE INTO t1() VALUES (); --error 1416 INSERT INTO t1(foo) VALUES (''); DROP TABLE t1; diff --git a/mysql-test/suite/maria/maria-gis-rtree.result b/mysql-test/suite/maria/maria-gis-rtree.result index 826aee5fbc2..3ecdcc64928 100644 --- a/mysql-test/suite/maria/maria-gis-rtree.result +++ b/mysql-test/suite/maria/maria-gis-rtree.result @@ -801,7 +801,7 @@ drop table t1; CREATE TABLE t1 (st varchar(100)); INSERT INTO t1 VALUES ("Fake string"); CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom)) transactional=0 row_format=page; -INSERT INTO t2 SELECT GeomFromText(st) FROM t1; +INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1; ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) transactional=0 row_format=page DEFAULT CHARSET=latin1; @@ -1454,7 +1454,7 @@ drop table t1; CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ) transactional=0 row_format=page; INSERT INTO t1(foo) VALUES (NULL); ERROR 23000: Column 'foo' cannot be null -INSERT INTO t1() VALUES (); +INSERT IGNORE INTO t1() VALUES (); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field INSERT INTO t1(foo) VALUES (''); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field diff --git a/mysql-test/suite/maria/maria-gis-rtree.test b/mysql-test/suite/maria/maria-gis-rtree.test index a3845adb7b9..5c68e570fca 100644 --- a/mysql-test/suite/maria/maria-gis-rtree.test +++ b/mysql-test/suite/maria/maria-gis-rtree.test @@ -173,7 +173,7 @@ CREATE TABLE t1 (st varchar(100)); INSERT INTO t1 VALUES ("Fake string"); CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom)) transactional=0 row_format=page; --error 1416 -INSERT INTO t2 SELECT GeomFromText(st) FROM t1; +INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1; drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) transactional=0 row_format=page DEFAULT CHARSET=latin1; @@ -846,7 +846,7 @@ CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ) transactional=0 row_ --error 1048 INSERT INTO t1(foo) VALUES (NULL); --error 1416 -INSERT INTO t1() VALUES (); +INSERT IGNORE INTO t1() VALUES (); --error 1416 INSERT INTO t1(foo) VALUES (''); DROP TABLE t1; diff --git a/mysql-test/suite/maria/maria-recover.result b/mysql-test/suite/maria/maria-recover.result index 472d2351abe..b96cf8811db 100644 --- a/mysql-test/suite/maria/maria-recover.result +++ b/mysql-test/suite/maria/maria-recover.result @@ -8,7 +8,7 @@ OFF set global aria_recover_options=default; select @@global.aria_recover_options; @@global.aria_recover_options -NORMAL +BACKUP,QUICK set global aria_recover_options=normal; select @@global.aria_recover_options; @@global.aria_recover_options diff --git a/mysql-test/suite/maria/maria-ucs2.result b/mysql-test/suite/maria/maria-ucs2.result index fab640f703a..7499b37279b 100644 --- a/mysql-test/suite/maria/maria-ucs2.result +++ b/mysql-test/suite/maria/maria-ucs2.result @@ -14,6 +14,7 @@ INSERT INTO t1 SELECT * FROM t1; CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`; Warnings: Warning 1071 Specified key was too long; max key length is 1000 bytes diff --git a/mysql-test/suite/maria/maria-ucs2.test b/mysql-test/suite/maria/maria-ucs2.test index fed67d780e9..e4f8bc8dd27 100644 --- a/mysql-test/suite/maria/maria-ucs2.test +++ b/mysql-test/suite/maria/maria-ucs2.test @@ -26,6 +26,7 @@ INSERT INTO t1 SELECT * FROM t1; # check table is not needed to reproduce the problem, # but shows that by this time the table appears to be okay. CHECK TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`; CHECK TABLE t1; SHOW CREATE table t1; diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result index cebb7e034b9..04b042059fb 100644 --- a/mysql-test/suite/maria/maria.result +++ b/mysql-test/suite/maria/maria.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Can't find record in '.*'"); select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA"; ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS Aria YES Crash-safe tables with MyISAM heritage NO NO NO @@ -1583,6 +1584,7 @@ create table t1 (v varchar(65530), key(v)); Warnings: Warning 1071 Specified key was too long; max key length is 1000 bytes drop table if exists t1; +set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for create table t1 (v varchar(65536)); Warnings: Note 1246 Converting column 'v' from VARCHAR to TEXT @@ -1592,6 +1594,7 @@ t1 CREATE TABLE `t1` ( `v` mediumtext DEFAULT NULL ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 drop table t1; +set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for create table t1 (v varchar(65530) character set utf8); Warnings: Note 1246 Converting column 'v' from VARCHAR to TEXT @@ -2642,11 +2645,13 @@ alter table t1 partition by list (s1) (partition p1 values in (2)); ERROR HY000: Table has no partition for value 1 drop table t1; create table t1(a int primary key, b blob, c blob) engine=aria; +set sql_mode=''; insert into t1 values(1,repeat('a',100), repeat('b',657860)); Warnings: Warning 1265 Data truncated for column 'c' at row 1 insert into t1 values(1,repeat('a',100), repeat('b',657860)); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +set sql_mode=default; check table t1; Table Op Msg_type Msg_text test.t1 check status OK diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test index df73c8d8199..1b930a22c35 100644 --- a/mysql-test/suite/maria/maria.test +++ b/mysql-test/suite/maria/maria.test @@ -6,6 +6,8 @@ -- source include/have_maria.inc -- source include/have_partition.inc +call mtr.add_suppression("Can't find record in '.*'"); + select * from INFORMATION_SCHEMA.ENGINES where ENGINE="ARIA"; let $default_engine=`select @@global.storage_engine`; @@ -63,7 +65,7 @@ disable_query_log; SET SQL_WARNINGS=0; while ($1) { - eval insert into t1 (b) values(repeat(char(65+$1),65550-$1)); + eval insert ignore into t1 (b) values(repeat(char(65+$1),65550-$1)); dec $1; } SET SQL_WARNINGS=1; @@ -919,9 +921,11 @@ source include/varchar.inc; create table t1 (v varchar(65530), key(v)); drop table if exists t1; +set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for create table t1 (v varchar(65536)); show create table t1; drop table t1; +set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for create table t1 (v varchar(65530) character set utf8); show create table t1; drop table t1; @@ -1878,9 +1882,11 @@ drop table t1; # create table t1(a int primary key, b blob, c blob) engine=aria; +set sql_mode=''; insert into t1 values(1,repeat('a',100), repeat('b',657860)); --error ER_DUP_ENTRY insert into t1 values(1,repeat('a',100), repeat('b',657860)); +set sql_mode=default; check table t1; drop table t1; diff --git a/mysql-test/suite/maria/maria3.result b/mysql-test/suite/maria/maria3.result index e6b73eb8909..6099dc9c982 100644 --- a/mysql-test/suite/maria/maria3.result +++ b/mysql-test/suite/maria/maria3.result @@ -317,7 +317,7 @@ aria_pagecache_buffer_size 8388608 aria_pagecache_division_limit 100 aria_pagecache_file_hash_size 512 aria_page_checksum OFF -aria_recover_options NORMAL +aria_recover_options BACKUP,QUICK aria_repair_threads 1 aria_sort_buffer_size 268434432 aria_stats_method nulls_unequal diff --git a/mysql-test/suite/maria/maria_notembedded.result b/mysql-test/suite/maria/maria_notembedded.result index 5617238e075..a717782830d 100644 --- a/mysql-test/suite/maria/maria_notembedded.result +++ b/mysql-test/suite/maria/maria_notembedded.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); set session storage_engine=aria; create table t1 (a int) row_format=page; insert delayed into t1 values(1); diff --git a/mysql-test/suite/maria/maria_notembedded.test b/mysql-test/suite/maria/maria_notembedded.test index f1d71e90354..29f15e81013 100644 --- a/mysql-test/suite/maria/maria_notembedded.test +++ b/mysql-test/suite/maria/maria_notembedded.test @@ -3,6 +3,8 @@ -- source include/not_embedded.inc -- source include/have_maria.inc +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); + let $default_engine=`select @@session.storage_engine`; set session storage_engine=aria; diff --git a/mysql-test/suite/maria/ps_maria.result b/mysql-test/suite/maria/ps_maria.result index 6ce10fc2bce..bc03e40a717 100644 --- a/mysql-test/suite/maria/ps_maria.result +++ b/mysql-test/suite/maria/ps_maria.result @@ -1303,9 +1303,11 @@ a b 2 two set @arg00=NULL; set @arg01=2; +set sql_mode = ''; execute stmt1 using @arg00, @arg01; Warnings: Warning 1048 Column 'a' cannot be null +set sql_mode = default; select a,b from t1 order by a; a b 0 two @@ -1784,7 +1786,7 @@ t5 CREATE TABLE `t5` ( `param03` double DEFAULT NULL, `const04` varchar(3) NOT NULL, `param04` longtext DEFAULT NULL, - `const05` varbinary(3) NOT NULL, + `const05` varbinary(3) DEFAULT NULL, `param05` longblob DEFAULT NULL, `const06` varchar(10) NOT NULL, `param06` longtext DEFAULT NULL, @@ -1814,7 +1816,7 @@ def test t5 t5 const03 const03 5 17 1 N 36865 31 63 def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 def test t5 t5 const04 const04 253 3 3 N 4097 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 253 3 3 N 4225 0 63 +def test t5 t5 const05 const05 253 3 3 Y 128 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 4097 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -2570,6 +2572,7 @@ prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 from t9 where c21 = 'O' "; prepare my_delete from "delete from t9 where c21 = 'O' "; set @arg00= 9223372036854775807 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2593,6 +2596,7 @@ c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2616,6 +2620,7 @@ c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2639,6 +2644,7 @@ c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= '-9223372036854775808' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2662,6 +2668,7 @@ c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= 1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2687,6 +2694,7 @@ c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2712,6 +2720,7 @@ c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2737,6 +2746,7 @@ c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; set @arg00= '-1.11111111111111111111e+50' ; +set statement sql_mode = '' for execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: @@ -2763,6 +2773,7 @@ c12 -9999.9999 execute my_delete ; test_sequence -- insert into string columns -- +set sql_mode = ''; insert into t9 ( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 ) values @@ -2921,6 +2932,7 @@ execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: Warning 1265 Data truncated for column 'c20' at row 1 +set sql_mode = default; set @arg00= 'abc' ; set @arg00= NULL ; insert into t9 @@ -3127,6 +3139,7 @@ true delete from t9 ; test_sequence -- insert into date/time columns -- +set sql_mode = ''; set @arg00= '1991-01-01 01:01:01' ; insert into t9 ( c1, c13, c14, c15, c16, c17 ) @@ -3285,6 +3298,7 @@ Warnings: Warning 1265 Data truncated for column 'c15' at row 1 Note 1265 Data truncated for column 'c16' at row 1 Warning 1264 Out of range value for column 'c17' at row 1 +set sql_mode = default; set @arg00= 'abc' ; set @arg00= NULL ; insert into t9 diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug41029.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug41029.result index ad8f67d9d18..eaad67de20c 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug41029.result +++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug41029.result @@ -1,6 +1,6 @@ select @default_binlog_format:=@@global.binlog_format; @default_binlog_format:=@@global.binlog_format -STATEMENT +MIXED set global binlog_format=row; connect con1,localhost,root,,; connect con2,localhost,root,,; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result index 33a4d5c2f30..899bf04e635 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result +++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result @@ -18,7 +18,7 @@ INSERT INTO t1 VALUES ('MS','Microsoft'), ('IB','IBM- Inc.'), ('GO','Google Inc.'); -INSERT INTO t2 VALUES +INSERT IGNORE INTO t2 VALUES ('AB','Sweden'), ('JA','USA'), ('MS','United States of America'), diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result index 505dd587d0b..0d88ff3d2cb 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result +++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result @@ -20,7 +20,7 @@ Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 VALUES('2008-01-01',NULL,'08-01-02','08/01/03'); INSERT INTO t1(c1,c2) VALUES('08/01/17',NULL); DELETE FROM t1 WHERE c1='08/01/17' AND c2 IS NULL; -INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; +INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43618.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43618.result index 35cbe35bc7e..d3d04cbf260 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43618.result +++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43618.result @@ -18,7 +18,7 @@ Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 VALUES('2008-01-01',NULL,'08-01-02','08/01/03'); INSERT INTO t1(c1,c2) VALUES('08/01/17',NULL); DELETE FROM t1 WHERE c1='08/01/17' AND c2 IS NULL; -INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; +INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test index d8b8b1f64a3..9bfff0ccdb7 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test +++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test @@ -28,7 +28,7 @@ INSERT INTO t1 VALUES ('IB','IBM- Inc.'), ('GO','Google Inc.'); -INSERT INTO t2 VALUES +INSERT IGNORE INTO t2 VALUES ('AB','Sweden'), ('JA','USA'), ('MS','United States of America'), diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test index 4a3544958d2..2b5b5fd96dd 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test +++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test @@ -36,7 +36,7 @@ INSERT INTO t1(c1,c2) VALUES('08/01/17',NULL); DELETE FROM t1 WHERE c1='08/01/17' AND c2 IS NULL; # Insert empty string '', would be converted to zero value of the appropriate type -INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; +INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; --sorted_result SELECT * FROM t1; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43618.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43618.test index 02e93cdf01a..3d9430ba34f 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43618.test +++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43618.test @@ -36,7 +36,7 @@ INSERT INTO t1(c1,c2) VALUES('08/01/17',NULL); DELETE FROM t1 WHERE c1='08/01/17' AND c2 IS NULL; # Insert empty string '', would be converted to zero value of the appropriate type -INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; +INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */; INSERT INTO t1 VALUES('1971-01-01 00:00:01','1980-01-01 00:00:01','2009-01-01','2009-01-02'),('1990-01-01 00:00:01','2000-01-01 00:00:01','2009-01-03','2009-01-04'),('2038-01-09 03:14:07','2038-01-09 03:14:07','2009-01-05','2009-01-06'); diff --git a/mysql-test/suite/parts/inc/partition_enum.inc b/mysql-test/suite/parts/inc/partition_enum.inc index 87e88983055..f056162e89e 100644 --- a/mysql-test/suite/parts/inc/partition_enum.inc +++ b/mysql-test/suite/parts/inc/partition_enum.inc @@ -32,7 +32,7 @@ let $letter=26; begin; while ($letter) { -eval insert into t2 values (char(ascii('A')+$letter)); +eval insert ignore into t2 values (char(ascii('A')+$letter)); dec $letter; } commit; diff --git a/mysql-test/suite/parts/inc/partition_year.inc b/mysql-test/suite/parts/inc/partition_year.inc index 2be9d158090..ff221d05b95 100644 --- a/mysql-test/suite/parts/inc/partition_year.inc +++ b/mysql-test/suite/parts/inc/partition_year.inc @@ -27,7 +27,7 @@ let $count=255; begin; while ($count) { -eval insert into t2 values (1901+$count); +eval insert ignore into t2 values (1901+$count); dec $count; } commit; diff --git a/mysql-test/suite/parts/r/partition_mdev6067.result b/mysql-test/suite/parts/r/partition_mdev6067.result index 4737d3679f3..d0ae2e30d8d 100644 --- a/mysql-test/suite/parts/r/partition_mdev6067.result +++ b/mysql-test/suite/parts/r/partition_mdev6067.result @@ -24,14 +24,17 @@ INSERT INTO t1 VALUES (4,16); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1,1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2,2), (3,8) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (4,16) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/parts/r/partition_repair_myisam.result b/mysql-test/suite/parts/r/partition_repair_myisam.result index 3652698f634..6e99f1d3632 100644 --- a/mysql-test/suite/parts/r/partition_repair_myisam.result +++ b/mysql-test/suite/parts/r/partition_repair_myisam.result @@ -270,8 +270,8 @@ PARTITIONS 7; SELECT COUNT(*) FROM t1_will_crash; COUNT(*) 33 -SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7); -partition rows +SELECT (b % 7) AS `partition`, COUNT(*) AS rows_cnt FROM t1_will_crash GROUP BY (b % 7); +partition rows_cnt 0 2 1 5 2 5 @@ -343,8 +343,8 @@ test.t1_will_crash repair status OK SELECT COUNT(*) FROM t1_will_crash; COUNT(*) 29 -SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7); -partition rows +SELECT (b % 7) AS `partition`, COUNT(*) AS rows_cnt FROM t1_will_crash GROUP BY (b % 7); +partition rows_cnt 1 4 2 5 3 5 @@ -483,8 +483,8 @@ test.t1_will_crash repair status OK SELECT COUNT(*) FROM t1_will_crash; COUNT(*) 29 -SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7); -partition rows +SELECT (b % 7) AS `partition`, COUNT(*) AS rows_cnt FROM t1_will_crash GROUP BY (b % 7); +partition rows_cnt 1 4 2 4 3 5 diff --git a/mysql-test/suite/parts/t/partition_repair_myisam.test b/mysql-test/suite/parts/t/partition_repair_myisam.test index f7c503a8544..a21493ca03d 100644 --- a/mysql-test/suite/parts/t/partition_repair_myisam.test +++ b/mysql-test/suite/parts/t/partition_repair_myisam.test @@ -190,7 +190,7 @@ eval INSERT INTO t1_will_crash VALUES ('6 row 7 (crash before completely written to datafile)', 27, '$lt$lt'); --enable_query_log SELECT COUNT(*) FROM t1_will_crash; -SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7); +SELECT (b % 7) AS `partition`, COUNT(*) AS rows_cnt FROM t1_will_crash GROUP BY (b % 7); SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a; FLUSH TABLES; # testing p0, p1, p3, p6(1) @@ -216,7 +216,7 @@ OPTIMIZE TABLE t1_will_crash; CHECK TABLE t1_will_crash; REPAIR TABLE t1_will_crash; SELECT COUNT(*) FROM t1_will_crash; -SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7); +SELECT (b % 7) AS `partition`, COUNT(*) AS rows_cnt FROM t1_will_crash GROUP BY (b % 7); SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a; FLUSH TABLES; @@ -282,7 +282,7 @@ SET @@optimizer_switch=@save_optimizer_switch; ALTER TABLE t1_will_crash CHECK PARTITION p6; ALTER TABLE t1_will_crash REPAIR PARTITION p6; SELECT COUNT(*) FROM t1_will_crash; -SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7); +SELECT (b % 7) AS `partition`, COUNT(*) AS rows_cnt FROM t1_will_crash GROUP BY (b % 7); SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a; ALTER TABLE t1_will_crash CHECK PARTITION all EXTENDED; DROP TABLE t1_will_crash; diff --git a/mysql-test/suite/perfschema/disabled.def b/mysql-test/suite/perfschema/disabled.def index d9e9e5bf34e..321cd7dcd16 100644 --- a/mysql-test/suite/perfschema/disabled.def +++ b/mysql-test/suite/perfschema/disabled.def @@ -22,3 +22,5 @@ binlog_edge_stmt: needs slave_relay_log_info binlog_ok_mix: needs slave_relay_log_info binlog_ok_row: needs slave_relay_log_info binlog_ok_stmt: needs slave_relay_log_info + +server_init : Nirbhay TODO: Fix the test diff --git a/mysql-test/suite/perfschema/include/digest_execution.inc b/mysql-test/suite/perfschema/include/digest_execution.inc index 5483cca61d7..cf83bf9f51b 100644 --- a/mysql-test/suite/perfschema/include/digest_execution.inc +++ b/mysql-test/suite/perfschema/include/digest_execution.inc @@ -96,7 +96,7 @@ CREATE TABLE dup_table (c char(4)); --ERROR ER_TABLE_EXISTS_ERROR CREATE TABLE dup_table (c char(4)); DROP TABLE dup_table; -INSERT INTO t11 VALUES("MySQL"); +INSERT IGNORE INTO t11 VALUES("MySQL"); # ----------------------------------------------------------------------- # Tests to show sub-statements for following statements are not diff --git a/mysql-test/suite/perfschema/r/binlog_mix.result b/mysql-test/suite/perfschema/r/binlog_mix.result index f5964db4c28..5d7d715ceea 100644 --- a/mysql-test/suite/perfschema/r/binlog_mix.result +++ b/mysql-test/suite/perfschema/r/binlog_mix.result @@ -35,10 +35,16 @@ master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id intege master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table test.t2 (name varchar(128)) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into test.t1 +select thread_id from performance_schema.events_waits_current master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into test.t2 +select name from performance_schema.setup_instruments +where name like "wait/synch/rwlock/sql/%" + and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock") master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/perfschema/r/binlog_row.result b/mysql-test/suite/perfschema/r/binlog_row.result index 629421abd83..59b1b290cc6 100644 --- a/mysql-test/suite/perfschema/r/binlog_row.result +++ b/mysql-test/suite/perfschema/r/binlog_row.result @@ -35,10 +35,16 @@ master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id intege master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table test.t2 (name varchar(128)) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into test.t1 +select thread_id from performance_schema.events_waits_current master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into test.t2 +select name from performance_schema.setup_instruments +where name like "wait/synch/rwlock/sql/%" + and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock") master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/perfschema/r/digest_table_full.result b/mysql-test/suite/perfschema/r/digest_table_full.result index f52b78c9f7d..5c8d2eb23d1 100644 --- a/mysql-test/suite/perfschema/r/digest_table_full.result +++ b/mysql-test/suite/perfschema/r/digest_table_full.result @@ -79,7 +79,7 @@ CREATE TABLE dup_table (c char(4)); CREATE TABLE dup_table (c char(4)); ERROR 42S01: Table 'dup_table' already exists DROP TABLE dup_table; -INSERT INTO t11 VALUES("MySQL"); +INSERT IGNORE INTO t11 VALUES("MySQL"); Warnings: Warning 1265 Data truncated for column 'c' at row 1 PREPARE stmt FROM "SELECT * FROM t12"; diff --git a/mysql-test/suite/perfschema/r/dml_setup_objects.result b/mysql-test/suite/perfschema/r/dml_setup_objects.result index b5681706d46..a505501c8b6 100644 --- a/mysql-test/suite/perfschema/r/dml_setup_objects.result +++ b/mysql-test/suite/perfschema/r/dml_setup_objects.result @@ -14,10 +14,12 @@ OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED select * from performance_schema.setup_objects order by object_type, object_schema, object_name; OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED +set sql_mode= ''; insert into performance_schema.setup_objects set object_type='ILLEGAL', object_schema='FOO', object_name='BAR', enabled='YES', timed='YES'; ERROR 23000: Cannot add or update a child row: a foreign key constraint fails +set sql_mode= DEFAULT; insert into performance_schema.setup_objects set object_type='TABLE', object_schema='FOO', object_name='BAR', enabled='YES', timed='YES'; @@ -37,6 +39,7 @@ select * from performance_schema.setup_objects order by object_type, object_schema, object_name; OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED TABLE FOO BAR NO YES +set statement sql_mode = '' for update performance_schema.setup_objects set object_type='ILLEGAL'; ERROR HY000: Invalid performance_schema usage diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result index f1f0946cb90..aeacd0ba011 100644 --- a/mysql-test/suite/perfschema/r/privilege_table_io.result +++ b/mysql-test/suite/perfschema/r/privilege_table_io.result @@ -15,6 +15,7 @@ optimize table mysql.proxies_priv; optimize table mysql.tables_priv; optimize table mysql.procs_priv; optimize table mysql.servers; +optimize table mysql.roles_mapping; update performance_schema.setup_consumers set enabled='YES'; update performance_schema.setup_objects set enabled='YES' where object_type='TABLE' and object_schema= 'mysql'; diff --git a/mysql-test/suite/perfschema/r/setup_objects.result b/mysql-test/suite/perfschema/r/setup_objects.result index 94ef4baab29..c29aaa2114f 100644 --- a/mysql-test/suite/perfschema/r/setup_objects.result +++ b/mysql-test/suite/perfschema/r/setup_objects.result @@ -25,6 +25,7 @@ insert into performance_schema.setup_objects values ('TABLE', 'db4', 't1', 'NO', 'YES'); insert into performance_schema.setup_objects values ('TABLE', 'db4', '%', 'YES', 'NO'); +set sql_mode= ''; insert into performance_schema.setup_objects values ('SOMETHING', 'bad1', 'bad1', 'YES', 'NO'); ERROR 23000: Cannot add or update a child row: a foreign key constraint fails @@ -81,6 +82,7 @@ TABLE db3 t1 YES YES TABLE db3 t2 NO NO TABLE db4 % YES NO TABLE db4 t1 NO YES +set sql_mode= DEFAULT; drop database if exists db1; drop database if exists db2; drop database if exists db3; diff --git a/mysql-test/suite/perfschema/r/start_server_no_digests.result b/mysql-test/suite/perfschema/r/start_server_no_digests.result index e4b389716a9..f8301e62a7f 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_digests.result +++ b/mysql-test/suite/perfschema/r/start_server_no_digests.result @@ -79,7 +79,7 @@ CREATE TABLE dup_table (c char(4)); CREATE TABLE dup_table (c char(4)); ERROR 42S01: Table 'dup_table' already exists DROP TABLE dup_table; -INSERT INTO t11 VALUES("MySQL"); +INSERT IGNORE INTO t11 VALUES("MySQL"); Warnings: Warning 1265 Data truncated for column 'c' at row 1 PREPARE stmt FROM "SELECT * FROM t12"; diff --git a/mysql-test/suite/perfschema/r/statement_digest.result b/mysql-test/suite/perfschema/r/statement_digest.result index 6abe865f1aa..ba2e5069c9a 100644 --- a/mysql-test/suite/perfschema/r/statement_digest.result +++ b/mysql-test/suite/perfschema/r/statement_digest.result @@ -79,7 +79,7 @@ CREATE TABLE dup_table (c char(4)); CREATE TABLE dup_table (c char(4)); ERROR 42S01: Table 'dup_table' already exists DROP TABLE dup_table; -INSERT INTO t11 VALUES("MySQL"); +INSERT IGNORE INTO t11 VALUES("MySQL"); Warnings: Warning 1265 Data truncated for column 'c' at row 1 PREPARE stmt FROM "SELECT * FROM t12"; @@ -133,7 +133,7 @@ statements_digest DROP SCHEMA `statements_digest_temp` 2 0 0 0 statements_digest SELECT ? FROM `no_such_table` 1 0 0 1 statements_digest CREATE TABLE `dup_table` ( `c` CHARACTER (?) ) 2 0 0 1 statements_digest DROP TABLE `dup_table` 1 0 0 0 -statements_digest INSERT INTO `t11` VALUES (?) 1 1 1 0 +statements_digest INSERT IGNORE INTO `t11` VALUES (?) 1 1 1 0 statements_digest SHOW WARNINGS 1 0 0 0 statements_digest PREPARE `stmt` FROM ? 1 0 0 0 statements_digest EXECUTE `stmt` 2 0 0 0 diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers.result b/mysql-test/suite/perfschema/r/statement_digest_consumers.result index db60362dd92..140c26f4edd 100644 --- a/mysql-test/suite/perfschema/r/statement_digest_consumers.result +++ b/mysql-test/suite/perfschema/r/statement_digest_consumers.result @@ -93,7 +93,7 @@ CREATE TABLE dup_table (c char(4)); CREATE TABLE dup_table (c char(4)); ERROR 42S01: Table 'dup_table' already exists DROP TABLE dup_table; -INSERT INTO t11 VALUES("MySQL"); +INSERT IGNORE INTO t11 VALUES("MySQL"); Warnings: Warning 1265 Data truncated for column 'c' at row 1 PREPARE stmt FROM "SELECT * FROM t12"; @@ -146,7 +146,7 @@ statements_digest DROP SCHEMA `statements_digest_temp` 2 statements_digest SELECT ? FROM `no_such_table` 1 statements_digest CREATE TABLE `dup_table` ( `c` CHARACTER (?) ) 2 statements_digest DROP TABLE `dup_table` 1 -statements_digest INSERT INTO `t11` VALUES (?) 1 +statements_digest INSERT IGNORE INTO `t11` VALUES (?) 1 statements_digest SHOW WARNINGS 1 statements_digest PREPARE `stmt` FROM ? 1 statements_digest EXECUTE `stmt` 2 diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers2.result b/mysql-test/suite/perfschema/r/statement_digest_consumers2.result index 434914c65e7..54eba51c1ed 100644 --- a/mysql-test/suite/perfschema/r/statement_digest_consumers2.result +++ b/mysql-test/suite/perfschema/r/statement_digest_consumers2.result @@ -93,7 +93,7 @@ CREATE TABLE dup_table (c char(4)); CREATE TABLE dup_table (c char(4)); ERROR 42S01: Table 'dup_table' already exists DROP TABLE dup_table; -INSERT INTO t11 VALUES("MySQL"); +INSERT IGNORE INTO t11 VALUES("MySQL"); Warnings: Warning 1265 Data truncated for column 'c' at row 1 PREPARE stmt FROM "SELECT * FROM t12"; diff --git a/mysql-test/suite/perfschema/t/dml_setup_objects.test b/mysql-test/suite/perfschema/t/dml_setup_objects.test index 29594bf32f9..ac7b5fd35bb 100644 --- a/mysql-test/suite/perfschema/t/dml_setup_objects.test +++ b/mysql-test/suite/perfschema/t/dml_setup_objects.test @@ -26,10 +26,12 @@ select * from performance_schema.setup_objects select * from performance_schema.setup_objects order by object_type, object_schema, object_name; +set sql_mode= ''; --error ER_NO_REFERENCED_ROW_2 insert into performance_schema.setup_objects set object_type='ILLEGAL', object_schema='FOO', object_name='BAR', enabled='YES', timed='YES'; +set sql_mode= DEFAULT; insert into performance_schema.setup_objects set object_type='TABLE', object_schema='FOO', object_name='BAR', @@ -54,6 +56,7 @@ select * from performance_schema.setup_objects order by object_type, object_schema, object_name; --error ER_WRONG_PERFSCHEMA_USAGE +set statement sql_mode = '' for update performance_schema.setup_objects set object_type='ILLEGAL'; diff --git a/mysql-test/suite/perfschema/t/privilege_table_io.test b/mysql-test/suite/perfschema/t/privilege_table_io.test index 35c49bf33fb..8f06be5075e 100644 --- a/mysql-test/suite/perfschema/t/privilege_table_io.test +++ b/mysql-test/suite/perfschema/t/privilege_table_io.test @@ -24,6 +24,7 @@ optimize table mysql.proxies_priv; optimize table mysql.tables_priv; optimize table mysql.procs_priv; optimize table mysql.servers; +optimize table mysql.roles_mapping; --enable_result_log # Start recording events diff --git a/mysql-test/suite/perfschema/t/setup_objects.test b/mysql-test/suite/perfschema/t/setup_objects.test index cd1b4ce80e0..eb22953b1a6 100644 --- a/mysql-test/suite/perfschema/t/setup_objects.test +++ b/mysql-test/suite/perfschema/t/setup_objects.test @@ -49,6 +49,7 @@ insert into performance_schema.setup_objects # Also test insert of invalid enum values +set sql_mode= ''; --error ER_NO_REFERENCED_ROW_2 insert into performance_schema.setup_objects values ('SOMETHING', 'bad1', 'bad1', 'YES', 'NO'); @@ -88,6 +89,7 @@ update performance_schema.setup_objects select * from performance_schema.setup_objects order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME; +set sql_mode= DEFAULT; --disable_warnings drop database if exists db1; diff --git a/mysql-test/suite/plugins/r/audit_null_debug.result b/mysql-test/suite/plugins/r/audit_null_debug.result index 840d4307fb3..9d5c7c4a02c 100644 --- a/mysql-test/suite/plugins/r/audit_null_debug.result +++ b/mysql-test/suite/plugins/r/audit_null_debug.result @@ -1,5 +1,6 @@ set @old_dbug=@@debug_dbug; call mtr.add_suppression("Index for table.*mysql.plugin.MYI"); +call mtr.add_suppression("Index for table 'plugin' is corrupt; try to repair it"); SET debug_dbug='+d,myisam_pretend_crashed_table_on_usage'; install plugin audit_null soname 'adt_null'; ERROR HY000: Index for table './mysql/plugin.MYI' is corrupt; try to repair it diff --git a/mysql-test/suite/plugins/r/qc_info.result b/mysql-test/suite/plugins/r/qc_info.result index 3115a372930..f9192d1dfec 100644 --- a/mysql-test/suite/plugins/r/qc_info.result +++ b/mysql-test/suite/plugins/r/qc_info.result @@ -28,7 +28,7 @@ set time_zone= @time_zone, default_week_format= @default_week_format, character_ select * from information_schema.query_cache_info; STATEMENT_SCHEMA STATEMENT_TEXT RESULT_BLOCKS_COUNT RESULT_BLOCKS_SIZE RESULT_BLOCKS_SIZE_USED LIMIT MAX_SORT_LENGTH GROUP_CONCAT_MAX_LENGTH CHARACTER_SET_CLIENT CHARACTER_SET_RESULT COLLATION TIMEZONE DEFAULT_WEEK_FORMAT DIV_PRECISION_INCREMENT SQL_MODE LC_TIME_NAMES CLIENT_LONG_FLAG CLIENT_PROTOCOL_41 PROTOCOL_TYPE MORE_RESULTS_EXISTS IN_TRANS AUTOCOMMIT PACKET_NUMBER test select * from t1 1 512 # -1 1011 513 binary utf32 utf32_bin Europe/Moscow 4 7 STRICT_ALL_TABLES ar_SD 1 1 # 0 0 0 # -test select * from t1 1 512 # -1 1024 1024 latin1 latin1 latin1_swedish_ci SYSTEM 0 4 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION en_US 1 1 # 0 0 1 # +test select * from t1 1 512 # -1 1024 1048576 latin1 latin1 latin1_swedish_ci SYSTEM 0 4 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION en_US 1 1 # 0 0 1 # drop table t1; select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info; statement_schema statement_text result_blocks_count result_blocks_size diff --git a/mysql-test/suite/plugins/r/qc_info_priv.result b/mysql-test/suite/plugins/r/qc_info_priv.result index 83a84bb76e9..93fee5837f6 100644 --- a/mysql-test/suite/plugins/r/qc_info_priv.result +++ b/mysql-test/suite/plugins/r/qc_info_priv.result @@ -28,7 +28,7 @@ set time_zone= @time_zone, default_week_format= @default_week_format, character_ select * from information_schema.query_cache_info; STATEMENT_SCHEMA STATEMENT_TEXT RESULT_BLOCKS_COUNT RESULT_BLOCKS_SIZE RESULT_BLOCKS_SIZE_USED LIMIT MAX_SORT_LENGTH GROUP_CONCAT_MAX_LENGTH CHARACTER_SET_CLIENT CHARACTER_SET_RESULT COLLATION TIMEZONE DEFAULT_WEEK_FORMAT DIV_PRECISION_INCREMENT SQL_MODE LC_TIME_NAMES CLIENT_LONG_FLAG CLIENT_PROTOCOL_41 PROTOCOL_TYPE MORE_RESULTS_EXISTS IN_TRANS AUTOCOMMIT PACKET_NUMBER test select * from t1 1 512 # -1 1011 513 binary utf32 utf32_bin Europe/Moscow 4 7 STRICT_ALL_TABLES ar_SD 1 1 # 0 0 0 # -test select * from t1 1 512 # -1 1024 1024 latin1 latin1 latin1_swedish_ci SYSTEM 0 4 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION en_US 1 1 # 0 0 1 # +test select * from t1 1 512 # -1 1024 1048576 latin1 latin1 latin1_swedish_ci SYSTEM 0 4 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION en_US 1 1 # 0 0 1 # create user mysqltest; connect conn1,localhost,mysqltest,,; connection conn1; diff --git a/mysql-test/suite/plugins/t/audit_null_debug.test b/mysql-test/suite/plugins/t/audit_null_debug.test index 2c457df4759..0534108b107 100644 --- a/mysql-test/suite/plugins/t/audit_null_debug.test +++ b/mysql-test/suite/plugins/t/audit_null_debug.test @@ -7,6 +7,7 @@ if (!$ADT_NULL_SO) { set @old_dbug=@@debug_dbug; call mtr.add_suppression("Index for table.*mysql.plugin.MYI"); +call mtr.add_suppression("Index for table 'plugin' is corrupt; try to repair it"); # # MySQL BUG#14485479 - INSTALL AUDIT PLUGIN HANGS IF WE TRY TO DISABLE AND ENABLED DURING DDL OPERATION diff --git a/mysql-test/suite/roles/definer.result b/mysql-test/suite/roles/definer.result index 8346171ba3f..f7f3e946809 100644 --- a/mysql-test/suite/roles/definer.result +++ b/mysql-test/suite/roles/definer.result @@ -109,7 +109,7 @@ create definer=current_role trigger tr1 before insert on t2 for each row insert t1 values (111, 222, 333); show create trigger tr1; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -tr1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` trigger tr1 before insert on t2 for each row +tr1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` trigger tr1 before insert on t2 for each row insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci # set role none; insert t2 values (11,22,33); @@ -126,7 +126,7 @@ create definer=role2 trigger tr2 before delete on t2 for each row insert t1 values (111, 222, 333); show create trigger tr2; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -tr2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2` trigger tr2 before delete on t2 for each row +tr2 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2` trigger tr2 before delete on t2 for each row insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci # delete from t2 where a=1; select * from t1; @@ -144,7 +144,7 @@ Warnings: Note 1449 The user specified as a definer ('role3'@'%') does not exist show create trigger tr3; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -tr3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role3`@`%` trigger tr3 before update on t2 for each row +tr3 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role3`@`%` trigger tr3 before update on t2 for each row insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci # update t2 set b=2 where a=2; ERROR HY000: The user specified as a definer ('role3'@'%') does not exist @@ -158,7 +158,7 @@ a b c flush tables; show create trigger tr2; Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created -tr2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2`@`` trigger tr2 before delete on t2 for each row +tr2 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2`@`` trigger tr2 before delete on t2 for each row insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci # delete from t2 where a=2; ERROR HY000: The user specified as a definer ('role2'@'%') does not exist @@ -175,7 +175,7 @@ set role role1; create definer=current_role procedure pr1() insert t1 values (111, 222, 333); show create procedure pr1; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -pr1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pr1`() +pr1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pr1`() insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci set role none; call pr1(); @@ -187,7 +187,7 @@ a b c create definer=role2 procedure pr2() insert t1 values (111, 222, 333); show create procedure pr2; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -pr2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2` PROCEDURE `pr2`() +pr2 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2` PROCEDURE `pr2`() insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci call pr2(); select * from t1; @@ -201,7 +201,7 @@ Warnings: Note 1449 The user specified as a definer ('role3'@'%') does not exist show create procedure pr3; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -pr3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role3`@`%` PROCEDURE `pr3`() +pr3 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role3`@`%` PROCEDURE `pr3`() insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci call pr3(); ERROR HY000: The user specified as a definer ('role3'@'%') does not exist @@ -218,7 +218,7 @@ set role role1; create definer=current_role function fn1() returns int return (select sum(a+b) from t1); show create function fn1; Function sql_mode Create Function character_set_client collation_connection Database Collation -fn1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` FUNCTION `fn1`() RETURNS int(11) +fn1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` FUNCTION `fn1`() RETURNS int(11) return (select sum(a+b) from t1) latin1 latin1_swedish_ci latin1_swedish_ci set role none; select fn1(); @@ -230,7 +230,7 @@ a b c create definer=role2 function fn2() returns int return (select sum(a+b) from t1); show create function fn2; Function sql_mode Create Function character_set_client collation_connection Database Collation -fn2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2` FUNCTION `fn2`() RETURNS int(11) +fn2 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2` FUNCTION `fn2`() RETURNS int(11) return (select sum(a+b) from t1) latin1 latin1_swedish_ci latin1_swedish_ci select fn2(); fn2() @@ -240,7 +240,7 @@ Warnings: Note 1449 The user specified as a definer ('role3'@'%') does not exist show create function fn3; Function sql_mode Create Function character_set_client collation_connection Database Collation -fn3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role3`@`%` FUNCTION `fn3`() RETURNS int(11) +fn3 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role3`@`%` FUNCTION `fn3`() RETURNS int(11) return (select sum(a+b) from t1) latin1 latin1_swedish_ci latin1_swedish_ci select fn3(); ERROR HY000: The user specified as a definer ('role3'@'%') does not exist @@ -253,7 +253,7 @@ create definer=current_role event e1 on schedule every 1 second starts '2000-01- insert t1 values (111, 2, 0); show create event e1; Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation -e1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`role1` EVENT `e1` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 2, 0) latin1 latin1_swedish_ci latin1_swedish_ci +e1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`role1` EVENT `e1` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 2, 0) latin1 latin1_swedish_ci latin1_swedish_ci set role none; create definer=role3 event e3 on schedule every 1 second starts '2000-01-01' do insert t1 values (111, 3, 0); @@ -261,12 +261,12 @@ Warnings: Note 1449 The user specified as a definer ('role3'@'%') does not exist show create event e3; Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation -e3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`role3`@`%` EVENT `e3` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 3, 0) latin1 latin1_swedish_ci latin1_swedish_ci +e3 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`role3`@`%` EVENT `e3` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 3, 0) latin1 latin1_swedish_ci latin1_swedish_ci create definer=role2 event e2 on schedule every 1 second starts '2000-01-01' do insert t1 values (111, 4, 0); show create event e2; Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation -e2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`role2` EVENT `e2` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 4, 0) latin1 latin1_swedish_ci latin1_swedish_ci +e2 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`role2` EVENT `e2` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 4, 0) latin1 latin1_swedish_ci latin1_swedish_ci set global event_scheduler=off; select distinct * from t1; a b c @@ -343,7 +343,7 @@ INSERT INTO `t2` VALUES (2,20,200); /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`role1`*/ /*!50003 trigger tr1 before insert on t2 for each row insert t1 values (111, 222, 333) */;; @@ -359,7 +359,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`role3`@`%`*/ /*!50003 trigger tr3 before update on t2 for each row insert t1 values (111, 222, 333) */;; @@ -375,7 +375,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`role2`@``*/ /*!50003 trigger tr2 before delete on t2 for each row insert t1 values (111, 222, 333) */;; @@ -393,7 +393,7 @@ DELIMITER ;; /*!50003 SET character_set_results = latin1 */ ;; /*!50003 SET collation_connection = latin1_swedish_ci */ ;; /*!50003 SET @saved_sql_mode = @@sql_mode */ ;; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;; /*!50003 SET @saved_time_zone = @@time_zone */ ;; /*!50003 SET time_zone = 'SYSTEM' */ ;; /*!50106 CREATE*/ /*!50117 DEFINER=`role1`*/ /*!50106 EVENT `e1` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 2, 0) */ ;; @@ -410,7 +410,7 @@ DELIMITER ;; /*!50003 SET character_set_results = latin1 */ ;; /*!50003 SET collation_connection = latin1_swedish_ci */ ;; /*!50003 SET @saved_sql_mode = @@sql_mode */ ;; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;; /*!50003 SET @saved_time_zone = @@time_zone */ ;; /*!50003 SET time_zone = 'SYSTEM' */ ;; /*!50106 CREATE*/ /*!50117 DEFINER=`role2`*/ /*!50106 EVENT `e2` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 4, 0) */ ;; @@ -427,7 +427,7 @@ DELIMITER ;; /*!50003 SET character_set_results = latin1 */ ;; /*!50003 SET collation_connection = latin1_swedish_ci */ ;; /*!50003 SET @saved_sql_mode = @@sql_mode */ ;; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;; /*!50003 SET @saved_time_zone = @@time_zone */ ;; /*!50003 SET time_zone = 'SYSTEM' */ ;; /*!50106 CREATE*/ /*!50117 DEFINER=`role3`@`%`*/ /*!50106 EVENT `e3` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 3, 0) */ ;; @@ -445,7 +445,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`role1` FUNCTION `fn1`() RETURNS int(11) return (select sum(a+b) from t1) ;; @@ -461,7 +461,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`role2` FUNCTION `fn2`() RETURNS int(11) return (select sum(a+b) from t1) ;; @@ -477,7 +477,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`role3`@`%` FUNCTION `fn3`() RETURNS int(11) return (select sum(a+b) from t1) ;; @@ -493,7 +493,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`role1` PROCEDURE `pr1`() insert t1 values (111, 222, 333) ;; @@ -509,7 +509,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`role2`@`%` PROCEDURE `pr2`() insert t1 values (111, 222, 333) ;; @@ -525,7 +525,7 @@ DELIMITER ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE DEFINER=`role3`@`%` PROCEDURE `pr3`() insert t1 values (111, 222, 333) ;; diff --git a/mysql-test/suite/roles/none_public.result b/mysql-test/suite/roles/none_public.result index 9e2c680aad1..5dd1480e8c3 100644 --- a/mysql-test/suite/roles/none_public.result +++ b/mysql-test/suite/roles/none_public.result @@ -43,7 +43,7 @@ drop role role1; optimize table mysql.user; Table Op Msg_type Msg_text mysql.user optimize status OK -insert mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y'); +insert ignore mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y'); Warnings: Warning 1364 Field 'ssl_cipher' doesn't have a default value Warning 1364 Field 'x509_issuer' doesn't have a default value diff --git a/mysql-test/suite/roles/none_public.test b/mysql-test/suite/roles/none_public.test index 8e370d80007..838a4955df5 100644 --- a/mysql-test/suite/roles/none_public.test +++ b/mysql-test/suite/roles/none_public.test @@ -51,7 +51,7 @@ create definer=public view test.v1 as select 1; drop role role1; optimize table mysql.user; # to remove deleted rows and have stable row order -insert mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y'); +insert ignore mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y'); flush privileges; delete from mysql.user where is_role='Y'; diff --git a/mysql-test/suite/roles/rpl_definer.result b/mysql-test/suite/roles/rpl_definer.result index f4cc5dad39e..2d10dc6cd7a 100644 --- a/mysql-test/suite/roles/rpl_definer.result +++ b/mysql-test/suite/roles/rpl_definer.result @@ -21,19 +21,19 @@ create definer=current_role procedure pcr() select current_role; create definer=role1 procedure pr() select "role1"; show create procedure pcu; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -pcu NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pcu`() +pcu STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pcu`() select current_user latin1 latin1_swedish_ci latin1_swedish_ci show create procedure pu; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -pu NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pu`() +pu STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pu`() select "root@localhost" latin1 latin1_swedish_ci latin1_swedish_ci show create procedure pcr; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -pcr NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pcr`() +pcr STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pcr`() select current_role latin1 latin1_swedish_ci latin1_swedish_ci show create procedure pr; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -pr NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pr`() +pr STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pr`() select "role1" latin1 latin1_swedish_ci latin1_swedish_ci connection slave; set role role1; @@ -49,19 +49,19 @@ GRANT role2 TO 'role1' GRANT role2 TO 'root'@'localhost' WITH ADMIN OPTION show create procedure pcu; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -pcu NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pcu`() +pcu STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pcu`() select current_user latin1 latin1_swedish_ci latin1_swedish_ci show create procedure pu; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -pu NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pu`() +pu STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pu`() select "root@localhost" latin1 latin1_swedish_ci latin1_swedish_ci show create procedure pcr; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -pcr NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pcr`() +pcr STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pcr`() select current_role latin1 latin1_swedish_ci latin1_swedish_ci show create procedure pr; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -pr NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pr`() +pr STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pr`() select "role1" latin1 latin1_swedish_ci latin1_swedish_ci connection master; drop procedure pcu; diff --git a/mysql-test/suite/roles/set_default_role_for.result b/mysql-test/suite/roles/set_default_role_for.result index 947275dadab..9880671ba09 100644 --- a/mysql-test/suite/roles/set_default_role_for.result +++ b/mysql-test/suite/roles/set_default_role_for.result @@ -44,7 +44,7 @@ GRANT USAGE ON *.* TO 'user_b'@'localhost' GRANT INSERT, UPDATE ON *.* TO 'role_b' select user, host, default_role from mysql.user where user like 'user_%'; ERROR 42000: SELECT command denied to user 'user_b'@'localhost' for table 'user' -insert into mysql.user (user, host) values ('someuser', 'somehost'); +insert ignore into mysql.user (user, host) values ('someuser', 'somehost'); Warnings: Warning 1364 Field 'ssl_cipher' doesn't have a default value Warning 1364 Field 'x509_issuer' doesn't have a default value diff --git a/mysql-test/suite/roles/set_default_role_for.test b/mysql-test/suite/roles/set_default_role_for.test index de35b529ce6..985eaa16e3d 100644 --- a/mysql-test/suite/roles/set_default_role_for.test +++ b/mysql-test/suite/roles/set_default_role_for.test @@ -66,7 +66,7 @@ show grants; select user, host, default_role from mysql.user where user like 'user_%'; # Make sure the default role setting worked from root. -insert into mysql.user (user, host) values ('someuser', 'somehost'); +insert ignore into mysql.user (user, host) values ('someuser', 'somehost'); # Since we have update privileges on the mysql.user table, we should # be able to set a default role for a different user. set default role NONE for user_a@localhost; diff --git a/mysql-test/suite/rpl/disabled.def b/mysql-test/suite/rpl/disabled.def index de3091a56e5..e37ad842790 100644 --- a/mysql-test/suite/rpl/disabled.def +++ b/mysql-test/suite/rpl/disabled.def @@ -13,3 +13,7 @@ rpl_spec_variables : BUG#11755836 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition with archive table +rpl_row_binlog_max_cache_size : MDEV-11092 +rpl_blackhole : MDEV-11094 +rpl_row_mysqlbinlog : MDEV-11095 +rpl_row_index_choice : MDEV-11666 diff --git a/mysql-test/suite/rpl/r/create_or_replace_mix.result b/mysql-test/suite/rpl/r/create_or_replace_mix.result index 9029156c625..6ad37ab5e46 100644 --- a/mysql-test/suite/rpl/r/create_or_replace_mix.result +++ b/mysql-test/suite/rpl/r/create_or_replace_mix.result @@ -157,6 +157,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) +slave-bin.000001 # Annotate_rows # # create table t2 select * from t9 slave-bin.000001 # Table_map # # table_id: # (test.t2) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -168,6 +169,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE `t5` ( `a` int(11) DEFAULT NULL ) +slave-bin.000001 # Annotate_rows # # create table t5 select * from t9 slave-bin.000001 # Table_map # # table_id: # (test.t5) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -221,6 +223,7 @@ Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; create table t1 (a int) slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # insert into t1 values (0),(1),(2) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -228,6 +231,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM +slave-bin.000001 # Annotate_rows # # create table t2 engine=myisam select * from t1 slave-bin.000001 # Table_map # # table_id: # (test.t2) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -235,6 +239,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB +slave-bin.000001 # Annotate_rows # # create or replace table t2 engine=innodb select * from t1 slave-bin.000001 # Table_map # # table_id: # (test.t2) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/rpl/r/create_or_replace_row.result b/mysql-test/suite/rpl/r/create_or_replace_row.result index 78477ca4c73..ad7a537a2c9 100644 --- a/mysql-test/suite/rpl/r/create_or_replace_row.result +++ b/mysql-test/suite/rpl/r/create_or_replace_row.result @@ -19,6 +19,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=myisam master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2 values (0),(1),(2),(2) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -26,6 +27,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE `t1` ( `f1` int(1) NOT NULL ) +master-bin.000001 # Annotate_rows # # CREATE TABLE t1 AS SELECT 1 AS f1 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -33,6 +35,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( `f1` int(1) NOT NULL ) +master-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 AS SELECT 2 AS f1 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -51,6 +54,7 @@ Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; create table t2 (a int) engine=myisam slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # insert into t2 values (0),(1),(2),(2) slave-bin.000001 # Table_map # # table_id: # (test.t2) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -60,6 +64,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE `t1` ( `f1` int(1) NOT NULL ) +slave-bin.000001 # Annotate_rows # # CREATE TABLE t1 AS SELECT 1 AS f1 slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -67,6 +72,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` ( `f1` int(1) NOT NULL ) +slave-bin.000001 # Annotate_rows # # CREATE OR REPLACE TABLE t1 AS SELECT 2 AS f1 slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -179,6 +185,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) +slave-bin.000001 # Annotate_rows # # create table t2 select * from t9 slave-bin.000001 # Table_map # # table_id: # (test.t2) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -190,6 +197,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE `t5` ( `a` int(11) DEFAULT NULL ) +slave-bin.000001 # Annotate_rows # # create table t5 select * from t9 slave-bin.000001 # Table_map # # table_id: # (test.t5) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -243,6 +251,7 @@ Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; create table t1 (a int) slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # insert into t1 values (0),(1),(2) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -250,6 +259,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM +slave-bin.000001 # Annotate_rows # # create table t2 engine=myisam select * from t1 slave-bin.000001 # Table_map # # table_id: # (test.t2) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -257,6 +267,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t2` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB +slave-bin.000001 # Annotate_rows # # create or replace table t2 engine=innodb select * from t1 slave-bin.000001 # Table_map # # table_id: # (test.t2) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result b/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result index 14286aa5aa0..ac610241bd1 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result @@ -49,12 +49,14 @@ master-bin.000001 # Intvar # # INSERT_ID=5 master-bin.000001 # Query # # use `test`; insert into t4(a) values(3) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1(a,b) values(1,1),(2,1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # insert into t3(a,b) values(1,1),(2,1) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t5) master-bin.000001 # Table_map # # table_id: # (test.t4) @@ -77,12 +79,14 @@ master-bin.000001 # Query # # use `test`; delete from t1 where b = 1 master-bin.000001 # Query # # use `test`; delete from t3 where b = 1 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1(a,b) values(4,2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t3(a,b) values(4,2) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t5) master-bin.000001 # Table_map # # table_id: # (test.t4) @@ -172,12 +176,14 @@ master-bin.000001 # Intvar # # INSERT_ID=5 master-bin.000001 # Query # # use `test`; insert into t4(a) values(3) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2(a) values(6) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO t6(a) values(2),(3) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t5) master-bin.000001 # Table_map # # table_id: # (test.t4) @@ -200,12 +206,14 @@ master-bin.000001 # Query # # use `test`; delete from t1 where b = 1 master-bin.000001 # Query # # use `test`; delete from t3 where b = 1 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2(a) values(6) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t6(a) values(2),(3) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t5) master-bin.000001 # Table_map # # table_id: # (test.t4) @@ -297,12 +305,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; insert into t1(a,b) values(1,1),(2,1) master-bin.000001 # Query # # use `test`; insert into t3(a,b) values(1,1),(2,1) +master-bin.000001 # Annotate_rows # # update t1 set a = a + 5 where b = 1 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Update_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Update_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # update t3 set a = a + 5 where b = 1 master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t5) master-bin.000001 # Table_map # # table_id: # (test.t4) @@ -329,12 +339,14 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; insert into t3(a,b) values(4,2) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # update t1 set a = a + 5 where b = 2 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Update_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # update t3 set a = a + 5 where b = 2 master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t5) master-bin.000001 # Table_map # # table_id: # (test.t4) @@ -420,12 +432,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; insert into t1(a,b) values(1,1),(2,1) master-bin.000001 # Query # # use `test`; insert into t3(a,b) values(1,1),(2,1) +master-bin.000001 # Annotate_rows # # insert into t2(a) values(6) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Update_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO t6(a) values(2),(3) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t5) master-bin.000001 # Table_map # # table_id: # (test.t4) @@ -452,12 +466,14 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; insert into t3(a,b) values(4,2) master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2(a) values(6) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t6(a) values(2),(3) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t5) master-bin.000001 # Table_map # # table_id: # (test.t4) @@ -545,12 +561,14 @@ master-bin.000001 # Query # # use `test`; insert into t1(a,b) values(1,1),(2,1) master-bin.000001 # Query # # use `test`; insert into t3(a,b) values(1,1),(2,1) master-bin.000001 # Query # # use `test`; update t1 set a = a + 5 where b = 1 master-bin.000001 # Query # # use `test`; update t3 set a = a + 5 where b = 1 +master-bin.000001 # Annotate_rows # # delete from t1 where b = 1 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Delete_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Delete_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # delete from t3 where b = 1 master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t5) master-bin.000001 # Table_map # # table_id: # (test.t4) @@ -581,12 +599,14 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; update t3 set a = a + 5 where b = 2 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # delete from t1 where b = 2 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Delete_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # delete from t3 where b = 2 master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t5) master-bin.000001 # Table_map # # table_id: # (test.t4) @@ -668,12 +688,14 @@ master-bin.000001 # Query # # use `test`; insert into t1(a,b) values(1,1),(2,1) master-bin.000001 # Query # # use `test`; insert into t3(a,b) values(1,1),(2,1) master-bin.000001 # Query # # use `test`; update t1 set a = a + 5 where b = 1 master-bin.000001 # Query # # use `test`; update t3 set a = a + 5 where b = 1 +master-bin.000001 # Annotate_rows # # insert into t2(a) values(6) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Delete_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO t6(a) values(2),(3) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t5) master-bin.000001 # Table_map # # table_id: # (test.t4) @@ -704,12 +726,14 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; update t3 set a = a + 5 where b = 2 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2(a) values(6) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t6(a) values(2),(3) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t5) master-bin.000001 # Table_map # # table_id: # (test.t4) @@ -764,6 +788,7 @@ insert into t1(a) values(f1_two_inserts_trigger()); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t2(a) values(4),(5) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -772,6 +797,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2(a) values(2),(3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) @@ -786,6 +812,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2(a) values(2),(3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) @@ -838,6 +865,7 @@ insert into t1(a) values(f1_two_inserts_trigger()); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t3(a) values(new.a) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -846,6 +874,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t3(a) values(new.a) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) @@ -860,6 +889,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t3(a) values(new.a) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) diff --git a/mysql-test/suite/rpl/r/rpl_binlog_errors.result b/mysql-test/suite/rpl/r/rpl_binlog_errors.result index a54b84227e5..06be72d523b 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_errors.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_errors.result @@ -9,7 +9,7 @@ connection master; call mtr.add_suppression("Can't generate a unique log-filename"); call mtr.add_suppression("Writing one row to the row-based binary log failed.*"); call mtr.add_suppression("Error writing file .*"); -SET @old_debug= @@global.debug; +SET @old_debug= @@global.debug_dbug; SELECT repeat('x',8192) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data'; SELECT repeat('x',10) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data'; RESET MASTER; @@ -88,6 +88,7 @@ DELETE FROM t2; RESET MASTER; ###################### TEST #7 SET GLOBAL debug_dbug="+d,error_unique_log_filename"; +SET @@binlog_annotate_row_events= 0; SELECT count(*) FROM t4; count(*) 0 @@ -179,7 +180,7 @@ Level Code Message SET GLOBAL debug_dbug="+d,fault_injection_registering_index"; FLUSH LOGS; ERROR HY000: Can't open file: 'master-bin.000002' (errno: 1 "Operation not permitted") -SET GLOBAL debug_dbug="-d,fault_injection_registering_index"; +SET GLOBAL debug_dbug=@old_debug; SHOW BINARY LOGS; ERROR HY000: You are not using binary logging CREATE TABLE t5 (a INT); @@ -188,12 +189,13 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +flush tables; ###################### TEST #11 include/rpl_restart_server.inc [server_number=1] SET GLOBAL debug_dbug="+d,fault_injection_openning_index"; FLUSH LOGS; ERROR HY000: Can't open file: 'master-bin.index' (errno: 1 "Operation not permitted") -SET GLOBAL debug_dbug="-d,fault_injection_openning_index"; +SET GLOBAL debug_dbug=@old_debug; RESET MASTER; ERROR HY000: Binlog closed, cannot RESET MASTER CREATE TABLE t5 (a INT); @@ -202,12 +204,13 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +flush tables; include/rpl_restart_server.inc [server_number=1] ###################### TEST #12 SET GLOBAL debug_dbug="+d,fault_injection_new_file_rotate_event"; FLUSH LOGS; ERROR HY000: Can't open file: 'master-bin' (errno: 2 "No such file or directory") -SET GLOBAL debug_dbug="-d,fault_injection_new_file_rotate_event"; +SET GLOBAL debug_dbug=@old_debug; RESET MASTER; ERROR HY000: Binlog closed, cannot RESET MASTER CREATE TABLE t5 (a INT); @@ -216,6 +219,7 @@ INSERT INTO t2 VALUES ('aaaaa'); DELETE FROM t4; DELETE FROM t2; DROP TABLE t5; +flush tables; include/rpl_restart_server.inc [server_number=1] DROP TABLE t1, t2, t4; RESET MASTER; diff --git a/mysql-test/suite/rpl/r/rpl_checksum_cache.result b/mysql-test/suite/rpl/r/rpl_checksum_cache.result index d3167496249..e8f221cc181 100644 --- a/mysql-test/suite/rpl/r/rpl_checksum_cache.result +++ b/mysql-test/suite/rpl/r/rpl_checksum_cache.result @@ -1,7 +1,7 @@ include/master-slave.inc [connection master] -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t2 set data=repeat.*'a', @act_size.*"); -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*"); +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. .*Statement: insert into t2 set data=repeat.*'a', @act_size.*"); +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. .*Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*"); connection master; set @save_binlog_cache_size = @@global.binlog_cache_size; set @save_binlog_checksum = @@global.binlog_checksum; diff --git a/mysql-test/suite/rpl/r/rpl_concurrency_error.result b/mysql-test/suite/rpl/r/rpl_concurrency_error.result index b95654d2245..c7f2d58e426 100644 --- a/mysql-test/suite/rpl/r/rpl_concurrency_error.result +++ b/mysql-test/suite/rpl/r/rpl_concurrency_error.result @@ -26,7 +26,7 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc connection conn2; SET AUTOCOMMIT = 1; BEGIN; -UPDATE t SET f = 'magenta 2' WHERE f = 'red'; +UPDATE IGNORE t SET f = 'magenta 2' WHERE f = 'red'; ERROR HY000: Lock wait timeout exceeded; try restarting transaction INSERT INTO t VALUES (5 + (2 * 10),"brown"); INSERT INTO n VALUES (now(),"brown"); @@ -45,7 +45,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 2' WHERE i = 3 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 2' WHERE f = 'red' +master-bin.000001 # Query # # use `test`; UPDATE IGNORE t SET f = 'magenta 2' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (2 * 10),"brown") master-bin.000001 # Query # # ROLLBACK connection conn1; @@ -57,7 +57,7 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc connection conn2; SET AUTOCOMMIT = 1; BEGIN; -UPDATE t SET f = 'dark blue 2' WHERE f = 'red'; +UPDATE IGNORE t SET f = 'dark blue 2' WHERE f = 'red'; ERROR HY000: Lock wait timeout exceeded; try restarting transaction INSERT INTO t VALUES (6 + (2 * 10),"brown"); INSERT INTO n VALUES (now(),"brown"); @@ -74,7 +74,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 2' WHERE i = 3 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 2' WHERE f = 'red' +master-bin.000001 # Query # # use `test`; UPDATE IGNORE t SET f = 'dark blue 2' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (2 * 10),"brown") master-bin.000001 # Xid # # COMMIT /* XID */ connection conn1; @@ -84,7 +84,7 @@ Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them connection conn2; SET AUTOCOMMIT = 0; -UPDATE t SET f = 'magenta 1' WHERE f = 'red'; +UPDATE IGNORE t SET f = 'magenta 1' WHERE f = 'red'; ERROR HY000: Lock wait timeout exceeded; try restarting transaction INSERT INTO t VALUES (5 + (1 * 10),"brown"); INSERT INTO n VALUES (now(),"brown"); @@ -103,7 +103,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 1' WHERE i = 3 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 1' WHERE f = 'red' +master-bin.000001 # Query # # use `test`; UPDATE IGNORE t SET f = 'magenta 1' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (1 * 10),"brown") master-bin.000001 # Query # # ROLLBACK connection conn1; @@ -113,7 +113,7 @@ Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them connection conn2; SET AUTOCOMMIT = 0; -UPDATE t SET f = 'dark blue 1' WHERE f = 'red'; +UPDATE IGNORE t SET f = 'dark blue 1' WHERE f = 'red'; ERROR HY000: Lock wait timeout exceeded; try restarting transaction INSERT INTO t VALUES (6 + (1 * 10),"brown"); INSERT INTO n VALUES (now(),"brown"); @@ -130,7 +130,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 1' WHERE i = 3 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# -master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f = 'red' +master-bin.000001 # Query # # use `test`; UPDATE IGNORE t SET f = 'dark blue 1' WHERE f = 'red' master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown") master-bin.000001 # Xid # # COMMIT /* XID */ connection master; diff --git a/mysql-test/suite/rpl/r/rpl_create_drop_function.result b/mysql-test/suite/rpl/r/rpl_create_drop_function.result index 744e747134d..312175fcf04 100644 --- a/mysql-test/suite/rpl/r/rpl_create_drop_function.result +++ b/mysql-test/suite/rpl/r/rpl_create_drop_function.result @@ -9,7 +9,7 @@ ERROR 42000: FUNCTION hello already exists connection slave; SHOW CREATE FUNCTION hello; Function sql_mode Create Function character_set_client collation_connection Database Collation -hello NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(str CHAR(20)) RETURNS char(50) CHARSET latin1 +hello STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(str CHAR(20)) RETURNS char(50) CHARSET latin1 DETERMINISTIC RETURN CONCAT('Hello, ', str, '!') latin1 latin1_swedish_ci latin1_swedish_ci diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index 67d1b51559b..aed8bba3bc0 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -148,7 +148,7 @@ GRANT EXECUTE, ALTER ROUTINE ON FUNCTION `bug42217_db`.`upgrade_del_func` TO 'cr USE bug42217_db; SHOW CREATE FUNCTION upgrade_del_func; Function sql_mode Create Function character_set_client collation_connection Database Collation -upgrade_del_func NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_del_func`() RETURNS char(30) CHARSET latin1 +upgrade_del_func STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_del_func`() RETURNS char(30) CHARSET latin1 BEGIN RETURN "INSIDE upgrade_del_func()"; END latin1 latin1_swedish_ci latin1_swedish_ci @@ -160,7 +160,7 @@ connection create_rout_db_slave; USE bug42217_db; SHOW CREATE FUNCTION upgrade_del_func; Function sql_mode Create Function character_set_client collation_connection Database Collation -upgrade_del_func NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_del_func`() RETURNS char(30) CHARSET latin1 +upgrade_del_func STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_del_func`() RETURNS char(30) CHARSET latin1 BEGIN RETURN "INSIDE upgrade_del_func()"; END latin1 latin1_swedish_ci latin1_swedish_ci @@ -189,7 +189,7 @@ INSIDE upgrade_alter_func() connection slave; SHOW CREATE FUNCTION upgrade_alter_func; Function sql_mode Create Function character_set_client collation_connection Database Collation -upgrade_alter_func NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_alter_func`() RETURNS char(30) CHARSET latin1 +upgrade_alter_func STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_alter_func`() RETURNS char(30) CHARSET latin1 BEGIN RETURN "INSIDE upgrade_alter_func()"; END latin1 latin1_swedish_ci latin1_swedish_ci diff --git a/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result b/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result index c89de06485c..457947cabe0 100644 --- a/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result +++ b/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result @@ -1,7 +1,7 @@ include/master-slave.inc [connection master] connection master; -call mtr.add_suppression("mysqld: Table './mysql/gtid_slave_pos' is marked as crashed and should be repaired"); +call mtr.add_suppression("mysqld: Table '.*gtid_slave_pos' is marked as crashed and should be repaired"); call mtr.add_suppression("Checking table: './mysql/gtid_slave_pos'"); call mtr.add_suppression("mysql.gtid_slave_pos: 1 client is using or hasn't closed the table properly"); SET @@session.gtid_domain_id= 0; diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result index 81302266d82..b59c21724b2 100644 --- a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result @@ -191,11 +191,11 @@ INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: binary data'; INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', +insert ignore into t31 set f1=1, f2=1, f3=2, f4='second', f9=2.2, f10='seven samurai', f28=222.222, f35='222'; Warnings: Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', +insert ignore into t31 values (1, 1, 3, 'third', /* f5 BIGINT, */ 333333333333333333333333, /* f6 BLOB, */ '3333333333333333333333', /* f7 DATE, */ '2007-07-18', @@ -231,7 +231,7 @@ INSERT into t31 values (1, 1, 3, 'third', Warnings: Warning 1264 Out of range value for column 'f5' at row 1 Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', +insert ignore into t31 values (1, 1, 4, 'fourth', /* f5 BIGINT, */ 333333333333333333333333, /* f6 BLOB, */ '3333333333333333333333', /* f7 DATE, */ '2007-07-18', @@ -409,7 +409,7 @@ connection master; update t31 set f5=555555555555555 where f3=6; update t31 set f2=2 where f3=2; update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; +update ignore t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; Warnings: Warning 1048 Column 'f3' cannot be null diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result index 12567f89af9..b9d254e1b42 100644 --- a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result @@ -191,11 +191,11 @@ INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: binary data'; INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', +insert ignore into t31 set f1=1, f2=1, f3=2, f4='second', f9=2.2, f10='seven samurai', f28=222.222, f35='222'; Warnings: Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', +insert ignore into t31 values (1, 1, 3, 'third', /* f5 BIGINT, */ 333333333333333333333333, /* f6 BLOB, */ '3333333333333333333333', /* f7 DATE, */ '2007-07-18', @@ -231,7 +231,7 @@ INSERT into t31 values (1, 1, 3, 'third', Warnings: Warning 1264 Out of range value for column 'f5' at row 1 Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', +insert ignore into t31 values (1, 1, 4, 'fourth', /* f5 BIGINT, */ 333333333333333333333333, /* f6 BLOB, */ '3333333333333333333333', /* f7 DATE, */ '2007-07-18', @@ -409,7 +409,7 @@ connection master; update t31 set f5=555555555555555 where f3=6; update t31 set f2=2 where f3=2; update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; +update ignore t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; Warnings: Warning 1048 Column 'f3' cannot be null diff --git a/mysql-test/suite/rpl/r/rpl_gtid_basic.result b/mysql-test/suite/rpl/r/rpl_gtid_basic.result index 53ee39c2f3c..3722e438d32 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_basic.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_basic.result @@ -464,9 +464,11 @@ include/stop_slave.inc connection server_1; SET gtid_domain_id=2; SET gtid_seq_no=1030; +SET @@binlog_annotate_row_events= 0; INSERT INTO t1 VALUES (17); INSERT INTO t1 VALUES (18); INSERT INTO t1 VALUES (19); +SET @@binlog_annotate_row_events= 1; connection server_2; SET sql_slave_skip_counter= 5; include/start_slave.inc diff --git a/mysql-test/suite/rpl/r/rpl_gtid_crash.result b/mysql-test/suite/rpl/r/rpl_gtid_crash.result index 00cae145673..7b6e95bf718 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_crash.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_crash.result @@ -4,7 +4,6 @@ connection server_1; call mtr.add_suppression("Checking table:"); call mtr.add_suppression("client is using or hasn't closed the table properly"); call mtr.add_suppression("Table .* is marked as crashed and should be repaired"); -call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); flush tables; ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; diff --git a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result index 0ae60b9073d..7c2471ba37c 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result @@ -235,4 +235,5 @@ SET GLOBAL binlog_format=@old_format; connection master; DROP TABLE t1; DROP TABLE t2; +call mtr.add_suppression("Can't find record in 't2'"); include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result index db2f40fd495..3f3b5e4344a 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result @@ -8,6 +8,7 @@ include/stop_slave.inc Master_Log_File = 'master-bin.000001' Using_Gtid = 'No' CHANGE MASTER TO master_use_gtid=current_pos; +FLUSH LOGS; connection server_1; FLUSH LOGS; include/wait_for_purge.inc "master-bin.000002" @@ -55,6 +56,7 @@ INSERT INTO t1 VALUES(5); include/save_master_gtid.inc connection server_2; include/sync_with_master_gtid.inc +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; a 1 @@ -87,6 +89,7 @@ a connection server_1; INSERT INTO t1 VALUES (7); connection server_2; +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; a 1 @@ -116,6 +119,7 @@ include/start_slave.inc connection server_1; INSERT INTO t1 VALUES (8); connection server_2; +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; a 1 @@ -142,6 +146,7 @@ Error 1286 Unknown storage engine 'InnoDB' connection server_1; INSERT INTO t1 VALUES (9); connection server_2; +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; a 1 @@ -171,6 +176,7 @@ domain_id COUNT(*) connection server_1; INSERT INTO t1 VALUES (11); connection server_2; +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT domain_id, COUNT(*) FROM mysql.gtid_slave_pos GROUP BY domain_id; domain_id COUNT(*) 0 2 @@ -180,6 +186,7 @@ connection server_1; INSERT INTO t1 VALUES (12); INSERT INTO t1 VALUES (13); connection server_2; +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT domain_id, COUNT(*) FROM mysql.gtid_slave_pos GROUP BY domain_id; domain_id COUNT(*) 0 2 diff --git a/mysql-test/suite/rpl/r/rpl_hrtime.result b/mysql-test/suite/rpl/r/rpl_hrtime.result index eb470fa2274..7717dcf6700 100644 --- a/mysql-test/suite/rpl/r/rpl_hrtime.result +++ b/mysql-test/suite/rpl/r/rpl_hrtime.result @@ -38,7 +38,7 @@ use `test`/*!*/; SET TIMESTAMP=1293832861/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_idempotency.result b/mysql-test/suite/rpl/r/rpl_idempotency.result index a31657d3ea1..a9485ca8933 100644 --- a/mysql-test/suite/rpl/r/rpl_idempotency.result +++ b/mysql-test/suite/rpl/r/rpl_idempotency.result @@ -4,6 +4,8 @@ call mtr.add_suppression("Slave SQL.*Can.t find record in .t[12].* error.* 1032" call mtr.add_suppression("Slave SQL.*Cannot delete or update a parent row: a foreign key constraint fails .* error.* 1451"); call mtr.add_suppression("Slave SQL.*Cannot add or update a child row: a foreign key constraint fails .* error.* 1452"); call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* error.* 1062"); +call mtr.add_suppression("Can't find record in 't1'"); +call mtr.add_suppression("Can't find record in 't2'"); connection master; CREATE TABLE t1 (a INT PRIMARY KEY); CREATE TABLE t2 (a INT); diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index 35ba59730be..1f6a9370090 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -848,6 +848,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 1 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # DELETE FROM t2 WHERE b <> UUID() master-bin.000001 # Table_map # # table_id: # (test_rpl.t2) master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -861,10 +862,12 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES(2, UUID()) master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1 master-bin.000001 # Table_map # # table_id: # (test_rpl.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -884,6 +887,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -906,6 +910,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; REPLACE INTO t1 VALUES(1, 't1, text 11') master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # REPLACE INTO t1 VALUES(2, UUID()) master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1000,6 +1005,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (5, 'before savepoint s2') master-bin.000001 # Query # # SAVEPOINT `s2` master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (6, 'after savepoint s2') +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (7, CONCAT('with UUID() ',UUID())) master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1053,6 +1059,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(202, 'test 202') master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE t1 SET b = UUID() WHERE a = 202 master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1077,6 +1084,7 @@ FOR EACH ROW BEGIN INSERT INTO t2 SET a = NEW.a, b = NEW.b; END master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 SET a = NEW.a, b = NEW.b master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Table_map # # table_id: # (test_rpl.t2) master-bin.000001 # Write_rows_v1 # # table_id: # diff --git a/mysql-test/suite/rpl/r/rpl_killed_ddl.result b/mysql-test/suite/rpl/r/rpl_killed_ddl.result index bb264a12af3..66309432efe 100644 --- a/mysql-test/suite/rpl/r/rpl_killed_ddl.result +++ b/mysql-test/suite/rpl/r/rpl_killed_ddl.result @@ -34,9 +34,9 @@ ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY DO INSERT INTO test.t1 VALUES (1); CREATE FUNCTION f1 () RETURNS INT DETERMINISTIC RETURN 1; -CREATE PROCEDURE p1 (OUT rows INT) +CREATE PROCEDURE p1 (OUT rows_cnt INT) BEGIN -SELECT COUNT(*) INTO rows FROM t1; +SELECT COUNT(*) INTO rows_cnt FROM t1; END; // CREATE SERVER s1 @@ -125,9 +125,9 @@ connection master; include/rpl_diff.inc connection master; connection master1; -CREATE PROCEDURE p2 (OUT rows INT) +CREATE PROCEDURE p2 (OUT rows_cnt INT) BEGIN -SELECT COUNT(*) INTO rows FROM t2; +SELECT COUNT(*) INTO rows_cnt FROM t2; END; // source include/kill_query.inc; @@ -135,7 +135,7 @@ connection master; include/rpl_diff.inc connection master; connection master1; -ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows of table t1'; +ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows_cnt of table t1'; source include/kill_query.inc; connection master; include/rpl_diff.inc diff --git a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result index 6b60fcb1507..b96153a226a 100644 --- a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result +++ b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result @@ -41,12 +41,12 @@ a include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-relay-bin.000005 # Query # # BEGIN -slave-relay-bin.000005 # User var # # @`!dummyvar`=NULL +slave-relay-bin.000005 # Annotate_rows # # DELETE FROM t1 slave-relay-bin.000005 # Table_map # # table_id: # (test.t1) slave-relay-bin.000005 # Delete_rows_v1 # # table_id: # flags: STMT_END_F slave-relay-bin.000005 # Query # # COMMIT slave-relay-bin.000005 # Query # # BEGIN -slave-relay-bin.000005 # Query # # # Dummy event replacing event type 160 that slave cannot handle. +slave-relay-bin.000005 # Annotate_rows # # INSERT INTO t1 /* A comment just to make the annotate event sufficiently long that the dummy event will need to get padded with spaces so that we can test that this works */ VALUES(1) slave-relay-bin.000005 # Table_map # # table_id: # (test.t1) slave-relay-bin.000005 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-relay-bin.000005 # Query # # COMMIT @@ -71,7 +71,7 @@ a include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-relay-bin.000007 # Query # # BEGIN -slave-relay-bin.000007 # Query # # # Dummy ev +slave-relay-bin.000007 # Annotate_rows # # INSERT INTO t1 VALUES(2) slave-relay-bin.000007 # Table_map # # table_id: # (test.t1) slave-relay-bin.000007 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-relay-bin.000007 # Query # # COMMIT @@ -98,10 +98,12 @@ SET debug_sync='RESET'; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000003 # Gtid # # BEGIN GTID #-#-# cid=# +master-bin.000003 # Annotate_rows # # INSERT INTO t2 VALUES (1) master-bin.000003 # Table_map # # table_id: # (test.t2) master-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000003 # Xid # # COMMIT /* XID */ master-bin.000003 # Gtid # # BEGIN GTID #-#-# cid=# +master-bin.000003 # Annotate_rows # # INSERT INTO t2 VALUES (2) master-bin.000003 # Table_map # # table_id: # (test.t2) master-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000003 # Xid # # COMMIT /* XID */ @@ -145,7 +147,7 @@ select @@global.log_slave_updates; 1 select @@global.replicate_annotate_row_events; @@global.replicate_annotate_row_events -0 +1 set @@global.debug_dbug= @old_slave_dbug; Clean up. connection master; diff --git a/mysql-test/suite/rpl/r/rpl_mdev382.result b/mysql-test/suite/rpl/r/rpl_mdev382.result index 0d75d1c2000..ee9377906ad 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev382.result +++ b/mysql-test/suite/rpl/r/rpl_mdev382.result @@ -389,7 +389,7 @@ use `ts``et`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=1342177280/*!*/; +SET @@session.sql_mode=1411383296/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; 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 9b9beb5cfd1..76f812b7512 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 @@ -1870,6 +1870,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1886,6 +1887,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1902,6 +1904,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1920,10 +1923,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (9), (9) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1942,6 +1947,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1960,10 +1966,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (10), (10) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1987,10 +1995,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2009,6 +2019,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2027,6 +2038,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2045,6 +2057,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2065,10 +2078,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (11), (11) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2089,6 +2104,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2109,10 +2125,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (12), (12) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result index d9c0bf53a5d..9db73e06c0f 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result @@ -488,6 +488,7 @@ ALTER TABLE tt_xx ADD COLUMN (b int); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (10) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -501,6 +502,7 @@ ALTER TABLE tt_xx RENAME new_tt_xx; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (9) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -514,6 +516,7 @@ DROP TEMPORARY TABLE IF EXISTS new_tt_xx; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (8) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`new_tt_xx` /* generated by server */ diff --git a/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result index 94c385faab6..8f5184fabc1 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result @@ -6630,6 +6630,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 206, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (206, 4) @@ -6639,6 +6640,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 206, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (206, 4) @@ -6655,6 +6657,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 207 --> 2", tt_3.info= "new text 207 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 207 --> 2", tt_3.info= "new text 207 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6677,6 +6680,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 207 --> 2", tt_3.info= "new text 207 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6697,6 +6701,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (208, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6719,6 +6724,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6739,6 +6745,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (209, 2, fc_i_tt_5_suc(209, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',209), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6767,6 +6774,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',209), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6806,6 +6814,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 210 --> 2", nt_4.info= "new text 210 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (210, 4) @@ -6819,6 +6828,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 210 --> 2", nt_4.info= "new text 210 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (210, 4) @@ -6848,6 +6858,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (211, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (211, 4) @@ -6861,6 +6872,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (211, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (211, 4) @@ -6894,6 +6906,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',212), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6913,6 +6926,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',212), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7010,6 +7024,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (215, 2), (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7030,6 +7045,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (215, 2), (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7049,6 +7065,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (216, 2, ''), (212, 2, fc_i_tt_5_suc (216, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7071,6 +7088,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (216, 2, ''), (212, 2, fc_i_tt_5_suc (216, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7240,6 +7258,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 221 --> 2", tt_3.info= "new text 221 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 221 --> 2", tt_3.info= "new text 221 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7258,6 +7277,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 221 --> 2", tt_3.info= "new text 221 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7273,6 +7293,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (222, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7291,6 +7312,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7306,6 +7328,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (223, 2, fc_i_tt_5_suc(223, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',223), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7326,6 +7349,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',223), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7516,6 +7540,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (229, 2), (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7534,6 +7559,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (229, 2), (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7550,6 +7576,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (230, 2, ''), (226, 2, fc_i_tt_5_suc (230, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7570,6 +7597,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (230, 2, ''), (226, 2, fc_i_tt_5_suc (230, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7677,6 +7705,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7693,6 +7722,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7720,6 +7750,7 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (234, 2) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 234, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7729,6 +7760,7 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (234, 2) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 234, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7748,6 +7780,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 235 --> 4", tt_3.info= "new text 235 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 235 --> 4", tt_3.info= "new text 235 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7766,6 +7799,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 235 --> 4", tt_3.info= "new text 235 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7790,6 +7824,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (236, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7808,6 +7843,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7832,6 +7868,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (237, 4, fc_i_tt_5_suc(237, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',237), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7856,6 +7893,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',237), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7896,6 +7934,7 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (238, 2) +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 238 --> 4", nt_4.info= "new text 238 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7909,6 +7948,7 @@ master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (238, 2) +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 238 --> 4", nt_4.info= "new text 238 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7938,6 +7978,7 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (239, 2) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (239, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7951,6 +7992,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (239, 2) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (239, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7984,6 +8026,7 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (240, 2) +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',240), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8003,6 +8046,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (240, 2) +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',240), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8035,6 +8079,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 241, 4, COUNT(*) FROM tt_1 UNION SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8051,6 +8096,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 241, 4, COUNT(*) FROM tt_1 UNION SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8104,6 +8150,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (243, 4), (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8120,6 +8167,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (243, 4), (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8143,6 +8191,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (244, 4, ''), (240, 2, fc_i_tt_5_suc (244, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8161,6 +8210,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (244, 4, ''), (240, 2, fc_i_tt_5_suc (244, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8281,6 +8331,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8295,6 +8346,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8335,6 +8387,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 249 --> 4", tt_3.info= "new text 249 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 249 --> 4", tt_3.info= "new text 249 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8349,6 +8402,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 249 --> 4", tt_3.info= "new text 249 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8368,6 +8422,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (250, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8382,6 +8437,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8401,6 +8457,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (251, 4, fc_i_tt_5_suc(251, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',251), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8417,6 +8474,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',251), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8556,6 +8614,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 255, 4, COUNT(*) FROM tt_1 UNION SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8570,6 +8629,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 255, 4, COUNT(*) FROM tt_1 UNION SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8612,6 +8672,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (257, 4), (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8626,6 +8687,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (257, 4), (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8646,6 +8708,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (258, 4, ''), (254, 2, fc_i_tt_5_suc (258, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8662,6 +8725,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (258, 4, ''), (254, 2, fc_i_tt_5_suc (258, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8815,6 +8879,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 262, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8826,6 +8891,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 262, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8841,6 +8907,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8866,6 +8933,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8888,6 +8956,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8913,6 +8982,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8935,6 +9005,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (265, 2, fc_i_tt_5_suc(265, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',265), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8966,6 +9037,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',265), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9011,6 +9083,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 266 --> 2", nt_4.info= "new text 266 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9026,6 +9099,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 266 --> 2", nt_4.info= "new text 266 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9058,6 +9132,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (267, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9073,6 +9148,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (267, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9109,6 +9185,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',268), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9130,6 +9207,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',268), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9227,6 +9305,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (271, 2), (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9247,6 +9326,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (271, 2), (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9266,6 +9346,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (272, 2, ''), (268, 2, fc_i_tt_5_suc (272, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9288,6 +9369,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (272, 2, ''), (268, 2, fc_i_tt_5_suc (272, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9475,6 +9557,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9497,6 +9580,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9515,6 +9599,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9537,6 +9622,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9555,6 +9641,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (279, 2, fc_i_tt_5_suc(279, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',279), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9579,6 +9666,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',279), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9811,6 +9899,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (285, 2), (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9833,6 +9922,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (285, 2), (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9852,6 +9942,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (286, 2, ''), (282, 2, fc_i_tt_5_suc (286, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9876,6 +9967,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (286, 2, ''), (282, 2, fc_i_tt_5_suc (286, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10045,6 +10137,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 290, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10056,6 +10149,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (290, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 290, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10079,6 +10173,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 291 --> 4", tt_3.info= "new text 291 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 291 --> 4", tt_3.info= "new text 291 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10099,6 +10194,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (291, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 291 --> 4", tt_3.info= "new text 291 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10126,6 +10222,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (292, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10146,6 +10243,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (292, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10173,6 +10271,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (293, 4, fc_i_tt_5_suc(293, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',293), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10199,6 +10298,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (293, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',293), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10241,6 +10341,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 294 --> 4", nt_4.info= "new text 294 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10256,6 +10357,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 294 --> 4", nt_4.info= "new text 294 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10288,6 +10390,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (295, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10303,6 +10406,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (295, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10339,6 +10443,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',296), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10360,6 +10465,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',296), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10464,6 +10570,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (299, 4), (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10479,6 +10586,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (299, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (299, 4), (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10503,6 +10611,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (300, 4, ''), (296, 2, fc_i_tt_5_suc (300, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10520,6 +10629,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (300, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (300, 4, ''), (296, 2, fc_i_tt_5_suc (300, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10711,6 +10821,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 305 --> 4", tt_3.info= "new text 305 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 305 --> 4", tt_3.info= "new text 305 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10728,6 +10839,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (305, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 305 --> 4", tt_3.info= "new text 305 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10751,6 +10863,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (306, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10768,6 +10881,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (306, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10791,6 +10905,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (307, 4, fc_i_tt_5_suc(307, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',307), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10810,6 +10925,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (307, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',307), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11046,6 +11162,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (313, 4), (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11063,6 +11180,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (313, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (313, 4), (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11087,6 +11205,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (314, 4, ''), (310, 2, fc_i_tt_5_suc (314, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11106,6 +11225,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (314, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (314, 4, ''), (310, 2, fc_i_tt_5_suc (314, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11638,10 +11758,8 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 3) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 6) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -11653,10 +11771,8 @@ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_7 master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 3) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 6) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -11732,10 +11848,8 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (330, 4) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -11746,10 +11860,8 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_7 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (330, 4) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -11854,8 +11966,8 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 3) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 6) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -11867,8 +11979,8 @@ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_8 master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 3) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 6) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -11944,8 +12056,8 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (336, 4) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -11956,8 +12068,8 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_8 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (336, 4) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12053,8 +12165,8 @@ INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FR include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-T << -e-e-e-e-e-e-e-e-e-e-e- @@ -12077,8 +12189,8 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# @@ -12109,6 +12221,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12132,6 +12245,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12158,8 +12272,8 @@ INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FR include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-T << -e-e-e-e-e-e-e-e-e-e-e- @@ -12181,8 +12295,8 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# @@ -12208,6 +12322,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12230,6 +12345,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12289,10 +12405,8 @@ INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() F include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-N << -e-e-e-e-e-e-e-e-e-e-e- @@ -12315,10 +12429,8 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# @@ -12349,6 +12461,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12372,6 +12485,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12398,10 +12512,8 @@ INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() F include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-N << -e-e-e-e-e-e-e-e-e-e-e- @@ -12423,10 +12535,8 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# @@ -12452,6 +12562,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12474,6 +12585,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13040,6 +13152,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',370), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(370,4) @@ -13054,6 +13167,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',370), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(370,4) @@ -13085,6 +13199,7 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(371,2) +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',371), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13099,6 +13214,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(371,2) +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',371), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result index 55d7a164324..2e553e0c305 100644 --- a/mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result @@ -3956,6 +3956,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3972,6 +3973,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3994,6 +3996,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4012,6 +4015,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4038,6 +4042,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',135), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4058,6 +4063,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',135), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4084,12 +4090,14 @@ CALL pc_i_nt_5_suc (136, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4108,12 +4116,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4138,6 +4148,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4154,6 +4165,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4176,6 +4188,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4194,6 +4207,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4220,6 +4234,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',139), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4240,6 +4255,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',139), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4266,12 +4282,14 @@ CALL pc_i_nt_5_suc (140, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4290,12 +4308,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4322,6 +4342,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4338,6 +4359,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4362,6 +4384,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4380,6 +4403,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4408,6 +4432,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',143), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4428,6 +4453,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',143), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4456,12 +4482,14 @@ CALL pc_i_nt_5_suc (144, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4480,12 +4508,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4510,6 +4540,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4527,6 +4558,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4550,6 +4582,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4569,6 +4602,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4596,6 +4630,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4617,6 +4652,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4644,12 +4680,14 @@ CALL pc_i_nt_5_suc (148, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4669,12 +4707,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4805,6 +4845,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (152, 4), (150, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4821,6 +4862,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (152, 4), (150, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4853,6 +4895,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4867,6 +4910,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4886,6 +4930,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4902,6 +4947,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4925,6 +4971,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',155), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4943,6 +4990,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',155), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4966,12 +5014,14 @@ CALL pc_i_nt_5_suc (156, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4988,12 +5038,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5015,6 +5067,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5029,6 +5082,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5048,6 +5102,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5064,6 +5119,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5087,6 +5143,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',159), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5105,6 +5162,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',159), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5128,12 +5186,14 @@ CALL pc_i_nt_5_suc (160, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5150,12 +5210,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5179,6 +5241,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5193,6 +5256,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5214,6 +5278,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5230,6 +5295,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5255,6 +5321,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',163), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5273,6 +5340,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',163), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5298,12 +5366,14 @@ CALL pc_i_nt_5_suc (164, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5320,12 +5390,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5347,6 +5419,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5361,6 +5434,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5380,6 +5454,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5396,6 +5471,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5419,6 +5495,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',167), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5437,6 +5514,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',167), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5460,12 +5538,14 @@ CALL pc_i_nt_5_suc (168, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5482,12 +5562,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5610,6 +5692,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (172, 4), (170, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5624,6 +5707,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (172, 4), (170, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6101,12 +6185,14 @@ CALL pc_i_nt_5_suc (185, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6129,12 +6215,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6155,12 +6243,14 @@ CALL pc_i_nt_5_suc (186, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6183,12 +6273,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6209,12 +6301,14 @@ CALL pc_i_nt_5_suc (187, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6239,12 +6333,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6265,12 +6361,14 @@ CALL pc_i_nt_5_suc (188, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6294,12 +6392,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6717,12 +6817,14 @@ CALL pc_i_nt_5_suc (201, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6743,12 +6845,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6766,12 +6870,14 @@ CALL pc_i_nt_5_suc (202, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6792,12 +6898,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6815,12 +6923,14 @@ CALL pc_i_nt_5_suc (203, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6841,12 +6951,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6864,12 +6976,14 @@ CALL pc_i_nt_5_suc (204, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6892,12 +7006,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6970,6 +7086,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 206, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (206, 4) @@ -6979,6 +7096,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 206, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (206, 4) @@ -6995,6 +7113,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 207 --> 2", tt_3.info= "new text 207 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 207 --> 2", tt_3.info= "new text 207 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7017,6 +7136,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 207 --> 2", tt_3.info= "new text 207 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7037,6 +7157,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (208, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7059,6 +7180,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7079,6 +7201,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (209, 2, fc_i_tt_5_suc(209, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',209), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7107,6 +7230,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',209), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7146,6 +7270,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 210 --> 2", nt_4.info= "new text 210 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (210, 4) @@ -7159,6 +7284,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 210 --> 2", nt_4.info= "new text 210 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (210, 4) @@ -7188,6 +7314,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (211, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (211, 4) @@ -7201,6 +7328,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (211, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (211, 4) @@ -7234,6 +7362,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',212), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7253,6 +7382,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',212), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7350,6 +7480,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (215, 2), (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7370,6 +7501,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (215, 2), (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7389,6 +7521,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (216, 2, ''), (212, 2, fc_i_tt_5_suc (216, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7411,6 +7544,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (216, 2, ''), (212, 2, fc_i_tt_5_suc (216, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7580,6 +7714,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 221 --> 2", tt_3.info= "new text 221 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 221 --> 2", tt_3.info= "new text 221 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7598,6 +7733,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 221 --> 2", tt_3.info= "new text 221 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7613,6 +7749,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (222, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7631,6 +7768,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7646,6 +7784,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (223, 2, fc_i_tt_5_suc(223, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',223), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7666,6 +7805,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',223), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7856,6 +7996,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (229, 2), (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7874,6 +8015,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (229, 2), (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7890,6 +8032,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (230, 2, ''), (226, 2, fc_i_tt_5_suc (230, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7910,6 +8053,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (230, 2, ''), (226, 2, fc_i_tt_5_suc (230, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8017,6 +8161,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8033,6 +8178,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8060,6 +8206,7 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (234, 2) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 234, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8069,6 +8216,7 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (234, 2) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 234, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8088,6 +8236,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 235 --> 4", tt_3.info= "new text 235 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 235 --> 4", tt_3.info= "new text 235 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8106,6 +8255,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 235 --> 4", tt_3.info= "new text 235 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8130,6 +8280,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (236, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8148,6 +8299,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8172,6 +8324,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (237, 4, fc_i_tt_5_suc(237, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',237), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8196,6 +8349,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',237), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8236,6 +8390,7 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (238, 2) +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 238 --> 4", nt_4.info= "new text 238 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8249,6 +8404,7 @@ master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (238, 2) +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 238 --> 4", nt_4.info= "new text 238 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8278,6 +8434,7 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (239, 2) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (239, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8291,6 +8448,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (239, 2) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (239, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8324,6 +8482,7 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (240, 2) +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',240), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8343,6 +8502,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (240, 2) +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',240), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8375,6 +8535,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 241, 4, COUNT(*) FROM tt_1 UNION SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8391,6 +8552,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 241, 4, COUNT(*) FROM tt_1 UNION SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8444,6 +8606,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (243, 4), (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8460,6 +8623,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (243, 4), (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8483,6 +8647,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (244, 4, ''), (240, 2, fc_i_tt_5_suc (244, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8501,6 +8666,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (244, 4, ''), (240, 2, fc_i_tt_5_suc (244, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8621,6 +8787,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8635,6 +8802,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8675,6 +8843,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 249 --> 4", tt_3.info= "new text 249 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 249 --> 4", tt_3.info= "new text 249 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8689,6 +8858,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 249 --> 4", tt_3.info= "new text 249 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8708,6 +8878,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (250, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8722,6 +8893,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8741,6 +8913,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (251, 4, fc_i_tt_5_suc(251, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',251), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8757,6 +8930,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',251), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8896,6 +9070,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 255, 4, COUNT(*) FROM tt_1 UNION SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8910,6 +9085,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 255, 4, COUNT(*) FROM tt_1 UNION SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8952,6 +9128,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (257, 4), (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8966,6 +9143,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (257, 4), (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8986,6 +9164,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (258, 4, ''), (254, 2, fc_i_tt_5_suc (258, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9002,6 +9181,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (258, 4, ''), (254, 2, fc_i_tt_5_suc (258, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9147,6 +9327,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9156,6 +9337,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 262, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9164,10 +9346,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 262, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9183,6 +9367,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9192,6 +9377,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9209,10 +9395,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9232,6 +9420,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9241,6 +9430,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9258,10 +9448,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9281,6 +9473,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (265, 2, fc_i_tt_5_suc(265, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',265), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9292,6 +9485,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9313,12 +9507,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',265), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9351,6 +9547,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9360,6 +9557,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 266 --> 2", nt_4.info= "new text 266 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9372,10 +9570,12 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 266 --> 2", nt_4.info= "new text 266 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9400,6 +9600,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9409,6 +9610,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (267, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9421,10 +9623,12 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (267, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9453,6 +9657,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9462,6 +9667,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',268), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9480,10 +9686,12 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',268), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9581,6 +9789,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (271, 2), (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9601,6 +9810,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (271, 2), (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9620,6 +9830,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (272, 2, ''), (268, 2, fc_i_tt_5_suc (272, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9642,6 +9853,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (272, 2, ''), (268, 2, fc_i_tt_5_suc (272, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9802,6 +10014,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9816,6 +10029,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9831,6 +10045,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9840,6 +10055,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9854,10 +10070,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9873,6 +10091,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9882,6 +10101,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9896,10 +10116,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9915,6 +10137,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (279, 2, fc_i_tt_5_suc(279, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',279), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9926,6 +10149,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9940,12 +10164,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',279), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9970,6 +10196,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9988,6 +10215,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10012,6 +10240,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10030,6 +10259,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10058,6 +10288,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10080,6 +10311,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10179,6 +10411,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (285, 2), (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10201,6 +10434,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (285, 2), (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10220,6 +10454,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (286, 2, ''), (282, 2, fc_i_tt_5_suc (286, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10244,6 +10479,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (286, 2, ''), (282, 2, fc_i_tt_5_suc (286, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10413,6 +10649,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 290, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10424,6 +10661,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (290, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 290, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10447,6 +10685,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 291 --> 4", tt_3.info= "new text 291 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 291 --> 4", tt_3.info= "new text 291 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10467,6 +10706,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (291, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 291 --> 4", tt_3.info= "new text 291 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10494,6 +10734,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (292, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10514,6 +10755,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (292, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10541,6 +10783,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (293, 4, fc_i_tt_5_suc(293, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',293), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10567,6 +10810,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (293, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',293), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10609,6 +10853,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 294 --> 4", nt_4.info= "new text 294 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10624,6 +10869,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 294 --> 4", nt_4.info= "new text 294 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10656,6 +10902,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (295, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10671,6 +10918,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (295, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10707,6 +10955,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',296), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10728,6 +10977,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',296), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10832,6 +11082,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (299, 4), (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10847,6 +11098,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (299, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (299, 4), (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10871,6 +11123,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (300, 4, ''), (296, 2, fc_i_tt_5_suc (300, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10888,6 +11141,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (300, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (300, 4, ''), (296, 2, fc_i_tt_5_suc (300, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11079,6 +11333,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 305 --> 4", tt_3.info= "new text 305 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 305 --> 4", tt_3.info= "new text 305 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11096,6 +11351,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (305, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 305 --> 4", tt_3.info= "new text 305 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11119,6 +11375,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (306, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11136,6 +11393,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (306, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11159,6 +11417,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (307, 4, fc_i_tt_5_suc(307, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',307), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11178,6 +11437,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (307, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',307), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11414,6 +11674,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (313, 4), (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11431,6 +11692,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (313, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (313, 4), (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11455,6 +11717,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (314, 4, ''), (310, 2, fc_i_tt_5_suc (314, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11474,6 +11737,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (314, 2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (314, 4, ''), (310, 2, fc_i_tt_5_suc (314, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11683,6 +11947,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11716,6 +11981,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11745,6 +12011,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11774,6 +12041,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12010,10 +12278,8 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 3) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 6) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12025,10 +12291,8 @@ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_7 master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 3) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 6) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12104,10 +12368,8 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (330, 4) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12118,10 +12380,8 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_7 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (330, 4) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12226,8 +12486,8 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 3) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 6) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12239,8 +12499,8 @@ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_8 master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 3) +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 6) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12316,8 +12576,8 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (336, 4) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12328,8 +12588,8 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_8 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (336, 4) master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12425,8 +12685,8 @@ INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FR include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-T << -e-e-e-e-e-e-e-e-e-e-e- @@ -12449,8 +12709,8 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# @@ -12481,6 +12741,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12504,6 +12765,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12530,8 +12792,8 @@ INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FR include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-T << -e-e-e-e-e-e-e-e-e-e-e- @@ -12553,8 +12815,8 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# @@ -12580,6 +12842,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12602,6 +12865,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12661,10 +12925,8 @@ INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() F include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-N << -e-e-e-e-e-e-e-e-e-e-e- @@ -12687,10 +12949,8 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# @@ -12721,6 +12981,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12744,6 +13005,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12770,10 +13032,8 @@ INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() F include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-N << -e-e-e-e-e-e-e-e-e-e-e- @@ -12795,10 +13055,8 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# @@ -12824,6 +13082,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12846,6 +13105,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13304,6 +13564,7 @@ SET @var= fc_i_nt_5_suc(367, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',367), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -13324,6 +13585,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',367), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -13381,6 +13643,7 @@ SET @var= fc_i_nt_5_suc(369, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',369), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -13399,6 +13662,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',369), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -13432,6 +13696,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',370), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(370,4) @@ -13446,6 +13711,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',370), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(370,4) @@ -13477,6 +13743,7 @@ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(371,2) +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',371), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13491,6 +13758,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; SELECT `test`.`fc_i_tt_5_suc`(371,2) +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',371), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result index 775ae83c618..56368b9bb9e 100644 --- a/mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result @@ -127,6 +127,7 @@ INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 1) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -135,6 +136,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 1) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -146,6 +148,7 @@ INSERT INTO tt_5(trans_id, stmt_id) VALUES (8, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (8, 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -156,6 +159,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (8, 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -171,6 +175,7 @@ fc_i_tt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',9), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -183,6 +188,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',9), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -198,12 +204,14 @@ CALL pc_i_tt_5_suc (10, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -214,12 +222,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -293,6 +303,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -301,6 +312,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -312,6 +324,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -322,6 +335,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -337,6 +351,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',17), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -349,6 +364,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',17), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -364,12 +380,14 @@ CALL pc_i_nt_5_suc (18, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -380,12 +398,14 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -420,6 +440,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (20, 1), (15, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -428,6 +449,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (20, 1), (15, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -440,6 +462,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (21, 1), (18, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -450,6 +473,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (21, 1), (18, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -464,6 +488,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (22, 1, ''), (20, 1, fc_i_nt_5_suc (22, 1)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -478,6 +503,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (22, 1, ''), (20, 1, fc_i_nt_5_suc (22, 1)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -506,6 +532,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -514,6 +541,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -525,6 +553,7 @@ INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -533,6 +562,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -544,6 +574,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 -- include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_3) @@ -554,6 +585,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_3) @@ -567,6 +599,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_4) @@ -577,6 +610,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_4) @@ -590,6 +624,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (27, 1, fc_i_tt_5_suc(27, 1)); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',27), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -606,6 +641,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',27), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -627,6 +663,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -637,6 +674,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -650,6 +688,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (29, 1) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -660,6 +699,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (29, 1) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -677,6 +717,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',30), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -693,6 +734,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',30), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -717,6 +759,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 31, 1, COUNT(*) FROM tt_1 UNION SELECT 23, 1, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -725,6 +768,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 31, 1, COUNT(*) FROM tt_1 UNION SELECT 23, 1, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -747,6 +791,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (33, 1), (26, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -755,6 +800,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (33, 1), (26, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -767,6 +813,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (34, 1, ''), (30, 2, fc_i_tt_5_suc (34, 1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -777,6 +824,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (34, 1, ''), (30, 2, fc_i_tt_5_suc (34, 1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -860,8 +908,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (37, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (37, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -870,8 +920,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (37, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (37, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -895,8 +947,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (38, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (38, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -907,8 +961,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (38, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (38, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -936,8 +992,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (39, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',39), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -950,8 +1008,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (39, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',39), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -979,12 +1039,15 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (40, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -995,12 +1058,15 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (40, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1026,10 +1092,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (41, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (41, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1038,10 +1106,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (41, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (41, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1065,10 +1135,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (42, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (42, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1079,10 +1151,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (42, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (42, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1110,10 +1184,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (43, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',43), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1126,10 +1202,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (43, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',43), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1157,14 +1235,17 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (44, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',44), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',44), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1175,14 +1256,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (44, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',44), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',44), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1210,12 +1294,14 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',45), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (45, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1224,12 +1310,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',45), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (45, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1255,12 +1343,14 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',46), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (46, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1271,12 +1361,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',46), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (46, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1306,12 +1398,14 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',47), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',47), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1324,12 +1418,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',47), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',47), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1359,16 +1455,19 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',48), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',48), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',48), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1379,16 +1478,19 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',48), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',48), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',48), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1414,14 +1516,17 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',49), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',49), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (49, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1430,14 +1535,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',49), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',49), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (49, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1461,14 +1569,17 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',50), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',50), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (50, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1479,14 +1590,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',50), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',50), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (50, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1514,14 +1628,17 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',51), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',51), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',51), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1534,14 +1651,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',51), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',51), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',51), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1569,18 +1689,22 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1591,18 +1715,22 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1639,6 +1767,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (53, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1647,6 +1776,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (53, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1671,6 +1801,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (54, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1679,6 +1810,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (54, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1703,6 +1835,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (55, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1711,6 +1844,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (55, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1735,6 +1869,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (56, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1743,6 +1878,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (56, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1767,6 +1903,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (57, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1775,6 +1912,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (57, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1799,6 +1937,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (58, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1807,6 +1946,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (58, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1831,6 +1971,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (59, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1839,6 +1980,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (59, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1863,6 +2005,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (60, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1871,6 +2014,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (60, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -2444,6 +2588,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (85, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (85, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2453,6 +2598,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (85, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (85, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2465,10 +2611,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (85, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (85, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2484,6 +2632,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (86, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (86, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2493,6 +2642,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (86, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (86, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2507,10 +2657,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (86, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (86, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2528,6 +2680,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (87, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (87, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2539,6 +2692,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',87), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2555,10 +2709,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (87, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',87), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2578,6 +2734,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (88, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (88, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2587,12 +2744,14 @@ CALL pc_i_nt_5_suc (88, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',88), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',88), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2607,16 +2766,19 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (88, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',88), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',88), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2634,6 +2796,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (89, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (89, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2645,6 +2808,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (89, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (89, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2657,12 +2821,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (89, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (89, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2678,6 +2844,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (90, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (90, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2689,6 +2856,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (90, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (90, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2703,12 +2871,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (90, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (90, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2726,6 +2896,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (91, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (91, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2739,6 +2910,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',91), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2755,12 +2927,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (91, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',91), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2780,6 +2954,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (92, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (92, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2791,12 +2966,14 @@ CALL pc_i_nt_5_suc (92, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',92), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',92), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2811,18 +2988,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (92, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',92), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',92), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2842,6 +3022,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',93), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2855,6 +3036,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (93, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (93, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2867,6 +3049,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',93), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2875,6 +3058,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (93, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2892,6 +3076,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',94), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2905,6 +3090,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (94, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (94, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2919,6 +3105,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',94), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2927,6 +3114,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (94, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2946,6 +3134,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',95), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2961,6 +3150,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',95), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2977,6 +3167,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',95), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2985,6 +3176,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',95), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3006,6 +3198,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',96), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3019,12 +3212,14 @@ CALL pc_i_nt_5_suc (96, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',96), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',96), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3039,6 +3234,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',96), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3047,12 +3243,14 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',96), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',96), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3070,12 +3268,14 @@ CALL pc_i_nt_5_suc (97, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',97), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',97), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3087,6 +3287,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (97, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (97, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3099,18 +3300,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',97), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',97), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (97, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3126,12 +3330,14 @@ CALL pc_i_nt_5_suc (98, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',98), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',98), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3143,6 +3349,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (98, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (98, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3157,18 +3364,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',98), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',98), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (98, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3186,12 +3396,14 @@ CALL pc_i_nt_5_suc (99, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',99), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',99), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3205,6 +3417,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',99), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3221,18 +3434,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',99), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',99), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',99), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3252,12 +3468,14 @@ CALL pc_i_nt_5_suc (100, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3269,12 +3487,14 @@ CALL pc_i_nt_5_suc (100, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3289,24 +3509,28 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3334,6 +3558,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (101, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (101, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3351,6 +3576,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (101, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3366,6 +3592,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (102, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (102, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3376,6 +3603,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (102, 4), (102, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3388,10 +3616,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (102, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (102, 4), (102, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3407,6 +3637,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (103, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (103, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3417,6 +3648,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (103, 4), (100, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3431,10 +3663,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (103, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (103, 4), (100, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3452,6 +3686,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (104, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (104, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3462,6 +3697,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (104, 4, ''), (104, 2, fc_i_nt_5_suc (104, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -3480,10 +3716,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (104, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (104, 4, ''), (104, 2, fc_i_nt_5_suc (104, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -3510,6 +3748,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (105, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (105, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3522,6 +3761,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (105, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3538,6 +3778,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (106, 2), (105, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3547,6 +3788,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (106, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (106, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3559,10 +3801,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (106, 2), (105, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (106, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3579,6 +3823,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (107, 2), (104, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3590,6 +3835,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (107, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (107, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3602,12 +3848,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (107, 2), (104, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (107, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3624,6 +3872,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (108, 2, ''), (107, 4, fc_i_nt_5_suc (108, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -3639,6 +3888,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (108, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (108, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3651,6 +3901,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (108, 2, ''), (107, 4, fc_i_nt_5_suc (108, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -3661,6 +3912,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (108, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3686,6 +3938,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (109, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (109, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3695,6 +3948,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (109, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (109, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3709,10 +3963,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (109, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (109, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3728,6 +3984,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (110, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (110, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3737,6 +3994,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (110, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (110, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3753,10 +4011,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (110, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (110, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3774,6 +4034,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (111, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (111, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3785,6 +4046,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',111), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3803,10 +4065,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (111, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',111), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3826,6 +4090,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (112, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (112, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3835,12 +4100,14 @@ CALL pc_i_nt_5_suc (112, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',112), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',112), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3857,16 +4124,19 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (112, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',112), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',112), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3884,6 +4154,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (113, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (113, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3895,6 +4166,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (113, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (113, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3909,12 +4181,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (113, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (113, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3930,6 +4204,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (114, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (114, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3941,6 +4216,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (114, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (114, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3957,12 +4233,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (114, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (114, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3980,6 +4258,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (115, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (115, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3993,6 +4272,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',115), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4011,12 +4291,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (115, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',115), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4036,6 +4318,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (116, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (116, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4047,12 +4330,14 @@ CALL pc_i_nt_5_suc (116, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',116), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',116), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4069,18 +4354,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (116, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',116), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',116), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4100,6 +4388,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',117), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4113,6 +4402,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (117, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (117, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4127,6 +4417,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',117), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4135,6 +4426,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (117, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4152,6 +4444,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',118), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4165,6 +4458,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (118, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (118, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4181,6 +4475,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',118), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4189,6 +4484,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (118, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4208,6 +4504,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',119), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4223,6 +4520,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',119), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4241,6 +4539,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',119), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4249,6 +4548,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',119), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4270,6 +4570,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',120), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4283,12 +4584,14 @@ CALL pc_i_nt_5_suc (120, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',120), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',120), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4305,6 +4608,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',120), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4313,12 +4617,14 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',120), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',120), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4336,12 +4642,14 @@ CALL pc_i_nt_5_suc (121, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',121), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',121), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4353,6 +4661,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (121, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (121, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4367,18 +4676,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',121), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',121), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (121, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4394,12 +4706,14 @@ CALL pc_i_nt_5_suc (122, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',122), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',122), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4411,6 +4725,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (122, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (122, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4427,18 +4742,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',122), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',122), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (122, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4456,12 +4774,14 @@ CALL pc_i_nt_5_suc (123, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',123), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',123), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4475,6 +4795,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',123), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4493,18 +4814,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',123), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',123), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',123), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4524,12 +4848,14 @@ CALL pc_i_nt_5_suc (124, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4541,12 +4867,14 @@ CALL pc_i_nt_5_suc (124, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4563,24 +4891,28 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4608,6 +4940,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (125, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (125, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4627,6 +4960,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (125, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4642,6 +4976,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (126, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (126, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4652,6 +4987,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (126, 4), (126, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4666,10 +5002,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (126, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (126, 4), (126, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4685,6 +5023,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (127, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (127, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4695,6 +5034,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (127, 4), (124, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4711,10 +5051,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (127, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (127, 4), (124, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4732,6 +5074,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (128, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (128, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4742,6 +5085,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (128, 4, ''), (128, 2, fc_i_nt_5_suc (128, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -4762,10 +5106,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (128, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (128, 4, ''), (128, 2, fc_i_nt_5_suc (128, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -4792,6 +5138,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (129, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (129, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4806,6 +5153,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (129, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4822,6 +5170,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (130, 2), (129, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4831,6 +5180,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (130, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (130, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4845,10 +5195,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (130, 2), (129, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (130, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4865,6 +5217,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (131, 2), (128, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4876,6 +5229,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (131, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (131, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4890,12 +5244,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (131, 2), (128, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (131, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4912,6 +5268,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (132, 2, ''), (131, 4, fc_i_nt_5_suc (132, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -4927,6 +5284,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (132, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (132, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4941,6 +5299,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (132, 2, ''), (131, 4, fc_i_nt_5_suc (132, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -4951,6 +5310,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (132, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4980,6 +5340,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4989,6 +5350,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (133, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -4997,10 +5359,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (133, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5020,6 +5384,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5031,6 +5396,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (134, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5039,12 +5405,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (134, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5066,6 +5434,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',135), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5079,6 +5448,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (135, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5087,6 +5457,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',135), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5095,6 +5466,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (135, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5114,12 +5486,14 @@ CALL pc_i_nt_5_suc (136, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5131,6 +5505,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (136, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5139,18 +5514,21 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (136, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5170,6 +5548,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5179,6 +5558,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (137, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5189,10 +5569,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (137, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5214,6 +5596,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5225,6 +5608,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (138, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5235,12 +5619,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (138, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5264,6 +5650,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',139), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5277,6 +5664,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (139, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5287,6 +5675,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',139), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5295,6 +5684,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (139, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5316,12 +5706,14 @@ CALL pc_i_nt_5_suc (140, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5333,6 +5725,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (140, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5343,18 +5736,21 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (140, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5378,6 +5774,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5387,6 +5784,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',141), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5399,10 +5797,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',141), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5428,6 +5828,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5439,6 +5840,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',142), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5451,12 +5853,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',142), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5484,6 +5888,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',143), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5497,6 +5902,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',143), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5509,6 +5915,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',143), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5517,6 +5924,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',143), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5542,12 +5950,14 @@ CALL pc_i_nt_5_suc (144, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5559,6 +5969,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5571,18 +5982,21 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5606,6 +6020,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5615,10 +6030,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5629,14 +6046,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5658,6 +6078,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5669,10 +6090,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5683,16 +6106,19 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5716,6 +6142,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5729,10 +6156,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5743,6 +6172,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5751,10 +6181,12 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5776,12 +6208,14 @@ CALL pc_i_nt_5_suc (148, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5793,10 +6227,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5807,22 +6243,26 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5859,6 +6299,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (149, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (149, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5871,6 +6312,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (149, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5891,6 +6333,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (150, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (150, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5903,6 +6346,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (150, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5927,6 +6371,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (151, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5935,6 +6380,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (151, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5955,6 +6401,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (152, 4), (150, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5964,6 +6411,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (152, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5972,10 +6420,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (152, 4), (150, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (152, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -6005,6 +6455,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6019,6 +6470,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6038,6 +6490,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6054,6 +6507,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6077,6 +6531,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',155), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6095,6 +6550,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',155), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6118,12 +6574,14 @@ CALL pc_i_nt_5_suc (156, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6140,12 +6598,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6167,6 +6627,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6181,6 +6642,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6200,6 +6662,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6216,6 +6679,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6239,6 +6703,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',159), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6257,6 +6722,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',159), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6280,12 +6746,14 @@ CALL pc_i_nt_5_suc (160, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6302,12 +6770,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6331,6 +6801,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6345,6 +6816,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6366,6 +6838,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6382,6 +6855,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6407,6 +6881,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',163), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6425,6 +6900,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',163), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6450,12 +6926,14 @@ CALL pc_i_nt_5_suc (164, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6472,12 +6950,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6499,6 +6979,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6513,6 +6994,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6532,6 +7014,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6548,6 +7031,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6571,6 +7055,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',167), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6589,6 +7074,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',167), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6612,12 +7098,14 @@ CALL pc_i_nt_5_suc (168, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6634,12 +7122,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6676,6 +7166,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (169, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (169, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6690,6 +7181,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (169, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6710,6 +7202,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (170, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (170, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6724,6 +7217,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (170, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6766,6 +7260,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (172, 4), (170, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6780,6 +7275,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (172, 4), (170, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6805,6 +7301,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (173, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (173, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6818,6 +7315,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (173, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -6826,10 +7324,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (173, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (173, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -6845,6 +7345,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (174, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (174, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6858,6 +7359,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (174, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6868,10 +7370,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (174, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (174, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6889,6 +7393,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (175, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (175, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6904,6 +7409,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',175), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6916,10 +7422,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (175, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',175), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6939,6 +7447,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (176, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (176, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6952,10 +7461,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',176), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',176), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6966,14 +7477,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (176, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',176), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',176), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6991,6 +7505,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (177, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (177, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7006,6 +7521,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (177, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7014,12 +7530,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (177, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (177, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7035,6 +7553,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (178, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (178, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7050,6 +7569,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (178, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7060,12 +7580,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (178, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (178, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7083,6 +7605,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (179, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (179, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7100,6 +7623,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',179), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7112,12 +7636,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (179, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',179), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7137,6 +7663,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (180, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (180, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7152,10 +7679,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',180), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',180), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7166,16 +7695,19 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (180, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',180), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',180), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7195,6 +7727,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',181), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7212,6 +7745,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (181, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7220,6 +7754,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',181), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7228,6 +7763,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (181, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7245,6 +7781,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',182), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7262,6 +7799,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (182, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7272,6 +7810,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',182), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7280,6 +7819,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (182, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7299,6 +7839,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',183), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7318,6 +7859,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',183), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7330,6 +7872,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',183), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7338,6 +7881,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',183), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7359,6 +7903,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',184), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7376,10 +7921,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',184), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',184), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7390,6 +7937,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',184), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7398,10 +7946,12 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',184), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',184), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7419,12 +7969,14 @@ CALL pc_i_nt_5_suc (185, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7440,6 +7992,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (185, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7448,18 +8001,21 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (185, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7475,12 +8031,14 @@ CALL pc_i_nt_5_suc (186, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7496,6 +8054,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (186, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7506,18 +8065,21 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (186, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7535,12 +8097,14 @@ CALL pc_i_nt_5_suc (187, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7558,6 +8122,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7570,18 +8135,21 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7601,12 +8169,14 @@ CALL pc_i_nt_5_suc (188, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7622,10 +8192,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7636,22 +8208,26 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7679,6 +8255,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (189, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (189, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7697,6 +8274,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (189, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7712,6 +8290,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (190, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (190, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7730,6 +8309,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (190, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7745,6 +8325,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (191, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (191, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7763,6 +8344,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (191, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7778,6 +8360,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (192, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (192, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7798,6 +8381,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (192, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7813,6 +8397,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (193, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (193, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7833,6 +8418,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (193, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7850,6 +8436,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (194, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (194, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7870,6 +8457,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (194, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7887,6 +8475,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (195, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (195, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7909,6 +8498,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (195, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7926,6 +8516,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (196, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (196, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7946,6 +8537,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (196, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7965,6 +8557,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',197), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7987,6 +8580,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',197), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8008,6 +8602,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',198), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8030,6 +8625,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',198), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8051,6 +8647,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',199), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8075,6 +8672,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',199), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8096,6 +8694,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',200), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8118,6 +8717,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',200), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8137,12 +8737,14 @@ CALL pc_i_nt_5_suc (201, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8163,12 +8765,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8186,12 +8790,14 @@ CALL pc_i_nt_5_suc (202, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8212,12 +8818,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8235,12 +8843,14 @@ CALL pc_i_nt_5_suc (203, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8261,12 +8871,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8284,12 +8896,14 @@ CALL pc_i_nt_5_suc (204, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8312,12 +8926,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8346,6 +8962,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8359,6 +8976,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (205, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8367,10 +8985,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (205, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8394,8 +9014,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 206, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (206, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8404,8 +9026,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 206, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (206, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8421,6 +9045,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 207 --> 2", tt_3.info= "new text 207 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 207 --> 2", tt_3.info= "new text 207 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8436,6 +9061,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (207, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8444,12 +9070,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 207 --> 2", tt_3.info= "new text 207 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (207, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8465,6 +9093,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (208, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8480,6 +9109,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (208, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8488,12 +9118,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (208, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8509,6 +9141,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (209, 2, fc_i_tt_5_suc(209, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',209), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8530,6 +9163,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (209, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8538,6 +9172,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',209), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8550,6 +9185,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (209, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8578,8 +9214,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 210 --> 2", nt_4.info= "new text 210 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (210, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8592,8 +9230,10 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 210 --> 2", nt_4.info= "new text 210 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (210, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8622,8 +9262,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (211, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (211, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8636,8 +9278,10 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (211, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (211, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8670,10 +9314,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',212), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (212, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8690,10 +9336,12 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',212), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (212, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8721,6 +9369,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 213, 2, COUNT(*) FROM tt_1 UNION SELECT 205, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8734,6 +9383,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (213, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8742,10 +9392,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 213, 2, COUNT(*) FROM tt_1 UNION SELECT 205, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (213, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8770,6 +9422,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (214, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8778,6 +9431,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (214, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8794,6 +9448,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (215, 2), (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8807,6 +9462,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (215, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8815,10 +9471,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (215, 2), (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (215, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8835,6 +9493,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (216, 2, ''), (212, 2, fc_i_tt_5_suc (216, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8850,6 +9509,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (216, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8858,12 +9518,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (216, 2, ''), (212, 2, fc_i_tt_5_suc (216, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (216, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8893,6 +9555,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (217, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8905,6 +9568,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (217, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8938,6 +9602,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (218, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8954,6 +9619,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (218, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8980,6 +9646,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8998,6 +9665,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9034,6 +9702,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 221 --> 2", tt_3.info= "new text 221 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 221 --> 2", tt_3.info= "new text 221 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9052,6 +9721,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 221 --> 2", tt_3.info= "new text 221 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9067,6 +9737,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (222, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9085,6 +9756,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9100,6 +9772,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (223, 2, fc_i_tt_5_suc(223, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',223), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9120,6 +9793,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',223), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9256,6 +9930,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 227, 2, COUNT(*) FROM tt_1 UNION SELECT 219, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9274,6 +9949,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 227, 2, COUNT(*) FROM tt_1 UNION SELECT 219, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9312,6 +9988,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (229, 2), (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9330,6 +10007,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (229, 2), (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9346,6 +10024,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (230, 2, ''), (226, 2, fc_i_tt_5_suc (230, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9366,6 +10045,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (230, 2, ''), (226, 2, fc_i_tt_5_suc (230, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9473,6 +10153,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9482,6 +10163,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (233, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9490,10 +10172,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (233, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9517,8 +10201,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (234, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 234, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9527,8 +10213,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (234, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 234, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9548,6 +10236,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 235 --> 4", tt_3.info= "new text 235 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 235 --> 4", tt_3.info= "new text 235 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9557,6 +10246,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (235, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_3) @@ -9567,10 +10257,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 235 --> 4", tt_3.info= "new text 235 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (235, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_3) @@ -9592,6 +10284,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (236, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9601,6 +10294,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (236, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_4) @@ -9611,10 +10305,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (236, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_4) @@ -9636,6 +10332,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (237, 4, fc_i_tt_5_suc(237, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',237), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9647,6 +10344,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (237, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_5) @@ -9661,12 +10359,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',237), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (237, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_5) @@ -9701,8 +10401,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (238, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 238 --> 4", nt_4.info= "new text 238 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9715,8 +10417,10 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (238, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 238 --> 4", nt_4.info= "new text 238 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9745,8 +10449,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (239, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (239, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9759,8 +10465,10 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (239, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (239, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9793,8 +10501,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (240, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',240), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9813,8 +10523,10 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (240, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',240), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9847,6 +10559,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 241, 4, COUNT(*) FROM tt_1 UNION SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9856,6 +10569,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (241, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9864,10 +10578,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 241, 4, COUNT(*) FROM tt_1 UNION SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (241, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9892,6 +10608,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (242, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9900,6 +10617,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (242, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9920,6 +10638,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (243, 4), (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9929,6 +10648,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (243, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9937,10 +10657,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (243, 4), (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (243, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9961,6 +10683,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (244, 4, ''), (240, 2, fc_i_tt_5_suc (244, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9972,6 +10695,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (244, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9980,12 +10704,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (244, 4, ''), (240, 2, fc_i_tt_5_suc (244, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (244, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10015,6 +10741,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (245, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10027,6 +10754,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (245, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10060,6 +10788,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (246, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10076,6 +10805,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (246, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10105,6 +10835,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10119,6 +10850,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10159,6 +10891,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 249 --> 4", tt_3.info= "new text 249 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 249 --> 4", tt_3.info= "new text 249 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10173,6 +10906,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 249 --> 4", tt_3.info= "new text 249 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10192,6 +10926,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (250, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10206,6 +10941,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10225,6 +10961,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (251, 4, fc_i_tt_5_suc(251, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',251), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10241,6 +10978,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',251), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10380,6 +11118,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 255, 4, COUNT(*) FROM tt_1 UNION SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10394,6 +11133,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 255, 4, COUNT(*) FROM tt_1 UNION SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10436,6 +11176,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (257, 4), (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10450,6 +11191,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (257, 4), (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10470,6 +11212,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (258, 4, ''), (254, 2, fc_i_tt_5_suc (258, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10486,6 +11229,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (258, 4, ''), (254, 2, fc_i_tt_5_suc (258, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10591,6 +11335,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10600,6 +11345,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (261, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (261, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10612,10 +11358,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (261, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10635,6 +11383,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10644,6 +11393,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 262, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10652,10 +11402,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 262, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10671,6 +11423,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10680,6 +11433,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10697,10 +11451,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10720,6 +11476,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10729,6 +11486,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10746,10 +11504,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10769,6 +11529,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (265, 2, fc_i_tt_5_suc(265, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',265), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10780,6 +11541,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10801,12 +11563,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',265), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10839,6 +11603,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10848,6 +11613,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 266 --> 2", nt_4.info= "new text 266 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10860,10 +11626,12 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 266 --> 2", nt_4.info= "new text 266 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10888,6 +11656,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10897,6 +11666,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (267, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10909,10 +11679,12 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (267, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10941,6 +11713,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10950,6 +11723,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',268), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10968,10 +11742,12 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',268), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11002,6 +11778,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 269, 2, COUNT(*) FROM tt_1 UNION SELECT 268, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11011,6 +11788,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (269, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (269, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11023,10 +11801,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 269, 2, COUNT(*) FROM tt_1 UNION SELECT 268, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (269, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11047,6 +11827,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (270, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (270, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11059,6 +11840,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (270, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11075,6 +11857,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (271, 2), (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11084,6 +11867,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (271, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (271, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11096,10 +11880,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (271, 2), (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (271, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11116,6 +11902,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (272, 2, ''), (268, 2, fc_i_tt_5_suc (272, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11127,6 +11914,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (272, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (272, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11139,12 +11927,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (272, 2, ''), (268, 2, fc_i_tt_5_suc (272, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (272, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11170,6 +11960,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (273, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (273, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11186,6 +11977,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (273, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11215,6 +12007,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (274, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (274, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11235,6 +12028,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (274, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11262,6 +12056,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11271,6 +12066,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (275, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (275, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11285,10 +12081,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (275, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11308,6 +12106,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11322,6 +12121,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11337,6 +12137,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11346,6 +12147,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11360,10 +12162,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11379,6 +12183,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11388,6 +12193,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11402,10 +12208,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11421,6 +12229,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (279, 2, fc_i_tt_5_suc(279, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',279), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11432,6 +12241,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11446,12 +12256,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',279), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11476,6 +12288,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11494,6 +12307,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11518,6 +12332,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11536,6 +12351,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11564,6 +12380,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11586,6 +12403,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11614,6 +12432,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 283, 2, COUNT(*) FROM tt_1 UNION SELECT 282, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11623,6 +12442,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (283, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (283, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11637,10 +12457,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 283, 2, COUNT(*) FROM tt_1 UNION SELECT 282, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (283, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11661,6 +12483,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (284, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (284, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11675,6 +12498,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (284, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11691,6 +12515,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (285, 2), (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11700,6 +12525,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (285, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (285, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11714,10 +12540,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (285, 2), (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (285, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11734,6 +12562,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (286, 2, ''), (282, 2, fc_i_tt_5_suc (286, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11745,6 +12574,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (286, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (286, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11759,12 +12589,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (286, 2, ''), (282, 2, fc_i_tt_5_suc (286, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (286, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11790,6 +12622,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (287, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (287, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11808,6 +12641,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (287, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11837,6 +12671,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (288, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (288, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11859,6 +12694,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (288, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11885,6 +12721,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (289, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (289, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11894,6 +12731,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11906,10 +12744,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (289, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11925,6 +12765,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (290, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (290, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11938,6 +12779,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 290, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -11946,10 +12788,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (290, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 290, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -11965,6 +12809,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (291, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (291, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11974,6 +12819,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 291 --> 4", tt_3.info= "new text 291 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 291 --> 4", tt_3.info= "new text 291 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11991,10 +12837,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (291, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 291 --> 4", tt_3.info= "new text 291 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12014,6 +12862,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (292, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (292, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12023,6 +12872,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (292, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12040,10 +12890,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (292, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12063,6 +12915,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (293, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (293, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12072,6 +12925,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (293, 4, fc_i_tt_5_suc(293, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',293), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12095,10 +12949,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (293, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',293), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12124,6 +12980,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (294, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (294, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12142,6 +12999,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 294 --> 4", nt_4.info= "new text 294 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12150,6 +13008,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (294, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12158,6 +13017,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 294 --> 4", nt_4.info= "new text 294 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12173,6 +13033,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (295, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (295, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12191,6 +13052,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (295, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12199,6 +13061,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (295, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12207,6 +13070,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (295, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12222,6 +13086,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (296, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (296, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12244,6 +13109,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',296), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12254,6 +13120,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (296, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12266,6 +13133,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',296), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12294,6 +13162,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (297, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (297, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12304,6 +13173,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 297, 4, COUNT(*) FROM tt_1 UNION SELECT 297, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12316,10 +13186,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (297, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 297, 4, COUNT(*) FROM tt_1 UNION SELECT 297, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12335,6 +13207,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (298, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (298, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12352,6 +13225,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (298, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12367,6 +13241,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (299, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (299, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12377,6 +13252,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (299, 4), (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12389,10 +13265,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (299, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (299, 4), (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12408,6 +13286,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (300, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (300, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12418,6 +13297,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (300, 4, ''), (296, 2, fc_i_tt_5_suc (300, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12432,10 +13312,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (300, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (300, 4, ''), (296, 2, fc_i_tt_5_suc (300, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12453,6 +13335,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (301, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (301, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12475,6 +13358,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (301, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12494,6 +13378,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (302, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (302, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12520,6 +13405,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (302, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12554,6 +13440,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (303, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (303, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12563,6 +13450,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12577,10 +13465,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (303, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12596,6 +13486,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (304, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (304, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12614,6 +13505,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (304, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12629,6 +13521,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (305, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (305, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12638,6 +13531,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 305 --> 4", tt_3.info= "new text 305 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 305 --> 4", tt_3.info= "new text 305 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12652,10 +13546,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (305, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 305 --> 4", tt_3.info= "new text 305 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12671,6 +13567,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (306, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (306, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12680,6 +13577,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (306, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12694,10 +13592,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (306, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12713,6 +13613,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (307, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (307, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12722,6 +13623,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (307, 4, fc_i_tt_5_suc(307, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',307), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12738,10 +13640,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (307, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',307), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12759,6 +13663,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (308, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (308, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12782,6 +13687,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (308, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12801,6 +13707,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (309, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (309, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12824,6 +13731,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (309, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12843,6 +13751,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (310, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (310, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12870,6 +13779,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (310, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12904,6 +13814,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (311, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (311, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12914,6 +13825,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 311, 4, COUNT(*) FROM tt_1 UNION SELECT 311, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12928,10 +13840,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (311, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 311, 4, COUNT(*) FROM tt_1 UNION SELECT 311, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12947,6 +13861,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (312, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (312, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12966,6 +13881,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (312, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12981,6 +13897,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (313, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (313, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12991,6 +13908,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (313, 4), (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13005,10 +13923,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (313, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (313, 4), (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13024,6 +13944,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (314, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (314, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13034,6 +13955,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (314, 4, ''), (310, 2, fc_i_tt_5_suc (314, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -13050,10 +13972,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (314, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (314, 4, ''), (310, 2, fc_i_tt_5_suc (314, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -13071,6 +13995,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (315, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (315, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13095,6 +14020,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (315, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13114,6 +14040,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (316, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (316, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13142,6 +14069,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (316, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13184,6 +14112,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (317, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` @@ -13193,6 +14122,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (317, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` @@ -13209,6 +14139,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (318, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (318, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13236,9 +14167,11 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -13248,13 +14181,16 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (318, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -13275,6 +14211,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13298,9 +14235,11 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -13310,13 +14249,16 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -13341,6 +14283,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13360,9 +14303,11 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -13372,13 +14317,16 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -13405,6 +14353,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_1` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_1 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13426,6 +14375,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_1` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_1 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13450,8 +14400,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_2` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_2 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_2) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CS-N->N << -e-e-e-e-e-e-e-e-e-e-e- @@ -13472,8 +14422,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_2` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_2 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_2) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # GTID #-#-# @@ -13497,8 +14447,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_3` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_3 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_3) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> CS-T->N << -e-e-e-e-e-e-e-e-e-e-e- @@ -13519,8 +14469,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_3` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_3 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_3) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # GTID #-#-# @@ -13544,6 +14494,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_4` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_4 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13565,6 +14516,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_4` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_4 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13589,6 +14541,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_5` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_5 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_5) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13610,6 +14563,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_5` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_5 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_5) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13634,6 +14588,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_6` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_6 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_6) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13655,6 +14610,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_6` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_6 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_6) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13677,6 +14633,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_7` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_7 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13691,6 +14648,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_7` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_7 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13725,13 +14683,13 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13742,13 +14700,13 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_7 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13784,8 +14742,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (329, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (329, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13796,8 +14756,10 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_7 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (329, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (329, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13828,11 +14790,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (330, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13843,11 +14804,10 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_7 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (330, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13879,6 +14839,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (331, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13889,6 +14850,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_7 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (331, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13921,6 +14883,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_8` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_8 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13935,6 +14898,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_8` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_8 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13969,11 +14933,13 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13984,11 +14950,13 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_8 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14024,8 +14992,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (335, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (335, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14036,8 +15006,10 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_8 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (335, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (335, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14068,9 +15040,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (336, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14081,9 +15054,10 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_8 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (336, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14115,6 +15089,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (337, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14125,6 +15100,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_8 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (337, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14157,8 +15133,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_9` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_9 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CS-N->N << -e-e-e-e-e-e-e-e-e-e-e- @@ -14172,8 +15148,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_9` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_9 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CS-N->N << -e-e-e-e-e-e-e-e-e-e-e- @@ -14199,8 +15175,8 @@ INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FR include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-T << -e-e-e-e-e-e-e-e-e-e-e- @@ -14213,8 +15189,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14225,13 +15203,15 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14259,6 +15239,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -14272,8 +15253,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14284,12 +15267,15 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14312,8 +15298,8 @@ INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FR include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-T << -e-e-e-e-e-e-e-e-e-e-e- @@ -14326,6 +15312,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (342, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14336,11 +15323,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (342, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14364,6 +15352,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -14377,6 +15366,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (343, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14387,10 +15377,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (343, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14423,8 +15415,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_10` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_10 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CS-N->N << -e-e-e-e-e-e-e-e-e-e-e- @@ -14438,8 +15430,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_10` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_10 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CS-N->N << -e-e-e-e-e-e-e-e-e-e-e- @@ -14465,10 +15457,8 @@ INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() F include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-N << -e-e-e-e-e-e-e-e-e-e-e- @@ -14481,8 +15471,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14493,15 +15485,15 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14529,6 +15521,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -14542,8 +15535,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14554,12 +15549,15 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14582,10 +15580,8 @@ INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() F include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-N << -e-e-e-e-e-e-e-e-e-e-e- @@ -14598,6 +15594,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (348, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14608,13 +15605,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (348, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14638,6 +15634,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -14651,6 +15648,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (349, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14661,10 +15659,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (349, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14706,6 +15706,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (351, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14714,6 +15715,7 @@ master-bin.000001 # Query # # ROLLBACK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (351, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14760,9 +15762,11 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -14772,9 +15776,11 @@ master-bin.000001 # Query # # ROLLBACK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -14812,8 +15818,10 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14822,8 +15830,10 @@ master-bin.000001 # Query # # ROLLBACK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14848,6 +15858,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -14867,6 +15878,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (357, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14875,10 +15887,12 @@ master-bin.000001 # Query # # ROLLBACK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (357, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14911,6 +15925,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (359, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14919,6 +15934,7 @@ master-bin.000001 # Query # # ROLLBACK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (359, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14943,6 +15959,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (361, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (361, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -14962,6 +15979,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (361, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14970,10 +15988,12 @@ master-bin.000001 # Query # # ROLLBACK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (361, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (361, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14997,6 +16017,7 @@ SET @var= fc_i_tt_5_suc(363, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',363), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15009,6 +16030,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',363), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15024,6 +16046,7 @@ SET @var= fc_i_nt_5_suc(364, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',364), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15036,6 +16059,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',364), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15054,6 +16078,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',365), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -15065,6 +16090,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',365), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -15080,6 +16106,7 @@ SET @var= fc_i_nt_5_suc(366, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',366), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15097,6 +16124,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',366), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15109,6 +16137,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',366), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15117,6 +16146,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',366), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15140,6 +16170,7 @@ SET @var= fc_i_nt_5_suc(367, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',367), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15153,6 +16184,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',367), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15165,6 +16197,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',367), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15173,6 +16206,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',367), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15192,6 +16226,7 @@ SET @var= fc_i_nt_5_suc(368, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',368), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15214,6 +16249,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',368), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15237,6 +16273,7 @@ SET @var= fc_i_nt_5_suc(369, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',369), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15255,6 +16292,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',369), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15288,8 +16326,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',370), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',370), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15307,8 +16347,10 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',370), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',370), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15342,12 +16384,14 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',371), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',371), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -15361,12 +16405,14 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',371), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',371), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result index 7a51ba2b3c9..0bb0f57e463 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result @@ -1,4 +1,7 @@ include/rpl_init.inc [topology=1->2] +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); +call mtr.add_suppression("Can't find record in 't1'"); +call mtr.add_suppression("Can't find record in 't2'"); connection server_1; ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB; diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result index a15ca4e047b..4172abb17d9 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result @@ -88,4 +88,6 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads; include/start_slave.inc connection server_1; DROP TABLE t1, t2; +connection server_2; +call mtr.add_suppression("Deadlock found when trying to get lock.*"); include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result index effebdddaba..62c400d7138 100644 --- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result +++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result @@ -11,6 +11,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3,UUID()), (4,UUID()) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -23,6 +24,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) slave-bin.000001 # Query # # COMMIT slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3,UUID()), (4,UUID()) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_replicate_do.result b/mysql-test/suite/rpl/r/rpl_replicate_do.result index 115c27d9387..f560f78be45 100644 --- a/mysql-test/suite/rpl/r/rpl_replicate_do.result +++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result @@ -39,8 +39,8 @@ t1 t2 show triggers; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1 INSERT t1 set new.b=2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci -trg2 INSERT t2 set new.b=2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg1 INSERT t1 set new.b=2 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg2 INSERT t2 set new.b=2 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci connection slave; connection slave; show tables; @@ -48,7 +48,7 @@ Tables_in_test t1 show triggers; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -trg1 INSERT t1 set new.b=2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +trg1 INSERT t1 set new.b=2 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci connection master; drop trigger trg1; drop trigger trg2; diff --git a/mysql-test/suite/rpl/r/rpl_rewrt_db.result b/mysql-test/suite/rpl/r/rpl_rewrt_db.result index 4ae20824b22..f6c7e4ad54e 100644 --- a/mysql-test/suite/rpl/r/rpl_rewrt_db.result +++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result @@ -25,7 +25,7 @@ create database rewrite; connection master; use test; create table t1 (a date, b date, c date not null, d date); -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ','; Warnings: Warning 1265 Data truncated for column 'a' at row 1 Warning 1265 Data truncated for column 'c' at row 1 @@ -44,7 +44,7 @@ a b c d 2003-03-03 2003-03-03 2003-03-03 NULL connection master; truncate table t1; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); Warnings: Warning 1265 Data truncated for column 'c' at row 1 Warning 1265 Data truncated for column 'd' at row 1 diff --git a/mysql-test/suite/rpl/r/rpl_row_annotate_do.result b/mysql-test/suite/rpl/r/rpl_row_annotate_do.result index c778355d182..52f7b180fae 100644 --- a/mysql-test/suite/rpl/r/rpl_row_annotate_do.result +++ b/mysql-test/suite/rpl/r/rpl_row_annotate_do.result @@ -67,7 +67,7 @@ connection slave; include/wait_for_slave_sql_error.inc [errno=1032] Last_SQL_Error (expected "Delete_rows_v1 event on table test1.t3; Can't find record in 't3'" error) Could not execute Delete_rows_v1 event on table test1.t3; Can't find record in 't3', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log master-bin.000002, end_log_pos END_LOG_POS -call mtr.add_suppression("Slave: Can't find record in 't3' Error_code: 1032"); +call mtr.add_suppression("Can't find record in 't3'"); SET GLOBAL sql_slave_skip_counter=1; START SLAVE; connection master; @@ -153,26 +153,22 @@ slave-bin.000001 # Table_map 1 # table_id: # (test1.t5) slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Query 1 # COMMIT slave-bin.000001 # Gtid 2 # BEGIN GTID 0-2-25 +slave-bin.000001 # Annotate_rows 2 # DELETE FROM t3 WHERE a=2 slave-bin.000001 # Table_map 2 # table_id: # (test1.t3) slave-bin.000001 # Delete_rows_v1 2 # table_id: # flags: STMT_END_F slave-bin.000001 # Query 2 # COMMIT slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-25 slave-bin.000001 # Annotate_rows 1 # INSERT INTO t5 (a) SELECT a.a*10000+b.a*1000+c.a*100+d.a*10 FROM t5 a, t5 b, t5 c, t5 d slave-bin.000001 # Table_map 1 # table_id: # (test1.t5) -slave-bin.000001 # Write_rows_v1 1 # table_id: # -slave-bin.000001 # Write_rows_v1 1 # table_id: # -slave-bin.000001 # Write_rows_v1 1 # table_id: # slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Query 1 # COMMIT slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-26 slave-bin.000001 # Annotate_rows 1 # INSERT INTO t3 (a) SELECT a FROM t5 WHERE a > 10 slave-bin.000001 # Table_map 1 # table_id: # (test1.t3) -slave-bin.000001 # Write_rows_v1 1 # table_id: # -slave-bin.000001 # Write_rows_v1 1 # table_id: # -slave-bin.000001 # Write_rows_v1 1 # table_id: # slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Query 1 # COMMIT slave-bin.000001 # Gtid 2 # BEGIN GTID 0-2-27 +slave-bin.000001 # Annotate_rows 2 # INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Can\'t find record in \'t3\'' COLLATE 'latin1_swedish_ci')) slave-bin.000001 # Table_map 2 # table_id: # (mtr.test_suppressions) slave-bin.000001 # Write_rows_v1 2 # table_id: # flags: STMT_END_F slave-bin.000001 # Query 2 # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result b/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result index aaab2199725..c657cf2fbb5 100644 --- a/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result +++ b/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result @@ -59,7 +59,7 @@ connection slave; include/wait_for_slave_sql_error.inc [errno=1032] Last_SQL_Error (expected "Delete_rows_v1 event on table test1.t3; Can't find record in 't3'" error) Could not execute Delete_rows_v1 event on table test1.t3; Can't find record in 't3', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log master-bin.000002, end_log_pos END_LOG_POS -call mtr.add_suppression("Slave: Can't find record in 't3' Error_code: 1032"); +call mtr.add_suppression("Can't find record in 't3'"); SET GLOBAL sql_slave_skip_counter=1; START SLAVE; connection master; @@ -135,24 +135,20 @@ slave-bin.000001 # Table_map 1 # table_id: # (test1.t5) slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Query 1 # COMMIT slave-bin.000001 # Gtid 2 # BEGIN GTID 0-2-25 +slave-bin.000001 # Annotate_rows 2 # DELETE FROM t3 WHERE a=2 slave-bin.000001 # Table_map 2 # table_id: # (test1.t3) slave-bin.000001 # Delete_rows_v1 2 # table_id: # flags: STMT_END_F slave-bin.000001 # Query 2 # COMMIT slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-25 slave-bin.000001 # Table_map 1 # table_id: # (test1.t5) -slave-bin.000001 # Write_rows_v1 1 # table_id: # -slave-bin.000001 # Write_rows_v1 1 # table_id: # -slave-bin.000001 # Write_rows_v1 1 # table_id: # slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Query 1 # COMMIT slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-26 slave-bin.000001 # Table_map 1 # table_id: # (test1.t3) -slave-bin.000001 # Write_rows_v1 1 # table_id: # -slave-bin.000001 # Write_rows_v1 1 # table_id: # -slave-bin.000001 # Write_rows_v1 1 # table_id: # slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Query 1 # COMMIT slave-bin.000001 # Gtid 2 # BEGIN GTID 0-2-27 +slave-bin.000001 # Annotate_rows 2 # INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Can\'t find record in \'t3\'' COLLATE 'latin1_swedish_ci')) slave-bin.000001 # Table_map 2 # table_id: # (mtr.test_suppressions) slave-bin.000001 # Write_rows_v1 2 # table_id: # flags: STMT_END_F slave-bin.000001 # Query 2 # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result index 1072cb60f01..2778ac1bf61 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result @@ -25,12 +25,14 @@ INSERT INTO t2 VALUES (3,3), (4,4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Can\'t find record in \'t.\'' COLLATE 'latin1_swedish_ci')) master-bin.000001 # Table_map # # table_id: # (mtr.test_suppressions) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1,1), (2,2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -66,6 +68,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1),(2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result index 1727ff4985d..1d4b31a4a87 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result @@ -546,6 +546,7 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* error.* 1535"); call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* error.* 1032"); call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, error.* 1677"); +call mtr.add_suppression("Can't find record in 't1'"); include/rpl_reset.inc [expecting slave to replicate correctly] connection master; @@ -672,33 +673,33 @@ CREATE TABLE t1 (a bit) ENGINE='MYISAM' ; INSERT IGNORE INTO t1 VALUES (NULL); INSERT INTO t1 ( a ) VALUES ( 0 ); UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3; -INSERT INTO t1 ( a ) VALUES ( 5 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); DELETE FROM t1 WHERE a < 2 LIMIT 4; DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 9 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 9 ); UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 8 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 8 ); UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0; -INSERT INTO t1 ( a ) VALUES ( 4 ); -INSERT INTO t1 ( a ) VALUES ( 3 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 4 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6; DELETE FROM t1 WHERE a = 4 LIMIT 7; -UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9; +UPDATE IGNORE t1 SET a = 9 WHERE a < 2 LIMIT 9; UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2; DELETE FROM t1 WHERE a < 0 LIMIT 5; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8; +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); +UPDATE IGNORE t1 SET a = 4 WHERE a < 6 LIMIT 4; +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); +UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 8; DELETE FROM t1 WHERE a < 8 LIMIT 8; -INSERT INTO t1 ( a ) VALUES ( 6 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 6 ); DELETE FROM t1 WHERE a < 6 LIMIT 7; UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7; UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 7 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 7 ); DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 7 ); -INSERT INTO t1 ( a ) VALUES ( 6 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 7 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 6 ); UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4; DELETE FROM t1 WHERE a = 2 LIMIT 9; DELETE FROM t1 WHERE a = 1 LIMIT 4; @@ -707,10 +708,12 @@ INSERT INTO t1 ( a ) VALUES ( 0 ); DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; +UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 3; connection slave; include/diff_tables.inc [master:t1, slave:t1] connection master; drop table t1; connection slave; +connection slave; +call mtr.add_suppression("Can't find record in 't1'"); include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result index f12f363a3d4..1e3ddd4f289 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result @@ -551,6 +551,7 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* error.* 1535"); call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* error.* 1032"); call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, error.* 1677"); +call mtr.add_suppression("Can't find record in 't1'"); include/rpl_reset.inc [expecting slave to replicate correctly] connection master; @@ -680,33 +681,33 @@ CREATE TABLE t1 (a bit) ENGINE='INNODB' ; INSERT IGNORE INTO t1 VALUES (NULL); INSERT INTO t1 ( a ) VALUES ( 0 ); UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3; -INSERT INTO t1 ( a ) VALUES ( 5 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); DELETE FROM t1 WHERE a < 2 LIMIT 4; DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 9 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 9 ); UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 8 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 8 ); UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0; -INSERT INTO t1 ( a ) VALUES ( 4 ); -INSERT INTO t1 ( a ) VALUES ( 3 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 4 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6; DELETE FROM t1 WHERE a = 4 LIMIT 7; -UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9; +UPDATE IGNORE t1 SET a = 9 WHERE a < 2 LIMIT 9; UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2; DELETE FROM t1 WHERE a < 0 LIMIT 5; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8; +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); +UPDATE IGNORE t1 SET a = 4 WHERE a < 6 LIMIT 4; +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); +UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 8; DELETE FROM t1 WHERE a < 8 LIMIT 8; -INSERT INTO t1 ( a ) VALUES ( 6 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 6 ); DELETE FROM t1 WHERE a < 6 LIMIT 7; UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7; UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 7 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 7 ); DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 7 ); -INSERT INTO t1 ( a ) VALUES ( 6 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 7 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 6 ); UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4; DELETE FROM t1 WHERE a = 2 LIMIT 9; DELETE FROM t1 WHERE a = 1 LIMIT 4; @@ -715,7 +716,7 @@ INSERT INTO t1 ( a ) VALUES ( 0 ); DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; +UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 3; connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; include/diff_tables.inc [master:t1, slave:t1] diff --git a/mysql-test/suite/rpl/r/rpl_row_create_select.result b/mysql-test/suite/rpl/r/rpl_row_create_select.result index 5b37b409b09..b064d42982f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_select.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_select.result @@ -7,6 +7,7 @@ include/master-slave.inc connection master; #After the patch, the display width is set to a default #value of 21. +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT REPEAT('A', 1000) DIV 1 AS a; Warnings: Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' @@ -15,6 +16,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` bigint(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CONVERT(REPEAT('A', 255) USING UCS2) DIV 1 AS a; Warnings: Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result index 9ba89b2fc15..b8a1e2f8246 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result @@ -133,6 +133,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t7 SELECT a,b FROM tt3 master-bin.000001 # Table_map # # table_id: # (test.t7) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -154,6 +155,7 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t7 SELECT a,b FROM tt4 master-bin.000001 # Table_map # # table_id: # (test.t7) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -273,6 +275,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1),(2),(3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -280,6 +283,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE t2 ENGINE=INNODB SELECT * FROM t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -287,6 +291,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE `t3` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE t3 ENGINE=INNODB SELECT * FROM t1 master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -294,10 +299,12 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE `t4` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE t4 ENGINE=INNODB SELECT * FROM t1 master-bin.000001 # Table_map # # table_id: # (test.t4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (4),(5),(6) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -360,14 +367,17 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1),(2),(3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT a*a FROM t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT a+2 FROM tt1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -399,8 +409,10 @@ a include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT a*a FROM t1 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT a+2 FROM tt2 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -445,6 +457,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE `mysqltest1`.`with_select` ( `f1` int(1) NOT NULL ) +master-bin.000001 # Annotate_rows # # CREATE TABLE mysqltest1.with_select AS SELECT 1 AS f1 master-bin.000001 # Table_map # # table_id: # (mysqltest1.with_select) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT 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 d41ec925f00..cc85e454cd2 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 @@ -157,6 +157,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -173,10 +174,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -191,6 +194,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -207,10 +211,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -226,6 +232,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -244,10 +251,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -264,6 +273,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */ @@ -285,10 +295,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */ @@ -306,6 +318,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -324,10 +337,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -344,6 +359,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */ @@ -365,10 +381,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */ @@ -386,6 +404,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -404,10 +423,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -424,6 +445,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */ @@ -445,10 +467,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */ @@ -465,6 +489,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -481,10 +506,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -499,6 +526,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -514,10 +542,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -532,6 +562,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -547,10 +578,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -568,14 +601,17 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (1), (1) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -593,12 +629,15 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_error_1() VALUES (1), (1) master-bin.000001 # Table_map # # table_id: # (test.tt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -616,14 +655,17 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (2), (2) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -642,6 +684,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -660,10 +703,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -678,6 +723,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -696,10 +742,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -715,6 +763,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -735,10 +784,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -755,6 +806,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */ @@ -778,10 +830,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */ @@ -799,6 +853,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -819,10 +874,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -839,6 +896,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */ @@ -862,10 +920,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */ @@ -883,6 +943,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -903,10 +964,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -923,6 +986,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */ @@ -946,10 +1010,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */ @@ -966,6 +1032,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -984,10 +1051,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -1002,6 +1071,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -1019,10 +1089,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -1037,6 +1109,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -1054,10 +1127,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -1077,14 +1152,17 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (3), (3) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -1104,12 +1182,15 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_error_1() VALUES (2), (2) master-bin.000001 # Table_map # # table_id: # (test.tt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -1129,14 +1210,17 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (4), (4) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -1282,6 +1366,7 @@ DROP TABLE tt_2; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1297,6 +1382,7 @@ DROP TABLE nt_2; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1313,6 +1399,7 @@ ERROR 42S02: Unknown table 'test.xx_1' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1328,6 +1415,7 @@ Note 1051 Unknown table 'test.xx_1' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1344,6 +1432,7 @@ ERROR 42S02: Unknown table 'test.xx_1' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1361,6 +1450,7 @@ Note 1051 Unknown table 'test.xx_1' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1377,6 +1467,7 @@ ERROR 42S02: Unknown table 'test.xx_1' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1394,6 +1485,7 @@ Note 1051 Unknown table 'test.xx_1' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1409,6 +1501,7 @@ DROP TABLE tt_2, nt_2; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1424,6 +1517,7 @@ DROP TABLE tt_1, tt_2; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1439,6 +1533,7 @@ DROP TABLE nt_1, nt_2; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1454,6 +1549,7 @@ DROP TABLE tt_tmp_2, nt_tmp_2, nt_2; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1469,6 +1565,7 @@ DROP TABLE tt_tmp_2, nt_tmp_2; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1516,6 +1613,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1545,6 +1643,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (5), (5) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1563,6 +1662,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_error_1() VALUES (3), (3) master-bin.000001 # Table_map # # table_id: # (test.tt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1581,6 +1681,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (6), (6) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1602,6 +1703,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -1633,6 +1735,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (7), (7) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1651,6 +1754,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_error_1() VALUES (4), (4) master-bin.000001 # Table_map # # table_id: # (test.tt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -1671,6 +1775,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (8), (8) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1695,10 +1800,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1715,10 +1822,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1 SELECT * FROM nt_tmp_xx_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1735,6 +1844,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1751,6 +1861,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1769,10 +1880,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (9), (9) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1791,6 +1904,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1809,10 +1923,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (10), (10) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1836,10 +1952,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1858,6 +1976,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1876,6 +1995,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1894,6 +2014,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1914,10 +2035,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (11), (11) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1938,6 +2061,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -1958,10 +2082,12 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_1() VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (12), (12) master-bin.000001 # Table_map # # table_id: # (test.nt_error_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result b/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result index 9f925482db1..491fb68615c 100644 --- a/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result +++ b/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result @@ -18,6 +18,6 @@ connection slave; Occurrences: update=1, delete=1 include/stop_slave.inc SET GLOBAL debug_dbug = ''; -SET GLOBAL log_warnings = 1; +SET GLOBAL log_warnings = 2; include/start_slave.inc include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_idempotency.result b/mysql-test/suite/rpl/r/rpl_row_idempotency.result index 96dbb090491..c655ae67185 100644 --- a/mysql-test/suite/rpl/r/rpl_row_idempotency.result +++ b/mysql-test/suite/rpl/r/rpl_row_idempotency.result @@ -6,6 +6,8 @@ call mtr.add_suppression("Can.t find record in .t[12].* error.* 1032"); call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* error.* 1451"); call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* error.* 1452"); call mtr.add_suppression("Duplicate entry .1. for key .PRIMARY.* error.* 1062"); +call mtr.add_suppression("Can't find record in 't1'"); +call mtr.add_suppression("Can't find record in 't2'"); connection slave; set @old_slave_exec_mode= @@global.slave_exec_mode; set @@global.slave_exec_mode= IDEMPOTENT; diff --git a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result index 1e302e02ccc..91e9eef35fd 100644 --- a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result @@ -22,6 +22,7 @@ CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (43) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -37,6 +38,7 @@ DROP FUNCTION myfunc_int; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (42) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -54,6 +56,7 @@ test.nt_1 preload_keys status OK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (41) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -70,6 +73,7 @@ test.tt_2 preload_keys note The storage engine for the table doesn't support pre include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (40) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -85,6 +89,7 @@ test.nt_1 analyze status Table is already up to date include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (39) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -102,6 +107,7 @@ test.nt_1 check status OK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (38) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -117,6 +123,7 @@ test.nt_1 optimize status Table is already up to date include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (37) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -134,6 +141,7 @@ test.nt_1 repair status OK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (36) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -149,6 +157,7 @@ LOCK TABLES tt_1 WRITE; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (35) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -162,6 +171,7 @@ UNLOCK TABLES; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (34) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -175,6 +185,7 @@ CREATE USER 'user'@'localhost'; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (33) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -190,6 +201,7 @@ GRANT ALL ON *.* TO 'user'@'localhost'; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (32) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -205,6 +217,7 @@ SET PASSWORD FOR 'user'@'localhost' = PASSWORD('newpass'); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (31) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -220,6 +233,7 @@ REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost'; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (30) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -235,6 +249,7 @@ RENAME USER 'user'@'localhost' TO 'user_new'@'localhost'; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (29) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -250,6 +265,7 @@ DROP USER 'user_new'@'localhost'; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (28) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -265,6 +281,7 @@ CREATE EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (27) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -280,6 +297,7 @@ ALTER EVENT evt COMMENT 'evt'; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (26) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -295,6 +313,7 @@ DROP EVENT evt; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (25) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -310,6 +329,7 @@ CREATE TRIGGER tr AFTER INSERT ON tt_1 FOR EACH ROW UPDATE tt_2 SET ddl_case = d include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (24) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -325,6 +345,7 @@ DROP TRIGGER tr; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (23) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Table_map # # table_id: # (test.tt_2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F @@ -341,6 +362,7 @@ CREATE FUNCTION fc () RETURNS VARCHAR(64) RETURN "fc"; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (22) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -357,6 +379,7 @@ ALTER FUNCTION fc COMMENT 'fc'; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (21) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -372,6 +395,7 @@ DROP FUNCTION fc; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (20) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -387,6 +411,7 @@ CREATE PROCEDURE pc () UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.d include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (19) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -403,6 +428,7 @@ ALTER PROCEDURE pc COMMENT 'pc'; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (18) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -418,6 +444,7 @@ DROP PROCEDURE pc; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (17) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -433,6 +460,7 @@ CREATE VIEW v AS SELECT * FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (16) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -448,6 +476,7 @@ ALTER VIEW v AS SELECT * FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (15) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -463,6 +492,7 @@ DROP VIEW v; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (14) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -478,6 +508,7 @@ CREATE INDEX ix ON tt_1(ddl_case); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (13) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -493,6 +524,7 @@ DROP INDEX ix ON tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (12) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -508,6 +540,7 @@ CREATE TEMPORARY TABLE tt_xx (a int); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (11) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -521,6 +554,7 @@ ALTER TABLE tt_xx ADD COLUMN (b int); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (10) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -534,6 +568,7 @@ ALTER TABLE tt_xx RENAME new_tt_xx; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (9) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -547,6 +582,7 @@ DROP TEMPORARY TABLE IF EXISTS new_tt_xx; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (8) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -560,6 +596,7 @@ CREATE TABLE tt_xx (a int); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -575,6 +612,7 @@ ALTER TABLE tt_xx ADD COLUMN (b int); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -590,6 +628,7 @@ RENAME TABLE tt_xx TO new_tt_xx; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -605,6 +644,7 @@ TRUNCATE TABLE new_tt_xx; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -622,6 +662,7 @@ Note 1051 Unknown table 'test.tt_xx' include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -637,6 +678,7 @@ CREATE DATABASE db; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -652,6 +694,7 @@ DROP DATABASE IF EXISTS db; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(ddl_case) VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result b/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result index 6c02d361058..0704f5c69a1 100644 --- a/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result +++ b/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result @@ -6,10 +6,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (c1 char(50)) engine=myisam master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE t1 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result index f743e0aeb4b..0aa718cd405 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log.result +++ b/mysql-test/suite/rpl/r/rpl_row_log.result @@ -24,6 +24,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -32,6 +33,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # load data infile '../../std_data/words.dat' into table t1 ignore 1 lines master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -47,6 +49,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -207,6 +210,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -215,6 +219,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # load data infile '../../std_data/words.dat' into table t1 ignore 1 lines master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -227,6 +232,7 @@ master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=MyISAM master-bin.000002 # Gtid # # GTID #-#-# master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=MyISAM master-bin.000002 # Gtid # # BEGIN GTID #-#-# +master-bin.000002 # Annotate_rows # # insert into t2 values (1) master-bin.000002 # Table_map # # table_id: # (test.t2) master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000002 # Query # # COMMIT @@ -244,6 +250,7 @@ Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # insert into t1 values (NULL) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -252,6 +259,7 @@ slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # load data infile '../../std_data/words.dat' into table t1 ignore 1 lines slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -264,6 +272,7 @@ slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002 slave-bin.000002 # Gtid # # GTID #-#-# slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=MyISAM slave-bin.000002 # Gtid # # BEGIN GTID #-#-# +slave-bin.000002 # Annotate_rows # # insert into t2 values (1) slave-bin.000002 # Table_map # # table_id: # (test.t2) slave-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000002 # Query # # COMMIT @@ -285,10 +294,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL, 1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result index c7598f072d9..46ad3cb9557 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result @@ -24,6 +24,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -32,6 +33,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # load data infile '../../std_data/words.dat' into table t1 ignore 1 lines master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -47,6 +49,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -207,6 +210,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -215,6 +219,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # load data infile '../../std_data/words.dat' into table t1 ignore 1 lines master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -227,6 +232,7 @@ master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=InnoDB master-bin.000002 # Gtid # # GTID #-#-# master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=InnoDB master-bin.000002 # Gtid # # BEGIN GTID #-#-# +master-bin.000002 # Annotate_rows # # insert into t2 values (1) master-bin.000002 # Table_map # # table_id: # (test.t2) master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000002 # Xid # # COMMIT /* XID */ @@ -244,6 +250,7 @@ Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # insert into t1 values (NULL) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Xid # # COMMIT /* XID */ @@ -252,6 +259,7 @@ slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # load data infile '../../std_data/words.dat' into table t1 ignore 1 lines slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Xid # # COMMIT /* XID */ @@ -264,6 +272,7 @@ slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002 slave-bin.000002 # Gtid # # GTID #-#-# slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=InnoDB slave-bin.000002 # Gtid # # BEGIN GTID #-#-# +slave-bin.000002 # Annotate_rows # # insert into t2 values (1) slave-bin.000002 # Table_map # # table_id: # (test.t2) slave-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000002 # Xid # # COMMIT /* XID */ @@ -285,10 +294,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL, 1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_row_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_row_mixing_engines.result index 775ae83c618..56368b9bb9e 100644 --- a/mysql-test/suite/rpl/r/rpl_row_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_row_mixing_engines.result @@ -127,6 +127,7 @@ INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 1) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -135,6 +136,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 1) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -146,6 +148,7 @@ INSERT INTO tt_5(trans_id, stmt_id) VALUES (8, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (8, 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -156,6 +159,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (8, 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -171,6 +175,7 @@ fc_i_tt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',9), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -183,6 +188,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',9), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -198,12 +204,14 @@ CALL pc_i_tt_5_suc (10, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -214,12 +222,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',10), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -293,6 +303,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -301,6 +312,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -312,6 +324,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -322,6 +335,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -337,6 +351,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',17), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -349,6 +364,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',17), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -364,12 +380,14 @@ CALL pc_i_nt_5_suc (18, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -380,12 +398,14 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',18), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -420,6 +440,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (20, 1), (15, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -428,6 +449,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (20, 1), (15, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -440,6 +462,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (21, 1), (18, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -450,6 +473,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (21, 1), (18, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -464,6 +488,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (22, 1, ''), (20, 1, fc_i_nt_5_suc (22, 1)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -478,6 +503,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (22, 1, ''), (20, 1, fc_i_nt_5_suc (22, 1)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -506,6 +532,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -514,6 +541,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 23, 1, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -525,6 +553,7 @@ INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -533,6 +562,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 24, 1, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -544,6 +574,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 -- include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_3) @@ -554,6 +585,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 25 --> 1", tt_3.info= "new text 25 --> 1" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_3) @@ -567,6 +599,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_4) @@ -577,6 +610,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (26, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_4) @@ -590,6 +624,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (27, 1, fc_i_tt_5_suc(27, 1)); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',27), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -606,6 +641,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',27), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -627,6 +663,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -637,6 +674,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 28 --> 1", nt_4.info= "new text 28 --> 1" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -650,6 +688,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (29, 1) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -660,6 +699,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (29, 1) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -677,6 +717,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',30), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -693,6 +734,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',30), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -717,6 +759,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 31, 1, COUNT(*) FROM tt_1 UNION SELECT 23, 1, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -725,6 +768,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 31, 1, COUNT(*) FROM tt_1 UNION SELECT 23, 1, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -747,6 +791,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (33, 1), (26, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -755,6 +800,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (33, 1), (26, 1) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -767,6 +813,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (34, 1, ''), (30, 2, fc_i_tt_5_suc (34, 1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -777,6 +824,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (34, 1, ''), (30, 2, fc_i_tt_5_suc (34, 1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -860,8 +908,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (37, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (37, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -870,8 +920,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (37, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (37, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -895,8 +947,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (38, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (38, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -907,8 +961,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (38, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (38, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -936,8 +992,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (39, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',39), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -950,8 +1008,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (39, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',39), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -979,12 +1039,15 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (40, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -995,12 +1058,15 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (40, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',40), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1026,10 +1092,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (41, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (41, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1038,10 +1106,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (41, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (41, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1065,10 +1135,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (42, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (42, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1079,10 +1151,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (42, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (42, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1110,10 +1184,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (43, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',43), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1126,10 +1202,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (43, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',43), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1157,14 +1235,17 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (44, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',44), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',44), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1175,14 +1256,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (44, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',44), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',44), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1210,12 +1294,14 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',45), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (45, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1224,12 +1310,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',45), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (45, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1255,12 +1343,14 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',46), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (46, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1271,12 +1361,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',46), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (46, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1306,12 +1398,14 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',47), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',47), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1324,12 +1418,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',47), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',47), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1359,16 +1455,19 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',48), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',48), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',48), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1379,16 +1478,19 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',48), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',48), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',48), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1414,14 +1516,17 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',49), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',49), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (49, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1430,14 +1535,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',49), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',49), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (49, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1461,14 +1569,17 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',50), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',50), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (50, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1479,14 +1590,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',50), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',50), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (50, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1514,14 +1628,17 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',51), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',51), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',51), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1534,14 +1651,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',51), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',51), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',51), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1569,18 +1689,22 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1591,18 +1715,22 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',52), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -1639,6 +1767,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (53, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1647,6 +1776,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (53, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1671,6 +1801,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (54, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1679,6 +1810,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (54, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1703,6 +1835,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (55, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1711,6 +1844,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (55, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1735,6 +1869,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (56, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1743,6 +1878,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (56, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1767,6 +1903,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (57, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1775,6 +1912,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (57, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1799,6 +1937,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (58, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1807,6 +1946,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (58, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1831,6 +1971,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (59, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1839,6 +1980,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (59, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1863,6 +2005,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (60, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1871,6 +2014,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (60, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -2444,6 +2588,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (85, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (85, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2453,6 +2598,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (85, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (85, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2465,10 +2611,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (85, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (85, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2484,6 +2632,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (86, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (86, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2493,6 +2642,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (86, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (86, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2507,10 +2657,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (86, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (86, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2528,6 +2680,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (87, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (87, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2539,6 +2692,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',87), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2555,10 +2709,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (87, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',87), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2578,6 +2734,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (88, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (88, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2587,12 +2744,14 @@ CALL pc_i_nt_5_suc (88, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',88), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',88), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2607,16 +2766,19 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (88, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',88), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',88), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2634,6 +2796,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (89, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (89, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2645,6 +2808,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (89, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (89, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2657,12 +2821,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (89, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (89, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2678,6 +2844,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (90, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (90, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2689,6 +2856,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (90, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (90, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2703,12 +2871,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (90, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (90, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2726,6 +2896,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (91, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (91, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2739,6 +2910,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',91), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2755,12 +2927,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (91, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',91), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2780,6 +2954,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (92, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (92, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2791,12 +2966,14 @@ CALL pc_i_nt_5_suc (92, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',92), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',92), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2811,18 +2988,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (92, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',92), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',92), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2842,6 +3022,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',93), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2855,6 +3036,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (93, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (93, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2867,6 +3049,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',93), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2875,6 +3058,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (93, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -2892,6 +3076,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',94), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2905,6 +3090,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (94, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (94, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2919,6 +3105,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',94), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2927,6 +3114,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (94, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2946,6 +3134,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',95), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2961,6 +3150,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',95), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2977,6 +3167,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',95), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -2985,6 +3176,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',95), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3006,6 +3198,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',96), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3019,12 +3212,14 @@ CALL pc_i_nt_5_suc (96, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',96), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',96), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3039,6 +3234,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',96), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3047,12 +3243,14 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',96), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',96), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3070,12 +3268,14 @@ CALL pc_i_nt_5_suc (97, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',97), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',97), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3087,6 +3287,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (97, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (97, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3099,18 +3300,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',97), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',97), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (97, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3126,12 +3330,14 @@ CALL pc_i_nt_5_suc (98, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',98), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',98), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3143,6 +3349,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (98, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (98, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3157,18 +3364,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',98), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',98), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (98, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3186,12 +3396,14 @@ CALL pc_i_nt_5_suc (99, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',99), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',99), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3205,6 +3417,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',99), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3221,18 +3434,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',99), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',99), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',99), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3252,12 +3468,14 @@ CALL pc_i_nt_5_suc (100, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3269,12 +3487,14 @@ CALL pc_i_nt_5_suc (100, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3289,24 +3509,28 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',100), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3334,6 +3558,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (101, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (101, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3351,6 +3576,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (101, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3366,6 +3592,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (102, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (102, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3376,6 +3603,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (102, 4), (102, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3388,10 +3616,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (102, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (102, 4), (102, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3407,6 +3637,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (103, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (103, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3417,6 +3648,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (103, 4), (100, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3431,10 +3663,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (103, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (103, 4), (100, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3452,6 +3686,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (104, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (104, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3462,6 +3697,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (104, 4, ''), (104, 2, fc_i_nt_5_suc (104, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -3480,10 +3716,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (104, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (104, 4, ''), (104, 2, fc_i_nt_5_suc (104, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -3510,6 +3748,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (105, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (105, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3522,6 +3761,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (105, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3538,6 +3778,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (106, 2), (105, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3547,6 +3788,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (106, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (106, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3559,10 +3801,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (106, 2), (105, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (106, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3579,6 +3823,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (107, 2), (104, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3590,6 +3835,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (107, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (107, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3602,12 +3848,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (107, 2), (104, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (107, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3624,6 +3872,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (108, 2, ''), (107, 4, fc_i_nt_5_suc (108, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -3639,6 +3888,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (108, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (108, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3651,6 +3901,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (108, 2, ''), (107, 4, fc_i_nt_5_suc (108, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -3661,6 +3912,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (108, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3686,6 +3938,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (109, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (109, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3695,6 +3948,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (109, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (109, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3709,10 +3963,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (109, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (109, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3728,6 +3984,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (110, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (110, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3737,6 +3994,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (110, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (110, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3753,10 +4011,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (110, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (110, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3774,6 +4034,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (111, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (111, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3785,6 +4046,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',111), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3803,10 +4065,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (111, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',111), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3826,6 +4090,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (112, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (112, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3835,12 +4100,14 @@ CALL pc_i_nt_5_suc (112, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',112), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',112), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3857,16 +4124,19 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (112, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',112), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',112), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3884,6 +4154,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (113, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (113, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3895,6 +4166,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (113, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (113, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3909,12 +4181,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (113, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (113, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -3930,6 +4204,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (114, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (114, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3941,6 +4216,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (114, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (114, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3957,12 +4233,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (114, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (114, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3980,6 +4258,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (115, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (115, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -3993,6 +4272,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',115), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4011,12 +4291,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (115, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',115), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4036,6 +4318,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (116, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (116, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4047,12 +4330,14 @@ CALL pc_i_nt_5_suc (116, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',116), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',116), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4069,18 +4354,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (116, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',116), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',116), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4100,6 +4388,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',117), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4113,6 +4402,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (117, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (117, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4127,6 +4417,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',117), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4135,6 +4426,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (117, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4152,6 +4444,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',118), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4165,6 +4458,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (118, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (118, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4181,6 +4475,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',118), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4189,6 +4484,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (118, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4208,6 +4504,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',119), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4223,6 +4520,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',119), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4241,6 +4539,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',119), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4249,6 +4548,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',119), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4270,6 +4570,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',120), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4283,12 +4584,14 @@ CALL pc_i_nt_5_suc (120, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',120), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',120), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4305,6 +4608,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',120), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4313,12 +4617,14 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',120), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',120), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4336,12 +4642,14 @@ CALL pc_i_nt_5_suc (121, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',121), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',121), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4353,6 +4661,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (121, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (121, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4367,18 +4676,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',121), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',121), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (121, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4394,12 +4706,14 @@ CALL pc_i_nt_5_suc (122, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',122), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',122), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4411,6 +4725,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (122, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (122, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4427,18 +4742,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',122), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',122), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (122, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4456,12 +4774,14 @@ CALL pc_i_nt_5_suc (123, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',123), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',123), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4475,6 +4795,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',123), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4493,18 +4814,21 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',123), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',123), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',123), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4524,12 +4848,14 @@ CALL pc_i_nt_5_suc (124, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4541,12 +4867,14 @@ CALL pc_i_nt_5_suc (124, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4563,24 +4891,28 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',124), NAME_CONST('in_stmt_id',4) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4608,6 +4940,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (125, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (125, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4627,6 +4960,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (125, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4642,6 +4976,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (126, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (126, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4652,6 +4987,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (126, 4), (126, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4666,10 +5002,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (126, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (126, 4), (126, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4685,6 +5023,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (127, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (127, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4695,6 +5034,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (127, 4), (124, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4711,10 +5051,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (127, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (127, 4), (124, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4732,6 +5074,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (128, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (128, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4742,6 +5085,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (128, 4, ''), (128, 2, fc_i_nt_5_suc (128, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -4762,10 +5106,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (128, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (128, 4, ''), (128, 2, fc_i_nt_5_suc (128, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -4792,6 +5138,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (129, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (129, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4806,6 +5153,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (129, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4822,6 +5170,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (130, 2), (129, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4831,6 +5180,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (130, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (130, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4845,10 +5195,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (130, 2), (129, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (130, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4865,6 +5217,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (131, 2), (128, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -4876,6 +5229,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (131, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (131, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4890,12 +5244,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (131, 2), (128, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (131, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4912,6 +5268,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (132, 2, ''), (131, 4, fc_i_nt_5_suc (132, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -4927,6 +5284,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (132, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (132, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4941,6 +5299,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) VALUES (132, 2, ''), (131, 4, fc_i_nt_5_suc (132, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) @@ -4951,6 +5310,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (132, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4980,6 +5340,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -4989,6 +5350,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (133, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -4997,10 +5359,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (133, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (133, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5020,6 +5384,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5031,6 +5396,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (134, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5039,12 +5405,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (134, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (134, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5066,6 +5434,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',135), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5079,6 +5448,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (135, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5087,6 +5457,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',135), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5095,6 +5466,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (135, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5114,12 +5486,14 @@ CALL pc_i_nt_5_suc (136, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5131,6 +5505,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (136, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5139,18 +5514,21 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',136), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (136, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5170,6 +5548,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5179,6 +5558,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (137, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5189,10 +5569,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (137, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (137, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5214,6 +5596,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5225,6 +5608,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (138, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5235,12 +5619,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (138, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (138, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5264,6 +5650,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',139), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5277,6 +5664,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (139, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5287,6 +5675,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',139), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5295,6 +5684,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (139, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5316,12 +5706,14 @@ CALL pc_i_nt_5_suc (140, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5333,6 +5725,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (140, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5343,18 +5736,21 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',140), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (140, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5378,6 +5774,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5387,6 +5784,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',141), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5399,10 +5797,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (141, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',141), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5428,6 +5828,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5439,6 +5840,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',142), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5451,12 +5853,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (142, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',142), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5484,6 +5888,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',143), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5497,6 +5902,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',143), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5509,6 +5915,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',143), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5517,6 +5924,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',143), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5542,12 +5950,14 @@ CALL pc_i_nt_5_suc (144, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5559,6 +5969,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5571,18 +5982,21 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',144), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5606,6 +6020,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5615,10 +6030,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5629,14 +6046,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (145, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',145), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5658,6 +6078,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5669,10 +6090,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5683,16 +6106,19 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (146, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',146), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5716,6 +6142,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5729,10 +6156,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5743,6 +6172,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5751,10 +6181,12 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',147), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5776,12 +6208,14 @@ CALL pc_i_nt_5_suc (148, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5793,10 +6227,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5807,22 +6243,26 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',148), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -5859,6 +6299,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (149, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (149, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5871,6 +6312,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (149, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5891,6 +6333,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (150, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (150, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5903,6 +6346,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (150, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5927,6 +6371,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (151, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5935,6 +6380,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (151, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5955,6 +6401,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (152, 4), (150, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -5964,6 +6411,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (152, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -5972,10 +6420,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (152, 4), (150, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (152, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -6005,6 +6455,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6019,6 +6470,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (153, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6038,6 +6490,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6054,6 +6507,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (154, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6077,6 +6531,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',155), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6095,6 +6550,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',155), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6118,12 +6574,14 @@ CALL pc_i_nt_5_suc (156, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6140,12 +6598,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',156), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6167,6 +6627,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6181,6 +6642,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (157, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6200,6 +6662,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6216,6 +6679,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (158, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6239,6 +6703,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',159), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6257,6 +6722,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',159), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6280,12 +6746,14 @@ CALL pc_i_nt_5_suc (160, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6302,12 +6770,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',160), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6331,6 +6801,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6345,6 +6816,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (161, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6366,6 +6838,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6382,6 +6855,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (162, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6407,6 +6881,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',163), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6425,6 +6900,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',163), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6450,12 +6926,14 @@ CALL pc_i_nt_5_suc (164, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6472,12 +6950,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',164), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6499,6 +6979,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6513,6 +6994,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (165, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6532,6 +7014,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6548,6 +7031,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (166, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6571,6 +7055,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',167), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6589,6 +7074,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',167), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6612,12 +7098,14 @@ CALL pc_i_nt_5_suc (168, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6634,12 +7122,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',168), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6676,6 +7166,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (169, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (169, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6690,6 +7181,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (169, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6710,6 +7202,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (170, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (170, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6724,6 +7217,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (170, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6766,6 +7260,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (172, 4), (170, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6780,6 +7275,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (172, 4), (170, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6805,6 +7301,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (173, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (173, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6818,6 +7315,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (173, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -6826,10 +7324,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (173, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (173, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -6845,6 +7345,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (174, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (174, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6858,6 +7359,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (174, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6868,10 +7370,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (174, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (174, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6889,6 +7393,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (175, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (175, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6904,6 +7409,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',175), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6916,10 +7422,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (175, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',175), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6939,6 +7447,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (176, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (176, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -6952,10 +7461,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',176), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',176), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6966,14 +7477,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (176, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',176), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',176), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -6991,6 +7505,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (177, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (177, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7006,6 +7521,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (177, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7014,12 +7530,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (177, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (177, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7035,6 +7553,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (178, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (178, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7050,6 +7569,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (178, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7060,12 +7580,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (178, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (178, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7083,6 +7605,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (179, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (179, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7100,6 +7623,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',179), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7112,12 +7636,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (179, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',179), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7137,6 +7663,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (180, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (180, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7152,10 +7679,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',180), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',180), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7166,16 +7695,19 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (180, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',180), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',180), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7195,6 +7727,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',181), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7212,6 +7745,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (181, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7220,6 +7754,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',181), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7228,6 +7763,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (181, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7245,6 +7781,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',182), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7262,6 +7799,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (182, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7272,6 +7810,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',182), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7280,6 +7819,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (182, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7299,6 +7839,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',183), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7318,6 +7859,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',183), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7330,6 +7872,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',183), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7338,6 +7881,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',183), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7359,6 +7903,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',184), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7376,10 +7921,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',184), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',184), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7390,6 +7937,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',184), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7398,10 +7946,12 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',184), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',184), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7419,12 +7969,14 @@ CALL pc_i_nt_5_suc (185, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7440,6 +7992,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (185, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7448,18 +8001,21 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',185), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (185, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -7475,12 +8031,14 @@ CALL pc_i_nt_5_suc (186, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7496,6 +8054,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (186, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7506,18 +8065,21 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',186), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES (186, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7535,12 +8097,14 @@ CALL pc_i_nt_5_suc (187, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7558,6 +8122,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7570,18 +8135,21 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',187), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7601,12 +8169,14 @@ CALL pc_i_nt_5_suc (188, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7622,10 +8192,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7636,22 +8208,26 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',188), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7679,6 +8255,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (189, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (189, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7697,6 +8274,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (189, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7712,6 +8290,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (190, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (190, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7730,6 +8309,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (190, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7745,6 +8325,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (191, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (191, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7763,6 +8344,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (191, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7778,6 +8360,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (192, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (192, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7798,6 +8381,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (192, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -7813,6 +8397,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (193, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (193, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7833,6 +8418,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (193, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7850,6 +8436,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (194, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (194, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7870,6 +8457,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (194, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7887,6 +8475,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (195, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (195, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7909,6 +8498,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (195, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7926,6 +8516,7 @@ INSERT INTO nt_5(trans_id, stmt_id) VALUES (196, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (196, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7946,6 +8537,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES (196, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7965,6 +8557,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',197), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -7987,6 +8580,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',197), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8008,6 +8602,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',198), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8030,6 +8625,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',198), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8051,6 +8647,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',199), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8075,6 +8672,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',199), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8096,6 +8694,7 @@ fc_i_nt_5_suc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',200), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8118,6 +8717,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',200), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8137,12 +8737,14 @@ CALL pc_i_nt_5_suc (201, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8163,12 +8765,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',201), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8186,12 +8790,14 @@ CALL pc_i_nt_5_suc (202, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8212,12 +8818,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',202), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8235,12 +8843,14 @@ CALL pc_i_nt_5_suc (203, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8261,12 +8871,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',203), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8284,12 +8896,14 @@ CALL pc_i_nt_5_suc (204, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8312,12 +8926,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',204), NAME_CONST('in_stmt_id',1) + 1) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8346,6 +8962,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8359,6 +8976,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (205, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8367,10 +8985,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 205, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (205, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8394,8 +9014,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 206, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (206, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8404,8 +9026,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 206, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (206, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8421,6 +9045,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 207 --> 2", tt_3.info= "new text 207 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 207 --> 2", tt_3.info= "new text 207 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8436,6 +9061,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (207, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8444,12 +9070,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 207 --> 2", tt_3.info= "new text 207 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (207, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8465,6 +9093,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (208, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8480,6 +9109,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (208, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8488,12 +9118,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (208, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8509,6 +9141,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (209, 2, fc_i_tt_5_suc(209, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',209), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8530,6 +9163,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (209, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8538,6 +9172,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',209), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8550,6 +9185,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (209, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8578,8 +9214,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 210 --> 2", nt_4.info= "new text 210 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (210, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8592,8 +9230,10 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 210 --> 2", nt_4.info= "new text 210 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (210, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8622,8 +9262,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (211, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (211, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8636,8 +9278,10 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (211, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (211, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8670,10 +9314,12 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',212), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (212, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8690,10 +9336,12 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',212), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (212, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8721,6 +9369,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 213, 2, COUNT(*) FROM tt_1 UNION SELECT 205, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8734,6 +9383,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (213, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8742,10 +9392,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 213, 2, COUNT(*) FROM tt_1 UNION SELECT 205, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (213, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8770,6 +9422,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (214, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8778,6 +9431,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (214, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8794,6 +9448,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (215, 2), (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8807,6 +9462,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (215, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8815,10 +9471,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (215, 2), (208, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (215, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8835,6 +9493,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (216, 2, ''), (212, 2, fc_i_tt_5_suc (216, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -8850,6 +9509,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (216, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8858,12 +9518,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (216, 2, ''), (212, 2, fc_i_tt_5_suc (216, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (216, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8893,6 +9555,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (217, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8905,6 +9568,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (217, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8938,6 +9602,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (218, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8954,6 +9619,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (218, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -8980,6 +9646,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -8998,6 +9665,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 219, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9034,6 +9702,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 221 --> 2", tt_3.info= "new text 221 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 221 --> 2", tt_3.info= "new text 221 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9052,6 +9721,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 221 --> 2", tt_3.info= "new text 221 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9067,6 +9737,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (222, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9085,6 +9756,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9100,6 +9772,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (223, 2, fc_i_tt_5_suc(223, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',223), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9120,6 +9793,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',223), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9256,6 +9930,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 227, 2, COUNT(*) FROM tt_1 UNION SELECT 219, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9274,6 +9949,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 227, 2, COUNT(*) FROM tt_1 UNION SELECT 219, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9312,6 +9988,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (229, 2), (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9330,6 +10007,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (229, 2), (222, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9346,6 +10024,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (230, 2, ''), (226, 2, fc_i_tt_5_suc (230, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9366,6 +10045,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (230, 2, ''), (226, 2, fc_i_tt_5_suc (230, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9473,6 +10153,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9482,6 +10163,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (233, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9490,10 +10172,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (233, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9517,8 +10201,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (234, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 234, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9527,8 +10213,10 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (234, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 234, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9548,6 +10236,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 235 --> 4", tt_3.info= "new text 235 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 235 --> 4", tt_3.info= "new text 235 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9557,6 +10246,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (235, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_3) @@ -9567,10 +10257,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 235 --> 4", tt_3.info= "new text 235 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (235, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_3) @@ -9592,6 +10284,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (236, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9601,6 +10294,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (236, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_4) @@ -9611,10 +10305,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (236, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_4) @@ -9636,6 +10332,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (237, 4, fc_i_tt_5_suc(237, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',237), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9647,6 +10344,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (237, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_5) @@ -9661,12 +10359,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',237), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (237, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.tt_5) @@ -9701,8 +10401,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (238, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 238 --> 4", nt_4.info= "new text 238 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9715,8 +10417,10 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (238, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 238 --> 4", nt_4.info= "new text 238 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9745,8 +10449,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (239, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (239, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9759,8 +10465,10 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (239, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (239, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9793,8 +10501,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (240, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',240), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9813,8 +10523,10 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (240, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',240), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9847,6 +10559,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 241, 4, COUNT(*) FROM tt_1 UNION SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9856,6 +10569,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (241, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9864,10 +10578,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 241, 4, COUNT(*) FROM tt_1 UNION SELECT 233, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (241, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9892,6 +10608,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (242, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9900,6 +10617,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (242, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9920,6 +10638,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (243, 4), (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -9929,6 +10648,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (243, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9937,10 +10657,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (243, 4), (236, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (243, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9961,6 +10683,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (244, 4, ''), (240, 2, fc_i_tt_5_suc (244, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -9972,6 +10695,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (244, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -9980,12 +10704,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (244, 4, ''), (240, 2, fc_i_tt_5_suc (244, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (244, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10015,6 +10741,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (245, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10027,6 +10754,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (245, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10060,6 +10788,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (246, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10076,6 +10805,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (246, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10105,6 +10835,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10119,6 +10850,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10159,6 +10891,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 249 --> 4", tt_3.info= "new text 249 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 249 --> 4", tt_3.info= "new text 249 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10173,6 +10906,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 249 --> 4", tt_3.info= "new text 249 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10192,6 +10926,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (250, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10206,6 +10941,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10225,6 +10961,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (251, 4, fc_i_tt_5_suc(251, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',251), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10241,6 +10978,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',251), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10380,6 +11118,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 255, 4, COUNT(*) FROM tt_1 UNION SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10394,6 +11133,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 255, 4, COUNT(*) FROM tt_1 UNION SELECT 247, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10436,6 +11176,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (257, 4), (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10450,6 +11191,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (257, 4), (250, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10470,6 +11212,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (258, 4, ''), (254, 2, fc_i_tt_5_suc (258, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10486,6 +11229,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (258, 4, ''), (254, 2, fc_i_tt_5_suc (258, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10591,6 +11335,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10600,6 +11345,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (261, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (261, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10612,10 +11358,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 261, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (261, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10635,6 +11383,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10644,6 +11393,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 262, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10652,10 +11402,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (262, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 262, 2, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10671,6 +11423,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10680,6 +11433,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10697,10 +11451,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 263 --> 2", tt_3.info= "new text 263 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (263, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10720,6 +11476,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10729,6 +11486,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10746,10 +11504,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (264, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10769,6 +11529,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (265, 2, fc_i_tt_5_suc(265, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',265), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10780,6 +11541,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10801,12 +11563,14 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',265), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (265, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10839,6 +11603,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10848,6 +11613,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 266 --> 2", nt_4.info= "new text 266 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10860,10 +11626,12 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (266, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 266 --> 2", nt_4.info= "new text 266 --> 2" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10888,6 +11656,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10897,6 +11666,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (267, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10909,10 +11679,12 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (267, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (267, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -10941,6 +11713,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -10950,6 +11723,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',268), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -10968,10 +11742,12 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (268, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',268), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11002,6 +11778,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 269, 2, COUNT(*) FROM tt_1 UNION SELECT 268, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11011,6 +11788,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (269, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (269, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11023,10 +11801,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 269, 2, COUNT(*) FROM tt_1 UNION SELECT 268, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (269, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11047,6 +11827,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (270, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (270, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11059,6 +11840,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (270, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11075,6 +11857,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (271, 2), (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11084,6 +11867,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (271, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (271, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11096,10 +11880,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (271, 2), (264, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (271, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11116,6 +11902,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (272, 2, ''), (268, 2, fc_i_tt_5_suc (272, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11127,6 +11914,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (272, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (272, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11139,12 +11927,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (272, 2, ''), (268, 2, fc_i_tt_5_suc (272, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (272, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11170,6 +11960,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (273, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (273, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11186,6 +11977,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (273, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11215,6 +12007,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (274, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (274, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11235,6 +12028,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (274, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11262,6 +12056,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11271,6 +12066,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (275, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (275, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11285,10 +12081,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 275, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (275, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11308,6 +12106,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11322,6 +12121,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (276, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11337,6 +12137,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11346,6 +12147,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11360,10 +12162,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 277 --> 2", tt_3.info= "new text 277 --> 2" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (277, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11379,6 +12183,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11388,6 +12193,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11402,10 +12208,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (278, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11421,6 +12229,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (279, 2, fc_i_tt_5_suc(279, 2)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',279), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11432,6 +12241,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11446,12 +12256,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',279), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (279, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11476,6 +12288,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11494,6 +12307,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (280, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11518,6 +12332,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11536,6 +12351,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (281, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11564,6 +12380,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11586,6 +12403,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (282, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11614,6 +12432,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 283, 2, COUNT(*) FROM tt_1 UNION SELECT 282, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11623,6 +12442,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (283, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (283, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11637,10 +12457,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 283, 2, COUNT(*) FROM tt_1 UNION SELECT 282, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (283, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11661,6 +12483,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (284, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (284, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11675,6 +12498,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (284, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11691,6 +12515,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (285, 2), (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11700,6 +12525,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (285, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (285, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11714,10 +12540,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (285, 2), (278, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (285, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11734,6 +12562,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (286, 2, ''), (282, 2, fc_i_tt_5_suc (286, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -11745,6 +12574,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (286, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (286, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11759,12 +12589,14 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (286, 2, ''), (282, 2, fc_i_tt_5_suc (286, 2)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (286, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11790,6 +12622,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (287, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (287, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11808,6 +12641,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (287, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11837,6 +12671,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (288, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (288, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11859,6 +12694,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (288, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11885,6 +12721,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (289, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (289, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11894,6 +12731,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11906,10 +12744,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (289, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 289, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11925,6 +12765,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (290, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (290, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11938,6 +12779,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 290, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -11946,10 +12788,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (290, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id, info) SELECT 290, 4, COUNT(*) FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -11965,6 +12809,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (291, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (291, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11974,6 +12819,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 291 --> 4", tt_3.info= "new text 291 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 291 --> 4", tt_3.info= "new text 291 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -11991,10 +12837,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (291, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 291 --> 4", tt_3.info= "new text 291 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12014,6 +12862,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (292, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (292, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12023,6 +12872,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (292, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12040,10 +12890,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (292, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12063,6 +12915,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (293, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (293, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12072,6 +12925,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (293, 4, fc_i_tt_5_suc(293, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',293), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12095,10 +12949,12 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (293, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',293), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12124,6 +12980,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (294, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (294, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12142,6 +12999,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 294 --> 4", nt_4.info= "new text 294 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12150,6 +13008,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (294, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12158,6 +13017,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE tt_4, nt_4 SET tt_4.info= "new text 294 --> 4", nt_4.info= "new text 294 --> 4" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.tt_4) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12173,6 +13033,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (295, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (295, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12191,6 +13052,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (295, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12199,6 +13061,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (295, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12207,6 +13070,7 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_3(trans_id, stmt_id) VALUES (295, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -12222,6 +13086,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (296, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (296, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12244,6 +13109,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',296), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12254,6 +13120,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (296, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12266,6 +13133,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',296), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12294,6 +13162,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (297, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (297, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12304,6 +13173,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 297, 4, COUNT(*) FROM tt_1 UNION SELECT 297, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12316,10 +13186,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (297, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 297, 4, COUNT(*) FROM tt_1 UNION SELECT 297, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12335,6 +13207,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (298, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (298, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12352,6 +13225,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (298, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12367,6 +13241,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (299, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (299, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12377,6 +13252,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (299, 4), (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12389,10 +13265,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (299, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (299, 4), (292, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12408,6 +13286,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (300, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (300, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12418,6 +13297,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (300, 4, ''), (296, 2, fc_i_tt_5_suc (300, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12432,10 +13312,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (300, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (300, 4, ''), (296, 2, fc_i_tt_5_suc (300, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12453,6 +13335,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (301, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (301, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12475,6 +13358,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (301, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12494,6 +13378,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (302, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (302, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12520,6 +13405,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (302, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12554,6 +13440,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (303, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (303, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12563,6 +13450,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12577,10 +13465,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (303, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 303, 4, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12596,6 +13486,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (304, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (304, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12614,6 +13505,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (304, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12629,6 +13521,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (305, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (305, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12638,6 +13531,7 @@ UPDATE nt_3, tt_3 SET nt_3.info= "new text 305 --> 4", tt_3.info= "new text 305 include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 305 --> 4", tt_3.info= "new text 305 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12652,10 +13546,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (305, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE nt_3, tt_3 SET nt_3.info= "new text 305 --> 4", tt_3.info= "new text 305 --> 4" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1 master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12671,6 +13567,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (306, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (306, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12680,6 +13577,7 @@ INSERT INTO nt_4(trans_id, stmt_id) VALUES (306, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12694,10 +13592,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (306, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12713,6 +13613,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (307, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (307, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12722,6 +13623,7 @@ INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (307, 4, fc_i_tt_5_suc(307, 4)) include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',307), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12738,10 +13640,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (307, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',307), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -12759,6 +13663,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (308, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (308, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12782,6 +13687,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (308, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12801,6 +13707,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (309, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (309, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12824,6 +13731,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (309, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12843,6 +13751,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (310, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (310, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12870,6 +13779,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (310, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12904,6 +13814,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (311, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (311, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12914,6 +13825,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 311, 4, COUNT(*) FROM tt_1 UNION SELECT 311, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12928,10 +13840,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (311, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 311, 4, COUNT(*) FROM tt_1 UNION SELECT 311, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12947,6 +13861,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (312, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (312, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12966,6 +13881,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (312, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12981,6 +13897,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (313, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (313, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -12991,6 +13908,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (313, 4), (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13005,10 +13923,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (313, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_4(trans_id, stmt_id) VALUES (313, 4), (306, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13024,6 +13944,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (314, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (314, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13034,6 +13955,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (314, 4, ''), (310, 2, fc_i_tt_5_suc (314, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -13050,10 +13972,12 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (314, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id, info) VALUES (314, 4, ''), (310, 2, fc_i_tt_5_suc (314, 4)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -13071,6 +13995,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (315, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (315, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13095,6 +14020,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (315, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13114,6 +14040,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (316, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (316, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13142,6 +14069,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (316, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13184,6 +14112,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (317, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` @@ -13193,6 +14122,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (317, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` @@ -13209,6 +14139,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (318, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (318, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13236,9 +14167,11 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -13248,13 +14181,16 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (318, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (318, 7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -13275,6 +14211,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13298,9 +14235,11 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -13310,13 +14249,16 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (319, 4) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (319, 7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -13341,6 +14283,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13360,9 +14303,11 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -13372,13 +14317,16 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (320, 5) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (320, 7) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -13405,6 +14353,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_1` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_1 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13426,6 +14375,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_1` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_1 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13450,8 +14400,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_2` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_2 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_2) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CS-N->N << -e-e-e-e-e-e-e-e-e-e-e- @@ -13472,8 +14422,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_2` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_2 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_2) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # GTID #-#-# @@ -13497,8 +14447,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_3` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_3 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_3) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> CS-T->N << -e-e-e-e-e-e-e-e-e-e-e- @@ -13519,8 +14469,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_3` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_3 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_3) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # GTID #-#-# @@ -13544,6 +14494,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_4` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_4 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13565,6 +14516,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_4` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_4 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_4) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13589,6 +14541,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_5` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_5 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_5) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13610,6 +14563,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_5` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_5 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_5) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13634,6 +14588,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_6` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_6 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_6) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13655,6 +14610,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_6` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_6 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_6) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -13677,6 +14633,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_7` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_7 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13691,6 +14648,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_7` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_7 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13725,13 +14683,13 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13742,13 +14700,13 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_7 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (328, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13784,8 +14742,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (329, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (329, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13796,8 +14756,10 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_7 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (329, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (329, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13828,11 +14790,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (330, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13843,11 +14804,10 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_7 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_7(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_7) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (330, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13879,6 +14839,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (331, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13889,6 +14850,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_7 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (331, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13921,6 +14883,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_8` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_8 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13935,6 +14898,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `tt_xx_8` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=InnoDB +master-bin.000001 # Annotate_rows # # CREATE TABLE tt_xx_8 (PRIMARY KEY(trans_id, stmt_id)) engine=Innodb SELECT * FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13969,11 +14933,13 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -13984,11 +14950,13 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_8 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (334, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14024,8 +14992,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (335, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (335, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14036,8 +15006,10 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_8 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (335, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (335, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14068,9 +15040,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (336, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14081,9 +15054,10 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_8 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_8(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_8) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (336, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14115,6 +15089,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (337, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14125,6 +15100,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_xx_8 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (337, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14157,8 +15133,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_9` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_9 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CS-N->N << -e-e-e-e-e-e-e-e-e-e-e- @@ -14172,8 +15148,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_9` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_9 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CS-N->N << -e-e-e-e-e-e-e-e-e-e-e- @@ -14199,8 +15175,8 @@ INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FR include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-T << -e-e-e-e-e-e-e-e-e-e-e- @@ -14213,8 +15189,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14225,13 +15203,15 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (340, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14259,6 +15239,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -14272,8 +15253,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14284,12 +15267,15 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (341, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14312,8 +15298,8 @@ INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FR include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-T << -e-e-e-e-e-e-e-e-e-e-e- @@ -14326,6 +15312,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (342, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14336,11 +15323,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (342, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14364,6 +15352,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -14377,6 +15366,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (343, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14387,10 +15377,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_9 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_9(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_9) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (343, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14423,8 +15415,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_10` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_10 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CS-N->N << -e-e-e-e-e-e-e-e-e-e-e- @@ -14438,8 +15430,8 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE `nt_xx_10` ( `info` varchar(64) DEFAULT NULL, PRIMARY KEY (`trans_id`,`stmt_id`) ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE nt_xx_10 (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> CS-N->N << -e-e-e-e-e-e-e-e-e-e-e- @@ -14465,10 +15457,8 @@ INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() F include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-N << -e-e-e-e-e-e-e-e-e-e-e- @@ -14481,8 +15471,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14493,15 +15485,15 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (346, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14529,6 +15521,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -14542,8 +15535,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14554,12 +15549,15 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (347, 6) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14582,10 +15580,8 @@ INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() F include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> IS-N<-N << -e-e-e-e-e-e-e-e-e-e-e- @@ -14598,6 +15594,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (348, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14608,13 +15605,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # -master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (348, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14638,6 +15634,7 @@ Got one of the listed errors include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -14651,6 +15648,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (349, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14661,10 +15659,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; TRUNCATE TABLE nt_xx_10 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_xx_10(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_10) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (349, 4) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -14706,6 +15706,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (351, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14714,6 +15715,7 @@ master-bin.000001 # Query # # ROLLBACK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (351, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14760,9 +15762,11 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -14772,9 +15776,11 @@ master-bin.000001 # Query # # ROLLBACK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `S_0` +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK TO `S_0` @@ -14812,8 +15818,10 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14822,8 +15830,10 @@ master-bin.000001 # Query # # ROLLBACK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 2) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14848,6 +15858,7 @@ INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -14867,6 +15878,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (357, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14875,10 +15887,12 @@ master-bin.000001 # Query # # ROLLBACK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1 master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (357, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14911,6 +15925,7 @@ ROLLBACK; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (359, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14919,6 +15934,7 @@ master-bin.000001 # Query # # ROLLBACK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (359, 3) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14943,6 +15959,7 @@ INSERT INTO nt_1(trans_id, stmt_id) VALUES (361, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (361, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -14962,6 +15979,7 @@ Warning # Some non-transactional changed tables couldn't be rolled back include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (361, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14970,10 +15988,12 @@ master-bin.000001 # Query # # ROLLBACK include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_1(trans_id, stmt_id) VALUES (361, 2) master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_1(trans_id, stmt_id) VALUES (361, 5) master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # ROLLBACK @@ -14997,6 +16017,7 @@ SET @var= fc_i_tt_5_suc(363, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',363), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15009,6 +16030,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',363), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15024,6 +16046,7 @@ SET @var= fc_i_nt_5_suc(364, 1); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',364), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15036,6 +16059,7 @@ master-bin.000001 # Query # # COMMIT include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',364), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15054,6 +16078,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',365), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -15065,6 +16090,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',365), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -15080,6 +16106,7 @@ SET @var= fc_i_nt_5_suc(366, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',366), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15097,6 +16124,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',366), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15109,6 +16137,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',366), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15117,6 +16146,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',366), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15140,6 +16170,7 @@ SET @var= fc_i_nt_5_suc(367, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',367), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15153,6 +16184,7 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',367), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15165,6 +16197,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */ include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',367), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15173,6 +16206,7 @@ master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',367), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15192,6 +16226,7 @@ SET @var= fc_i_nt_5_suc(368, 2); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',368), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15214,6 +16249,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',368), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15237,6 +16273,7 @@ SET @var= fc_i_nt_5_suc(369, 4); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',369), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15255,6 +16292,7 @@ include/show_binlog_events.inc include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',369), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15288,8 +16326,10 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',370), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',370), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15307,8 +16347,10 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',370), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',370), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # @@ -15342,12 +16384,14 @@ COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',371), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',371), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -15361,12 +16405,14 @@ master-bin.000001 # Table_map # # table_id: # (test.nt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO tt_5(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',371), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Annotate_rows # # INSERT INTO nt_3(trans_id, stmt_id) VALUES ( NAME_CONST('p_trans_id',371), NAME_CONST('in_stmt_id',1)) master-bin.000001 # Table_map # # table_id: # (test.tt_3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result index 5c3bcf9070c..b86743507d8 100644 --- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result @@ -1,15 +1,21 @@ include/master-slave.inc [connection master] - ---Setup Section -- set timestamp=1000000000; -DROP TABLE IF EXISTS t1,t2,t3; -connection master; CREATE TABLE t1(word VARCHAR(20)); CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY); CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT); - ----Test1 check table load -- +INSERT INTO t1 VALUES ("abirvalg"); +LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; +LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; +LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; +LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; +LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +---Test 1 check table load -- SELECT COUNT(*) from t1; COUNT(*) 351 @@ -74,9 +80,7 @@ c1 c3 c4 c5 connection master; insert into t1 values ("Alas"); flush logs; - --- Test 1 Dump binlog to file -- - --- Test 1 delete tables, clean master and slave -- DROP TABLE t1; DROP TABLE t2; @@ -91,9 +95,7 @@ reset slave; start slave; include/wait_for_slave_to_start.inc connection master; - --- Test 1 Load from Dump binlog file -- - --- Test 1 Check Load Results -- SELECT COUNT(*) from t1; COUNT(*) @@ -157,7 +159,6 @@ c1 c3 c4 c5 4 2006-02-22 00:00:00 Tested in Texas 8.8 5 2006-02-22 00:00:00 Tested in Texas 11 connection master; - --- Test 2 position test -- /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/; @@ -168,7 +169,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=0/*!*/; +SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -181,7 +182,6 @@ DELIMITER ; ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; - --- Test 3 First Remote test -- /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/; @@ -192,15 +192,12 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=0/*!*/; +SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -DROP TABLE IF EXISTS `t1`,`t2`,`t3` /* generated by server */ -/*!*/; -SET TIMESTAMP=1000000000/*!*/; CREATE TABLE t1(word VARCHAR(20)) /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -214,7 +211,6 @@ DELIMITER ; ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; - --- Test 4 Second Remote test -- DROP TABLE t1; DROP TABLE t2; @@ -291,7 +287,6 @@ c1 c3 c4 c5 4 2006-02-22 00:00:00 Tested in Texas 8.8 5 2006-02-22 00:00:00 Tested in Texas 11 connection master; - --- Test 5 LOAD DATA -- /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/; @@ -302,7 +297,6 @@ DELIMITER ; ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; - --- Test 6 reading stdin -- /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/; @@ -313,15 +307,12 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=0/*!*/; +SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -DROP TABLE IF EXISTS `t1`,`t2`,`t3` /* generated by server */ -/*!*/; -SET TIMESTAMP=1000000000/*!*/; CREATE TABLE t1(word VARCHAR(20)) /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -335,7 +326,6 @@ DELIMITER ; ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; - --- Test 7 reading stdin w/position -- /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/; @@ -346,7 +336,7 @@ use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; -SET @@session.sql_mode=0/*!*/; +SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; @@ -359,7 +349,6 @@ DELIMITER ; ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; - --- Test 8 switch internal charset -- connection slave; stop slave; @@ -400,18 +389,17 @@ HEX(f) select HEX(f) from t5; HEX(f) 835C - --- Test cleanup -- connection master; connection slave; connection master; -DROP TABLE IF EXISTS t1; +DROP TABLE t1, t2, t3, t04, t05, t4, t5; CREATE TABLE t1 (a INT NOT NULL KEY, b INT); INSERT INTO t1 VALUES(1,1); SELECT * FROM t1; a b 1 1 FLUSH LOGS; -DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; +DROP TABLE t1; connection slave; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result index ef40fd311d3..a558e113c77 100644 --- a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result @@ -6,7 +6,7 @@ connection master; CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); -UPDATE t1 SET c5 = 'a'; +UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] connection master; @@ -19,7 +19,7 @@ connection master; CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); -UPDATE t1 SET c5 = 'a'; +UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] connection master; diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result index 84d68bb2b58..915cf030e06 100644 --- a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result @@ -19,7 +19,7 @@ connection master; CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); -UPDATE t1 SET c5 = 'a'; +UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] connection master; @@ -32,7 +32,7 @@ connection master; CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); -UPDATE t1 SET c5 = 'a'; +UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] connection master; diff --git a/mysql-test/suite/rpl/r/rpl_row_rollback_to_savepoint.result b/mysql-test/suite/rpl/r/rpl_row_rollback_to_savepoint.result index 65203f32167..2f2b635a470 100644 --- a/mysql-test/suite/rpl/r/rpl_row_rollback_to_savepoint.result +++ b/mysql-test/suite/rpl/r/rpl_row_rollback_to_savepoint.result @@ -38,15 +38,18 @@ INSERT INTO t2 VALUES (1); RELEASE SAVEPOINT event_logging_1; END master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `event_logging_1` +master-bin.000001 # Annotate_rows # # INSERT t3 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) @@ -94,15 +97,18 @@ INSERT INTO t2 VALUES (1); RELEASE SAVEPOINT event_logging_1; END master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `event_logging_1` +master-bin.000001 # Annotate_rows # # INSERT t3 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) @@ -111,14 +117,17 @@ master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; DROP TRIGGER tr1 master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # DELETE FROM t1 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # DELETE FROM t2 master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # DELETE FROM t3 master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -137,15 +146,18 @@ END master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW CALL p1() master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `event_logging_2` +master-bin.000001 # Annotate_rows # # INSERT t3 VALUES (3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t3) @@ -179,11 +191,13 @@ SAVEPOINT savepoint_1; ROLLBACK TO savepoint_1; END master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.t) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `savepoint_1` master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t VALUES (3) master-bin.000001 # Table_map # # table_id: # (test.t) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `savepoint_1` @@ -224,17 +238,20 @@ SAVEPOINT savepoint_1; INSERT INTO t1 VALUES (5); END master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (5) master-bin.000001 # Table_map # # table_id: # (test.t) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `savepoint_1` +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (5) master-bin.000001 # Table_map # # table_id: # (test.t) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (30) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -285,13 +302,16 @@ BEGIN SAVEPOINT savepoint_1; END master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t VALUES (2), (3) master-bin.000001 # Table_map # # table_id: # (test.t) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `savepoint_1` +master-bin.000001 # Annotate_rows # # INSERT INTO t VALUES (2), (3) master-bin.000001 # Table_map # # table_id: # (test.t) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (30) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -344,15 +364,18 @@ ROLLBACK TO event_logging_2; RETURN 0; END master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1), (f1()), (2), (4) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `event_logging_2` +master-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1), (f1()), (2), (4) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (10) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -409,16 +432,19 @@ INSERT INTO t1 VALUES (1); RETURN 0; END master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1), (f1()), (2), (4) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `event_logging_2` +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (10) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -472,13 +498,16 @@ SAVEPOINT event_logging_2; RETURN 0; END master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1), (f1()), (2), (4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # SAVEPOINT `event_logging_2` +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1), (f1()), (2), (4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (10) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result b/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result index 800a3f41f45..8f872190cc3 100644 --- a/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result +++ b/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result @@ -13,14 +13,17 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -29,10 +32,11 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) -******** [master] SHOW BINLOG EVENTS IN LIMIT 2,3 ******** +******** [master] SHOW BINLOG EVENTS IN LIMIT 2,4 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F ******** [master] SHOW BINLOG EVENTS ******** @@ -41,14 +45,17 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -59,14 +66,17 @@ Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -75,10 +85,11 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) -******** [slave] SHOW BINLOG EVENTS IN LIMIT 2,3 ******** +******** [slave] SHOW BINLOG EVENTS IN LIMIT 2,4 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F ******** [slave] SHOW BINLOG EVENTS ******** @@ -87,14 +98,17 @@ Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -108,14 +122,17 @@ slave-relay-bin.000002 # Binlog_checkpoint # # master-bin.000001 slave-relay-bin.000002 # Gtid # # GTID #-#-# slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT) slave-relay-bin.000002 # Gtid # # BEGIN GTID #-#-# +slave-relay-bin.000002 # Annotate_rows # # INSERT INTO t1 VALUES (1) slave-relay-bin.000002 # Table_map # # table_id: # (test.t1) slave-relay-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-relay-bin.000002 # Query # # COMMIT slave-relay-bin.000002 # Gtid # # BEGIN GTID #-#-# +slave-relay-bin.000002 # Annotate_rows # # INSERT INTO t1 VALUES (2) slave-relay-bin.000002 # Table_map # # table_id: # (test.t1) slave-relay-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-relay-bin.000002 # Query # # COMMIT slave-relay-bin.000002 # Gtid # # BEGIN GTID #-#-# +slave-relay-bin.000002 # Annotate_rows # # INSERT INTO t1 VALUES (3) slave-relay-bin.000002 # Table_map # # table_id: # (test.t1) slave-relay-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-relay-bin.000002 # Query # # COMMIT @@ -124,12 +141,13 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=POS slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION -******** [slave] SHOW RELAYLOG EVENTS IN LIMIT 2,3 ******** +******** [slave] SHOW RELAYLOG EVENTS IN LIMIT 2,4 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-relay-bin.000002 # Gtid_list # # [] slave-relay-bin.000002 # Binlog_checkpoint # # master-bin.000001 slave-relay-bin.000002 # Gtid # # GTID #-#-# +slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT) ******** [slave] SHOW RELAYLOG EVENTS ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info @@ -149,7 +167,7 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Binlog_checkpoint # # master-bin.000002 master-bin.000002 # Gtid # # GTID #-#-# -******** [master] SHOW BINLOG EVENTS IN LIMIT 2,3 ******** +******** [master] SHOW BINLOG EVENTS IN LIMIT 2,4 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ @@ -159,14 +177,17 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -183,7 +204,7 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002 slave-bin.000002 # Gtid # # GTID #-#-# -******** [slave] SHOW BINLOG EVENTS IN LIMIT 2,3 ******** +******** [slave] SHOW BINLOG EVENTS IN LIMIT 2,4 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ @@ -193,14 +214,17 @@ Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (2) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (3) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -220,12 +244,13 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-relay-bin.000005 # Rotate # # master-bin.000002;pos=POS slave-relay-bin.000005 # Format_desc # # SERVER_VERSION, BINLOG_VERSION -******** [slave] SHOW RELAYLOG EVENTS IN LIMIT 2,3 ******** +******** [slave] SHOW RELAYLOG EVENTS IN LIMIT 2,4 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-relay-bin.000005 # Gtid_list # # [#-#-#] slave-relay-bin.000005 # Binlog_checkpoint # # master-bin.000001 slave-relay-bin.000005 # Binlog_checkpoint # # master-bin.000002 +slave-relay-bin.000005 # Gtid # # GTID #-#-# ******** [slave] SHOW RELAYLOG EVENTS ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info diff --git a/mysql-test/suite/rpl/r/rpl_row_to_stmt.result b/mysql-test/suite/rpl/r/rpl_row_to_stmt.result index 0cbbee4c82e..8bed108162f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_to_stmt.result +++ b/mysql-test/suite/rpl/r/rpl_row_to_stmt.result @@ -18,10 +18,12 @@ Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; create table t1 (a int primary key) slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # insert into t1 values (1),(2),(3),(4),(5) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # update t1 set a=a*10 slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result index 2a0670e0b82..b9fe6842a11 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_skip.result +++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result @@ -17,14 +17,17 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) ENGINE= master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (c INT, d INT) ENGINE=MyISAM master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1,1),(2,4),(3,9) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1,1),(2,8),(3,27) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE t1,t2 SET b = d, d = b * 2 WHERE a = c master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Update_rows_v1 # # table_id: # @@ -213,7 +216,7 @@ a b 6 master only 7 master only connection slave; -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=10; +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=12; include/start_slave.inc SELECT * FROM t4 ORDER BY a; a b diff --git a/mysql-test/suite/rpl/r/rpl_sp_effects.result b/mysql-test/suite/rpl/r/rpl_sp_effects.result index 31234a8101f..d6890f22b02 100644 --- a/mysql-test/suite/rpl/r/rpl_sp_effects.result +++ b/mysql-test/suite/rpl/r/rpl_sp_effects.result @@ -271,6 +271,7 @@ call sp_bug26199('\0'); select sf_bug26199(b'1111111'); sf_bug26199(b'1111111') 0 +SET STATEMENT sql_mode = '' FOR select sf_bug26199(b'101111111'); sf_bug26199(b'101111111') 0 diff --git a/mysql-test/suite/rpl/r/rpl_special_charset.result b/mysql-test/suite/rpl/r/rpl_special_charset.result index 218ced9b8ea..b947cf3484d 100644 --- a/mysql-test/suite/rpl/r/rpl_special_charset.result +++ b/mysql-test/suite/rpl/r/rpl_special_charset.result @@ -1,6 +1,6 @@ include/master-slave.inc [connection master] -call mtr.add_suppression("Cannot use utf16 as character_set_client"); +call mtr.add_suppression("'utf16' can not be used as client character set"); CREATE TABLE t1(i VARCHAR(20)); INSERT INTO t1 VALUES (0xFFFF); connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result index b8a14b380db..5680d22f233 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_000001.result +++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result @@ -78,7 +78,7 @@ connection master1; drop table t1; create table t1 (n int); insert into t1 values(3456); -insert into mysql.user (Host, User, Password) +insert ignore into mysql.user (Host, User, Password) VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); Warnings: Warning 1364 Field 'ssl_cipher' doesn't have a default value diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result index bfa39abdcfc..6453538009a 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_log.result +++ b/mysql-test/suite/rpl/r/rpl_stm_log.result @@ -50,6 +50,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Intvar # # INSERT_ID=1 master-bin.000001 # Query # # use `test`; insert into t1 values (NULL) master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# flush logs; create table t3 (a int)ENGINE=MyISAM; connection master; diff --git a/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result b/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result index 627dfb066ba..ff521eea089 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result +++ b/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result @@ -26,12 +26,13 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) -******** [master] SHOW BINLOG EVENTS IN LIMIT 2,3 ******** +******** [master] SHOW BINLOG EVENTS IN LIMIT 2,4 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# ******** [master] SHOW BINLOG EVENTS ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info @@ -66,12 +67,13 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) -******** [slave] SHOW BINLOG EVENTS IN LIMIT 2,3 ******** +******** [slave] SHOW BINLOG EVENTS IN LIMIT 2,4 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# ******** [slave] SHOW BINLOG EVENTS ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info @@ -109,12 +111,13 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=POS slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION -******** [slave] SHOW RELAYLOG EVENTS IN LIMIT 2,3 ******** +******** [slave] SHOW RELAYLOG EVENTS IN LIMIT 2,4 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-relay-bin.000002 # Gtid_list # # [] slave-relay-bin.000002 # Binlog_checkpoint # # master-bin.000001 slave-relay-bin.000002 # Gtid # # GTID #-#-# +slave-relay-bin.000002 # Query # # use `test`; CREATE TABLE t1 (a INT) ******** [slave] SHOW RELAYLOG EVENTS ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info @@ -134,7 +137,7 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Binlog_checkpoint # # master-bin.000002 master-bin.000002 # Gtid # # GTID #-#-# -******** [master] SHOW BINLOG EVENTS IN LIMIT 2,3 ******** +******** [master] SHOW BINLOG EVENTS IN LIMIT 2,4 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ @@ -165,7 +168,7 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002 slave-bin.000002 # Gtid # # GTID #-#-# -******** [slave] SHOW BINLOG EVENTS IN LIMIT 2,3 ******** +******** [slave] SHOW BINLOG EVENTS IN LIMIT 2,4 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ @@ -199,12 +202,13 @@ include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-relay-bin.000005 # Rotate # # master-bin.000002;pos=POS slave-relay-bin.000005 # Format_desc # # SERVER_VERSION, BINLOG_VERSION -******** [slave] SHOW RELAYLOG EVENTS IN LIMIT 2,3 ******** +******** [slave] SHOW RELAYLOG EVENTS IN LIMIT 2,4 ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info slave-relay-bin.000005 # Gtid_list # # [#-#-#] slave-relay-bin.000005 # Binlog_checkpoint # # master-bin.000001 slave-relay-bin.000005 # Binlog_checkpoint # # master-bin.000002 +slave-relay-bin.000005 # Gtid # # GTID #-#-# ******** [slave] SHOW RELAYLOG EVENTS ******** include/show_events.inc Log_name Pos Event_type Server_id End_log_pos Info diff --git a/mysql-test/suite/rpl/r/rpl_stm_user_variables.result b/mysql-test/suite/rpl/r/rpl_stm_user_variables.result index 5f31cff94cf..cb2120523b2 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_user_variables.result +++ b/mysql-test/suite/rpl/r/rpl_stm_user_variables.result @@ -18,7 +18,7 @@ CREATE TABLE t1 (`tinyint` TINYINT, `decimal` DECIMAL(30,2)) ENGINE = MyISAM; ### insert max unsigned ### a) declarative -INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);; +INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);; ######################################### SELECT * FROM t1; tinyint 127 @@ -58,7 +58,7 @@ include/diff_tables.inc [master:t1,slave:t1] connection master; TRUNCATE t1; ### b) user var -INSERT INTO t1 VALUES (@positive, +INSERT IGNORE INTO t1 VALUES (@positive, @positive, @positive, @positive, @@ -112,7 +112,7 @@ connection master; TRUNCATE t1; ### insert min signed ### a) declarative -INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);; +INSERT IGNORE INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);; ######################################### SELECT * FROM t1; tinyint -128 @@ -152,7 +152,7 @@ include/diff_tables.inc [master:t1,slave:t1] connection master; TRUNCATE t1; ### b) user var -INSERT INTO t1 VALUES (@negative, +INSERT IGNORE INTO t1 VALUES (@negative, @negative, @negative, @negative, @@ -210,12 +210,14 @@ DROP TABLE t1; connection slave; include/rpl_reset.inc connection master; +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1 ( c INT, PRIMARY KEY (c)) Engine=MyISAM; CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW SET @aux = -1 ; SET @aux = 10294947273192243200; SET @aux1= @aux; INSERT INTO t1 VALUES (@aux) , (@aux1); ERROR 23000: Duplicate entry '2147483647' for key 'PRIMARY' +SET sql_mode = DEFAULT; connection slave; ## assertion: master and slave tables are in sync include/diff_tables.inc [master:t1,slave:t1] diff --git a/mysql-test/suite/rpl/r/rpl_strict_password_validation.result b/mysql-test/suite/rpl/r/rpl_strict_password_validation.result new file mode 100644 index 00000000000..579f576d881 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_strict_password_validation.result @@ -0,0 +1,17 @@ +include/master-slave.inc +[connection master] +connection slave; +install soname "simple_password_check"; +select @@strict_password_validation; +@@strict_password_validation +1 +connection master; +create user foo1 identified by password '11111111111111111111111111111111111111111'; +set password for foo1 = PASSWORD('PLAINtext-password!!99'); +drop user foo1; +connection slave; +connection slave; +create user foo1 identified by password '11111111111111111111111111111111111111111'; +ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement +uninstall plugin simple_password_check; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result index 6c709945111..2f7f1b07cb4 100644 --- a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result +++ b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result @@ -21,7 +21,7 @@ binlog_format ROW set global binlog_format=DEFAULT; show global variables like "binlog_format%"; Variable_name Value -binlog_format STATEMENT +binlog_format MIXED set global binlog_format=MIXED; show global variables like "binlog_format%"; Variable_name Value @@ -135,11 +135,13 @@ insert into t1 values(concat("for_23_",UUID())); insert into t1 select "yesterday_24_"; create table t2 ENGINE=MyISAM select rpad(UUID(),100,' '); create table t3 select 1 union select UUID(); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); Warnings: Warning 1292 Incorrect datetime value: '3' -insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); +insert ignore into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); create procedure foo() begin insert into t1 values("work_25_"); diff --git a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result index 585ebfd9bdb..24d7d6cebf7 100644 --- a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result +++ b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result @@ -71,6 +71,7 @@ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# slave-bin.000001 # Query # # use `test`; INSERT INTO t1 values(1) slave-bin.000001 # Xid # # COMMIT /* XID */ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t2 (i1) select * from t1 slave-bin.000001 # Table_map # # table_id: # (test.t2) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Query # # COMMIT @@ -79,6 +80,7 @@ slave-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t1_tmp` /* g slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */ slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Xid # # COMMIT /* XID */ @@ -106,6 +108,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test`; CREATE TABLE `t1` ( `rand()` double NOT NULL ) ENGINE=MyISAM +master-bin.000001 # Annotate_rows # # CREATE TABLE t1 ENGINE=MyISAM SELECT rand() master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT @@ -116,11 +119,12 @@ master-bin.000001 # Query # # COMMIT BEGIN; DROP TEMPORARY TABLE t1; # The rows event will binlogged after 'INSERT INTO t1 VALUES(1)' -INSERT INTO t1 VALUES(uuid()+0); +INSERT IGNORE INTO t1 VALUES(uuid()+0); COMMIT; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT IGNORE INTO t1 VALUES(uuid()+0) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result index 37f13c8afb0..e2999cdd225 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary.result +++ b/mysql-test/suite/rpl/r/rpl_temporary.result @@ -17,7 +17,7 @@ connection slave; connection master; DROP TABLE IF EXISTS t1; CREATE TEMPORARY TABLE `t1`(`a` tinyint,`b` char(1))engine=myisam; -INSERT INTO `t1` set `a`=128,`b`='128'; +INSERT IGNORE INTO `t1` set `a`=128,`b`='128'; Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1265 Data truncated for column 'b' at row 1 @@ -25,7 +25,7 @@ connection slave; include/stop_slave.inc include/start_slave.inc connection master; -INSERT INTO `t1` set `a`=128,`b`='128'; +INSERT IGNORE INTO `t1` set `a`=128,`b`='128'; Warnings: Warning 1264 Out of range value for column 'a' at row 1 Warning 1265 Data truncated for column 'b' at row 1 diff --git a/mysql-test/suite/rpl/r/rpl_temporary_error2.result b/mysql-test/suite/rpl/r/rpl_temporary_error2.result index 901fbb18c32..7d60d467ec7 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary_error2.result +++ b/mysql-test/suite/rpl/r/rpl_temporary_error2.result @@ -1,5 +1,6 @@ include/master-slave.inc [connection master] +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); *** Provoke a deadlock on the slave, check that transaction retry succeeds. *** connection master; CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; diff --git a/mysql-test/suite/rpl/r/rpl_timezone.result b/mysql-test/suite/rpl/r/rpl_timezone.result index b9b890443eb..d1978102f4e 100644 --- a/mysql-test/suite/rpl/r/rpl_timezone.result +++ b/mysql-test/suite/rpl/r/rpl_timezone.result @@ -45,7 +45,7 @@ connection master; connection master; delete from t1; set time_zone='UTC'; -load data infile '../../std_data/rpl_timezone2.dat' into table t1; +load data infile '../../std_data/rpl_timezone2.dat' ignore into table t1; Warnings: Warning 1265 Data truncated for column 't' at row 1 Warning 1261 Row 1 doesn't contain data for all columns @@ -125,9 +125,7 @@ connection master; CREATE TABLE t1 (a INT, b TIMESTAMP); INSERT INTO t1 VALUES (1, NOW()); SET @@session.time_zone='Japan'; -UPDATE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1; -Warnings: -Warning 1264 Out of range value for column 'b' at row 1 +UPDATE IGNORE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1; SELECT * FROM t1 ORDER BY a; a b 1 0000-00-00 00:00:00 diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result index dcf0c70ffc4..06d5a3c895f 100644 --- a/mysql-test/suite/rpl/r/rpl_trigger.result +++ b/mysql-test/suite/rpl/r/rpl_trigger.result @@ -1127,9 +1127,9 @@ before insert on t1 for each row follows tr1 set NEW.b := (NEW.b+1)*3; show triggers; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -tr1 INSERT t1 set NEW.b := (NEW.b+1)*2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci -tr2 INSERT t1 set NEW.b := (NEW.b+1)*3 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci -tr3 INSERT t1 set NEW.b := (NEW.b+1)*4 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr1 INSERT t1 set NEW.b := (NEW.b+1)*2 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr2 INSERT t1 set NEW.b := (NEW.b+1)*3 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr3 INSERT t1 set NEW.b := (NEW.b+1)*4 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci insert into t1 values (1,1); select * from t1; a b @@ -1137,9 +1137,9 @@ a b connection slave; show triggers; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -tr1 INSERT t1 set NEW.b := (NEW.b+1)*2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci -tr2 INSERT t1 set NEW.b := (NEW.b+1)*3 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci -tr3 INSERT t1 set NEW.b := (NEW.b+1)*4 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr1 INSERT t1 set NEW.b := (NEW.b+1)*2 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr2 INSERT t1 set NEW.b := (NEW.b+1)*3 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr3 INSERT t1 set NEW.b := (NEW.b+1)*4 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci select * from t1; a b 1 64 @@ -1151,11 +1151,11 @@ CREATE OR REPLACE TRIGGER tr BEFORE DELETE ON t1 FOR EACH ROW PRECEDES non_exist ERROR HY000: Referenced trigger 'non_existing_trigger' for the given action time and event type does not exist SHOW TRIGGERS; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -tr INSERT t1 SET @a=1 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr INSERT t1 SET @a=1 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci connection slave; SHOW TRIGGERS; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation -tr INSERT t1 SET @a=1 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +tr INSERT t1 SET @a=1 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci connection master; drop table t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result b/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result index 3e737267fbd..ffa041efd27 100644 --- a/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result +++ b/mysql-test/suite/rpl/r/rpl_upgrade_master_info.result @@ -14,6 +14,7 @@ connection slave; CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1; include/start_slave.inc include/sync_with_master_gtid.inc +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1; a 1 @@ -27,6 +28,7 @@ connection slave; CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1; include/start_slave.inc include/sync_with_master_gtid.inc +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; a 1 @@ -41,6 +43,7 @@ connection slave; CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1; include/start_slave.inc include/sync_with_master_gtid.inc +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; a 1 @@ -56,6 +59,7 @@ connection slave; CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1; include/start_slave.inc include/sync_with_master_gtid.inc +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; a 1 @@ -72,6 +76,7 @@ connection slave; CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1; include/start_slave.inc include/sync_with_master_gtid.inc +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; a 1 diff --git a/mysql-test/suite/rpl/r/sec_behind_master-5114.result b/mysql-test/suite/rpl/r/sec_behind_master-5114.result index 503f519cb4d..97e07a09f39 100644 --- a/mysql-test/suite/rpl/r/sec_behind_master-5114.result +++ b/mysql-test/suite/rpl/r/sec_behind_master-5114.result @@ -2,9 +2,12 @@ include/master-slave.inc [connection master] call mtr.add_suppression("Unsafe statement written to the binary log"); CREATE TABLE t1 (a int); +connection slave; +connection master; INSERT INTO t1 VALUES(SLEEP(2)); connection slave; -Seconds_Behind_Master: 1 +Seconds_Behind_Master_is_less_than_100 +1 connection master; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave diff --git a/mysql-test/suite/rpl/t/rpl_concurrency_error.test b/mysql-test/suite/rpl/t/rpl_concurrency_error.test index 15d5d5502a1..37a05064641 100644 --- a/mysql-test/suite/rpl/t/rpl_concurrency_error.test +++ b/mysql-test/suite/rpl/t/rpl_concurrency_error.test @@ -75,7 +75,7 @@ while ($type) SET AUTOCOMMIT = 0; } --error ER_LOCK_WAIT_TIMEOUT - eval UPDATE t SET f = 'magenta $type' WHERE f = 'red'; + eval UPDATE IGNORE t SET f = 'magenta $type' WHERE f = 'red'; eval INSERT INTO t VALUES (5 + ($type * 10),"brown"); INSERT INTO n VALUES (now(),"brown"); @@ -110,7 +110,7 @@ while ($type) SET AUTOCOMMIT = 0; } --error ER_LOCK_WAIT_TIMEOUT - eval UPDATE t SET f = 'dark blue $type' WHERE f = 'red'; + eval UPDATE IGNORE t SET f = 'dark blue $type' WHERE f = 'red'; eval INSERT INTO t VALUES (6 + ($type * 10),"brown"); INSERT INTO n VALUES (now(),"brown"); diff --git a/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test b/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test index 0ed936d0267..3619ede2c01 100644 --- a/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test +++ b/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test @@ -6,10 +6,9 @@ connection master; -call mtr.add_suppression("mysqld: Table './mysql/gtid_slave_pos' is marked as crashed and should be repaired"); +call mtr.add_suppression("mysqld: Table '.*gtid_slave_pos' is marked as crashed and should be repaired"); call mtr.add_suppression("Checking table: './mysql/gtid_slave_pos'"); call mtr.add_suppression("mysql.gtid_slave_pos: 1 client is using or hasn't closed the table properly"); - SET @@session.gtid_domain_id= 0; create table ti (a int auto_increment primary key) engine=innodb; diff --git a/mysql-test/suite/rpl/t/rpl_gtid_crash.test b/mysql-test/suite/rpl/t/rpl_gtid_crash.test index df3ba9a3420..b81cbd38cd3 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_crash.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_crash.test @@ -12,11 +12,6 @@ call mtr.add_suppression("Checking table:"); call mtr.add_suppression("client is using or hasn't closed the table properly"); call mtr.add_suppression("Table .* is marked as crashed and should be repaired"); -# We have seen this warning a couple of times in Buildbot. Since we crash the -# server deliberately, it seems possible that we could in rare cases crash in -# the middle of a page write. The page is recovered from the doublewrite -# buffer ("[Note] InnoDB: Recovered the page from the doublewrite buffer."). -call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); flush tables; ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; diff --git a/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test b/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test index 9739ba8bc43..05da466597e 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test @@ -285,4 +285,6 @@ SET GLOBAL binlog_format=@old_format; DROP TABLE t1; DROP TABLE t2; +call mtr.add_suppression("Can't find record in 't2'"); + --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test index b57714aaa57..09b35011f1f 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test @@ -28,6 +28,7 @@ CHANGE MASTER TO master_use_gtid=current_pos; --write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect wait EOF +FLUSH LOGS; --shutdown_server 30 --source include/wait_until_disconnected.inc @@ -92,6 +93,7 @@ INSERT INTO t1 VALUES(5); --connection server_2 --source include/sync_with_master_gtid.inc +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; --echo *** Test that @@gtid_slave_pos and @@gtid_current_pos are correctly loaded even if slave threads have not started. *** @@ -136,6 +138,7 @@ INSERT INTO t1 VALUES (7); --connection server_2 --sync_with_master +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; # Now we restart the slave server. When it restarts, there is nothing new @@ -177,6 +180,7 @@ INSERT INTO t1 VALUES (8); --connection server_2 --sync_with_master +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; --source include/stop_slave.inc @@ -210,6 +214,7 @@ INSERT INTO t1 VALUES (9); --connection server_2 --sync_with_master +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; # Put things back as they were. @@ -248,6 +253,7 @@ INSERT INTO t1 VALUES (11); --connection server_2 --sync_with_master +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT domain_id, COUNT(*) FROM mysql.gtid_slave_pos GROUP BY domain_id; --write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect @@ -270,6 +276,7 @@ INSERT INTO t1 VALUES (13); --connection server_2 --sync_with_master +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT domain_id, COUNT(*) FROM mysql.gtid_slave_pos GROUP BY domain_id; diff --git a/mysql-test/suite/rpl/t/rpl_idempotency.test b/mysql-test/suite/rpl/t/rpl_idempotency.test index 186c6260154..fcfe6f65e6d 100644 --- a/mysql-test/suite/rpl/t/rpl_idempotency.test +++ b/mysql-test/suite/rpl/t/rpl_idempotency.test @@ -8,6 +8,8 @@ call mtr.add_suppression("Slave SQL.*Can.t find record in .t[12].* error.* 1032" call mtr.add_suppression("Slave SQL.*Cannot delete or update a parent row: a foreign key constraint fails .* error.* 1451"); call mtr.add_suppression("Slave SQL.*Cannot add or update a child row: a foreign key constraint fails .* error.* 1452"); call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* error.* 1062"); +call mtr.add_suppression("Can't find record in 't1'"); +call mtr.add_suppression("Can't find record in 't2'"); connection master; CREATE TABLE t1 (a INT PRIMARY KEY); diff --git a/mysql-test/suite/rpl/t/rpl_killed_ddl.test b/mysql-test/suite/rpl/t/rpl_killed_ddl.test index 593051700a7..6415b3e8874 100644 --- a/mysql-test/suite/rpl/t/rpl_killed_ddl.test +++ b/mysql-test/suite/rpl/t/rpl_killed_ddl.test @@ -83,9 +83,9 @@ CREATE FUNCTION f1 () RETURNS INT DETERMINISTIC RETURN 1; DELIMITER //; -CREATE PROCEDURE p1 (OUT rows INT) +CREATE PROCEDURE p1 (OUT rows_cnt INT) BEGIN - SELECT COUNT(*) INTO rows FROM t1; + SELECT COUNT(*) INTO rows_cnt FROM t1; END; // DELIMITER ;// @@ -203,15 +203,15 @@ source include/kill_query_and_diff_master_slave.inc; --let $rpl_diff_statement= SHOW PROCEDURE STATUS LIKE \'p%\' DELIMITER //; -send CREATE PROCEDURE p2 (OUT rows INT) +send CREATE PROCEDURE p2 (OUT rows_cnt INT) BEGIN - SELECT COUNT(*) INTO rows FROM t2; + SELECT COUNT(*) INTO rows_cnt FROM t2; END; // DELIMITER ;// source include/kill_query_and_diff_master_slave.inc; -send ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows of table t1'; +send ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows_cnt of table t1'; source include/kill_query_and_diff_master_slave.inc; send DROP PROCEDURE p1; diff --git a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test index 0e6608fd848..a8a6d562ee5 100644 --- a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test +++ b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test @@ -111,7 +111,7 @@ REAP; SET debug_sync='RESET'; --connection master SET debug_sync='RESET'; -let $binlog_limit= 0, 8; +let $binlog_limit= 0, 10; --source include/show_binlog_events.inc --save_master_pos diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test index 93dfe4d5e7c..789f59a3637 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test @@ -4,6 +4,10 @@ --let $rpl_topology=1->2 --source include/rpl_init.inc +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); +call mtr.add_suppression("Can't find record in 't1'"); +call mtr.add_suppression("Can't find record in 't2'"); + --connection server_1 ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB; diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test index 94924147dce..ee0de499edf 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test @@ -70,5 +70,8 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads; --connection server_1 DROP TABLE t1, t2; +--connection server_2 +call mtr.add_suppression("Deadlock found when trying to get lock.*"); + --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_rewrt_db.test b/mysql-test/suite/rpl/t/rpl_rewrt_db.test index aa488258c3b..235545747fa 100644 --- a/mysql-test/suite/rpl/t/rpl_rewrt_db.test +++ b/mysql-test/suite/rpl/t/rpl_rewrt_db.test @@ -34,7 +34,7 @@ create database rewrite; connection master; use test; create table t1 (a date, b date, c date not null, d date); -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ','; load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; sync_slave_with_master; @@ -43,7 +43,7 @@ select * from rewrite.t1; connection master; truncate table t1; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); sync_slave_with_master; connection slave; diff --git a/mysql-test/suite/rpl/t/rpl_row_annotate_dont-slave.opt b/mysql-test/suite/rpl/t/rpl_row_annotate_dont-slave.opt index 74ac3bfefcb..feef43f702c 100644 --- a/mysql-test/suite/rpl/t/rpl_row_annotate_dont-slave.opt +++ b/mysql-test/suite/rpl/t/rpl_row_annotate_dont-slave.opt @@ -1 +1 @@ ---log-slave-updates --replicate-ignore-table=test1.xt1 --replicate-ignore-table=test1.xt2 \ No newline at end of file +--log-slave-updates --skip-replicate-annotate-row-events --replicate-ignore-table=test1.xt1 --replicate-ignore-table=test1.xt2 diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test b/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test index f1f5c584543..d4a1777a8dc 100644 --- a/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test +++ b/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test @@ -4,4 +4,8 @@ let $type= 'MYISAM' ; let $extra_index= ; -- source extra/rpl_tests/rpl_row_basic.test + +connection slave; +call mtr.add_suppression("Can't find record in 't1'"); + --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_create_select.test b/mysql-test/suite/rpl/t/rpl_row_create_select.test index ca270e92d0c..d870b68f364 100644 --- a/mysql-test/suite/rpl/t/rpl_row_create_select.test +++ b/mysql-test/suite/rpl/t/rpl_row_create_select.test @@ -11,9 +11,11 @@ connection master; --echo #After the patch, the display width is set to a default --echo #value of 21. +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT REPEAT('A', 1000) DIV 1 AS a; SHOW CREATE TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CONVERT(REPEAT('A', 255) USING UCS2) DIV 1 AS a; SHOW CREATE TABLE t2; diff --git a/mysql-test/suite/rpl/t/rpl_row_idempotency.test b/mysql-test/suite/rpl/t/rpl_row_idempotency.test index cbc04a918dc..85775832b2b 100644 --- a/mysql-test/suite/rpl/t/rpl_row_idempotency.test +++ b/mysql-test/suite/rpl/t/rpl_row_idempotency.test @@ -13,6 +13,9 @@ call mtr.add_suppression("Can.t find record in .t[12].* error.* 1032"); call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* error.* 1451"); call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* error.* 1452"); call mtr.add_suppression("Duplicate entry .1. for key .PRIMARY.* error.* 1062"); +call mtr.add_suppression("Can't find record in 't1'"); +call mtr.add_suppression("Can't find record in 't2'"); + # bug#31609 Not all RBR slave errors reported as errors # bug#31552 Replication breaks when deleting rows from out-of-sync table diff --git a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test index a44cc18c0ed..678679f0cf1 100644 --- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test +++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test @@ -4,44 +4,27 @@ # Purpose: To test changes to mysqlbinlog for row based bin logs # # We are using .opt file since we need small binlog size # ################################################################## -# Include Section -# Make sure that we have row based bin log -- source include/have_binlog_format_row.inc -# Embedded server doesn't support binlogging -- source include/not_embedded.inc -# This test requires the cp932 charset compiled in -- source include/have_cp932.inc -# Slow test, don't run during staging part --- source include/not_staging.inc - -- source include/master-slave.inc -# Setup Section +--echo ---Setup Section -- + # we need this for getting fixed timestamps inside of this test - ---disable_query_log -select "---Setup Section --" as ""; -set sql_mode=""; ---enable_query_log - set timestamp=1000000000; ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3; ---enable_warnings - -connection master; CREATE TABLE t1(word VARCHAR(20)); CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY); ---let $position= query_get_value(SHOW MASTER STATUS, Position, 1) +--let position= query_get_value(SHOW MASTER STATUS, Position, 1) CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT); ---let $stop_position=query_get_value(SHOW MASTER STATUS, Position, 1) ---let $stop_position1=`select $stop_position - 1` ---let $binlog_start_pos=query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1) +--let stop_position=query_get_value(SHOW MASTER STATUS, Position, 1) +--let stop_position1=`select $stop_position - 1` +--let binlog_start_pos=query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1) + # Test Section # Lets start by putting some data into the tables. ---disable_query_log INSERT INTO t1 VALUES ("abirvalg"); LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; @@ -55,7 +38,8 @@ set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -let $count=500; +--disable_query_log +let count=500; while ($count) { INSERT INTO t2 VALUES (NULL); @@ -64,10 +48,7 @@ while ($count) } --enable_query_log - ---disable_query_log -select "---Test1 check table load --" as ""; ---enable_query_log +--echo ---Test 1 check table load -- # Lets Check the tables on the Master SELECT COUNT(*) from t1; @@ -96,34 +77,26 @@ insert into t1 values ("Alas"); flush logs; # delimiters are for easier debugging in future ---disable_query_log -select "--- Test 1 Dump binlog to file --" as ""; ---enable_query_log +--echo --- Test 1 Dump binlog to file -- # # Prepare local temporary file to recreate what we have currently. -let $MYSQLD_DATADIR= `select @@datadir;`; +let MYSQLD_DATADIR= `select @@datadir;`; --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/master.sql --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/master.sql # Now that we have our file, lets get rid of the current database. # Cleanup the master and the slave and try to recreate. ---disable_query_log -select "--- Test 1 delete tables, clean master and slave --" as ""; ---enable_query_log +--echo --- Test 1 delete tables, clean master and slave -- DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; sync_slave_with_master; -#we expect STOP SLAVE to produce a warning as the slave is stopped -#(the server was started with skip-slave-start) ---disable_warnings stop slave; --source include/wait_for_slave_to_stop.inc ---enable_warnings connection master; reset master; connection slave; @@ -133,15 +106,11 @@ start slave; connection master; # We should be clean at this point, now we will run in the file from above. ---disable_query_log -select "--- Test 1 Load from Dump binlog file --" as ""; ---enable_query_log +--echo --- Test 1 Load from Dump binlog file -- --exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/master.sql" ---disable_query_log -select "--- Test 1 Check Load Results --" as ""; ---enable_query_log +--echo --- Test 1 Check Load Results -- # Lets Check the tables on the Master SELECT COUNT(*) from t1; @@ -169,28 +138,20 @@ remove_file $MYSQLTEST_VARDIR/tmp/master.sql; # this test for start-position option # By setting this position to 416, we should only get the create of t3 ---disable_query_log -select "--- Test 2 position test --" as ""; ---enable_query_log -let $MYSQLD_DATADIR= `select @@datadir;`; +--echo --- Test 2 position test -- --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --start-position=$position --stop-position=$stop_position $MYSQLD_DATADIR/master-bin.000001 # These are tests for remote binlog. # They should return the same as previous test. ---disable_query_log -select "--- Test 3 First Remote test --" as ""; ---enable_query_log +--echo --- Test 3 First Remote test -- # This is broken now --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=$stop_position --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 ---disable_query_log -select "--- Test 4 Second Remote test --" as ""; ---enable_query_log +--echo --- Test 4 Second Remote test -- --exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql - --exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/remote.sql # Now that we have our file, lets get rid of the current database. @@ -202,13 +163,8 @@ DROP TABLE t3; sync_slave_with_master; -#we expect STOP SLAVE to produce a warning as the slave is stopped -#(the server was started with skip-slave-start) - ---disable_warnings stop slave; --source include/wait_for_slave_to_stop.inc ---enable_warnings connection master; reset master; connection slave; @@ -252,40 +208,26 @@ connection master; # transactions. /Matz # LOAD DATA ---disable_query_log -select "--- Test 5 LOAD DATA --" as ""; ---enable_query_log +--echo --- Test 5 LOAD DATA -- --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=$binlog_start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 # Bug#7853 (mysqlbinlog does not accept input from stdin) ---disable_query_log -select "--- Test 6 reading stdin --" as ""; ---enable_query_log -let $MYSQLD_DATADIR= `select @@datadir;`; +--echo --- Test 6 reading stdin -- --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --exec $MYSQL_BINLOG --short-form --stop-position=$stop_position1 - < $MYSQLD_DATADIR/master-bin.000001 ---disable_query_log -select "--- Test 7 reading stdin w/position --" as ""; ---enable_query_log +--echo --- Test 7 reading stdin w/position -- --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --exec $MYSQL_BINLOG --short-form --start-position=$position --stop-position=$stop_position - < $MYSQLD_DATADIR/master-bin.000001 # Bug#16217 (mysql client did not know how not switch its internal charset) ---disable_query_log -select "--- Test 8 switch internal charset --" as ""; ---enable_query_log +--echo --- Test 8 switch internal charset -- sync_slave_with_master; -#we expect STOP SLAVE to produce a warning as the slave is stopped -#(the server was started with skip-slave-start) - ---disable_warnings stop slave; --source include/wait_for_slave_to_stop.inc ---enable_warnings connection master; reset master; connection slave; @@ -298,7 +240,6 @@ create table t4 (f text character set utf8); create table t5 (f text character set cp932); --exec $MYSQL --default-character-set=utf8 test -e "insert into t4 values(_utf8'ソ')" --exec $MYSQL --default-character-set=cp932 test -e "insert into t5 values(_cp932'ƒ\');" -let $MYSQLD_DATADIR= `select @@datadir;`; flush logs; rename table t4 to t04, t5 to t05; --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL --default-character-set=utf8 @@ -315,42 +256,30 @@ select HEX(f) from t4; select HEX(f) from t05; select HEX(f) from t5; ---disable_query_log -select "--- Test cleanup --" as ""; ---enable_query_log +--echo --- Test cleanup -- # clean up connection master; sync_slave_with_master; connection master; +DROP TABLE t1, t2, t3, t04, t05, t4, t5; # BUG#17654 also test mysqlbinlog to ensure it can read the binlog from a remote server # and ensure that the results are the same as if read from a file (the same file). ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - CREATE TABLE t1 (a INT NOT NULL KEY, b INT); - INSERT INTO t1 VALUES(1,1); - SELECT * FROM t1; - -let $MYSQLD_DATADIR= `select @@datadir;`; - FLUSH LOGS; --exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/local.sql --diff_files $MYSQLTEST_VARDIR/tmp/local.sql $MYSQLTEST_VARDIR/tmp/remote.sql - --remove_file $MYSQLTEST_VARDIR/tmp/remote.sql - --remove_file $MYSQLTEST_VARDIR/tmp/local.sql +DROP TABLE t1; -DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; sync_slave_with_master; # End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_row_until.test b/mysql-test/suite/rpl/t/rpl_row_until.test index 8a5d743a238..478c2206a5a 100644 --- a/mysql-test/suite/rpl/t/rpl_row_until.test +++ b/mysql-test/suite/rpl/t/rpl_row_until.test @@ -18,7 +18,7 @@ let $master_pos_drop_t1= query_get_value(SHOW MASTER STATUS, Position, 1); DROP TABLE t1; # Save master log position for query DROP TABLE t1 save_master_pos; -let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 10); +#let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 10); let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 10); # Save master log position for query CREATE TABLE t2 diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test index 8248f749c04..09ecccaf193 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_skip.test +++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test @@ -212,7 +212,7 @@ SELECT * FROM t6 ORDER BY a; save_master_pos; connection slave; -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=10; +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=12; source include/start_slave.inc; sync_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects.test b/mysql-test/suite/rpl/t/rpl_sp_effects.test index b9d637320bb..05bd49330ed 100644 --- a/mysql-test/suite/rpl/t/rpl_sp_effects.test +++ b/mysql-test/suite/rpl/t/rpl_sp_effects.test @@ -239,6 +239,7 @@ DELIMITER ;// call sp_bug26199(b'1110'); call sp_bug26199('\0'); select sf_bug26199(b'1111111'); +SET STATEMENT sql_mode = '' FOR select sf_bug26199(b'101111111'); select sf_bug26199('\''); select hex(b) from t2; diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test index 3a87a8f1ef9..7e8f669ff34 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_000001.test +++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test @@ -113,7 +113,7 @@ connection master1; drop table t1; create table t1 (n int); insert into t1 values(3456); -insert into mysql.user (Host, User, Password) +insert ignore into mysql.user (Host, User, Password) VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); select select_priv,user from mysql.user where user = _binary'blafasel2'; update mysql.user set Select_priv = "Y" where User= _binary"blafasel2"; diff --git a/mysql-test/suite/rpl/t/rpl_stm_user_variables.test b/mysql-test/suite/rpl/t/rpl_stm_user_variables.test index 74e54f9624d..493ea4cd967 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_user_variables.test +++ b/mysql-test/suite/rpl/t/rpl_stm_user_variables.test @@ -32,7 +32,7 @@ CREATE TABLE t1 (`tinyint` TINYINT, -- echo ### insert max unsigned -- echo ### a) declarative --- eval INSERT INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long); +-- eval INSERT IGNORE INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long); -- echo ######################################### -- query_vertical SELECT * FROM t1 @@ -47,7 +47,7 @@ CREATE TABLE t1 (`tinyint` TINYINT, TRUNCATE t1; -- echo ### b) user var -INSERT INTO t1 VALUES (@positive, +INSERT IGNORE INTO t1 VALUES (@positive, @positive, @positive, @positive, @@ -77,7 +77,7 @@ TRUNCATE t1; -- echo ### insert min signed -- echo ### a) declarative --- eval INSERT INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long); +-- eval INSERT IGNORE INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long); -- echo ######################################### -- query_vertical SELECT * FROM t1 @@ -92,7 +92,7 @@ TRUNCATE t1; TRUNCATE t1; -- echo ### b) user var -INSERT INTO t1 VALUES (@negative, +INSERT IGNORE INTO t1 VALUES (@negative, @negative, @negative, @negative, @@ -135,7 +135,7 @@ DROP TABLE t1; ##################################################################### --source include/rpl_reset.inc -- connection master - +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1 ( c INT, PRIMARY KEY (c)) Engine=MyISAM; # offending trigger that would reset the unsigned flag for aux before @@ -146,6 +146,7 @@ SET @aux = 10294947273192243200; SET @aux1= @aux; -- error ER_DUP_ENTRY INSERT INTO t1 VALUES (@aux) , (@aux1); +SET sql_mode = DEFAULT; -- sync_slave_with_master diff --git a/mysql-test/suite/rpl/t/rpl_strict_password_validation.test b/mysql-test/suite/rpl/t/rpl_strict_password_validation.test new file mode 100644 index 00000000000..c4dda1e1269 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_strict_password_validation.test @@ -0,0 +1,24 @@ +if (!$SIMPLE_PASSWORD_CHECK_SO) { + skip No SIMPLE_PASSWORD_CHECK plugin; +} + +--source include/master-slave.inc + + +--connection slave +install soname "simple_password_check"; +select @@strict_password_validation; + +--connection master +create user foo1 identified by password '11111111111111111111111111111111111111111'; +set password for foo1 = PASSWORD('PLAINtext-password!!99'); +drop user foo1; +--sync_slave_with_master + +--connection slave +--error ER_OPTION_PREVENTS_STATEMENT +create user foo1 identified by password '11111111111111111111111111111111111111111'; + +uninstall plugin simple_password_check; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test index fa611538aed..070e5189949 100644 --- a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test +++ b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test @@ -187,7 +187,7 @@ DROP TEMPORARY TABLE t1; --echo # The rows event will binlogged after 'INSERT INTO t1 VALUES(1)' --disable_warnings -INSERT INTO t1 VALUES(uuid()+0); +INSERT IGNORE INTO t1 VALUES(uuid()+0); --enable_warnings COMMIT; diff --git a/mysql-test/suite/rpl/t/rpl_temporary.test b/mysql-test/suite/rpl/t/rpl_temporary.test index e3f5a0be573..729f275bb0d 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary.test +++ b/mysql-test/suite/rpl/t/rpl_temporary.test @@ -80,7 +80,7 @@ disable_warnings; DROP TABLE IF EXISTS t1; enable_warnings; CREATE TEMPORARY TABLE `t1`(`a` tinyint,`b` char(1))engine=myisam; -INSERT INTO `t1` set `a`=128,`b`='128'; +INSERT IGNORE INTO `t1` set `a`=128,`b`='128'; sync_slave_with_master; @@ -88,7 +88,7 @@ source include/stop_slave.inc; source include/start_slave.inc; connection master; -INSERT INTO `t1` set `a`=128,`b`='128'; +INSERT IGNORE INTO `t1` set `a`=128,`b`='128'; sync_slave_with_master; # cleanup diff --git a/mysql-test/suite/rpl/t/rpl_temporary_error2.test b/mysql-test/suite/rpl/t/rpl_temporary_error2.test index b4fbca7113b..49194c5d914 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary_error2.test +++ b/mysql-test/suite/rpl/t/rpl_temporary_error2.test @@ -1,6 +1,8 @@ --source include/have_innodb.inc --source include/master-slave.inc +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); + --echo *** Provoke a deadlock on the slave, check that transaction retry succeeds. *** --connection master CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; diff --git a/mysql-test/suite/rpl/t/rpl_timezone.test b/mysql-test/suite/rpl/t/rpl_timezone.test index 1f0220421ab..4b5778ca245 100644 --- a/mysql-test/suite/rpl/t/rpl_timezone.test +++ b/mysql-test/suite/rpl/t/rpl_timezone.test @@ -71,7 +71,7 @@ connection master; connection master; delete from t1; set time_zone='UTC'; -load data infile '../../std_data/rpl_timezone2.dat' into table t1; +load data infile '../../std_data/rpl_timezone2.dat' ignore into table t1; SELECT * FROM t1 ORDER BY n; sync_slave_with_master; set time_zone='UTC'; @@ -157,7 +157,9 @@ CREATE TABLE t1 (a INT, b TIMESTAMP); INSERT INTO t1 VALUES (1, NOW()); SET @@session.time_zone='Japan'; -UPDATE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1; +--disable_warnings +UPDATE IGNORE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1; +--enable_warnings SELECT * FROM t1 ORDER BY a; sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_upgrade_master_info.test b/mysql-test/suite/rpl/t/rpl_upgrade_master_info.test index e81e7c0d714..42b375c4579 100644 --- a/mysql-test/suite/rpl/t/rpl_upgrade_master_info.test +++ b/mysql-test/suite/rpl/t/rpl_upgrade_master_info.test @@ -29,6 +29,7 @@ INSERT INTO t1 VALUES (1); eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1; --source include/start_slave.inc --source include/sync_with_master_gtid.inc +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1; --source include/stop_slave.inc @@ -54,6 +55,7 @@ INSERT INTO t1 VALUES (2); eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1; --source include/start_slave.inc --source include/sync_with_master_gtid.inc +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; --source include/stop_slave.inc @@ -79,6 +81,7 @@ INSERT INTO t1 VALUES (3); eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1; --source include/start_slave.inc --source include/sync_with_master_gtid.inc +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; --source include/stop_slave.inc @@ -104,6 +107,7 @@ INSERT INTO t1 VALUES (4); eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1; --source include/start_slave.inc --source include/sync_with_master_gtid.inc +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; --source include/stop_slave.inc @@ -129,6 +133,7 @@ INSERT INTO t1 VALUES (5); eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1; --source include/start_slave.inc --source include/sync_with_master_gtid.inc +FLUSH NO_WRITE_TO_BINLOG TABLES; SELECT * FROM t1 ORDER BY a; --source include/stop_slave.inc diff --git a/mysql-test/suite/rpl/t/sec_behind_master-5114.test b/mysql-test/suite/rpl/t/sec_behind_master-5114.test index 8c70da4f0a8..ff8cab54c4f 100644 --- a/mysql-test/suite/rpl/t/sec_behind_master-5114.test +++ b/mysql-test/suite/rpl/t/sec_behind_master-5114.test @@ -3,24 +3,60 @@ source include/have_binlog_format_statement.inc; call mtr.add_suppression("Unsafe statement written to the binary log"); + +# Make sure that the start time of the first event is certainly different +# from the next event +--let $timestamp= `SELECT @@timestamp` +--disable_query_log +eval SET TIMESTAMP= $timestamp-100; +--enable_query_log CREATE TABLE t1 (a int); + +# Make sure that the slave is done with the first event, and all checks +# that we'll perform later will be really against the second event +sync_slave_with_master; + +connection master; + +# Restore the timestamp now. It doesn't matter that it's not precise, +# it just needs to be very different from the earlier event +--disable_query_log +eval SET TIMESTAMP= $timestamp; +--enable_query_log + send INSERT INTO t1 VALUES(SLEEP(2)); connection slave; -let $run = 10; + +# When the slave starts executing the event, Seconds_Behind_Master +# should start growing steadilly. The bugfix ensures that they are +# calculated based on the start time of the current event, rather +# than the start time of the previous event. To check it, we only need +# the first non-zero value + +let $run = 20; while ($run) { dec $run; let $sbm=query_get_value(SHOW SLAVE STATUS, Seconds_Behind_Master, 1); # for debugging uncomment echo and remove the if() - #echo Seconds_Behind_Master: $sbm; +# echo Seconds_Behind_Master: $sbm; if ($sbm) { let $run = 0; } sleep 0.5; } -echo Seconds_Behind_Master: $sbm; + +# Normally the first non-zero value should be 1. However, due to race +# conditions on slow servers, sometimes the check might miss the value 1, +# and only catch a higher one. It does not matter, we just need to make +# sure it didn't start with 100+, as it would have with bug MDEV-5114 + +--disable_query_log +eval SELECT $sbm > 0 and $sbm < 99 AS Seconds_Behind_Master_is_less_than_100; +--enable_query_log + connection master; reap; drop table t1; diff --git a/mysql-test/suite/sys_vars/disabled.def b/mysql-test/suite/sys_vars/disabled.def index e4a2699f031..872474cb1e9 100644 --- a/mysql-test/suite/sys_vars/disabled.def +++ b/mysql-test/suite/sys_vars/disabled.def @@ -12,3 +12,4 @@ innodb_flush_checkpoint_debug_basic: removed from XtraDB-26.0 all_vars: obsolete, see sysvars_* tests +innodb_buffer_pool_dump_pct_function: MDEV-11454 follow-up needed (unstable) diff --git a/mysql-test/suite/sys_vars/r/aria_recover_options_basic.result b/mysql-test/suite/sys_vars/r/aria_recover_options_basic.result index 04c45aa0dbb..0399b531eeb 100644 --- a/mysql-test/suite/sys_vars/r/aria_recover_options_basic.result +++ b/mysql-test/suite/sys_vars/r/aria_recover_options_basic.result @@ -1,21 +1,21 @@ SET @start_global_value = @@global.aria_recover_options; select @@global.aria_recover_options; @@global.aria_recover_options -NORMAL +BACKUP,QUICK select @@session.aria_recover_options; ERROR HY000: Variable 'aria_recover_options' is a GLOBAL variable show global variables like 'aria_recover_options'; Variable_name Value -aria_recover_options NORMAL +aria_recover_options BACKUP,QUICK show session variables like 'aria_recover_options'; Variable_name Value -aria_recover_options NORMAL +aria_recover_options BACKUP,QUICK select * from information_schema.global_variables where variable_name='aria_recover_options'; VARIABLE_NAME VARIABLE_VALUE -ARIA_RECOVER_OPTIONS NORMAL +ARIA_RECOVER_OPTIONS BACKUP,QUICK select * from information_schema.session_variables where variable_name='aria_recover_options'; VARIABLE_NAME VARIABLE_VALUE -ARIA_RECOVER_OPTIONS NORMAL +ARIA_RECOVER_OPTIONS BACKUP,QUICK set global aria_recover_options=1; select @@global.aria_recover_options; @@global.aria_recover_options diff --git a/mysql-test/suite/sys_vars/r/binlog_annotate_row_events_basic.result b/mysql-test/suite/sys_vars/r/binlog_annotate_row_events_basic.result index 6fef4fc1d32..cfebfe905b1 100644 --- a/mysql-test/suite/sys_vars/r/binlog_annotate_row_events_basic.result +++ b/mysql-test/suite/sys_vars/r/binlog_annotate_row_events_basic.result @@ -1,22 +1,22 @@ SET @start_global_value = @@global.binlog_annotate_row_events; select @@global.binlog_annotate_row_events; @@global.binlog_annotate_row_events -0 +1 select @@session.binlog_annotate_row_events; @@session.binlog_annotate_row_events -0 +1 show global variables like 'binlog_annotate_row_events'; Variable_name Value -binlog_annotate_row_events OFF +binlog_annotate_row_events ON show session variables like 'binlog_annotate_row_events'; Variable_name Value -binlog_annotate_row_events OFF +binlog_annotate_row_events ON select * from information_schema.global_variables where variable_name='binlog_annotate_row_events'; VARIABLE_NAME VARIABLE_VALUE -BINLOG_ANNOTATE_ROW_EVENTS OFF +BINLOG_ANNOTATE_ROW_EVENTS ON select * from information_schema.session_variables where variable_name='binlog_annotate_row_events'; VARIABLE_NAME VARIABLE_VALUE -BINLOG_ANNOTATE_ROW_EVENTS OFF +BINLOG_ANNOTATE_ROW_EVENTS ON set global binlog_annotate_row_events=ON; select @@global.binlog_annotate_row_events; @@global.binlog_annotate_row_events diff --git a/mysql-test/suite/sys_vars/r/binlog_format_basic.result b/mysql-test/suite/sys_vars/r/binlog_format_basic.result index 0d76d9686e3..a14fb505e6d 100644 --- a/mysql-test/suite/sys_vars/r/binlog_format_basic.result +++ b/mysql-test/suite/sys_vars/r/binlog_format_basic.result @@ -1,6 +1,6 @@ SELECT @@GLOBAL.binlog_format; @@GLOBAL.binlog_format -STATEMENT +MIXED '#---------------------BS_STVARS_002_01----------------------#' SET @start_value= @@global.binlog_format; SELECT COUNT(@@GLOBAL.binlog_format); diff --git a/mysql-test/suite/sys_vars/r/group_concat_max_len_basic.result b/mysql-test/suite/sys_vars/r/group_concat_max_len_basic.result index 48126d33ee8..fa1cc5554b0 100644 --- a/mysql-test/suite/sys_vars/r/group_concat_max_len_basic.result +++ b/mysql-test/suite/sys_vars/r/group_concat_max_len_basic.result @@ -1,22 +1,22 @@ SET @start_global_value = @@global.group_concat_max_len; SELECT @start_global_value; @start_global_value -1024 +1048576 SET @start_session_value = @@session.group_concat_max_len; SELECT @start_session_value; @start_session_value -1024 +1048576 '#--------------------FN_DYNVARS_034_01-------------------------#' SET @@global.group_concat_max_len = 100; SET @@global.group_concat_max_len = DEFAULT; SELECT @@global.group_concat_max_len; @@global.group_concat_max_len -1024 +1048576 SET @@session.group_concat_max_len = 200; SET @@session.group_concat_max_len = DEFAULT; SELECT @@session.group_concat_max_len; @@session.group_concat_max_len -1024 +1048576 '#--------------------FN_DYNVARS_034_02-------------------------#' SET @@global.group_concat_max_len = DEFAULT; SELECT @@global.group_concat_max_len = 1; @@ -160,8 +160,8 @@ ERROR 42S22: Unknown column 'group_concat_max_len' in 'field list' SET @@global.group_concat_max_len = @start_global_value; SELECT @@global.group_concat_max_len; @@global.group_concat_max_len -1024 +1048576 SET @@session.group_concat_max_len = @start_session_value; SELECT @@session.group_concat_max_len; @@session.group_concat_max_len -1024 +1048576 diff --git a/mysql-test/suite/sys_vars/r/innodb_api_bk_commit_interval_basic.result b/mysql-test/suite/sys_vars/r/innodb_api_bk_commit_interval_basic.result deleted file mode 100644 index 0bc17e10b06..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_api_bk_commit_interval_basic.result +++ /dev/null @@ -1,100 +0,0 @@ -SET @start_global_value = @@global.innodb_api_bk_commit_interval; -SELECT @start_global_value; -@start_global_value -5 -Valid values are positive number -SELECT @@global.innodb_api_bk_commit_interval > 0; -@@global.innodb_api_bk_commit_interval > 0 -1 -SELECT @@global.innodb_api_bk_commit_interval <= 1024*1024*1024; -@@global.innodb_api_bk_commit_interval <= 1024*1024*1024 -1 -SELECT @@global.innodb_api_bk_commit_interval; -@@global.innodb_api_bk_commit_interval -5 -SELECT @@session.innodb_api_bk_commit_interval; -ERROR HY000: Variable 'innodb_api_bk_commit_interval' is a GLOBAL variable -SHOW global variables LIKE 'innodb_api_bk_commit_interval'; -Variable_name Value -innodb_api_bk_commit_interval 5 -SHOW session variables LIKE 'innodb_api_bk_commit_interval'; -Variable_name Value -innodb_api_bk_commit_interval 5 -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_api_bk_commit_interval'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_API_BK_COMMIT_INTERVAL 5 -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_api_bk_commit_interval'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_API_BK_COMMIT_INTERVAL 5 -SET global innodb_api_bk_commit_interval=100; -SELECT @@global.innodb_api_bk_commit_interval; -@@global.innodb_api_bk_commit_interval -100 -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_api_bk_commit_interval'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_API_BK_COMMIT_INTERVAL 100 -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_api_bk_commit_interval'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_API_BK_COMMIT_INTERVAL 100 -SET session innodb_api_bk_commit_interval=1; -ERROR HY000: Variable 'innodb_api_bk_commit_interval' is a GLOBAL variable and should be set with SET GLOBAL -SET global innodb_api_bk_commit_interval=1; -SELECT @@global.innodb_api_bk_commit_interval; -@@global.innodb_api_bk_commit_interval -1 -SET global innodb_api_bk_commit_interval=100000; -SELECT @@global.innodb_api_bk_commit_interval; -@@global.innodb_api_bk_commit_interval -100000 -SET global innodb_api_bk_commit_interval=1073741824; -SELECT @@global.innodb_api_bk_commit_interval; -@@global.innodb_api_bk_commit_interval -1073741824 -SET global innodb_api_bk_commit_interval=0; -Warnings: -Warning 1292 Truncated incorrect innodb_api_bk_commit_interval value: '0' -SELECT @@global.innodb_api_bk_commit_interval; -@@global.innodb_api_bk_commit_interval -1 -SET global innodb_api_bk_commit_interval=-1024; -Warnings: -Warning 1292 Truncated incorrect innodb_api_bk_commit_interval value: '-1024' -SELECT @@global.innodb_api_bk_commit_interval; -@@global.innodb_api_bk_commit_interval -1 -SET global innodb_api_bk_commit_interval=1073741825; -Warnings: -Warning 1292 Truncated incorrect innodb_api_bk_commit_interval value: '1073741825' -SELECT @@global.innodb_api_bk_commit_interval; -@@global.innodb_api_bk_commit_interval -1073741824 -SET global innodb_api_bk_commit_interval=4294967295; -Warnings: -Warning 1292 Truncated incorrect innodb_api_bk_commit_interval value: '4294967295' -SELECT @@global.innodb_api_bk_commit_interval; -@@global.innodb_api_bk_commit_interval -1073741824 -SET global innodb_api_bk_commit_interval=1.1; -ERROR 42000: Incorrect argument type to variable 'innodb_api_bk_commit_interval' -SET global innodb_api_bk_commit_interval=1e1; -ERROR 42000: Incorrect argument type to variable 'innodb_api_bk_commit_interval' -SET global innodb_api_bk_commit_interval="foo"; -ERROR 42000: Incorrect argument type to variable 'innodb_api_bk_commit_interval' -SET global innodb_api_bk_commit_interval=-7; -Warnings: -Warning 1292 Truncated incorrect innodb_api_bk_commit_interval value: '-7' -SELECT @@global.innodb_api_bk_commit_interval; -@@global.innodb_api_bk_commit_interval -1 -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_api_bk_commit_interval'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_API_BK_COMMIT_INTERVAL 1 -SET @@global.innodb_api_bk_commit_interval = @start_global_value; -SELECT @@global.innodb_api_bk_commit_interval; -@@global.innodb_api_bk_commit_interval -5 diff --git a/mysql-test/suite/sys_vars/r/innodb_api_disable_rowlock_basic.result b/mysql-test/suite/sys_vars/r/innodb_api_disable_rowlock_basic.result deleted file mode 100644 index 5256c1ece8a..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_api_disable_rowlock_basic.result +++ /dev/null @@ -1,53 +0,0 @@ -'#---------------------BS_STVARS_035_01----------------------#' -SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock); -COUNT(@@GLOBAL.innodb_api_disable_rowlock) -1 -1 Expected -'#---------------------BS_STVARS_035_02----------------------#' -SET @@GLOBAL.innodb_api_disable_rowlock=1; -ERROR HY000: Variable 'innodb_api_disable_rowlock' is a read only variable -Expected error 'Read only variable' -SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock); -COUNT(@@GLOBAL.innodb_api_disable_rowlock) -1 -1 Expected -'#---------------------BS_STVARS_035_03----------------------#' -SELECT IF(@@GLOBAL.innodb_api_disable_rowlock, 'ON', 'OFF') = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='innodb_api_disable_rowlock'; -IF(@@GLOBAL.innodb_api_disable_rowlock, 'ON', 'OFF') = VARIABLE_VALUE -1 -1 Expected -SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock); -COUNT(@@GLOBAL.innodb_api_disable_rowlock) -1 -1 Expected -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='innodb_api_disable_rowlock'; -COUNT(VARIABLE_VALUE) -1 -1 Expected -'#---------------------BS_STVARS_035_04----------------------#' -SELECT @@innodb_api_disable_rowlock = @@GLOBAL.innodb_api_enable_binlog; -@@innodb_api_disable_rowlock = @@GLOBAL.innodb_api_enable_binlog -1 -1 Expected -'#---------------------BS_STVARS_035_05----------------------#' -SELECT COUNT(@@innodb_api_disable_rowlock); -COUNT(@@innodb_api_disable_rowlock) -1 -1 Expected -SELECT COUNT(@@local.innodb_api_disable_rowlock); -ERROR HY000: Variable 'innodb_api_disable_rowlock' is a GLOBAL variable -Expected error 'Variable is a GLOBAL variable' -SELECT COUNT(@@SESSION.innodb_api_disable_rowlock); -ERROR HY000: Variable 'innodb_api_disable_rowlock' is a GLOBAL variable -Expected error 'Variable is a GLOBAL variable' -SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock); -COUNT(@@GLOBAL.innodb_api_disable_rowlock) -1 -1 Expected -SELECT innodb_api_disable_rowlock = @@SESSION.innodb_api_enable_binlog; -ERROR 42S22: Unknown column 'innodb_api_disable_rowlock' in 'field list' -Expected error 'Readonly variable' diff --git a/mysql-test/suite/sys_vars/r/innodb_api_enable_binlog_basic.result b/mysql-test/suite/sys_vars/r/innodb_api_enable_binlog_basic.result deleted file mode 100644 index f06fbeb8da7..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_api_enable_binlog_basic.result +++ /dev/null @@ -1,53 +0,0 @@ -'#---------------------BS_STVARS_035_01----------------------#' -SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog); -COUNT(@@GLOBAL.innodb_api_enable_binlog) -1 -1 Expected -'#---------------------BS_STVARS_035_02----------------------#' -SET @@GLOBAL.innodb_api_enable_binlog=1; -ERROR HY000: Variable 'innodb_api_enable_binlog' is a read only variable -Expected error 'Read only variable' -SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog); -COUNT(@@GLOBAL.innodb_api_enable_binlog) -1 -1 Expected -'#---------------------BS_STVARS_035_03----------------------#' -SELECT IF(@@GLOBAL.innodb_api_enable_binlog, 'ON', 'OFF') = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='innodb_api_enable_binlog'; -IF(@@GLOBAL.innodb_api_enable_binlog, 'ON', 'OFF') = VARIABLE_VALUE -1 -1 Expected -SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog); -COUNT(@@GLOBAL.innodb_api_enable_binlog) -1 -1 Expected -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='innodb_api_enable_binlog'; -COUNT(VARIABLE_VALUE) -1 -1 Expected -'#---------------------BS_STVARS_035_04----------------------#' -SELECT @@innodb_api_enable_binlog = @@GLOBAL.innodb_api_enable_binlog; -@@innodb_api_enable_binlog = @@GLOBAL.innodb_api_enable_binlog -1 -1 Expected -'#---------------------BS_STVARS_035_05----------------------#' -SELECT COUNT(@@innodb_api_enable_binlog); -COUNT(@@innodb_api_enable_binlog) -1 -1 Expected -SELECT COUNT(@@local.innodb_api_enable_binlog); -ERROR HY000: Variable 'innodb_api_enable_binlog' is a GLOBAL variable -Expected error 'Variable is a GLOBAL variable' -SELECT COUNT(@@SESSION.innodb_api_enable_binlog); -ERROR HY000: Variable 'innodb_api_enable_binlog' is a GLOBAL variable -Expected error 'Variable is a GLOBAL variable' -SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog); -COUNT(@@GLOBAL.innodb_api_enable_binlog) -1 -1 Expected -SELECT innodb_api_enable_binlog = @@SESSION.innodb_api_enable_binlog; -ERROR 42S22: Unknown column 'innodb_api_enable_binlog' in 'field list' -Expected error 'Readonly variable' diff --git a/mysql-test/suite/sys_vars/r/innodb_api_enable_mdl_basic.result b/mysql-test/suite/sys_vars/r/innodb_api_enable_mdl_basic.result deleted file mode 100644 index 4484b151396..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_api_enable_mdl_basic.result +++ /dev/null @@ -1,53 +0,0 @@ -'#---------------------BS_STVARS_035_01----------------------#' -SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl); -COUNT(@@GLOBAL.innodb_api_enable_mdl) -1 -1 Expected -'#---------------------BS_STVARS_035_02----------------------#' -SET @@GLOBAL.innodb_api_enable_mdl=1; -ERROR HY000: Variable 'innodb_api_enable_mdl' is a read only variable -Expected error 'Read only variable' -SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl); -COUNT(@@GLOBAL.innodb_api_enable_mdl) -1 -1 Expected -'#---------------------BS_STVARS_035_03----------------------#' -SELECT IF(@@GLOBAL.innodb_api_enable_mdl, 'ON', 'OFF') = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='innodb_api_enable_mdl'; -IF(@@GLOBAL.innodb_api_enable_mdl, 'ON', 'OFF') = VARIABLE_VALUE -1 -1 Expected -SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl); -COUNT(@@GLOBAL.innodb_api_enable_mdl) -1 -1 Expected -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='innodb_api_enable_mdl'; -COUNT(VARIABLE_VALUE) -1 -1 Expected -'#---------------------BS_STVARS_035_04----------------------#' -SELECT @@innodb_api_enable_mdl = @@GLOBAL.innodb_api_enable_mdl; -@@innodb_api_enable_mdl = @@GLOBAL.innodb_api_enable_mdl -1 -1 Expected -'#---------------------BS_STVARS_035_05----------------------#' -SELECT COUNT(@@innodb_api_enable_mdl); -COUNT(@@innodb_api_enable_mdl) -1 -1 Expected -SELECT COUNT(@@local.innodb_api_enable_mdl); -ERROR HY000: Variable 'innodb_api_enable_mdl' is a GLOBAL variable -Expected error 'Variable is a GLOBAL variable' -SELECT COUNT(@@SESSION.innodb_api_enable_mdl); -ERROR HY000: Variable 'innodb_api_enable_mdl' is a GLOBAL variable -Expected error 'Variable is a GLOBAL variable' -SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl); -COUNT(@@GLOBAL.innodb_api_enable_mdl) -1 -1 Expected -SELECT innodb_api_enable_mdl = @@SESSION.innodb_api_enable_mdl; -ERROR 42S22: Unknown column 'innodb_api_enable_mdl' in 'field list' -Expected error 'Readonly variable' diff --git a/mysql-test/suite/sys_vars/r/innodb_api_trx_level_basic.result b/mysql-test/suite/sys_vars/r/innodb_api_trx_level_basic.result deleted file mode 100644 index 41071799883..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_api_trx_level_basic.result +++ /dev/null @@ -1,66 +0,0 @@ -SET @start_global_value = @@global.innodb_api_trx_level; -SELECT @start_global_value; -@start_global_value -0 -Valid values are zero or above -SELECT @@global.innodb_api_trx_level >=0; -@@global.innodb_api_trx_level >=0 -1 -SELECT @@global.innodb_api_trx_level <=3; -@@global.innodb_api_trx_level <=3 -1 -SELECT @@global.innodb_api_trx_level; -@@global.innodb_api_trx_level -0 -SELECT @@session.innodb_api_trx_level; -ERROR HY000: Variable 'innodb_api_trx_level' is a GLOBAL variable -SHOW global variables LIKE 'innodb_api_trx_level'; -Variable_name Value -innodb_api_trx_level 0 -SHOW session variables LIKE 'innodb_api_trx_level'; -Variable_name Value -innodb_api_trx_level 0 -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_api_trx_level'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_API_TRX_LEVEL 0 -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_api_trx_level'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_API_TRX_LEVEL 0 -SET global innodb_api_trx_level=100; -Warnings: -Warning 1292 Truncated incorrect innodb_api_trx_level value: '100' -SELECT @@global.innodb_api_trx_level; -@@global.innodb_api_trx_level -3 -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_api_trx_level'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_API_TRX_LEVEL 3 -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_api_trx_level'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_API_TRX_LEVEL 3 -SET session innodb_api_trx_level=1; -ERROR HY000: Variable 'innodb_api_trx_level' is a GLOBAL variable and should be set with SET GLOBAL -SET global innodb_api_trx_level=1.1; -ERROR 42000: Incorrect argument type to variable 'innodb_api_trx_level' -SET global innodb_api_trx_level=1e1; -ERROR 42000: Incorrect argument type to variable 'innodb_api_trx_level' -SET global innodb_api_trx_level="foo"; -ERROR 42000: Incorrect argument type to variable 'innodb_api_trx_level' -SET global innodb_api_trx_level=-7; -Warnings: -Warning 1292 Truncated incorrect innodb_api_trx_level value: '-7' -SELECT @@global.innodb_api_trx_level; -@@global.innodb_api_trx_level -0 -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_api_trx_level'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_API_TRX_LEVEL 0 -SET @@global.innodb_api_trx_level = @start_global_value; -SELECT @@global.innodb_api_trx_level; -@@global.innodb_api_trx_level -0 diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_function.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_function.result new file mode 100644 index 00000000000..6037d7a5343 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_function.result @@ -0,0 +1,54 @@ +# populate with data +CREATE TABLE t1 ( +c01 blob, c02 blob, c03 blob, c04 blob, c05 blob, +c06 blob, c07 blob, c08 blob, c09 blob, c10 blob, +c11 blob, c12 blob, c13 blob, c14 blob, c15 blob, +c16 blob, c17 blob, c18 blob, c19 blob, c20 blob, +c21 blob, c22 blob, c23 blob, c24 blob, c25 blob, +c26 blob, c27 blob, c28 blob, c29 blob, c30 blob, +c31 blob, c32 blob, c33 blob, c34 blob, c35 blob, +c36 blob, c37 blob, c38 blob, c39 blob, c40 blob, +c41 blob, c42 blob, c43 blob, c44 blob, c45 blob, +c46 blob, c47 blob, c48 blob, c49 blob, c50 blob, +c51 blob, c52 blob, c53 blob, c54 blob, c55 blob, +c56 blob, c57 blob, c58 blob, c59 blob, c60 blob, +c61 blob, c62 blob, c63 blob, c64 blob +) ROW_FORMAT=dynamic; +SET @a = repeat('a', 16 * 1024); +INSERT INTO t1 VALUES (@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a +); +insert into t1 select * from t1; +SET GLOBAL innodb_buffer_pool_dump_pct=25,GLOBAL innodb_fast_shutdown=0, GLOBAL innodb_buffer_pool_dump_at_shutdown=1; +# Restart server +SET GLOBAL innodb_buffer_pool_load_now=1; +# Case 1: Limit from innodb_buffer_pool_dump_pct +SELECT 256 as 'Previous pool pages', +ROUND(25 / 100 * @@innodb_buffer_pool_size / @@innodb_page_size) as 'Limit', +128 as 'Pages saved'; +Previous pool pages Limit Pages saved +256 128 128 +# Case 2: blog_pages is the minimum. +# load buffer pool with entire table. +select * from t1; +SET GLOBAL innodb_buffer_pool_dump_pct=75, global innodb_buffer_pool_dump_at_shutdown=1; +# Restart server +SET GLOBAL innodb_buffer_pool_load_now=1; +# now loaded +SELECT 256 as 'Previous pool pages', +ROUND(75 / 100 * @@innodb_buffer_pool_size / @@innodb_page_size) as 'Limit', +256 as 'Pages saved'; +Previous pool pages Limit Pages saved +256 384 256 +DROP TABLE t1; diff --git a/mysql-test/suite/sys_vars/r/innodb_force_recovery_crash_basic.result b/mysql-test/suite/sys_vars/r/innodb_force_recovery_crash_basic.result deleted file mode 100644 index 5af00f21c74..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_force_recovery_crash_basic.result +++ /dev/null @@ -1,33 +0,0 @@ -select @@global.innodb_force_recovery_crash in (0, 1); -@@global.innodb_force_recovery_crash in (0, 1) -1 -select @@global.innodb_force_recovery_crash; -@@global.innodb_force_recovery_crash -0 -select @@session.innodb_force_recovery_crash; -ERROR HY000: Variable 'innodb_force_recovery_crash' is a GLOBAL variable -show global variables like 'innodb_force_recovery_crash'; -Variable_name Value -innodb_force_recovery_crash 0 -show session variables like 'innodb_force_recovery_crash'; -Variable_name Value -innodb_force_recovery_crash 0 -select * from information_schema.global_variables where variable_name='innodb_force_recovery_crash'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_FORCE_RECOVERY_CRASH 0 -select * from information_schema.session_variables where variable_name='innodb_force_recovery_crash'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_FORCE_RECOVERY_CRASH 0 -set global innodb_force_recovery_crash=1; -ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable -set global innodb_force_recovery_crash=0; -ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable -select @@global.innodb_force_recovery_crash; -@@global.innodb_force_recovery_crash -0 -set session innodb_force_recovery_crash='some'; -ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable -set @@session.innodb_force_recovery_crash='some'; -ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable -set global innodb_force_recovery_crash='some'; -ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable diff --git a/mysql-test/suite/sys_vars/r/innodb_instrument_semaphores.result b/mysql-test/suite/sys_vars/r/innodb_instrument_semaphores.result deleted file mode 100644 index dc8fba41e0b..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_instrument_semaphores.result +++ /dev/null @@ -1,45 +0,0 @@ -# -# innodb_instrument_semaphores -# -# save the initial value -SET @innodb_instrument_semaphores_global_saved = @@global.innodb_instrument_semaphores; -# default -SELECT @@global.innodb_instrument_semaphores; -@@global.innodb_instrument_semaphores -0 - -# scope -SELECT @@session.innodb_instrument_semaphores; -ERROR HY000: Variable 'innodb_instrument_semaphores' is a GLOBAL variable -SET @@global.innodb_instrument_semaphores=OFF; -SELECT @@global.innodb_instrument_semaphores; -@@global.innodb_instrument_semaphores -0 -SET @@global.innodb_instrument_semaphores=ON; -SELECT @@global.innodb_instrument_semaphores; -@@global.innodb_instrument_semaphores -1 - -# valid values -SET @@global.innodb_instrument_semaphores='OFF'; -SELECT @@global.innodb_instrument_semaphores; -@@global.innodb_instrument_semaphores -0 -SET @@global.innodb_instrument_semaphores=ON; -SELECT @@global.innodb_instrument_semaphores; -@@global.innodb_instrument_semaphores -1 -SET @@global.innodb_instrument_semaphores=default; -SELECT @@global.innodb_instrument_semaphores; -@@global.innodb_instrument_semaphores -0 - -# invalid values -SET @@global.innodb_instrument_semaphores=NULL; -ERROR 42000: Variable 'innodb_instrument_semaphores' can't be set to the value of 'NULL' -SET @@global.innodb_instrument_semaphores='junk'; -ERROR 42000: Variable 'innodb_instrument_semaphores' can't be set to the value of 'junk' - -# restore the initial value -SET @@global.innodb_instrument_semaphores = @innodb_instrument_semaphores_global_saved; -# End of test diff --git a/mysql-test/suite/sys_vars/r/innodb_instrument_semaphores_basic.result b/mysql-test/suite/sys_vars/r/innodb_instrument_semaphores_basic.result index dc8fba41e0b..561ddeb5a84 100644 --- a/mysql-test/suite/sys_vars/r/innodb_instrument_semaphores_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_instrument_semaphores_basic.result @@ -12,24 +12,34 @@ SELECT @@global.innodb_instrument_semaphores; SELECT @@session.innodb_instrument_semaphores; ERROR HY000: Variable 'innodb_instrument_semaphores' is a GLOBAL variable SET @@global.innodb_instrument_semaphores=OFF; +Warnings: +Warning 131 Using innodb_instrument_semaphores is deprecated and the parameter will be removed in MariaDB 10.3. SELECT @@global.innodb_instrument_semaphores; @@global.innodb_instrument_semaphores 0 SET @@global.innodb_instrument_semaphores=ON; +Warnings: +Warning 131 Using innodb_instrument_semaphores is deprecated and the parameter will be removed in MariaDB 10.3. SELECT @@global.innodb_instrument_semaphores; @@global.innodb_instrument_semaphores 1 # valid values SET @@global.innodb_instrument_semaphores='OFF'; +Warnings: +Warning 131 Using innodb_instrument_semaphores is deprecated and the parameter will be removed in MariaDB 10.3. SELECT @@global.innodb_instrument_semaphores; @@global.innodb_instrument_semaphores 0 SET @@global.innodb_instrument_semaphores=ON; +Warnings: +Warning 131 Using innodb_instrument_semaphores is deprecated and the parameter will be removed in MariaDB 10.3. SELECT @@global.innodb_instrument_semaphores; @@global.innodb_instrument_semaphores 1 SET @@global.innodb_instrument_semaphores=default; +Warnings: +Warning 131 Using innodb_instrument_semaphores is deprecated and the parameter will be removed in MariaDB 10.3. SELECT @@global.innodb_instrument_semaphores; @@global.innodb_instrument_semaphores 0 @@ -42,4 +52,6 @@ ERROR 42000: Variable 'innodb_instrument_semaphores' can't be set to the value o # restore the initial value SET @@global.innodb_instrument_semaphores = @innodb_instrument_semaphores_global_saved; +Warnings: +Warning 131 Using innodb_instrument_semaphores is deprecated and the parameter will be removed in MariaDB 10.3. # End of test diff --git a/mysql-test/suite/sys_vars/r/innodb_log_compressed_pages_basic.result b/mysql-test/suite/sys_vars/r/innodb_log_compressed_pages_basic.result index 3b1ad38fd31..8cb8d900b59 100644 --- a/mysql-test/suite/sys_vars/r/innodb_log_compressed_pages_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_log_compressed_pages_basic.result @@ -1,7 +1,7 @@ SET @start_global_value = @@global.innodb_log_compressed_pages; SELECT @start_global_value; @start_global_value -0 +1 '#---------------------BS_STVARS_028_01----------------------#' SELECT COUNT(@@GLOBAL.innodb_log_compressed_pages); COUNT(@@GLOBAL.innodb_log_compressed_pages) @@ -66,4 +66,4 @@ ERROR 42S22: Unknown column 'innodb_log_compressed_pages' in 'field list' SET @@global.innodb_log_compressed_pages = @start_global_value; SELECT @@global.innodb_log_compressed_pages; @@global.innodb_log_compressed_pages -0 +1 diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result deleted file mode 100644 index 2a66a0d0931..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result +++ /dev/null @@ -1,624 +0,0 @@ -set global innodb_monitor_disable = All; -select name, status from information_schema.innodb_metrics; -name status -metadata_table_handles_opened disabled -metadata_table_handles_closed disabled -metadata_table_reference_count disabled -lock_deadlocks disabled -lock_timeouts disabled -lock_rec_lock_waits disabled -lock_table_lock_waits disabled -lock_rec_lock_requests disabled -lock_rec_lock_created disabled -lock_rec_lock_removed disabled -lock_rec_locks disabled -lock_table_lock_created disabled -lock_table_lock_removed disabled -lock_table_locks disabled -lock_row_lock_current_waits disabled -lock_row_lock_time disabled -lock_row_lock_time_max disabled -lock_row_lock_waits disabled -lock_row_lock_time_avg disabled -buffer_pool_size disabled -buffer_pool_reads disabled -buffer_pool_read_requests disabled -buffer_pool_write_requests disabled -buffer_pool_wait_free disabled -buffer_pool_read_ahead disabled -buffer_pool_read_ahead_evicted disabled -buffer_pool_pages_total disabled -buffer_pool_pages_misc disabled -buffer_pool_pages_data disabled -buffer_pool_bytes_data disabled -buffer_pool_pages_dirty disabled -buffer_pool_bytes_dirty disabled -buffer_pool_pages_free disabled -buffer_pages_created disabled -buffer_pages_written disabled -buffer_index_pages_written disabled -buffer_non_index_pages_written disabled -buffer_pages_read disabled -buffer_pages0_read disabled -buffer_index_sec_rec_cluster_reads disabled -buffer_index_sec_rec_cluster_reads_avoided disabled -buffer_data_reads disabled -buffer_data_written disabled -buffer_flush_batch_scanned disabled -buffer_flush_batch_num_scan disabled -buffer_flush_batch_scanned_per_call disabled -buffer_flush_batch_total_pages disabled -buffer_flush_batches disabled -buffer_flush_batch_pages disabled -buffer_flush_neighbor_total_pages disabled -buffer_flush_neighbor disabled -buffer_flush_neighbor_pages disabled -buffer_flush_n_to_flush_requested disabled -buffer_flush_n_to_flush_by_age disabled -buffer_flush_adaptive_avg_time_slot disabled -buffer_LRU_batch_flush_avg_time_slot disabled -buffer_flush_adaptive_avg_time_thread disabled -buffer_LRU_batch_flush_avg_time_thread disabled -buffer_flush_adaptive_avg_time_est disabled -buffer_LRU_batch_flush_avg_time_est disabled -buffer_flush_avg_time disabled -buffer_flush_adaptive_avg_pass disabled -buffer_LRU_batch_flush_avg_pass disabled -buffer_flush_avg_pass disabled -buffer_LRU_get_free_loops disabled -buffer_LRU_get_free_waits disabled -buffer_flush_avg_page_rate disabled -buffer_flush_lsn_avg_rate disabled -buffer_flush_pct_for_dirty disabled -buffer_flush_pct_for_lsn disabled -buffer_flush_sync_waits disabled -buffer_flush_adaptive_total_pages disabled -buffer_flush_adaptive disabled -buffer_flush_adaptive_pages disabled -buffer_flush_sync_total_pages disabled -buffer_flush_sync disabled -buffer_flush_sync_pages disabled -buffer_flush_background_total_pages disabled -buffer_flush_background disabled -buffer_flush_background_pages disabled -buffer_LRU_batch_scanned disabled -buffer_LRU_batch_num_scan disabled -buffer_LRU_batch_scanned_per_call disabled -buffer_LRU_batch_flush_total_pages disabled -buffer_LRU_batches_flush disabled -buffer_LRU_batch_flush_pages disabled -buffer_LRU_batch_evict_total_pages disabled -buffer_LRU_batches_evict disabled -buffer_LRU_batch_evict_pages disabled -buffer_LRU_single_flush_scanned disabled -buffer_LRU_single_flush_num_scan disabled -buffer_LRU_single_flush_scanned_per_call disabled -buffer_LRU_single_flush_failure_count disabled -buffer_LRU_get_free_search disabled -buffer_LRU_search_scanned disabled -buffer_LRU_search_num_scan disabled -buffer_LRU_search_scanned_per_call disabled -buffer_LRU_unzip_search_scanned disabled -buffer_LRU_unzip_search_num_scan disabled -buffer_LRU_unzip_search_scanned_per_call disabled -buffer_page_read_index_leaf disabled -buffer_page_read_index_non_leaf disabled -buffer_page_read_index_ibuf_leaf disabled -buffer_page_read_index_ibuf_non_leaf disabled -buffer_page_read_undo_log disabled -buffer_page_read_index_inode disabled -buffer_page_read_ibuf_free_list disabled -buffer_page_read_ibuf_bitmap disabled -buffer_page_read_system_page disabled -buffer_page_read_trx_system disabled -buffer_page_read_fsp_hdr disabled -buffer_page_read_xdes disabled -buffer_page_read_blob disabled -buffer_page_read_zblob disabled -buffer_page_read_zblob2 disabled -buffer_page_read_other disabled -buffer_page_written_index_leaf disabled -buffer_page_written_index_non_leaf disabled -buffer_page_written_index_ibuf_leaf disabled -buffer_page_written_index_ibuf_non_leaf disabled -buffer_page_written_undo_log disabled -buffer_page_written_index_inode disabled -buffer_page_written_ibuf_free_list disabled -buffer_page_written_ibuf_bitmap disabled -buffer_page_written_system_page disabled -buffer_page_written_trx_system disabled -buffer_page_written_fsp_hdr disabled -buffer_page_written_xdes disabled -buffer_page_written_blob disabled -buffer_page_written_zblob disabled -buffer_page_written_zblob2 disabled -buffer_page_written_other disabled -os_data_reads disabled -os_data_writes disabled -os_data_fsyncs disabled -os_pending_reads disabled -os_pending_writes disabled -os_log_bytes_written disabled -os_log_fsyncs disabled -os_log_pending_fsyncs disabled -os_log_pending_writes disabled -trx_rw_commits disabled -trx_ro_commits disabled -trx_nl_ro_commits disabled -trx_commits_insert_update disabled -trx_rollbacks disabled -trx_rollbacks_savepoint disabled -trx_rollback_active disabled -trx_active_transactions disabled -trx_rseg_history_len disabled -trx_undo_slots_used disabled -trx_undo_slots_cached disabled -trx_rseg_current_size disabled -purge_del_mark_records disabled -purge_upd_exist_or_extern_records disabled -purge_invoked disabled -purge_undo_log_pages disabled -purge_dml_delay_usec disabled -purge_stop_count disabled -purge_resume_count disabled -log_checkpoints disabled -log_lsn_last_flush disabled -log_lsn_last_checkpoint disabled -log_lsn_current disabled -log_lsn_checkpoint_age disabled -log_lsn_buf_pool_oldest disabled -log_max_modified_age_async disabled -log_max_modified_age_sync disabled -log_pending_log_flushes disabled -log_pending_checkpoint_writes disabled -log_num_log_io disabled -log_waits disabled -log_write_requests disabled -log_writes disabled -log_padded disabled -compress_pages_compressed disabled -compress_pages_decompressed disabled -compression_pad_increments disabled -compression_pad_decrements disabled -compress_saved disabled -compress_trim_sect512 disabled -compress_trim_sect1024 disabled -compress_trim_sect2048 disabled -compress_trim_sect4096 disabled -compress_trim_sect8192 disabled -compress_trim_sect16384 disabled -compress_trim_sect32768 disabled -compress_pages_page_compressed disabled -compress_page_compressed_trim_op disabled -compress_page_compressed_trim_op_saved disabled -compress_pages_page_decompressed disabled -compress_pages_page_compression_error disabled -compress_pages_encrypted disabled -compress_pages_decrypted disabled -index_page_splits disabled -index_page_merge_attempts disabled -index_page_merge_successful disabled -index_page_reorg_attempts disabled -index_page_reorg_successful disabled -index_page_discards disabled -adaptive_hash_searches disabled -adaptive_hash_searches_btree disabled -adaptive_hash_pages_added disabled -adaptive_hash_pages_removed disabled -adaptive_hash_rows_added disabled -adaptive_hash_rows_removed disabled -adaptive_hash_rows_deleted_no_hash_entry disabled -adaptive_hash_rows_updated disabled -file_num_open_files disabled -ibuf_merges_insert disabled -ibuf_merges_delete_mark disabled -ibuf_merges_delete disabled -ibuf_merges_discard_insert disabled -ibuf_merges_discard_delete_mark disabled -ibuf_merges_discard_delete disabled -ibuf_merges disabled -ibuf_size disabled -innodb_master_thread_sleeps disabled -innodb_activity_count disabled -innodb_master_active_loops disabled -innodb_master_idle_loops disabled -innodb_background_drop_table_usec disabled -innodb_ibuf_merge_usec disabled -innodb_log_flush_usec disabled -innodb_mem_validate_usec disabled -innodb_master_purge_usec disabled -innodb_dict_lru_usec disabled -innodb_dict_lru_count_active disabled -innodb_dict_lru_count_idle disabled -innodb_checkpoint_usec disabled -innodb_dblwr_writes disabled -innodb_dblwr_pages_written disabled -innodb_page_size disabled -innodb_rwlock_s_spin_waits disabled -innodb_rwlock_x_spin_waits disabled -innodb_rwlock_sx_spin_waits disabled -innodb_rwlock_s_spin_rounds disabled -innodb_rwlock_x_spin_rounds disabled -innodb_rwlock_sx_spin_rounds disabled -innodb_rwlock_s_os_waits disabled -innodb_rwlock_x_os_waits disabled -innodb_rwlock_sx_os_waits disabled -dml_reads disabled -dml_inserts disabled -dml_deletes disabled -dml_updates disabled -dml_system_reads disabled -dml_system_inserts disabled -dml_system_deletes disabled -dml_system_updates disabled -ddl_background_drop_indexes disabled -ddl_background_drop_tables disabled -ddl_online_create_index disabled -ddl_pending_alter_table disabled -ddl_sort_file_alter_table disabled -ddl_log_file_alter_table disabled -icp_attempts disabled -icp_no_match disabled -icp_out_of_range disabled -icp_match disabled -set global innodb_monitor_enable = all; -select name from information_schema.innodb_metrics where status!='enabled'; -name -set global innodb_monitor_enable = aaa; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of 'aaa' -set global innodb_monitor_disable = All; -select name from information_schema.innodb_metrics where status!='disabled'; -name -set global innodb_monitor_reset_all = all; -select name from information_schema.innodb_metrics where count!=0; -name -set global innodb_monitor_enable = "%lock%"; -select name from information_schema.innodb_metrics -where status != IF(name like "%lock%", 'enabled', 'disabled'); -name -set global innodb_monitor_disable = "%lock%"; -select name, status from information_schema.innodb_metrics -where name like "%lock%"; -name status -lock_deadlocks disabled -lock_timeouts disabled -lock_rec_lock_waits disabled -lock_table_lock_waits disabled -lock_rec_lock_requests disabled -lock_rec_lock_created disabled -lock_rec_lock_removed disabled -lock_rec_locks disabled -lock_table_lock_created disabled -lock_table_lock_removed disabled -lock_table_locks disabled -lock_row_lock_current_waits disabled -lock_row_lock_time disabled -lock_row_lock_time_max disabled -lock_row_lock_waits disabled -lock_row_lock_time_avg disabled -innodb_rwlock_s_spin_waits disabled -innodb_rwlock_x_spin_waits disabled -innodb_rwlock_sx_spin_waits disabled -innodb_rwlock_s_spin_rounds disabled -innodb_rwlock_x_spin_rounds disabled -innodb_rwlock_sx_spin_rounds disabled -innodb_rwlock_s_os_waits disabled -innodb_rwlock_x_os_waits disabled -innodb_rwlock_sx_os_waits disabled -set global innodb_monitor_enable = "%lock*"; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '%lock*' -set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%"; -select name from information_schema.innodb_metrics where status!='enabled'; -name -set global innodb_monitor_disable="%%%%%"; -select name from information_schema.innodb_metrics where status!='disabled'; -name -set global innodb_monitor_enable="%"; -select name from information_schema.innodb_metrics where status!='enabled'; -name -set global innodb_monitor_disable="%_%"; -select name from information_schema.innodb_metrics where status!='disabled'; -name -set global innodb_monitor_enable="log%%%%"; -select name from information_schema.innodb_metrics -where status != IF(name like "log%", 'enabled', 'disabled'); -name -set global innodb_monitor_enable="os_%a_fs_ncs"; -set global innodb_monitor_enable="os%pending%"; -select name, status from information_schema.innodb_metrics -where name like "os%"; -name status -os_data_reads disabled -os_data_writes disabled -os_data_fsyncs enabled -os_pending_reads enabled -os_pending_writes enabled -os_log_bytes_written disabled -os_log_fsyncs disabled -os_log_pending_fsyncs enabled -os_log_pending_writes enabled -set global innodb_monitor_enable=""; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '' -set global innodb_monitor_enable="_"; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '_' -SET global innodb_monitor_disable = module_metadata; -SET global innodb_monitor_reset_all = module_metadata; -set global innodb_monitor_enable = metadata_table_handles_opened; -create table monitor_test(col int) engine = innodb; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled -set global innodb_monitor_reset = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 1 NULL 1 NULL NULL 0 enabled -drop table monitor_test; -create table monitor_test(col int) engine = innodb; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 1 NULL 1 enabled -set global innodb_monitor_reset_all = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 1 NULL 1 enabled -set global innodb_monitor_disable = metadata_table_handles_opened; -set global innodb_monitor_reset = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled -drop table monitor_test; -create table monitor_test(col int) engine = innodb; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled -set global innodb_monitor_reset_all = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_enable = metadata_table_handles_opened; -drop table monitor_test; -create table monitor_test(col int) engine = innodb stats_persistent=0; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled -set global innodb_monitor_enable = metadata_table_handles_closed; -create index idx on monitor_test(col); -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_closed"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 2 NULL 2 enabled -metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled -metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_disable = module_metadata; -set global innodb_monitor_reset = module_metadata; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled -metadata_table_handles_closed 1 NULL 1 NULL NULL 0 disabled -metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_reset_all = module_metadata; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened NULL NULL 0 NULL NULL 0 disabled -metadata_table_handles_closed NULL NULL 0 NULL NULL 0 disabled -metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_enable = module_trx; -begin; -insert into monitor_test values(9); -commit; -begin; -insert into monitor_test values(9); -rollback; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "trx_rollbacks" or name like "trx_active_transactions"; -name max_count min_count count max_count_reset min_count_reset count_reset status -trx_rollbacks 1 NULL 1 1 NULL 1 enabled -trx_active_transactions 1 0 0 1 0 0 enabled -set global innodb_monitor_disable = module_trx; -set global innodb_monitor_enable = module_dml; -insert into monitor_test values(9); -update monitor_test set col = 10 where col = 9; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 4 NULL 4 4 NULL 4 enabled -dml_inserts 1 NULL 1 1 NULL 1 enabled -dml_deletes 0 NULL 0 0 NULL 0 enabled -dml_updates 2 NULL 2 2 NULL 2 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -delete from monitor_test; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 6 NULL 6 6 NULL 6 enabled -dml_inserts 1 NULL 1 1 NULL 1 enabled -dml_deletes 2 NULL 2 2 NULL 2 enabled -dml_updates 2 NULL 2 2 NULL 2 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -set global innodb_monitor_reset = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 6 NULL 6 0 NULL 0 enabled -dml_inserts 1 NULL 1 0 NULL 0 enabled -dml_deletes 2 NULL 2 0 NULL 0 enabled -dml_updates 2 NULL 2 0 NULL 0 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -insert into monitor_test values(9); -insert into monitor_test values(1); -delete from monitor_test; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 8 NULL 8 2 NULL 2 enabled -dml_inserts 3 NULL 3 2 NULL 2 enabled -dml_deletes 4 NULL 4 2 NULL 2 enabled -dml_updates 2 NULL 2 0 NULL 0 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -set global innodb_monitor_reset_all = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 8 NULL 8 2 NULL 2 enabled -dml_inserts 3 NULL 3 2 NULL 2 enabled -dml_deletes 4 NULL 4 2 NULL 2 enabled -dml_updates 2 NULL 2 0 NULL 0 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -set global innodb_monitor_disable = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 8 NULL 8 2 NULL 2 disabled -dml_inserts 3 NULL 3 2 NULL 2 disabled -dml_deletes 4 NULL 4 2 NULL 2 disabled -dml_updates 2 NULL 2 0 NULL 0 disabled -dml_system_reads 0 NULL 0 0 NULL 0 disabled -dml_system_inserts 0 NULL 0 0 NULL 0 disabled -dml_system_deletes 0 NULL 0 0 NULL 0 disabled -dml_system_updates 0 NULL 0 0 NULL 0 disabled -set global innodb_monitor_reset_all = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads NULL NULL 0 NULL NULL 0 disabled -dml_inserts NULL NULL 0 NULL NULL 0 disabled -dml_deletes NULL NULL 0 NULL NULL 0 disabled -dml_updates NULL NULL 0 NULL NULL 0 disabled -dml_system_reads NULL NULL 0 NULL NULL 0 disabled -dml_system_inserts NULL NULL 0 NULL NULL 0 disabled -dml_system_deletes NULL NULL 0 NULL NULL 0 disabled -dml_system_updates NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_enable = dml_inserts; -insert into monitor_test values(9); -insert into monitor_test values(1); -delete from monitor_test; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads NULL NULL 0 NULL NULL 0 disabled -dml_inserts 2 NULL 2 2 NULL 2 enabled -dml_deletes NULL NULL 0 NULL NULL 0 disabled -dml_updates NULL NULL 0 NULL NULL 0 disabled -dml_system_reads NULL NULL 0 NULL NULL 0 disabled -dml_system_inserts NULL NULL 0 NULL NULL 0 disabled -dml_system_deletes NULL NULL 0 NULL NULL 0 disabled -dml_system_updates NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_disable = module_dml; -drop table monitor_test; -set global innodb_monitor_enable = file_num_open_files; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "file_num_open_files"; -name max_count min_count count max_count_reset min_count_reset count_reset status -file_num_open_files # # # # # # enabled -set global innodb_monitor_disable = file_num_open_files; -set global innodb_monitor_enable = "icp%"; -create table monitor_test(a char(3), b int, c char(2), -primary key (a(1), c(1)), key(b)) engine = innodb; -insert into monitor_test values("13", 2, "aa"); -select a from monitor_test where b < 1 for update; -a -select name, count from information_schema.innodb_metrics -where name like "icp%"; -name count -icp_attempts 1 -icp_no_match 0 -icp_out_of_range 1 -icp_match 0 -select a from monitor_test where b < 3 for update; -a -13 -select name, count from information_schema.innodb_metrics -where name like "icp%"; -name count -icp_attempts 2 -icp_no_match 0 -icp_out_of_range 1 -icp_match 1 -drop table monitor_test; -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; diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result deleted file mode 100644 index 2a66a0d0931..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result +++ /dev/null @@ -1,624 +0,0 @@ -set global innodb_monitor_disable = All; -select name, status from information_schema.innodb_metrics; -name status -metadata_table_handles_opened disabled -metadata_table_handles_closed disabled -metadata_table_reference_count disabled -lock_deadlocks disabled -lock_timeouts disabled -lock_rec_lock_waits disabled -lock_table_lock_waits disabled -lock_rec_lock_requests disabled -lock_rec_lock_created disabled -lock_rec_lock_removed disabled -lock_rec_locks disabled -lock_table_lock_created disabled -lock_table_lock_removed disabled -lock_table_locks disabled -lock_row_lock_current_waits disabled -lock_row_lock_time disabled -lock_row_lock_time_max disabled -lock_row_lock_waits disabled -lock_row_lock_time_avg disabled -buffer_pool_size disabled -buffer_pool_reads disabled -buffer_pool_read_requests disabled -buffer_pool_write_requests disabled -buffer_pool_wait_free disabled -buffer_pool_read_ahead disabled -buffer_pool_read_ahead_evicted disabled -buffer_pool_pages_total disabled -buffer_pool_pages_misc disabled -buffer_pool_pages_data disabled -buffer_pool_bytes_data disabled -buffer_pool_pages_dirty disabled -buffer_pool_bytes_dirty disabled -buffer_pool_pages_free disabled -buffer_pages_created disabled -buffer_pages_written disabled -buffer_index_pages_written disabled -buffer_non_index_pages_written disabled -buffer_pages_read disabled -buffer_pages0_read disabled -buffer_index_sec_rec_cluster_reads disabled -buffer_index_sec_rec_cluster_reads_avoided disabled -buffer_data_reads disabled -buffer_data_written disabled -buffer_flush_batch_scanned disabled -buffer_flush_batch_num_scan disabled -buffer_flush_batch_scanned_per_call disabled -buffer_flush_batch_total_pages disabled -buffer_flush_batches disabled -buffer_flush_batch_pages disabled -buffer_flush_neighbor_total_pages disabled -buffer_flush_neighbor disabled -buffer_flush_neighbor_pages disabled -buffer_flush_n_to_flush_requested disabled -buffer_flush_n_to_flush_by_age disabled -buffer_flush_adaptive_avg_time_slot disabled -buffer_LRU_batch_flush_avg_time_slot disabled -buffer_flush_adaptive_avg_time_thread disabled -buffer_LRU_batch_flush_avg_time_thread disabled -buffer_flush_adaptive_avg_time_est disabled -buffer_LRU_batch_flush_avg_time_est disabled -buffer_flush_avg_time disabled -buffer_flush_adaptive_avg_pass disabled -buffer_LRU_batch_flush_avg_pass disabled -buffer_flush_avg_pass disabled -buffer_LRU_get_free_loops disabled -buffer_LRU_get_free_waits disabled -buffer_flush_avg_page_rate disabled -buffer_flush_lsn_avg_rate disabled -buffer_flush_pct_for_dirty disabled -buffer_flush_pct_for_lsn disabled -buffer_flush_sync_waits disabled -buffer_flush_adaptive_total_pages disabled -buffer_flush_adaptive disabled -buffer_flush_adaptive_pages disabled -buffer_flush_sync_total_pages disabled -buffer_flush_sync disabled -buffer_flush_sync_pages disabled -buffer_flush_background_total_pages disabled -buffer_flush_background disabled -buffer_flush_background_pages disabled -buffer_LRU_batch_scanned disabled -buffer_LRU_batch_num_scan disabled -buffer_LRU_batch_scanned_per_call disabled -buffer_LRU_batch_flush_total_pages disabled -buffer_LRU_batches_flush disabled -buffer_LRU_batch_flush_pages disabled -buffer_LRU_batch_evict_total_pages disabled -buffer_LRU_batches_evict disabled -buffer_LRU_batch_evict_pages disabled -buffer_LRU_single_flush_scanned disabled -buffer_LRU_single_flush_num_scan disabled -buffer_LRU_single_flush_scanned_per_call disabled -buffer_LRU_single_flush_failure_count disabled -buffer_LRU_get_free_search disabled -buffer_LRU_search_scanned disabled -buffer_LRU_search_num_scan disabled -buffer_LRU_search_scanned_per_call disabled -buffer_LRU_unzip_search_scanned disabled -buffer_LRU_unzip_search_num_scan disabled -buffer_LRU_unzip_search_scanned_per_call disabled -buffer_page_read_index_leaf disabled -buffer_page_read_index_non_leaf disabled -buffer_page_read_index_ibuf_leaf disabled -buffer_page_read_index_ibuf_non_leaf disabled -buffer_page_read_undo_log disabled -buffer_page_read_index_inode disabled -buffer_page_read_ibuf_free_list disabled -buffer_page_read_ibuf_bitmap disabled -buffer_page_read_system_page disabled -buffer_page_read_trx_system disabled -buffer_page_read_fsp_hdr disabled -buffer_page_read_xdes disabled -buffer_page_read_blob disabled -buffer_page_read_zblob disabled -buffer_page_read_zblob2 disabled -buffer_page_read_other disabled -buffer_page_written_index_leaf disabled -buffer_page_written_index_non_leaf disabled -buffer_page_written_index_ibuf_leaf disabled -buffer_page_written_index_ibuf_non_leaf disabled -buffer_page_written_undo_log disabled -buffer_page_written_index_inode disabled -buffer_page_written_ibuf_free_list disabled -buffer_page_written_ibuf_bitmap disabled -buffer_page_written_system_page disabled -buffer_page_written_trx_system disabled -buffer_page_written_fsp_hdr disabled -buffer_page_written_xdes disabled -buffer_page_written_blob disabled -buffer_page_written_zblob disabled -buffer_page_written_zblob2 disabled -buffer_page_written_other disabled -os_data_reads disabled -os_data_writes disabled -os_data_fsyncs disabled -os_pending_reads disabled -os_pending_writes disabled -os_log_bytes_written disabled -os_log_fsyncs disabled -os_log_pending_fsyncs disabled -os_log_pending_writes disabled -trx_rw_commits disabled -trx_ro_commits disabled -trx_nl_ro_commits disabled -trx_commits_insert_update disabled -trx_rollbacks disabled -trx_rollbacks_savepoint disabled -trx_rollback_active disabled -trx_active_transactions disabled -trx_rseg_history_len disabled -trx_undo_slots_used disabled -trx_undo_slots_cached disabled -trx_rseg_current_size disabled -purge_del_mark_records disabled -purge_upd_exist_or_extern_records disabled -purge_invoked disabled -purge_undo_log_pages disabled -purge_dml_delay_usec disabled -purge_stop_count disabled -purge_resume_count disabled -log_checkpoints disabled -log_lsn_last_flush disabled -log_lsn_last_checkpoint disabled -log_lsn_current disabled -log_lsn_checkpoint_age disabled -log_lsn_buf_pool_oldest disabled -log_max_modified_age_async disabled -log_max_modified_age_sync disabled -log_pending_log_flushes disabled -log_pending_checkpoint_writes disabled -log_num_log_io disabled -log_waits disabled -log_write_requests disabled -log_writes disabled -log_padded disabled -compress_pages_compressed disabled -compress_pages_decompressed disabled -compression_pad_increments disabled -compression_pad_decrements disabled -compress_saved disabled -compress_trim_sect512 disabled -compress_trim_sect1024 disabled -compress_trim_sect2048 disabled -compress_trim_sect4096 disabled -compress_trim_sect8192 disabled -compress_trim_sect16384 disabled -compress_trim_sect32768 disabled -compress_pages_page_compressed disabled -compress_page_compressed_trim_op disabled -compress_page_compressed_trim_op_saved disabled -compress_pages_page_decompressed disabled -compress_pages_page_compression_error disabled -compress_pages_encrypted disabled -compress_pages_decrypted disabled -index_page_splits disabled -index_page_merge_attempts disabled -index_page_merge_successful disabled -index_page_reorg_attempts disabled -index_page_reorg_successful disabled -index_page_discards disabled -adaptive_hash_searches disabled -adaptive_hash_searches_btree disabled -adaptive_hash_pages_added disabled -adaptive_hash_pages_removed disabled -adaptive_hash_rows_added disabled -adaptive_hash_rows_removed disabled -adaptive_hash_rows_deleted_no_hash_entry disabled -adaptive_hash_rows_updated disabled -file_num_open_files disabled -ibuf_merges_insert disabled -ibuf_merges_delete_mark disabled -ibuf_merges_delete disabled -ibuf_merges_discard_insert disabled -ibuf_merges_discard_delete_mark disabled -ibuf_merges_discard_delete disabled -ibuf_merges disabled -ibuf_size disabled -innodb_master_thread_sleeps disabled -innodb_activity_count disabled -innodb_master_active_loops disabled -innodb_master_idle_loops disabled -innodb_background_drop_table_usec disabled -innodb_ibuf_merge_usec disabled -innodb_log_flush_usec disabled -innodb_mem_validate_usec disabled -innodb_master_purge_usec disabled -innodb_dict_lru_usec disabled -innodb_dict_lru_count_active disabled -innodb_dict_lru_count_idle disabled -innodb_checkpoint_usec disabled -innodb_dblwr_writes disabled -innodb_dblwr_pages_written disabled -innodb_page_size disabled -innodb_rwlock_s_spin_waits disabled -innodb_rwlock_x_spin_waits disabled -innodb_rwlock_sx_spin_waits disabled -innodb_rwlock_s_spin_rounds disabled -innodb_rwlock_x_spin_rounds disabled -innodb_rwlock_sx_spin_rounds disabled -innodb_rwlock_s_os_waits disabled -innodb_rwlock_x_os_waits disabled -innodb_rwlock_sx_os_waits disabled -dml_reads disabled -dml_inserts disabled -dml_deletes disabled -dml_updates disabled -dml_system_reads disabled -dml_system_inserts disabled -dml_system_deletes disabled -dml_system_updates disabled -ddl_background_drop_indexes disabled -ddl_background_drop_tables disabled -ddl_online_create_index disabled -ddl_pending_alter_table disabled -ddl_sort_file_alter_table disabled -ddl_log_file_alter_table disabled -icp_attempts disabled -icp_no_match disabled -icp_out_of_range disabled -icp_match disabled -set global innodb_monitor_enable = all; -select name from information_schema.innodb_metrics where status!='enabled'; -name -set global innodb_monitor_enable = aaa; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of 'aaa' -set global innodb_monitor_disable = All; -select name from information_schema.innodb_metrics where status!='disabled'; -name -set global innodb_monitor_reset_all = all; -select name from information_schema.innodb_metrics where count!=0; -name -set global innodb_monitor_enable = "%lock%"; -select name from information_schema.innodb_metrics -where status != IF(name like "%lock%", 'enabled', 'disabled'); -name -set global innodb_monitor_disable = "%lock%"; -select name, status from information_schema.innodb_metrics -where name like "%lock%"; -name status -lock_deadlocks disabled -lock_timeouts disabled -lock_rec_lock_waits disabled -lock_table_lock_waits disabled -lock_rec_lock_requests disabled -lock_rec_lock_created disabled -lock_rec_lock_removed disabled -lock_rec_locks disabled -lock_table_lock_created disabled -lock_table_lock_removed disabled -lock_table_locks disabled -lock_row_lock_current_waits disabled -lock_row_lock_time disabled -lock_row_lock_time_max disabled -lock_row_lock_waits disabled -lock_row_lock_time_avg disabled -innodb_rwlock_s_spin_waits disabled -innodb_rwlock_x_spin_waits disabled -innodb_rwlock_sx_spin_waits disabled -innodb_rwlock_s_spin_rounds disabled -innodb_rwlock_x_spin_rounds disabled -innodb_rwlock_sx_spin_rounds disabled -innodb_rwlock_s_os_waits disabled -innodb_rwlock_x_os_waits disabled -innodb_rwlock_sx_os_waits disabled -set global innodb_monitor_enable = "%lock*"; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '%lock*' -set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%"; -select name from information_schema.innodb_metrics where status!='enabled'; -name -set global innodb_monitor_disable="%%%%%"; -select name from information_schema.innodb_metrics where status!='disabled'; -name -set global innodb_monitor_enable="%"; -select name from information_schema.innodb_metrics where status!='enabled'; -name -set global innodb_monitor_disable="%_%"; -select name from information_schema.innodb_metrics where status!='disabled'; -name -set global innodb_monitor_enable="log%%%%"; -select name from information_schema.innodb_metrics -where status != IF(name like "log%", 'enabled', 'disabled'); -name -set global innodb_monitor_enable="os_%a_fs_ncs"; -set global innodb_monitor_enable="os%pending%"; -select name, status from information_schema.innodb_metrics -where name like "os%"; -name status -os_data_reads disabled -os_data_writes disabled -os_data_fsyncs enabled -os_pending_reads enabled -os_pending_writes enabled -os_log_bytes_written disabled -os_log_fsyncs disabled -os_log_pending_fsyncs enabled -os_log_pending_writes enabled -set global innodb_monitor_enable=""; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '' -set global innodb_monitor_enable="_"; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '_' -SET global innodb_monitor_disable = module_metadata; -SET global innodb_monitor_reset_all = module_metadata; -set global innodb_monitor_enable = metadata_table_handles_opened; -create table monitor_test(col int) engine = innodb; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled -set global innodb_monitor_reset = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 1 NULL 1 NULL NULL 0 enabled -drop table monitor_test; -create table monitor_test(col int) engine = innodb; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 1 NULL 1 enabled -set global innodb_monitor_reset_all = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 1 NULL 1 enabled -set global innodb_monitor_disable = metadata_table_handles_opened; -set global innodb_monitor_reset = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled -drop table monitor_test; -create table monitor_test(col int) engine = innodb; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled -set global innodb_monitor_reset_all = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_enable = metadata_table_handles_opened; -drop table monitor_test; -create table monitor_test(col int) engine = innodb stats_persistent=0; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled -set global innodb_monitor_enable = metadata_table_handles_closed; -create index idx on monitor_test(col); -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_closed"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 2 NULL 2 enabled -metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled -metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_disable = module_metadata; -set global innodb_monitor_reset = module_metadata; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled -metadata_table_handles_closed 1 NULL 1 NULL NULL 0 disabled -metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_reset_all = module_metadata; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened NULL NULL 0 NULL NULL 0 disabled -metadata_table_handles_closed NULL NULL 0 NULL NULL 0 disabled -metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_enable = module_trx; -begin; -insert into monitor_test values(9); -commit; -begin; -insert into monitor_test values(9); -rollback; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "trx_rollbacks" or name like "trx_active_transactions"; -name max_count min_count count max_count_reset min_count_reset count_reset status -trx_rollbacks 1 NULL 1 1 NULL 1 enabled -trx_active_transactions 1 0 0 1 0 0 enabled -set global innodb_monitor_disable = module_trx; -set global innodb_monitor_enable = module_dml; -insert into monitor_test values(9); -update monitor_test set col = 10 where col = 9; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 4 NULL 4 4 NULL 4 enabled -dml_inserts 1 NULL 1 1 NULL 1 enabled -dml_deletes 0 NULL 0 0 NULL 0 enabled -dml_updates 2 NULL 2 2 NULL 2 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -delete from monitor_test; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 6 NULL 6 6 NULL 6 enabled -dml_inserts 1 NULL 1 1 NULL 1 enabled -dml_deletes 2 NULL 2 2 NULL 2 enabled -dml_updates 2 NULL 2 2 NULL 2 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -set global innodb_monitor_reset = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 6 NULL 6 0 NULL 0 enabled -dml_inserts 1 NULL 1 0 NULL 0 enabled -dml_deletes 2 NULL 2 0 NULL 0 enabled -dml_updates 2 NULL 2 0 NULL 0 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -insert into monitor_test values(9); -insert into monitor_test values(1); -delete from monitor_test; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 8 NULL 8 2 NULL 2 enabled -dml_inserts 3 NULL 3 2 NULL 2 enabled -dml_deletes 4 NULL 4 2 NULL 2 enabled -dml_updates 2 NULL 2 0 NULL 0 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -set global innodb_monitor_reset_all = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 8 NULL 8 2 NULL 2 enabled -dml_inserts 3 NULL 3 2 NULL 2 enabled -dml_deletes 4 NULL 4 2 NULL 2 enabled -dml_updates 2 NULL 2 0 NULL 0 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -set global innodb_monitor_disable = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 8 NULL 8 2 NULL 2 disabled -dml_inserts 3 NULL 3 2 NULL 2 disabled -dml_deletes 4 NULL 4 2 NULL 2 disabled -dml_updates 2 NULL 2 0 NULL 0 disabled -dml_system_reads 0 NULL 0 0 NULL 0 disabled -dml_system_inserts 0 NULL 0 0 NULL 0 disabled -dml_system_deletes 0 NULL 0 0 NULL 0 disabled -dml_system_updates 0 NULL 0 0 NULL 0 disabled -set global innodb_monitor_reset_all = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads NULL NULL 0 NULL NULL 0 disabled -dml_inserts NULL NULL 0 NULL NULL 0 disabled -dml_deletes NULL NULL 0 NULL NULL 0 disabled -dml_updates NULL NULL 0 NULL NULL 0 disabled -dml_system_reads NULL NULL 0 NULL NULL 0 disabled -dml_system_inserts NULL NULL 0 NULL NULL 0 disabled -dml_system_deletes NULL NULL 0 NULL NULL 0 disabled -dml_system_updates NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_enable = dml_inserts; -insert into monitor_test values(9); -insert into monitor_test values(1); -delete from monitor_test; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads NULL NULL 0 NULL NULL 0 disabled -dml_inserts 2 NULL 2 2 NULL 2 enabled -dml_deletes NULL NULL 0 NULL NULL 0 disabled -dml_updates NULL NULL 0 NULL NULL 0 disabled -dml_system_reads NULL NULL 0 NULL NULL 0 disabled -dml_system_inserts NULL NULL 0 NULL NULL 0 disabled -dml_system_deletes NULL NULL 0 NULL NULL 0 disabled -dml_system_updates NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_disable = module_dml; -drop table monitor_test; -set global innodb_monitor_enable = file_num_open_files; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "file_num_open_files"; -name max_count min_count count max_count_reset min_count_reset count_reset status -file_num_open_files # # # # # # enabled -set global innodb_monitor_disable = file_num_open_files; -set global innodb_monitor_enable = "icp%"; -create table monitor_test(a char(3), b int, c char(2), -primary key (a(1), c(1)), key(b)) engine = innodb; -insert into monitor_test values("13", 2, "aa"); -select a from monitor_test where b < 1 for update; -a -select name, count from information_schema.innodb_metrics -where name like "icp%"; -name count -icp_attempts 1 -icp_no_match 0 -icp_out_of_range 1 -icp_match 0 -select a from monitor_test where b < 3 for update; -a -13 -select name, count from information_schema.innodb_metrics -where name like "icp%"; -name count -icp_attempts 2 -icp_no_match 0 -icp_out_of_range 1 -icp_match 1 -drop table monitor_test; -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; diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result deleted file mode 100644 index 2a66a0d0931..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result +++ /dev/null @@ -1,624 +0,0 @@ -set global innodb_monitor_disable = All; -select name, status from information_schema.innodb_metrics; -name status -metadata_table_handles_opened disabled -metadata_table_handles_closed disabled -metadata_table_reference_count disabled -lock_deadlocks disabled -lock_timeouts disabled -lock_rec_lock_waits disabled -lock_table_lock_waits disabled -lock_rec_lock_requests disabled -lock_rec_lock_created disabled -lock_rec_lock_removed disabled -lock_rec_locks disabled -lock_table_lock_created disabled -lock_table_lock_removed disabled -lock_table_locks disabled -lock_row_lock_current_waits disabled -lock_row_lock_time disabled -lock_row_lock_time_max disabled -lock_row_lock_waits disabled -lock_row_lock_time_avg disabled -buffer_pool_size disabled -buffer_pool_reads disabled -buffer_pool_read_requests disabled -buffer_pool_write_requests disabled -buffer_pool_wait_free disabled -buffer_pool_read_ahead disabled -buffer_pool_read_ahead_evicted disabled -buffer_pool_pages_total disabled -buffer_pool_pages_misc disabled -buffer_pool_pages_data disabled -buffer_pool_bytes_data disabled -buffer_pool_pages_dirty disabled -buffer_pool_bytes_dirty disabled -buffer_pool_pages_free disabled -buffer_pages_created disabled -buffer_pages_written disabled -buffer_index_pages_written disabled -buffer_non_index_pages_written disabled -buffer_pages_read disabled -buffer_pages0_read disabled -buffer_index_sec_rec_cluster_reads disabled -buffer_index_sec_rec_cluster_reads_avoided disabled -buffer_data_reads disabled -buffer_data_written disabled -buffer_flush_batch_scanned disabled -buffer_flush_batch_num_scan disabled -buffer_flush_batch_scanned_per_call disabled -buffer_flush_batch_total_pages disabled -buffer_flush_batches disabled -buffer_flush_batch_pages disabled -buffer_flush_neighbor_total_pages disabled -buffer_flush_neighbor disabled -buffer_flush_neighbor_pages disabled -buffer_flush_n_to_flush_requested disabled -buffer_flush_n_to_flush_by_age disabled -buffer_flush_adaptive_avg_time_slot disabled -buffer_LRU_batch_flush_avg_time_slot disabled -buffer_flush_adaptive_avg_time_thread disabled -buffer_LRU_batch_flush_avg_time_thread disabled -buffer_flush_adaptive_avg_time_est disabled -buffer_LRU_batch_flush_avg_time_est disabled -buffer_flush_avg_time disabled -buffer_flush_adaptive_avg_pass disabled -buffer_LRU_batch_flush_avg_pass disabled -buffer_flush_avg_pass disabled -buffer_LRU_get_free_loops disabled -buffer_LRU_get_free_waits disabled -buffer_flush_avg_page_rate disabled -buffer_flush_lsn_avg_rate disabled -buffer_flush_pct_for_dirty disabled -buffer_flush_pct_for_lsn disabled -buffer_flush_sync_waits disabled -buffer_flush_adaptive_total_pages disabled -buffer_flush_adaptive disabled -buffer_flush_adaptive_pages disabled -buffer_flush_sync_total_pages disabled -buffer_flush_sync disabled -buffer_flush_sync_pages disabled -buffer_flush_background_total_pages disabled -buffer_flush_background disabled -buffer_flush_background_pages disabled -buffer_LRU_batch_scanned disabled -buffer_LRU_batch_num_scan disabled -buffer_LRU_batch_scanned_per_call disabled -buffer_LRU_batch_flush_total_pages disabled -buffer_LRU_batches_flush disabled -buffer_LRU_batch_flush_pages disabled -buffer_LRU_batch_evict_total_pages disabled -buffer_LRU_batches_evict disabled -buffer_LRU_batch_evict_pages disabled -buffer_LRU_single_flush_scanned disabled -buffer_LRU_single_flush_num_scan disabled -buffer_LRU_single_flush_scanned_per_call disabled -buffer_LRU_single_flush_failure_count disabled -buffer_LRU_get_free_search disabled -buffer_LRU_search_scanned disabled -buffer_LRU_search_num_scan disabled -buffer_LRU_search_scanned_per_call disabled -buffer_LRU_unzip_search_scanned disabled -buffer_LRU_unzip_search_num_scan disabled -buffer_LRU_unzip_search_scanned_per_call disabled -buffer_page_read_index_leaf disabled -buffer_page_read_index_non_leaf disabled -buffer_page_read_index_ibuf_leaf disabled -buffer_page_read_index_ibuf_non_leaf disabled -buffer_page_read_undo_log disabled -buffer_page_read_index_inode disabled -buffer_page_read_ibuf_free_list disabled -buffer_page_read_ibuf_bitmap disabled -buffer_page_read_system_page disabled -buffer_page_read_trx_system disabled -buffer_page_read_fsp_hdr disabled -buffer_page_read_xdes disabled -buffer_page_read_blob disabled -buffer_page_read_zblob disabled -buffer_page_read_zblob2 disabled -buffer_page_read_other disabled -buffer_page_written_index_leaf disabled -buffer_page_written_index_non_leaf disabled -buffer_page_written_index_ibuf_leaf disabled -buffer_page_written_index_ibuf_non_leaf disabled -buffer_page_written_undo_log disabled -buffer_page_written_index_inode disabled -buffer_page_written_ibuf_free_list disabled -buffer_page_written_ibuf_bitmap disabled -buffer_page_written_system_page disabled -buffer_page_written_trx_system disabled -buffer_page_written_fsp_hdr disabled -buffer_page_written_xdes disabled -buffer_page_written_blob disabled -buffer_page_written_zblob disabled -buffer_page_written_zblob2 disabled -buffer_page_written_other disabled -os_data_reads disabled -os_data_writes disabled -os_data_fsyncs disabled -os_pending_reads disabled -os_pending_writes disabled -os_log_bytes_written disabled -os_log_fsyncs disabled -os_log_pending_fsyncs disabled -os_log_pending_writes disabled -trx_rw_commits disabled -trx_ro_commits disabled -trx_nl_ro_commits disabled -trx_commits_insert_update disabled -trx_rollbacks disabled -trx_rollbacks_savepoint disabled -trx_rollback_active disabled -trx_active_transactions disabled -trx_rseg_history_len disabled -trx_undo_slots_used disabled -trx_undo_slots_cached disabled -trx_rseg_current_size disabled -purge_del_mark_records disabled -purge_upd_exist_or_extern_records disabled -purge_invoked disabled -purge_undo_log_pages disabled -purge_dml_delay_usec disabled -purge_stop_count disabled -purge_resume_count disabled -log_checkpoints disabled -log_lsn_last_flush disabled -log_lsn_last_checkpoint disabled -log_lsn_current disabled -log_lsn_checkpoint_age disabled -log_lsn_buf_pool_oldest disabled -log_max_modified_age_async disabled -log_max_modified_age_sync disabled -log_pending_log_flushes disabled -log_pending_checkpoint_writes disabled -log_num_log_io disabled -log_waits disabled -log_write_requests disabled -log_writes disabled -log_padded disabled -compress_pages_compressed disabled -compress_pages_decompressed disabled -compression_pad_increments disabled -compression_pad_decrements disabled -compress_saved disabled -compress_trim_sect512 disabled -compress_trim_sect1024 disabled -compress_trim_sect2048 disabled -compress_trim_sect4096 disabled -compress_trim_sect8192 disabled -compress_trim_sect16384 disabled -compress_trim_sect32768 disabled -compress_pages_page_compressed disabled -compress_page_compressed_trim_op disabled -compress_page_compressed_trim_op_saved disabled -compress_pages_page_decompressed disabled -compress_pages_page_compression_error disabled -compress_pages_encrypted disabled -compress_pages_decrypted disabled -index_page_splits disabled -index_page_merge_attempts disabled -index_page_merge_successful disabled -index_page_reorg_attempts disabled -index_page_reorg_successful disabled -index_page_discards disabled -adaptive_hash_searches disabled -adaptive_hash_searches_btree disabled -adaptive_hash_pages_added disabled -adaptive_hash_pages_removed disabled -adaptive_hash_rows_added disabled -adaptive_hash_rows_removed disabled -adaptive_hash_rows_deleted_no_hash_entry disabled -adaptive_hash_rows_updated disabled -file_num_open_files disabled -ibuf_merges_insert disabled -ibuf_merges_delete_mark disabled -ibuf_merges_delete disabled -ibuf_merges_discard_insert disabled -ibuf_merges_discard_delete_mark disabled -ibuf_merges_discard_delete disabled -ibuf_merges disabled -ibuf_size disabled -innodb_master_thread_sleeps disabled -innodb_activity_count disabled -innodb_master_active_loops disabled -innodb_master_idle_loops disabled -innodb_background_drop_table_usec disabled -innodb_ibuf_merge_usec disabled -innodb_log_flush_usec disabled -innodb_mem_validate_usec disabled -innodb_master_purge_usec disabled -innodb_dict_lru_usec disabled -innodb_dict_lru_count_active disabled -innodb_dict_lru_count_idle disabled -innodb_checkpoint_usec disabled -innodb_dblwr_writes disabled -innodb_dblwr_pages_written disabled -innodb_page_size disabled -innodb_rwlock_s_spin_waits disabled -innodb_rwlock_x_spin_waits disabled -innodb_rwlock_sx_spin_waits disabled -innodb_rwlock_s_spin_rounds disabled -innodb_rwlock_x_spin_rounds disabled -innodb_rwlock_sx_spin_rounds disabled -innodb_rwlock_s_os_waits disabled -innodb_rwlock_x_os_waits disabled -innodb_rwlock_sx_os_waits disabled -dml_reads disabled -dml_inserts disabled -dml_deletes disabled -dml_updates disabled -dml_system_reads disabled -dml_system_inserts disabled -dml_system_deletes disabled -dml_system_updates disabled -ddl_background_drop_indexes disabled -ddl_background_drop_tables disabled -ddl_online_create_index disabled -ddl_pending_alter_table disabled -ddl_sort_file_alter_table disabled -ddl_log_file_alter_table disabled -icp_attempts disabled -icp_no_match disabled -icp_out_of_range disabled -icp_match disabled -set global innodb_monitor_enable = all; -select name from information_schema.innodb_metrics where status!='enabled'; -name -set global innodb_monitor_enable = aaa; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of 'aaa' -set global innodb_monitor_disable = All; -select name from information_schema.innodb_metrics where status!='disabled'; -name -set global innodb_monitor_reset_all = all; -select name from information_schema.innodb_metrics where count!=0; -name -set global innodb_monitor_enable = "%lock%"; -select name from information_schema.innodb_metrics -where status != IF(name like "%lock%", 'enabled', 'disabled'); -name -set global innodb_monitor_disable = "%lock%"; -select name, status from information_schema.innodb_metrics -where name like "%lock%"; -name status -lock_deadlocks disabled -lock_timeouts disabled -lock_rec_lock_waits disabled -lock_table_lock_waits disabled -lock_rec_lock_requests disabled -lock_rec_lock_created disabled -lock_rec_lock_removed disabled -lock_rec_locks disabled -lock_table_lock_created disabled -lock_table_lock_removed disabled -lock_table_locks disabled -lock_row_lock_current_waits disabled -lock_row_lock_time disabled -lock_row_lock_time_max disabled -lock_row_lock_waits disabled -lock_row_lock_time_avg disabled -innodb_rwlock_s_spin_waits disabled -innodb_rwlock_x_spin_waits disabled -innodb_rwlock_sx_spin_waits disabled -innodb_rwlock_s_spin_rounds disabled -innodb_rwlock_x_spin_rounds disabled -innodb_rwlock_sx_spin_rounds disabled -innodb_rwlock_s_os_waits disabled -innodb_rwlock_x_os_waits disabled -innodb_rwlock_sx_os_waits disabled -set global innodb_monitor_enable = "%lock*"; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '%lock*' -set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%"; -select name from information_schema.innodb_metrics where status!='enabled'; -name -set global innodb_monitor_disable="%%%%%"; -select name from information_schema.innodb_metrics where status!='disabled'; -name -set global innodb_monitor_enable="%"; -select name from information_schema.innodb_metrics where status!='enabled'; -name -set global innodb_monitor_disable="%_%"; -select name from information_schema.innodb_metrics where status!='disabled'; -name -set global innodb_monitor_enable="log%%%%"; -select name from information_schema.innodb_metrics -where status != IF(name like "log%", 'enabled', 'disabled'); -name -set global innodb_monitor_enable="os_%a_fs_ncs"; -set global innodb_monitor_enable="os%pending%"; -select name, status from information_schema.innodb_metrics -where name like "os%"; -name status -os_data_reads disabled -os_data_writes disabled -os_data_fsyncs enabled -os_pending_reads enabled -os_pending_writes enabled -os_log_bytes_written disabled -os_log_fsyncs disabled -os_log_pending_fsyncs enabled -os_log_pending_writes enabled -set global innodb_monitor_enable=""; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '' -set global innodb_monitor_enable="_"; -ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '_' -SET global innodb_monitor_disable = module_metadata; -SET global innodb_monitor_reset_all = module_metadata; -set global innodb_monitor_enable = metadata_table_handles_opened; -create table monitor_test(col int) engine = innodb; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled -set global innodb_monitor_reset = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 1 NULL 1 NULL NULL 0 enabled -drop table monitor_test; -create table monitor_test(col int) engine = innodb; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 1 NULL 1 enabled -set global innodb_monitor_reset_all = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 1 NULL 1 enabled -set global innodb_monitor_disable = metadata_table_handles_opened; -set global innodb_monitor_reset = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled -drop table monitor_test; -create table monitor_test(col int) engine = innodb; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled -set global innodb_monitor_reset_all = metadata_table_handles_opened; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_enable = metadata_table_handles_opened; -drop table monitor_test; -create table monitor_test(col int) engine = innodb stats_persistent=0; -select * from monitor_test; -col -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 1 NULL 1 1 NULL 1 enabled -set global innodb_monitor_enable = metadata_table_handles_closed; -create index idx on monitor_test(col); -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_closed"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 2 NULL 2 enabled -metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled -metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_disable = module_metadata; -set global innodb_monitor_reset = module_metadata; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled -metadata_table_handles_closed 1 NULL 1 NULL NULL 0 disabled -metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_reset_all = module_metadata; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -metadata_table_handles_opened NULL NULL 0 NULL NULL 0 disabled -metadata_table_handles_closed NULL NULL 0 NULL NULL 0 disabled -metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_enable = module_trx; -begin; -insert into monitor_test values(9); -commit; -begin; -insert into monitor_test values(9); -rollback; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "trx_rollbacks" or name like "trx_active_transactions"; -name max_count min_count count max_count_reset min_count_reset count_reset status -trx_rollbacks 1 NULL 1 1 NULL 1 enabled -trx_active_transactions 1 0 0 1 0 0 enabled -set global innodb_monitor_disable = module_trx; -set global innodb_monitor_enable = module_dml; -insert into monitor_test values(9); -update monitor_test set col = 10 where col = 9; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 4 NULL 4 4 NULL 4 enabled -dml_inserts 1 NULL 1 1 NULL 1 enabled -dml_deletes 0 NULL 0 0 NULL 0 enabled -dml_updates 2 NULL 2 2 NULL 2 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -delete from monitor_test; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 6 NULL 6 6 NULL 6 enabled -dml_inserts 1 NULL 1 1 NULL 1 enabled -dml_deletes 2 NULL 2 2 NULL 2 enabled -dml_updates 2 NULL 2 2 NULL 2 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -set global innodb_monitor_reset = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 6 NULL 6 0 NULL 0 enabled -dml_inserts 1 NULL 1 0 NULL 0 enabled -dml_deletes 2 NULL 2 0 NULL 0 enabled -dml_updates 2 NULL 2 0 NULL 0 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -insert into monitor_test values(9); -insert into monitor_test values(1); -delete from monitor_test; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 8 NULL 8 2 NULL 2 enabled -dml_inserts 3 NULL 3 2 NULL 2 enabled -dml_deletes 4 NULL 4 2 NULL 2 enabled -dml_updates 2 NULL 2 0 NULL 0 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -set global innodb_monitor_reset_all = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 8 NULL 8 2 NULL 2 enabled -dml_inserts 3 NULL 3 2 NULL 2 enabled -dml_deletes 4 NULL 4 2 NULL 2 enabled -dml_updates 2 NULL 2 0 NULL 0 enabled -dml_system_reads 0 NULL 0 0 NULL 0 enabled -dml_system_inserts 0 NULL 0 0 NULL 0 enabled -dml_system_deletes 0 NULL 0 0 NULL 0 enabled -dml_system_updates 0 NULL 0 0 NULL 0 enabled -set global innodb_monitor_disable = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads 8 NULL 8 2 NULL 2 disabled -dml_inserts 3 NULL 3 2 NULL 2 disabled -dml_deletes 4 NULL 4 2 NULL 2 disabled -dml_updates 2 NULL 2 0 NULL 0 disabled -dml_system_reads 0 NULL 0 0 NULL 0 disabled -dml_system_inserts 0 NULL 0 0 NULL 0 disabled -dml_system_deletes 0 NULL 0 0 NULL 0 disabled -dml_system_updates 0 NULL 0 0 NULL 0 disabled -set global innodb_monitor_reset_all = module_dml; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads NULL NULL 0 NULL NULL 0 disabled -dml_inserts NULL NULL 0 NULL NULL 0 disabled -dml_deletes NULL NULL 0 NULL NULL 0 disabled -dml_updates NULL NULL 0 NULL NULL 0 disabled -dml_system_reads NULL NULL 0 NULL NULL 0 disabled -dml_system_inserts NULL NULL 0 NULL NULL 0 disabled -dml_system_deletes NULL NULL 0 NULL NULL 0 disabled -dml_system_updates NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_enable = dml_inserts; -insert into monitor_test values(9); -insert into monitor_test values(1); -delete from monitor_test; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; -name max_count min_count count max_count_reset min_count_reset count_reset status -dml_reads NULL NULL 0 NULL NULL 0 disabled -dml_inserts 2 NULL 2 2 NULL 2 enabled -dml_deletes NULL NULL 0 NULL NULL 0 disabled -dml_updates NULL NULL 0 NULL NULL 0 disabled -dml_system_reads NULL NULL 0 NULL NULL 0 disabled -dml_system_inserts NULL NULL 0 NULL NULL 0 disabled -dml_system_deletes NULL NULL 0 NULL NULL 0 disabled -dml_system_updates NULL NULL 0 NULL NULL 0 disabled -set global innodb_monitor_disable = module_dml; -drop table monitor_test; -set global innodb_monitor_enable = file_num_open_files; -select name, max_count, min_count, count, -max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "file_num_open_files"; -name max_count min_count count max_count_reset min_count_reset count_reset status -file_num_open_files # # # # # # enabled -set global innodb_monitor_disable = file_num_open_files; -set global innodb_monitor_enable = "icp%"; -create table monitor_test(a char(3), b int, c char(2), -primary key (a(1), c(1)), key(b)) engine = innodb; -insert into monitor_test values("13", 2, "aa"); -select a from monitor_test where b < 1 for update; -a -select name, count from information_schema.innodb_metrics -where name like "icp%"; -name count -icp_attempts 1 -icp_no_match 0 -icp_out_of_range 1 -icp_match 0 -select a from monitor_test where b < 3 for update; -a -13 -select name, count from information_schema.innodb_metrics -where name like "icp%"; -name count -icp_attempts 2 -icp_no_match 0 -icp_out_of_range 1 -icp_match 1 -drop table monitor_test; -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; diff --git a/mysql-test/suite/sys_vars/r/innodb_numa_interleave_basic.result b/mysql-test/suite/sys_vars/r/innodb_numa_interleave_basic.result index 21ed16c1dab..58f3b4b3e38 100644 --- a/mysql-test/suite/sys_vars/r/innodb_numa_interleave_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_numa_interleave_basic.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("InnoDB: Failed to set NUMA memory policy"); SELECT @@GLOBAL.innodb_numa_interleave; @@GLOBAL.innodb_numa_interleave 1 diff --git a/mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result b/mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result index 621ef56f61f..88516a854fe 100644 --- a/mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result @@ -43,14 +43,40 @@ set global innodb_spin_wait_delay=0; select @@global.innodb_spin_wait_delay; @@global.innodb_spin_wait_delay 0 +set global innodb_spin_wait_delay=5000; +select @@global.innodb_spin_wait_delay; +@@global.innodb_spin_wait_delay +5000 set global innodb_spin_wait_delay=65535; +Warnings: +Warning 1292 Truncated incorrect innodb_spin_wait_delay value: '65535' select @@global.innodb_spin_wait_delay; @@global.innodb_spin_wait_delay -65535 +6000 set global innodb_spin_wait_delay=4294967295; +Warnings: +Warning 1292 Truncated incorrect innodb_spin_wait_delay value: '4294967295' select @@global.innodb_spin_wait_delay; @@global.innodb_spin_wait_delay -4294967295 +6000 +set @@global.innodb_spin_wait_delay = 4294967296; +Warnings: +Warning 1292 Truncated incorrect innodb_spin_wait_delay value: '4294967296' +select @@global.innodb_spin_wait_delay; +@@global.innodb_spin_wait_delay +6000 +set @@global.innodb_spin_wait_delay = 12345678901; +Warnings: +Warning 1292 Truncated incorrect innodb_spin_wait_delay value: '12345678901' +select @@global.innodb_spin_wait_delay; +@@global.innodb_spin_wait_delay +6000 +set @@global.innodb_spin_wait_delay = 18446744073709551615; +Warnings: +Warning 1292 Truncated incorrect innodb_spin_wait_delay value: '18446744073709551615' +select @@global.innodb_spin_wait_delay; +@@global.innodb_spin_wait_delay +6000 set global innodb_spin_wait_delay=1.1; ERROR 42000: Incorrect argument type to variable 'innodb_spin_wait_delay' set global innodb_spin_wait_delay=1e1; @@ -61,12 +87,12 @@ set global innodb_spin_wait_delay=' '; ERROR 42000: Incorrect argument type to variable 'innodb_spin_wait_delay' select @@global.innodb_spin_wait_delay; @@global.innodb_spin_wait_delay -4294967295 +6000 set global innodb_spin_wait_delay=" "; ERROR 42000: Incorrect argument type to variable 'innodb_spin_wait_delay' select @@global.innodb_spin_wait_delay; @@global.innodb_spin_wait_delay -4294967295 +6000 set global innodb_spin_wait_delay=-7; Warnings: Warning 1292 Truncated incorrect innodb_spin_wait_delay value: '-7' @@ -82,18 +108,6 @@ select @@global.innodb_spin_wait_delay; select * from information_schema.global_variables where variable_name='innodb_spin_wait_delay'; VARIABLE_NAME VARIABLE_VALUE INNODB_SPIN_WAIT_DELAY 0 -SET @@global.innodb_spin_wait_delay = 4294967296; -SELECT @@global.innodb_spin_wait_delay IN (4294967296,4294967295); -@@global.innodb_spin_wait_delay IN (4294967296,4294967295) -1 -SET @@global.innodb_spin_wait_delay = 12345678901; -SELECT @@global.innodb_spin_wait_delay IN (12345678901,4294967295); -@@global.innodb_spin_wait_delay IN (12345678901,4294967295) -1 -SET @@global.innodb_spin_wait_delay = 18446744073709551615; -SELECT @@global.innodb_spin_wait_delay IN (18446744073709551615,4294967295); -@@global.innodb_spin_wait_delay IN (18446744073709551615,4294967295) -1 SET @@global.innodb_spin_wait_delay = @start_global_value; SELECT @@global.innodb_spin_wait_delay; @@global.innodb_spin_wait_delay diff --git a/mysql-test/suite/sys_vars/r/innodb_use_atomic_writes_basic.result b/mysql-test/suite/sys_vars/r/innodb_use_atomic_writes_basic.result index fa6379fbe1c..e420d6e5161 100644 --- a/mysql-test/suite/sys_vars/r/innodb_use_atomic_writes_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_use_atomic_writes_basic.result @@ -1,20 +1,20 @@ select @@global.innodb_use_atomic_writes; @@global.innodb_use_atomic_writes -0 +1 select @@session.innodb_use_atomic_writes; ERROR HY000: Variable 'innodb_use_atomic_writes' is a GLOBAL variable show global variables like 'innodb_use_atomic_writes'; Variable_name Value -innodb_use_atomic_writes OFF +innodb_use_atomic_writes ON show session variables like 'innodb_use_atomic_writes'; Variable_name Value -innodb_use_atomic_writes OFF +innodb_use_atomic_writes ON select * from information_schema.global_variables where variable_name='innodb_use_atomic_writes'; VARIABLE_NAME VARIABLE_VALUE -INNODB_USE_ATOMIC_WRITES OFF +INNODB_USE_ATOMIC_WRITES ON select * from information_schema.session_variables where variable_name='innodb_use_atomic_writes'; VARIABLE_NAME VARIABLE_VALUE -INNODB_USE_ATOMIC_WRITES OFF +INNODB_USE_ATOMIC_WRITES ON set global innodb_use_atomic_writes=1; ERROR HY000: Variable 'innodb_use_atomic_writes' is a read only variable set session innodb_use_atomic_writes=1; diff --git a/mysql-test/suite/sys_vars/r/innodb_use_trim_basic.result b/mysql-test/suite/sys_vars/r/innodb_use_trim_basic.result index 63292f5d3c8..855bccad522 100644 --- a/mysql-test/suite/sys_vars/r/innodb_use_trim_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_use_trim_basic.result @@ -1,12 +1,14 @@ SET @start_use_trim = @@global.innodb_use_trim; SELECT @start_use_trim; @start_use_trim -0 +1 SELECT COUNT(@@GLOBAL.innodb_use_trim); COUNT(@@GLOBAL.innodb_use_trim) 1 1 Expected SET @@GLOBAL.innodb_use_trim=1; +Warnings: +Warning 131 Using innodb_use_trim is deprecated and the parameter will be removed in MariaDB 10.3. SELECT COUNT(@@GLOBAL.innodb_use_trim); COUNT(@@GLOBAL.innodb_use_trim) 1 @@ -28,6 +30,8 @@ COUNT(VARIABLE_VALUE) 1 1 Expected SET @@global.innodb_use_trim = @start_use_trim; +Warnings: +Warning 131 Using innodb_use_trim is deprecated and the parameter will be removed in MariaDB 10.3. SELECT @@global.innodb_use_trim; @@global.innodb_use_trim -0 +1 diff --git a/mysql-test/suite/sys_vars/r/lock_wait_timeout_basic.result b/mysql-test/suite/sys_vars/r/lock_wait_timeout_basic.result index 6d1e8d3bb59..bc127bf339a 100644 --- a/mysql-test/suite/sys_vars/r/lock_wait_timeout_basic.result +++ b/mysql-test/suite/sys_vars/r/lock_wait_timeout_basic.result @@ -1,31 +1,31 @@ SET @start_global_value = @@global.lock_wait_timeout; SELECT @start_global_value; @start_global_value -31536000 +86400 SET @start_session_value = @@session.lock_wait_timeout; SELECT @start_session_value; @start_session_value -31536000 +86400 '#--------------------FN_DYNVARS_002_01-------------------------#' SET @@global.lock_wait_timeout = 100; SET @@global.lock_wait_timeout = DEFAULT; SELECT @@global.lock_wait_timeout; @@global.lock_wait_timeout -31536000 +86400 SET @@session.lock_wait_timeout = 200; SET @@session.lock_wait_timeout = DEFAULT; SELECT @@session.lock_wait_timeout; @@session.lock_wait_timeout -31536000 +86400 '#--------------------FN_DYNVARS_002_02-------------------------#' SET @@global.lock_wait_timeout = @start_global_value; SELECT @@global.lock_wait_timeout = 31536000; @@global.lock_wait_timeout = 31536000 -1 +0 SET @@session.lock_wait_timeout = @start_session_value; SELECT @@session.lock_wait_timeout = 31536000; @@session.lock_wait_timeout = 31536000 -1 +0 '#--------------------FN_DYNVARS_002_03-------------------------#' SET @@global.lock_wait_timeout = 1; SELECT @@global.lock_wait_timeout; @@ -170,8 +170,8 @@ ERROR 42S22: Unknown column 'lock_wait_timeout' in 'field list' SET @@global.lock_wait_timeout = @start_global_value; SELECT @@global.lock_wait_timeout; @@global.lock_wait_timeout -31536000 +86400 SET @@session.lock_wait_timeout = @start_session_value; SELECT @@session.lock_wait_timeout; @@session.lock_wait_timeout -31536000 +86400 diff --git a/mysql-test/suite/sys_vars/r/log_warnings_basic.result b/mysql-test/suite/sys_vars/r/log_warnings_basic.result index fee7f8966ca..eac8949f7c6 100644 --- a/mysql-test/suite/sys_vars/r/log_warnings_basic.result +++ b/mysql-test/suite/sys_vars/r/log_warnings_basic.result @@ -1,31 +1,31 @@ SET @start_global_value = @@global.log_warnings; SELECT @start_global_value; @start_global_value -1 +2 SET @start_session_value = @@session.log_warnings; SELECT @start_session_value; @start_session_value -1 +2 '#--------------------FN_DYNVARS_067_01-------------------------#' SET @@global.log_warnings = 100; SET @@global.log_warnings = DEFAULT; SELECT @@global.log_warnings; @@global.log_warnings -1 +2 SET @@session.log_warnings = 200; SET @@session.log_warnings = DEFAULT; SELECT @@session.log_warnings; @@session.log_warnings -1 +2 '#--------------------FN_DYNVARS_067_02-------------------------#' SET @@global.log_warnings = DEFAULT; SELECT @@global.log_warnings = 1; @@global.log_warnings = 1 -1 +0 SET @@session.log_warnings = DEFAULT; SELECT @@session.log_warnings = 1; @@session.log_warnings = 1 -1 +0 '#--------------------FN_DYNVARS_067_03-------------------------#' SET @@global.log_warnings = 0; SELECT @@global.log_warnings; @@ -158,8 +158,8 @@ ERROR 42S22: Unknown column 'log_warnings' in 'field list' SET @@global.log_warnings = @start_global_value; SELECT @@global.log_warnings; @@global.log_warnings -1 +2 SET @@session.log_warnings = @start_session_value; SELECT @@session.log_warnings; @@session.log_warnings -1 +2 diff --git a/mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result b/mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result index ec99256a862..10bda48dd43 100644 --- a/mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result +++ b/mysql-test/suite/sys_vars/r/max_allowed_packet_basic.result @@ -1,7 +1,7 @@ SET @start_global_value = @@global.max_allowed_packet; SELECT @start_global_value; @start_global_value -4194304 +16777216 SET @@global.max_allowed_packet = DEFAULT; connect conn1, localhost, root,,; '#--------------------FN_DYNVARS_070_01-------------------------#' @@ -12,14 +12,14 @@ Warning 1708 The value of 'max_allowed_packet' should be no less than the value SET @@global.max_allowed_packet = DEFAULT; SELECT @@global.max_allowed_packet; @@global.max_allowed_packet -4194304 +16777216 SET @@session.max_allowed_packet = 20000; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SET @@session.max_allowed_packet = DEFAULT; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 '#--------------------FN_DYNVARS_070_02-------------------------#' SET @@global.max_allowed_packet = DEFAULT; SELECT @@global.max_allowed_packet = 1048576; @@ -54,27 +54,27 @@ SET @@session.max_allowed_packet = 1024; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 SET @@session.max_allowed_packet = 1025; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 SET @@session.max_allowed_packet = 65535; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 SET @@session.max_allowed_packet = 1073741824; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 SET @@session.max_allowed_packet = 1073741823; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 '#------------------FN_DYNVARS_070_05-----------------------#' SET @@global.max_allowed_packet = 0; Warnings: @@ -117,29 +117,29 @@ SET @@session.max_allowed_packet = 0; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 SET @@session.max_allowed_packet = 1023; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 SET @@session.max_allowed_packet = -2; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 SET @@session.max_allowed_packet = 65530.34; ERROR 42000: Incorrect argument type to variable 'max_allowed_packet' SET @@session.max_allowed_packet = 10737418241; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 SET @@session.max_allowed_packet = test; ERROR 42000: Incorrect argument type to variable 'max_allowed_packet' SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 '#------------------FN_DYNVARS_070_06-----------------------#' SELECT @@global.max_allowed_packet = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES @@ -188,7 +188,7 @@ SET max_allowed_packet = 1024; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SELECT @@max_allowed_packet; @@max_allowed_packet -4194304 +16777216 SELECT local.max_allowed_packet; ERROR 42S02: Unknown table 'local' in field list SELECT session.max_allowed_packet; @@ -199,7 +199,7 @@ connection default; SET @@global.max_allowed_packet = @start_global_value; SELECT @@global.max_allowed_packet; @@global.max_allowed_packet -4194304 +16777216 SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 diff --git a/mysql-test/suite/sys_vars/r/max_allowed_packet_func.result b/mysql-test/suite/sys_vars/r/max_allowed_packet_func.result index c31a64b3a94..62d543d0a0f 100644 --- a/mysql-test/suite/sys_vars/r/max_allowed_packet_func.result +++ b/mysql-test/suite/sys_vars/r/max_allowed_packet_func.result @@ -14,7 +14,7 @@ SET @@session.max_allowed_packet = 1024; ERROR HY000: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value SELECT @@session.max_allowed_packet; @@session.max_allowed_packet -4194304 +16777216 SET @@session.net_buffer_length = 1024; ERROR HY000: SESSION variable 'net_buffer_length' is read-only. Use SET GLOBAL to assign the value SELECT @@session.net_buffer_length; diff --git a/mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result b/mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result index 3fc0f563298..365b3f24c28 100644 --- a/mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result +++ b/mysql-test/suite/sys_vars/r/myisam_recover_options_basic.result @@ -1,20 +1,20 @@ select @@global.myisam_recover_options; @@global.myisam_recover_options -DEFAULT +BACKUP,QUICK select @@session.myisam_recover_options; ERROR HY000: Variable 'myisam_recover_options' is a GLOBAL variable show global variables like 'myisam_recover_options'; Variable_name Value -myisam_recover_options DEFAULT +myisam_recover_options BACKUP,QUICK show session variables like 'myisam_recover_options'; Variable_name Value -myisam_recover_options DEFAULT +myisam_recover_options BACKUP,QUICK select * from information_schema.global_variables where variable_name='myisam_recover_options'; VARIABLE_NAME VARIABLE_VALUE -MYISAM_RECOVER_OPTIONS DEFAULT +MYISAM_RECOVER_OPTIONS BACKUP,QUICK select * from information_schema.session_variables where variable_name='myisam_recover_options'; VARIABLE_NAME VARIABLE_VALUE -MYISAM_RECOVER_OPTIONS DEFAULT +MYISAM_RECOVER_OPTIONS BACKUP,QUICK set global myisam_recover_options=1; ERROR HY000: Variable 'myisam_recover_options' is a read only variable set session myisam_recover_options=1; diff --git a/mysql-test/suite/sys_vars/r/replicate_annotate_row_events_basic.result b/mysql-test/suite/sys_vars/r/replicate_annotate_row_events_basic.result index 802c92268d6..08298a4f316 100644 --- a/mysql-test/suite/sys_vars/r/replicate_annotate_row_events_basic.result +++ b/mysql-test/suite/sys_vars/r/replicate_annotate_row_events_basic.result @@ -1,20 +1,20 @@ select @@global.replicate_annotate_row_events; @@global.replicate_annotate_row_events -0 +1 select @@session.replicate_annotate_row_events; ERROR HY000: Variable 'replicate_annotate_row_events' is a GLOBAL variable show global variables like 'replicate_annotate_row_events'; Variable_name Value -replicate_annotate_row_events OFF +replicate_annotate_row_events ON show session variables like 'replicate_annotate_row_events'; Variable_name Value -replicate_annotate_row_events OFF +replicate_annotate_row_events ON select * from information_schema.global_variables where variable_name='replicate_annotate_row_events'; VARIABLE_NAME VARIABLE_VALUE -REPLICATE_ANNOTATE_ROW_EVENTS OFF +REPLICATE_ANNOTATE_ROW_EVENTS ON select * from information_schema.session_variables where variable_name='replicate_annotate_row_events'; VARIABLE_NAME VARIABLE_VALUE -REPLICATE_ANNOTATE_ROW_EVENTS OFF +REPLICATE_ANNOTATE_ROW_EVENTS ON set global replicate_annotate_row_events=1; ERROR HY000: Variable 'replicate_annotate_row_events' is a read only variable set session replicate_annotate_row_events=1; diff --git a/mysql-test/suite/sys_vars/r/slave_net_timeout_basic.result b/mysql-test/suite/sys_vars/r/slave_net_timeout_basic.result index 1ef0b27b756..1b4d62c6c00 100644 --- a/mysql-test/suite/sys_vars/r/slave_net_timeout_basic.result +++ b/mysql-test/suite/sys_vars/r/slave_net_timeout_basic.result @@ -7,12 +7,12 @@ SET @@global.slave_net_timeout = 500000; SET @@global.slave_net_timeout = DEFAULT; SELECT @@global.slave_net_timeout; @@global.slave_net_timeout -3600 +60 '#--------------------FN_DYNVARS_146_02-------------------------#' SET @@global.slave_net_timeout = DEFAULT; SELECT @@global.slave_net_timeout = 3600; @@global.slave_net_timeout = 3600 -1 +0 '#--------------------FN_DYNVARS_146_03-------------------------#' SET @@global.slave_net_timeout = 0; Warnings: diff --git a/mysql-test/suite/sys_vars/r/sql_mode_basic.result b/mysql-test/suite/sys_vars/r/sql_mode_basic.result index b3c76b12b64..2e3ca45d4f5 100644 --- a/mysql-test/suite/sys_vars/r/sql_mode_basic.result +++ b/mysql-test/suite/sys_vars/r/sql_mode_basic.result @@ -1,22 +1,22 @@ SET @global_start_value = @@global.sql_mode; SELECT @global_start_value; @global_start_value -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SET @session_start_value = @@session.sql_mode; SELECT @session_start_value; @session_start_value -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION '#--------------------FN_DYNVARS_152_01------------------------#' SET @@global.sql_mode = ANSI; SET @@global.sql_mode = DEFAULT; SELECT @@global.sql_mode; @@global.sql_mode -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SET @@session.sql_mode = ANSI; SET @@session.sql_mode = DEFAULT; SELECT @@session.sql_mode; @@session.sql_mode -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION '#---------------------FN_DYNVARS_152_02-------------------------#' SET @@global.sql_mode = NULL; ERROR 42000: Variable 'sql_mode' can't be set to the value of 'NULL' @@ -420,8 +420,8 @@ ANSI_QUOTES SET @@global.sql_mode = @global_start_value; SELECT @@global.sql_mode; @@global.sql_mode -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SET @@session.sql_mode = @session_start_value; SELECT @@session.sql_mode; @@session.sql_mode -NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION diff --git a/mysql-test/suite/sys_vars/r/sql_warnings_func.result b/mysql-test/suite/sys_vars/r/sql_warnings_func.result index 91a4e8b28c0..16be59755de 100644 --- a/mysql-test/suite/sys_vars/r/sql_warnings_func.result +++ b/mysql-test/suite/sys_vars/r/sql_warnings_func.result @@ -5,17 +5,17 @@ CREATE TEMPORARY TABLE t1(a varchar(5), b varchar(20)); '#-----------------------------FN_DYNVARS_167_01------------#' SET @@sql_warnings = DEFAULT; affected rows: 0 -INSERT INTO t1 VALUES('abcdef', 'val1'); +INSERT IGNORE INTO t1 VALUES('abcdef', 'val1'); affected rows: 1 '#-----------------------------FN_DYNVARS_167_02------------------#' SET @@sql_warnings = 0; affected rows: 0 -INSERT INTO t1 VALUES('abcdef', 'val1'); +INSERT IGNORE INTO t1 VALUES('abcdef', 'val1'); affected rows: 1 '#-----------------------------FN_DYNVARS_167_03---------------#' SET @@sql_warnings = 1; affected rows: 0 -INSERT INTO t1 VALUES('abcdef', 'val1'); +INSERT IGNORE INTO t1 VALUES('abcdef', 'val1'); affected rows: 1 info: Records: 1 Duplicates: 0 Warnings: 1 '#----------------------------FN_DYNVARS_167_04---------------#' diff --git a/mysql-test/suite/sys_vars/r/sysvars_aria.result b/mysql-test/suite/sys_vars/r/sysvars_aria.result index 461eef9ec47..6516260a05d 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_aria.result +++ b/mysql-test/suite/sys_vars/r/sysvars_aria.result @@ -213,9 +213,9 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME ARIA_RECOVER_OPTIONS SESSION_VALUE NULL -GLOBAL_VALUE NORMAL +GLOBAL_VALUE BACKUP,QUICK GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE NORMAL +DEFAULT_VALUE BACKUP,QUICK VARIABLE_SCOPE GLOBAL VARIABLE_TYPE SET VARIABLE_COMMENT Specifies how corrupted tables should be automatically repaired diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff index b2556feb1ad..9bf02940d75 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff @@ -1,15 +1,15 @@ ---- r/sysvars_innodb.result -+++ r/sysvars_innodb,32bit.result~ -@@ -53,7 +53,7 @@ +--- suite/sys_vars/r/sysvars_innodb.result ++++ suite/sys_vars/r/sysvars_innodb.result +@@ -54,7 +54,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 8 VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT Number of InnoDB Adapative Hash Index Partitions. (default = 8). + VARIABLE_COMMENT Number of InnoDB Adaptive Hash Index Partitions (default 8) NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 512 -@@ -67,7 +67,7 @@ +@@ -68,7 +68,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 150000 VARIABLE_SCOPE GLOBAL @@ -18,7 +18,7 @@ VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1000000 -@@ -81,7 +81,7 @@ +@@ -82,7 +82,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 5 VARIABLE_SCOPE GLOBAL @@ -27,16 +27,7 @@ VARIABLE_COMMENT Background commit interval in seconds NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1073741824 -@@ -137,7 +137,7 @@ - GLOBAL_VALUE_ORIGIN COMPILE-TIME - DEFAULT_VALUE 0 - VARIABLE_SCOPE GLOBAL --VARIABLE_TYPE BIGINT UNSIGNED -+VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT InnoDB API transaction isolation level - NUMERIC_MIN_VALUE 0 - NUMERIC_MAX_VALUE 3 -@@ -151,7 +151,7 @@ +@@ -152,7 +152,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 64 VARIABLE_SCOPE GLOBAL @@ -45,7 +36,7 @@ VARIABLE_COMMENT Data file autoextend increment in megabytes NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1000 -@@ -165,7 +165,7 @@ +@@ -166,7 +166,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL @@ -54,7 +45,7 @@ VARIABLE_COMMENT The AUTOINC lock modes supported by InnoDB: 0 => Old style AUTOINC locking (for backward compatibility); 1 => New style AUTOINC locking; 2 => No AUTOINC locking (unsafe for SBR) NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 2 -@@ -249,10 +249,10 @@ +@@ -250,10 +250,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 134217728 VARIABLE_SCOPE GLOBAL @@ -67,7 +58,7 @@ NUMERIC_BLOCK_SIZE 1048576 ENUM_VALUE_LIST NULL READ_ONLY YES -@@ -291,7 +291,7 @@ +@@ -292,7 +292,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 25 VARIABLE_SCOPE GLOBAL @@ -76,7 +67,7 @@ VARIABLE_COMMENT Dump only the hottest N% of each buffer pool, defaults to 25 NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 100 -@@ -333,7 +333,7 @@ +@@ -334,7 +334,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -85,7 +76,7 @@ VARIABLE_COMMENT Number of buffer pool instances, set to higher value on high-end machines to increase scalability NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 64 -@@ -403,7 +403,7 @@ +@@ -404,7 +404,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -94,7 +85,7 @@ VARIABLE_COMMENT A number between [0, 100] that tells how oftern buffer pool dump status in percentages should be printed. E.g. 10 means that buffer pool dump status is printed when every 10% of number of buffer pool pages are dumped. Default is 0 (only start and end status is printed). NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 100 -@@ -515,7 +515,7 @@ +@@ -516,7 +516,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -103,7 +94,7 @@ VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1000 -@@ -543,7 +543,7 @@ +@@ -558,7 +558,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 5 VARIABLE_SCOPE GLOBAL @@ -112,7 +103,7 @@ VARIABLE_COMMENT If the compression failure rate of a table is greater than this number more padding is added to the pages to reduce the failures. A value of zero implies no padding NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 100 -@@ -571,7 +571,7 @@ +@@ -586,7 +586,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 50 VARIABLE_SCOPE GLOBAL @@ -121,7 +112,7 @@ VARIABLE_COMMENT Percentage of empty space on a data page that can be reserved to make the page compressible. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 75 -@@ -599,10 +599,10 @@ +@@ -600,10 +600,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 5000 VARIABLE_SCOPE GLOBAL @@ -134,7 +125,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -837,7 +837,7 @@ +@@ -852,7 +852,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 120 VARIABLE_SCOPE GLOBAL @@ -143,7 +134,7 @@ VARIABLE_COMMENT Number of pages reserved in doublewrite buffer for batch flushing NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 127 -@@ -921,7 +921,7 @@ +@@ -936,7 +936,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL @@ -152,7 +143,7 @@ VARIABLE_COMMENT Speeds up the shutdown process of the InnoDB storage engine. Possible values are 0, 1 (faster) or 2 (fastest - crash-like). NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 2 -@@ -935,7 +935,7 @@ +@@ -950,7 +950,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 600 VARIABLE_SCOPE GLOBAL @@ -161,7 +152,7 @@ VARIABLE_COMMENT Maximum number of seconds that semaphore times out in InnoDB. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -1005,7 +1005,7 @@ +@@ -1020,7 +1020,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 100 VARIABLE_SCOPE GLOBAL @@ -170,7 +161,7 @@ VARIABLE_COMMENT Percentage of B-tree page filled during bulk insert NUMERIC_MIN_VALUE 10 NUMERIC_MAX_VALUE 100 -@@ -1019,7 +1019,7 @@ +@@ -1034,7 +1034,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -179,7 +170,7 @@ VARIABLE_COMMENT Make the first page of the given tablespace dirty. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -1033,7 +1033,7 @@ +@@ -1048,7 +1048,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 30 VARIABLE_SCOPE GLOBAL @@ -188,7 +179,7 @@ VARIABLE_COMMENT Number of iterations over which the background flushing is averaged. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1000 -@@ -1061,7 +1061,7 @@ +@@ -1076,7 +1076,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL @@ -197,7 +188,7 @@ VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 3 -@@ -1089,7 +1089,7 @@ +@@ -1104,7 +1104,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL @@ -206,7 +197,7 @@ VARIABLE_COMMENT Set to 0 (don't flush neighbors from buffer pool), 1 (flush contiguous neighbors from buffer pool) or 2 (flush neighbors from buffer pool), when flushing a block NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 2 -@@ -1145,7 +1145,7 @@ +@@ -1160,7 +1160,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -215,16 +206,7 @@ VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 6 -@@ -1159,7 +1159,7 @@ - GLOBAL_VALUE_ORIGIN COMPILE-TIME - DEFAULT_VALUE 0 - VARIABLE_SCOPE GLOBAL --VARIABLE_TYPE BIGINT UNSIGNED -+VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT Kills the server during crash recovery. - NUMERIC_MIN_VALUE 0 - NUMERIC_MAX_VALUE 100 -@@ -1187,7 +1187,7 @@ +@@ -1188,7 +1188,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 8000000 VARIABLE_SCOPE GLOBAL @@ -233,7 +215,7 @@ VARIABLE_COMMENT InnoDB Fulltext search cache size in bytes NUMERIC_MIN_VALUE 1600000 NUMERIC_MAX_VALUE 80000000 -@@ -1229,7 +1229,7 @@ +@@ -1230,7 +1230,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 84 VARIABLE_SCOPE GLOBAL @@ -242,7 +224,7 @@ VARIABLE_COMMENT InnoDB Fulltext search maximum token size in characters NUMERIC_MIN_VALUE 10 NUMERIC_MAX_VALUE 84 -@@ -1243,7 +1243,7 @@ +@@ -1244,7 +1244,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 3 VARIABLE_SCOPE GLOBAL @@ -251,7 +233,7 @@ VARIABLE_COMMENT InnoDB Fulltext search minimum token size in characters NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 16 -@@ -1257,7 +1257,7 @@ +@@ -1258,7 +1258,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 2000 VARIABLE_SCOPE GLOBAL @@ -260,7 +242,7 @@ VARIABLE_COMMENT InnoDB Fulltext search number of words to optimize for each optimize table call NUMERIC_MIN_VALUE 1000 NUMERIC_MAX_VALUE 10000 -@@ -1271,7 +1271,7 @@ +@@ -1272,7 +1272,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 2000000000 VARIABLE_SCOPE GLOBAL @@ -269,7 +251,7 @@ VARIABLE_COMMENT InnoDB Fulltext search query result cache limit in bytes NUMERIC_MIN_VALUE 1000000 NUMERIC_MAX_VALUE 4294967295 -@@ -1299,7 +1299,7 @@ +@@ -1300,7 +1300,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 2 VARIABLE_SCOPE GLOBAL @@ -278,7 +260,7 @@ VARIABLE_COMMENT InnoDB Fulltext search parallel sort degree, will round up to nearest power of 2 number NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 16 -@@ -1313,7 +1313,7 @@ +@@ -1314,7 +1314,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 640000000 VARIABLE_SCOPE GLOBAL @@ -287,7 +269,7 @@ VARIABLE_COMMENT Total memory allocated for InnoDB Fulltext Search cache NUMERIC_MIN_VALUE 32000000 NUMERIC_MAX_VALUE 1600000000 -@@ -1341,7 +1341,7 @@ +@@ -1342,7 +1342,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 100 VARIABLE_SCOPE GLOBAL @@ -296,7 +278,7 @@ VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 100 -@@ -1383,10 +1383,10 @@ +@@ -1384,10 +1384,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 200 VARIABLE_SCOPE GLOBAL @@ -309,7 +291,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1395,12 +1395,12 @@ +@@ -1396,12 +1396,12 @@ SESSION_VALUE NULL GLOBAL_VALUE 2000 GLOBAL_VALUE_ORIGIN COMPILE-TIME @@ -325,7 +307,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1453,7 +1453,7 @@ +@@ -1468,7 +1468,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 50 VARIABLE_SCOPE SESSION @@ -334,7 +316,7 @@ VARIABLE_COMMENT Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1073741824 -@@ -1467,10 +1467,10 @@ +@@ -1482,10 +1482,10 @@ GLOBAL_VALUE_ORIGIN CONFIG DEFAULT_VALUE 16777216 VARIABLE_SCOPE GLOBAL @@ -347,7 +329,7 @@ NUMERIC_BLOCK_SIZE 1024 ENUM_VALUE_LIST NULL READ_ONLY YES -@@ -1523,7 +1523,7 @@ +@@ -1538,7 +1538,7 @@ GLOBAL_VALUE_ORIGIN CONFIG DEFAULT_VALUE 2 VARIABLE_SCOPE GLOBAL @@ -356,7 +338,7 @@ VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion. NUMERIC_MIN_VALUE 2 NUMERIC_MAX_VALUE 100 -@@ -1565,7 +1565,7 @@ +@@ -1580,7 +1580,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 8192 VARIABLE_SCOPE GLOBAL @@ -365,7 +347,7 @@ VARIABLE_COMMENT Redo log write ahead unit size to avoid read-on-write, it should match the OS cache block IO size NUMERIC_MIN_VALUE 512 NUMERIC_MAX_VALUE 16384 -@@ -1579,10 +1579,10 @@ +@@ -1594,10 +1594,10 @@ GLOBAL_VALUE_ORIGIN CONFIG DEFAULT_VALUE 1024 VARIABLE_SCOPE GLOBAL @@ -378,7 +360,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1635,10 +1635,10 @@ +@@ -1650,10 +1650,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -391,7 +373,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1649,7 +1649,7 @@ +@@ -1664,7 +1664,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -400,7 +382,7 @@ VARIABLE_COMMENT Maximum delay of user threads in micro-seconds NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 10000000 -@@ -1747,7 +1747,7 @@ +@@ -1762,7 +1762,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 8 VARIABLE_SCOPE GLOBAL @@ -409,7 +391,7 @@ VARIABLE_COMMENT Number of multi-threaded flush threads NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 64 -@@ -1803,10 +1803,10 @@ +@@ -1818,10 +1818,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -422,7 +404,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY YES -@@ -1831,7 +1831,7 @@ +@@ -1846,7 +1846,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 4 VARIABLE_SCOPE GLOBAL @@ -431,7 +413,7 @@ VARIABLE_COMMENT Page cleaner threads can be from 1 to 64. Default is 4. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 64 -@@ -1859,7 +1859,7 @@ +@@ -1874,7 +1874,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 16 VARIABLE_SCOPE GLOBAL @@ -440,7 +422,7 @@ VARIABLE_COMMENT Number of rw_locks protecting buffer pool page_hash. Rounded up to the next power of 2 NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1024 -@@ -1873,7 +1873,7 @@ +@@ -1888,7 +1888,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 16384 VARIABLE_SCOPE GLOBAL @@ -449,7 +431,7 @@ VARIABLE_COMMENT Page size to use for all InnoDB tablespaces. NUMERIC_MIN_VALUE 4096 NUMERIC_MAX_VALUE 65536 -@@ -1915,7 +1915,7 @@ +@@ -1930,7 +1930,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 300 VARIABLE_SCOPE GLOBAL @@ -458,7 +440,7 @@ VARIABLE_COMMENT Number of UNDO log pages to purge in one batch from the history list. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 5000 -@@ -1929,7 +1929,7 @@ +@@ -1944,7 +1944,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 128 VARIABLE_SCOPE GLOBAL @@ -467,7 +449,7 @@ VARIABLE_COMMENT Dictates rate at which UNDO records are purged. Value N means purge rollback segment(s) on every Nth iteration of purge invocation NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 128 -@@ -1971,7 +1971,7 @@ +@@ -1986,7 +1986,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 4 VARIABLE_SCOPE GLOBAL @@ -476,7 +458,7 @@ VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 4. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 32 -@@ -1999,7 +1999,7 @@ +@@ -2014,7 +2014,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 56 VARIABLE_SCOPE GLOBAL @@ -485,7 +467,7 @@ VARIABLE_COMMENT Number of pages that must be accessed sequentially for InnoDB to trigger a readahead. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 64 -@@ -2013,7 +2013,7 @@ +@@ -2028,7 +2028,7 @@ GLOBAL_VALUE_ORIGIN CONFIG DEFAULT_VALUE 4 VARIABLE_SCOPE GLOBAL @@ -494,7 +476,7 @@ VARIABLE_COMMENT Number of background read I/O threads in InnoDB. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 64 -@@ -2041,10 +2041,10 @@ +@@ -2056,10 +2056,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -507,7 +489,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -2069,7 +2069,7 @@ +@@ -2084,7 +2084,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 128 VARIABLE_SCOPE GLOBAL @@ -516,7 +498,7 @@ VARIABLE_COMMENT Number of undo logs to use (deprecated). NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 128 -@@ -2083,7 +2083,7 @@ +@@ -2098,7 +2098,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -525,7 +507,7 @@ VARIABLE_COMMENT An InnoDB page number. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -2139,7 +2139,7 @@ +@@ -2154,7 +2154,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 1048576 VARIABLE_SCOPE GLOBAL @@ -534,20 +516,7 @@ VARIABLE_COMMENT Memory buffer size for index creation NUMERIC_MIN_VALUE 65536 NUMERIC_MAX_VALUE 67108864 -@@ -2153,10 +2153,10 @@ - GLOBAL_VALUE_ORIGIN COMPILE-TIME - DEFAULT_VALUE 6 - VARIABLE_SCOPE GLOBAL --VARIABLE_TYPE BIGINT UNSIGNED -+VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT Maximum delay between polling for a spin lock (6 by default) - NUMERIC_MIN_VALUE 0 --NUMERIC_MAX_VALUE 18446744073709551615 -+NUMERIC_MAX_VALUE 4294967295 - NUMERIC_BLOCK_SIZE 0 - ENUM_VALUE_LIST NULL - READ_ONLY NO -@@ -2349,7 +2349,7 @@ +@@ -2364,7 +2364,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL @@ -556,7 +525,7 @@ VARIABLE_COMMENT Size of the mutex/lock wait array. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1024 -@@ -2377,10 +2377,10 @@ +@@ -2392,10 +2392,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 30 VARIABLE_SCOPE GLOBAL @@ -569,7 +538,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -2419,7 +2419,7 @@ +@@ -2434,7 +2434,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -578,7 +547,7 @@ VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1000 -@@ -2433,7 +2433,7 @@ +@@ -2448,7 +2448,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 10000 VARIABLE_SCOPE GLOBAL @@ -587,7 +556,7 @@ VARIABLE_COMMENT Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1000000 -@@ -2503,7 +2503,7 @@ +@@ -2518,7 +2518,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 128 VARIABLE_SCOPE GLOBAL @@ -596,7 +565,7 @@ VARIABLE_COMMENT Number of undo logs to use. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 128 -@@ -2531,7 +2531,7 @@ +@@ -2546,7 +2546,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -605,7 +574,7 @@ VARIABLE_COMMENT Number of undo tablespaces to use. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 95 -@@ -2615,7 +2615,7 @@ +@@ -2630,7 +2630,7 @@ GLOBAL_VALUE_ORIGIN CONFIG DEFAULT_VALUE 4 VARIABLE_SCOPE GLOBAL diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index 87e000faf02..a6a36ccf6d6 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -2,6 +2,7 @@ select * from information_schema.system_variables where variable_name like 'innodb%' and variable_name not in ( 'innodb_disallow_writes', # only available WITH_WSREP +'innodb_numa_interleave', # only available WITH_NUMA 'innodb_sched_priority_cleaner', # linux only 'innodb_use_native_aio') # default value depends on OS order by variable_name; @@ -54,7 +55,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 8 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT Number of InnoDB Adapative Hash Index Partitions. (default = 8). +VARIABLE_COMMENT Number of InnoDB Adaptive Hash Index Partitions (default 8) NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 512 NUMERIC_BLOCK_SIZE 0 @@ -75,76 +76,6 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED -VARIABLE_NAME INNODB_API_BK_COMMIT_INTERVAL -SESSION_VALUE NULL -GLOBAL_VALUE 5 -GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 5 -VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT Background commit interval in seconds -NUMERIC_MIN_VALUE 1 -NUMERIC_MAX_VALUE 1073741824 -NUMERIC_BLOCK_SIZE 0 -ENUM_VALUE_LIST NULL -READ_ONLY NO -COMMAND_LINE_ARGUMENT OPTIONAL -VARIABLE_NAME INNODB_API_DISABLE_ROWLOCK -SESSION_VALUE NULL -GLOBAL_VALUE OFF -GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF -VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BOOLEAN -VARIABLE_COMMENT Disable row lock when direct access InnoDB through InnoDB APIs -NUMERIC_MIN_VALUE NULL -NUMERIC_MAX_VALUE NULL -NUMERIC_BLOCK_SIZE NULL -ENUM_VALUE_LIST OFF,ON -READ_ONLY YES -COMMAND_LINE_ARGUMENT NONE -VARIABLE_NAME INNODB_API_ENABLE_BINLOG -SESSION_VALUE NULL -GLOBAL_VALUE OFF -GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF -VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BOOLEAN -VARIABLE_COMMENT Enable binlog for applications direct access InnoDB through InnoDB APIs -NUMERIC_MIN_VALUE NULL -NUMERIC_MAX_VALUE NULL -NUMERIC_BLOCK_SIZE NULL -ENUM_VALUE_LIST OFF,ON -READ_ONLY YES -COMMAND_LINE_ARGUMENT NONE -VARIABLE_NAME INNODB_API_ENABLE_MDL -SESSION_VALUE NULL -GLOBAL_VALUE OFF -GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF -VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BOOLEAN -VARIABLE_COMMENT Enable MDL for applications direct access InnoDB through InnoDB APIs -NUMERIC_MIN_VALUE NULL -NUMERIC_MAX_VALUE NULL -NUMERIC_BLOCK_SIZE NULL -ENUM_VALUE_LIST OFF,ON -READ_ONLY YES -COMMAND_LINE_ARGUMENT NONE -VARIABLE_NAME INNODB_API_TRX_LEVEL -SESSION_VALUE NULL -GLOBAL_VALUE 0 -GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 0 -VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT InnoDB API transaction isolation level -NUMERIC_MIN_VALUE 0 -NUMERIC_MAX_VALUE 3 -NUMERIC_BLOCK_SIZE 0 -ENUM_VALUE_LIST NULL -READ_ONLY NO -COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME INNODB_AUTOEXTEND_INCREMENT SESSION_VALUE NULL GLOBAL_VALUE 64 @@ -525,9 +456,9 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME INNODB_COMPRESSION_ALGORITHM SESSION_VALUE NULL -GLOBAL_VALUE none +GLOBAL_VALUE zlib GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE none +DEFAULT_VALUE zlib VARIABLE_SCOPE GLOBAL VARIABLE_TYPE ENUM VARIABLE_COMMENT Compression algorithm used on page compression. One of: none, zlib, lz4, lzo, lzma, or bzip2 @@ -593,20 +524,6 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL -VARIABLE_NAME INNODB_COMPRESS_DEBUG -SESSION_VALUE NULL -GLOBAL_VALUE none -GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE none -VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE ENUM -VARIABLE_COMMENT Compress all tables, without specifying the COMPRESS table attribute -NUMERIC_MIN_VALUE NULL -NUMERIC_MAX_VALUE NULL -NUMERIC_BLOCK_SIZE NULL -ENUM_VALUE_LIST none,zlib,lz4,lz4hc -READ_ONLY NO -COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME INNODB_CONCURRENCY_TICKETS SESSION_VALUE NULL GLOBAL_VALUE 5000 @@ -641,7 +558,7 @@ GLOBAL_VALUE 0 GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_TYPE INT UNSIGNED VARIABLE_COMMENT InnoDB system tablespace size to be set in recovery. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 @@ -949,7 +866,7 @@ GLOBAL_VALUE 1 GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_TYPE INT UNSIGNED VARIABLE_COMMENT Speeds up the shutdown process of the InnoDB storage engine. Possible values are 0, 1 (faster) or 2 (fastest - crash-like). NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 2 @@ -1181,20 +1098,6 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED -VARIABLE_NAME INNODB_FORCE_RECOVERY_CRASH -SESSION_VALUE NULL -GLOBAL_VALUE 0 -GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 0 -VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT Kills the server during crash recovery. -NUMERIC_MIN_VALUE 0 -NUMERIC_MAX_VALUE 100 -NUMERIC_BLOCK_SIZE 0 -ENUM_VALUE_LIST NULL -READ_ONLY YES -COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME INNODB_FT_AUX_TABLE SESSION_VALUE NULL GLOBAL_VALUE @@ -1398,7 +1301,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE OFF VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BOOLEAN -VARIABLE_COMMENT Enable semaphore request instrumentation. This could have some effect on performance but allows better information on long semaphore wait problems. (Default: not enabled) +VARIABLE_COMMENT DEPRECATED. This setting has no effect. NUMERIC_MIN_VALUE NULL NUMERIC_MAX_VALUE NULL NUMERIC_BLOCK_SIZE NULL @@ -1547,9 +1450,9 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES SESSION_VALUE NULL -GLOBAL_VALUE OFF +GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF +DEFAULT_VALUE ON VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BOOLEAN VARIABLE_COMMENT 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. @@ -1567,7 +1470,7 @@ DEFAULT_VALUE 2 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion. -NUMERIC_MIN_VALUE 2 +NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 100 NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL @@ -2195,10 +2098,10 @@ GLOBAL_VALUE 6 GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 6 VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_TYPE INT UNSIGNED VARIABLE_COMMENT Maximum delay between polling for a spin lock (6 by default) NUMERIC_MIN_VALUE 0 -NUMERIC_MAX_VALUE 18446744073709551615 +NUMERIC_MAX_VALUE 6000 NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO @@ -2583,12 +2486,12 @@ READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME INNODB_USE_ATOMIC_WRITES SESSION_VALUE NULL -GLOBAL_VALUE OFF +GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF +DEFAULT_VALUE ON VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BOOLEAN -VARIABLE_COMMENT Prevent partial page writes, via atomic writes.The option is used to prevent partial writes in case of a crash/poweroff, as faster alternative to doublewrite buffer.Currently this option works only on Linux only with FusionIO device, and directFS filesystem. +VARIABLE_COMMENT Enable atomic writes, instead of using the doublewrite buffer, for files on devices that supports atomic writes. To use this option one must use file_per_table=1, flush_method=O_DIRECT and use_fallocate=1. This option only works on Linux with either FusionIO cards using the directFS filesystem or with Shannon cards using any file system. NUMERIC_MIN_VALUE NULL NUMERIC_MAX_VALUE NULL NUMERIC_BLOCK_SIZE NULL @@ -2625,12 +2528,12 @@ READ_ONLY YES COMMAND_LINE_ARGUMENT NONE VARIABLE_NAME INNODB_USE_TRIM SESSION_VALUE NULL -GLOBAL_VALUE OFF +GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF +DEFAULT_VALUE ON VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BOOLEAN -VARIABLE_COMMENT Use trim. Default FALSE. +VARIABLE_COMMENT Deallocate (punch_hole|trim) unused portions of the page compressed page (on by default) NUMERIC_MIN_VALUE NULL NUMERIC_MAX_VALUE NULL NUMERIC_BLOCK_SIZE NULL diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result index f37ca909836..89a6d8448fc 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result @@ -122,10 +122,10 @@ ENUM_VALUE_LIST OFF,ON READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME BINLOG_ANNOTATE_ROW_EVENTS -SESSION_VALUE OFF -GLOBAL_VALUE OFF +SESSION_VALUE ON +GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF +DEFAULT_VALUE ON VARIABLE_SCOPE SESSION VARIABLE_TYPE BOOLEAN VARIABLE_COMMENT Tells the master to annotate RBR events with the statement that caused these events @@ -206,10 +206,10 @@ ENUM_VALUE_LIST OFF,ON READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME BINLOG_FORMAT -SESSION_VALUE STATEMENT -GLOBAL_VALUE STATEMENT +SESSION_VALUE MIXED +GLOBAL_VALUE MIXED GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE STATEMENT +DEFAULT_VALUE MIXED VARIABLE_SCOPE SESSION VARIABLE_TYPE ENUM VARIABLE_COMMENT What form of binary logging the master will use: either ROW for row-based binary logging, STATEMENT for statement-based binary logging, or MIXED. MIXED is statement-based binary logging except for those statements where only row-based is correct: those which involve user-defined functions (i.e. UDFs) or the UUID() function; for those, row-based binary logging is automatically used. @@ -1004,13 +1004,13 @@ ENUM_VALUE_LIST NULL READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME GROUP_CONCAT_MAX_LEN -SESSION_VALUE 1024 -GLOBAL_VALUE 1024 +SESSION_VALUE 1048576 +GLOBAL_VALUE 1048576 GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 1024 +DEFAULT_VALUE 1048576 VARIABLE_SCOPE SESSION VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT() +VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT() NUMERIC_MIN_VALUE 4 NUMERIC_MAX_VALUE 18446744073709551615 NUMERIC_BLOCK_SIZE 1 @@ -1592,10 +1592,10 @@ ENUM_VALUE_LIST OFF,ON READ_ONLY YES COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME LOCK_WAIT_TIMEOUT -SESSION_VALUE 31536000 -GLOBAL_VALUE 31536000 +SESSION_VALUE 86400 +GLOBAL_VALUE 86400 GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 31536000 +DEFAULT_VALUE 86400 VARIABLE_SCOPE SESSION VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Timeout in seconds to wait for a lock before returning an error. @@ -1705,9 +1705,9 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME LOG_SLOW_ADMIN_STATEMENTS SESSION_VALUE NULL -GLOBAL_VALUE OFF +GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF +DEFAULT_VALUE ON VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BOOLEAN VARIABLE_COMMENT Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open. @@ -1747,9 +1747,9 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME LOG_SLOW_SLAVE_STATEMENTS SESSION_VALUE NULL -GLOBAL_VALUE OFF +GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF +DEFAULT_VALUE ON VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BOOLEAN VARIABLE_COMMENT Log slow statements executed by slave thread to the slow log if it is open. @@ -1774,10 +1774,10 @@ ENUM_VALUE_LIST innodb,query_plan,explain READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME LOG_WARNINGS -SESSION_VALUE 1 -GLOBAL_VALUE 1 +SESSION_VALUE 2 +GLOBAL_VALUE 2 GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 1 +DEFAULT_VALUE 2 VARIABLE_SCOPE SESSION VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Log some not critical warnings to the general log file.Value can be between 0 and 11. Higher values mean more verbosity @@ -1816,10 +1816,10 @@ ENUM_VALUE_LIST OFF,ON READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME MAX_ALLOWED_PACKET -SESSION_VALUE 4194304 -GLOBAL_VALUE 4194304 +SESSION_VALUE 16777216 +GLOBAL_VALUE 16777216 GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 4194304 +DEFAULT_VALUE 16777216 VARIABLE_SCOPE SESSION VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Max packet length to send to or receive from the server @@ -1999,7 +1999,7 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_LONG_DATA_SIZE SESSION_VALUE NULL -GLOBAL_VALUE 4194304 +GLOBAL_VALUE 16777216 GLOBAL_VALUE_ORIGIN AUTO DEFAULT_VALUE 1048576 VARIABLE_SCOPE GLOBAL @@ -2053,6 +2053,20 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED +VARIABLE_NAME MAX_SESSION_MEM_USED +SESSION_VALUE 9223372036854775807 +GLOBAL_VALUE 9223372036854775807 +GLOBAL_VALUE_ORIGIN COMPILE-TIME +DEFAULT_VALUE 9223372036854775807 +VARIABLE_SCOPE SESSION +VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_COMMENT Amount of memory a single user session is allowed to allocate. This limits the value of the session variable MEM_USED +NUMERIC_MIN_VALUE 8192 +NUMERIC_MAX_VALUE 18446744073709551615 +NUMERIC_BLOCK_SIZE 1 +ENUM_VALUE_LIST NULL +READ_ONLY NO +COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_SORT_LENGTH SESSION_VALUE 1024 GLOBAL_VALUE 1024 @@ -2088,7 +2102,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0.000000 VARIABLE_SCOPE SESSION VARIABLE_TYPE DOUBLE -VARIABLE_COMMENT A SELECT query that have taken more than max_statement_time seconds will be aborted. The argument will be treated as a decimal value with microsecond precision. A value of 0 (default) means no timeout +VARIABLE_COMMENT A query that has taken more than max_statement_time seconds will be aborted. The argument will be treated as a decimal value with microsecond precision. A value of 0 (default) means no timeout NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 31536000 NUMERIC_BLOCK_SIZE NULL @@ -2265,9 +2279,9 @@ READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MYISAM_RECOVER_OPTIONS SESSION_VALUE NULL -GLOBAL_VALUE DEFAULT +GLOBAL_VALUE BACKUP,QUICK GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE DEFAULT +DEFAULT_VALUE BACKUP,QUICK VARIABLE_SCOPE GLOBAL VARIABLE_TYPE SET VARIABLE_COMMENT Specifies how corrupted tables should be automatically repaired @@ -2853,9 +2867,9 @@ READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES SESSION_VALUE NULL -GLOBAL_VALUE 185 +GLOBAL_VALUE 187 GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 185 +DEFAULT_VALUE 187 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Maximum number of statement instruments. @@ -3609,9 +3623,9 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME SQL_MODE SESSION_VALUE ANSI_QUOTES -GLOBAL_VALUE NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +GLOBAL_VALUE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +DEFAULT_VALUE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION VARIABLE_SCOPE SESSION VARIABLE_TYPE SET VARIABLE_COMMENT Sets the sql mode @@ -3789,14 +3803,14 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT NULL -VARIABLE_NAME STANDARDS_COMPLIANT_CTE +VARIABLE_NAME STANDARD_COMPLIANT_CTE SESSION_VALUE ON GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE ON VARIABLE_SCOPE SESSION VARIABLE_TYPE BOOLEAN -VARIABLE_COMMENT Allow only standards compiant CTE +VARIABLE_COMMENT Allow only CTEs compliant to SQL standard NUMERIC_MIN_VALUE NULL NUMERIC_MAX_VALUE NULL NUMERIC_BLOCK_SIZE NULL diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result index 15373702057..c4018b39a8f 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result @@ -122,10 +122,10 @@ ENUM_VALUE_LIST OFF,ON READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME BINLOG_ANNOTATE_ROW_EVENTS -SESSION_VALUE OFF -GLOBAL_VALUE OFF +SESSION_VALUE ON +GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF +DEFAULT_VALUE ON VARIABLE_SCOPE SESSION VARIABLE_TYPE BOOLEAN VARIABLE_COMMENT Tells the master to annotate RBR events with the statement that caused these events @@ -206,10 +206,10 @@ ENUM_VALUE_LIST OFF,ON READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME BINLOG_FORMAT -SESSION_VALUE STATEMENT -GLOBAL_VALUE STATEMENT +SESSION_VALUE MIXED +GLOBAL_VALUE MIXED GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE STATEMENT +DEFAULT_VALUE MIXED VARIABLE_SCOPE SESSION VARIABLE_TYPE ENUM VARIABLE_COMMENT What form of binary logging the master will use: either ROW for row-based binary logging, STATEMENT for statement-based binary logging, or MIXED. MIXED is statement-based binary logging except for those statements where only row-based is correct: those which involve user-defined functions (i.e. UDFs) or the UUID() function; for those, row-based binary logging is automatically used. @@ -1032,13 +1032,13 @@ ENUM_VALUE_LIST NULL READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME GROUP_CONCAT_MAX_LEN -SESSION_VALUE 1024 -GLOBAL_VALUE 1024 +SESSION_VALUE 1048576 +GLOBAL_VALUE 1048576 GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 1024 +DEFAULT_VALUE 1048576 VARIABLE_SCOPE SESSION VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT() +VARIABLE_COMMENT The maximum length of the result of function GROUP_CONCAT() NUMERIC_MIN_VALUE 4 NUMERIC_MAX_VALUE 18446744073709551615 NUMERIC_BLOCK_SIZE 1 @@ -1718,10 +1718,10 @@ ENUM_VALUE_LIST OFF,ON READ_ONLY YES COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME LOCK_WAIT_TIMEOUT -SESSION_VALUE 31536000 -GLOBAL_VALUE 31536000 +SESSION_VALUE 86400 +GLOBAL_VALUE 86400 GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 31536000 +DEFAULT_VALUE 86400 VARIABLE_SCOPE SESSION VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Timeout in seconds to wait for a lock before returning an error. @@ -1873,9 +1873,9 @@ READ_ONLY YES COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME LOG_SLOW_ADMIN_STATEMENTS SESSION_VALUE NULL -GLOBAL_VALUE OFF +GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF +DEFAULT_VALUE ON VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BOOLEAN VARIABLE_COMMENT Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open. @@ -1915,9 +1915,9 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME LOG_SLOW_SLAVE_STATEMENTS SESSION_VALUE NULL -GLOBAL_VALUE OFF +GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF +DEFAULT_VALUE ON VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BOOLEAN VARIABLE_COMMENT Log slow statements executed by slave thread to the slow log if it is open. @@ -1942,10 +1942,10 @@ ENUM_VALUE_LIST innodb,query_plan,explain READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME LOG_WARNINGS -SESSION_VALUE 1 -GLOBAL_VALUE 1 +SESSION_VALUE 2 +GLOBAL_VALUE 2 GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 1 +DEFAULT_VALUE 2 VARIABLE_SCOPE SESSION VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Log some not critical warnings to the general log file.Value can be between 0 and 11. Higher values mean more verbosity @@ -1998,10 +1998,10 @@ ENUM_VALUE_LIST OFF,ON READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME MAX_ALLOWED_PACKET -SESSION_VALUE 4194304 -GLOBAL_VALUE 4194304 +SESSION_VALUE 16777216 +GLOBAL_VALUE 16777216 GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 4194304 +DEFAULT_VALUE 16777216 VARIABLE_SCOPE SESSION VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Max packet length to send to or receive from the server @@ -2181,7 +2181,7 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_LONG_DATA_SIZE SESSION_VALUE NULL -GLOBAL_VALUE 4194304 +GLOBAL_VALUE 16777216 GLOBAL_VALUE_ORIGIN AUTO DEFAULT_VALUE 1048576 VARIABLE_SCOPE GLOBAL @@ -2249,6 +2249,20 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED +VARIABLE_NAME MAX_SESSION_MEM_USED +SESSION_VALUE 9223372036854775807 +GLOBAL_VALUE 9223372036854775807 +GLOBAL_VALUE_ORIGIN COMPILE-TIME +DEFAULT_VALUE 9223372036854775807 +VARIABLE_SCOPE SESSION +VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_COMMENT Amount of memory a single user session is allowed to allocate. This limits the value of the session variable MEM_USED +NUMERIC_MIN_VALUE 8192 +NUMERIC_MAX_VALUE 18446744073709551615 +NUMERIC_BLOCK_SIZE 1 +ENUM_VALUE_LIST NULL +READ_ONLY NO +COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MAX_SORT_LENGTH SESSION_VALUE 1024 GLOBAL_VALUE 1024 @@ -2284,7 +2298,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0.000000 VARIABLE_SCOPE SESSION VARIABLE_TYPE DOUBLE -VARIABLE_COMMENT A SELECT query that have taken more than max_statement_time seconds will be aborted. The argument will be treated as a decimal value with microsecond precision. A value of 0 (default) means no timeout +VARIABLE_COMMENT A query that has taken more than max_statement_time seconds will be aborted. The argument will be treated as a decimal value with microsecond precision. A value of 0 (default) means no timeout NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 31536000 NUMERIC_BLOCK_SIZE NULL @@ -2461,9 +2475,9 @@ READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME MYISAM_RECOVER_OPTIONS SESSION_VALUE NULL -GLOBAL_VALUE DEFAULT +GLOBAL_VALUE BACKUP,QUICK GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE DEFAULT +DEFAULT_VALUE BACKUP,QUICK VARIABLE_SCOPE GLOBAL VARIABLE_TYPE SET VARIABLE_COMMENT Specifies how corrupted tables should be automatically repaired @@ -3049,9 +3063,9 @@ READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES SESSION_VALUE NULL -GLOBAL_VALUE 185 +GLOBAL_VALUE 187 GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 185 +DEFAULT_VALUE 187 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT Maximum number of statement instruments. @@ -3623,9 +3637,9 @@ READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME REPLICATE_ANNOTATE_ROW_EVENTS SESSION_VALUE NULL -GLOBAL_VALUE OFF +GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE OFF +DEFAULT_VALUE ON VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BOOLEAN VARIABLE_COMMENT Tells the slave to write annotate rows events received from the master to its own binary log. Ignored if log_slave_updates is not set @@ -4073,7 +4087,7 @@ VARIABLE_NAME SLAVE_NET_TIMEOUT SESSION_VALUE NULL GLOBAL_VALUE 120 GLOBAL_VALUE_ORIGIN CONFIG -DEFAULT_VALUE 3600 +DEFAULT_VALUE 60 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE INT UNSIGNED VARIABLE_COMMENT Number of seconds to wait for more data from any master/slave connection before aborting the read @@ -4351,9 +4365,9 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME SQL_MODE SESSION_VALUE ANSI_QUOTES -GLOBAL_VALUE NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +GLOBAL_VALUE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +DEFAULT_VALUE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION VARIABLE_SCOPE SESSION VARIABLE_TYPE SET VARIABLE_COMMENT Sets the sql mode @@ -4545,14 +4559,14 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED -VARIABLE_NAME STANDARDS_COMPLIANT_CTE +VARIABLE_NAME STANDARD_COMPLIANT_CTE SESSION_VALUE ON GLOBAL_VALUE ON GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE ON VARIABLE_SCOPE SESSION VARIABLE_TYPE BOOLEAN -VARIABLE_COMMENT Allow only standards compiant CTE +VARIABLE_COMMENT Allow only CTEs compliant to SQL standard NUMERIC_MIN_VALUE NULL NUMERIC_MAX_VALUE NULL NUMERIC_BLOCK_SIZE NULL @@ -4771,9 +4785,9 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME THREAD_POOL_MAX_THREADS SESSION_VALUE NULL -GLOBAL_VALUE 1000 +GLOBAL_VALUE 65536 GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE 1000 +DEFAULT_VALUE 65536 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE INT UNSIGNED VARIABLE_COMMENT Maximum allowed number of worker threads in the thread pool diff --git a/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result b/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result index 289c0d56092..5622d97cb68 100644 --- a/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result +++ b/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result @@ -1,21 +1,21 @@ SET @start_global_value = @@global.thread_pool_max_threads; select @@global.thread_pool_max_threads; @@global.thread_pool_max_threads -1000 +65536 select @@session.thread_pool_max_threads; ERROR HY000: Variable 'thread_pool_max_threads' is a GLOBAL variable show global variables like 'thread_pool_max_threads'; Variable_name Value -thread_pool_max_threads 1000 +thread_pool_max_threads 65536 show session variables like 'thread_pool_max_threads'; Variable_name Value -thread_pool_max_threads 1000 +thread_pool_max_threads 65536 select * from information_schema.global_variables where variable_name='thread_pool_max_threads'; VARIABLE_NAME VARIABLE_VALUE -THREAD_POOL_MAX_THREADS 1000 +THREAD_POOL_MAX_THREADS 65536 select * from information_schema.session_variables where variable_name='thread_pool_max_threads'; VARIABLE_NAME VARIABLE_VALUE -THREAD_POOL_MAX_THREADS 1000 +THREAD_POOL_MAX_THREADS 65536 set global thread_pool_max_threads=1; select @@global.thread_pool_max_threads; @@global.thread_pool_max_threads diff --git a/mysql-test/suite/sys_vars/t/innodb_api_bk_commit_interval_basic.test b/mysql-test/suite/sys_vars/t/innodb_api_bk_commit_interval_basic.test deleted file mode 100644 index 7c9ae6395be..00000000000 --- a/mysql-test/suite/sys_vars/t/innodb_api_bk_commit_interval_basic.test +++ /dev/null @@ -1,85 +0,0 @@ -# -# 2012-08-01 Added -# - ---source include/have_innodb.inc - -SET @start_global_value = @@global.innodb_api_bk_commit_interval; -SELECT @start_global_value; - -# -# exists as global only -# ---echo Valid values are positive number -SELECT @@global.innodb_api_bk_commit_interval > 0; -SELECT @@global.innodb_api_bk_commit_interval <= 1024*1024*1024; -SELECT @@global.innodb_api_bk_commit_interval; - ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT @@session.innodb_api_bk_commit_interval; -SHOW global variables LIKE 'innodb_api_bk_commit_interval'; -SHOW session variables LIKE 'innodb_api_bk_commit_interval'; ---disable_warnings -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_api_bk_commit_interval'; -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_api_bk_commit_interval'; ---enable_warnings - -# -# show that it's writable -# -SET global innodb_api_bk_commit_interval=100; -SELECT @@global.innodb_api_bk_commit_interval; ---disable_warnings -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_api_bk_commit_interval'; -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_api_bk_commit_interval'; ---enable_warnings ---error ER_GLOBAL_VARIABLE -SET session innodb_api_bk_commit_interval=1; -# -# Valid values -# -SET global innodb_api_bk_commit_interval=1; -SELECT @@global.innodb_api_bk_commit_interval; -SET global innodb_api_bk_commit_interval=100000; -SELECT @@global.innodb_api_bk_commit_interval; -SET global innodb_api_bk_commit_interval=1073741824; -SELECT @@global.innodb_api_bk_commit_interval; - -# -# Invalid values -# -SET global innodb_api_bk_commit_interval=0; -SELECT @@global.innodb_api_bk_commit_interval; -SET global innodb_api_bk_commit_interval=-1024; -SELECT @@global.innodb_api_bk_commit_interval; -SET global innodb_api_bk_commit_interval=1073741825; -SELECT @@global.innodb_api_bk_commit_interval; -SET global innodb_api_bk_commit_interval=4294967295; -SELECT @@global.innodb_api_bk_commit_interval; - -# -# incorrect types -# ---error ER_WRONG_TYPE_FOR_VAR -SET global innodb_api_bk_commit_interval=1.1; ---error ER_WRONG_TYPE_FOR_VAR -SET global innodb_api_bk_commit_interval=1e1; ---error ER_WRONG_TYPE_FOR_VAR -SET global innodb_api_bk_commit_interval="foo"; -SET global innodb_api_bk_commit_interval=-7; -SELECT @@global.innodb_api_bk_commit_interval; ---disable_warnings -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_api_bk_commit_interval'; ---enable_warnings - -# -# cleanup -# - -SET @@global.innodb_api_bk_commit_interval = @start_global_value; -SELECT @@global.innodb_api_bk_commit_interval; diff --git a/mysql-test/suite/sys_vars/t/innodb_api_disable_rowlock_basic.test b/mysql-test/suite/sys_vars/t/innodb_api_disable_rowlock_basic.test deleted file mode 100644 index 42e9903df5e..00000000000 --- a/mysql-test/suite/sys_vars/t/innodb_api_disable_rowlock_basic.test +++ /dev/null @@ -1,106 +0,0 @@ - - -################## mysql-test\t\innodb_api_disable_rowlock_basic.test ############## -# # -# Variable Name: innodb_api_disable_rowlock # -# Scope: Global # -# Access Type: Static # -# Data Type: numeric # -# # -# # -# Creation Date: 2008-02-07 # -# Author : Sharique Abdullah # -# # -# # -# Description:Test Cases of Dynamic System Variable innodb_api_disable_rowlock # -# that checks the behavior of this variable in the following ways # -# * Value Check # -# * Scope Check # -# # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-system-variables.html # -# # -############################################################################### - ---source include/have_innodb.inc - ---echo '#---------------------BS_STVARS_035_01----------------------#' -#################################################################### -# Displaying default value # -#################################################################### -SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock); ---echo 1 Expected - - ---echo '#---------------------BS_STVARS_035_02----------------------#' -#################################################################### -# Check if Value can set # -#################################################################### - ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@GLOBAL.innodb_api_disable_rowlock=1; ---echo Expected error 'Read only variable' - -SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock); ---echo 1 Expected - - - - ---echo '#---------------------BS_STVARS_035_03----------------------#' -################################################################# -# Check if the value in GLOBAL Table matches value in variable # -################################################################# - ---disable_warnings -SELECT IF(@@GLOBAL.innodb_api_disable_rowlock, 'ON', 'OFF') = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='innodb_api_disable_rowlock'; ---enable_warnings ---echo 1 Expected - -SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock); ---echo 1 Expected - ---disable_warnings -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='innodb_api_disable_rowlock'; ---enable_warnings ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_035_04----------------------#' -################################################################################ -# Check if accessing variable with and without GLOBAL point to same variable # -################################################################################ -SELECT @@innodb_api_disable_rowlock = @@GLOBAL.innodb_api_enable_binlog; ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_035_05----------------------#' -################################################################################ -# Check if innodb_log_file_size can be accessed with and without @@ sign # -################################################################################ - -SELECT COUNT(@@innodb_api_disable_rowlock); ---echo 1 Expected - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@local.innodb_api_disable_rowlock); ---echo Expected error 'Variable is a GLOBAL variable' - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@SESSION.innodb_api_disable_rowlock); ---echo Expected error 'Variable is a GLOBAL variable' - -SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock); ---echo 1 Expected - ---Error ER_BAD_FIELD_ERROR -SELECT innodb_api_disable_rowlock = @@SESSION.innodb_api_enable_binlog; ---echo Expected error 'Readonly variable' - - diff --git a/mysql-test/suite/sys_vars/t/innodb_api_enable_binlog_basic.test b/mysql-test/suite/sys_vars/t/innodb_api_enable_binlog_basic.test deleted file mode 100644 index e88d8ecac5c..00000000000 --- a/mysql-test/suite/sys_vars/t/innodb_api_enable_binlog_basic.test +++ /dev/null @@ -1,106 +0,0 @@ - - -################## mysql-test\t\innodb_api_enable_binlog_basic.test ############## -# # -# Variable Name: innodb_api_enable_binlog # -# Scope: Global # -# Access Type: Static # -# Data Type: numeric # -# # -# # -# Creation Date: 2008-02-07 # -# Author : Sharique Abdullah # -# # -# # -# Description:Test Cases of Dynamic System Variable innodb_api_enable_binlog # -# that checks the behavior of this variable in the following ways # -# * Value Check # -# * Scope Check # -# # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-system-variables.html # -# # -############################################################################### - ---source include/have_innodb.inc - ---echo '#---------------------BS_STVARS_035_01----------------------#' -#################################################################### -# Displaying default value # -#################################################################### -SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog); ---echo 1 Expected - - ---echo '#---------------------BS_STVARS_035_02----------------------#' -#################################################################### -# Check if Value can set # -#################################################################### - ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@GLOBAL.innodb_api_enable_binlog=1; ---echo Expected error 'Read only variable' - -SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog); ---echo 1 Expected - - - - ---echo '#---------------------BS_STVARS_035_03----------------------#' -################################################################# -# Check if the value in GLOBAL Table matches value in variable # -################################################################# - ---disable_warnings -SELECT IF(@@GLOBAL.innodb_api_enable_binlog, 'ON', 'OFF') = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='innodb_api_enable_binlog'; ---enable_warnings ---echo 1 Expected - -SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog); ---echo 1 Expected - ---disable_warnings -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='innodb_api_enable_binlog'; ---enable_warnings ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_035_04----------------------#' -################################################################################ -# Check if accessing variable with and without GLOBAL point to same variable # -################################################################################ -SELECT @@innodb_api_enable_binlog = @@GLOBAL.innodb_api_enable_binlog; ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_035_05----------------------#' -################################################################################ -# Check if innodb_log_file_size can be accessed with and without @@ sign # -################################################################################ - -SELECT COUNT(@@innodb_api_enable_binlog); ---echo 1 Expected - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@local.innodb_api_enable_binlog); ---echo Expected error 'Variable is a GLOBAL variable' - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@SESSION.innodb_api_enable_binlog); ---echo Expected error 'Variable is a GLOBAL variable' - -SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog); ---echo 1 Expected - ---Error ER_BAD_FIELD_ERROR -SELECT innodb_api_enable_binlog = @@SESSION.innodb_api_enable_binlog; ---echo Expected error 'Readonly variable' - - diff --git a/mysql-test/suite/sys_vars/t/innodb_api_enable_mdl_basic.test b/mysql-test/suite/sys_vars/t/innodb_api_enable_mdl_basic.test deleted file mode 100644 index d3086878d6a..00000000000 --- a/mysql-test/suite/sys_vars/t/innodb_api_enable_mdl_basic.test +++ /dev/null @@ -1,106 +0,0 @@ - - -################## mysql-test\t\innodb_api_enable_mdl_basic.test ############## -# # -# Variable Name: innodb_api_enable_mdl # -# Scope: Global # -# Access Type: Static # -# Data Type: numeric # -# # -# # -# Creation Date: 2008-02-07 # -# Author : Sharique Abdullah # -# # -# # -# Description:Test Cases of Dynamic System Variable innodb_api_enable_mdl # -# that checks the behavior of this variable in the following ways # -# * Value Check # -# * Scope Check # -# # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-system-variables.html # -# # -############################################################################### - ---source include/have_innodb.inc - ---echo '#---------------------BS_STVARS_035_01----------------------#' -#################################################################### -# Displaying default value # -#################################################################### -SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl); ---echo 1 Expected - - ---echo '#---------------------BS_STVARS_035_02----------------------#' -#################################################################### -# Check if Value can set # -#################################################################### - ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@GLOBAL.innodb_api_enable_mdl=1; ---echo Expected error 'Read only variable' - -SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl); ---echo 1 Expected - - - - ---echo '#---------------------BS_STVARS_035_03----------------------#' -################################################################# -# Check if the value in GLOBAL Table matches value in variable # -################################################################# - ---disable_warnings -SELECT IF(@@GLOBAL.innodb_api_enable_mdl, 'ON', 'OFF') = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='innodb_api_enable_mdl'; ---enable_warnings ---echo 1 Expected - -SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl); ---echo 1 Expected - ---disable_warnings -SELECT COUNT(VARIABLE_VALUE) -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='innodb_api_enable_mdl'; ---enable_warnings ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_035_04----------------------#' -################################################################################ -# Check if accessing variable with and without GLOBAL point to same variable # -################################################################################ -SELECT @@innodb_api_enable_mdl = @@GLOBAL.innodb_api_enable_mdl; ---echo 1 Expected - - - ---echo '#---------------------BS_STVARS_035_05----------------------#' -################################################################################ -# Check if innodb_log_file_size can be accessed with and without @@ sign # -################################################################################ - -SELECT COUNT(@@innodb_api_enable_mdl); ---echo 1 Expected - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@local.innodb_api_enable_mdl); ---echo Expected error 'Variable is a GLOBAL variable' - ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT COUNT(@@SESSION.innodb_api_enable_mdl); ---echo Expected error 'Variable is a GLOBAL variable' - -SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl); ---echo 1 Expected - ---Error ER_BAD_FIELD_ERROR -SELECT innodb_api_enable_mdl = @@SESSION.innodb_api_enable_mdl; ---echo Expected error 'Readonly variable' - - diff --git a/mysql-test/suite/sys_vars/t/innodb_api_trx_level_basic.test b/mysql-test/suite/sys_vars/t/innodb_api_trx_level_basic.test deleted file mode 100644 index c77f8471d7b..00000000000 --- a/mysql-test/suite/sys_vars/t/innodb_api_trx_level_basic.test +++ /dev/null @@ -1,64 +0,0 @@ -# -# 2011-08-01 Added -# - ---source include/have_innodb.inc - -SET @start_global_value = @@global.innodb_api_trx_level; -SELECT @start_global_value; - -# -# exists as global only -# ---echo Valid values are zero or above -SELECT @@global.innodb_api_trx_level >=0; -SELECT @@global.innodb_api_trx_level <=3; -SELECT @@global.innodb_api_trx_level; - ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT @@session.innodb_api_trx_level; -SHOW global variables LIKE 'innodb_api_trx_level'; -SHOW session variables LIKE 'innodb_api_trx_level'; ---disable_warnings -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_api_trx_level'; -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_api_trx_level'; ---enable_warnings - -# -# show that it's writable -# -SET global innodb_api_trx_level=100; -SELECT @@global.innodb_api_trx_level; ---disable_warnings -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_api_trx_level'; -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_api_trx_level'; ---enable_warnings ---error ER_GLOBAL_VARIABLE -SET session innodb_api_trx_level=1; - -# -# incorrect types -# ---error ER_WRONG_TYPE_FOR_VAR -SET global innodb_api_trx_level=1.1; ---error ER_WRONG_TYPE_FOR_VAR -SET global innodb_api_trx_level=1e1; ---error ER_WRONG_TYPE_FOR_VAR -SET global innodb_api_trx_level="foo"; -SET global innodb_api_trx_level=-7; -SELECT @@global.innodb_api_trx_level; ---disable_warnings -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_api_trx_level'; ---enable_warnings - -# -# cleanup -# - -SET @@global.innodb_api_trx_level = @start_global_value; -SELECT @@global.innodb_api_trx_level; diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_function.opt b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_function.opt new file mode 100644 index 00000000000..8d74d91426a --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_function.opt @@ -0,0 +1,6 @@ +--loose-default-storage-engine=innodb +--loose-innodb_buffer_pool_load_at_startup=0 +--loose-innodb_buffer_pool_dump_at_shutdown=0 +--loose-innodb-buffer-pool-size=8M +--loose-innodb-buffer-pool-instances=1 +--loose-innodb-page-size=16k diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_function.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_function.test new file mode 100644 index 00000000000..f682ad2394b --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_function.test @@ -0,0 +1,107 @@ +# +# Functional test for innodb_buffer_pool_dump_pct +# +# From MDEV-11454 the amount dumped is the minimum of: +# * innodb_buffer_pool_dump_pct * Innodb_buffer_pool_pages_total * innodb_page_size +# * innodb_buffer_pool_pages_data * innodb_page_size + +-- source include/have_innodb.inc + +--echo # populate with data + +CREATE TABLE t1 ( +c01 blob, c02 blob, c03 blob, c04 blob, c05 blob, +c06 blob, c07 blob, c08 blob, c09 blob, c10 blob, +c11 blob, c12 blob, c13 blob, c14 blob, c15 blob, +c16 blob, c17 blob, c18 blob, c19 blob, c20 blob, +c21 blob, c22 blob, c23 blob, c24 blob, c25 blob, +c26 blob, c27 blob, c28 blob, c29 blob, c30 blob, +c31 blob, c32 blob, c33 blob, c34 blob, c35 blob, +c36 blob, c37 blob, c38 blob, c39 blob, c40 blob, +c41 blob, c42 blob, c43 blob, c44 blob, c45 blob, +c46 blob, c47 blob, c48 blob, c49 blob, c50 blob, +c51 blob, c52 blob, c53 blob, c54 blob, c55 blob, +c56 blob, c57 blob, c58 blob, c59 blob, c60 blob, +c61 blob, c62 blob, c63 blob, c64 blob +) ROW_FORMAT=dynamic; + +SET @a = repeat('a', 16 * 1024); +INSERT INTO t1 VALUES (@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a,@a, +@a,@a,@a,@a +); + +insert into t1 select * from t1; + +--let $blob_pages=`select count(*) from information_schema.INNODB_BUFFER_PAGE WHERE PAGE_TYPE='BLOB' group by PAGE_TYPE` + +--let $PCT=25 +--eval SET GLOBAL innodb_buffer_pool_dump_pct=$PCT,GLOBAL innodb_fast_shutdown=0, GLOBAL innodb_buffer_pool_dump_at_shutdown=1 + +# Dump on shutdown has been set - shutdown now + +--echo # Restart server +--source include/restart_mysqld.inc + +SET GLOBAL innodb_buffer_pool_load_now=1; + +# Wait fit for the load to complete +let $wait_condition = + SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) load completed at ' + FROM information_schema.global_status + WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status'; +-- source include/wait_condition.inc + + +--let $loaded_blob_pages=`select count(*) from information_schema.INNODB_BUFFER_PAGE WHERE PAGE_TYPE='BLOB' group by PAGE_TYPE` + +--echo # Case 1: Limit from innodb_buffer_pool_dump_pct + +eval SELECT $blob_pages as 'Previous pool pages', + ROUND($PCT / 100 * @@innodb_buffer_pool_size / @@innodb_page_size) as 'Limit', + $loaded_blob_pages as 'Pages saved'; + +--echo # Case 2: blog_pages is the minimum. + +--echo # load buffer pool with entire table. +--disable_result_log +select * from t1; +--enable_result_log + +--let $PCT=75 +eval SET GLOBAL innodb_buffer_pool_dump_pct=$PCT, global innodb_buffer_pool_dump_at_shutdown=1; + +--let $blob_pages=`select count(*) from information_schema.INNODB_BUFFER_PAGE WHERE PAGE_TYPE='BLOB' group by PAGE_TYPE` + +--echo # Restart server +--source include/restart_mysqld.inc + + +SET GLOBAL innodb_buffer_pool_load_now=1; + +# Wait for load +-- source include/wait_condition.inc + +--echo # now loaded + +--let $loaded_blob_pages=`select count(*) from information_schema.INNODB_BUFFER_PAGE WHERE PAGE_TYPE='BLOB' group by PAGE_TYPE` + +eval SELECT $blob_pages as 'Previous pool pages', + ROUND($PCT / 100 * @@innodb_buffer_pool_size / @@innodb_page_size) as 'Limit', + $loaded_blob_pages as 'Pages saved'; + +# Clean up +# +# +--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/ib_buffer_pool +DROP TABLE t1; diff --git a/mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test b/mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test deleted file mode 100644 index cfbd10c4e31..00000000000 --- a/mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test +++ /dev/null @@ -1,30 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug.inc - -# -# exists as global only -# -select @@global.innodb_force_recovery_crash in (0, 1); -select @@global.innodb_force_recovery_crash; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -select @@session.innodb_force_recovery_crash; -show global variables like 'innodb_force_recovery_crash'; -show session variables like 'innodb_force_recovery_crash'; ---disable_warnings -select * from information_schema.global_variables where variable_name='innodb_force_recovery_crash'; -select * from information_schema.session_variables where variable_name='innodb_force_recovery_crash'; ---enable_warnings - -# show that it's read-only -# ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set global innodb_force_recovery_crash=1; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set global innodb_force_recovery_crash=0; -select @@global.innodb_force_recovery_crash; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set session innodb_force_recovery_crash='some'; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set @@session.innodb_force_recovery_crash='some'; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set global innodb_force_recovery_crash='some'; diff --git a/mysql-test/suite/sys_vars/t/innodb_monitor_enable_basic.test b/mysql-test/suite/sys_vars/t/innodb_monitor_enable_basic.test deleted file mode 100644 index 1b23ae14e49..00000000000 --- a/mysql-test/suite/sys_vars/t/innodb_monitor_enable_basic.test +++ /dev/null @@ -1,378 +0,0 @@ -# This is the test for Metrics Monitor Table feature. -# Test the metrics monitor system's control system -# and counter accuracy. - ---source include/have_innodb.inc -set global innodb_monitor_disable = All; -# Test turn on/off the monitor counter with "all" option -# By default, they will be off -select name, status from information_schema.innodb_metrics; - -# Turn on all monitor counters -set global innodb_monitor_enable = all; - -# status should all change to "enabled" -select name from information_schema.innodb_metrics where status!='enabled'; - -# Test wrong argument to the global configure option ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable = aaa; - -# We require a valid monitor counter/module name. There is no default -# counter name or module. A warning will be printed asking user to -# specify a valid counter name. -#--disable_warnings -#set global innodb_monitor_enable = default; -#--enable_warnings - -# Turn off all monitor counters, option name should be case -# insensitive -set global innodb_monitor_disable = All; - -# status should all change to "disabled" -select name from information_schema.innodb_metrics where status!='disabled'; - -# Reset all counter values -set global innodb_monitor_reset_all = all; - -# count should all change to 0 -select name from information_schema.innodb_metrics where count!=0; - -# Test wildcard match, turn on all counters contain string "lock" -set global innodb_monitor_enable = "%lock%"; - -# All lock related counter should be enabled -select name from information_schema.innodb_metrics -where status != IF(name like "%lock%", 'enabled', 'disabled'); - -# Disable them -set global innodb_monitor_disable = "%lock%"; - -# All lock related counter should be disabled -select name, status from information_schema.innodb_metrics -where name like "%lock%"; - -# No match for "%lock*" ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable = "%lock*"; - -# All counters will be turned on with wildcard match string with all "%" -set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%"; - -select name from information_schema.innodb_metrics where status!='enabled'; - -# Turn off all counters -set global innodb_monitor_disable="%%%%%"; - -select name from information_schema.innodb_metrics where status!='disabled'; - -# One more round testing. All counters will be turned on with -# single wildcard character "%" -set global innodb_monitor_enable="%"; - -select name from information_schema.innodb_metrics where status!='enabled'; - -# Turn off all the counters with "%_%" -set global innodb_monitor_disable="%_%"; - -select name from information_schema.innodb_metrics where status!='disabled'; - -# Turn on all counters start with "log" -set global innodb_monitor_enable="log%%%%"; - -select name from information_schema.innodb_metrics -where status != IF(name like "log%", 'enabled', 'disabled'); - -# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_" -# is single character wildcard match word -set global innodb_monitor_enable="os_%a_fs_ncs"; - -# Turn on counters whose name contains "os" and "pending" with -# wildcard match "os%pending%" -set global innodb_monitor_enable="os%pending%"; - -select name, status from information_schema.innodb_metrics -where name like "os%"; - -# Empty string is an invalid option ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable=""; - ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable="_"; - -SET global innodb_monitor_disable = module_metadata; -SET global innodb_monitor_reset_all = module_metadata; - -# Only turn on "table_open" counter -set global innodb_monitor_enable = metadata_table_handles_opened; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb; - -# This will open the monitor_test table -select * from monitor_test; - -# "metadata_table_handles_opened" should increment by 1 -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Reset the counter value while counter is still on (started) -# This will reset value "count_reset" but not -# "count" -set global innodb_monitor_reset = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# re-create table again to increment "metadata_table_handles_opened" again -drop table monitor_test; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb; - -select * from monitor_test; - -# "metadata_table_handles_opened" should increment -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Cannot reset all monitor value while the counter is on -set global innodb_monitor_reset_all = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Turn off the counter "metadata_table_handles_opened" -set global innodb_monitor_disable = metadata_table_handles_opened; - -# Reset the counter value while counter is off (disabled) -set global innodb_monitor_reset = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# re-create table again. Since monitor is off, "metadata_table_handles_opened" -# should not be incremented -drop table monitor_test; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb; - -# "metadata_table_handles_opened" should increment -select * from monitor_test; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Reset all the counters, include those counter *_since_start -set global innodb_monitor_reset_all = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Turn on "table_open" counter again -set global innodb_monitor_enable = metadata_table_handles_opened; - -# Test metadata_table_handles_opened again to see if it is working correctly -# after above round of turning on/off/reset -drop table monitor_test; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb stats_persistent=0; - -select * from monitor_test; - -# "metadata_table_handles_opened" should increment -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Test counter "metadata_table_handles_closed", -# create index will close the old handle -set global innodb_monitor_enable = metadata_table_handles_closed; - -create index idx on monitor_test(col); - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_closed"; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; - -# Reset counters only in "module_metadata" module -set global innodb_monitor_disable = module_metadata; - -set global innodb_monitor_reset = module_metadata; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; - -set global innodb_monitor_reset_all = module_metadata; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; - -# Test Transaction Module -set global innodb_monitor_enable = module_trx; - -begin; -insert into monitor_test values(9); -commit; - -begin; -insert into monitor_test values(9); -rollback; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "trx_rollbacks" or name like "trx_active_transactions"; - -set global innodb_monitor_disable = module_trx; - -# Test DML Module -set global innodb_monitor_enable = module_dml; - -insert into monitor_test values(9); - -update monitor_test set col = 10 where col = 9; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -delete from monitor_test; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status - from information_schema.innodb_metrics - where name like "dml%"; - -# test reset counter while the counter is on -set global innodb_monitor_reset = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# insert/delete some rows after the reset -insert into monitor_test values(9); -insert into monitor_test values(1); - -delete from monitor_test; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# We do not allow reset_all while the counter is on, nothing -# should be reset here -set global innodb_monitor_reset_all = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# Turn off the counter -set global innodb_monitor_disable = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# Reset all counter values -set global innodb_monitor_reset_all = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# Open individual counter "dml_inserts" -set global innodb_monitor_enable = dml_inserts; - -insert into monitor_test values(9); -insert into monitor_test values(1); - -delete from monitor_test; - -# Only counter "dml_inserts" should be updated -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -set global innodb_monitor_disable = module_dml; - -drop table monitor_test; - -set global innodb_monitor_enable = file_num_open_files; - -# Counters are unpredictable when innodb-file-per-table is on ---replace_column 2 # 3 # 4 # 5 # 6 # 7 # -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "file_num_open_files"; - -set global innodb_monitor_disable = file_num_open_files; - -# Test ICP module counters -set global innodb_monitor_enable = "icp%"; - -create table monitor_test(a char(3), b int, c char(2), -primary key (a(1), c(1)), key(b)) engine = innodb; - -insert into monitor_test values("13", 2, "aa"); - -select a from monitor_test where b < 1 for update; - -# should have icp_attempts = 1 and icp_out_of_range = 1 -select name, count from information_schema.innodb_metrics -where name like "icp%"; - -# should have icp_attempts = 2 and icp_match = 1 -select a from monitor_test where b < 3 for update; - -select name, count from information_schema.innodb_metrics -where name like "icp%"; - -drop table monitor_test; -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 diff --git a/mysql-test/suite/sys_vars/t/innodb_monitor_reset_all_basic.test b/mysql-test/suite/sys_vars/t/innodb_monitor_reset_all_basic.test deleted file mode 100644 index 1b23ae14e49..00000000000 --- a/mysql-test/suite/sys_vars/t/innodb_monitor_reset_all_basic.test +++ /dev/null @@ -1,378 +0,0 @@ -# This is the test for Metrics Monitor Table feature. -# Test the metrics monitor system's control system -# and counter accuracy. - ---source include/have_innodb.inc -set global innodb_monitor_disable = All; -# Test turn on/off the monitor counter with "all" option -# By default, they will be off -select name, status from information_schema.innodb_metrics; - -# Turn on all monitor counters -set global innodb_monitor_enable = all; - -# status should all change to "enabled" -select name from information_schema.innodb_metrics where status!='enabled'; - -# Test wrong argument to the global configure option ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable = aaa; - -# We require a valid monitor counter/module name. There is no default -# counter name or module. A warning will be printed asking user to -# specify a valid counter name. -#--disable_warnings -#set global innodb_monitor_enable = default; -#--enable_warnings - -# Turn off all monitor counters, option name should be case -# insensitive -set global innodb_monitor_disable = All; - -# status should all change to "disabled" -select name from information_schema.innodb_metrics where status!='disabled'; - -# Reset all counter values -set global innodb_monitor_reset_all = all; - -# count should all change to 0 -select name from information_schema.innodb_metrics where count!=0; - -# Test wildcard match, turn on all counters contain string "lock" -set global innodb_monitor_enable = "%lock%"; - -# All lock related counter should be enabled -select name from information_schema.innodb_metrics -where status != IF(name like "%lock%", 'enabled', 'disabled'); - -# Disable them -set global innodb_monitor_disable = "%lock%"; - -# All lock related counter should be disabled -select name, status from information_schema.innodb_metrics -where name like "%lock%"; - -# No match for "%lock*" ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable = "%lock*"; - -# All counters will be turned on with wildcard match string with all "%" -set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%"; - -select name from information_schema.innodb_metrics where status!='enabled'; - -# Turn off all counters -set global innodb_monitor_disable="%%%%%"; - -select name from information_schema.innodb_metrics where status!='disabled'; - -# One more round testing. All counters will be turned on with -# single wildcard character "%" -set global innodb_monitor_enable="%"; - -select name from information_schema.innodb_metrics where status!='enabled'; - -# Turn off all the counters with "%_%" -set global innodb_monitor_disable="%_%"; - -select name from information_schema.innodb_metrics where status!='disabled'; - -# Turn on all counters start with "log" -set global innodb_monitor_enable="log%%%%"; - -select name from information_schema.innodb_metrics -where status != IF(name like "log%", 'enabled', 'disabled'); - -# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_" -# is single character wildcard match word -set global innodb_monitor_enable="os_%a_fs_ncs"; - -# Turn on counters whose name contains "os" and "pending" with -# wildcard match "os%pending%" -set global innodb_monitor_enable="os%pending%"; - -select name, status from information_schema.innodb_metrics -where name like "os%"; - -# Empty string is an invalid option ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable=""; - ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable="_"; - -SET global innodb_monitor_disable = module_metadata; -SET global innodb_monitor_reset_all = module_metadata; - -# Only turn on "table_open" counter -set global innodb_monitor_enable = metadata_table_handles_opened; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb; - -# This will open the monitor_test table -select * from monitor_test; - -# "metadata_table_handles_opened" should increment by 1 -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Reset the counter value while counter is still on (started) -# This will reset value "count_reset" but not -# "count" -set global innodb_monitor_reset = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# re-create table again to increment "metadata_table_handles_opened" again -drop table monitor_test; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb; - -select * from monitor_test; - -# "metadata_table_handles_opened" should increment -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Cannot reset all monitor value while the counter is on -set global innodb_monitor_reset_all = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Turn off the counter "metadata_table_handles_opened" -set global innodb_monitor_disable = metadata_table_handles_opened; - -# Reset the counter value while counter is off (disabled) -set global innodb_monitor_reset = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# re-create table again. Since monitor is off, "metadata_table_handles_opened" -# should not be incremented -drop table monitor_test; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb; - -# "metadata_table_handles_opened" should increment -select * from monitor_test; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Reset all the counters, include those counter *_since_start -set global innodb_monitor_reset_all = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Turn on "table_open" counter again -set global innodb_monitor_enable = metadata_table_handles_opened; - -# Test metadata_table_handles_opened again to see if it is working correctly -# after above round of turning on/off/reset -drop table monitor_test; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb stats_persistent=0; - -select * from monitor_test; - -# "metadata_table_handles_opened" should increment -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Test counter "metadata_table_handles_closed", -# create index will close the old handle -set global innodb_monitor_enable = metadata_table_handles_closed; - -create index idx on monitor_test(col); - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_closed"; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; - -# Reset counters only in "module_metadata" module -set global innodb_monitor_disable = module_metadata; - -set global innodb_monitor_reset = module_metadata; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; - -set global innodb_monitor_reset_all = module_metadata; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; - -# Test Transaction Module -set global innodb_monitor_enable = module_trx; - -begin; -insert into monitor_test values(9); -commit; - -begin; -insert into monitor_test values(9); -rollback; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "trx_rollbacks" or name like "trx_active_transactions"; - -set global innodb_monitor_disable = module_trx; - -# Test DML Module -set global innodb_monitor_enable = module_dml; - -insert into monitor_test values(9); - -update monitor_test set col = 10 where col = 9; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -delete from monitor_test; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status - from information_schema.innodb_metrics - where name like "dml%"; - -# test reset counter while the counter is on -set global innodb_monitor_reset = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# insert/delete some rows after the reset -insert into monitor_test values(9); -insert into monitor_test values(1); - -delete from monitor_test; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# We do not allow reset_all while the counter is on, nothing -# should be reset here -set global innodb_monitor_reset_all = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# Turn off the counter -set global innodb_monitor_disable = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# Reset all counter values -set global innodb_monitor_reset_all = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# Open individual counter "dml_inserts" -set global innodb_monitor_enable = dml_inserts; - -insert into monitor_test values(9); -insert into monitor_test values(1); - -delete from monitor_test; - -# Only counter "dml_inserts" should be updated -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -set global innodb_monitor_disable = module_dml; - -drop table monitor_test; - -set global innodb_monitor_enable = file_num_open_files; - -# Counters are unpredictable when innodb-file-per-table is on ---replace_column 2 # 3 # 4 # 5 # 6 # 7 # -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "file_num_open_files"; - -set global innodb_monitor_disable = file_num_open_files; - -# Test ICP module counters -set global innodb_monitor_enable = "icp%"; - -create table monitor_test(a char(3), b int, c char(2), -primary key (a(1), c(1)), key(b)) engine = innodb; - -insert into monitor_test values("13", 2, "aa"); - -select a from monitor_test where b < 1 for update; - -# should have icp_attempts = 1 and icp_out_of_range = 1 -select name, count from information_schema.innodb_metrics -where name like "icp%"; - -# should have icp_attempts = 2 and icp_match = 1 -select a from monitor_test where b < 3 for update; - -select name, count from information_schema.innodb_metrics -where name like "icp%"; - -drop table monitor_test; -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 diff --git a/mysql-test/suite/sys_vars/t/innodb_monitor_reset_basic.test b/mysql-test/suite/sys_vars/t/innodb_monitor_reset_basic.test deleted file mode 100644 index 1b23ae14e49..00000000000 --- a/mysql-test/suite/sys_vars/t/innodb_monitor_reset_basic.test +++ /dev/null @@ -1,378 +0,0 @@ -# This is the test for Metrics Monitor Table feature. -# Test the metrics monitor system's control system -# and counter accuracy. - ---source include/have_innodb.inc -set global innodb_monitor_disable = All; -# Test turn on/off the monitor counter with "all" option -# By default, they will be off -select name, status from information_schema.innodb_metrics; - -# Turn on all monitor counters -set global innodb_monitor_enable = all; - -# status should all change to "enabled" -select name from information_schema.innodb_metrics where status!='enabled'; - -# Test wrong argument to the global configure option ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable = aaa; - -# We require a valid monitor counter/module name. There is no default -# counter name or module. A warning will be printed asking user to -# specify a valid counter name. -#--disable_warnings -#set global innodb_monitor_enable = default; -#--enable_warnings - -# Turn off all monitor counters, option name should be case -# insensitive -set global innodb_monitor_disable = All; - -# status should all change to "disabled" -select name from information_schema.innodb_metrics where status!='disabled'; - -# Reset all counter values -set global innodb_monitor_reset_all = all; - -# count should all change to 0 -select name from information_schema.innodb_metrics where count!=0; - -# Test wildcard match, turn on all counters contain string "lock" -set global innodb_monitor_enable = "%lock%"; - -# All lock related counter should be enabled -select name from information_schema.innodb_metrics -where status != IF(name like "%lock%", 'enabled', 'disabled'); - -# Disable them -set global innodb_monitor_disable = "%lock%"; - -# All lock related counter should be disabled -select name, status from information_schema.innodb_metrics -where name like "%lock%"; - -# No match for "%lock*" ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable = "%lock*"; - -# All counters will be turned on with wildcard match string with all "%" -set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%"; - -select name from information_schema.innodb_metrics where status!='enabled'; - -# Turn off all counters -set global innodb_monitor_disable="%%%%%"; - -select name from information_schema.innodb_metrics where status!='disabled'; - -# One more round testing. All counters will be turned on with -# single wildcard character "%" -set global innodb_monitor_enable="%"; - -select name from information_schema.innodb_metrics where status!='enabled'; - -# Turn off all the counters with "%_%" -set global innodb_monitor_disable="%_%"; - -select name from information_schema.innodb_metrics where status!='disabled'; - -# Turn on all counters start with "log" -set global innodb_monitor_enable="log%%%%"; - -select name from information_schema.innodb_metrics -where status != IF(name like "log%", 'enabled', 'disabled'); - -# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_" -# is single character wildcard match word -set global innodb_monitor_enable="os_%a_fs_ncs"; - -# Turn on counters whose name contains "os" and "pending" with -# wildcard match "os%pending%" -set global innodb_monitor_enable="os%pending%"; - -select name, status from information_schema.innodb_metrics -where name like "os%"; - -# Empty string is an invalid option ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable=""; - ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_monitor_enable="_"; - -SET global innodb_monitor_disable = module_metadata; -SET global innodb_monitor_reset_all = module_metadata; - -# Only turn on "table_open" counter -set global innodb_monitor_enable = metadata_table_handles_opened; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb; - -# This will open the monitor_test table -select * from monitor_test; - -# "metadata_table_handles_opened" should increment by 1 -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Reset the counter value while counter is still on (started) -# This will reset value "count_reset" but not -# "count" -set global innodb_monitor_reset = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# re-create table again to increment "metadata_table_handles_opened" again -drop table monitor_test; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb; - -select * from monitor_test; - -# "metadata_table_handles_opened" should increment -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Cannot reset all monitor value while the counter is on -set global innodb_monitor_reset_all = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Turn off the counter "metadata_table_handles_opened" -set global innodb_monitor_disable = metadata_table_handles_opened; - -# Reset the counter value while counter is off (disabled) -set global innodb_monitor_reset = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# re-create table again. Since monitor is off, "metadata_table_handles_opened" -# should not be incremented -drop table monitor_test; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb; - -# "metadata_table_handles_opened" should increment -select * from monitor_test; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Reset all the counters, include those counter *_since_start -set global innodb_monitor_reset_all = metadata_table_handles_opened; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Turn on "table_open" counter again -set global innodb_monitor_enable = metadata_table_handles_opened; - -# Test metadata_table_handles_opened again to see if it is working correctly -# after above round of turning on/off/reset -drop table monitor_test; - -# Create a new table to test "metadata_table_handles_opened" counter -create table monitor_test(col int) engine = innodb stats_persistent=0; - -select * from monitor_test; - -# "metadata_table_handles_opened" should increment -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_opened"; - -# Test counter "metadata_table_handles_closed", -# create index will close the old handle -set global innodb_monitor_enable = metadata_table_handles_closed; - -create index idx on monitor_test(col); - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name = "metadata_table_handles_closed"; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; - -# Reset counters only in "module_metadata" module -set global innodb_monitor_disable = module_metadata; - -set global innodb_monitor_reset = module_metadata; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; - -set global innodb_monitor_reset_all = module_metadata; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "metadata%"; - -# Test Transaction Module -set global innodb_monitor_enable = module_trx; - -begin; -insert into monitor_test values(9); -commit; - -begin; -insert into monitor_test values(9); -rollback; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "trx_rollbacks" or name like "trx_active_transactions"; - -set global innodb_monitor_disable = module_trx; - -# Test DML Module -set global innodb_monitor_enable = module_dml; - -insert into monitor_test values(9); - -update monitor_test set col = 10 where col = 9; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -delete from monitor_test; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status - from information_schema.innodb_metrics - where name like "dml%"; - -# test reset counter while the counter is on -set global innodb_monitor_reset = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# insert/delete some rows after the reset -insert into monitor_test values(9); -insert into monitor_test values(1); - -delete from monitor_test; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# We do not allow reset_all while the counter is on, nothing -# should be reset here -set global innodb_monitor_reset_all = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# Turn off the counter -set global innodb_monitor_disable = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# Reset all counter values -set global innodb_monitor_reset_all = module_dml; - -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -# Open individual counter "dml_inserts" -set global innodb_monitor_enable = dml_inserts; - -insert into monitor_test values(9); -insert into monitor_test values(1); - -delete from monitor_test; - -# Only counter "dml_inserts" should be updated -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "dml%"; - -set global innodb_monitor_disable = module_dml; - -drop table monitor_test; - -set global innodb_monitor_enable = file_num_open_files; - -# Counters are unpredictable when innodb-file-per-table is on ---replace_column 2 # 3 # 4 # 5 # 6 # 7 # -select name, max_count, min_count, count, - max_count_reset, min_count_reset, count_reset, status -from information_schema.innodb_metrics -where name like "file_num_open_files"; - -set global innodb_monitor_disable = file_num_open_files; - -# Test ICP module counters -set global innodb_monitor_enable = "icp%"; - -create table monitor_test(a char(3), b int, c char(2), -primary key (a(1), c(1)), key(b)) engine = innodb; - -insert into monitor_test values("13", 2, "aa"); - -select a from monitor_test where b < 1 for update; - -# should have icp_attempts = 1 and icp_out_of_range = 1 -select name, count from information_schema.innodb_metrics -where name like "icp%"; - -# should have icp_attempts = 2 and icp_match = 1 -select a from monitor_test where b < 3 for update; - -select name, count from information_schema.innodb_metrics -where name like "icp%"; - -drop table monitor_test; -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 diff --git a/mysql-test/suite/sys_vars/t/innodb_numa_interleave_basic.test b/mysql-test/suite/sys_vars/t/innodb_numa_interleave_basic.test index 518b5ebba17..fcbf766ac65 100644 --- a/mysql-test/suite/sys_vars/t/innodb_numa_interleave_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_numa_interleave_basic.test @@ -1,6 +1,7 @@ --source include/have_innodb.inc --source include/have_numa.inc ---source include/have_64bit.inc + +call mtr.add_suppression("InnoDB: Failed to set NUMA memory policy"); SELECT @@GLOBAL.innodb_numa_interleave; diff --git a/mysql-test/suite/sys_vars/t/innodb_spin_wait_delay_basic.test b/mysql-test/suite/sys_vars/t/innodb_spin_wait_delay_basic.test index ab0b38bb6ce..d144d24a58b 100644 --- a/mysql-test/suite/sys_vars/t/innodb_spin_wait_delay_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_spin_wait_delay_basic.test @@ -46,10 +46,21 @@ select @@global.innodb_spin_wait_delay; # set global innodb_spin_wait_delay=0; select @@global.innodb_spin_wait_delay; +set global innodb_spin_wait_delay=5000; +select @@global.innodb_spin_wait_delay; +# +# invalid values +# set global innodb_spin_wait_delay=65535; select @@global.innodb_spin_wait_delay; set global innodb_spin_wait_delay=4294967295; select @@global.innodb_spin_wait_delay; +set @@global.innodb_spin_wait_delay = 4294967296; +select @@global.innodb_spin_wait_delay; +set @@global.innodb_spin_wait_delay = 12345678901; +select @@global.innodb_spin_wait_delay; +set @@global.innodb_spin_wait_delay = 18446744073709551615; +select @@global.innodb_spin_wait_delay; # # incorrect types @@ -74,26 +85,6 @@ select @@global.innodb_spin_wait_delay; select * from information_schema.global_variables where variable_name='innodb_spin_wait_delay'; --enable_warnings -# -# Check for out of bounds -# - -# With a 64 bit mysqld:18446744073709551615,with a 32 bit mysqld: 4294967295 ---disable_warnings -SET @@global.innodb_spin_wait_delay = 4294967296; ---enable_warnings -SELECT @@global.innodb_spin_wait_delay IN (4294967296,4294967295); - ---disable_warnings -SET @@global.innodb_spin_wait_delay = 12345678901; ---enable_warnings -SELECT @@global.innodb_spin_wait_delay IN (12345678901,4294967295); - ---disable_warnings -SET @@global.innodb_spin_wait_delay = 18446744073709551615; ---enable_warnings -SELECT @@global.innodb_spin_wait_delay IN (18446744073709551615,4294967295); - # # cleanup # diff --git a/mysql-test/suite/sys_vars/t/sql_warnings_func.test b/mysql-test/suite/sys_vars/t/sql_warnings_func.test index 558c5b7d36a..8d6fafd1ed4 100644 --- a/mysql-test/suite/sys_vars/t/sql_warnings_func.test +++ b/mysql-test/suite/sys_vars/t/sql_warnings_func.test @@ -42,7 +42,7 @@ CREATE TEMPORARY TABLE t1(a varchar(5), b varchar(20)); # SET @@sql_warnings = DEFAULT; -INSERT INTO t1 VALUES('abcdef', 'val1'); +INSERT IGNORE INTO t1 VALUES('abcdef', 'val1'); --echo '#-----------------------------FN_DYNVARS_167_02------------------#' # @@ -51,7 +51,7 @@ INSERT INTO t1 VALUES('abcdef', 'val1'); SET @@sql_warnings = 0; -INSERT INTO t1 VALUES('abcdef', 'val1'); +INSERT IGNORE INTO t1 VALUES('abcdef', 'val1'); --echo '#-----------------------------FN_DYNVARS_167_03---------------#' # @@ -60,7 +60,7 @@ INSERT INTO t1 VALUES('abcdef', 'val1'); SET @@sql_warnings = 1; -INSERT INTO t1 VALUES('abcdef', 'val1'); +INSERT IGNORE INTO t1 VALUES('abcdef', 'val1'); --echo '#----------------------------FN_DYNVARS_167_04---------------#' diff --git a/mysql-test/suite/sys_vars/t/sysvars_innodb.test b/mysql-test/suite/sys_vars/t/sysvars_innodb.test index bd8442b6a44..2abafda34c6 100644 --- a/mysql-test/suite/sys_vars/t/sysvars_innodb.test +++ b/mysql-test/suite/sys_vars/t/sysvars_innodb.test @@ -3,12 +3,18 @@ --source include/not_valgrind.inc --source include/word_size.inc +if (`select plugin_auth_version <= "5.6.34-79.1" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in XtraDB as of 10.1.21-MariaDB or earlier +} + --vertical_results --replace_regex /^\/\S+/PATH/ /\.\//PATH/ select * from information_schema.system_variables where variable_name like 'innodb%' and variable_name not in ( 'innodb_disallow_writes', # only available WITH_WSREP + 'innodb_numa_interleave', # only available WITH_NUMA 'innodb_sched_priority_cleaner', # linux only 'innodb_use_native_aio') # default value depends on OS order by variable_name; diff --git a/mysql-test/suite/vcol/disabled.def b/mysql-test/suite/vcol/disabled.def new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mysql-test/suite/vcol/inc/vcol_ins_upd.inc b/mysql-test/suite/vcol/inc/vcol_ins_upd.inc index d9a1e062870..945884b3cd5 100644 --- a/mysql-test/suite/vcol/inc/vcol_ins_upd.inc +++ b/mysql-test/suite/vcol/inc/vcol_ins_upd.inc @@ -47,7 +47,7 @@ delete from t1; select * from t1; --echo # INSERT INTO tbl_name VALUES... a non-NULL value is specified against vcols -insert into t1 values (1,2,3); +insert ignore into t1 values (1,2,3); select * from t1; delete from t1; select * from t1; @@ -73,7 +73,7 @@ select * from t1; --echo # INSERT INTO tbl_name () VALUES... a non-NULL value is specified --echo # against vcols -insert into t1 (a,b) values (1,3), (2,4); +insert ignore into t1 (a,b) values (1,3), (2,4); select * from t1; delete from t1; select * from t1; @@ -101,7 +101,7 @@ select a,b,c from t1; --echo # CREATE new_table ... LIKE old_table --echo # INSERT INTO new_table SELECT * from old_table create table t2 like t1; -insert into t2 select * from t1; +insert ignore into t2 select * from t1; select * from t1; drop table t2; @@ -110,7 +110,7 @@ drop table t2; insert into t1 values (1,default,default); select * from t1; create table t2 like t1; -insert into t2 (a,b) select a,b from t1; +insert ignore into t2 (a,b) select a,b from t1; select * from t2; drop table t2; drop table t1; @@ -131,7 +131,7 @@ select * from t1; --echo # UPDATE tbl_name SET vcol=expr WHERE non-vcol=expr insert into t1 (a) values (1), (2); select * from t1; -update t1 set c=3 where a=2; +update ignore t1 set c=3 where a=2; select * from t1; delete from t1; select * from t1; @@ -147,7 +147,7 @@ select * from t1; --echo # UPDATE tbl_name SET vcol=expr WHERE vcol=expr insert into t1 (a) values (1), (2); select * from t1; -update t1 set c=3 where b=-2; +update ignore t1 set c=3 where b=-2; select * from t1; delete from t1; select * from t1; @@ -314,3 +314,68 @@ select * from t1; drop table t1,t2; +--echo # +--echo # Test error handling with virtual columns +--echo # + +CREATE TABLE IF NOT EXISTS t1 ( + f1 DOUBLE, + f2 DOUBLE NOT NULL DEFAULT '0', + f3 DOUBLE, + f4 DOUBLE NOT NULL DEFAULT '0', + v1 DOUBLE AS ( ( f1 DIV ( f1 ) ) <= f2 ) VIRTUAL, + v2 DOUBLE AS ( ( f2 DIV ( f2 ) ) <= f2 ) VIRTUAL, + KEY (v2) +); + +set sql_mode='strict_all_tables,error_for_division_by_zero'; +--error ER_DIVISION_BY_ZERO +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0, 0, 0, 0); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (1, 1, 1, 1); +--error ER_DIVISION_BY_ZERO +INSERT INTO t1 (f1, f2, f3, f4) VALUES (1, 0, 1, 1); +INSERT IGNORE INTO t1 (f1, f2, f3, f4) VALUES (1, 0, 1, 1); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0, 1, 1, 1); +select v1 from t1; + +--error ER_DIVISION_BY_ZERO +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0,0,0,0), (2,2,2,2); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (3,3,3,3), (4,4,4,4); +--error ER_DIVISION_BY_ZERO +INSERT INTO t1 (f1, f2, f3, f4) VALUES (5,5,5,5), (1,0,0,0); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (6,6,0,0); + +--error ER_DIVISION_BY_ZERO +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT f3, f4, f3, f4 FROM t1; +select count(*) from t1; +DELETE FROM t1 WHERE v2 != f1 and f1 < 5; +select count(*) from t1; +select * from t1; +--error ER_BAD_NULL_ERROR +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT v1, v2, 10,10 FROM t1; +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT v1, v2, 10,10 FROM t1 where f2 !=0; +UPDATE t1 SET f3 = v1 WHERE f2 = 2 AND v2 is null; +SELECT * FROM t1; +TRUNCATE TABLE t1; + +set sql_mode='error_for_division_by_zero'; +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0, 0, 0, 0); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (1, 1, 1, 1); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (1, 0, 1, 1); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0, 1, 1, 1); +select v1 from t1; + +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0,0,0,0), (2,2,2,2); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (3,3,3,3), (4,4,4,4); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (5,5,5,5), (1,0,0,0); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (6,6,0,0); + +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT f3, f4, f3, f4 FROM t1; +select count(*) from t1; +DELETE FROM t1 WHERE v2 != f1 and f1 < 5; +select count(*) from t1; +select * from t1; +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT v1, v2, 10,10 FROM t1; +UPDATE t1 SET f3 = v1 WHERE f2 = 2 AND v2 is null; +drop table t1; +set sql_mode=@@global.sql_mode; diff --git a/mysql-test/suite/vcol/inc/vcol_keys.inc b/mysql-test/suite/vcol/inc/vcol_keys.inc index 4d4773ec3a6..7c9f60c0fb0 100644 --- a/mysql-test/suite/vcol/inc/vcol_keys.inc +++ b/mysql-test/suite/vcol/inc/vcol_keys.inc @@ -181,3 +181,54 @@ create table t1 (a int, b double as (rand())); --error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED alter table t1 add index (b); drop table t1; + +# +# MDEV-11598 Assertion `!table || (!table->read_set... failed +# + +CREATE OR REPLACE TABLE t1 ( + f2 DOUBLE NOT NULL DEFAULT '0', + f3 DOUBLE NOT NULL DEFAULT '0', + f4 DOUBLE, + f5 DOUBLE DEFAULT '0', + v4 DOUBLE AS (IF(f4,f3,f2)) VIRTUAL, + KEY (f5), + KEY (v4) +); + +INSERT INTO t1 (f2,f3,f4,f5) VALUES (5,4,1,0),(5,7,NULL,0); +INSERT INTO t1 (f2,f3,f4,f5) SELECT f2, f3, f5, f3 FROM t1; +INSERT INTO t1 (f2,f3,f4,f5) VALUES (5,0,NULL,1); +INSERT INTO t1 (f2,f3,f4,f5) SELECT f2, f5, f5, f3 FROM t1; +DELETE FROM t1 WHERE f5 = 1 OR v4 = 4 ORDER BY f5,v4 LIMIT 9; +SELECT * from t1; +DROP TABLE t1; + +# Another similar failure + +CREATE TABLE t1 ( + d DECIMAL(63,0) NOT NULL DEFAULT 0, + c VARCHAR(64) NOT NULL DEFAULT '', + vd DECIMAL(63,0) AS (d) VIRTUAL, + vc VARCHAR(2048) AS (c) VIRTUAL, + pk BIGINT AUTO_INCREMENT, + PRIMARY KEY(pk)); + +INSERT INTO t1 (d,c) VALUES (0.5,'foo'); +SELECT * FROM t1 WHERE vc != 'bar' ORDER BY vd; +DROP TABLE t1; + +# +# MDEV-11729: Crash when using partial indexed virtual fields +# + +CREATE TABLE t1 ( + pk BIGINT, + c CHAR(64) NOT NULL DEFAULT '', + vc CHAR(64) AS (c) VIRTUAL, + PRIMARY KEY(pk), + INDEX(vc(32)) +); +DELETE FROM t1 WHERE vc IS NULL ORDER BY pk; +DROP TABLE t1; + diff --git a/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs.inc b/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs.inc index f19bec04c7a..c3f159418b1 100644 --- a/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs.inc +++ b/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs.inc @@ -24,7 +24,7 @@ if ($rows) } if ($rows) { - eval insert into t1 values ($values2); + eval insert ignore into t1 values ($values2); dec $rows; } if ($rows) diff --git a/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc b/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc index eb7e6ad32b9..f19c0f6d63f 100644 --- a/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc +++ b/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc @@ -110,7 +110,7 @@ drop table t1,t2; drop procedure p1; --echo # ---echo # Bug mdev-3845: values of virtual columns are not computed for triggers +--echo # MDEV-3845 values of virtual columns are not computed for triggers --echo # CREATE TABLE t1 ( @@ -149,3 +149,146 @@ DROP TRIGGER t1_ins_aft; DROP TRIGGER t1_del_bef; DROP TABLE t1,t2; +# +# MDEV-11706 Assertion `is_stat_field || !table || (!table->write_set || bitmap_is_set(table->write_set, field_index) || (table->vcol_set && bitmap_is_set(table->vcol_set, field_index)))' failed in Field_time::store_TIME_with_warning +# +create table t1 (i int, t time not null, vt time(4) as (t) virtual); +create trigger trg before update on t1 for each row set @a = 1; +insert ignore into t1 (i) values (1); +drop table t1; + +--echo # +--echo # Examine the number of times triggers are recalculated for updates +--echo # +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; +CREATE TABLE t1 ( + a INTEGER UNSIGNED NULL DEFAULT NULL, + b CHAR(10) NULL DEFAULT NULL, + c blob NULL DEFAULT NULL, + blob_a blob GENERATED ALWAYS AS (last_value(@a:=@a+1,a)) VIRTUAL, + blob_b blob GENERATED ALWAYS AS (last_value(@b:=@b+1,b)) VIRTUAL, + blob_c blob GENERATED ALWAYS AS (last_value(@c:=@c+1,c)) VIRTUAL +); + +DELIMITER |; +CREATE TRIGGER t1_ins + BEFORE INSERT + ON t1 + FOR EACH ROW +BEGIN + IF NEW.b IS NULL THEN + SET NEW.b="generated before insert"; + END IF; +END | + +CREATE TRIGGER t1_update + BEFORE UPDATE + ON t1 + FOR EACH ROW +BEGIN + IF NEW.b IS NULL or NEW.c IS NULL THEN + SET NEW.b="generated before update"; + SET NEW.c="generated before update"; + END IF; +END | + +DELIMITER ;| + +--echo # Inserts +set @a=0,@b=0,@c=0; + +insert into t1 (a) values(1); +insert into t1 (a,b) values(2, "*2*"); +insert into t1 (a,b,c) values(3, "*3*", "**3**"); +insert into t1 (a,c) values(4, "**4**"); +select * from t1; +select @a,@b,@c; +select * from t1; +select @a,@b,@c; +select a,b,c from t1; +select @a,@b,@c; +select a,b,c,blob_a from t1; +select @a,@b,@c; + +--echo # updates +set @a=0,@b=0,@c=0; + +update t1 set a=a+100 where a=1; +update t1 set a=a+100, b="*102*" where a=2; +update t1 set a=a+100, b=NULL where a=3; +update t1 set a=a+100, b="invisible", c=NULL where a=4; +select @a,@b,@c; +select * from t1; + +drop trigger t1_ins; +drop trigger t1_update; +drop table t1; + +SET sql_mode = DEFAULT; + +--echo # +--echo # Same test, but with virtual keys +--echo # +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; +CREATE TABLE t1 ( + a INTEGER UNSIGNED NULL DEFAULT NULL, + b CHAR(10) NULL DEFAULT NULL, + c blob NULL DEFAULT NULL, + blob_a blob GENERATED ALWAYS AS (a) VIRTUAL, + blob_b blob GENERATED ALWAYS AS (b) VIRTUAL, + blob_c blob GENERATED ALWAYS AS (c) VIRTUAL, + key (a), + key (blob_a(10)), + key (blob_b(10)), + key (blob_c(10)) +); + +DELIMITER |; +CREATE TRIGGER t1_ins + BEFORE INSERT + ON t1 + FOR EACH ROW +BEGIN + IF NEW.b IS NULL THEN + SET NEW.b="generated before insert"; + END IF; +END | + +CREATE TRIGGER t1_update + BEFORE UPDATE + ON t1 + FOR EACH ROW +BEGIN + IF NEW.b IS NULL or NEW.c IS NULL THEN + SET NEW.b="generated before update"; + SET NEW.c="generated before update"; + END IF; +END | + +DELIMITER ;| + +--echo # Inserts +insert into t1 (a) values(1); +insert into t1 (a,b) values(2, "*2*"); +insert into t1 (a,b,c) values(3, "*3*", "**3**"); +insert into t1 (a,c) values(4, "**4**"); +select * from t1; +select @a,@b,@c; +select * from t1; +select @a,@b,@c; +select a,b,c from t1; +select @a,@b,@c; +select a,b,c,blob_a from t1; +select @a,@b,@c; + +--echo # updates +update t1 set a=a+100 where a=1; +update t1 set a=a+100, b="*102*" where a=2; +update t1 set a=a+100, b=NULL where a=3; +update t1 set a=a+100, b="invisible", c=NULL where a=4; +select * from t1; + +drop trigger t1_ins; +drop trigger t1_update; +drop table t1; +SET sql_mode = DEFAULT; diff --git a/mysql-test/suite/vcol/r/alter_inplace-9045.result b/mysql-test/suite/vcol/r/alter_inplace-9045.result index 114fb3e3c06..862685b74b5 100644 --- a/mysql-test/suite/vcol/r/alter_inplace-9045.result +++ b/mysql-test/suite/vcol/r/alter_inplace-9045.result @@ -26,6 +26,7 @@ id handle data hash 3 NULL 0 NULL alter table t1 modify column handle int not null, algorithm=inplace; ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify column handle int not null, algorithm=copy; Warnings: Warning 1265 Data truncated for column 'handle' at row 3 diff --git a/mysql-test/suite/vcol/r/load_data.result b/mysql-test/suite/vcol/r/load_data.result index 9769b55ac9a..2432cdd01a0 100644 --- a/mysql-test/suite/vcol/r/load_data.result +++ b/mysql-test/suite/vcol/r/load_data.result @@ -3,7 +3,7 @@ insert into t1 values ("a" , "b", 1), ("a" , "b", 2); create table t2 like t1 ; alter table t2 add column c4 bigint unsigned as (CONV(LEFT(MD5(concat(c1,c2,c3)), 16), 16, 10)) persistent unique key; select * into outfile 't1.csv' from t1; -load data infile 't1.csv' into table t2 ; +load data infile 't1.csv' ignore into table t2 ; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 2 doesn't contain data for all columns diff --git a/mysql-test/suite/vcol/r/not_supported.result b/mysql-test/suite/vcol/r/not_supported.result index f2c98706dd6..c804cf220d2 100644 --- a/mysql-test/suite/vcol/r/not_supported.result +++ b/mysql-test/suite/vcol/r/not_supported.result @@ -4,14 +4,14 @@ set time_zone='+10:00'; set div_precision_increment=20; create table t1 (a int, b int, v decimal(20,19) as (a/3)); create table t2 (a int, b int, v int as (a+@a)); -ERROR HY000: Function or expression '@a' cannot be used in the GENERATED ALWAYS AS clause of `v` +drop table t2; create table t2 (a int, b int, v int as (a+@a) PERSISTENT); ERROR HY000: Function or expression '@a' cannot be used in the GENERATED ALWAYS AS clause of `v` create table t3_ok (a int, b int, v int as (a+@@error_count)); create table t3 (a int, b int, v int as (a+@@error_count) PERSISTENT); ERROR HY000: Function or expression '@@error_count' cannot be used in the GENERATED ALWAYS AS clause of `v` create table t4 (a int, b int, v int as (@a:=a)); -ERROR HY000: Function or expression '@a' cannot be used in the GENERATED ALWAYS AS clause of `v` +drop table t4; create table t4 (a int, b int, v int as (@a:=a) PERSISTENT); ERROR HY000: Function or expression '@a' cannot be used in the GENERATED ALWAYS AS clause of `v` create table t8 (a int, b int, v varchar(100) as (from_unixtime(a))); diff --git a/mysql-test/suite/vcol/r/update.result b/mysql-test/suite/vcol/r/update.result index 1dd80ae92b4..95b0093ed71 100644 --- a/mysql-test/suite/vcol/r/update.result +++ b/mysql-test/suite/vcol/r/update.result @@ -56,6 +56,7 @@ a b c drop table t, t2; create table t1 (a int, b int, c int, d int, e int); insert t1 values (1,2,3,4,5), (1,2,3,4,5); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t (a int primary key, b int, c blob as (b), index (c(57)), d blob, e blob as (d), index (e(57))) diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result index d6793e22668..f45bd8a6b55 100644 --- a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result @@ -23,7 +23,7 @@ delete from t1; select * from t1; a b c # INSERT INTO tbl_name VALUES... a non-NULL value is specified against vcols -insert into t1 values (1,2,3); +insert ignore into t1 values (1,2,3); Warnings: Warning 1906 The value specified for generated column 'b' in table 't1' ignored Warning 1906 The value specified for generated column 'c' in table 't1' ignored @@ -63,7 +63,7 @@ select * from t1; a b c # INSERT INTO tbl_name () VALUES... a non-NULL value is specified # against vcols -insert into t1 (a,b) values (1,3), (2,4); +insert ignore into t1 (a,b) values (1,3), (2,4); Warnings: Warning 1906 The value specified for generated column 'b' in table 't1' ignored Warning 1906 The value specified for generated column 'b' in table 't1' ignored @@ -105,7 +105,7 @@ a b c # CREATE new_table ... LIKE old_table # INSERT INTO new_table SELECT * from old_table create table t2 like t1; -insert into t2 select * from t1; +insert ignore into t2 select * from t1; Warnings: Warning 1906 The value specified for generated column 'b' in table 't2' ignored Warning 1906 The value specified for generated column 'c' in table 't2' ignored @@ -121,7 +121,7 @@ a b c 2 -2 -2 1 -1 -1 create table t2 like t1; -insert into t2 (a,b) select a,b from t1; +insert ignore into t2 (a,b) select a,b from t1; Warnings: Warning 1906 The value specified for generated column 'b' in table 't2' ignored Warning 1906 The value specified for generated column 'b' in table 't2' ignored @@ -157,7 +157,7 @@ select * from t1; a b c 1 -1 -1 2 -2 -2 -update t1 set c=3 where a=2; +update ignore t1 set c=3 where a=2; Warnings: Warning 1906 The value specified for generated column 'c' in table 't1' ignored select * from t1; @@ -187,7 +187,7 @@ select * from t1; a b c 1 -1 -1 2 -2 -2 -update t1 set c=3 where b=-2; +update ignore t1 set c=3 where b=-2; Warnings: Warning 1906 The value specified for generated column 'c' in table 't1' ignored select * from t1; @@ -451,3 +451,223 @@ id name name_hash 2050 name1 9b46b0dd3a8083c070c3b9953bb5f3f95c5ab4da 2051 name2+1 fd4f236320db3956a5ec073c5ec39707d7f05708 drop table t1,t2; +# +# Test error handling with virtual columns +# +CREATE TABLE IF NOT EXISTS t1 ( +f1 DOUBLE, +f2 DOUBLE NOT NULL DEFAULT '0', +f3 DOUBLE, +f4 DOUBLE NOT NULL DEFAULT '0', +v1 DOUBLE AS ( ( f1 DIV ( f1 ) ) <= f2 ) VIRTUAL, +v2 DOUBLE AS ( ( f2 DIV ( f2 ) ) <= f2 ) VIRTUAL, +KEY (v2) +); +set sql_mode='strict_all_tables,error_for_division_by_zero'; +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0, 0, 0, 0); +ERROR 22012: Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (1, 1, 1, 1); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (1, 0, 1, 1); +ERROR 22012: Division by 0 +INSERT IGNORE INTO t1 (f1, f2, f3, f4) VALUES (1, 0, 1, 1); +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0, 1, 1, 1); +select v1 from t1; +v1 +1 +0 +NULL +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0,0,0,0), (2,2,2,2); +ERROR 22012: Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (3,3,3,3), (4,4,4,4); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (5,5,5,5), (1,0,0,0); +ERROR 22012: Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (6,6,0,0); +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT f3, f4, f3, f4 FROM t1; +ERROR 22012: Division by 0 +select count(*) from t1; +count(*) +6 +DELETE FROM t1 WHERE v2 != f1 and f1 < 5; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +select count(*) from t1; +count(*) +3 +select * from t1; +f1 f2 f3 f4 v1 v2 +1 1 1 1 1 1 +1 0 1 1 0 NULL +6 6 0 0 1 1 +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT v1, v2, 10,10 FROM t1; +ERROR 23000: Column 'f2' cannot be null +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT v1, v2, 10,10 FROM t1 where f2 !=0; +Warnings: +Warning 1365 Division by 0 +UPDATE t1 SET f3 = v1 WHERE f2 = 2 AND v2 is null; +Warnings: +Warning 1365 Division by 0 +SELECT * FROM t1; +f1 f2 f3 f4 v1 v2 +1 1 1 1 1 1 +1 0 1 1 0 NULL +6 6 0 0 1 1 +1 1 10 10 1 1 +1 1 10 10 1 1 +Warnings: +Warning 1365 Division by 0 +TRUNCATE TABLE t1; +set sql_mode='error_for_division_by_zero'; +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0, 0, 0, 0); +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (1, 1, 1, 1); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (1, 0, 1, 1); +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0, 1, 1, 1); +select v1 from t1; +v1 +NULL +1 +0 +NULL +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0,0,0,0), (2,2,2,2); +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (3,3,3,3), (4,4,4,4); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (5,5,5,5), (1,0,0,0); +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (6,6,0,0); +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT f3, f4, f3, f4 FROM t1; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +select count(*) from t1; +count(*) +22 +DELETE FROM t1 WHERE v2 != f1 and f1 < 5; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +select count(*) from t1; +count(*) +15 +select * from t1; +f1 f2 f3 f4 v1 v2 +0 0 0 0 NULL NULL +1 1 1 1 1 1 +1 0 1 1 0 NULL +0 0 0 0 NULL NULL +5 5 5 5 1 1 +1 0 0 0 0 NULL +6 6 0 0 1 1 +0 0 0 0 NULL NULL +1 1 1 1 1 1 +1 1 1 1 1 1 +1 1 1 1 1 1 +0 0 0 0 NULL NULL +5 5 5 5 1 1 +0 0 0 0 NULL NULL +0 0 0 0 NULL NULL +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT v1, v2, 10,10 FROM t1; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +UPDATE t1 SET f3 = v1 WHERE f2 = 2 AND v2 is null; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +drop table t1; +set sql_mode=@@global.sql_mode; diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result index 97f6b9be563..ef8f3f00e42 100644 --- a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result @@ -23,7 +23,7 @@ delete from t1; select * from t1; a b c # INSERT INTO tbl_name VALUES... a non-NULL value is specified against vcols -insert into t1 values (1,2,3); +insert ignore into t1 values (1,2,3); Warnings: Warning 1906 The value specified for generated column 'b' in table 't1' ignored Warning 1906 The value specified for generated column 'c' in table 't1' ignored @@ -63,7 +63,7 @@ select * from t1; a b c # INSERT INTO tbl_name () VALUES... a non-NULL value is specified # against vcols -insert into t1 (a,b) values (1,3), (2,4); +insert ignore into t1 (a,b) values (1,3), (2,4); Warnings: Warning 1906 The value specified for generated column 'b' in table 't1' ignored Warning 1906 The value specified for generated column 'b' in table 't1' ignored @@ -105,7 +105,7 @@ a b c # CREATE new_table ... LIKE old_table # INSERT INTO new_table SELECT * from old_table create table t2 like t1; -insert into t2 select * from t1; +insert ignore into t2 select * from t1; Warnings: Warning 1906 The value specified for generated column 'b' in table 't2' ignored Warning 1906 The value specified for generated column 'c' in table 't2' ignored @@ -121,7 +121,7 @@ a b c 2 -2 -2 1 -1 -1 create table t2 like t1; -insert into t2 (a,b) select a,b from t1; +insert ignore into t2 (a,b) select a,b from t1; Warnings: Warning 1906 The value specified for generated column 'b' in table 't2' ignored Warning 1906 The value specified for generated column 'b' in table 't2' ignored @@ -157,7 +157,7 @@ select * from t1; a b c 1 -1 -1 2 -2 -2 -update t1 set c=3 where a=2; +update ignore t1 set c=3 where a=2; Warnings: Warning 1906 The value specified for generated column 'c' in table 't1' ignored select * from t1; @@ -187,7 +187,7 @@ select * from t1; a b c 1 -1 -1 2 -2 -2 -update t1 set c=3 where b=-2; +update ignore t1 set c=3 where b=-2; Warnings: Warning 1906 The value specified for generated column 'c' in table 't1' ignored select * from t1; @@ -389,3 +389,240 @@ id name name_hash 2051 name2+1 fd4f236320db3956a5ec073c5ec39707d7f05708 2041 name3+1 93c9096df48221428de46e146abc9f4f94bf7d2e drop table t1,t2; +# +# Test error handling with virtual columns +# +CREATE TABLE IF NOT EXISTS t1 ( +f1 DOUBLE, +f2 DOUBLE NOT NULL DEFAULT '0', +f3 DOUBLE, +f4 DOUBLE NOT NULL DEFAULT '0', +v1 DOUBLE AS ( ( f1 DIV ( f1 ) ) <= f2 ) VIRTUAL, +v2 DOUBLE AS ( ( f2 DIV ( f2 ) ) <= f2 ) VIRTUAL, +KEY (v2) +); +set sql_mode='strict_all_tables,error_for_division_by_zero'; +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0, 0, 0, 0); +ERROR 22012: Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (1, 1, 1, 1); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (1, 0, 1, 1); +ERROR 22012: Division by 0 +INSERT IGNORE INTO t1 (f1, f2, f3, f4) VALUES (1, 0, 1, 1); +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0, 1, 1, 1); +select v1 from t1; +v1 +1 +0 +NULL +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0,0,0,0), (2,2,2,2); +ERROR 22012: Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (3,3,3,3), (4,4,4,4); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (5,5,5,5), (1,0,0,0); +ERROR 22012: Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (6,6,0,0); +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT f3, f4, f3, f4 FROM t1; +ERROR 22012: Division by 0 +select count(*) from t1; +count(*) +13 +DELETE FROM t1 WHERE v2 != f1 and f1 < 5; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +select count(*) from t1; +count(*) +8 +select * from t1; +f1 f2 f3 f4 v1 v2 +1 1 1 1 1 1 +1 0 1 1 0 NULL +5 5 5 5 1 1 +6 6 0 0 1 1 +1 1 1 1 1 1 +1 1 1 1 1 1 +1 1 1 1 1 1 +5 5 5 5 1 1 +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT v1, v2, 10,10 FROM t1; +ERROR 23000: Column 'f2' cannot be null +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT v1, v2, 10,10 FROM t1 where f2 !=0; +Warnings: +Warning 1365 Division by 0 +UPDATE t1 SET f3 = v1 WHERE f2 = 2 AND v2 is null; +Warnings: +Warning 1365 Division by 0 +SELECT * FROM t1; +f1 f2 f3 f4 v1 v2 +1 1 1 1 1 1 +1 0 1 1 0 NULL +1 1 10 10 1 1 +1 1 10 10 1 1 +1 1 10 10 1 1 +5 5 5 5 1 1 +6 6 0 0 1 1 +1 1 1 1 1 1 +1 1 1 1 1 1 +1 1 1 1 1 1 +1 1 10 10 1 1 +1 1 10 10 1 1 +5 5 5 5 1 1 +1 1 10 10 1 1 +1 1 10 10 1 1 +1 1 10 10 1 1 +1 1 10 10 1 1 +Warnings: +Warning 1365 Division by 0 +TRUNCATE TABLE t1; +set sql_mode='error_for_division_by_zero'; +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0, 0, 0, 0); +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (1, 1, 1, 1); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (1, 0, 1, 1); +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0, 1, 1, 1); +select v1 from t1; +v1 +NULL +1 +0 +NULL +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (0,0,0,0), (2,2,2,2); +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (3,3,3,3), (4,4,4,4); +INSERT INTO t1 (f1, f2, f3, f4) VALUES (5,5,5,5), (1,0,0,0); +Warnings: +Warning 1365 Division by 0 +INSERT INTO t1 (f1, f2, f3, f4) VALUES (6,6,0,0); +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT f3, f4, f3, f4 FROM t1; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +select count(*) from t1; +count(*) +22 +DELETE FROM t1 WHERE v2 != f1 and f1 < 5; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +select count(*) from t1; +count(*) +15 +select * from t1; +f1 f2 f3 f4 v1 v2 +0 0 0 0 NULL NULL +1 1 1 1 1 1 +1 0 1 1 0 NULL +0 0 0 0 NULL NULL +5 5 5 5 1 1 +1 0 0 0 0 NULL +6 6 0 0 1 1 +0 0 0 0 NULL NULL +1 1 1 1 1 1 +1 1 1 1 1 1 +1 1 1 1 1 1 +0 0 0 0 NULL NULL +5 5 5 5 1 1 +0 0 0 0 NULL NULL +0 0 0 0 NULL NULL +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +INSERT INTO t1 ( f1, f2, f3, f4 ) SELECT v1, v2, 10,10 FROM t1; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +Warning 1048 Column 'f2' cannot be null +Warning 1365 Division by 0 +UPDATE t1 SET f3 = v1 WHERE f2 = 2 AND v2 is null; +Warnings: +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +drop table t1; +set sql_mode=@@global.sql_mode; diff --git a/mysql-test/suite/vcol/r/vcol_keys_innodb.result b/mysql-test/suite/vcol/r/vcol_keys_innodb.result index 43c911118c2..242baba32af 100644 --- a/mysql-test/suite/vcol/r/vcol_keys_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_keys_innodb.result @@ -168,3 +168,104 @@ create table t1 (a int, b double as (rand())); alter table t1 add index (b); ERROR HY000: Function or expression 'rand()' cannot be used in the GENERATED ALWAYS AS clause of `b` drop table t1; +CREATE OR REPLACE TABLE t1 ( +f2 DOUBLE NOT NULL DEFAULT '0', +f3 DOUBLE NOT NULL DEFAULT '0', +f4 DOUBLE, +f5 DOUBLE DEFAULT '0', +v4 DOUBLE AS (IF(f4,f3,f2)) VIRTUAL, +KEY (f5), +KEY (v4) +); +INSERT INTO t1 (f2,f3,f4,f5) VALUES (5,4,1,0),(5,7,NULL,0); +INSERT INTO t1 (f2,f3,f4,f5) SELECT f2, f3, f5, f3 FROM t1; +INSERT INTO t1 (f2,f3,f4,f5) VALUES (5,0,NULL,1); +INSERT INTO t1 (f2,f3,f4,f5) SELECT f2, f5, f5, f3 FROM t1; +DELETE FROM t1 WHERE f5 = 1 OR v4 = 4 ORDER BY f5,v4 LIMIT 9; +SELECT * from t1; +f2 f3 f4 f5 v4 +5 7 NULL 0 5 +5 4 0 4 5 +5 7 0 7 5 +5 0 0 4 5 +5 0 0 7 5 +5 7 7 7 7 +5 1 1 0 1 +DROP TABLE t1; +CREATE TABLE t1 ( +d DECIMAL(63,0) NOT NULL DEFAULT 0, +c VARCHAR(64) NOT NULL DEFAULT '', +vd DECIMAL(63,0) AS (d) VIRTUAL, +vc VARCHAR(2048) AS (c) VIRTUAL, +pk BIGINT AUTO_INCREMENT, +PRIMARY KEY(pk)); +INSERT INTO t1 (d,c) VALUES (0.5,'foo'); +Warnings: +Note 1265 Data truncated for column 'd' at row 1 +SELECT * FROM t1 WHERE vc != 'bar' ORDER BY vd; +d c vd vc pk +1 foo 1 foo 1 +DROP TABLE t1; +CREATE TABLE t1 ( +pk BIGINT, +c CHAR(64) NOT NULL DEFAULT '', +vc CHAR(64) AS (c) VIRTUAL, +PRIMARY KEY(pk), +INDEX(vc(32)) +); +DELETE FROM t1 WHERE vc IS NULL ORDER BY pk; +DROP TABLE t1; +# +# MDEV-11737 Failing assertion: block->magic_n == MEM_BLOCK_MAGIC_N +# +CREATE TABLE t1 (i INT PRIMARY KEY, vi INT AS (i*2) VIRTUAL UNIQUE) +ENGINE=InnoDB; +CREATE TABLE t2 (i INT) ENGINE=InnoDB; +ALTER TABLE t1 ADD COLUMN col INT; +SELECT * FROM t1 WHERE vi < 2; +i vi col +DROP TABLE t1, t2; +create table t1 ( +pk int auto_increment, +col_varchar varchar(847) not null default '', +col_int bigint(15) unsigned zerofill, +col_datetime datetime(3) not null default '1900-01-01 00:00:00', +col_time time(5) not null default '00:00:00', +col_blob text, +col_bit bit(34), +col_year year, +col_char char(10), +col_dec decimal(18,9) not null default 0, +col_enum enum('','a','b','c','d','e','f','foo','bar') not null default '', +col_date date not null default '1900-01-01', +col_timestamp timestamp(3) not null default '1971-01-01 00:00:00', +vcol_datetime datetime as (col_datetime) virtual, +vcol_dec decimal(18,9) zerofill as (col_dec) virtual, +vcol_bit bit(63) as (col_bit) virtual, +vcol_char binary(51) as (col_char) virtual, +vcol_timestamp timestamp(5) as (col_timestamp) virtual, +vcol_enum enum('','a','b','c','d','e','f','foo','bar') as (col_enum) virtual, +vcol_int tinyint(48) zerofill as (col_int) virtual, +vcol_time time(4) as (col_time) virtual, +vcol_varchar varbinary(3873) as (col_varchar) virtual, +vcol_year year as (col_year) virtual, +vcol_date date as (col_date) virtual, +vcol_blob longtext as (col_blob) virtual, +primary key(pk) +) engine=innodb; +insert into t1 (col_varchar,col_int,col_datetime,col_time,col_blob,col_bit,col_year,col_char,col_dec,col_enum,col_date,col_timestamp) values +('foo',1,'2010-05-08 13:08:12.034783','18:32:14','foo',b'0111110101001001',1992,'f',0.2,'','1994-12-26','2019-01-11 00:00:00'), +('bar',6,'1900-01-01 00:00:00','00:00:00','bar',b'10011000001101011000101',1985,'b',0.7,'','2028-04-06','1971-01-01 00:00:00'); +alter table t1 add index(vcol_datetime); +drop table t1; +create table t1 ( +pk int, +col_blob mediumtext not null default '', +vcol_blob tinyblob as (col_blob) virtual, +col_char char(22) null, +primary key(pk), +index(col_char,vcol_blob(64)) +) engine=innodb; +insert ignore into t1 (pk) values (1),(2); +update t1 set col_char = 'foo' where pk = 1; +drop table t1; diff --git a/mysql-test/suite/vcol/r/vcol_keys_myisam.result b/mysql-test/suite/vcol/r/vcol_keys_myisam.result index efca19db5bb..bd013da9b03 100644 --- a/mysql-test/suite/vcol/r/vcol_keys_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_keys_myisam.result @@ -1,119 +1,3 @@ -create table t1 (a int, b int as (a+1), c int, index(b)); -insert t1 (a,c) values (0x7890abcd, 0x76543210); -insert t1 (a,c) select seq, sin(seq)*10000 from seq_1_to_1000; -explain select * from t1 where b=10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref b b 5 const 1 -select * from t1 where b=10; -a b c -9 10 4121 - -MyISAM file: datadir/test/t1 -Record format: Fixed length -Character set: latin1_swedish_ci (8) -Data records: 1001 Deleted blocks: 0 -Recordlength: 9 - -table description: -Key Start Len Index Type -1 10 4 multip. long NULL -update t1 set a=20 where b=10; -select * from t1 where b=10; -a b c -select * from t1 where b=21; -a b c -20 21 4121 -20 21 9129 -delete from t1 where b=21; -select * from t1 where b=21; -a b c -alter table t1 add column d char(20) as (concat(a,c)); -select * from t1 where b=11; -a b c d -10 11 -5440 10-5440 -create index i on t1 (d); -check table t1; -Table Op Msg_type Msg_text -test.t1 check status OK -select * from t1 where b=11; -a b c d -10 11 -5440 10-5440 -check table t1 quick; -Table Op Msg_type Msg_text -test.t1 check status OK -select * from t1 where b=11; -a b c d -10 11 -5440 10-5440 -check table t1 medium; -Table Op Msg_type Msg_text -test.t1 check status OK -select * from t1 where b=11; -a b c d -10 11 -5440 10-5440 -check table t1 extended; -Table Op Msg_type Msg_text -test.t1 check status OK -show keys from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 1 b 1 b A 999 NULL NULL YES BTREE -t1 1 i 1 d A 999 NULL NULL YES BTREE -select * from t1 where b=11; -a b c d -10 11 -5440 10-5440 -delete from t1 where b=12; -analyze table t1; -Table Op Msg_type Msg_text -test.t1 analyze status OK -show keys from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 1 b 1 b A 998 NULL NULL YES BTREE -t1 1 i 1 d A 998 NULL NULL YES BTREE -select * from t1 where b=11; -a b c d -10 11 -5440 10-5440 -optimize table t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -show keys from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 1 b 1 b A 998 NULL NULL YES BTREE -t1 1 i 1 d A 998 NULL NULL YES BTREE -select * from t1 where b=11; -a b c d -10 11 -5440 10-5440 -repair table t1; -Table Op Msg_type Msg_text -test.t1 repair status OK -select * from t1 where b=11; -a b c d -10 11 -5440 10-5440 -repair table t1 quick; -Table Op Msg_type Msg_text -test.t1 repair status OK -select * from t1 where b=11; -a b c d -10 11 -5440 10-5440 -repair table t1 extended; -Table Op Msg_type Msg_text -test.t1 repair status OK -select * from t1 where b=11; -a b c d -10 11 -5440 10-5440 -repair table t1 use_frm; -Table Op Msg_type Msg_text -test.t1 repair warning Number of rows changed from 0 to 998 -test.t1 repair status OK -select * from t1 where b=11; -a b c d -10 11 -5440 10-5440 -update t1 set a=30 where b=11; -select * from t1 where b=11; -a b c d -select * from t1 where b=31; -a b c d -30 31 -5440 30-5440 -30 31 -9880 30-9880 -drop table t1; SET @@session.storage_engine = 'MyISAM'; # - UNIQUE KEY # - INDEX @@ -278,3 +162,216 @@ create table t1 (a int, b double as (rand())); alter table t1 add index (b); ERROR HY000: Function or expression 'rand()' cannot be used in the GENERATED ALWAYS AS clause of `b` drop table t1; +CREATE OR REPLACE TABLE t1 ( +f2 DOUBLE NOT NULL DEFAULT '0', +f3 DOUBLE NOT NULL DEFAULT '0', +f4 DOUBLE, +f5 DOUBLE DEFAULT '0', +v4 DOUBLE AS (IF(f4,f3,f2)) VIRTUAL, +KEY (f5), +KEY (v4) +); +INSERT INTO t1 (f2,f3,f4,f5) VALUES (5,4,1,0),(5,7,NULL,0); +INSERT INTO t1 (f2,f3,f4,f5) SELECT f2, f3, f5, f3 FROM t1; +INSERT INTO t1 (f2,f3,f4,f5) VALUES (5,0,NULL,1); +INSERT INTO t1 (f2,f3,f4,f5) SELECT f2, f5, f5, f3 FROM t1; +DELETE FROM t1 WHERE f5 = 1 OR v4 = 4 ORDER BY f5,v4 LIMIT 9; +SELECT * from t1; +f2 f3 f4 f5 v4 +5 7 NULL 0 5 +5 4 0 4 5 +5 7 0 7 5 +5 0 0 4 5 +5 0 0 7 5 +5 7 7 7 7 +5 1 1 0 1 +DROP TABLE t1; +CREATE TABLE t1 ( +d DECIMAL(63,0) NOT NULL DEFAULT 0, +c VARCHAR(64) NOT NULL DEFAULT '', +vd DECIMAL(63,0) AS (d) VIRTUAL, +vc VARCHAR(2048) AS (c) VIRTUAL, +pk BIGINT AUTO_INCREMENT, +PRIMARY KEY(pk)); +INSERT INTO t1 (d,c) VALUES (0.5,'foo'); +Warnings: +Note 1265 Data truncated for column 'd' at row 1 +SELECT * FROM t1 WHERE vc != 'bar' ORDER BY vd; +d c vd vc pk +1 foo 1 foo 1 +DROP TABLE t1; +CREATE TABLE t1 ( +pk BIGINT, +c CHAR(64) NOT NULL DEFAULT '', +vc CHAR(64) AS (c) VIRTUAL, +PRIMARY KEY(pk), +INDEX(vc(32)) +); +DELETE FROM t1 WHERE vc IS NULL ORDER BY pk; +DROP TABLE t1; +# +# Original test +# +create table t1 (a int, b int as (a+1), c int, index(b)); +insert t1 (a,c) values (0x7890abcd, 0x76543210); +insert t1 (a,c) select seq, sin(seq)*10000 from seq_1_to_1000; +explain select * from t1 where b=10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref b b 5 const 1 +select * from t1 where b=10; +a b c +9 10 4121 + +MyISAM file: datadir/test/t1 +Record format: Fixed length +Character set: latin1_swedish_ci (8) +Data records: 1001 Deleted blocks: 0 +Recordlength: 9 + +table description: +Key Start Len Index Type +1 10 4 multip. long NULL +update t1 set a=20 where b=10; +select * from t1 where b=10; +a b c +select * from t1 where b=21; +a b c +20 21 4121 +20 21 9129 +delete from t1 where b=21; +select * from t1 where b=21; +a b c +alter table t1 add column d char(20) as (concat(a,c)); +select * from t1 where b=11; +a b c d +10 11 -5440 10-5440 +create index i on t1 (d); +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +select * from t1 where b=11; +a b c d +10 11 -5440 10-5440 +check table t1 quick; +Table Op Msg_type Msg_text +test.t1 check status OK +select * from t1 where b=11; +a b c d +10 11 -5440 10-5440 +check table t1 medium; +Table Op Msg_type Msg_text +test.t1 check status OK +select * from t1 where b=11; +a b c d +10 11 -5440 10-5440 +check table t1 extended; +Table Op Msg_type Msg_text +test.t1 check status OK +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 1 b 1 b A 999 NULL NULL YES BTREE +t1 1 i 1 d A 999 NULL NULL YES BTREE +select * from t1 where b=11; +a b c d +10 11 -5440 10-5440 +delete from t1 where b=12; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 1 b 1 b A 998 NULL NULL YES BTREE +t1 1 i 1 d A 998 NULL NULL YES BTREE +select * from t1 where b=11; +a b c d +10 11 -5440 10-5440 +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 1 b 1 b A 998 NULL NULL YES BTREE +t1 1 i 1 d A 998 NULL NULL YES BTREE +select * from t1 where b=11; +a b c d +10 11 -5440 10-5440 +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +select * from t1 where b=11; +a b c d +10 11 -5440 10-5440 +repair table t1 quick; +Table Op Msg_type Msg_text +test.t1 repair status OK +select * from t1 where b=11; +a b c d +10 11 -5440 10-5440 +repair table t1 extended; +Table Op Msg_type Msg_text +test.t1 repair status OK +select * from t1 where b=11; +a b c d +10 11 -5440 10-5440 +repair table t1 use_frm; +Table Op Msg_type Msg_text +test.t1 repair warning Number of rows changed from 0 to 998 +test.t1 repair status OK +select * from t1 where b=11; +a b c d +10 11 -5440 10-5440 +update t1 set a=30 where b=11; +select * from t1 where b=11; +a b c d +select * from t1 where b=31; +a b c d +30 31 -5440 30-5440 +30 31 -9880 30-9880 +drop table t1; +# +# MDEV-11606 Server crashes in mi_make_key / sort_key_read +# +CREATE TABLE t1 ( +pk BIGINT AUTO_INCREMENT, +col_date DATE NULL, +col_datetime DATETIME(1) NULL, +col_int TINYINT(13) UNSIGNED ZEROFILL NULL, +col_varchar VARBINARY(2222) NULL, +col_timestamp TIMESTAMP(2) NULL, +col_bit BIT(64) NOT NULL DEFAULT 0, +col_blob MEDIUMBLOB NULL, +col_dec DECIMAL(10,9) ZEROFILL NOT NULL DEFAULT 0, +col_time TIME(4) NULL, +col_year YEAR NOT NULL DEFAULT '1970', +col_char CHAR(129) NULL, +col_enum SET('','a','b','c','d','e','f','foo','bar') NULL, +vcol_dec DECIMAL(50,18) ZEROFILL AS (col_dec) VIRTUAL, +vcol_bit BIT(48) AS (col_bit) VIRTUAL, +vcol_char CHAR(224) AS (col_char) VIRTUAL, +vcol_datetime DATETIME(4) AS (col_datetime) VIRTUAL, +vcol_year YEAR AS (col_year) VIRTUAL, +vcol_varchar VARBINARY(356) AS (col_varchar) VIRTUAL, +vcol_blob MEDIUMBLOB AS (col_blob) VIRTUAL, +vcol_timestamp TIMESTAMP(5) AS (col_timestamp) VIRTUAL, +vcol_int BIGINT(46) AS (col_int) VIRTUAL, +vcol_time TIME(1) AS (col_time) VIRTUAL, +vcol_date DATE AS (col_date) VIRTUAL, +vcol_enum SET('','a','b','c','d','e','f','foo','bar') AS (col_enum) VIRTUAL, +UNIQUE(pk), +PRIMARY KEY(pk) +) ENGINE=MyISAM; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR +ALTER TABLE t1 ADD INDEX(col_enum,vcol_int); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR +ALTER TABLE t1 ADD INDEX(col_year); +DROP TABLE t1; +create table t1 ( +pk int primary key auto_increment, +b bit default null, +key(b) +) engine=myisam; +insert into t1 values (null, 0); +repair table t1 extended; +Table Op Msg_type Msg_text +test.t1 repair status OK +drop table t1; diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result index a917159249b..9aadc5ed4bb 100644 --- a/mysql-test/suite/vcol/r/vcol_misc.result +++ b/mysql-test/suite/vcol/r/vcol_misc.result @@ -106,10 +106,10 @@ t2 CREATE TABLE `t2` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE TABLE t1 (p int, a double NOT NULL, v double AS (ROUND(a,p)) VIRTUAL); -INSERT INTO t1 VALUES (0,1,0); +INSERT IGNORE INTO t1 VALUES (0,1,0); Warnings: Warning 1906 The value specified for generated column 'v' in table 't1' ignored -INSERT INTO t1 VALUES (NULL,0,0); +INSERT IGNORE INTO t1 VALUES (NULL,0,0); Warnings: Warning 1906 The value specified for generated column 'v' in table 't1' ignored SELECT a, p, v, ROUND(a,p), ROUND(a,p+NULL) FROM t1; @@ -300,10 +300,10 @@ b varchar(32) latin1_swedish_ci YES NULL # c int(11) NULL YES NULL VIRTUAL GENERATED # d varchar(5) latin1_swedish_ci YES NULL STORED GENERATED # INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,NULL); -UPDATE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a'; +UPDATE IGNORE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a'; Warnings: Warning 1906 The value specified for generated column 'd' in table 't1' ignored -INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a'); +INSERT IGNORE INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a'); Warnings: Warning 1906 The value specified for generated column 'd' in table 't1' ignored set sql_mode='strict_all_tables'; @@ -328,6 +328,13 @@ t1 CREATE TABLE `t1` ( `c1` varchar(50) COLLATE latin1_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci drop table t1; +set sql_mode='no_zero_date'; +create table t1 ( +ts timestamp not null default current_timestamp, +tsv timestamp as (adddate(ts, interval 1 day)) virtual +); +drop table t1; +set sql_mode=default; # # Start of 10.1 tests # diff --git a/mysql-test/suite/vcol/r/vcol_select_myisam.result b/mysql-test/suite/vcol/r/vcol_select_myisam.result index 4dee9f4fca6..88a9e608c9d 100644 --- a/mysql-test/suite/vcol/r/vcol_select_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_select_myisam.result @@ -271,7 +271,7 @@ id select_type table type possible_keys key key_len ref rows Extra CREATE TABLE t1 (b int); INSERT INTO t1 VALUES (NULL),( 78), (185), (0), (154); CREATE TABLE t2 (a int, b int AS (a) VIRTUAL); -INSERT INTO t2 VALUES (187,187), (9,9), (187,187); +INSERT IGNORE INTO t2 VALUES (187,187), (9,9), (187,187); Warnings: Warning 1906 The value specified for generated column 'b' in table 't2' ignored Warning 1906 The value specified for generated column 'b' in table 't2' ignored @@ -295,3 +295,112 @@ Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a` from `test`.`t1` SELECT * FROM t1 NATURAL JOIN t2; b a DROP TABLE t1,t2; +create table t1 ( +pk integer auto_increment, +bi integer not null, +vi integer generated always as (bi) virtual, +bc varchar(1) not null, +vc varchar(2) generated always as (concat(bc, bc)), +primary key (pk), +key (vi, vc)); +insert t1 (bi, bc) values (0, 'x'), (0, 'n'), (1, 'w'), (7, 's'), (0, 'a'), (4, 'd'), (1, 'w'), (1, 'j'), (1, 'm'), (4, 'k'), (7, 't'), (4, 'k'), (2, 'e'), (0, 'i'), (1, 't'), (6, 'z'), (3, 'c'), (6, 'i'), (8, 'v'); +create table t2 ( +pk integer auto_increment, +bi integer not null, +vi integer generated always as (bi) virtual, +bc varchar(257) not null, +vc varchar(2) generated always as (concat(bc, bc)), +primary key (pk), +key (vi, vc)); +insert t2 (bi, bc) values (1, 'c'), (8, 'm'), (9, 'd'), (6, 'y'), (1, 't'), (6, 'd'), (2, 's'), (4, 'r'), (8, 'm'), (4, 'b'), (4, 'x'), (7, 'g'), (4, 'p'), (1, 'q'), (9, 'w'), (4, 'd'), (8, 'e'), (4, 'b'), (8, 'y'); +explain # should be using join buffer +select t2.vi from (t2 as t3 right join (t2 left join t1 on (t1.bi = t2.vi)) on (t1.vc = t2.vc)); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL vi 10 NULL 19 Using index +1 SIMPLE t1 ALL NULL NULL NULL NULL 19 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t3 index NULL PRIMARY 4 NULL 19 Using where; Using index; Using join buffer (incremental, BNL join) +select t2.vi from (t2 as t3 right join (t2 left join t1 on (t1.bi = t2.vi)) on (t1.vc = t2.vc)); +vi +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 +2 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +4 +6 +6 +6 +6 +7 +7 +8 +8 +8 +8 +9 +9 +drop table t2,t1; diff --git a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result index d6161751fd4..9413dbdace7 100644 --- a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result +++ b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result @@ -27,7 +27,7 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (format(acos(`a`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1, default); -insert into t1 values (1.0001,default); +insert ignore into t1 values (1.0001,default); insert into t1 values (0,default); select * from t1; a b @@ -46,7 +46,7 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (format(asin(`a`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (0.2, default); -insert into t1 values (1.0001,default); +insert ignore into t1 values (1.0001,default); select * from t1; a b 0.2 0.201358 @@ -64,7 +64,7 @@ t1 CREATE TABLE `t1` ( `c` double GENERATED ALWAYS AS (format(atan(`a`,`b`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (-2,2,default); -insert into t1 values (format(PI(),6),0,default); +insert ignore into t1 values (format(PI(),6),0,default); select * from t1; a b c -2 2 -0.785398 @@ -80,7 +80,7 @@ t1 CREATE TABLE `t1` ( `c` double GENERATED ALWAYS AS (format(atan(`a`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (-2,default); -insert into t1 values (format(PI(),6),default); +insert ignore into t1 values (format(PI(),6),default); select * from t1; a c -2 -1.107149 @@ -98,7 +98,7 @@ t1 CREATE TABLE `t1` ( `c` double GENERATED ALWAYS AS (format(atan(`a`,`b`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (-2,2,default); -insert into t1 values (format(PI(),6),0,default); +insert ignore into t1 values (format(PI(),6),0,default); select * from t1; a b c -2 2 -0.785398 @@ -115,7 +115,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (ceiling(`a`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1.23,default); -insert into t1 values (-1.23,default); +insert ignore into t1 values (-1.23,default); select * from t1; a b 1.23 2 @@ -134,7 +134,7 @@ t1 CREATE TABLE `t1` ( `d` varchar(10) GENERATED ALWAYS AS (conv(`a`,`b`,`c`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('a',16,2,default); -insert into t1 values ('6e',18,8,default); +insert ignore into t1 values ('6e',18,8,default); insert into t1 values (-17,10,-18,default); insert into t1 values (10+'10'+'10'+0xa,10,10,default); select * from t1; @@ -170,7 +170,7 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (format(cot(`a`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (12,default); -insert into t1 values (1,default); +insert ignore into t1 values (1,default); select * from t1; a b 12 -1.572673 @@ -187,7 +187,7 @@ t1 CREATE TABLE `t1` ( `b` mediumtext GENERATED ALWAYS AS (crc32(`a`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('MySQL',default); -insert into t1 values ('mysql',default); +insert ignore into t1 values ('mysql',default); select * from t1; a b MySQL 3259397556 @@ -204,7 +204,7 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (format(degrees(`a`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (format(PI(),6),default); -insert into t1 values (format(PI()/2,6),default); +insert ignore into t1 values (format(PI()/2,6),default); select * from t1; a b 3.141593 180.00002 @@ -236,7 +236,7 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (format(exp(`a`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (2,default); -insert into t1 values (-2,default); +insert ignore into t1 values (-2,default); insert into t1 values (0,default); select * from t1; a b @@ -255,7 +255,7 @@ t1 CREATE TABLE `t1` ( `b` mediumtext GENERATED ALWAYS AS (floor(`a`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1.23,default); -insert into t1 values (-1.23,default); +insert ignore into t1 values (-1.23,default); select * from t1; a b 1.23 1 @@ -272,11 +272,15 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (format(ln(`a`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (2,default); -insert into t1 values (-2,default); +insert ignore into t1 values (-2,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b 2 0.693147 -2 NULL +Warnings: +Warning 1365 Division by 0 drop table t1; set sql_warnings = 0; # LOG() @@ -290,13 +294,17 @@ t1 CREATE TABLE `t1` ( `c` double GENERATED ALWAYS AS (format(log(`a`,`b`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (2,65536,default); -insert into t1 values (10,100,default); +insert ignore into t1 values (10,100,default); insert into t1 values (1,100,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b c 2 65536 16 10 100 2 1 100 NULL +Warnings: +Warning 1365 Division by 0 drop table t1; set sql_warnings = 0; set sql_warnings = 1; @@ -308,11 +316,15 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (format(log(`a`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (2,default); -insert into t1 values (-2,default); +insert ignore into t1 values (-2,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b 2 0.693147 -2 NULL +Warnings: +Warning 1365 Division by 0 drop table t1; set sql_warnings = 0; # LOG2() @@ -325,11 +337,15 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (format(log2(`a`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (65536,default); -insert into t1 values (-100,default); +insert ignore into t1 values (-100,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b 65536 16 -100 NULL +Warnings: +Warning 1365 Division by 0 drop table t1; set sql_warnings = 0; # LOG10() @@ -342,13 +358,17 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (format(log10(`a`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (2,default); -insert into t1 values (100,default); +insert ignore into t1 values (100,default); insert into t1 values (-100,default); +Warnings: +Warning 1365 Division by 0 select * from t1; a b 2 0.30103 100 2 -100 NULL +Warnings: +Warning 1365 Division by 0 drop table t1; set sql_warnings = 0; # - @@ -376,7 +396,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (`a` % 10) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (11,default); +insert ignore into t1 values (11,default); select * from t1; a b 1 1 @@ -393,7 +413,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (`a` % 10) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (11,default); +insert ignore into t1 values (11,default); select * from t1; a b 1 1 @@ -456,7 +476,7 @@ t1 CREATE TABLE `t1` ( `c` int(11) GENERATED ALWAYS AS (pow(`a`,2)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default,default); -insert into t1 values (2,default,default); +insert ignore into t1 values (2,default,default); select * from t1; a b c 1 1 1 @@ -488,7 +508,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (round(`a`,0)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (-1.23,default); -insert into t1 values (-1.58,default); +insert ignore into t1 values (-1.58,default); insert into t1 values (1.58,default); select * from t1; a b @@ -507,7 +527,7 @@ t1 CREATE TABLE `t1` ( `c` int(11) GENERATED ALWAYS AS (round(`a`,`b`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1.298,1,default); -insert into t1 values (1.298,0,default); +insert ignore into t1 values (1.298,0,default); insert into t1 values (23.298,-1,default); select * from t1; a b c @@ -526,7 +546,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (sign(`a`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (-32,default); -insert into t1 values (0,default); +insert ignore into t1 values (0,default); insert into t1 values (234,default); select * from t1; a b @@ -560,7 +580,7 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (format(sqrt(`a`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (4,default); -insert into t1 values (20,default); +insert ignore into t1 values (20,default); insert into t1 values (-16,default); select * from t1; a b @@ -579,7 +599,7 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (format(tan(`a`),6)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (format(PI(),6),default); -insert into t1 values (format(PI()+1,6),default); +insert ignore into t1 values (format(PI()+1,6),default); select * from t1; a b 3.141593 0 @@ -596,7 +616,7 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (`a` * 3) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (0,default); -insert into t1 values (1,default); +insert ignore into t1 values (1,default); insert into t1 values (2,default); select * from t1; a b @@ -615,7 +635,7 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (truncate(`a`,4)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1.223,default); -insert into t1 values (1.999,default); +insert ignore into t1 values (1.999,default); insert into t1 values (1.999,default); insert into t1 values (122,default); select * from t1; @@ -636,7 +656,7 @@ t1 CREATE TABLE `t1` ( `b` double GENERATED ALWAYS AS (-`a`) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (-1,default); +insert ignore into t1 values (-1,default); select * from t1; a b 1 -1 @@ -656,7 +676,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (ascii(`a`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('2',default); -insert into t1 values (2,default); +insert ignore into t1 values (2,default); insert into t1 values ('dx',default); select * from t1; a b @@ -785,7 +805,7 @@ t1 CREATE TABLE `t1` ( `d` varchar(10) GENERATED ALWAYS AS (elt(`c`,`a`,`b`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('value1','value2',1,default); -insert into t1 values ('value1','value2',2,default); +insert ignore into t1 values ('value1','value2',2,default); select * from t1; a b c d value1 value2 1 value1 @@ -818,7 +838,7 @@ t1 CREATE TABLE `t1` ( `c` int(11) GENERATED ALWAYS AS (field('aa',`a`,`b`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('aa','bb',default); -insert into t1 values ('bb','aa',default); +insert ignore into t1 values ('bb','aa',default); select * from t1; a b c aa bb 1 @@ -836,7 +856,7 @@ t1 CREATE TABLE `t1` ( `c` int(11) GENERATED ALWAYS AS (find_in_set(`a`,`b`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('aa','aa,bb,cc',default); -insert into t1 values ('aa','bb,aa,cc',default); +insert ignore into t1 values ('aa','bb,aa,cc',default); select * from t1; a b c aa aa,bb,cc 1 @@ -914,7 +934,7 @@ t1 CREATE TABLE `t1` ( `c` int(11) GENERATED ALWAYS AS (locate(`b`,`a`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('foobarbar,','bar',default); -insert into t1 values ('xbar,','foobar',default); +insert ignore into t1 values ('xbar,','foobar',default); select * from t1; a b c foobarbar, bar 4 @@ -976,7 +996,7 @@ t1 CREATE TABLE `t1` ( `b` tinyint(1) GENERATED ALWAYS AS (`a` like 'H%!o' escape '!') VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('Hello',default); -insert into t1 values ('MySQL',default); +insert ignore into t1 values ('MySQL',default); select * from t1; a b Hello 1 @@ -1023,7 +1043,7 @@ t1 CREATE TABLE `t1` ( `b` varchar(10) GENERATED ALWAYS AS (lpad(`a`,4,' ')) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('MySQL',default); -insert into t1 values ('M',default); +insert ignore into t1 values ('M',default); select * from t1; a b MySQL MySQ @@ -1040,7 +1060,7 @@ t1 CREATE TABLE `t1` ( `b` varchar(10) GENERATED ALWAYS AS (ltrim(`a`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (' MySQL',default); -insert into t1 values ('MySQL',default); +insert ignore into t1 values ('MySQL',default); select * from t1; a b MySQL MySQL @@ -1059,7 +1079,7 @@ t1 CREATE TABLE `t1` ( `d` varchar(30) GENERATED ALWAYS AS (make_set(`c`,`a`,`b`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('a','b',1,default); -insert into t1 values ('a','b',3,default); +insert ignore into t1 values ('a','b',3,default); select * from t1; a b c d a b 1 a @@ -1091,7 +1111,7 @@ t1 CREATE TABLE `t1` ( `b` tinyint(1) GENERATED ALWAYS AS (`a` not like 'H%o') VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('Hello',default); -insert into t1 values ('MySQL',default); +insert ignore into t1 values ('MySQL',default); select * from t1; a b Hello 0 @@ -1108,7 +1128,7 @@ t1 CREATE TABLE `t1` ( `b` tinyint(1) GENERATED ALWAYS AS (!(`a` regexp 'H.+o')) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('Hello',default); -insert into t1 values ('hello',default); +insert ignore into t1 values ('hello',default); select * from t1; a b Hello 0 @@ -1185,7 +1205,7 @@ t1 CREATE TABLE `t1` ( `b` tinyint(1) GENERATED ALWAYS AS (`a` regexp 'H.+o') VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('Hello',default); -insert into t1 values ('hello',default); +insert ignore into t1 values ('hello',default); select * from t1; a b Hello 1 @@ -1262,7 +1282,7 @@ t1 CREATE TABLE `t1` ( `b` tinyint(1) GENERATED ALWAYS AS (`a` regexp 'H.+o') VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('Hello',default); -insert into t1 values ('MySQL',default); +insert ignore into t1 values ('MySQL',default); select * from t1; a b Hello 1 @@ -1325,7 +1345,7 @@ t1 CREATE TABLE `t1` ( `c` tinyint(1) GENERATED ALWAYS AS (soundex(`a`) = soundex(`b`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('Hello','Hello',default); -insert into t1 values ('Hello','MySQL',default); +insert ignore into t1 values ('Hello','MySQL',default); insert into t1 values ('Hello','hello',default); select * from t1; a b c @@ -1360,7 +1380,7 @@ t1 CREATE TABLE `t1` ( `c` tinyint(1) GENERATED ALWAYS AS (strcmp(`a`,`b`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('Hello','Hello', default); -insert into t1 values ('Hello','Hello1', default); +insert ignore into t1 values ('Hello','Hello1', default); select * from t1; a b c Hello Hello 0 @@ -1485,7 +1505,7 @@ t1 CREATE TABLE `t1` ( `b` varchar(16) GENERATED ALWAYS AS (case `a` when NULL then 'asd' when 'b' then 'B' else `a` end) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (NULL,default); -insert into t1 values ('b',default); +insert ignore into t1 values ('b',default); insert into t1 values ('c',default); select * from t1; a b @@ -1505,7 +1525,7 @@ t1 CREATE TABLE `t1` ( `c` int(11) GENERATED ALWAYS AS (if(`a` = 1,`a`,`b`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,2,default); -insert into t1 values (3,4,default); +insert ignore into t1 values (3,4,default); select * from t1; a b c 1 2 1 @@ -1523,7 +1543,7 @@ t1 CREATE TABLE `t1` ( `c` varchar(10) GENERATED ALWAYS AS (ifnull(`a`,'DEFAULT')) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (NULL,'adf',default); -insert into t1 values ('a','adf',default); +insert ignore into t1 values ('a','adf',default); select * from t1; a b c NULL adf DEFAULT @@ -1540,7 +1560,7 @@ t1 CREATE TABLE `t1` ( `b` varchar(10) GENERATED ALWAYS AS (nullif(`a`,'DEFAULT')) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('DEFAULT',default); -insert into t1 values ('a',default); +insert ignore into t1 values ('a',default); select * from t1; a b DEFAULT NULL @@ -1560,7 +1580,7 @@ t1 CREATE TABLE `t1` ( `b` tinyint(1) GENERATED ALWAYS AS (`a` > 0 and `a` < 2) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (-1,default); -insert into t1 values (1,default); +insert ignore into t1 values (1,default); select * from t1; a b -1 0 @@ -1577,7 +1597,7 @@ t1 CREATE TABLE `t1` ( `b` tinyint(1) GENERATED ALWAYS AS (`a` between 0 and 2) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (-1,default); -insert into t1 values (1,default); +insert ignore into t1 values (1,default); select * from t1; a b -1 0 @@ -1594,7 +1614,7 @@ t1 CREATE TABLE `t1` ( `b` varbinary(10) GENERATED ALWAYS AS (cast(`a` as char charset binary)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('11',default); -insert into t1 values (1,default); +insert ignore into t1 values (1,default); select * from t1; a b 11 11 @@ -1611,7 +1631,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (`a` & 5) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (0,default); +insert ignore into t1 values (0,default); select * from t1; a b 1 1 @@ -1645,7 +1665,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (`a` | 5) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (0,default); +insert ignore into t1 values (0,default); insert into t1 values (2,default); select * from t1; a b @@ -1664,7 +1684,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (`a` ^ 5) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (0,default); +insert ignore into t1 values (0,default); insert into t1 values (2,default); select * from t1; a b @@ -1683,7 +1703,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (`a` DIV 5) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (7,default); +insert ignore into t1 values (7,default); select * from t1; a b 1 0 @@ -1701,7 +1721,7 @@ t1 CREATE TABLE `t1` ( `c` tinyint(1) GENERATED ALWAYS AS (`a` <=> `b`) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,1,default); -insert into t1 values (NULL,NULL,default); +insert ignore into t1 values (NULL,NULL,default); insert into t1 values (1,NULL,default); select * from t1; a b c @@ -1721,7 +1741,7 @@ t1 CREATE TABLE `t1` ( `c` tinyint(1) GENERATED ALWAYS AS (`a` = `b`) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('a','b',default); -insert into t1 values ('a','a',default); +insert ignore into t1 values ('a','a',default); select * from t1; a b c a b 0 @@ -1739,7 +1759,7 @@ t1 CREATE TABLE `t1` ( `c` tinyint(1) GENERATED ALWAYS AS (`a` >= `b`) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('a','b',default); -insert into t1 values ('a','a',default); +insert ignore into t1 values ('a','a',default); select * from t1; a b c a b 0 @@ -1757,7 +1777,7 @@ t1 CREATE TABLE `t1` ( `c` tinyint(1) GENERATED ALWAYS AS (`a` > `b`) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('a','b',default); -insert into t1 values ('a','a',default); +insert ignore into t1 values ('a','a',default); select * from t1; a b c a b 0 @@ -1774,7 +1794,7 @@ t1 CREATE TABLE `t1` ( `b` tinyint(1) GENERATED ALWAYS AS (`a` is not null) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (NULL,default); +insert ignore into t1 values (NULL,default); select * from t1; a b 1 1 @@ -1791,7 +1811,7 @@ t1 CREATE TABLE `t1` ( `b` tinyint(1) GENERATED ALWAYS AS (`a` is null) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (NULL,default); +insert ignore into t1 values (NULL,default); select * from t1; a b 1 0 @@ -1808,7 +1828,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (`a` << 2) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (3,default); +insert ignore into t1 values (3,default); select * from t1; a b 1 4 @@ -1826,7 +1846,7 @@ t1 CREATE TABLE `t1` ( `c` tinyint(1) GENERATED ALWAYS AS (`a` <= `b`) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('b','a',default); -insert into t1 values ('b','b',default); +insert ignore into t1 values ('b','b',default); insert into t1 values ('b','c',default); select * from t1; a b c @@ -1846,7 +1866,7 @@ t1 CREATE TABLE `t1` ( `c` tinyint(1) GENERATED ALWAYS AS (`a` < `b`) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('b','a',default); -insert into t1 values ('b','b',default); +insert ignore into t1 values ('b','b',default); insert into t1 values ('b','c',default); select * from t1; a b c @@ -1865,7 +1885,7 @@ t1 CREATE TABLE `t1` ( `b` tinyint(1) GENERATED ALWAYS AS (`a` not between 0 and 2) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (-1,default); -insert into t1 values (1,default); +insert ignore into t1 values (1,default); select * from t1; a b -1 1 @@ -1883,7 +1903,7 @@ t1 CREATE TABLE `t1` ( `c` tinyint(1) GENERATED ALWAYS AS (`a` <> `b`) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('b','a',default); -insert into t1 values ('b','b',default); +insert ignore into t1 values ('b','b',default); insert into t1 values ('b','c',default); select * from t1; a b c @@ -1903,7 +1923,7 @@ t1 CREATE TABLE `t1` ( `c` tinyint(1) GENERATED ALWAYS AS (`a` <> `b`) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('b','a',default); -insert into t1 values ('b','b',default); +insert ignore into t1 values ('b','b',default); insert into t1 values ('b','c',default); select * from t1; a b c @@ -1922,7 +1942,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (`a` > 5 or `a` < 3) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (4,default); +insert ignore into t1 values (4,default); select * from t1; a b 1 1 @@ -1939,7 +1959,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (`a` >> 2) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (8,default); -insert into t1 values (3,default); +insert ignore into t1 values (3,default); select * from t1; a b 8 2 @@ -1956,7 +1976,7 @@ t1 CREATE TABLE `t1` ( `b` int(11) GENERATED ALWAYS AS (`a` xor 5) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (0,default); -insert into t1 values (1,default); +insert ignore into t1 values (1,default); insert into t1 values (2,default); select * from t1; a b @@ -2204,7 +2224,7 @@ t1 CREATE TABLE `t1` ( `b` datetime GENERATED ALWAYS AS (last_day(`a`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('2003-02-05',default); -insert into t1 values ('2003-02-32',default); +insert ignore into t1 values ('2003-02-32',default); Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; @@ -2253,7 +2273,7 @@ t1 CREATE TABLE `t1` ( `b` mediumtext GENERATED ALWAYS AS (microsecond(`a`)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('2009-12-31 12:00:00.123456',default); -insert into t1 values ('2009-12-31 23:59:59.000010',default); +insert ignore into t1 values ('2009-12-31 23:59:59.000010',default); select * from t1; a b 2009-12-31 12:00:00 0 @@ -2610,7 +2630,7 @@ t1 CREATE TABLE `t1` ( `b` mediumtext GENERATED ALWAYS AS (cast(`a` as unsigned)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (-1,default); +insert ignore into t1 values (-1,default); Warnings: Note 1105 Cast to unsigned converted negative integer to it's positive complement select * from t1; @@ -2631,7 +2651,7 @@ t1 CREATE TABLE `t1` ( `b` mediumtext GENERATED ALWAYS AS (cast(`a` as unsigned)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,default); -insert into t1 values (-1,default); +insert ignore into t1 values (-1,default); Warnings: Note 1105 Cast to unsigned converted negative integer to it's positive complement select * from t1; diff --git a/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result b/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result index 1d78bbf50e4..de5447e49eb 100644 --- a/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result @@ -86,7 +86,7 @@ a b c drop table t1,t2; drop procedure p1; # -# Bug mdev-3845: values of virtual columns are not computed for triggers +# MDEV-3845 values of virtual columns are not computed for triggers # CREATE TABLE t1 ( a INTEGER UNSIGNED NULL DEFAULT NULL, @@ -125,3 +125,192 @@ c DROP TRIGGER t1_ins_aft; DROP TRIGGER t1_del_bef; DROP TABLE t1,t2; +create table t1 (i int, t time not null, vt time(4) as (t) virtual); +create trigger trg before update on t1 for each row set @a = 1; +insert ignore into t1 (i) values (1); +Warnings: +Warning 1364 Field 't' doesn't have a default value +drop table t1; +# +# Examine the number of times triggers are recalculated for updates +# +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; +CREATE TABLE t1 ( +a INTEGER UNSIGNED NULL DEFAULT NULL, +b CHAR(10) NULL DEFAULT NULL, +c blob NULL DEFAULT NULL, +blob_a blob GENERATED ALWAYS AS (last_value(@a:=@a+1,a)) VIRTUAL, +blob_b blob GENERATED ALWAYS AS (last_value(@b:=@b+1,b)) VIRTUAL, +blob_c blob GENERATED ALWAYS AS (last_value(@c:=@c+1,c)) VIRTUAL +); +CREATE TRIGGER t1_ins +BEFORE INSERT +ON t1 +FOR EACH ROW +BEGIN +IF NEW.b IS NULL THEN +SET NEW.b="generated before insert"; +END IF; +END | +CREATE TRIGGER t1_update +BEFORE UPDATE +ON t1 +FOR EACH ROW +BEGIN +IF NEW.b IS NULL or NEW.c IS NULL THEN +SET NEW.b="generated before update"; +SET NEW.c="generated before update"; +END IF; +END | +# Inserts +set @a=0,@b=0,@c=0; +insert into t1 (a) values(1); +insert into t1 (a,b) values(2, "*2*"); +insert into t1 (a,b,c) values(3, "*3*", "**3**"); +insert into t1 (a,c) values(4, "**4**"); +select * from t1; +a b c blob_a blob_b blob_c +1 generated NULL 1 generated NULL +2 *2* NULL 2 *2* NULL +3 *3* **3** 3 *3* **3** +4 generated **4** 4 generated **4** +select @a,@b,@c; +@a @b @c +4 4 4 +select * from t1; +a b c blob_a blob_b blob_c +1 generated NULL 1 generated NULL +2 *2* NULL 2 *2* NULL +3 *3* **3** 3 *3* **3** +4 generated **4** 4 generated **4** +select @a,@b,@c; +@a @b @c +8 8 8 +select a,b,c from t1; +a b c +1 generated NULL +2 *2* NULL +3 *3* **3** +4 generated **4** +select @a,@b,@c; +@a @b @c +8 8 8 +select a,b,c,blob_a from t1; +a b c blob_a +1 generated NULL 1 +2 *2* NULL 2 +3 *3* **3** 3 +4 generated **4** 4 +select @a,@b,@c; +@a @b @c +12 8 8 +# updates +set @a=0,@b=0,@c=0; +update t1 set a=a+100 where a=1; +update t1 set a=a+100, b="*102*" where a=2; +update t1 set a=a+100, b=NULL where a=3; +update t1 set a=a+100, b="invisible", c=NULL where a=4; +select @a,@b,@c; +@a @b @c +0 0 0 +select * from t1; +a b c blob_a blob_b blob_c +101 generated generated before update 101 generated generated before update +102 generated generated before update 102 generated generated before update +103 generated generated before update 103 generated generated before update +104 generated generated before update 104 generated generated before update +drop trigger t1_ins; +drop trigger t1_update; +drop table t1; +SET sql_mode = DEFAULT; +# +# Same test, but with virtual keys +# +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; +CREATE TABLE t1 ( +a INTEGER UNSIGNED NULL DEFAULT NULL, +b CHAR(10) NULL DEFAULT NULL, +c blob NULL DEFAULT NULL, +blob_a blob GENERATED ALWAYS AS (a) VIRTUAL, +blob_b blob GENERATED ALWAYS AS (b) VIRTUAL, +blob_c blob GENERATED ALWAYS AS (c) VIRTUAL, +key (a), +key (blob_a(10)), +key (blob_b(10)), +key (blob_c(10)) +); +CREATE TRIGGER t1_ins +BEFORE INSERT +ON t1 +FOR EACH ROW +BEGIN +IF NEW.b IS NULL THEN +SET NEW.b="generated before insert"; +END IF; +END | +CREATE TRIGGER t1_update +BEFORE UPDATE +ON t1 +FOR EACH ROW +BEGIN +IF NEW.b IS NULL or NEW.c IS NULL THEN +SET NEW.b="generated before update"; +SET NEW.c="generated before update"; +END IF; +END | +# Inserts +insert into t1 (a) values(1); +insert into t1 (a,b) values(2, "*2*"); +insert into t1 (a,b,c) values(3, "*3*", "**3**"); +insert into t1 (a,c) values(4, "**4**"); +select * from t1; +a b c blob_a blob_b blob_c +1 generated NULL 1 generated NULL +2 *2* NULL 2 *2* NULL +3 *3* **3** 3 *3* **3** +4 generated **4** 4 generated **4** +select @a,@b,@c; +@a @b @c +4 4 4 +select * from t1; +a b c blob_a blob_b blob_c +1 generated NULL 1 generated NULL +2 *2* NULL 2 *2* NULL +3 *3* **3** 3 *3* **3** +4 generated **4** 4 generated **4** +select @a,@b,@c; +@a @b @c +4 4 4 +select a,b,c from t1; +a b c +1 generated NULL +2 *2* NULL +3 *3* **3** +4 generated **4** +select @a,@b,@c; +@a @b @c +4 4 4 +select a,b,c,blob_a from t1; +a b c blob_a +1 generated NULL 1 +2 *2* NULL 2 +3 *3* **3** 3 +4 generated **4** 4 +select @a,@b,@c; +@a @b @c +4 4 4 +# updates +update t1 set a=a+100 where a=1; +update t1 set a=a+100, b="*102*" where a=2; +update t1 set a=a+100, b=NULL where a=3; +update t1 set a=a+100, b="invisible", c=NULL where a=4; +select * from t1; +a b c blob_a blob_b blob_c +101 generated generated before update 101 generated generated before update +102 generated generated before update 102 generated generated before update +103 generated generated before update 103 generated generated before update +104 generated generated before update 104 generated generated before update +drop trigger t1_ins; +drop trigger t1_update; +drop table t1; +SET sql_mode = DEFAULT; diff --git a/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result b/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result index 77efa8fe6b9..f5c87838ec9 100644 --- a/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result @@ -86,7 +86,7 @@ a b c drop table t1,t2; drop procedure p1; # -# Bug mdev-3845: values of virtual columns are not computed for triggers +# MDEV-3845 values of virtual columns are not computed for triggers # CREATE TABLE t1 ( a INTEGER UNSIGNED NULL DEFAULT NULL, @@ -125,3 +125,192 @@ c DROP TRIGGER t1_ins_aft; DROP TRIGGER t1_del_bef; DROP TABLE t1,t2; +create table t1 (i int, t time not null, vt time(4) as (t) virtual); +create trigger trg before update on t1 for each row set @a = 1; +insert ignore into t1 (i) values (1); +Warnings: +Warning 1364 Field 't' doesn't have a default value +drop table t1; +# +# Examine the number of times triggers are recalculated for updates +# +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; +CREATE TABLE t1 ( +a INTEGER UNSIGNED NULL DEFAULT NULL, +b CHAR(10) NULL DEFAULT NULL, +c blob NULL DEFAULT NULL, +blob_a blob GENERATED ALWAYS AS (last_value(@a:=@a+1,a)) VIRTUAL, +blob_b blob GENERATED ALWAYS AS (last_value(@b:=@b+1,b)) VIRTUAL, +blob_c blob GENERATED ALWAYS AS (last_value(@c:=@c+1,c)) VIRTUAL +); +CREATE TRIGGER t1_ins +BEFORE INSERT +ON t1 +FOR EACH ROW +BEGIN +IF NEW.b IS NULL THEN +SET NEW.b="generated before insert"; +END IF; +END | +CREATE TRIGGER t1_update +BEFORE UPDATE +ON t1 +FOR EACH ROW +BEGIN +IF NEW.b IS NULL or NEW.c IS NULL THEN +SET NEW.b="generated before update"; +SET NEW.c="generated before update"; +END IF; +END | +# Inserts +set @a=0,@b=0,@c=0; +insert into t1 (a) values(1); +insert into t1 (a,b) values(2, "*2*"); +insert into t1 (a,b,c) values(3, "*3*", "**3**"); +insert into t1 (a,c) values(4, "**4**"); +select * from t1; +a b c blob_a blob_b blob_c +1 generated NULL 1 generated NULL +2 *2* NULL 2 *2* NULL +3 *3* **3** 3 *3* **3** +4 generated **4** 4 generated **4** +select @a,@b,@c; +@a @b @c +4 4 4 +select * from t1; +a b c blob_a blob_b blob_c +1 generated NULL 1 generated NULL +2 *2* NULL 2 *2* NULL +3 *3* **3** 3 *3* **3** +4 generated **4** 4 generated **4** +select @a,@b,@c; +@a @b @c +8 8 8 +select a,b,c from t1; +a b c +1 generated NULL +2 *2* NULL +3 *3* **3** +4 generated **4** +select @a,@b,@c; +@a @b @c +8 8 8 +select a,b,c,blob_a from t1; +a b c blob_a +1 generated NULL 1 +2 *2* NULL 2 +3 *3* **3** 3 +4 generated **4** 4 +select @a,@b,@c; +@a @b @c +12 8 8 +# updates +set @a=0,@b=0,@c=0; +update t1 set a=a+100 where a=1; +update t1 set a=a+100, b="*102*" where a=2; +update t1 set a=a+100, b=NULL where a=3; +update t1 set a=a+100, b="invisible", c=NULL where a=4; +select @a,@b,@c; +@a @b @c +0 0 0 +select * from t1; +a b c blob_a blob_b blob_c +101 generated generated before update 101 generated generated before update +102 generated generated before update 102 generated generated before update +103 generated generated before update 103 generated generated before update +104 generated generated before update 104 generated generated before update +drop trigger t1_ins; +drop trigger t1_update; +drop table t1; +SET sql_mode = DEFAULT; +# +# Same test, but with virtual keys +# +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; +CREATE TABLE t1 ( +a INTEGER UNSIGNED NULL DEFAULT NULL, +b CHAR(10) NULL DEFAULT NULL, +c blob NULL DEFAULT NULL, +blob_a blob GENERATED ALWAYS AS (a) VIRTUAL, +blob_b blob GENERATED ALWAYS AS (b) VIRTUAL, +blob_c blob GENERATED ALWAYS AS (c) VIRTUAL, +key (a), +key (blob_a(10)), +key (blob_b(10)), +key (blob_c(10)) +); +CREATE TRIGGER t1_ins +BEFORE INSERT +ON t1 +FOR EACH ROW +BEGIN +IF NEW.b IS NULL THEN +SET NEW.b="generated before insert"; +END IF; +END | +CREATE TRIGGER t1_update +BEFORE UPDATE +ON t1 +FOR EACH ROW +BEGIN +IF NEW.b IS NULL or NEW.c IS NULL THEN +SET NEW.b="generated before update"; +SET NEW.c="generated before update"; +END IF; +END | +# Inserts +insert into t1 (a) values(1); +insert into t1 (a,b) values(2, "*2*"); +insert into t1 (a,b,c) values(3, "*3*", "**3**"); +insert into t1 (a,c) values(4, "**4**"); +select * from t1; +a b c blob_a blob_b blob_c +1 generated NULL 1 generated NULL +2 *2* NULL 2 *2* NULL +3 *3* **3** 3 *3* **3** +4 generated **4** 4 generated **4** +select @a,@b,@c; +@a @b @c +4 4 4 +select * from t1; +a b c blob_a blob_b blob_c +1 generated NULL 1 generated NULL +2 *2* NULL 2 *2* NULL +3 *3* **3** 3 *3* **3** +4 generated **4** 4 generated **4** +select @a,@b,@c; +@a @b @c +4 4 4 +select a,b,c from t1; +a b c +1 generated NULL +2 *2* NULL +3 *3* **3** +4 generated **4** +select @a,@b,@c; +@a @b @c +4 4 4 +select a,b,c,blob_a from t1; +a b c blob_a +1 generated NULL 1 +2 *2* NULL 2 +3 *3* **3** 3 +4 generated **4** 4 +select @a,@b,@c; +@a @b @c +4 4 4 +# updates +update t1 set a=a+100 where a=1; +update t1 set a=a+100, b="*102*" where a=2; +update t1 set a=a+100, b=NULL where a=3; +update t1 set a=a+100, b="invisible", c=NULL where a=4; +select * from t1; +a b c blob_a blob_b blob_c +101 generated generated before update 101 generated generated before update +102 generated generated before update 102 generated generated before update +103 generated generated before update 103 generated generated before update +104 generated generated before update 104 generated generated before update +drop trigger t1_ins; +drop trigger t1_update; +drop table t1; +SET sql_mode = DEFAULT; diff --git a/mysql-test/suite/vcol/r/wrong_arena.result b/mysql-test/suite/vcol/r/wrong_arena.result new file mode 100644 index 00000000000..8a07c828288 --- /dev/null +++ b/mysql-test/suite/vcol/r/wrong_arena.result @@ -0,0 +1,67 @@ +create table t1 (a datetime, +# get_datetime_value +b int as (a > 1), # Arg_comparator +c int as (a in (1,2,3)), # in_datetime +d int as ((a,a) in ((1,1),(2,1),(NULL,1))), # cmp_item_datetime +# other issues +e int as ((a,1) in ((1,1),(2,1),(NULL,1))) # cmp_item_row::alloc_comparators() +); +Warnings: +Warning 1292 Incorrect datetime value: '1' +Warning 1292 Incorrect datetime value: '2' +Warning 1292 Incorrect datetime value: '3' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` datetime DEFAULT NULL, + `b` int(11) GENERATED ALWAYS AS (`a` > 1) VIRTUAL, + `c` int(11) GENERATED ALWAYS AS (`a` in (1,2,3)) VIRTUAL, + `d` int(11) GENERATED ALWAYS AS ((`a`,`a`) in ((1,1),(2,1),(NULL,1))) VIRTUAL, + `e` int(11) GENERATED ALWAYS AS ((`a`,1) in ((1,1),(2,1),(NULL,1))) VIRTUAL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +Warnings: +Warning 1292 Incorrect datetime value: '1' +Warning 1292 Incorrect datetime value: '2' +Warning 1292 Incorrect datetime value: '3' +connect con1, localhost, root; +insert t1 (a) values ('2010-10-10 10:10:10'); +select * from t1; +a b c d e +2010-10-10 10:10:10 1 0 0 NULL +Warnings: +Warning 1292 Incorrect datetime value: '1' +Warning 1292 Incorrect datetime value: '1' +Warning 1292 Incorrect datetime value: '2' +Warning 1292 Incorrect datetime value: '1' +Warning 1292 Incorrect datetime value: '1' +Warning 1292 Incorrect datetime value: '2' +disconnect con1; +connection default; +select * from t1; +a b c d e +2010-10-10 10:10:10 1 0 0 NULL +Warnings: +Warning 1292 Incorrect datetime value: '1' +Warning 1292 Incorrect datetime value: '2' +Warning 1292 Incorrect datetime value: '1' +Warning 1292 Incorrect datetime value: '1' +Warning 1292 Incorrect datetime value: '2' +drop table t1; +connect con1, localhost, root; +create table t1 (a datetime, +b datetime as (least(a,1)) # Item_func_min_max::get_date +); +insert t1 (a) values ('2010-10-10 10:10:10'); +select * from t1; +a b +2010-10-10 10:10:10 0000-00-00 00:00:00 +Warnings: +Warning 1292 Incorrect datetime value: '1' +disconnect con1; +connection default; +select * from t1; +a b +2010-10-10 10:10:10 0000-00-00 00:00:00 +Warnings: +Warning 1292 Incorrect datetime value: '1' +drop table t1; diff --git a/mysql-test/suite/vcol/t/alter_inplace-9045.test b/mysql-test/suite/vcol/t/alter_inplace-9045.test index 8f59ba75bce..57723e6f447 100644 --- a/mysql-test/suite/vcol/t/alter_inplace-9045.test +++ b/mysql-test/suite/vcol/t/alter_inplace-9045.test @@ -19,6 +19,7 @@ alter table t1 modify column hash varchar(32) as (md5(handle+1)) persistent, alg select * from t1; --error ER_ALTER_OPERATION_NOT_SUPPORTED alter table t1 modify column handle int not null, algorithm=inplace; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify column handle int not null, algorithm=copy; select * from t1; alter table t1 drop index handle, algorithm=inplace; diff --git a/mysql-test/suite/vcol/t/load_data.test b/mysql-test/suite/vcol/t/load_data.test index 4db3c77244e..f4b3b60397e 100644 --- a/mysql-test/suite/vcol/t/load_data.test +++ b/mysql-test/suite/vcol/t/load_data.test @@ -6,7 +6,7 @@ insert into t1 values ("a" , "b", 1), ("a" , "b", 2); create table t2 like t1 ; alter table t2 add column c4 bigint unsigned as (CONV(LEFT(MD5(concat(c1,c2,c3)), 16), 16, 10)) persistent unique key; select * into outfile 't1.csv' from t1; -load data infile 't1.csv' into table t2 ; +load data infile 't1.csv' ignore into table t2 ; select * from t2; insert into t2 (c1,c2,c3) values ("a" , "b", 4); select * from t2; diff --git a/mysql-test/suite/vcol/t/not_supported.test b/mysql-test/suite/vcol/t/not_supported.test index b7544cb33a4..1ea7970523a 100644 --- a/mysql-test/suite/vcol/t/not_supported.test +++ b/mysql-test/suite/vcol/t/not_supported.test @@ -2,7 +2,7 @@ # MDEV-7113 difference between check_vcol_func_processor and check_partition_func_processor # -# the following functions must not be supported in virtual columns. +# the following functions must not be supported in persistent columns. # but for compatibility reasons it won't be done in a GA version, # we'll only fix most critical issues (inconsistent results, crashes) @@ -13,15 +13,13 @@ set time_zone='+10:00'; set div_precision_increment=20; create table t1 (a int, b int, v decimal(20,19) as (a/3)); ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t2 (a int, b int, v int as (a+@a)); +create table t2 (a int, b int, v int as (a+@a)); drop table t2; --error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED create table t2 (a int, b int, v int as (a+@a) PERSISTENT); create table t3_ok (a int, b int, v int as (a+@@error_count)); --error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED create table t3 (a int, b int, v int as (a+@@error_count) PERSISTENT); ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t4 (a int, b int, v int as (@a:=a)); +create table t4 (a int, b int, v int as (@a:=a)); drop table t4; --error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED create table t4 (a int, b int, v int as (@a:=a) PERSISTENT); create table t8 (a int, b int, v varchar(100) as (from_unixtime(a))); diff --git a/mysql-test/suite/vcol/t/update.test b/mysql-test/suite/vcol/t/update.test index 8326afe214f..062d9736ed8 100644 --- a/mysql-test/suite/vcol/t/update.test +++ b/mysql-test/suite/vcol/t/update.test @@ -72,6 +72,7 @@ drop table t, t2; # create table t1 (a int, b int, c int, d int, e int); insert t1 values (1,2,3,4,5), (1,2,3,4,5); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t (a int primary key, b int, c blob as (b), index (c(57)), d blob, e blob as (d), index (e(57))) diff --git a/mysql-test/suite/vcol/t/vcol_keys_innodb.test b/mysql-test/suite/vcol/t/vcol_keys_innodb.test index 8eeef96b43f..58fb8378ac7 100644 --- a/mysql-test/suite/vcol/t/vcol_keys_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_keys_innodb.test @@ -1,34 +1,34 @@ -################################################################################ -# t/vcol_keys_innodb.test # -# # -# Purpose: # -# Testing keys, indexes defined upon virtual columns. # -# # -# InnoDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: Andrey Zhakov # -# Original Date: 2008-09-04 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ +############################################################################### +# t/vcol_keys_innodb.test # +# # +# Purpose: # +# Testing keys, indexes defined upon virtual columns. # +# # +# InnoDB branch # +# # +#-----------------------------------------------------------------------------# +# Original Author: Andrey Zhakov # +# Original Date: 2008-09-04 # +# Change Author: # +# Change Date: # +# Change: # +############################################################################### # -# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE ! +# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE ! # TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN # THE SOURCED FILES ONLY. # -#------------------------------------------------------------------------------# +#-----------------------------------------------------------------------------# # General not engine specific settings and requirements --source suite/vcol/inc/vcol_init_vars.pre -#------------------------------------------------------------------------------# +#-----------------------------------------------------------------------------# # Cleanup --source suite/vcol/inc/vcol_cleanup.inc -#------------------------------------------------------------------------------# +#-----------------------------------------------------------------------------# # Engine specific settings and requirements ##### Storage engine to be tested @@ -39,14 +39,81 @@ SET @@session.storage_engine = 'InnoDB'; ##### Workarounds for known open engine specific bugs # none -#------------------------------------------------------------------------------# +#-----------------------------------------------------------------------------# # Execute the tests to be applied to all storage engines let $with_foreign_keys = 1; --source suite/vcol/inc/vcol_keys.inc -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# # Cleanup --source suite/vcol/inc/vcol_cleanup.inc + +#-----------------------------------------------------------------------------# +# Execute storage engine specific tests +#-----------------------------------------------------------------------------# + +--echo # +--echo # MDEV-11737 Failing assertion: block->magic_n == MEM_BLOCK_MAGIC_N +--echo # + +CREATE TABLE t1 (i INT PRIMARY KEY, vi INT AS (i*2) VIRTUAL UNIQUE) +ENGINE=InnoDB; +CREATE TABLE t2 (i INT) ENGINE=InnoDB; +ALTER TABLE t1 ADD COLUMN col INT; +SELECT * FROM t1 WHERE vi < 2; +DROP TABLE t1, t2; + + +# +# MDEV-11604 Assertion `!check_datetime_range(ltime)' failed in TIME_to_longlong_datetime_packed +# +create table t1 ( + pk int auto_increment, + col_varchar varchar(847) not null default '', + col_int bigint(15) unsigned zerofill, + col_datetime datetime(3) not null default '1900-01-01 00:00:00', + col_time time(5) not null default '00:00:00', + col_blob text, + col_bit bit(34), + col_year year, + col_char char(10), + col_dec decimal(18,9) not null default 0, + col_enum enum('','a','b','c','d','e','f','foo','bar') not null default '', + col_date date not null default '1900-01-01', + col_timestamp timestamp(3) not null default '1971-01-01 00:00:00', + vcol_datetime datetime as (col_datetime) virtual, + vcol_dec decimal(18,9) zerofill as (col_dec) virtual, + vcol_bit bit(63) as (col_bit) virtual, + vcol_char binary(51) as (col_char) virtual, + vcol_timestamp timestamp(5) as (col_timestamp) virtual, + vcol_enum enum('','a','b','c','d','e','f','foo','bar') as (col_enum) virtual, + vcol_int tinyint(48) zerofill as (col_int) virtual, + vcol_time time(4) as (col_time) virtual, + vcol_varchar varbinary(3873) as (col_varchar) virtual, + vcol_year year as (col_year) virtual, + vcol_date date as (col_date) virtual, + vcol_blob longtext as (col_blob) virtual, + primary key(pk) + ) engine=innodb; + +insert into t1 (col_varchar,col_int,col_datetime,col_time,col_blob,col_bit,col_year,col_char,col_dec,col_enum,col_date,col_timestamp) values + ('foo',1,'2010-05-08 13:08:12.034783','18:32:14','foo',b'0111110101001001',1992,'f',0.2,'','1994-12-26','2019-01-11 00:00:00'), + ('bar',6,'1900-01-01 00:00:00','00:00:00','bar',b'10011000001101011000101',1985,'b',0.7,'','2028-04-06','1971-01-01 00:00:00'); + +alter table t1 add index(vcol_datetime); +drop table t1; + + +# +# MDEV-11704 InnoDB: Failing assertion: dfield_is_null(dfield2) || dfield2->data +# +create table t1 ( + pk int, + col_blob mediumtext not null default '', + vcol_blob tinyblob as (col_blob) virtual, + col_char char(22) null, + primary key(pk), + index(col_char,vcol_blob(64)) + ) engine=innodb; +insert ignore into t1 (pk) values (1),(2); +update t1 set col_char = 'foo' where pk = 1; +drop table t1; diff --git a/mysql-test/suite/vcol/t/vcol_keys_myisam.test b/mysql-test/suite/vcol/t/vcol_keys_myisam.test index 68fd7e1731b..337d14c3074 100644 --- a/mysql-test/suite/vcol/t/vcol_keys_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_keys_myisam.test @@ -1,6 +1,59 @@ - --source include/have_sequence.inc --let $datadir= `select @@datadir` +############################################################################### +# t/vcol_keys_myisam.test # +# # +# Purpose: # +# Testing keys, indexes defined upon virtual columns. # +# # +# MyISAM branch # +# # +#-----------------------------------------------------------------------------# +# Original Author: Andrey Zhakov # +# Original Date: 2008-09-04 # +# Change Author: # +# Change Date: # +# Change: # +############################################################################### + +# +# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE ! +# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN +# THE SOURCED FILES ONLY. +# + +#------------------------------------------------------------------------------ +# General not engine specific settings and requirements +--source suite/vcol/inc/vcol_init_vars.pre + +#------------------------------------------------------------------------------ +# Cleanup +--source suite/vcol/inc/vcol_cleanup.inc + +#------------------------------------------------------------------------------ +# Engine specific settings and requirements + +##### Storage engine to be tested +# Set the session storage engine +SET @@session.storage_engine = 'MyISAM'; + +##### Workarounds for known open engine specific bugs +# none + +#------------------------------------------------------------------------------ +# Execute the tests to be applied to all storage engines +--source suite/vcol/inc/vcol_keys.inc + +# Cleanup +--source suite/vcol/inc/vcol_cleanup.inc + +#-----------------------------------------------------------------------------# +# Execute storage engine specific test +#-----------------------------------------------------------------------------# + +--echo # +--echo # Original test +--echo # create table t1 (a int, b int as (a+1), c int, index(b)); insert t1 (a,c) values (0x7890abcd, 0x76543210); @@ -49,56 +102,163 @@ select * from t1 where b=31; --exec $MYISAMCHK $datadir/test/t1 --error 1 --exec $MYISAMCHK -r $datadir/test/t1 - drop table t1; -################################################################################ -# t/vcol_keys_myisam.test # -# # -# Purpose: # -# Testing keys, indexes defined upon virtual columns. # -# # -# MyISAM branch # -# # -#------------------------------------------------------------------------------# -# Original Author: Andrey Zhakov # -# Original Date: 2008-09-04 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ +--echo # +--echo # MDEV-11606 Server crashes in mi_make_key / sort_key_read +--echo # + +CREATE TABLE t1 ( + pk BIGINT AUTO_INCREMENT, + col_date DATE NULL, + col_datetime DATETIME(1) NULL, + col_int TINYINT(13) UNSIGNED ZEROFILL NULL, + col_varchar VARBINARY(2222) NULL, + col_timestamp TIMESTAMP(2) NULL, + col_bit BIT(64) NOT NULL DEFAULT 0, + col_blob MEDIUMBLOB NULL, + col_dec DECIMAL(10,9) ZEROFILL NOT NULL DEFAULT 0, + col_time TIME(4) NULL, + col_year YEAR NOT NULL DEFAULT '1970', + col_char CHAR(129) NULL, + col_enum SET('','a','b','c','d','e','f','foo','bar') NULL, + vcol_dec DECIMAL(50,18) ZEROFILL AS (col_dec) VIRTUAL, + vcol_bit BIT(48) AS (col_bit) VIRTUAL, + vcol_char CHAR(224) AS (col_char) VIRTUAL, + vcol_datetime DATETIME(4) AS (col_datetime) VIRTUAL, + vcol_year YEAR AS (col_year) VIRTUAL, + vcol_varchar VARBINARY(356) AS (col_varchar) VIRTUAL, + vcol_blob MEDIUMBLOB AS (col_blob) VIRTUAL, + vcol_timestamp TIMESTAMP(5) AS (col_timestamp) VIRTUAL, + vcol_int BIGINT(46) AS (col_int) VIRTUAL, + vcol_time TIME(1) AS (col_time) VIRTUAL, + vcol_date DATE AS (col_date) VIRTUAL, + vcol_enum SET('','a','b','c','d','e','f','foo','bar') AS (col_enum) VIRTUAL, + UNIQUE(pk), + PRIMARY KEY(pk) + ) ENGINE=MyISAM; + +--disable_query_log +INSERT INTO t1 (col_date,col_datetime,col_int,col_varchar,col_timestamp,col_bit,col_blob,col_dec,col_time,col_year,col_char,col_enum) VALUES + (NULL,'2011-04-17 15:46:11.056462',6,'rsprn','1980-01-01 00:00:00',b'0001011111000111001110000110100110010101101','spr',0.0,'00:00:00',1988,'p',''), + ('2007-05-18',NULL,5,'rnwg','2009-07-07 23:46:32.052699',b'01010','n',0.6,'04:35:56.018027',1995,'wgrpq',''), + ('1994-03-16','2006-03-15 22:48:25.013225',7,'grpquarw','2034-05-17 10:51:23.048265',b'0001011101001011000111101','rp',0.3,'15:13:22.043368',2004,'pq',''), + ('1980-01-01','1987-06-01 04:14:04.027480',1,'qu','1989-07-05 09:46:16.038513',b'001111011000100011100111010100101010000100010100101','uar',0.6,'11:56:35.031314',1986,'',''), + ('2014-08-16','2021-01-08 20:59:16.041252',0,'arw','2022-12-20 22:48:53.014627',b'110110101100001011001110110100','m',0.6,'17:26:26.039855',2008,'rw',''), + ('1981-12-02','1992-02-10 09:29:41.028674',6,'wk','2017-09-25 10:37:25.043516',b'010101001110111010101001101000101010',NULL,0.7,'00:00:00',2035,'kaz',''), + ('2022-11-11','2029-03-07 17:24:19.043489',122,'a','1980-01-01 00:00:00',b'0001100111011','z',0.0,'10:23:45.050733',2018,'a',''), + ('2004-03-12','1979-02-18 00:00:00',0,'zjeiwvd','1998-07-03 16:09:05.053954',b'0000110101111001001110100100111001111111100001110','',0.4,'07:43:46.015324',2028,'je',''), + ('2016-08-08','1986-03-10 00:00:00',3,'eiwv','2025-08-07 12:24:53.040869',b'010001101110100111111','iw',0.3,'02:48:45.058781',2020,'',''), + ('1979-02-25',NULL,2,'wvd','1980-01-01 00:00:00',b'010','vdm',0.1,'13:35:24.021296',1995,'dmd',''), + ('2012-04-19','2034-10-06 23:29:21.057367',9,'mdiv','2022-05-16 05:28:40.005808',b'110111111101000010011011001','divj',0.3,'11:24:50.017885',1997,'iv',''), + ('2009-10-13','1997-01-21 13:04:34.011524',1,'vjqs','1980-01-01 00:00:00',b'11110011100101011100001110110000101001100010000011110110011','j',0.7,'00:00:00',2008,'qsxmh',''), + ('2012-01-01','2011-06-23 06:11:33.014723',9,'r','2022-04-27 05:29:32.023395',b'1001011010101100100111','',0.5,'03:34:01.048002',1976,'sx',''), + ('2007-08-24','2012-01-24 22:16:53.014811',2,'fpp','2005-10-11 08:58:32.021273',b'011011111011',NULL,0.4,'18:11:17.036115',2026,'m',''), + (NULL,'1985-05-28 00:00:00',7,'hjw','2030-06-10 10:15:54.061818',b'0011110101001100011011000101010','',0.5,'02:03:21.020237',1994,'z',''), + ('2006-09-09','2002-11-10 06:16:27.008631',0,'jw','2030-07-16 00:00:00',b'11101110111101000010101110000010001110110001001101110100','wa',0.8,'00:00:00',1974,'',''), + ('1993-04-22','1980-01-01 00:00:00',3,'a','2020-02-06 08:11:00.051515',b'001110110010','gew',0.4,'11:59:05.013933',1998,NULL,''), + ('1985-11-05','2019-12-24 04:13:43.062741',7,'foo','1986-07-02 00:00:00',b'10100110001010100011111111101011011101001110010110101100110000','',0.5,'17:32:55.060182',1978,'w',''), + ('2007-02-20','2033-10-16 18:47:42.006517',1,'clc','1971-10-14 00:00:00',b'100001010','',0.1,'20:38:42.062598',2004,'lcfy',''), + ('1979-12-10','1972-08-04 00:00:00',8,'','2021-12-24 04:51:09.011443',b'011010010010010010011101000010110011110110110010100010','e',0.1,'23:08:10.014396',2026,'cfykywl',''), + ('2002-07-04',NULL,NULL,'fyky','1980-11-02 00:00:00',b'10000010111010000110','f',0.6,'13:07:14.014203',1979,'ykywl',''), + ('2019-02-15','2004-08-28 10:16:46.053753',8,'kywl','2004-12-01 00:00:00',b'010111010110001110110011000010110111011','ywlcne',0.2,'09:10:39.028897',2031,'wlcnemiuaab',''), + ('1989-05-15','1973-09-04 00:00:00',2,'lcne',NULL,b'100001100101110110000011110','',0.9,'19:22:16.015548',2013,'cnemiuaa',''), + ('2023-04-20','2018-12-04 04:19:46.040664',8,NULL,'1985-04-18 05:32:12.013509',b'111011011111100100000001','nem',0.1,'23:18:05.007794',2026,'emiua',''), + (NULL,'2024-08-10 03:52:31.047182',2,'miua','2035-09-03 06:07:22.008308',b'000111','',0.1,'03:58:02.003946',1988,'iua',''), + ('1977-09-01','1987-02-01 03:44:00.061840',5,'u','1997-11-27 04:02:13.014551',b'111110001001100101101000100010001011101000011',NULL,0.3,'00:00:00',1985,'aab',''), + (NULL,'1980-01-01 00:00:00',6,'a','1989-03-02 09:07:11.058643',b'10101001011110110010111010010100001010000110000110010',NULL,0.8,'17:41:15.057101',1975,'br',''), + ('1980-01-01','2019-02-10 20:56:51.063985',NULL,'rr','2000-02-28 01:38:27.004468',b'0101001011110001010001','rifnhu',0.5,'20:55:57.029281',1973,'if',''), + (NULL,'2019-04-15 02:13:03.019581',7,'fnhu','2000-03-25 18:48:46.063113',b'011000110','nhuu',0.0,'00:00:00',2030,'h',''), + ('1997-04-01',NULL,3,NULL,'1976-05-22 04:48:42.013754',b'101110101010000111101',NULL,0.1,'12:09:48.030076',2031,'u',''), + (NULL,'1993-10-10 15:11:03.021823',NULL,'ufzasunkrcpvasdqkxbwptigbpnesqigwegcnfeuvrgnecpthm','1986-06-12 04:29:01.017855',b'11110','fza',0.9,NULL,1994,'zasun',''), + ('1997-02-13','2001-04-08 02:01:53.018388',0,'as','1975-09-18 00:00:00',b'00111000101001001101001000100100010101110011010111000001011011','su',0.3,'15:15:31.011102',1972,'unk',''), + ('1975-07-26','2022-12-24 00:00:00',0,'foo','1986-01-22 21:27:38.024505',b'1111110000000001000010111','krc',0.9,'05:46:08.055789',1996,'rcp',''), + ('2000-08-04','1980-01-01 00:00:00',48,'foo','2015-12-21 17:04:06.008790',b'0100001110011001011101011101110110100010000101101100011010','g',0.7,'18:31:50.046211',2025,'pvasdq',''), + ('2001-03-26','2032-03-19 13:15:13.063368',NULL,'foo','2026-09-05 02:46:10.026919',b'11','a',0.3,'03:12:20.039599',2019,'sdqkx',''), + ('2035-01-14','1987-09-15 05:46:00.041527',4,'p','1980-01-01 00:00:00',b'1111100111','dqkxbwpt',0.0,'09:57:41.059145',1995,'q',''), + ('2035-07-13','2011-04-13 04:05:14.025091',212,'kxbw','1985-02-14 11:58:32.002055',b'1010100011110101011111111011010','x',0.2,'19:35:02.024655',1975,'bwptig',''), + ('2026-02-08','2015-05-04 09:31:22.017074',4,'wpt','2024-01-26 11:06:03.057899',b'011000010000100000011000011011000100101111001100000111011010','ptig',0.0,'00:00:00',1977,'tig',''), + ('1981-05-11',NULL,NULL,'foo','1981-12-09 10:10:34.008107',b'01000100100100110011111','gbp',0.0,'13:05:42.035253',2019,'bpn',''), + ('1977-05-16',NULL,9,'pne',NULL,b'001101100111001110110010111001110100','s',0.0,'15:09:37.063819',1998,'ne',''), + ('1980-01-01','2018-12-02 00:27:35.056455',2,'','1981-07-07 23:39:32.028644',b'0000101001010111010001101000','es',0.3,'15:43:30.016638',2013,NULL,''), + ('2027-09-05','1998-05-14 04:15:42.009728',1,'s','2015-07-16 00:00:00',b'01011101101010000110011010000111001000001000011','',0.6,'08:39:24.041879',2035,'qigweg',''), + ('2005-02-04',NULL,2,'i','1974-01-11 11:02:16.024653',b'01001101110001001101101010011001001101010010000','gw',0.6,'03:28:30.012172',1978,'weg',''), + (NULL,'1976-06-21 00:00:00',5,NULL,'2023-11-25 15:49:52.021725',b'101011010001100','e',0.1,'00:00:00',1977,'gcn',''), + ('1989-07-13',NULL,1,'c','1978-02-22 02:55:14.047104',b'01101010100001100110111011101000111011101101110011','f',0.8,NULL,1987,'nfeu',''), + ('2004-04-27','2019-06-28 08:04:35.039213',0,'f','1990-01-09 14:22:27.065127',b'00101001011','eu',0.0,'13:33:09.039791',2007,'uvrgne',''), + ('2008-09-08','1990-11-05 00:00:00',1,'w','2026-12-23 00:00:00',b'0001101','vrgnec',0.3,'19:13:14.037732',1983,'d',''), + ('2026-08-12','2026-11-23 11:18:35.012315',4,'rgnec','1988-09-06 07:11:55.057710',b'11010111001001101100100010110011100001000100001011000000000010','',0.9,NULL,1982,'gnecpth',''), + ('1992-12-03','2033-08-18 04:47:11.033829',65,'n','1989-11-21 17:42:13.012747',b'11011011110000000',NULL,0.9,'10:08:34.006377',1971,'ecpth',''), + ('1976-10-11','1975-05-18 00:00:00',3,'c','2017-11-06 03:33:38.002741',b'0111100010000111000111111100111100111000101100111111100','p',0.7,'03:28:07.039921',2014,'thmhf',''), + ('2014-04-19','2023-08-07 16:18:59.024013',0,'','2006-05-04 23:01:46.019351',b'0101101011011101101011101110000001001000110100101000011001110','h',0.5,'00:00:00',1995,'m',''), + ('1990-07-16','1980-01-01 00:00:00',8,'hffqbythjwpukqubzpomntrddrwhzjtqvb','1985-08-04 05:33:20.030471',b'001101111111100110101111000011100','ff',0.0,'00:00:00',2002,'fqbythj',''), + (NULL,'2019-01-12 00:00:00',0,NULL,'2009-01-25 00:00:00',b'100111111010000110010011100100000011101001010101111','qb',0.4,'20:35:33.059895',1981,'byt',''), + ('1991-10-07',NULL,2,'yt','2027-04-19 06:38:46.020191',b'001','t',0.4,'10:02:06.014126',2004,'h',''), + (NULL,'2009-07-05 00:00:00',241,'j','1981-06-26 12:35:20.061910',b'10101110001101001000011010010111000','wpukqu',0.5,'00:00:00',1973,'pukqu',''), + ('2001-05-26','2007-01-06 00:57:02.048605',0,'u',NULL,b'111100','k',0.7,'03:19:10.052988',2026,'q',NULL), + ('2008-03-15','1990-09-11 00:00:00',5,'ubz','1980-01-01 00:00:00',b'11010111011110001101111000000011000111101100111','b',0.5,'00:34:27.006616',2013,NULL,''), + ('1984-08-01','2000-09-20 09:35:47.025609',3,'zp','2016-11-22 19:38:52.053299',b'00000010','po',0.7,'19:47:19.014687',1996,'o',''), + ('1978-02-05','1978-05-08 04:30:57.023271',7,'foo','2000-04-06 08:42:13.019650',b'11000110111100101010001110111101111000001101','n',0.8,NULL,1980,'trdd',''), + ('2017-04-11','2002-09-26 12:59:43.051659',8,'rd','1972-03-27 13:09:07.017459',b'00011110001001001000000100110100101010','ddrwh',0.7,'00:00:00',2021,'drwhzj',''), + ('1980-01-01','1986-05-04 05:15:19.008418',0,'r','2005-10-04 09:21:09.020131',b'1101100010101001010011010001011101001111110010101111011','wh',0.0,'00:00:00',1975,'hzjtqv',''), + ('2035-12-12','1980-01-01 00:00:00',0,'x',NULL,b'0010000101010110111100000110000010001000100001000110111000010110','zjt',0.4,'15:51:12.040679',1984,'jtqvbji',''), + ('1993-05-12','2000-11-11 20:54:49.053753',0,'tqvb','2022-02-26 14:26:36.004981',b'110000101110000111011','qv',0.7,'00:00:00',1972,'v',''), + ('1971-08-22','2029-02-15 16:39:35.007278',2,NULL,'2033-09-22 08:28:19.057517',b'11111101011101110111100011011111001','bji',0.8,'08:34:37.000701',2000,'o',''), + (NULL,NULL,5,'foo','1982-02-24 00:00:00',b'00111111000111111111010111010111011101','iklce',0.8,'01:23:11.014485',2021,'klcek',''), + (NULL,NULL,8,'lce','1988-07-28 11:48:23.011427',b'101101000101010000000100000001011','',0.3,'17:15:34.034697',1991,'cekxqy',''), + ('2029-12-07','1993-12-24 00:45:29.060155',3,'ekx','1980-01-01 00:00:00',b'01001010110110000100100100111010110000000101001011111110001100','q',0.7,'10:39:47.004022',2006,'foo',''), + ('2015-10-20','1980-01-01 00:00:00',189,'xqy','2028-12-19 00:00:00',b'101001011011100101110010101000101110100110','qy',0.5,'15:16:59.059052',1993,'foo',''), + ('1998-08-07','2017-08-07 01:53:34.056737',5,'oxsolbx',NULL,b'1000111010110010110','xsolbxth',0.3,'22:56:09.003450',2014,'s',''), + ('2016-01-25','2000-09-14 22:35:41.048328',6,'foo','2004-10-11 00:00:00',b'001','olbxt',0.0,'14:15:54.033066',1983,'lbxt',''), + ('1979-09-02','2027-01-19 09:34:15.034597',4,'bxth','1989-10-23 09:11:09.055445',b'011011001110000011011011',NULL,0.8,'05:31:31.006489',1978,'xthdc',''), + ('1980-01-01',NULL,8,'th','2012-02-07 00:00:00',b'00101011001100111001101011010110','hdc',0.0,'22:09:17.054381',2013,'dcprs',''), + (NULL,'2018-08-03 17:37:14.049040',2,'cprswpj','1990-07-28 07:56:50.026324',b'0000010111011110100100010010011011010010001111011010000010011101','',0.1,NULL,1971,'prswpjx',''), + ('1984-05-07','2012-05-07 00:00:00',1,'rswp','2030-05-09 07:42:25.003848',b'1001','swp',0.4,'13:27:32.040813',1997,'wpj',''), + (NULL,'2030-03-22 14:03:46.000742',7,'pjxixm','2022-05-11 00:00:00',b'00111110011001010010001111010001111110010010000111','j',0.8,'00:00:00',1996,'x',NULL), + ('2000-12-03','2020-08-13 16:03:09.041436',8,'ix','1985-05-19 11:28:09.002728',b'11011010000101000110111111010111','xmvfwm',0.9,'19:06:00.002417',1976,'m',''), + ('1990-03-13','2035-09-08 21:29:04.011731',5,'vfwmsys','2029-11-03 04:28:54.058532',b'0110001011001010100','fw',0.6,'20:30:32.032224',1994,'wmsys',''), + ('2035-06-04','2027-06-07 11:27:21.038934',8,'ms','1987-09-02 00:00:00',b'001101101101111110010110110011','syse',0.1,'01:10:53.060943',2027,'yse',''), + (NULL,'1993-06-06 07:29:56.029103',NULL,'','1971-06-08 23:51:55.054403',b'11001110001111111001001010101110111011000100111010','se',0.2,'10:24:53.013058',1995,'eb',''), + ('2018-06-12','2020-08-06 23:47:35.060301',5,NULL,NULL,b'110011110111010111','blwc',0.6,NULL,1971,'lwc',''), + ('2005-02-03','2016-10-11 00:00:00',0,'w','2005-03-25 00:00:00',b'0101001001001','',0.2,'21:56:26.025743',1971,'c',''), + ('2025-10-10',NULL,1,'vumvyv','2034-05-06 18:17:26.004829',b'10110101101100100001000011001111100100111101100','um',0.3,'19:42:29.005509',1992,'m',''), + ('2014-01-27','1980-01-01 00:00:00',2,'vyvb','1975-04-08 10:13:06.052060',b'111011110111111010011111011011101111','yv',0.4,'15:13:32.059509',2011,NULL,''), + ('2016-08-04','2008-12-03 01:55:41.030042',6,'vb','1993-09-08 00:01:40.016566',b'000101110101100111001101010110','b',0.5,'08:39:05.055786',1993,'it',''), + ('1980-01-01','1980-01-01 00:00:00',9,'tx','1991-07-19 05:37:43.056696',b'110110111010111101010001100010111100110011111010100100100','k',0.9,'00:00:00',1999,'h',''), + (NULL,'2007-06-14 15:47:29.017306',9,'foo',NULL,b'0100111000001011111000111010000011011000011000101010','qjxdzd',0.3,'13:52:31.035851',2001,'jxdzd',''), + (NULL,'2022-04-28 18:27:19.060240',4,'foo','2018-02-28 02:49:16.013066',b'10000100000000110011011110101110100001100011101110011011100','d',0.0,'15:01:48.022368',1987,'zdytun',''), + ('1987-10-10','1975-06-02 02:47:57.012240',9,'dy','1980-06-10 00:00:00',b'110000111','',0.7,'08:13:44.003967',1981,'',''), + ('2015-09-28',NULL,4,'d','2005-08-09 08:35:04.039832',b'00','b',0.1,'00:47:43.048164',1973,'yt',''), + ('2030-01-18','2011-12-09 00:00:00',6,NULL,'1982-05-13 00:00:00',b'111110100001000010001110110010111100001011010','v',0.2,'00:39:24.001557',2027,'tun',''), + ('1980-06-28','2016-04-07 00:00:00',8,'y','1980-01-01 00:00:00',b'01011100100001010110101110111110110','unq',0.7,'00:00:00',2016,'foo',''), + ('2018-09-16','1975-01-03 00:00:00',NULL,'qv','2028-05-10 00:00:00',b'0001100101001011100110','vv',0.0,'23:54:42.064230',2000,'vr',''), + ('2033-12-11','2021-07-23 12:20:17.025201',3,'rm','1996-07-16 00:00:00',b'1011001110','mpyx',0.7,'04:04:01.055956',2009,'pyx',''), + ('1982-12-18','1996-09-16 00:00:00',9,'yx','2003-10-14 03:54:44.012072',b'11001011011000001111011000101111101110100101','x',0.9,NULL,1981,'rencqh',''), + ('1980-01-01','2009-01-17 12:11:34.030449',7,'encqh','1980-01-01 00:00:00',b'1101001101001000101010001100100100','ncq',0.4,'23:44:22.012217',2030,'b',''), + ('2015-05-03','1987-03-19 17:37:53.053429',6,'','2012-08-03 00:00:00',b'0','cq',0.0,'17:16:43.030750',2035,'qh',NULL), + (NULL,'1980-01-01 00:00:00',1,'huyr','2012-02-11 14:15:13.004778',b'110011001100010100001101011001011110010000011001110101','',0.7,'09:33:00.034425',2024,'uyr',''), + ('2019-06-05','2020-08-05 23:53:07.028129',1,'yr',NULL,b'1001011110101010001111101000011001011111100','rflu',0.3,NULL,2016,'fluezqe',''), + ('1980-01-10','2025-05-12 08:22:39.039097',1,'lu','1975-07-24 00:00:00',b'10100111001111101001110000110011','',0.1,'23:58:28.031575',2005,NULL,''), + ('2008-03-17','1982-05-27 11:44:53.038339',NULL,'uezqe','2024-10-12 02:16:04.063095',b'1001010110101101000101011011000011','e',0.9,'19:37:29.063243',1987,'zqekmq','') +; +--enable_query_log +--disable_warnings +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR +ALTER TABLE t1 ADD INDEX(col_enum,vcol_int); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR +ALTER TABLE t1 ADD INDEX(col_year); +--enable_warnings +DROP TABLE t1; # -# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. +# MDEV-11750 Assertion `vfield' failed in TABLE::update_virtual_fields after crash recovery on corrupted MyISAM table # +create table t1 ( + pk int primary key auto_increment, + b bit default null, + key(b) +) engine=myisam; -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source suite/vcol/inc/vcol_init_vars.pre - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/vcol/inc/vcol_cleanup.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested -# Set the session storage engine -SET @@session.storage_engine = 'MyISAM'; - -##### Workarounds for known open engine specific bugs -# none - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/vcol/inc/vcol_keys.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/vcol/inc/vcol_cleanup.inc +insert into t1 values (null, 0); +repair table t1 extended; +drop table t1; diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test index 2387000c3ef..5bdd927070a 100644 --- a/mysql-test/suite/vcol/t/vcol_misc.test +++ b/mysql-test/suite/vcol/t/vcol_misc.test @@ -120,8 +120,8 @@ DROP TABLE t1,t2; # CREATE TABLE t1 (p int, a double NOT NULL, v double AS (ROUND(a,p)) VIRTUAL); -INSERT INTO t1 VALUES (0,1,0); -INSERT INTO t1 VALUES (NULL,0,0); +INSERT IGNORE INTO t1 VALUES (0,1,0); +INSERT IGNORE INTO t1 VALUES (NULL,0,0); SELECT a, p, v, ROUND(a,p), ROUND(a,p+NULL) FROM t1; DROP TABLE t1; @@ -266,8 +266,8 @@ show columns from t1; --replace_column 8 # show full columns from t1; INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,NULL); -UPDATE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a'; -INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a'); +UPDATE IGNORE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a'; +INSERT IGNORE INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a'); set sql_mode='strict_all_tables'; --error ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN UPDATE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a'; @@ -294,6 +294,17 @@ create table t1 (v1 varchar(255) as (c1) persistent, c1 varchar(50)) collate=lat show create table t1; drop table t1; +# +# MDEV-11527 Virtual columns do not get along well with NO_ZERO_DATE +# +set sql_mode='no_zero_date'; +create table t1 ( + ts timestamp not null default current_timestamp, + tsv timestamp as (adddate(ts, interval 1 day)) virtual +); +drop table t1; +set sql_mode=default; + --echo # --echo # Start of 10.1 tests diff --git a/mysql-test/suite/vcol/t/vcol_select_myisam.test b/mysql-test/suite/vcol/t/vcol_select_myisam.test index c14faba576d..5dd08894fea 100644 --- a/mysql-test/suite/vcol/t/vcol_select_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_select_myisam.test @@ -57,7 +57,7 @@ CREATE TABLE t1 (b int); INSERT INTO t1 VALUES (NULL),( 78), (185), (0), (154); CREATE TABLE t2 (a int, b int AS (a) VIRTUAL); -INSERT INTO t2 VALUES (187,187), (9,9), (187,187); +INSERT IGNORE INTO t2 VALUES (187,187), (9,9), (187,187); EXPLAIN EXTENDED SELECT * FROM t1 JOIN t2 USING (b); @@ -68,3 +68,31 @@ SELECT * FROM t1 NATURAL JOIN t2; SELECT * FROM t1 NATURAL JOIN t2; DROP TABLE t1,t2; + +# +# MDEV-11640 gcol.gcol_select_myisam fails in buildbot on Power +# + +create table t1 ( + pk integer auto_increment, + bi integer not null, + vi integer generated always as (bi) virtual, + bc varchar(1) not null, + vc varchar(2) generated always as (concat(bc, bc)), + primary key (pk), + key (vi, vc)); +insert t1 (bi, bc) values (0, 'x'), (0, 'n'), (1, 'w'), (7, 's'), (0, 'a'), (4, 'd'), (1, 'w'), (1, 'j'), (1, 'm'), (4, 'k'), (7, 't'), (4, 'k'), (2, 'e'), (0, 'i'), (1, 't'), (6, 'z'), (3, 'c'), (6, 'i'), (8, 'v'); +create table t2 ( + pk integer auto_increment, + bi integer not null, + vi integer generated always as (bi) virtual, + bc varchar(257) not null, + vc varchar(2) generated always as (concat(bc, bc)), + primary key (pk), + key (vi, vc)); +insert t2 (bi, bc) values (1, 'c'), (8, 'm'), (9, 'd'), (6, 'y'), (1, 't'), (6, 'd'), (2, 's'), (4, 'r'), (8, 'm'), (4, 'b'), (4, 'x'), (7, 'g'), (4, 'p'), (1, 'q'), (9, 'w'), (4, 'd'), (8, 'e'), (4, 'b'), (8, 'y'); +explain # should be using join buffer +select t2.vi from (t2 as t3 right join (t2 left join t1 on (t1.bi = t2.vi)) on (t1.vc = t2.vc)); +--sorted_result +select t2.vi from (t2 as t3 right join (t2 left join t1 on (t1.bi = t2.vi)) on (t1.vc = t2.vc)); +drop table t2,t1; diff --git a/mysql-test/suite/vcol/t/wrong_arena.test b/mysql-test/suite/vcol/t/wrong_arena.test new file mode 100644 index 00000000000..484f1fe685d --- /dev/null +++ b/mysql-test/suite/vcol/t/wrong_arena.test @@ -0,0 +1,35 @@ +# +# This tests various issues when vcol items allocate memory (e.g. more items) +# not in the TABLE::expr_arena. +# + +# +# MDEV-9690 concurrent queries with virtual columns crash in temporal code +# +create table t1 (a datetime, + # get_datetime_value + b int as (a > 1), # Arg_comparator + c int as (a in (1,2,3)), # in_datetime + d int as ((a,a) in ((1,1),(2,1),(NULL,1))), # cmp_item_datetime + # other issues + e int as ((a,1) in ((1,1),(2,1),(NULL,1))) # cmp_item_row::alloc_comparators() +); +show create table t1; +connect con1, localhost, root; +insert t1 (a) values ('2010-10-10 10:10:10'); +select * from t1; +disconnect con1; +connection default; +select * from t1; +drop table t1; + +connect con1, localhost, root; +create table t1 (a datetime, + b datetime as (least(a,1)) # Item_func_min_max::get_date +); +insert t1 (a) values ('2010-10-10 10:10:10'); +select * from t1; +disconnect con1; +connection default; +select * from t1; +drop table t1; diff --git a/mysql-test/suite/wsrep/r/binlog_format.result b/mysql-test/suite/wsrep/r/binlog_format.result index 1ca90bd626d..83af2b67762 100644 --- a/mysql-test/suite/wsrep/r/binlog_format.result +++ b/mysql-test/suite/wsrep/r/binlog_format.result @@ -1,4 +1,4 @@ -call mtr.add_suppression("WSREP: MariaDB Galera does not support binlog format.*"); +call mtr.add_suppression("WSREP: MariaDB Galera and flashback do not support binlog format.*"); call mtr.add_suppression("WSREP: Cannot get fake transaction ID from storage engine."); # # MDEV-4227: Galera server should stop crashing on setting binlog_format STATEMENT @@ -8,20 +8,20 @@ Variable_name Value binlog_format ROW SET binlog_format=STATEMENT; Warnings: -Warning 1105 MariaDB Galera does not support binlog format: STATEMENT +Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT SHOW WARNINGS; Level Code Message -Warning 1105 MariaDB Galera does not support binlog format: STATEMENT +Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT SHOW VARIABLES LIKE 'binlog_format'; Variable_name Value binlog_format STATEMENT CREATE TABLE IF NOT EXISTS test.t1 AS SELECT * FROM information_schema.routines WHERE 1 = 0; SET binlog_format=MIXED; Warnings: -Warning 1105 MariaDB Galera does not support binlog format: MIXED +Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED SHOW WARNINGS; Level Code Message -Warning 1105 MariaDB Galera does not support binlog format: MIXED +Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED SHOW VARIABLES LIKE 'binlog_format'; Variable_name Value binlog_format MIXED diff --git a/mysql-test/suite/wsrep/t/binlog_format.test b/mysql-test/suite/wsrep/t/binlog_format.test index 85864256862..02602b9cb2b 100644 --- a/mysql-test/suite/wsrep/t/binlog_format.test +++ b/mysql-test/suite/wsrep/t/binlog_format.test @@ -1,7 +1,7 @@ --source include/have_wsrep_provider.inc --source include/have_binlog_format_row.inc -call mtr.add_suppression("WSREP: MariaDB Galera does not support binlog format.*"); +call mtr.add_suppression("WSREP: MariaDB Galera and flashback do not support binlog format.*"); call mtr.add_suppression("WSREP: Cannot get fake transaction ID from storage engine."); --echo # diff --git a/mysql-test/t/adddate_454.test b/mysql-test/t/adddate_454.test index 1d69cdc9558..bbdd89b583d 100644 --- a/mysql-test/t/adddate_454.test +++ b/mysql-test/t/adddate_454.test @@ -4,6 +4,6 @@ create table t1 (d date); insert into t1 values ('2012-00-00'); select * from t1; -update t1 set d = adddate(d, interval 1 day); +update ignore t1 set d = adddate(d, interval 1 day); select * from t1; drop table t1; diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index b48841d9407..bf16757efd6 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -268,7 +268,7 @@ drop table if exists t1, t2; # not null columns for primary keys) create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM; -insert into t1 (a) values(1); +insert ignore into t1 (a) values(1); --replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X show table status like 't1'; alter table t1 modify a int; @@ -276,7 +276,7 @@ alter table t1 modify a int; show table status like 't1'; drop table t1; create table t1 (a int not null, b int not null, c int not null, d int not null, e int not null, f int not null, g int not null, h int not null,i int not null, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM; -insert into t1 (a) values(1); +insert ignore into t1 (a) values(1); --replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X show table status like 't1'; drop table t1; @@ -1735,6 +1735,25 @@ SHOW CREATE TABLE `tab1`; ALTER TABLE `tab1` CHANGE COLUMN v_col `v_col` varchar(128) AS (IF(field11='option1',CONCAT_WS(":","field1",field2,field3,field4,field5,field6,field7,field8,field9,field10), CONCAT_WS(":","field1",field11,field2,field3,field4,field5,field6,field7,field8,field9,field10))) PERSISTENT; SHOW CREATE TABLE `tab1`; DROP TABLE `tab1`; + +--echo # +--echo # MDEV-11548 Reproducible server crash after the 2nd ALTER TABLE ADD FOREIGN KEY IF NOT EXISTS +--echo # + +CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY); +CREATE TABLE t2 (id1 INT UNSIGNED NOT NULL); + +ALTER TABLE t2 +ADD FOREIGN KEY IF NOT EXISTS (id1) + REFERENCES t1 (id); + +ALTER TABLE t2 +ADD FOREIGN KEY IF NOT EXISTS (id1) +REFERENCES t1 (id); + +DROP TABLE t2; +DROP TABLE t1; + --echo # --echo # Start of 10.1 tests --echo # diff --git a/mysql-test/t/analyze_format_json.test b/mysql-test/t/analyze_format_json.test index 807e02d2334..88a907718d9 100644 --- a/mysql-test/t/analyze_format_json.test +++ b/mysql-test/t/analyze_format_json.test @@ -9,34 +9,34 @@ create table t0 (a int); INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); --echo # r_filtered=30%, because 3 rows match: 0,1,2 ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t0 where a<3; create table t1 (a int, b int, c int, key(a)); insert into t1 select A.a*10 + B.a, A.a*10 + B.a, A.a*10 + B.a from t0 A, t0 B; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze select * from t0, t1 where t1.a=t0.a and t0.a > 9; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t0, t1 where t1.a=t0.a and t0.a > 9; analyze select * from t0, t1 where t1.a=t0.a and t1.b<4; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t0, t1 where t1.a=t0.a and t1.b<4; analyze select * from t1 tbl1, t1 tbl2 where tbl1.b<2 and tbl2.b>5; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t1 tbl1, t1 tbl2 where tbl1.b<20 and tbl2.b<60; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t1 tbl1, t1 tbl2 where tbl1.b<20 and tbl2.b<60 and tbl1.c > tbl2.c; @@ -53,7 +53,7 @@ insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t2 (a int, key(a)); insert into t2 values (0),(1); ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t1 straight_join t2 force index(a) where t2.a=t1.a; drop table t1,t2; @@ -69,7 +69,7 @@ select database(); connect (con1,localhost,root,,*NO-ONE*); connection con1; select database(); ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from test.t1 where t1.a<5; disconnect con1; connection default; @@ -91,15 +91,15 @@ create table t1 (pk int primary key); insert into t1 select a from t3; alter table t1 add b int; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json update t1 set b=pk; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t1 where pk < 10 and b > 4; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json delete from t1 where pk < 10 and b > 4; @@ -127,7 +127,7 @@ create table t2 (key1 int, key2 int, key3 int, key4 int, col1 int, insert into t2 select a,a,a,a,a from t3; insert into t2 select 15,15,15,15,15 from t4; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t1, t2 where (t2.key1 between t1.lb1 and t1.rb1) and (t2.key2 between t1.lb2 and t1.rb2) and @@ -144,7 +144,7 @@ INSERT INTO t0 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t1 (a int); INSERT INTO t1 select * from t0; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json (select * from t1 tbl1 where a<5) union (select * from t1 tbl2 where a in (2,3)); drop table t0, t1; @@ -164,16 +164,16 @@ create table t2 ( ); insert into t2 select A.a*1000 + B.a, A.a*1000 + B.a from t0 A, t1 B; --echo # normal HAVING ---replace_regex /"(r_total_time_ms|r_buffer_size)": .*?,/"volatile parameter": "REPLACED",/ +--source include/analyze-format.inc analyze format=json select a, max(b) as TOP from t2 group by a having TOP > a; --echo # HAVING is always TRUE (not printed) ---replace_regex /"(r_total_time_ms|r_buffer_size)": .*?,/"volatile parameter": "REPLACED",/ +--source include/analyze-format.inc analyze format=json select a, max(b) as TOP from t2 group by a having 1<>2; --echo # HAVING is always FALSE (intercepted by message) ---replace_regex /"(r_total_time_ms|r_buffer_size)": .*?,/"volatile parameter": "REPLACED",/ +--source include/analyze-format.inc analyze format=json select a, max(b) as TOP from t2 group by a having 1=2; --echo # HAVING is absent ---replace_regex /"(r_total_time_ms|r_buffer_size)": .*?,/"volatile parameter": "REPLACED",/ +--source include/analyze-format.inc analyze format=json select a, max(b) as TOP from t2 group by a; drop table t0, t1, t2; @@ -186,7 +186,7 @@ INSERT INTO t1 VALUES (1),(2); CREATE TABLE t2 (b INT); INSERT INTO t2 VALUES (3),(4); ---replace_regex /"(r_total_time_ms|r_buffer_size)": .*?,/"volatile parameter": "REPLACED",/ +--source include/analyze-format.inc ANALYZE FORMAT=JSON SELECT STRAIGHT_JOIN * FROM t1, t2 WHERE b IN ( SELECT a FROM t1 ); drop table t1,t2; @@ -203,7 +203,7 @@ INSERT INTO t2 VALUES (2),(3); CREATE TABLE t3 (f3 INT) ENGINE=MyISAM; INSERT INTO t3 VALUES (3),(4); ---replace_regex /"(r_total_time_ms|r_buffer_size)": .*?,/"volatile parameter": "REPLACED",/ +--source include/analyze-format.inc ANALYZE FORMAT=JSON SELECT GROUP_CONCAT(f3) AS gc, ( SELECT MAX(f1) FROM t1, t2 WHERE f2 = f3 ) sq FROM t2, t3 diff --git a/mysql-test/t/analyze_stmt_orderby.test b/mysql-test/t/analyze_stmt_orderby.test index a40f34805d1..a1cfb58f31a 100644 --- a/mysql-test/t/analyze_stmt_orderby.test +++ b/mysql-test/t/analyze_stmt_orderby.test @@ -22,7 +22,7 @@ explain update t2 set b=b+1 order by b limit 5; explain format=json update t2 set b=b+1 order by b limit 5; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json update t2 set b=b+1 order by b limit 5; @@ -33,7 +33,7 @@ explain update t2 set a=a+1 where a<10; explain format=json update t2 set a=a+1 where a<10; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json update t2 set a=a+1 where a<10; @@ -44,7 +44,7 @@ explain delete from t2 order by b limit 5; explain format=json delete from t2 order by b limit 5; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ /"r_buffer_size": "[^"]+"/"r_buffer_size": "REPLACED"/ +--source include/analyze-format.inc analyze format=json delete from t2 order by b limit 5; @@ -55,7 +55,7 @@ explain select * from t0,t2 where t2.a=t0.a order by t2.b limit 4; explain format=json select * from t0,t2 where t2.a=t0.a order by t2.b limit 4; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t0,t2 where t2.a=t0.a order by t2.b limit 4; @@ -67,7 +67,7 @@ explain select * from t0,t2 where t2.a=t0.a order by t0.a limit 4; explain format=json select * from t0,t2 where t2.a=t0.a order by t0.a limit 4; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ /"r_buffer_size": "[^"]+"/"r_buffer_size": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t0,t2 where t2.a=t0.a order by t0.a limit 4; @@ -86,7 +86,7 @@ select c.a from t0 a, t0 b, t0 c; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ /"r_buffer_size": "[^"]+"/"r_buffer_size": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select MAX(b) from t2 where mod(a,2)=0 group by c; @@ -115,7 +115,7 @@ drop table t3; create table t3 (a int, b int); insert into t3 select a, 123 from t0; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ /"r_buffer_size": "[^"]+"/"r_buffer_size": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select distinct max(t3.b) Q from t0, t3 where t0.a=t3.a group by t0.a order by null; @@ -136,7 +136,7 @@ insert into t6 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1); insert into t7 values (3, 3), (2, 2), (1, 1); --echo # TODO: This ANALYZE output doesn't make it clear what is used for what. ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ /"r_buffer_size": "[^"]+"/"r_buffer_size": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select count(distinct t5.b) as sum from t5, t6 where t5.a=t6.a and t6.b > 0 and t5.a <= 5 @@ -168,7 +168,7 @@ explain select col1 f1, col2 f2, col1 f3 from t2 group by f1; analyze select col1 f1, col2 f2, col1 f3 from t2 group by f1; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ /"r_buffer_size": "[^"]+"/"r_buffer_size": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select col1 f1, col2 f2, col1 f3 from t2 group by f1; drop table t2; diff --git a/mysql-test/t/auto_increment_ranges.inc b/mysql-test/t/auto_increment_ranges.inc index 1540be0828e..dc60f07a700 100644 --- a/mysql-test/t/auto_increment_ranges.inc +++ b/mysql-test/t/auto_increment_ranges.inc @@ -29,7 +29,7 @@ truncate table t1; --error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max-1),(NULL),(NULL); truncate table t1; -eval insert into t1 values($range_max+1); +eval insert ignore into t1 values($range_max+1); select * from t1; --error HA_ERR_AUTOINC_ERANGE eval insert into t1 values(NULL); @@ -60,7 +60,7 @@ truncate table t1; --error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max-1),(NULL),(NULL); truncate table t1; -eval insert into t1 values($range_max+1); +eval insert ignore into t1 values($range_max+1); select * from t1; --error HA_ERR_AUTOINC_ERANGE eval insert into t1 values(NULL); @@ -91,7 +91,7 @@ truncate table t1; --error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max-1),(NULL),(NULL); truncate table t1; -eval insert into t1 values($range_max+1); +eval insert ignore into t1 values($range_max+1); select * from t1; --error HA_ERR_AUTOINC_ERANGE eval insert into t1 values(NULL); @@ -122,7 +122,7 @@ truncate table t1; --error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max-1),(NULL),(NULL); truncate table t1; -eval insert into t1 values($range_max+1); +eval insert ignore into t1 values($range_max+1); select * from t1; --error HA_ERR_AUTOINC_ERANGE eval insert into t1 values(NULL); @@ -153,7 +153,7 @@ truncate table t1; --error HA_ERR_AUTOINC_ERANGE eval insert into t1 values($range_max-1),(NULL),(NULL); truncate table t1; -eval insert into t1 values($range_max+1); +eval insert ignore into t1 values($range_max+1); select * from t1; --error HA_ERR_AUTOINC_ERANGE eval insert into t1 values(NULL); @@ -222,7 +222,7 @@ DROP TABLE t1; --echo # CREATE TABLE t1 (a smallint AUTO_INCREMENT, PRIMARY KEY (a)); INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (32768); +INSERT IGNORE INTO t1 VALUES (32768); --error HA_ERR_AUTOINC_ERANGE INSERT INTO t1 VALUES (NULL); SELECT * FROM t1; diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test index fb18d60edd9..ae325c7d7de 100644 --- a/mysql-test/t/bigint.test +++ b/mysql-test/t/bigint.test @@ -38,6 +38,7 @@ insert into t1 (big) values (-1),(12345678901234567),(9223372036854775807),(1844 select * from t1; select min(big),max(big),max(big)-1 from t1; select min(big),max(big),max(big)-1 from t1 group by a; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify big bigint unsigned not null; select min(big),max(big),max(big)-1 from t1; select min(big),max(big),max(big)-1 from t1 group by a; @@ -48,6 +49,7 @@ select min(big),max(big),max(big)-1 from t1 group by a; alter table t1 add key (big); select min(big),max(big),max(big)-1 from t1; select min(big),max(big),max(big)-1 from t1 group by a; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify big bigint not null; select * from t1; select min(big),max(big),max(big)-1 from t1; @@ -153,7 +155,7 @@ select * from t1; drop table t1; create table t1 ( quantity decimal(2) unsigned); -insert into t1 values (500), (-500), (~0), (-1); +insert ignore into t1 values (500), (-500), (~0), (-1); select * from t1; drop table t1; diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test index a7e0ff17494..f9823192c18 100644 --- a/mysql-test/t/bootstrap.test +++ b/mysql-test/t/bootstrap.test @@ -36,7 +36,7 @@ remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql; # Bootstrap with a query larger than 2*thd->net.max_packet # set @my_max_allowed_packet= @@max_allowed_packet; -set global max_allowed_packet=100*@@max_allowed_packet; +set global max_allowed_packet=64*@@max_allowed_packet; --disable_query_log create table t1 select 2 as a, concat(repeat('MySQL', @@max_allowed_packet/10), ';') as b; eval select * into outfile '$MYSQLTEST_VARDIR/tmp/long_query.sql' from t1; diff --git a/mysql-test/t/bug39022.test b/mysql-test/t/bug39022.test index 8d1deb163d7..d293788e58e 100644 --- a/mysql-test/t/bug39022.test +++ b/mysql-test/t/bug39022.test @@ -6,6 +6,8 @@ --echo # Bug #39022: Mysql randomly crashing in lock_sec_rec_cons_read_sees --echo # +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); + CREATE TABLE t1(a TINYINT NOT NULL,b TINYINT,PRIMARY KEY(b)) ENGINE=innodb; CREATE TABLE t2(d TINYINT NOT NULL,UNIQUE KEY(d)) ENGINE=innodb; INSERT INTO t1 VALUES (13,0),(8,1),(9,2),(6,3), diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index 58f91571ebb..d62612f819e 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -174,6 +174,7 @@ select hex(cast(_latin1'a' AS char(2))) as c5; select cast(1000 as CHAR(3)); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 select cast(_latin1'ab' AS char) as c1, cast(_latin1'a ' AS char) as c2, @@ -194,6 +195,7 @@ select cast(_koi8r'Æ ' AS nchar(2)) as c4, cast(_koi8r'Æ' AS nchar(2)) as c5; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 select cast(_koi8r'ÆÇ' AS nchar) as c1, cast(_koi8r'Æ ' AS nchar) as c2, @@ -421,6 +423,7 @@ DROP TABLE t1; --echo # Bug#14096619 UNABLE TO RESTORE DATABASE DUMP --echo # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT CONCAT(CAST(REPEAT('9', 1000) AS SIGNED)), CONCAT(CAST(REPEAT('9', 1000) AS UNSIGNED)); SHOW CREATE TABLE t1; @@ -472,3 +475,42 @@ select collation(cast("a" as char(10) ascii binary)); select collation(cast("a" as char(10) binary charset utf8)); select collation(cast("a" as char(10) binary ascii)); +--echo # +--echo # MDEV-11030 Assertion `precision > 0' failed in decimal_bin_size +--echo # + +SELECT * FROM (SELECT IFNULL(CONVERT(NULL, UNSIGNED), NULL)) sq; + +CREATE TABLE t1 AS SELECT IFNULL(CONVERT(NULL, UNSIGNED), NULL); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT COALESCE(CONVERT(NULL, UNSIGNED), NULL); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT CASE WHEN TRUE THEN CONVERT(NULL, UNSIGNED) ELSE NULL END; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT IFNULL(CONVERT(NULL,SIGNED),CONVERT(NULL,UNSIGNED)) AS a; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT + -1, + CONVERT(NULL,SIGNED), + CONCAT(CONVERT(NULL,SIGNED)), + 1, + CONVERT(NULL,UNSIGNED), + CONCAT(CONVERT(NULL,UNSIGNED)); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT + CONVERT('',SIGNED), + CONCAT(CONVERT('',SIGNED)), + CONVERT('',UNSIGNED), + CONCAT(CONVERT('',UNSIGNED)); +SHOW CREATE TABLE t1; +DROP TABLE t1; diff --git a/mysql-test/t/comment_column.test b/mysql-test/t/comment_column.test index de1c9b8ce47..a4f3893dd4a 100644 --- a/mysql-test/t/comment_column.test +++ b/mysql-test/t/comment_column.test @@ -62,6 +62,7 @@ SHOW CREATE TABLE t1; # comment overflow(warning) +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 ADD COLUMN c11 INTEGER COMMENT 'ABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'; SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1'; SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1'; diff --git a/mysql-test/t/comment_index.test b/mysql-test/t/comment_index.test index 7857d54080e..4ba1f336ddb 100644 --- a/mysql-test/t/comment_index.test +++ b/mysql-test/t/comment_index.test @@ -57,6 +57,7 @@ SHOW CREATE TABLE t1; # comment overflow(warning) +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE INDEX i11 ON t1(c11) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'; SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1'; SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1'; @@ -65,6 +66,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher --replace_result $ENGINE ENGINE SHOW CREATE TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 ADD INDEX (c13) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'; SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1'; SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1'; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 0be9537350b..6461204f06e 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -71,6 +71,7 @@ create table t1 (a varchar(5) default 'abcde'); insert into t1 values(); select * from t1; --error 1067 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 alter column a set default 'abcdef'; drop table t1; @@ -431,7 +432,9 @@ drop table t1, t2; # create table t1(cenum enum('a'), cset set('b')); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t2(cenum enum('a','a'), cset set('b','b')); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t3(cenum enum('a','A','a','c','c'), cset set('b','B','b','d','d')); drop table t1, t2, t3; @@ -613,6 +616,7 @@ show create table t1; drop table t1; #--warning 1364 +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 ( a varchar(12) charset utf8 collate utf8_bin not null, b int not null, primary key (a) @@ -1731,6 +1735,7 @@ drop table t1; # MDEV-7050: MySQL#74603 - Assertion `comma_length > 0' failed in mysql_prepare_create_table # set @@session.collation_server=filename; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1(a enum('','')); drop table t1; set @@session.collation_server=default; @@ -1754,6 +1759,15 @@ DELIMITER ;| create table t1 as select f1(); drop function f1; +--echo # +--echo # MDEV-10274 Bundling insert with create statement +--echo # for table with unsigned Decimal primary key issues warning 1194 +--echo # + +create table t1(ID decimal(2,1) unsigned NOT NULL, PRIMARY KEY (ID))engine=memory + select 2.1 ID; +drop table t1; + --echo End of 5.5 tests # diff --git a/mysql-test/t/cte_nonrecursive.test b/mysql-test/t/cte_nonrecursive.test index 8dbde472c16..700111d5507 100644 --- a/mysql-test/t/cte_nonrecursive.test +++ b/mysql-test/t/cte_nonrecursive.test @@ -609,3 +609,36 @@ where and T2.name <> T1.name); drop table employees; + +--echo # +--echo # MDEV-11818: EXPLAIN EXTENDED for a query with optimized away CTE table +--echo # + +CREATE TABLE t1 (i INT, c VARCHAR(3)); +INSERT INTO t1 VALUES (1,'foo'); + +EXPLAIN EXTENDED +WITH cte AS ( SELECT * FROM t1 ) SELECT i FROM cte; + +DROP TABLE t1; + +--echo # +--echo # MDEV-12185: view defintion contains WITH clause with +--echo # several specifications of CTE +--echo # + +with + alias1 as (select 1 as one), + alias2 as (select 2 as two) +select one, two from alias1, alias2; + +create view v1 as +with + alias1 as (select 1 as one), + alias2 as (select 2 as two) +select one, two from alias1, alias2; + +select * from v1; +show create view v1; + +drop view v1; diff --git a/mysql-test/t/cte_recursive.test b/mysql-test/t/cte_recursive.test index 63bcfbffeb9..e8954bfdaeb 100644 --- a/mysql-test/t/cte_recursive.test +++ b/mysql-test/t/cte_recursive.test @@ -787,7 +787,7 @@ as select * from ancestors; ---ERROR ER_NOT_STANDARDS_COMPLIANT_RECURSIVE +--ERROR ER_NOT_STANDARD_COMPLIANT_RECURSIVE with recursive ancestor_ids (id, generation) as @@ -805,7 +805,7 @@ as select generation, name from ancestor_ids a, folks where a.id = folks.id; -set standards_compliant_cte=0; +set standard_compliant_cte=0; --ERROR ER_WITH_COL_WRONG_LIST with recursive @@ -844,9 +844,9 @@ as select generation, name from ancestor_ids a, folks where a.id = folks.id; -set standards_compliant_cte=1; +set standard_compliant_cte=1; ---ERROR ER_NOT_STANDARDS_COMPLIANT_RECURSIVE +--ERROR ER_NOT_STANDARD_COMPLIANT_RECURSIVE with recursive coupled_ancestor_ids (id) as @@ -870,7 +870,7 @@ as select p.* from coupled_ancestor_ids a, folks p where a.id = p.id; -set statement standards_compliant_cte=0 for +set statement standard_compliant_cte=0 for with recursive coupled_ancestor_ids (id) as @@ -894,7 +894,7 @@ as select p.* from coupled_ancestor_ids a, folks p where a.id = p.id; ---ERROR ER_NOT_STANDARDS_COMPLIANT_RECURSIVE +--ERROR ER_NOT_STANDARD_COMPLIANT_RECURSIVE with recursive ancestor_ids (id) as @@ -915,7 +915,7 @@ as ) select * from ancestors; -set statement standards_compliant_cte=0 for +set statement standard_compliant_cte=0 for with recursive ancestor_ids (id) as @@ -958,7 +958,7 @@ as ) select * from ancestors; ---ERROR ER_NOT_STANDARDS_COMPLIANT_RECURSIVE +--ERROR ER_NOT_STANDARD_COMPLIANT_RECURSIVE with recursive ancestor_ids (id, generation) as @@ -983,7 +983,7 @@ as ) select * from ancestors; -set statement standards_compliant_cte=0 for +set statement standard_compliant_cte=0 for with recursive ancestor_ids (id, generation) as @@ -1484,3 +1484,36 @@ ORDER BY a, dist, b; DROP VIEW edges2; DROP TABLE edges; + + +--echo # +--echo # MDEV-11674: recursive CTE table that cannot be stored +--echo # in a heap table +--echo # + +create table t1 (id int, test_data varchar(36)); + +insert into t1(id, test_data) +select id, test_data + from ( + with recursive data_generator(id, test_data) as ( + select 1 as id, uuid() as test_data + union all + select id + 1, uuid() from data_generator where id < 150000 + ) + select * from data_generator + ) as a; + +drop table t1; + +--echo # +--echo # MDEV-10773: ANALYZE for query with recursive CTE +--echo # + +--source include/analyze-format.inc +analyze format=json +with recursive src(counter) as +(select 1 + union + select counter+1 from src where counter<10 +) select * from src; diff --git a/mysql-test/t/ctype_big5.test b/mysql-test/t/ctype_big5.test index fe29f769a89..410203c7c86 100644 --- a/mysql-test/t/ctype_big5.test +++ b/mysql-test/t/ctype_big5.test @@ -122,7 +122,7 @@ ORDER BY head, tail; DROP TEMPORARY TABLE head, tail; SHOW CREATE TABLE t1; SELECT COUNT(*) FROM t1; -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; SELECT COUNT(*) FROM t1 WHERE a<>'?'; # # Display all characters that have upper or lower case mapping. diff --git a/mysql-test/t/ctype_cp932_binlog_stm.test b/mysql-test/t/ctype_cp932_binlog_stm.test index 1b92006c949..78e5725218a 100644 --- a/mysql-test/t/ctype_cp932_binlog_stm.test +++ b/mysql-test/t/ctype_cp932_binlog_stm.test @@ -91,13 +91,13 @@ ORDER BY head, tail; # Populate t1 with Half Width Kana [A1..DF] # --disable_warnings -INSERT t1 (code) SELECT head FROM head +INSERT IGNORE t1 (code) SELECT head FROM head WHERE (head BETWEEN 'A1' AND 'DF') ORDER BY head; --enable_warnings DROP TEMPORARY TABLE head, tail; SHOW CREATE TABLE t1; -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1 WHERE a<>'?' AND OCTET_LENGTH(a)=1; SELECT COUNT(*) FROM t1 WHERE a<>'' AND OCTET_LENGTH(a)=2; diff --git a/mysql-test/t/ctype_eucjpms.test b/mysql-test/t/ctype_eucjpms.test index bda4cec61cc..c69abc32a03 100644 --- a/mysql-test/t/ctype_eucjpms.test +++ b/mysql-test/t/ctype_eucjpms.test @@ -421,13 +421,13 @@ CREATE TABLE t1 AS SELECT 'XXXXXX' AS code, ' ' AS a LIMIT 0; # Pupulate JIS-X-0201 range (Half Width Kana) # Expected valid code range: [8E][A1..DF] (1x63 characters) # -INSERT INTO t1 (code) SELECT concat('8E', head) FROM head +INSERT IGNORE INTO t1 (code) SELECT concat('8E', head) FROM head WHERE (head BETWEEN 'A1' AND 'DF') ORDER BY head; # # Populate JIS-X-0208 range # Expected valid codes: [A1..FE][A1..FE] (94x94=8836 characters) # -INSERT INTO t1 (code) SELECT concat(head, tail) +INSERT IGNORE INTO t1 (code) SELECT concat(head, tail) FROM head, tail WHERE (head BETWEEN '80' AND 'FF') AND (head NOT BETWEEN '8E' AND '8F') AND (tail BETWEEN '20' AND 'FF') @@ -436,14 +436,14 @@ ORDER BY head, tail; # Populate JIS-X-0212 range # Expected valid codes [8F][A1..FE][A1..FE] (1x94x94=8836 characters) # -INSERT INTO t1 (code) SELECT concat('8F', head, tail) +INSERT IGNORE INTO t1 (code) SELECT concat('8F', head, tail) FROM head, tail WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '20' AND 'FF') ORDER BY head, tail; DROP TEMPORARY TABLE head, tail; SHOW CREATE TABLE t1; -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1 WHERE a<>''; SELECT COUNT(*) FROM t1 WHERE a<>'' AND a<>'?'; @@ -531,7 +531,7 @@ set collation_connection=eucjpms_bin; --echo # MDEV-6776 ujis and eucjmps erroneously accept 0x8EA0 as a valid byte sequence --echo # CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET eucjpms); -INSERT INTO t1 VALUES (0x8EA0); +INSERT IGNORE INTO t1 VALUES (0x8EA0); SELECT HEX(a), CHAR_LENGTH(a) FROM t1; DROP TABLE t1; --error ER_INVALID_CHARACTER_STRING @@ -575,7 +575,7 @@ DROP TABLE t1; --echo # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis --echo # CREATE TABLE t1 (a TEXT CHARACTER SET eucjpms); -LOAD DATA INFILE '../../std_data/loaddata/mdev9823.ujis.txt' INTO TABLE t1 CHARACTER SET eucjpms IGNORE 4 LINES; +LOAD DATA INFILE '../../std_data/loaddata/mdev9823.ujis.txt' IGNORE INTO TABLE t1 CHARACTER SET eucjpms IGNORE 4 LINES; SELECT HEX(a) FROM t1; DROP TABLE t1; diff --git a/mysql-test/t/ctype_euckr.test b/mysql-test/t/ctype_euckr.test index b0b1569e540..950c60c47e5 100644 --- a/mysql-test/t/ctype_euckr.test +++ b/mysql-test/t/ctype_euckr.test @@ -46,12 +46,12 @@ insert into t1 values (0xA17A); insert into t1 values (0xA181); insert into t1 values (0xA1FE); # Insert some invalid characters -insert into t1 values (0xA140); -insert into t1 values (0xA15B); -insert into t1 values (0xA160); -insert into t1 values (0xA17B); -insert into t1 values (0xA180); -insert into t1 values (0xA1FF); +insert ignore into t1 values (0xA140); +insert ignore into t1 values (0xA15B); +insert ignore into t1 values (0xA160); +insert ignore into t1 values (0xA17B); +insert ignore into t1 values (0xA180); +insert ignore into t1 values (0xA1FF); select hex(s1), hex(convert(s1 using utf8)) from t1 order by binary s1; drop table t1; @@ -99,7 +99,7 @@ SELECT s as bad_code FROM t2 WHERE a='?' ORDER BY s; DELETE FROM t2 WHERE a='?'; ALTER TABLE t2 ADD u VARCHAR(1) CHARACTER SET utf8, ADD a2 VARCHAR(1) CHARACTER SET euckr; --disable_warnings -UPDATE t2 SET u=a, a2=u; +UPDATE IGNORE t2 SET u=a, a2=u; --enable_warnings SELECT s as unassigned_code FROM t2 WHERE u='?'; DELETE FROM t2 WHERE u='?'; @@ -144,7 +144,7 @@ WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '20' AND 'FF') ORDER BY head, tail; DROP TEMPORARY TABLE head, tail; SHOW CREATE TABLE t1; -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; SELECT COUNT(*) FROM t1 WHERE a<>'?'; # # Display all characters that have upper or lower case mapping. diff --git a/mysql-test/t/ctype_gb2312.test b/mysql-test/t/ctype_gb2312.test index 8f15f72fad5..4489168a163 100644 --- a/mysql-test/t/ctype_gb2312.test +++ b/mysql-test/t/ctype_gb2312.test @@ -68,7 +68,7 @@ WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '20' AND 'FF') ORDER BY head, tail; DROP TEMPORARY TABLE head, tail; SHOW CREATE TABLE t1; -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; SELECT COUNT(*) FROM t1 WHERE a<>'?'; # # Display all characters that have upper or lower case mapping. diff --git a/mysql-test/t/ctype_gbk.test b/mysql-test/t/ctype_gbk.test index 88bfda46748..aa2d15b9b71 100644 --- a/mysql-test/t/ctype_gbk.test +++ b/mysql-test/t/ctype_gbk.test @@ -103,7 +103,7 @@ WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '20' AND 'FF') ORDER BY head, tail; DROP TEMPORARY TABLE head, tail; SHOW CREATE TABLE t1; -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; SELECT COUNT(*) FROM t1 WHERE a<>'?'; # # Display all characters that have upper or lower case mapping. @@ -256,7 +256,7 @@ DELETE FROM t3; --echo # Sequences that start with a tail or a bad byte, --echo # or end with a bad byte, all should be fixed. --echo # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 WHERE type1='tail' OR type1='bad' OR type2='bad' ORDER BY b; SELECT COUNT(*) FROM t3; @@ -269,7 +269,7 @@ DELETE FROM t3; --echo # Sequences that start with an ASCII or an MB2 character, --echo # followed by a non-ASCII tail, all should be fixed. --echo # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 WHERE (FIND_IN_SET('mb2',type1) OR FIND_IN_SET('ascii',type1)) AND (FIND_IN_SET('tail',type2) AND NOT FIND_IN_SET('ascii',type2)) ORDER BY b; @@ -325,7 +325,7 @@ DELETE FROM t3; --echo # Sequences that start with a tail or a bad byte, --echo # or have a bad byte, all should be fixed. --echo # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 WHERE type1='tail' OR type1='bad' OR type2='bad' OR type3='bad' ORDER BY b; SELECT COUNT(*) FROM t3; @@ -338,7 +338,7 @@ DELETE FROM t3; --echo # Sequences that start with an ASCII or an MB2 character, --echo # followed by a pure non-ASCII tail, all should be fixed. --echo # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 WHERE (FIND_IN_SET('mb2',type1) OR FIND_IN_SET('ascii',type1)) AND type2='tail' ORDER BY b; @@ -352,7 +352,7 @@ DELETE FROM t3; --echo # Sequences that consist of two ASCII or MB2 characters, --echo # followed by a pure non-ASCII tail, all should be fixed. --echo # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 WHERE (FIND_IN_SET('mb2',type1) OR FIND_IN_SET('ascii',type1)) AND (FIND_IN_SET('mb2',type2) OR FIND_IN_SET('ascii',type2)) AND type3='tail' @@ -368,7 +368,7 @@ DELETE FROM t3; --echo # Sequences that consist of two MB2 characters, --echo # followed by a non-ASCII head or tail, all should be fixed. --echo # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 WHERE FIND_IN_SET('mb2',type1) AND FIND_IN_SET('mb2',type2) AND NOT FIND_IN_SET('ascii',type3) AND NOT FIND_IN_SET('mb2',type3) @@ -412,7 +412,7 @@ DELETE FROM t3; #--echo # #--echo # Other sequences #--echo # -INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 ORDER BY b; +INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 ORDER BY b; SELECT COUNT(*) FROM t3; SELECT HEX(c),comment FROM t3 WHERE b=c ORDER BY b; SELECT HEX(c),HEX(b),comment FROM t3 WHERE b<>c ORDER BY b; @@ -428,8 +428,10 @@ DROP TABLE t1; --echo # --echo # MDEV-7661 Unexpected result for: CAST(0xHHHH AS CHAR CHARACTER SET xxx) for incorrect byte sequences --echo # +set sql_mode=''; SELECT HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312)); SELECT HEX(CONVERT(CAST(0xA341 AS CHAR CHARACTER SET gb2312) USING utf8)); +set sql_mode=default; --echo # diff --git a/mysql-test/t/ctype_gbk_export_import.test b/mysql-test/t/ctype_gbk_export_import.test index 02d18fe60d4..f0d0b70fce6 100644 --- a/mysql-test/t/ctype_gbk_export_import.test +++ b/mysql-test/t/ctype_gbk_export_import.test @@ -100,7 +100,7 @@ CALL populate(); --vertical_results TRUNCATE TABLE t1; --eval SELECT display_file(LOAD_FILE('\$MYSQLTEST_VARDIR/tmp/t1')) AS file; ---exec LC_ALL=$LOCALE \$MYSQL $RESTORE_OPTIONS gbk -e "LOAD DATA INFILE '\$MYSQLTEST_VARDIR/tmp/t1' INTO TABLE t1 $RESTORE_CHARSET_CLAUSE" +--exec LC_ALL=$LOCALE \$MYSQL $RESTORE_OPTIONS gbk -e "LOAD DATA INFILE '\$MYSQLTEST_VARDIR/tmp/t1' IGNORE INTO TABLE t1 $RESTORE_CHARSET_CLAUSE" SELECT * FROM v1; --echo End of {$LOCALE}{$DUMP_OPTIONS $DUMP_CHARSET_CLAUSE}{$RESTORE_OPTIONS $RESTORE_CHARSET_CLAUSE} --echo @@ -139,7 +139,7 @@ CALL populate(); --vertical_results TRUNCATE TABLE t1; --eval SELECT display_file(LOAD_FILE('\$MYSQLTEST_VARDIR/tmp/tmpgbk/t1.txt')) AS file; ---exec LC_ALL=$LOCALE \$MYSQL $RESTORE_OPTIONS gbk -e "LOAD DATA INFILE '\$MYSQLTEST_VARDIR/tmp/tmpgbk/t1.txt' INTO TABLE t1 $RESTORE_CHARSET_CLAUSE" +--exec LC_ALL=$LOCALE \$MYSQL $RESTORE_OPTIONS gbk -e "LOAD DATA INFILE '\$MYSQLTEST_VARDIR/tmp/tmpgbk/t1.txt' IGNORE INTO TABLE t1 $RESTORE_CHARSET_CLAUSE" SELECT * FROM v1; --echo End of {$LOCALE}{$DUMP_OPTIONS}{$RESTORE_OPTIONS $RESTORE_CHARSET_CLAUSE} --echo diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test index 78d5f819f57..d40cc8b459b 100644 --- a/mysql-test/t/ctype_latin1.test +++ b/mysql-test/t/ctype_latin1.test @@ -237,7 +237,7 @@ SELECT HEX(CONVERT(' SELECT HEX(CONVERT('Âx' USING latin1)); SET NAMES utf8; CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1); -INSERT INTO t1 VALUES ('Â'),('Â#'); +INSERT IGNORE INTO t1 VALUES ('Â'),('Â#'); SHOW WARNINGS; SELECT HEX(a),a FROM t1; DROP TABLE t1; diff --git a/mysql-test/t/ctype_ldml.test b/mysql-test/t/ctype_ldml.test index 1d58daa89e4..a6cba4b9780 100644 --- a/mysql-test/t/ctype_ldml.test +++ b/mysql-test/t/ctype_ldml.test @@ -120,7 +120,7 @@ DROP TABLE t1; # Crash happened with a user-defined utf8 collation, # on attempt to insert a string longer than the column can store. CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci); -INSERT INTO t1 SELECT REPEAT('a',11); +INSERT IGNORE INTO t1 SELECT REPEAT('a',11); DROP TABLE t1; # diff --git a/mysql-test/t/ctype_many.test b/mysql-test/t/ctype_many.test index a51ead67eb2..a619b16416c 100644 --- a/mysql-test/t/ctype_many.test +++ b/mysql-test/t/ctype_many.test @@ -175,6 +175,7 @@ SET CHARACTER SET utf8; ALTER TABLE t1 ADD ucs2_f CHAR(32) CHARACTER SET ucs2; --disable_warnings +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 CHANGE ucs2_f ucs2_f CHAR(32) UNICODE NOT NULL; --enable_warnings @@ -310,7 +311,7 @@ DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf32); CREATE TABLE t2 (a VARCHAR(10) CHARACTER SET ucs2); INSERT INTO t1 VALUES (0x10082), (0x12345); -INSERT INTO t2 SELECT * FROM t1; +INSERT IGNORE INTO t2 SELECT * FROM t1; SELECT HEX(a) FROM t2; DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/t/ctype_mb.test b/mysql-test/t/ctype_mb.test index 6e369e3fa0b..cd5ab503d55 100644 --- a/mysql-test/t/ctype_mb.test +++ b/mysql-test/t/ctype_mb.test @@ -10,7 +10,7 @@ SHOW CREATE TABLE t1; DELETE FROM t1; ALTER TABLE t1 ADD c3 CHAR(4) CHARACTER SET utf8; SHOW CREATE TABLE t1; -INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd'); +INSERT IGNORE INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd'); SELECT * FROM t1; DROP TABLE t1; diff --git a/mysql-test/t/ctype_recoding.test b/mysql-test/t/ctype_recoding.test index 81c04fc9c30..ba2e65b3626 100644 --- a/mysql-test/t/ctype_recoding.test +++ b/mysql-test/t/ctype_recoding.test @@ -129,7 +129,7 @@ CREATE TABLE `good set names latin1; create table t1 (a char(10) character set koi8r, b text character set koi8r); insert into t1 values ('test','test'); -insert into t1 values ('ÊÃÕË','ÊÃÕË'); +insert ignore into t1 values ('ÊÃÕË','ÊÃÕË'); drop table t1; # diff --git a/mysql-test/t/ctype_sjis.test b/mysql-test/t/ctype_sjis.test index a962f69003d..9a8ce414c14 100644 --- a/mysql-test/t/ctype_sjis.test +++ b/mysql-test/t/ctype_sjis.test @@ -140,10 +140,10 @@ ORDER BY head, tail; # # Populate Half Width Kana: [A1..DF] # -INSERT t1 (code) SELECT head FROM head WHERE (head BETWEEN 'A1' AND 'DF'); +INSERT IGNORE t1 (code) SELECT head FROM head WHERE (head BETWEEN 'A1' AND 'DF'); DROP TEMPORARY TABLE head, tail; SHOW CREATE TABLE t1; -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1 WHERE a<>'?' AND OCTET_LENGTH(a)=1; SELECT COUNT(*) FROM t1 WHERE a<>'' AND OCTET_LENGTH(a)=2; diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test index cad82222ac7..6745d64d11b 100644 --- a/mysql-test/t/ctype_ucs.test +++ b/mysql-test/t/ctype_ucs.test @@ -413,7 +413,7 @@ SELECT * FROM t1; DROP TABLE t1; CREATE TABLE t1 (Field1 int(10) unsigned default '0'); # this should generate a "Data truncated" warning -INSERT INTO t1 VALUES ('-1'); +INSERT IGNORE INTO t1 VALUES ('-1'); DROP TABLE t1; SET NAMES latin1; @@ -794,6 +794,7 @@ SET NAMES latin1; --echo # --echo # Bug #13832953 MY_STRNXFRM_UNICODE: ASSERTION `SRC' FAILED --echo # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (c1 SET('','') CHARACTER SET ucs2); INSERT INTO t1 VALUES (''); SELECT COALESCE(c1) FROM t1 ORDER BY 1; @@ -816,6 +817,14 @@ SELECT CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _ucs2 0x0061)); SELECT CHAR_LENGTH(TRIM(BOTH 0x61 FROM _ucs2 0x0061)); SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061)); +--echo # +--echo # MDEV-11685: sql_mode can't be set with non-ascii connection charset +--echo # +SET character_set_connection=ucs2; +SET sql_mode='NO_ENGINE_SUBSTITUTION'; +SELECT @@sql_mode; +SET sql_mode=DEFAULT; +SET NAMES utf8; --echo # --echo # End of 5.5 tests @@ -889,7 +898,7 @@ SET sql_mode='strict_all_tables'; INSERT INTO t1 VALUES (CONVERT('9e99999999' USING ucs2)); SET sql_mode=DEFAULT; -INSERT INTO t1 VALUES (CONVERT('aaa' USING ucs2)); +INSERT IGNORE INTO t1 VALUES (CONVERT('aaa' USING ucs2)); DROP TABLE t1; diff --git a/mysql-test/t/ctype_ucs2_def.test b/mysql-test/t/ctype_ucs2_def.test index be8e044f2e4..e297fa5ccf1 100644 --- a/mysql-test/t/ctype_ucs2_def.test +++ b/mysql-test/t/ctype_ucs2_def.test @@ -1,6 +1,6 @@ -- source include/have_ucs2.inc -call mtr.add_suppression("Cannot use ucs2 as character_set_client"); +call mtr.add_suppression("'ucs2' can not be used as client character set"); # # MySQL Bug#15276: MySQL ignores collation-server diff --git a/mysql-test/t/ctype_ucs2_query_cache.test b/mysql-test/t/ctype_ucs2_query_cache.test index acb39419751..ace826aec44 100644 --- a/mysql-test/t/ctype_ucs2_query_cache.test +++ b/mysql-test/t/ctype_ucs2_query_cache.test @@ -1,7 +1,7 @@ -- source include/have_query_cache.inc -- source include/have_ucs2.inc -call mtr.add_suppression("Cannot use ucs2 as character_set_client"); +call mtr.add_suppression("'ucs2' can not be used as client character set"); --echo # --echo # Start of 5.5 tests diff --git a/mysql-test/t/ctype_ujis.test b/mysql-test/t/ctype_ujis.test index 17aa3850219..ff9c61c05ba 100644 --- a/mysql-test/t/ctype_ujis.test +++ b/mysql-test/t/ctype_ujis.test @@ -1254,13 +1254,13 @@ CREATE TABLE t1 AS SELECT 'XXXXXX' AS code, ' ' AS a LIMIT 0; # Pupulate JIS-X-0201 range (Half Width Kana) # Valid characters: [8E][A1-DF] # -INSERT INTO t1 (code) SELECT concat('8E', head) FROM head +INSERT IGNORE INTO t1 (code) SELECT concat('8E', head) FROM head WHERE (head BETWEEN 'A1' AND 'DF') ORDER BY head; # # Populate JIS-X-0208 range # Expected valid range: [A1..FE][A1..FE] # -INSERT INTO t1 (code) SELECT concat(head, tail) +INSERT IGNORE INTO t1 (code) SELECT concat(head, tail) FROM head, tail WHERE (head BETWEEN '80' AND 'FF') AND (head NOT BETWEEN '8E' AND '8F') AND (tail BETWEEN '20' AND 'FF') @@ -1269,14 +1269,14 @@ ORDER BY head, tail; # Populate JIS-X-0212 range # Expected valid range: [8F][A1..FE][A1..FE] # -INSERT INTO t1 (code) SELECT concat('8F', head, tail) +INSERT IGNORE INTO t1 (code) SELECT concat('8F', head, tail) FROM head, tail WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '80' AND 'FF') ORDER BY head, tail; DROP TEMPORARY TABLE head, tail; SHOW CREATE TABLE t1; -UPDATE t1 SET a=unhex(code) ORDER BY code; +UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code; SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1 WHERE a<>'?'; SELECT COUNT(*) FROM t1 WHERE a<>'' AND OCTET_LENGTH(a)=2; @@ -1361,7 +1361,7 @@ set collation_connection=ujis_bin; --echo # MDEV-6776 ujis and eucjmps erroneously accept 0x8EA0 as a valid byte sequence --echo # CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ujis); -INSERT INTO t1 VALUES (0x8EA0); +INSERT IGNORE INTO t1 VALUES (0x8EA0); SELECT HEX(a), CHAR_LENGTH(a) FROM t1; DROP TABLE t1; --error ER_INVALID_CHARACTER_STRING @@ -1406,7 +1406,7 @@ SELECT HEX(a) FROM t1 ORDER BY a;DROP TABLE t1; --echo # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis --echo # CREATE TABLE t1 (a TEXT CHARACTER SET ujis); -LOAD DATA INFILE '../../std_data/loaddata/mdev9823.ujis.txt' INTO TABLE t1 CHARACTER SET ujis IGNORE 4 LINES; +LOAD DATA INFILE '../../std_data/loaddata/mdev9823.ujis.txt' IGNORE INTO TABLE t1 CHARACTER SET ujis IGNORE 4 LINES; SELECT HEX(a) FROM t1; DROP TABLE t1; diff --git a/mysql-test/t/ctype_ujis_ucs2.test b/mysql-test/t/ctype_ujis_ucs2.test index 1a8702b2aa9..8616eea36d1 100644 --- a/mysql-test/t/ctype_ujis_ucs2.test +++ b/mysql-test/t/ctype_ujis_ucs2.test @@ -1243,7 +1243,7 @@ update t1 set name='User defined range #2' where ujis >= 0x8FF5A1 and ujis <= 0x # Other characters are not assigned update t1 set name='UNASSIGNED' where name=''; -update t1 set ucs2=ujis, ujis2=ucs2; +update ignore t1 set ucs2=ujis, ujis2=ucs2; --echo Characters with safe Unicode round trip select hex(ujis), hex(ucs2), hex(ujis2), name from t1 where ujis=ujis2 order by ujis; --echo Characters with unsafe Unicode round trip @@ -1299,7 +1299,7 @@ insert into t1 (ucs2,name) values (0xFFE0,'U+FFE0 FULLWIDTH CENT SIGN'); insert into t1 (ucs2,name) values (0xFFE1,'U+FFE1 FULLWIDTH POUND SIGN'); insert into t1 (ucs2,name) values (0xFFE2,'U+FFE2 FULLWIDTH NOT SIGN'); insert into t1 (ucs2,name) values (0xFFE4,'U+FFE4 FULLWIDTH BROKEN BAR'); -update t1 set ujis=ucs2; +update ignore t1 set ujis=ucs2; select hex(ucs2),hex(ujis),name from t1 order by name; drop table t1; diff --git a/mysql-test/t/ctype_utf16.test b/mysql-test/t/ctype_utf16.test index 3946da73f9b..526f5251055 100644 --- a/mysql-test/t/ctype_utf16.test +++ b/mysql-test/t/ctype_utf16.test @@ -570,6 +570,7 @@ drop table t1; # create table t1 (s1 varchar(50) character set ucs2); insert into t1 values (0xdf84); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify column s1 varchar(50) character set utf16; select hex(s1) from t1; drop table t1; @@ -578,7 +579,7 @@ drop table t1; # create table t1 (s1 varchar(5) character set ucs2, s2 varchar(5) character set utf16); insert into t1 (s1) values (0xdf84); -update t1 set s2 = s1; +update ignore t1 set s2 = s1; select hex(s2) from t1; drop table t1; @@ -660,7 +661,7 @@ select left('aaa','1'); # create table t1 (a int); insert into t1 values ('-1234.1e2'); -insert into t1 values ('-1234.1e2xxxx'); +insert ignore into t1 values ('-1234.1e2xxxx'); insert into t1 values ('-1234.1e2 '); select * from t1; drop table t1; @@ -670,13 +671,14 @@ drop table t1; # create table t1 (a int); insert into t1 values ('1 '); -insert into t1 values ('1 x'); +insert ignore into t1 values ('1 x'); select * from t1; drop table t1; # # Testing auto-conversion to TEXT # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 (a varchar(17000) character set utf16); show create table t1; drop table t1; @@ -771,6 +773,7 @@ SELECT space(date_add(101, INTERVAL CHAR('1' USING utf16) hour_second)); --echo # SET NAMES utf8, @@character_set_connection=utf16; +SET STATEMENT group_concat_max_len=1024 FOR SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body UNION ALL @@ -778,6 +781,7 @@ SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1 GROUP BY id ORDER BY l DESC; +SET STATEMENT group_concat_max_len=1024 FOR SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body UNION ALL @@ -795,6 +799,15 @@ DO RPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999); --error ER_INVALID_CHARACTER_STRING DO LPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999); +--echo # +--echo # MDEV-11685: sql_mode can't be set with non-ascii connection charset +--echo # +SET character_set_connection=utf16; +SET sql_mode='NO_ENGINE_SUBSTITUTION'; +SELECT @@sql_mode; +SET sql_mode=DEFAULT; +SET NAMES utf8; + --echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/ctype_utf16_def.test b/mysql-test/t/ctype_utf16_def.test index fad61b057c3..0829cd53285 100644 --- a/mysql-test/t/ctype_utf16_def.test +++ b/mysql-test/t/ctype_utf16_def.test @@ -1,5 +1,5 @@ --source include/have_utf16.inc -call mtr.add_suppression("Cannot use utf16 as character_set_client"); +call mtr.add_suppression("'utf16' can not be used as client character set"); # # Bug #32391 Character sets: crash with --character-set-server diff --git a/mysql-test/t/ctype_utf16le.test b/mysql-test/t/ctype_utf16le.test index 665443bb278..79cf875852a 100644 --- a/mysql-test/t/ctype_utf16le.test +++ b/mysql-test/t/ctype_utf16le.test @@ -60,7 +60,7 @@ CREATE TABLE t1 (a VARCHAR(10), pad INT, b VARCHAR(10)) CHARACTER SET utf16le; INSERT INTO t1 VALUES (_ucs2 X'0420', 10, _ucs2 X'0421'); INSERT INTO t1 VALUES (_ucs2 X'0420', 10, _ucs2 X'04210422'); INSERT INTO t1 VALUES (_ucs2 X'0420', 10, _ucs2 X'042104220423'); -INSERT INTO t1 VALUES (_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423'); +INSERT IGNORE INTO t1 VALUES (_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423'); INSERT INTO t1 VALUES (_utf32 X'010000', 10, _ucs2 X'0421'); INSERT INTO t1 VALUES (_ucs2 X'0421', 10, _utf32 X'010000'); SELECT a, pad, b, LPAD(a, pad, b), HEX(LPAD(a, pad, b)) FROM t1; @@ -492,6 +492,7 @@ DROP TABLE t1; --echo # CREATE TABLE t1 (s1 VARCHAR(50) CHARACTER SET ucs2); INSERT INTO t1 VALUES (0xDF84); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY column s1 VARCHAR(50) CHARACTER SET utf16le; SELECT HEX(s1) FROM t1; DROP TABLE t1; @@ -501,7 +502,7 @@ DROP TABLE t1; --echo # CREATE TABLE t1 (s1 VARCHAR(5) CHARACTER SET ucs2, s2 VARCHAR(5) CHARACTER SET utf16le); INSERT INTO t1 (s1) VALUES (0xdf84); -UPDATE t1 set s2 = s1; +UPDATE IGNORE t1 set s2 = s1; SELECT HEX(s2) FROM t1; DROP TABLE t1; @@ -603,7 +604,7 @@ DROP TABLE t1; --echo # CREATE TABLE t1 (a int); INSERT INTO t1 VALUES ('-1234.1e2'); -INSERT INTO t1 VALUES ('-1234.1e2xxxx'); +INSERT IGNORE INTO t1 VALUES ('-1234.1e2xxxx'); INSERT INTO t1 VALUES ('-1234.1e2 '); INSERT INTO t1 VALUES ('123'); INSERT INTO t1 VALUES ('-124'); @@ -629,7 +630,7 @@ DROP TABLE t1; --echo # CREATE TABLE t1 (a int); INSERT INTO t1 VALUES ('1 '); -INSERT INTO t1 VALUES ('1 x'); +INSERT IGNORE INTO t1 VALUES ('1 x'); SELECT * FROM t1; DROP TABLE t1; @@ -637,6 +638,7 @@ DROP TABLE t1; --echo # --echo # Testing auto-conversion to TEXT --echo # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (a VARCHAR(17000) CHARACTER SET utf16le); SHOW CREATE TABLE t1; DROP TABLE t1; diff --git a/mysql-test/t/ctype_utf32.test b/mysql-test/t/ctype_utf32.test index f364f1bd3a5..343b3c3d54b 100644 --- a/mysql-test/t/ctype_utf32.test +++ b/mysql-test/t/ctype_utf32.test @@ -598,19 +598,19 @@ drop table t1; # create table t1 (utf32 varchar(2) character set utf32); --echo Wrong character with pad -insert into t1 values (0x110000); +insert ignore into t1 values (0x110000); --echo Wrong chsaracter without pad -insert into t1 values (0x00110000); +insert ignore into t1 values (0x00110000); --echo Wrong character with pad followed by another wrong character -insert into t1 values (0x11000000110000); +insert ignore into t1 values (0x11000000110000); --echo Good character with pad followed by bad character -insert into t1 values (0x10000000110000); +insert ignore into t1 values (0x10000000110000); --echo Good character without pad followed by bad character -insert into t1 values (0x0010000000110000); +insert ignore into t1 values (0x0010000000110000); --echo Wrong character with the second byte higher than 0x10 -insert into t1 values (0x00800037); +insert ignore into t1 values (0x00800037); --echo Wrong character with pad with the second byte higher than 0x10 -insert into t1 values (0x00800037); +insert ignore into t1 values (0x00800037); drop table t1; # @@ -700,7 +700,7 @@ select left('aaa','1'); # create table t1 (a int); insert into t1 values ('-1234.1e2'); -insert into t1 values ('-1234.1e2xxxx'); +insert ignore into t1 values ('-1234.1e2xxxx'); insert into t1 values ('-1234.1e2 '); select * from t1; drop table t1; @@ -710,13 +710,14 @@ drop table t1; # create table t1 (a int); insert into t1 values ('1 '); -insert into t1 values ('1 x'); +insert ignore into t1 values ('1 x'); select * from t1; drop table t1; # # Testing auto-conversion to TEXT # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 (a varchar(17000) character set utf32); show create table t1; drop table t1; @@ -819,10 +820,10 @@ DROP TABLE t1; --echo # CREATE TABLE t1 (utf32 CHAR(5) CHARACTER SET utf32, latin1 CHAR(5) CHARACTER SET latin1); INSERT INTO t1 (utf32) VALUES (0xc581); -UPDATE t1 SET latin1 = utf32; +UPDATE IGNORE t1 SET latin1 = utf32; DELETE FROM t1; INSERT INTO t1 (utf32) VALUES (0x100cc); -UPDATE t1 SET latin1 = utf32; +UPDATE IGNORE t1 SET latin1 = utf32; DROP TABLE t1; --echo # @@ -860,6 +861,7 @@ DROP TABLE t1; --echo # SET NAMES utf8, @@character_set_connection=utf32; +SET STATEMENT group_concat_max_len=1024 FOR SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body UNION ALL @@ -894,6 +896,15 @@ SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061)); # select hex(lower(cast(0xffff0000 as char character set utf32))) as c; +--echo # +--echo # MDEV-11685: sql_mode can't be set with non-ascii connection charset +--echo # +SET character_set_connection=utf32; +SET sql_mode='NO_ENGINE_SUBSTITUTION'; +SELECT @@sql_mode; +SET sql_mode=DEFAULT; +SET NAMES utf8; + --echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index 0b0e5dc37b2..d1fe93d9251 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -129,26 +129,26 @@ set LC_TIME_NAMES='en_US'; # set names koi8r; create table t1 (s1 char(1) character set utf8); -insert into t1 values (_koi8r'ÁÂ'); +insert ignore into t1 values (_koi8r'ÁÂ'); select s1,hex(s1),char_length(s1),octet_length(s1) from t1; drop table t1; create table t1 (s1 tinytext character set utf8); -insert into t1 select repeat('a',300); -insert into t1 select repeat('Ñ',300); -insert into t1 select repeat('aÑ',300); -insert into t1 select repeat('Ña',300); -insert into t1 select repeat('ÑÑ',300); +insert ignore into t1 select repeat('a',300); +insert ignore into t1 select repeat('Ñ',300); +insert ignore into t1 select repeat('aÑ',300); +insert ignore into t1 select repeat('Ña',300); +insert ignore into t1 select repeat('ÑÑ',300); select hex(s1) from t1; select length(s1),char_length(s1) from t1; drop table t1; create table t1 (s1 text character set utf8); -insert into t1 select repeat('a',66000); -insert into t1 select repeat('Ñ',66000); -insert into t1 select repeat('aÑ',66000); -insert into t1 select repeat('Ña',66000); -insert into t1 select repeat('ÑÑ',66000); +insert ignore into t1 select repeat('a',66000); +insert ignore into t1 select repeat('Ñ',66000); +insert ignore into t1 select repeat('aÑ',66000); +insert ignore into t1 select repeat('Ña',66000); +insert ignore into t1 select repeat('ÑÑ',66000); select length(s1),char_length(s1) from t1; drop table t1; @@ -156,17 +156,17 @@ drop table t1; # Bug #2368 Multibyte charsets do not check that incoming data is well-formed # create table t1 (s1 char(10) character set utf8); -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); select hex(s1) from t1; drop table t1; create table t1 (s1 varchar(10) character set utf8); -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); select hex(s1) from t1; drop table t1; create table t1 (s1 text character set utf8); -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); select hex(s1) from t1; drop table t1; @@ -837,6 +837,7 @@ DROP TABLE t1,t2; # create table t1 (a char(20) character set utf8); insert into t1 values ('123456'),('андрей'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify a char(2) character set utf8; select char_length(a), length(a), a from t1 order by a; drop table t1; @@ -1215,15 +1216,19 @@ create table t1 ( insert into t1 (a) values ('abcdefghijklmnopqrstuvwxyz'); select * from t1; # varchar to varchar +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(20) character set utf8 not null; select * from t1; # varchar to char +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(15) character set utf8 not null; select * from t1; # char to char +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(10) character set utf8 not null; select * from t1; # char to varchar +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(5) character set utf8 not null; select * from t1; drop table t1; @@ -1235,6 +1240,7 @@ create table t1 ( a varchar(4000) not null ) default character set utf8; insert into t1 values (repeat('a',4000)); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(3000) character set utf8 not null; select length(a) from t1; drop table t1; @@ -1674,6 +1680,7 @@ SET NAMES utf8; CREATE TABLE t1 (a TEXT CHARACTER SET utf8); INSERT INTO t1 VALUES (REPEAT('A',100)); SELECT OCTET_LENGTH(a) FROM t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a TINYTEXT CHARACTER SET utf8; SELECT OCTET_LENGTH(a),a FROM t1; DROP TABLE t1; @@ -2000,14 +2007,14 @@ LOAD DATA INFILE '../../std_data/loaddata/mdev9824.txt' INTO TABLE t1 CHARACTER SELECT c1 FROM t1; DELETE FROM t1; LOAD DATA INFILE '../../std_data/loaddata/mdev9824.txt' INTO TABLE t1 CHARACTER SET utf8 LINES TERMINATED BY 'ёё' IGNORE 1 LINES; -SELECT c1 FROM t1; +SELECT c1 FROM t1 ORDER BY c1; DROP TABLE t1; --echo # --echo # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis --echo # CREATE TABLE t1 (a TEXT CHARACTER SET utf8); -LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' INTO TABLE t1 CHARACTER SET utf8 IGNORE 4 LINES; +LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' IGNORE INTO TABLE t1 CHARACTER SET utf8 IGNORE 4 LINES; SELECT HEX(a) FROM t1; DROP TABLE t1; @@ -2015,7 +2022,7 @@ DROP TABLE t1; --echo # MDEV-9874 LOAD XML INFILE does not handle well broken multi-byte characters --echo # CREATE TABLE t1 (a TEXT CHARACTER SET utf8); -LOAD XML INFILE '../../std_data/loaddata/mdev9874.xml' INTO TABLE t1 CHARACTER SET utf8 ROWS IDENTIFIED BY ''; +LOAD XML INFILE '../../std_data/loaddata/mdev9874.xml' IGNORE INTO TABLE t1 CHARACTER SET utf8 ROWS IDENTIFIED BY ''; SELECT HEX(a) FROM t1; DROP TABLE t1; diff --git a/mysql-test/t/ctype_utf8mb4.test b/mysql-test/t/ctype_utf8mb4.test index 55aad5b1454..94b5d77ad90 100644 --- a/mysql-test/t/ctype_utf8mb4.test +++ b/mysql-test/t/ctype_utf8mb4.test @@ -127,26 +127,26 @@ set LC_TIME_NAMES='en_US'; # set names koi8r; create table t1 (s1 char(1) character set utf8mb4); -insert into t1 values (_koi8r'ÁÂ'); +insert ignore into t1 values (_koi8r'ÁÂ'); select s1,hex(s1),char_length(s1),octet_length(s1) from t1; drop table t1; create table t1 (s1 tinytext character set utf8mb4); -insert into t1 select repeat('a',300); -insert into t1 select repeat('Ñ',300); -insert into t1 select repeat('aÑ',300); -insert into t1 select repeat('Ña',300); -insert into t1 select repeat('ÑÑ',300); +insert ignore into t1 select repeat('a',300); +insert ignore into t1 select repeat('Ñ',300); +insert ignore into t1 select repeat('aÑ',300); +insert ignore into t1 select repeat('Ña',300); +insert ignore into t1 select repeat('ÑÑ',300); select hex(s1) from t1; select length(s1),char_length(s1) from t1; drop table t1; create table t1 (s1 text character set utf8mb4); -insert into t1 select repeat('a',66000); -insert into t1 select repeat('Ñ',66000); -insert into t1 select repeat('aÑ',66000); -insert into t1 select repeat('Ña',66000); -insert into t1 select repeat('ÑÑ',66000); +insert ignore into t1 select repeat('a',66000); +insert ignore into t1 select repeat('Ñ',66000); +insert ignore into t1 select repeat('aÑ',66000); +insert ignore into t1 select repeat('Ña',66000); +insert ignore into t1 select repeat('ÑÑ',66000); select length(s1),char_length(s1) from t1; drop table t1; @@ -154,17 +154,17 @@ drop table t1; # Bug #2368 Multibyte charsets do not check that incoming data is well-formed # create table t1 (s1 char(10) character set utf8mb4); -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); select hex(s1) from t1; drop table t1; create table t1 (s1 varchar(10) character set utf8mb4); -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); select hex(s1) from t1; drop table t1; create table t1 (s1 text character set utf8mb4); -insert into t1 values (0x41FF); +insert ignore into t1 values (0x41FF); select hex(s1) from t1; drop table t1; @@ -856,6 +856,7 @@ DROP TABLE t1,t2; # create table t1 (a char(20) character set utf8mb4); insert into t1 values ('123456'),('андрей'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify a char(2) character set utf8mb4; select char_length(a), length(a), a from t1 order by a; drop table t1; @@ -1225,15 +1226,19 @@ create table t1 ( insert into t1 (a) values ('abcdefghijklmnopqrstuvwxyz'); select * from t1; # varchar to varchar +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(20) character set utf8mb4 not null; select * from t1; # varchar to char +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(15) character set utf8mb4 not null; select * from t1; # char to char +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a char(10) character set utf8mb4 not null; select * from t1; # char to varchar +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(5) character set utf8mb4 not null; select * from t1; drop table t1; @@ -1245,6 +1250,7 @@ create table t1 ( a varchar(4000) not null ) default character set utf8mb4; insert into t1 values (repeat('a',4000)); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change a a varchar(3000) character set utf8mb4 not null; select length(a) from t1; drop table t1; @@ -1490,21 +1496,21 @@ create table t1 (utf8mb4 char(1) character set utf8mb4); --echo Testing [F0][90..BF][80..BF][80..BF] insert into t1 values (0xF0908080); insert into t1 values (0xF0BFBFBF); -insert into t1 values (0xF08F8080); -select hex(utf8mb4) from t1; +insert ignore into t1 values (0xF08F8080); +select hex(utf8mb4) from t1 order by binary utf8mb4; delete from t1; --echo Testing [F2..F3][80..BF][80..BF][80..BF] insert into t1 values (0xF2808080); insert into t1 values (0xF2BFBFBF); -select hex(utf8mb4) from t1; +select hex(utf8mb4) from t1 order by binary utf8mb4; delete from t1; --echo Testing [F4][80..8F][80..BF][80..BF] insert into t1 values (0xF4808080); insert into t1 values (0xF48F8080); -insert into t1 values (0xF4908080); -select hex(utf8mb4) from t1; +insert ignore into t1 values (0xF4908080); +select hex(utf8mb4) from t1 order by binary utf8mb4; drop table t1; @@ -1581,12 +1587,12 @@ INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859 # Mix of 3-byte and 4-byte chars INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab'); # All from musical chars, but 11 instead of 10 chars. truncated -INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); +INSERT IGNORE INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0'); SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding; # First invalid 4 byte value -INSERT INTO t1 VALUES (1114111, x'f5808080'); +INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080'); SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE table_name= 't1' AND column_name= 'utf8mb4_encoding'; @@ -1603,13 +1609,13 @@ INSERT INTO t2 VALUES (42856, x'ea9da8'); # SMALL COMMERCIAL AT INSERT INTO t2 VALUES (65131, x'efb9ab'); # (last 4 byte character) -INSERT INTO t2 VALUES (1114111, x'f48fbfbf'); +INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf'); SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE table_name= 't2' AND column_name= 'utf8mb3_encoding'; # Update a 3-byte char col with a 4-byte char, error -UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; +UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856; # Update to a 3-byte char casted to 4-byte, error? UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856; @@ -1627,6 +1633,7 @@ SELECT count(*) FROM t1, t2 WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding; # Alter from 4-byte charset to 3-byte charset, error +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 CONVERT TO CHARACTER SET utf8; SHOW CREATE TABLE t1; SELECT u_decimal,hex(utf8mb4_encoding),utf8mb4_encoding FROM t1; @@ -1737,6 +1744,7 @@ CREATE TABLE t1 ( ALTER TABLE t1 ADD INDEX (subject); # Alter old 'utf8' table to new 'utf8mb4' +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 DEFAULT CHARACTER SET utf8, MODIFY subject varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, @@ -1816,6 +1824,7 @@ SET NAMES utf8mb4; CREATE TABLE t1 (a TEXT CHARACTER SET utf8mb4); INSERT INTO t1 VALUES (REPEAT('😎',100)); SELECT OCTET_LENGTH(a) FROM t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a TINYTEXT CHARACTER SET utf8mb4; SELECT OCTET_LENGTH(a),a FROM t1; DROP TABLE t1; @@ -1892,7 +1901,7 @@ CREATE TABLE t1 ( a VARCHAR(32) CHARACTER SET utf8mb4, b VARCHAR(32) CHARACTER SET utf8 ); -INSERT INTO t1 SELECT 'a 😠b', 'a 😠b'; +INSERT IGNORE INTO t1 SELECT 'a 😠b', 'a 😠b'; SELECT * FROM t1; DROP TABLE t1; @@ -1909,7 +1918,7 @@ CREATE TABLE t1 ( a VARCHAR(32) CHARACTER SET utf8mb4, b VARCHAR(32) CHARACTER SET utf8 ); -INSERT INTO t1 SELECT 'a 😠b', 'a 😠b'; +INSERT IGNORE INTO t1 SELECT 'a 😠b', 'a 😠b'; SELECT * FROM t1; DROP TABLE t1; @@ -1953,7 +1962,7 @@ DROP FUNCTION f1; --echo # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis --echo # CREATE TABLE t1 (a TEXT CHARACTER SET utf8mb4); -LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' INTO TABLE t1 CHARACTER SET utf8mb4 IGNORE 4 LINES; +LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' IGNORE INTO TABLE t1 CHARACTER SET utf8mb4 IGNORE 4 LINES; SELECT HEX(a) FROM t1; DROP TABLE t1; diff --git a/mysql-test/t/default.test b/mysql-test/t/default.test index 41ed1613448..b9f97b08a72 100644 --- a/mysql-test/t/default.test +++ b/mysql-test/t/default.test @@ -106,12 +106,12 @@ drop table t2; # multiple-row statement, the preceding rows will have been inserted. # create table bug20691 (i int, d datetime NOT NULL, dn datetime not null default '0000-00-00 00:00:00'); -insert into bug20691 values (1, DEFAULT, DEFAULT), (1, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (1, DEFAULT, DEFAULT); -insert into bug20691 (i) values (2); +insert ignore into bug20691 values (1, DEFAULT, DEFAULT), (1, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (1, DEFAULT, DEFAULT); +insert ignore into bug20691 (i) values (2); desc bug20691; -insert into bug20691 values (3, DEFAULT, DEFAULT), (3, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (3, DEFAULT, DEFAULT); -insert into bug20691 (i) values (4); -insert into bug20691 values (5, DEFAULT, DEFAULT), (5, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (5, DEFAULT, DEFAULT); +insert ignore into bug20691 values (3, DEFAULT, DEFAULT), (3, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (3, DEFAULT, DEFAULT); +insert ignore into bug20691 (i) values (4); +insert ignore into bug20691 values (5, DEFAULT, DEFAULT), (5, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (5, DEFAULT, DEFAULT); SET sql_mode = 'ALLOW_INVALID_DATES'; insert into bug20691 values (6, DEFAULT, DEFAULT), (6, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (6, DEFAULT, DEFAULT); SET sql_mode = 'STRICT_ALL_TABLES'; @@ -359,6 +359,8 @@ insert into t1 (b) values(2); insert into t1 (a,b) values(3,4); select * from t1; drop table t1; +CREATE OR REPLACE TABLE t1 (a INT DEFAULT @v); drop table t1; +CREATE TABLE t1 (a INT DEFAULT @v:=1); drop table t1; --echo # --echo # Error handling @@ -407,12 +409,6 @@ CREATE TABLE t1 (a INT DEFAULT(?)); --error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD CREATE TABLE t1 (a INT DEFAULT (b), b INT DEFAULT(a)); ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED -CREATE TABLE t1 (a INT DEFAULT @v); - ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED -CREATE TABLE t1 (a INT DEFAULT @v:=1); - --error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a INT DEFAULT(NAME_CONST('xxx', 'yyy')); @@ -813,7 +809,7 @@ DROP TABLE t1; --echo # CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_TIME(6))); SHOW CREATE TABLE t1; -INSERT INTO t1 VALUES(); +INSERT IGNORE INTO t1 VALUES(); DROP TABLE t1; --echo # @@ -821,7 +817,7 @@ DROP TABLE t1; --echo # CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_DATE)); SHOW CREATE TABLE t1; -INSERT INTO t1 VALUES(); +INSERT IGNORE INTO t1 VALUES(); DROP TABLE t1; @@ -856,7 +852,7 @@ CREATE TABLE t1 ( b DECIMAL(30,0) DEFAULT COALESCE(CURRENT_TIMESTAMP(6)) ); SHOW CREATE TABLE t1; -INSERT INTO t1 VALUES (); +INSERT IGNORE INTO t1 VALUES (); SELECT * FROM t1; DROP TABLE t1; @@ -1103,7 +1099,7 @@ SET time_zone=DEFAULT, timestamp= DEFAULT; # SYSDATE is evaluated during get_date() rather than fix_fields. CREATE TABLE t1 (a TIMESTAMP(6) DEFAULT SYSDATE(6), s INT, b TIMESTAMP(6) DEFAULT SYSDATE(6)); SHOW CREATE TABLE t1; -INSERT INTO t1 VALUES (DEFAULT, SLEEP(0.1), DEFAULT); +INSERT INTO t1 VALUES (DEFAULT(a), SLEEP(0.1), DEFAULT(b)); SELECT b>a FROM t1; DROP TABLE t1; @@ -1407,13 +1403,13 @@ CREATE TABLE t1 (a DECIMAL(10,3), b VARCHAR(10) DEFAULT CAST(a AS CHAR(10)), c VARCHAR(10) DEFAULT CAST(a AS CHAR(4))); SHOW CREATE TABLE t1; -INSERT INTO t1 (a) VALUES (123.456); +INSERT IGNORE INTO t1 (a) VALUES (123.456); SELECT * FROM t1; DROP TABLE t1; CREATE TABLE t1 (a INT, b INT UNSIGNED DEFAULT CAST(a AS UNSIGNED)); SHOW CREATE TABLE t1; -INSERT INTO t1 (a) VALUES (-1); +INSERT IGNORE INTO t1 (a) VALUES (-1); SELECT * FROM t1; DROP TABLE t1; @@ -1633,7 +1629,7 @@ CREATE TABLE t1 ( x VARCHAR(30) DEFAULT EXPORT_SET(bits, v_on, v_off, v_separator, number_of_bits) ); SHOW CREATE TABLE t1; -INSERT INTO t1 VALUES (0x50006,'Y','N','',64,DEFAULT); +INSERT IGNORE INTO t1 VALUES (0x50006,'Y','N','',64,DEFAULT); SELECT * FROM t1; DROP TABLE t1; @@ -2016,8 +2012,33 @@ INSERT INTO t1 VALUES (1),(2),(3); EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING DEFAULT,DEFAULT; DROP TABLE t1; +--echo # +--echo # MDEV-11134 Assertion `fixed' failed in Item::const_charset_converter(THD*, CHARSET_INFO*, bool, const char*) +--echo # ---echo # end of 10.2 test +SET NAMES utf8; +PREPARE stmt FROM "CREATE OR REPLACE TABLE t1 (c CHAR(8) DEFAULT ?)"; +SET @a=''; +EXECUTE stmt USING @a; +EXECUTE stmt USING @a; +SHOW CREATE TABLE t1; +DROP TABLE t1; +SET @a='A'; +EXECUTE stmt USING @a; +EXECUTE stmt USING @a; +SHOW CREATE TABLE t1; +DROP TABLE t1; +SET @a=_utf8 0xC380; # LATIN CAPITAL LETTER A WITH GRAVE +EXECUTE stmt USING @a; +EXECUTE stmt USING @a; +SHOW CREATE TABLE t1; +DROP TABLE t1; +SET @a=_utf8 0xD18F; # Cyrillic letter into a latin1 column +--error ER_INVALID_DEFAULT +EXECUTE stmt USING @a; +--error ER_INVALID_DEFAULT +EXECUTE stmt USING @a; +DEALLOCATE PREPARE stmt; # # ANSI_QUOTES @@ -2036,3 +2057,22 @@ select * from t1; drop table t1; set sql_mode=default; +# +# MDEV-10201 Bad results for CREATE TABLE t1 (a INT DEFAULT b, b INT DEFAULT 4) +# +create table t1 (a int default b, b int default 4, t text); +insert into t1 (b, t) values (5, '1 column is omitted'); +insert into t1 values (default, 5, '2 column gets DEFAULT, keyword'); +insert into t1 values (default(a), 5, '3 column gets DEFAULT(a), expression'); +insert into t1 values (default(a)+0, 5, '4 also expression DEFAULT(0)+0'); +insert into t1 values (b, 5, '5 the value of the DEFAULT(a), that is b'); +select * from t1 order by t; +drop table t1; + +# +# MDEV-10352 Server crashes in Field::set_default on CREATE TABLE +# +--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD +create table t1 (col1 int default(-(default(col1)))); + +--echo # end of 10.2 test diff --git a/mysql-test/t/default_debug.test b/mysql-test/t/default_debug.test new file mode 100644 index 00000000000..cdde26569ca --- /dev/null +++ b/mysql-test/t/default_debug.test @@ -0,0 +1,22 @@ +# +# Race condition in DEFAULT() with expressions +# + +source include/have_debug_sync.inc; + +create table t1 (a int, b int default (a+1)); +insert t1 values (1,10), (2,20), (3,30); +connect (con1, localhost, root); +select a,b,default(b) from t1; +set debug_sync='after_Item_default_value_calculate WAIT_FOR go'; +send select a,b,default(b) from t1; +connection default; +let $wait_condition=select count(*) from information_schema.processlist where state like 'debug sync%'; +source include/wait_condition.inc; +set debug_sync='ha_write_row_start SIGNAL go'; +insert t1 values (100,default(b)); +connection con1; +reap; +connection default; +drop table t1; +set debug_sync='RESET'; diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index 6a72ae9c38b..c82420640c2 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -2,6 +2,8 @@ # Check for problems with delete # +call mtr.add_suppression("Sort aborted.*"); + --disable_warnings drop table if exists t1,t2,t3,t11,t12; --enable_warnings diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index 28781ad6fdb..121e274ceeb 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -910,3 +910,43 @@ DROP TABLE t1; --echo # --echo # End of 10.1 tests --echo # + +--echo # +--echo # MDEV-10554: Assertion `!derived->first_select()-> +--echo # exclude_from_table_unique_test || derived->outer_select()-> +--echo # exclude_from_table_unique_test' +--echo # failed in TABLE_LIST::set_check_merged() +--echo # + +CREATE TABLE t1 (f INT); +CREATE ALGORITHM = TEMPTABLE VIEW v1 AS SELECT * FROM ( SELECT * FROM t1 ) AS sq; + +PREPARE stmt FROM 'SELECT * FROM v1'; +EXECUTE stmt; +EXECUTE stmt; + +drop view v1; +drop table t1; + +--echo # +--echo # MDEV-11363: Assertion `!derived->first_sel ect()->first_inner_unit() || +--echo # derived->first_select()->first_inner_unit()->first_select()-> +--echo # exclude_from_table_unique_test' failed in +--echo # TABLE_LIST::set_check_materialized() +--echo # + +CREATE TABLE t1 (f1 INT); +CREATE TABLE t2 (f2 INT); +CREATE TABLE t3 (f3 INT); +CREATE VIEW v1 AS ( SELECT f1 AS f FROM t1 ) UNION ( SELECT f2 AS f FROM t2 ); +CREATE VIEW v2 AS SELECT f3 AS f FROM t3; +CREATE VIEW v3 AS SELECT f FROM ( SELECT f3 AS f FROM v1, t3 ) AS sq; +CREATE VIEW v4 AS SELECT COUNT(*) as f FROM v3; +REPLACE INTO v2 ( SELECT * FROM v4 ) UNION ( SELECT f FROM v2 ); + +drop view v1,v2,v3,v4; +drop table t1,t2,t3; + +--echo # +--echo # End of 10.2 tests +--echo # diff --git a/mysql-test/t/derived_cond_pushdown.test b/mysql-test/t/derived_cond_pushdown.test index e43751472db..47d01617b83 100644 --- a/mysql-test/t/derived_cond_pushdown.test +++ b/mysql-test/t/derived_cond_pushdown.test @@ -1319,3 +1319,37 @@ SELECT * FROM v1 WHERE v1.d IN ( SELECT MIN(d) FROM t2 WHERE 0 ); DROP VIEW v1; DROP TABLE t1,t2; + +--echo # +--echo # MDEV-11820: second execution of PS for query +--echo # with false subquery predicate in WHERE +--echo # + +CREATE TABLE t1 (c VARCHAR(3)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('foo'),('bar'); +CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; +CREATE TABLE t2 (a INT); +INSERT INTO t2 VALUES (3), (4); + +PREPARE stmt1 FROM +" SELECT * FROM v1 WHERE 1 IN (SELECT a FROM t2) OR c = 'foo'"; +PREPARE stmt2 FROM +"EXPLAIN FORMAT=JSON + SELECT * FROM v1 WHERE 1 IN (SELECT a FROM t2) OR c = 'foo'"; +EXECUTE stmt1; +EXECUTE stmt2; +INSERT INTO t2 SELECT a+1 FROM t2; +INSERT INTO t2 SELECT a+1 FROM t2; +INSERT INTO t2 SELECT a+1 FROM t2; +INSERT INTO t2 SELECT a+1 FROM t2; +INSERT INTO t2 SELECT a+1 FROM t2; +INSERT INTO t2 SELECT a+1 FROM t2; +EXECUTE stmt1; +EXECUTE stmt2; +DEALLOCATE PREPARE stmt1; +# the result here will change after the merge with the fix for mdev-11859 +DEALLOCATE PREPARE stmt2; + +DROP VIEW v1; +DROP TABLE t1,t2; + diff --git a/mysql-test/t/events_slowlog.test b/mysql-test/t/events_slowlog.test new file mode 100644 index 00000000000..9679714dba3 --- /dev/null +++ b/mysql-test/t/events_slowlog.test @@ -0,0 +1,28 @@ +--source include/not_embedded.inc +# +# MDEV-11552 Queries executed by event scheduler are written to slow log incorrectly or not written at all +# +set @event_scheduler_save= @@global.event_scheduler; +set @slow_query_log_save= @@global.slow_query_log; + +set global event_scheduler= on; +set global slow_query_log= on; +set global long_query_time=0.2; + +create table t1 (i int); +insert into t1 values (0); +create event ev on schedule at CURRENT_TIMESTAMP + INTERVAL 1 second do update t1 set i=1+sleep(0.5); + +--let wait_condition= select i from t1 where i > 0 +--source include/wait_condition.inc + +--let SEARCH_FILE = `SELECT @@slow_query_log_file` +--let SEARCH_PATTERN= update t1 set i=1 +--let SEARCH_RANGE= -1000 +--source include/search_pattern_in_file.inc + +drop table t1; + +set global event_scheduler= @event_scheduler_save; +set global slow_query_log= @slow_query_log_save; +set global long_query_time= @@session.long_query_time; diff --git a/mysql-test/t/explain_json.test b/mysql-test/t/explain_json.test index 22bfd5aedcd..d253b8380e9 100644 --- a/mysql-test/t/explain_json.test +++ b/mysql-test/t/explain_json.test @@ -219,7 +219,7 @@ create table t1 (a int, b int, c int, d int, key(a,b,c)); insert into t1 select A.a, B.a, C.a, D.a from t2 A, t2 B, t2 C, t2 D; explain select count(distinct b) from t1 group by a; explain format=json select count(distinct b) from t1 group by a; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select count(distinct b) from t1 group by a; drop table t1,t2; @@ -342,7 +342,7 @@ explain select * from t1 left join t2 on t2.pk > 10 and t2.pk < 0; explain format=json select * from t1 left join t2 on t2.pk > 10 and t2.pk < 0; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t1 left join t2 on t2.pk > 10 and t2.pk < 0; @@ -351,7 +351,7 @@ explain select * from t1 left join t2 on t2.pk=t1.a where t2.pk is null; explain format=json select * from t1 left join t2 on t2.pk=t1.a where t2.pk is null; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t1 left join t2 on t2.pk=t1.a where t2.pk is null; @@ -360,7 +360,7 @@ explain select distinct t1.a from t1 join t2 on t2.pk=t1.a; explain format=json select distinct t1.a from t1 join t2 on t2.pk=t1.a; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select distinct t1.a from t1 join t2 on t2.pk=t1.a; drop table t1,t2; @@ -386,7 +386,7 @@ explain select * from t3,t4 where t3.a=t4.a and (t4.b+1 <= t3.b+1); explain format=json select * from t3,t4 where t3.a=t4.a and (t4.b+1 <= t3.b+1); ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t3,t4 where t3.a=t4.a and (t4.b+1 <= t3.b+1); set optimizer_switch=@tmp_optimizer_switch; diff --git a/mysql-test/t/explain_json_format_partitions.test b/mysql-test/t/explain_json_format_partitions.test index f3567797019..4c7d3f165d1 100644 --- a/mysql-test/t/explain_json_format_partitions.test +++ b/mysql-test/t/explain_json_format_partitions.test @@ -8,10 +8,10 @@ create table t1 ( insert into t1 select a from t2; explain partitions select * from t1 where a in (2,3,4); explain format=json select * from t1 where a in (2,3,4); ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select * from t1 where a in (2,3,4); ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json update t1 set a=a+10 where a in (2,3,4); ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json delete from t1 where a in (20,30,40); drop table t1,t2; diff --git a/mysql-test/t/failed_auth_3909.test b/mysql-test/t/failed_auth_3909.test index 3179794d155..f72460691ea 100644 --- a/mysql-test/t/failed_auth_3909.test +++ b/mysql-test/t/failed_auth_3909.test @@ -7,7 +7,7 @@ source include/not_embedded.inc; # the server requests a plugin # optimize table mysql.user; -insert mysql.user (user,plugin) values ('foo','bar'),('bar','bar'),('baz','bar'); +insert ignore mysql.user (user,plugin) values ('foo','bar'),('bar','bar'),('baz','bar'); flush privileges; --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT diff --git a/mysql-test/t/filesort_debug.test b/mysql-test/t/filesort_debug.test index 86795298f07..a8833617c09 100644 --- a/mysql-test/t/filesort_debug.test +++ b/mysql-test/t/filesort_debug.test @@ -2,6 +2,8 @@ --source include/have_debug_sync.inc --source include/count_sessions.inc +call mtr.add_suppression("Sort aborted.*"); + SET @old_debug= @@session.debug; --echo # diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 9dfc49d3dfd..12d36ce645b 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -293,6 +293,7 @@ SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabr SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck'); SELECT t, collation(t),FORMAT(MATCH t AGAINST ('Osnabruck'),6) FROM t1 WHERE MATCH t AGAINST ('Osnabruck'); #alter table t1 modify t text character set latin1 collate latin1_german2_ci not null; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify t varchar(200) collate latin1_german2_ci not null; SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrück'); SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck'); diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index bdd295d0fa9..abc86476a6b 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -543,7 +543,7 @@ SELECT LENGTH( GROUP_CONCAT( DISTINCT a ) ) FROM t2; CREATE TABLE t3( a TEXT, b INT ); INSERT INTO t3 VALUES( REPEAT( 'a', 65534 ), 1 ); INSERT INTO t3 VALUES( REPEAT( 'a', 65535 ), 2 ); -INSERT INTO t3 VALUES( REPEAT( 'a', 65536 ), 3 ); +INSERT IGNORE INTO t3 VALUES( REPEAT( 'a', 65536 ), 3 ); SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 1; SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 2; SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 3; @@ -566,7 +566,7 @@ drop table t1; # Bug #31154: group_concat() and bit fields; # create table t1(a bit not null); -insert into t1 values (), (), (); +insert ignore into t1 values (), (), (); select group_concat(distinct a) from t1; select group_concat(distinct a order by a) from t1; drop table t1; @@ -861,7 +861,7 @@ CREATE TABLE t2 SELECT GROUP_CONCAT(UPPER(f1) ORDER BY f2) FROM t1; SHOW CREATE TABLE t2; DROP TABLE t2; -SET group_concat_max_len= DEFAULT; +SET group_concat_max_len= 1024; SELECT LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) FROM t1; SET group_concat_max_len= 499999; diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test index 9e848aa1847..6cbd5a63706 100644 --- a/mysql-test/t/func_in.test +++ b/mysql-test/t/func_in.test @@ -477,9 +477,9 @@ CREATE TABLE t1 ( INDEX(c_datetime), INDEX(c_timestamp), INDEX(c_time), INDEX(c_year), INDEX(c_char)); -INSERT INTO t1 (c_int) VALUES (1), (2), (3), (4), (5); -INSERT INTO t1 (c_int) SELECT 0 FROM t1; -INSERT INTO t1 (c_int) SELECT 0 FROM t1; +INSERT IGNORE INTO t1 (c_int) VALUES (1), (2), (3), (4), (5); +INSERT IGNORE INTO t1 (c_int) SELECT 0 FROM t1; +INSERT IGNORE INTO t1 (c_int) SELECT 0 FROM t1; --enable_warnings diff --git a/mysql-test/t/func_json.test b/mysql-test/t/func_json.test index 7ab136f177c..09e4f30c325 100644 --- a/mysql-test/t/func_json.test +++ b/mysql-test/t/func_json.test @@ -78,6 +78,8 @@ select json_extract('[10, 20, [30, 40]]', '$[2][*]'); select json_extract('[10, 20, [{"a":3}, 30, 40]]', '$[2][*]'); select json_extract('1', '$'); select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]'); +select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]', '$[25]'); +select json_extract( '[{"a": [3, 4]}, {"b": 2}]', '$[0].a', '$[1].a'); select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.k1', 'word'); select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.d[3]', 3); @@ -159,10 +161,10 @@ select json_unquote('abc'); select json_object("a", json_object("b", "abcd")); select json_object("a", '{"b": "abcd"}'); -select json_object("a", cast('{"b": "abcd"}' as json)); +select json_object("a", json_compact('{"b": "abcd"}')); -select cast(NULL AS JSON); -select json_depth(cast(NULL as JSON)); +select json_compact(NULL); +select json_depth(json_compact(NULL)); select json_depth('[[], {}]'); select json_depth('[[[1,2,3],"s"], {}, []]'); select json_depth('[10, {"a": 20}]'); @@ -177,3 +179,62 @@ create table json (j INT); show create table json; drop table json; +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2]' ); +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0]' ); +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0][0]' ); +select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0][0][0]' ); +select json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2]' ); +select json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0]' ); +select json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0][0]' ); +select json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0][0][0]' ); +select json_length( '{"a":{"b":{"d":1}}, "a":{"c":{"d":1, "j":2}}}', '$.a[0][0][0].c' ); + +select json_set('1', '$[0]', 100); +select json_set('1', '$[0][0]', 100); +select json_set('1', '$[1]', 100); +select json_set('{"a":12}', '$[0]', 100); +select json_set('{"a":12}', '$[0].a', 100); +select json_set('{"a":12}', '$[0][0].a', 100); +select json_set('{"a":12}', '$[0][1].a', 100); + +select json_value('{"\\"key1":123}', '$."\\"key1"'); +select json_value('{"\\"key1\\"":123}', '$."\\"key1\\""'); +select json_value('{"key 1":123}', '$."key 1"'); + +select json_contains_path('{"a":[{"c":[1,{"a":[0,1,2]},3]}], "b":[1,2,3]}', 'one', "$**.a[2]"); +select json_contains_path('{"a":[{"c":[1,{"a":[0,1,2]},3]}], "b":[1,2,3]}', 'one', "$**.a[3]"); + +select json_extract( '[1]', '$[0][0]' ); +select json_extract( '[1]', '$[1][0]' ); +select json_extract( '[1]', '$**[0]' ); +select json_extract( '[1]', '$**[0][0]' ); + +select json_insert('1', '$[0]', 4); +select json_replace('1', '$[0]', 4); +select json_set('1', '$[0]', 4); +select json_set('1', '$[1]', 4); +select json_replace('1', '$[1]', 4); +SELECT json_insert('[]', '$[0][0]', 100); +SELECT json_insert('1', '$[0][0]', 100); +SELECT json_replace('1', '$[0][0]', 100); +SELECT json_replace('[]', '$[0][0]', 100); +SELECT json_set('[]', '$[0][0]', 100); +SELECT json_set('[]', '$[0][0][0]', 100); + +# +# MDEV-11857 json_search() shows "Out of memory" with empty key. +# +SELECT JSON_search( '{"": "a"}', "one", 'a'); + +# +# MDEV-11858 json_merge() concatenates instead of merging. +# + +select json_merge('{"a":"b"}', '{"a":"c"}') ; +select json_merge('{"a":{"x":"b"}}', '{"a":"c"}') ; +select json_merge('{"a":{"u":12, "x":"b"}}', '{"a":{"x":"c"}}') ; +select json_merge('{"a":{"u":12, "x":"b", "r":1}}', '{"a":{"x":"c", "r":2}}') ; + +select json_compact('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}'); +select json_loose('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}'); +select json_detailed('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}'); diff --git a/mysql-test/t/func_like.test b/mysql-test/t/func_like.test index b65bff63298..5026bb76aa3 100644 --- a/mysql-test/t/func_like.test +++ b/mysql-test/t/func_like.test @@ -121,7 +121,7 @@ select _cp1251'andre%' like convert('andre --echo # CREATE TABLE t1(a SET('a') NOT NULL, UNIQUE KEY(a)); CREATE TABLE t2(b INT PRIMARY KEY); -INSERT INTO t1 VALUES (); +INSERT IGNORE INTO t1 VALUES (); INSERT INTO t2 VALUES (1), (2), (3); SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a; DROP TABLE t1, t2; diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 08349f007e1..f1db36d605f 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -529,7 +529,7 @@ as foo; --echo # my_gcvt: Assertion `width > 0 && to != ((void *)0)' failed --echo # CREATE TABLE t1(a char(0)); -INSERT INTO t1 (SELECT -pi()); +INSERT IGNORE INTO t1 (SELECT -pi()); DROP TABLE t1; --echo # diff --git a/mysql-test/t/func_regexp_pcre.test b/mysql-test/t/func_regexp_pcre.test index c9b4c10007d..26294ce2e24 100644 --- a/mysql-test/t/func_regexp_pcre.test +++ b/mysql-test/t/func_regexp_pcre.test @@ -168,6 +168,7 @@ DROP TABLE t1; EXPLAIN EXTENDED SELECT REGEXP_REPLACE('abc','b','x'); # Check decimals +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT REGEXP_REPLACE('abc','b','x')+0; SHOW CREATE TABLE t1; DROP TABLE t1; @@ -343,6 +344,7 @@ DROP TABLE t1; EXPLAIN EXTENDED SELECT REGEXP_SUBSTR('abc','b'); # Check decimals +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT REGEXP_SUBSTR('abc','b')+0; SHOW CREATE TABLE t1; DROP TABLE t1; diff --git a/mysql-test/t/func_set.test b/mysql-test/t/func_set.test index 13f8661db49..47072ba5ffe 100644 --- a/mysql-test/t/func_set.test +++ b/mysql-test/t/func_set.test @@ -90,7 +90,7 @@ drop table t1; CREATE TABLE t1( a SET('a', 'b', 'c') ); CREATE TABLE t2( a SET('a', 'b', 'c') ); -INSERT INTO t1 VALUES ('d'); +INSERT IGNORE INTO t1 VALUES ('d'); INSERT INTO t2 VALUES (''); SELECT CONVERT( a USING latin1 ) FROM t1; diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 48872edcd4b..e039e48a888 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -551,8 +551,8 @@ drop table t1, t2; # create table t1 (c1 INT, c2 INT UNSIGNED); -insert into t1 values ('21474836461','21474836461'); -insert into t1 values ('-21474836461','-21474836461'); +insert ignore into t1 values ('21474836461','21474836461'); +insert ignore into t1 values ('-21474836461','-21474836461'); show warnings; select * from t1; drop table t1; diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 40a6c387448..6e0169d97ca 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -531,7 +531,7 @@ SELECT EXTRACT(HOUR FROM '10000:02:03'); # check if we get proper warnings if both input string truncation # and out-of-range value occur CREATE TABLE t1(f1 TIME); -INSERT INTO t1 VALUES('916:00:00 a'); +INSERT IGNORE INTO t1 VALUES('916:00:00 a'); SELECT * FROM t1; DROP TABLE t1; @@ -1294,6 +1294,7 @@ CREATE TABLE t1 (a DATE); INSERT INTO t1 VALUES ('2005-05-04'); SELECT CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10'))) AS f2 FROM t1; SELECT CHAR_LENGTH(CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10')))) AS f2 FROM t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10'))) AS f2 FROM t1; SHOW CREATE TABLE t2; SELECT * FROM t2; @@ -1672,6 +1673,11 @@ INSERT INTO t1 VALUES (18, '2010-10-13'); SELECT a.id,a.date1,FROM_DAYS(TO_DAYS(a.date1)-10) as date2, DATE_ADD(a.date1,INTERVAL -10 DAY),TO_DAYS(a.date1)-10 FROM t1 a ORDER BY a.id; DROP TABLE t1; +--echo # +--echo # MDEV-10524 Assertion `arg1_int >= 0' failed in Item_func_additive_op::result_precision() +--echo # +SELECT 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2; + --echo # --echo # Start of 10.0 tests diff --git a/mysql-test/t/gis-json.test b/mysql-test/t/gis-json.test new file mode 100644 index 00000000000..645c21bf011 --- /dev/null +++ b/mysql-test/t/gis-json.test @@ -0,0 +1,28 @@ +-- source include/have_geometry.inc + +select st_asgeojson(geomfromtext('POINT(1 1)')); +select st_asgeojson(geomfromtext('LINESTRING(10 10,20 10,20 20,10 20,10 10)')); +select st_asgeojson(geomfromtext('POLYGON((10 10,20 10,20 20,10 20,10 10))')); +select st_asgeojson(geomfromtext('MULTIPOLYGON(((10 10,20 10,20 20,10 20,10 10)))')); +select st_asgeojson(geomfromtext('multilinestring((10 10,20 10,20 20,10 20,10 10))')); +select st_asgeojson(geomfromtext('multipoint(10 10,20 10,20 20,10 20,10 10)')); +select st_asgeojson(st_geomfromtext('GEOMETRYCOLLECTION(POINT(100 0),LINESTRING(101 0,102 1))')); + +SELECT st_astext(st_geomfromgeojson('{"type":"point","coordinates":[1,2]}')); +SELECT st_astext(st_geomfromgeojson('{"type":"LineString","coordinates":[[1,2],[4,5],[7,8]]}')); +SELECT st_astext(st_geomfromgeojson('{"type": "polygon", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}')); +SELECT st_astext(st_geomfromgeojson('{"type":"multipoint","coordinates":[[1,2],[4,5],[7,8]]}')); +SELECT st_astext(st_geomfromgeojson('{"type": "multilinestring", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}')); +SELECT st_astext(st_geomfromgeojson('{"type": "multipolygon", "coordinates": [[[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]]}')); +SELECT st_astext(st_geomfromgeojson('{"type": "GeometryCollection", "geometries": [{"type": "Point","coordinates": [100.0, 0.0]}, {"type": "LineString","coordinates": [[101.0, 0.0],[102.0, 1.0]]}]}')); + +SELECT st_astext(st_geomfromgeojson('{"type":"point"}')); +SELECT st_astext(st_geomfromgeojson('{"type":"point"')); +SELECT st_astext(st_geomfromgeojson('{"type""point"}')); + +SELECT st_astext(st_geomfromgeojson('{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] } }')); +SELECT st_astext(st_geomfromgeojson('{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }]}')); + +--echo # +--echo # End of 10.2 tests +--echo # diff --git a/mysql-test/t/gis-rtree.test b/mysql-test/t/gis-rtree.test index acd91a91c27..a17d691b6f2 100644 --- a/mysql-test/t/gis-rtree.test +++ b/mysql-test/t/gis-rtree.test @@ -169,7 +169,7 @@ CREATE TABLE t1 (st varchar(100)); INSERT INTO t1 VALUES ("Fake string"); CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom)); --error 1416 -INSERT INTO t2 SELECT GeomFromText(st) FROM t1; +INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1; drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -842,7 +842,7 @@ CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ); --error 1048 INSERT INTO t1(foo) VALUES (NULL); --error 1416 -INSERT INTO t1() VALUES (); +INSERT IGNORE INTO t1() VALUES (); --error 1416 INSERT INTO t1(foo) VALUES (''); DROP TABLE t1; diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index a97d8ef4248..acb33c2c115 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -1876,3 +1876,11 @@ INSERT INTO t1 VALUES (0,'foo'),(1,'bar'); SELECT 1 IN ( SELECT COUNT( DISTINCT f2 ) FROM t1 WHERE f1 <= 4 ); drop table t1; +--echo # +--echo # MDEV-10694 - SIGFPE and/or huge memory allocation in maria_create with distinct/group by/ rollup +--echo # +create table t1 (a int,b int) ; +insert into t1 values(-126,7),(1,1),(0,0),(-1,1),(351,65534); +select distinct 1 from t1 group by a,b with rollup limit 1; +drop table t1; + diff --git a/mysql-test/t/having.test b/mysql-test/t/having.test index f826feff5c0..160b347f870 100644 --- a/mysql-test/t/having.test +++ b/mysql-test/t/having.test @@ -365,7 +365,7 @@ select * from t1 a, t1 b group by a.s1 having s1 is null; drop table t1; create table t1 (s1 char character set latin1 collate latin1_german1_ci); -insert into t1 values ('ü'),('y'); +insert ignore into t1 values ('ü'),('y'); select s1,count(s1) from t1 group by s1 collate latin1_swedish_ci having s1 = 'y'; diff --git a/mysql-test/t/help.test b/mysql-test/t/help.test index dc5dc1cee5f..802f24f80a9 100644 --- a/mysql-test/t/help.test +++ b/mysql-test/t/help.test @@ -13,22 +13,22 @@ # impossible_category_3 # impossible_function_7 -insert into mysql.help_category(help_category_id,name)values(10001,'impossible_category_1'); +insert ignore into mysql.help_category(help_category_id,name)values(10001,'impossible_category_1'); select @category1_id:= 10001; -insert into mysql.help_category(help_category_id,name)values(10002,'impossible_category_2'); +insert ignore into mysql.help_category(help_category_id,name)values(10002,'impossible_category_2'); select @category2_id:= 10002; -insert into mysql.help_category(help_category_id,name,parent_category_id)values(10003,'impossible_category_3',@category2_id); +insert ignore into mysql.help_category(help_category_id,name,parent_category_id)values(10003,'impossible_category_3',@category2_id); select @category3_id:= 10003; -insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10101,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1'); +insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10101,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1'); select @topic1_id:= 10101; -insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10102,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2'); +insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10102,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2'); select @topic2_id:= 10102; -insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10103,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3'); +insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10103,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3'); select @topic3_id:= 10103; -insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10104,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4'); +insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10104,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4'); select @topic4_id:= 10104; -insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10105,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7'); +insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10105,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7'); select @topic5_id:= 10105; insert into mysql.help_keyword(help_keyword_id,name)values(10201,'impossible_function_1'); diff --git a/mysql-test/t/index_merge_innodb.test b/mysql-test/t/index_merge_innodb.test index 3a2601342ba..53ce3114b49 100644 --- a/mysql-test/t/index_merge_innodb.test +++ b/mysql-test/t/index_merge_innodb.test @@ -171,6 +171,37 @@ WHERE ( tb.b != ta.b OR tb.a = ta.a ) AND ( tb.b = ta.c OR tb.b = ta.b ); DROP TABLE t1; - set optimizer_switch= @optimizer_switch_save; +--echo # +--echo # MDEV-10927: Crash When Using sort_union Optimization +--echo # + +set @tmp_optimizer_switch=@@optimizer_switch; +SET optimizer_switch='index_merge_sort_intersection=on'; +SET SESSION sort_buffer_size = 1024; + +create table t1 ( +pk int(11) NOT NULL AUTO_INCREMENT, +col1 int(11) NOT NULL, +col2 int(11) NOT NULL, +col3 int(11) NOT NULL, +key2 int(11) NOT NULL, +col4 int(11) NOT NULL, +key1 int(11) NOT NULL, +PRIMARY KEY (pk), +KEY key1 (key1), +KEY key2 (key2) +) ENGINE=InnoDB AUTO_INCREMENT=12860259 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; + +create table t2(a int); +insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t3(a int); +insert into t3 select A.a + B.a* 10 + C.a * 100 + D.a*1000 from t2 A, t2 B, t2 C, t2 D; + +insert into t1 (key1, key2, col1,col2,col3,col4) +select a,a, a,a,a,a from t3; +SELECT sum(col1) FROM t1 FORCE INDEX (key1,key2) WHERE (key1 between 10 and 8191+10) or (key2= 5); +drop table t1,t2,t3; +set optimizer_switch=@tmp_optimizer_switch; diff --git a/mysql-test/t/information_schema_part.test b/mysql-test/t/information_schema_part.test index f1415d12f79..ea88f364c07 100644 --- a/mysql-test/t/information_schema_part.test +++ b/mysql-test/t/information_schema_part.test @@ -131,3 +131,10 @@ drop table if exists t1; create table t1 (f1 int key) partition by key(f1) partitions 2; select create_options from information_schema.tables where table_schema="test"; drop table t1; + +--echo # +--echo # MDEV-11353 - Identical logical conditions +--echo # +CREATE TABLE t1(a INT) CHECKSUM=1 SELECT 1; +SELECT CHECKSUM FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'; +DROP TABLE t1; diff --git a/mysql-test/t/innodb_mysql_lock.test b/mysql-test/t/innodb_mysql_lock.test index 39ea7e5df88..24ace437c50 100644 --- a/mysql-test/t/innodb_mysql_lock.test +++ b/mysql-test/t/innodb_mysql_lock.test @@ -7,6 +7,8 @@ set @old_innodb_lock_wait_timeout=@@global.innodb_lock_wait_timeout; set global innodb_lock_wait_timeout=300; set session innodb_lock_wait_timeout=300; +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); + --echo # --echo # Bug #22876 Four-way deadlock --echo # diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test index 2d95dffa17a..206c5553100 100644 --- a/mysql-test/t/insert.test +++ b/mysql-test/t/insert.test @@ -98,23 +98,23 @@ use test; create table t1(number int auto_increment primary key, original_value varchar(50), f_double double, f_float float, f_double_7_2 double(7,2), f_float_4_3 float (4,3), f_double_u double unsigned, f_float_u float unsigned, f_double_15_1_u double(15,1) unsigned, f_float_3_1_u float (3,1) unsigned); set @value= "aa"; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); --query_vertical select * from t1 where number =last_insert_id() set @value= "1aa"; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); --query_vertical select * from t1 where number =last_insert_id() set @value= "aa1"; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); --query_vertical select * from t1 where number =last_insert_id() set @value= "1e+1111111111a"; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); --query_vertical select * from t1 where number =last_insert_id() set @value= "-1e+1111111111a"; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); --query_vertical select * from t1 where number =last_insert_id() --error 1367 @@ -124,11 +124,11 @@ set @value= -1e+1111111111; set @value= 1e+111; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); --query_vertical select * from t1 where number =last_insert_id() set @value= -1e+111; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); --query_vertical select * from t1 where number =last_insert_id() set @value= 1; @@ -136,7 +136,7 @@ insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@val --query_vertical select * from t1 where number =last_insert_id() set @value= -1; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); --query_vertical select * from t1 where number =last_insert_id() drop table t1; @@ -404,7 +404,7 @@ CREATE TABLE t1 ( ); INSERT INTO t1(a,b,c) VALUES (9.999999e+0, 9.999999e+0, 9.999e+0); -INSERT INTO t1(a,b,c) VALUES (1.225e-05, 1.225e-05, 1.225e-05); +INSERT IGNORE INTO t1(a,b,c) VALUES (1.225e-05, 1.225e-05, 1.225e-05); INSERT INTO t1(a,b) VALUES (1.225e-04, 1.225e-04); INSERT INTO t1(a,b) VALUES (1.225e-01, 1.225e-01); INSERT INTO t1(a,b) VALUES (1.225877e-01, 1.225877e-01); @@ -421,7 +421,7 @@ INSERT INTO t1(a,b) VALUES (1.25e-175, 1.25e-175); INSERT INTO t1(a,c) VALUES (1.225e+0, 1.225e+0); INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0); INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0); -INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3); +INSERT IGNORE INTO t1(a,c) VALUES (1.87e-3, 1.87e-3); INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2); INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0); INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0); diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test index bcd87c2688d..fda89f18d99 100644 --- a/mysql-test/t/insert_select.test +++ b/mysql-test/t/insert_select.test @@ -145,7 +145,7 @@ Select null, Field, Count From t1 Where Month=20030901 and Type=2; create table t2(No int not null, Field int not null, Count int not null); -insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2; +insert ignore into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2; select * from t2; @@ -329,11 +329,13 @@ DROP TABLE t1, t2; # Bug#44306: Assertion fail on duplicate key error in 'INSERT ... SELECT' # statements # +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1 ( a INT KEY, b INT ); INSERT INTO t1 VALUES ( 0, 1 ); --error ER_DUP_ENTRY INSERT INTO t1 ( b ) SELECT MAX( b ) FROM t1 WHERE b = 2; DROP TABLE t1; +SET sql_mode = DEFAULT; # # Bug #26207: inserts don't work with shortened index diff --git a/mysql-test/t/insert_update.test b/mysql-test/t/insert_update.test index de38ae0b0d3..7234973eeb8 100644 --- a/mysql-test/t/insert_update.test +++ b/mysql-test/t/insert_update.test @@ -170,6 +170,7 @@ DROP TABLE t1,t2; SET SQL_MODE = 'TRADITIONAL'; CREATE TABLE t1 (a INT PRIMARY KEY, b INT NOT NULL); +INSERT INTO t1 VALUES (1,1); --error ER_NO_DEFAULT_FOR_FIELD INSERT INTO t1 (a) VALUES (1); @@ -177,7 +178,10 @@ INSERT INTO t1 (a) VALUES (1); --error ER_NO_DEFAULT_FOR_FIELD INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE a = b; ---error ER_NO_DEFAULT_FOR_FIELD +# this one is ok +INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE b = a; + +# arguably the statement below should fail INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE b = b; SELECT * FROM t1; diff --git a/mysql-test/t/join_cache.test b/mysql-test/t/join_cache.test index 019d8edde2f..009e72c1c14 100644 --- a/mysql-test/t/join_cache.test +++ b/mysql-test/t/join_cache.test @@ -3587,8 +3587,8 @@ set optimizer_switch=@tmp_optimizer_switch; DROP TABLE t1,t2,t3; --echo # ---echo # Bug #925985: LEFT JOIN with optimize_join_buffer_size=off + ---echo # join_buffer_size > join_buffer_space_limit +--echo # lp:925985 LEFT JOIN with optimize_join_buffer_size=off + +--echo # join_buffer_size > join_buffer_space_limit --echo # CREATE TABLE t1 (a int); @@ -3742,9 +3742,11 @@ FROM LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val" LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val" LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val" + LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val" + LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val" ORDER BY col1; -select timestampdiff(second, @init_time, now()) <= 1; +select timestampdiff(second, @init_time, now()) <= 5; set join_cache_level=2; @@ -3777,9 +3779,11 @@ FROM LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val" LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val" LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val" + LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val" + LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val" ORDER BY col1; -select timestampdiff(second, @init_time, now()) <= 1; +select timestampdiff(second, @init_time, now()) <= 5; EXPLAIN SELECT t.* @@ -3810,6 +3814,8 @@ FROM LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val" LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val" LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val" + LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val" + LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val" ORDER BY col1; diff --git a/mysql-test/t/join_outer_innodb.test b/mysql-test/t/join_outer_innodb.test index 539d85a8b11..fe08689c80b 100644 --- a/mysql-test/t/join_outer_innodb.test +++ b/mysql-test/t/join_outer_innodb.test @@ -155,7 +155,7 @@ CREATE TABLE t1 ( PRIMARY KEY (a1), KEY a2 (a2), KEY a3 (a3), KEY a4 (a4), KEY a6 (a6), KEY a5 (a5), KEY a7 (a7), KEY a8 (a8), KEY a9 (a9) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -INSERT INTO t1 VALUES +INSERT IGNORE INTO t1 VALUES (3360,5684,2219,1,316832,1,0,NULL,NULL,NULL), (3362,2754,597,2,316844,1,0,NULL,NULL,NULL), (3363,369,NULL,1,317295,1,0,NULL,NULL,NULL); diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test index e2697effeb6..0695dc2eecb 100644 --- a/mysql-test/t/key.test +++ b/mysql-test/t/key.test @@ -46,7 +46,7 @@ CREATE TABLE t1 ( INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','N','N','N','N'); INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','N','N','N','N'); -INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','','','',''); +INSERT IGNORE INTO t1 VALUES (900,'Vancouver','Shared/Roomate','','','',''); INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y'); INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y'); INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y'); @@ -184,7 +184,7 @@ drop table t1; CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT, UNIQUE (c,i)); -INSERT INTO t1 (c) VALUES (NULL),(NULL); +INSERT IGNORE INTO t1 (c) VALUES (NULL),(NULL); SELECT * FROM t1; INSERT INTO t1 (c) VALUES ('a'),('a'); SELECT * FROM t1; @@ -201,8 +201,8 @@ drop table t1; # longer keys # create table t1 (i int, a char(200), b text, unique (a), unique (b(300))) charset utf8; -insert t1 values (1, repeat('a',210), repeat('b', 310)); -insert t1 values (2, repeat(0xD0B1,215), repeat(0xD0B1, 310)); +insert ignore t1 values (1, repeat('a',210), repeat('b', 310)); +insert ignore t1 values (2, repeat(0xD0B1,215), repeat(0xD0B1, 310)); select i, length(a), length(b), char_length(a), char_length(b) from t1; select i from t1 where a=repeat(_utf8 'a',200); select i from t1 where a=repeat(_utf8 0xD0B1,200); diff --git a/mysql-test/t/keywords.test b/mysql-test/t/keywords.test index 40beee9e3c1..5c4c813ab39 100644 --- a/mysql-test/t/keywords.test +++ b/mysql-test/t/keywords.test @@ -174,6 +174,46 @@ set option=1; --error 1193 set option option=1; +--echo # +--echo # MDEV-9979 Keywords UNBOUNDED, PRECEDING, FOLLOWING, TIES, OTHERS should be non-reserved +--echo # +CREATE TABLE EXCLUDE (EXCLUDE INT); +SELECT EXCLUDE FROM EXCLUDE; +SELECT EXCLUDE EXCLUDE FROM EXCLUDE; +SELECT EXCLUDE AS EXCLUDE FROM EXCLUDE; +DROP TABLE EXCLUDE; + +CREATE TABLE UNBOUNDED (UNBOUNDED INT); +SELECT UNBOUNDED FROM UNBOUNDED; +SELECT UNBOUNDED UNBOUNDEX FROM UNBOUNDED; +SELECT UNBOUNDED AS UNBOUNDEX FROM UNBOUNDED; +DROP TABLE UNBOUNDED; + +CREATE TABLE PRECEDING (PRECEDING INT); +SELECT PRECEDING FROM PRECEDING; +SELECT PRECEDING PRECEDING FROM PRECEDING; +SELECT PRECEDING AS PRECEDING FROM PRECEDING; +DROP TABLE PRECEDING; + +CREATE TABLE FOLLOWING (FOLLOWING INT); +SELECT FOLLOWING FROM FOLLOWING; +SELECT FOLLOWING FOLLOWING FROM FOLLOWING; +SELECT FOLLOWING AS FOLLOWING FROM FOLLOWING; +DROP TABLE FOLLOWING; + +CREATE TABLE TIES (TIES INT); +SELECT TIES FROM TIES; +SELECT TIES TIES FROM TIES; +SELECT TIES AS TIES FROM TIES; +DROP TABLE TIES; + +CREATE TABLE OTHERS (OTHERS INT); +SELECT OTHERS FROM OTHERS; +SELECT OTHERS OTHERS FROM OTHERS; +SELECT OTHERS AS OTHERS FROM OTHERS; +DROP TABLE OTHERS; + + --echo # --echo # MDEV-10585 EXECUTE IMMEDIATE statement --echo # diff --git a/mysql-test/t/limit_rows_examined.test b/mysql-test/t/limit_rows_examined.test index 3f7424d5541..29b3b411602 100644 --- a/mysql-test/t/limit_rows_examined.test +++ b/mysql-test/t/limit_rows_examined.test @@ -2,6 +2,8 @@ # Tests for LIMIT ROWS EXAMINED, MDEV-28 # +call mtr.add_suppression("Sort aborted.*"); + set @save_join_cache_level = @@join_cache_level; create table t1 (c1 char(2)); @@ -393,7 +395,7 @@ drop table t3,t3i; --echo INSERT ... SELECT CREATE TABLE t4 (a int); INSERT INTO t4 values (1), (2); -INSERT INTO t4 SELECT a + 2 FROM t4 LIMIT ROWS EXAMINED 0; +INSERT IGNORE INTO t4 SELECT a + 2 FROM t4 LIMIT ROWS EXAMINED 0; select * from t4; INSERT INTO t4 SELECT a + 2 FROM t4 LIMIT ROWS EXAMINED 6; select * from t4; diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 7e529194303..88c4a363a57 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -9,12 +9,12 @@ drop table if exists t1, t2; --enable_warnings create table t1 (a date, b date, c date not null, d date); -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ','; load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; SELECT * from t1; truncate table t1; -load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); SELECT * from t1; drop table t1; @@ -129,7 +129,7 @@ select * from t1; select @a, @b; truncate table t1; # Reading of all columns with set -load data infile '../../std_data/rpl_loaddata.dat' into table t1 set c=b; +load data infile '../../std_data/rpl_loaddata.dat' ignore into table t1 set c=b; select * from t1; truncate table t1; # now going to test fixed field-row file format @@ -198,7 +198,7 @@ create table t2(f1 int); insert into t2 values(1),(2); disable_query_log; eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2; -eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1; +eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1; enable_query_log; select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1; remove_file $MYSQLTEST_VARDIR/tmp/t2; @@ -207,7 +207,7 @@ disable_query_log; eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t2' FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n' FROM t2; -eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1 +eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1 FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'; enable_query_log; select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1; @@ -612,7 +612,7 @@ disconnect con1; --echo # CREATE TABLE t1(f1 INT); -EVAL SELECT 0xE1C330 INTO OUTFILE 't1.dat'; +EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat'; --disable_warnings LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8; --enable_warnings @@ -658,27 +658,21 @@ SET @@sql_mode= @old_mode; --remove_file $MYSQLTEST_VARDIR/mysql DROP TABLE t1; ---echo + --echo # ---echo # Bug#23080148 - Backport of Bug#20683959. ---echo # Bug#20683959 LOAD DATA INFILE IGNORES A SPECIFIC ROW SILENTLY ---echo # UNDER DB CHARSET IS UTF8. +--echo # MDEV-11079 Regression: LOAD DATA INFILE lost BLOB support using utf8 load files --echo # -CREATE DATABASE d1 CHARSET latin1; -USE d1; -CREATE TABLE t1 (val TEXT); -LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1; -SELECT COUNT(*) FROM t1; -SELECT HEX(val) FROM t1; +CREATE TABLE t1 (a mediumblob NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +LOAD DATA INFILE '../../std_data/loaddata/mdev-11079.txt' INTO TABLE t1 CHARSET utf8 FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n'; +SELECT HEX(a) FROM t1; +DROP TABLE t1; -CREATE DATABASE d2 CHARSET utf8; -USE d2; -CREATE TABLE t1 (val TEXT); -LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1; -SELECT COUNT(*) FROM t1; -SELECT HEX(val) FROM t1; +--echo # +--echo # MDEV-11631 LOAD DATA INFILE fails to load data with an escape character followed by a multi-byte character +--echo # -DROP TABLE d1.t1, d2.t1; -DROP DATABASE d1; -DROP DATABASE d2; +CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8); +LOAD DATA INFILE '../../std_data/loaddata/mdev-11631.txt' INTO TABLE t1 CHARACTER SET utf8; +SELECT HEX(a) FROM t1; +DROP TABLE t1; diff --git a/mysql-test/t/log_slow.test b/mysql-test/t/log_slow.test index 8d5a09d7a94..56e35bd5a20 100644 --- a/mysql-test/t/log_slow.test +++ b/mysql-test/t/log_slow.test @@ -50,7 +50,6 @@ set global slow_query_log=1; set global log_output='TABLE'; select sleep(0.5); select count(*) FROM mysql.slow_log; -truncate mysql.slow_log; # Reset used variables set @@long_query_time=default; @@ -58,3 +57,4 @@ set global slow_query_log= @org_slow_query_log; set @@log_slow_filter=default; set @@log_slow_verbosity=default; set global log_output= default; +truncate mysql.slow_log; diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test index 68e06dfa042..5a08b8015f0 100644 --- a/mysql-test/t/log_state.test +++ b/mysql-test/t/log_state.test @@ -4,6 +4,8 @@ --source include/not_embedded.inc --source include/have_csv.inc +call mtr.add_suppression("options .* --log_slow_queries is not set"); + # Several subtests modify global variables. Save the initial values only here, # but reset to the initial values per subtest. SET @old_general_log= @@global.general_log; diff --git a/mysql-test/t/mdev-504.test b/mysql-test/t/mdev-504.test index fb5c7666d33..76232927cd9 100644 --- a/mysql-test/t/mdev-504.test +++ b/mysql-test/t/mdev-504.test @@ -1,3 +1,4 @@ +--source include/not_valgrind.inc --disable_ps_protocol SET GLOBAL net_write_timeout = 900; @@ -50,7 +51,7 @@ while ($trial) let $query = `SELECT CASE rnd3() WHEN 1 THEN 'INSERT INTO A (pk) VALUES (NULL)' WHEN 2 THEN 'DELETE FROM A LIMIT 1' - ELSE 'UPDATE A SET fdate = 2 LIMIT 1' END`; + ELSE 'UPDATE IGNORE A SET fdate = 2 LIMIT 1' END`; --eval $query --disconnect con3 --dec $run diff --git a/mysql-test/t/mix2_myisam.test b/mysql-test/t/mix2_myisam.test index afb3caca0ea..97195130967 100644 --- a/mysql-test/t/mix2_myisam.test +++ b/mysql-test/t/mix2_myisam.test @@ -3,6 +3,9 @@ # Last update: 2006-07-26 ML create this test as derivate from innodb.test # +# Generated by an ALTER TABLE in include/mix2.inc +call mtr.add_suppression("Can't find record in .*"); + let $engine_type= MyISAM; let $other_engine_type= MEMORY; # There are unfortunately only MyISAM and MEMORY all time available diff --git a/mysql-test/t/mrr_icp_extra.test b/mysql-test/t/mrr_icp_extra.test index f1b21154449..75ddc85b984 100644 --- a/mysql-test/t/mrr_icp_extra.test +++ b/mysql-test/t/mrr_icp_extra.test @@ -1,4 +1,7 @@ +# Generated by an ALTER TABLE in include/varchar.inc +call mtr.add_suppression("Can't find record in .*"); + set @mrr_icp_extra_tmp=@@optimizer_switch; set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on'; SET NAMES latin1; diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index 4e09b2370f5..64e61f7c0b5 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -616,9 +616,9 @@ SET SESSION sql_safe_updates = DEFAULT; CREATE FUNCTION f1 () RETURNS BLOB RETURN 1; CREATE TABLE t1 (f1 DATE); INSERT INTO t1 VALUES('2001-01-01'); -UPDATE (SELECT 1 FROM t1 WHERE f1 = (SELECT f1() FROM t1)) x, t1 SET f1 = 1; +UPDATE IGNORE (SELECT 1 FROM t1 WHERE f1 = (SELECT f1() FROM t1)) x, t1 SET f1 = 1; CREATE view v1 as SELECT f1() FROM t1; -UPDATE (SELECT 1 FROM t1 WHERE f1 = (select * from v1)) x, t1 SET f1 = 1; +UPDATE IGNORE (SELECT 1 FROM t1 WHERE f1 = (select * from v1)) x, t1 SET f1 = 1; DROP VIEW v1; DROP FUNCTION f1; DROP TABLE t1; diff --git a/mysql-test/t/myisam-blob.test b/mysql-test/t/myisam-blob.test index ac1b45b8c6c..23de8d54ee7 100644 --- a/mysql-test/t/myisam-blob.test +++ b/mysql-test/t/myisam-blob.test @@ -30,13 +30,14 @@ check table t1; INSERT INTO t1 set data=repeat('a',18*1024*1024); select length(data) from t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify data blob; select length(data) from t1; drop table t1; CREATE TABLE t1 (data BLOB) ENGINE=myisam; INSERT INTO t1 (data) VALUES (NULL); -UPDATE t1 set data=repeat('a',18*1024*1024); +UPDATE IGNORE t1 set data=repeat('a',18*1024*1024); select length(data) from t1; drop table t1; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index a454fa25ac4..572fa55e70f 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -2,6 +2,9 @@ # Test bugs in the MyISAM code # +call mtr.add_suppression("Can't find record in '.*'"); +call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); + # Initialise --disable_warnings drop table if exists t1,t2,t3; @@ -39,7 +42,7 @@ begin; SET SQL_WARNINGS=0; while ($1) { - eval insert into t1 (b) values(repeat(char(65+$1),65550-$1)); + eval insert ignore into t1 (b) values(repeat(char(65+$1),65550-$1)); dec $1; } commit; @@ -310,6 +313,7 @@ drop table t1; # # Test of REPAIR that once failed # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE `t1` ( `post_id` mediumint(8) unsigned NOT NULL auto_increment, `topic_id` mediumint(8) unsigned NOT NULL default '0', @@ -328,7 +332,7 @@ CREATE TABLE `t1` ( FULLTEXT KEY `post_text` (`post_text`) ) ENGINE=MyISAM; -INSERT INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'); +INSERT IGNORE INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'); REPAIR TABLE t1; CHECK TABLE t1; @@ -1024,9 +1028,11 @@ source include/varchar.inc; create table t1 (v varchar(65530), key(v)); drop table if exists t1; +set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for create table t1 (v varchar(65536)); show create table t1; drop table t1; +set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for create table t1 (v varchar(65530) character set utf8); show create table t1; drop table t1; diff --git a/mysql-test/t/myisam_enable_keys-10506.test b/mysql-test/t/myisam_enable_keys-10506.test index 8e1c058c3f0..33eb973c402 100644 --- a/mysql-test/t/myisam_enable_keys-10506.test +++ b/mysql-test/t/myisam_enable_keys-10506.test @@ -1,6 +1,9 @@ # # MDEV-10506 Protocol::end_statement(): Assertion `0' failed upon ALTER TABLE # + +call mtr.add_suppression("Can't find record in '.*'"); + CREATE TABLE t1 ( pk INT AUTO_INCREMENT, i INT, diff --git a/mysql-test/t/myisam_recover.test b/mysql-test/t/myisam_recover.test index 0c686e59fb1..86a4d16d0f9 100644 --- a/mysql-test/t/myisam_recover.test +++ b/mysql-test/t/myisam_recover.test @@ -1,5 +1,7 @@ --source include/count_sessions.inc +call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); + --echo # --echo # Tests for corrupted MyISAM tables and MyISAMMRG tables with corrupted --echo # children.. diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 299698ed04b..090ed45c9f9 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -58,7 +58,7 @@ DROP TABLE t1; --echo # CREATE TABLE t1 (a double); -INSERT INTO t1 VALUES ('-9e999999'); +INSERT IGNORE INTO t1 VALUES ('-9e999999'); --exec $MYSQL_DUMP --compact test t1 DROP TABLE t1; diff --git a/mysql-test/t/mysqlslap.opt b/mysql-test/t/mysqlslap.opt new file mode 100644 index 00000000000..632f5b4c069 --- /dev/null +++ b/mysql-test/t/mysqlslap.opt @@ -0,0 +1 @@ +--sql_mode='NO_ENGINE_SUBSTITUTION' diff --git a/mysql-test/t/no_password_column-mdev-11170.test b/mysql-test/t/no_password_column-mdev-11170.test new file mode 100644 index 00000000000..2cc4ba82ee8 --- /dev/null +++ b/mysql-test/t/no_password_column-mdev-11170.test @@ -0,0 +1,95 @@ +--source include/not_embedded.inc +--echo # +--echo # MDEV-11170: MariaDB 10.2 cannot start on MySQL 5.7 datadir: +--echo # Fatal error: mysql.user table is damaged or in +--echo # unsupported 3.20 format +--echo # + + +create table backup_user like mysql.user; +insert into backup_user select * from mysql.user; + +--echo # +--echo # Original mysql.user table +--echo # +describe mysql.user; + +--echo # +--echo # Drop the password column. +--echo # +alter table mysql.user drop column password; +flush privileges; + +--echo # +--echo # Create users without the password column present. +--echo # +create user foo; +create user goo identified by "foo"; +select OLD_PASSWORD("ioo"); +create user ioo identified with "mysql_old_password" as "7a8f886d28473e85"; + +--echo # +--echo # Check if users have grants loaded correctly. +--echo # +show grants for foo; +show grants for goo; +show grants for ioo; + +select user, host, select_priv, plugin, authentication_string from mysql.user +where user like "%oo" +order by user; + +--echo # +--echo # Test setting password. +--echo # +SET PASSWORD FOR foo=PASSWORD("bar"); + +show grants for foo; +show grants for goo; +show grants for ioo; + +select user, host, select_priv, plugin, authentication_string from mysql.user +where user like "%oo" +order by user; + +--echo # +--echo # Test flush privileges without password column. +--echo # +flush privileges; +show grants for foo; +show grants for goo; +show grants for ioo; + +--echo # +--echo # Test granting of privileges. +--echo # +grant select on *.* to foo; +grant select on *.* to goo; +grant select on *.* to ioo; +show grants for foo; +show grants for goo; +show grants for ioo; + +--echo # +--echo # Check to see if grants are stable on flush. +--echo # +flush privileges; +show grants for foo; +show grants for goo; +show grants for ioo; + +--echo # +--echo # Check internal table representation. +--echo # +select user, host, select_priv, plugin, authentication_string from mysql.user +where user like "%oo" +order by user; + + +--echo # +--echo # Reset to final original state. +--echo # +drop table mysql.user; +rename table backup_user to mysql.user; + +flush privileges; diff --git a/mysql-test/t/null.test b/mysql-test/t/null.test index 072038fae50..3de35a74a73 100644 --- a/mysql-test/t/null.test +++ b/mysql-test/t/null.test @@ -61,29 +61,29 @@ drop table t1; # Test inserting and updating with NULL # CREATE TABLE t1 (a varchar(16) NOT NULL default '', b smallint(6) NOT NULL default 0, c datetime NOT NULL default '0000-00-00 00:00:00', d smallint(6) NOT NULL default 0); -INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55"; -UPDATE t1 SET d=1/NULL; -UPDATE t1 SET d=NULL; +INSERT IGNORE INTO t1 SET a = "", d= "2003-01-14 03:54:55"; +UPDATE IGNORE t1 SET d=1/NULL; +UPDATE IGNORE t1 SET d=NULL; --error 1048 INSERT INTO t1 (a) values (null); --error 1048 INSERT INTO t1 (a) values (1/null); -INSERT INTO t1 (a) values (null),(null); +INSERT IGNORE INTO t1 (a) values (null),(null); --error 1048 INSERT INTO t1 (b) values (null); --error 1048 INSERT INTO t1 (b) values (1/null); -INSERT INTO t1 (b) values (null),(null); +INSERT IGNORE INTO t1 (b) values (null),(null); --error 1048 INSERT INTO t1 (c) values (null); --error 1048 INSERT INTO t1 (c) values (1/null); -INSERT INTO t1 (c) values (null),(null); +INSERT IGNORE INTO t1 (c) values (null),(null); --error 1048 INSERT INTO t1 (d) values (null); --error 1048 INSERT INTO t1 (d) values (1/null); -INSERT INTO t1 (d) values (null),(null); +INSERT IGNORE INTO t1 (d) values (null),(null); select * from t1; drop table t1; @@ -118,6 +118,7 @@ insert into t1 select i*2 from t1; insert into t1 values(null); explain select * from t1 where i=2 or i is null; select count(*) from t1 where i=2 or i is null; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 change i i int not null; explain select * from t1 where i=2 or i is null; select count(*) from t1 where i=2 or i is null; @@ -335,6 +336,7 @@ DROP TABLE t1,t2; --error ER_CANT_AGGREGATE_2COLLATIONS SELECT NULLIF(_latin1'a' COLLATE latin1_general_ci, _latin1'a' COLLATE latin1_bin); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT NULLIF(1,1), NULLIF(1,1.0), @@ -344,6 +346,7 @@ CREATE TABLE t1 AS SELECT SHOW CREATE TABLE t1; DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT NULLIF(1.0,1), NULLIF(1.0,1.0), @@ -353,6 +356,7 @@ CREATE TABLE t1 AS SELECT SHOW CREATE TABLE t1; DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT NULLIF(1e0,1), NULLIF(1e0,1.0), @@ -371,6 +375,7 @@ CREATE TABLE t1 AS SELECT SHOW CREATE TABLE t1; DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT NULLIF(TIMESTAMP'2001-01-01 00:00:00',1), NULLIF(TIMESTAMP'2001-01-01 00:00:00',1.0), @@ -380,6 +385,7 @@ CREATE TABLE t1 AS SELECT SHOW CREATE TABLE t1; DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT NULLIF(DATE'2001-01-01',1), NULLIF(DATE'2001-01-01',1.0), @@ -862,6 +868,7 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=2010 AND CASE WHEN 10.1=a THEN NULL EL DROP TABLE t1; --echo # Two warnings expected +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT NULLIF(TIMESTAMP'2001-01-01 00:00:00',1) AS a, CASE WHEN TIMESTAMP'2001-01-01 00:00:00'=1 THEN NULL diff --git a/mysql-test/t/null_key.test b/mysql-test/t/null_key.test index 695b2835610..c3ebc6f5b94 100644 --- a/mysql-test/t/null_key.test +++ b/mysql-test/t/null_key.test @@ -183,7 +183,7 @@ create table t1 ( index (id), index (id2) ); -insert into t1 values(null,null),(1,1); +insert ignore into t1 values(null,null),(1,1); select * from t1; select * from t1 where id <=> null; select * from t1 where id <=> null or id > 0; diff --git a/mysql-test/t/old-mode.test b/mysql-test/t/old-mode.test index 0572570d122..b9012a96713 100644 --- a/mysql-test/t/old-mode.test +++ b/mysql-test/t/old-mode.test @@ -34,15 +34,15 @@ SELECT CAST(TIME'-10:30:30' AS DATETIME); SELECT CAST(TIME'10:20:30' AS DATETIME); SELECT CAST(TIME'830:20:30' AS DATETIME); CREATE TABLE t1 (a DATETIME); -INSERT INTO t1 VALUES (TIME'-10:20:30'); +INSERT IGNORE INTO t1 VALUES (TIME'-10:20:30'); INSERT INTO t1 VALUES (TIME'10:20:30'); INSERT INTO t1 VALUES (TIME'830:20:30'); SELECT * FROM t1; DROP TABLE t1; CREATE TABLE t1 (a TIMESTAMP); -INSERT INTO t1 VALUES (TIME'-10:20:30'); -INSERT INTO t1 VALUES (TIME'10:20:30'); -INSERT INTO t1 VALUES (TIME'830:20:30'); +INSERT IGNORE INTO t1 VALUES (TIME'-10:20:30'); +INSERT IGNORE INTO t1 VALUES (TIME'10:20:30'); +INSERT IGNORE INTO t1 VALUES (TIME'830:20:30'); SELECT * FROM t1; DROP TABLE t1; CREATE TABLE t1 (a TIME); diff --git a/mysql-test/t/order_by-mdev-10122.test b/mysql-test/t/order_by-mdev-10122.test new file mode 100644 index 00000000000..2520e6487ac --- /dev/null +++ b/mysql-test/t/order_by-mdev-10122.test @@ -0,0 +1,39 @@ +--echo # +--echo # MariaDB does not support group functions in some contexts where MySQL does +--echo # +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (10),(20),(30); + +--echo # All these queries must pass, not returning "Invalid use of group function". +(SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)); +(SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) LIMIT 1; +(SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)); +(SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)) LIMIT 1; + +(SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) ORDER BY a; +(SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) ORDER BY a LIMIT 1; +(SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)) ORDER BY a; +(SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)) ORDER BY a LIMIT 1; +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)); +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) LIMIT 1; +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) ORDER BY a; +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) ORDER BY a LIMIT 1; +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)); +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)) LIMIT 1; +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)) ORDER BY a; +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,GROUP_CONCAT(a)) ORDER BY a LIMIT 1; + +(SELECT a FROM t1 GROUP BY a ORDER BY MAX(a)) ORDER BY a; +(SELECT a FROM t1 GROUP BY a ORDER BY MAX(a)) ORDER BY a LIMIT 1; +(SELECT a FROM t1 GROUP BY a ORDER BY a,MAX(a)) ORDER BY a; +(SELECT a FROM t1 GROUP BY a ORDER BY a,MAX(a)) ORDER BY a LIMIT 1; +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY MAX(a)); +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY MAX(a)) LIMIT 1; +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY MAX(a)) ORDER BY a; +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY MAX(a)) ORDER BY a LIMIT 1; +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,MAX(a)); +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,MAX(a)) LIMIT 1; +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,MAX(a)) ORDER BY a; +SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY a,MAX(a)) ORDER BY a LIMIT 1; + +drop table t1; diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index 13c8db5a481..92c7cdf44b6 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -2,6 +2,8 @@ # Testing ORDER BY # +call mtr.add_suppression("Sort aborted.*"); + --disable_warnings drop table if exists t1,t2,t3; --enable_warnings @@ -269,6 +271,7 @@ select * from t1 where a = 1 order by b desc; # Test things when we don't have NULL keys # +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify b int not null, modify c varchar(10) not null; explain select * from t1 order by a, b, c; select * from t1 order by a, b, c; @@ -1945,6 +1948,16 @@ order by A.col2, B.col2 limit 10, 1000000; drop table t1,t2,t3; +--echo # +--echo # mdev-10705 : long order by list that can be skipped +--echo # + +SELECT 1 +UNION +( SELECT 2 + ORDER BY NULL, @a0 := 3, @a1 := 3, @a2 := 3, @a3 := 3, @a4 := 3, + @a5 := 3, @a6 := 3, @a7 := 3, @a8 := 3, @a9 := 3, @a10 := 3 ); + --echo End of 5.5 tests --echo # diff --git a/mysql-test/t/order_by_zerolength-4285.test b/mysql-test/t/order_by_zerolength-4285.test index 2fb58edd36d..079ce8da71e 100644 --- a/mysql-test/t/order_by_zerolength-4285.test +++ b/mysql-test/t/order_by_zerolength-4285.test @@ -3,6 +3,13 @@ # create table t1 (pk int primary key); insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t1 order by now(), cast(pk as char(0)); -drop table t1; +# In strict mode the query produces result in a different order +# (not ordered implicitly by PK and indeterministic), so we force sorting. +# However, sorting also affects warnings, so we'll check them separately. +--disable_warnings +--sorted_result +select * from t1 order by now(), cast(pk as char(0)); +--enable_warnings +show warnings; +drop table t1; diff --git a/mysql-test/t/parser.test b/mysql-test/t/parser.test index 1fa7df7fc3d..a29a2f14d25 100644 --- a/mysql-test/t/parser.test +++ b/mysql-test/t/parser.test @@ -1091,13 +1091,9 @@ INSERT INTO t1 VALUES (10),(20),(30); SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a ORDER BY a) LIMIT 2); ---error ER_INVALID_GROUP_FUNC_USE SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)); ---error ER_INVALID_GROUP_FUNC_USE SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) LIMIT 1; ---error ER_INVALID_GROUP_FUNC_USE SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) ORDER BY a; ---error ER_INVALID_GROUP_FUNC_USE SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a ORDER BY GROUP_CONCAT(a)) ORDER BY a LIMIT 1; DROP TABLE t1; @@ -1321,3 +1317,23 @@ UNION SELECT 1; DROP TABLE t1; + +# +# MDEV-11582 InnoDB: Failing assertion: !((field)->vcol_info && !(field)->stored_in_db()) +# +--error ER_PARSE_ERROR +create table t1 (a serial null); +--error ER_PARSE_ERROR +create table t1 (a serial auto_increment); +--error ER_PARSE_ERROR +create table t1 (a serial serial default value); +--error ER_PARSE_ERROR +create table t1 (a serial collate binary); +--error ER_PARSE_ERROR +create table t1 (i int, vc serial as (i)); +--error ER_PARSE_ERROR +create function fs() returns serial return 1; + +create table t1 ( id serial ); +show create table t1; +drop table t1; diff --git a/mysql-test/t/partition_datatype.test b/mysql-test/t/partition_datatype.test index a6035fcb592..4017cdada60 100644 --- a/mysql-test/t/partition_datatype.test +++ b/mysql-test/t/partition_datatype.test @@ -262,10 +262,10 @@ ALTER TABLE t2 PARTITION BY RANGE (UNIX_TIMESTAMP(a)) INSERT INTO t1 VALUES (NULL, 'UTC'); INSERT INTO t1 VALUES ('0000-00-00 00:00:00', 'UTC'); --echo # Test invalid values -INSERT INTO t1 VALUES ('1901-01-01 00:00:00', 'UTCI'); -INSERT INTO t1 VALUES ('1969-12-31 23:59:59', 'UTCI'); -INSERT INTO t1 VALUES ('2038-01-19 03:14:08', 'UTCI'); -INSERT INTO t1 VALUES ('1970-01-01 00:00:00', 'UTCI'); +INSERT IGNORE INTO t1 VALUES ('1901-01-01 00:00:00', 'UTCI'); +INSERT IGNORE INTO t1 VALUES ('1969-12-31 23:59:59', 'UTCI'); +INSERT IGNORE INTO t1 VALUES ('2038-01-19 03:14:08', 'UTCI'); +INSERT IGNORE INTO t1 VALUES ('1970-01-01 00:00:00', 'UTCI'); --echo # Test start range INSERT INTO t1 VALUES ('1970-01-01 00:00:01', 'UTC'); INSERT INTO t1 VALUES ('1974-02-05 21:28:16', 'UTC'); @@ -292,16 +292,16 @@ SET @@session.time_zone = 'Europe/Moscow'; INSERT INTO t1 VALUES (NULL, 'Moscow'); INSERT INTO t1 VALUES ('0000-00-00 00:00:00', 'Moscow'); --echo # Test invalid values -INSERT INTO t1 VALUES ('0000-00-00 03:00:00', 'MoscowI'); -INSERT INTO t1 VALUES ('1901-01-01 00:00:00', 'MoscowI'); -INSERT INTO t1 VALUES ('1969-12-31 23:59:59', 'MoscowI'); -INSERT INTO t1 VALUES ('1970-01-01 02:29:29', 'MoscowI'); -INSERT INTO t1 VALUES ('2038-01-19 06:14:08', 'MoscowI'); -INSERT INTO t1 VALUES ('1970-01-01 03:00:00', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('0000-00-00 03:00:00', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('1901-01-01 00:00:00', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('1969-12-31 23:59:59', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('1970-01-01 02:29:29', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('2038-01-19 06:14:08', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('1970-01-01 03:00:00', 'MoscowI'); --echo # values truncated to 03:00:00 due to daylight saving shift -INSERT INTO t1 VALUES ('2011-03-27 02:00:00', 'MoscowI'); -INSERT INTO t1 VALUES ('2011-03-27 02:00:01', 'MoscowI'); -INSERT INTO t1 VALUES ('2011-03-27 02:59:59', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('2011-03-27 02:00:00', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('2011-03-27 02:00:01', 'MoscowI'); +INSERT IGNORE INTO t1 VALUES ('2011-03-27 02:59:59', 'MoscowI'); --echo # Test start range INSERT INTO t1 VALUES ('1970-01-01 03:00:01', 'Moscow'); INSERT INTO t1 VALUES ('1974-02-05 21:28:16', 'Moscow'); @@ -386,12 +386,12 @@ WHERE a BETWEEN '2011-10-29 23:00:00' and '2011-10-31 00:00:00' ORDER BY a, tz; --echo # Test end range changes DELETE FROM t2 WHERE a = 0; -INSERT INTO t2 VALUES ('1970-01-01 00:00:00', 'UTC'); +INSERT IGNORE INTO t2 VALUES ('1970-01-01 00:00:00', 'UTC'); SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2 WHERE a = 0; SELECT * FROM t2 ORDER BY a, tz LIMIT 3; SELECT * FROM t2 ORDER BY a DESC, tz LIMIT 3; -UPDATE t2 SET a = TIMESTAMPADD(SECOND, 1, a); +UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, 1, a); SELECT MIN(a), MAX(a) FROM t2; SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2 WHERE a = 0; @@ -400,12 +400,12 @@ WHERE TABLE_NAME = 't2'; SELECT * FROM t2 ORDER BY a, tz; --echo # Test start range changes -INSERT INTO t2 VALUES ('1970-01-01 00:00:00', 'UTC'); +INSERT IGNORE INTO t2 VALUES ('1970-01-01 00:00:00', 'UTC'); SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2 WHERE a = 0; SELECT * FROM t2 ORDER BY a, tz LIMIT 3; SELECT * FROM t2 ORDER BY a DESC, tz LIMIT 3; -UPDATE t2 SET a = TIMESTAMPADD(SECOND, -1, a); +UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, -1, a); SELECT MIN(a), MAX(a) FROM t2; SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2 WHERE a = 0; @@ -511,12 +511,12 @@ WHERE a BETWEEN '2011-10-29 01:59:59' and '2011-10-31 00:00:00' ORDER BY a, tz; --echo # Test end range changes DELETE FROM t2 WHERE a = 0; -INSERT INTO t2 VALUES ('1970-01-01 00:00:00', 'Moscow'); +INSERT IGNORE INTO t2 VALUES ('1970-01-01 00:00:00', 'Moscow'); SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2 WHERE a = 0; SELECT * FROM t2 ORDER BY a, tz LIMIT 3; SELECT * FROM t2 ORDER BY a DESC, tz LIMIT 3; -UPDATE t2 SET a = TIMESTAMPADD(SECOND, 1, a); +UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, 1, a); SELECT MIN(a), MAX(a) FROM t2; SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2 WHERE a = 0; @@ -525,12 +525,12 @@ WHERE TABLE_NAME = 't2'; SELECT * FROM t2 ORDER BY a, tz; --echo # Test start range changes -INSERT INTO t2 VALUES ('1970-01-01 00:00:00', 'Moscow'); +INSERT IGNORE INTO t2 VALUES ('1970-01-01 00:00:00', 'Moscow'); SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2 WHERE a = 0; SELECT * FROM t2 ORDER BY a, tz LIMIT 3; SELECT * FROM t2 ORDER BY a DESC, tz LIMIT 3; -UPDATE t2 SET a = TIMESTAMPADD(SECOND, -1, a); +UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, -1, a); SELECT MIN(a), MAX(a) FROM t2; SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2 WHERE a = 0; diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test index 858213b1e30..3ee54605c36 100644 --- a/mysql-test/t/partition_error.test +++ b/mysql-test/t/partition_error.test @@ -87,13 +87,13 @@ PARTITION BY RANGE (DAYOFWEEK(a)) CREATE TABLE t1 (a DATE) PARTITION BY RANGE (DAYOFWEEK(a)) (PARTITION a1 VALUES LESS THAN (60)); -INSERT INTO t1 VALUES ('test'),('a'),('5'); +INSERT IGNORE INTO t1 VALUES ('test'),('a'),('5'); SHOW WARNINGS; DROP TABLE t1; CREATE TABLE t1 (a DATETIME) PARTITION BY RANGE (DAYOFWEEK(a)) (PARTITION a1 VALUES LESS THAN (60)); -INSERT INTO t1 VALUES ('test'),('a'),('5'); +INSERT IGNORE INTO t1 VALUES ('test'),('a'),('5'); SHOW WARNINGS; DROP TABLE t1; --error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR @@ -2056,6 +2056,7 @@ SELECT PARTITION_NAME, SUBPARTITION_NAME, PARTITION_COMMENT FROM INFORMATION_SCH WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test'; DROP TABLE t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (a INT , KEY inx_a (a) ) diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 62a9173b526..a05e086d79b 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -6,6 +6,8 @@ if (`select plugin_auth_version < "5.6.25" from information_schema.plugins where --source include/have_partition.inc --source include/have_innodb.inc +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); + set global default_storage_engine='innodb'; set session default_storage_engine='innodb'; diff --git a/mysql-test/t/partition_innodb_plugin.test b/mysql-test/t/partition_innodb_plugin.test index a514736ff42..74e1747746b 100644 --- a/mysql-test/t/partition_innodb_plugin.test +++ b/mysql-test/t/partition_innodb_plugin.test @@ -4,6 +4,7 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`; call mtr.add_suppression("InnoDB: Table .* does not exist in the InnoDB internal data dictionary .*"); +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); --echo # --echo # Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB, @@ -36,11 +37,9 @@ call mtr.add_suppression("InnoDB: Error: table `test`.`t1` .* InnoDB internal"); --echo # --echo # Bug#55091: Server crashes on ADD PARTITION after a failed attempt --echo # -SET @old_innodb_file_format = @@global.innodb_file_format; SET @old_innodb_file_per_table = @@global.innodb_file_per_table; SET @old_innodb_strict_mode = @@global.innodb_strict_mode; -SET @@global.innodb_file_format = Barracuda, -@@global.innodb_file_per_table = ON, +SET @@global.innodb_file_per_table = ON, @@global.innodb_strict_mode = ON; --connect(con1,localhost,root,,) @@ -90,7 +89,6 @@ DROP TABLE t1; --disconnect con2 --connection default SET @@global.innodb_strict_mode = @old_innodb_strict_mode; -SET @@global.innodb_file_format = @old_innodb_file_format; SET @@global.innodb_file_per_table = @old_innodb_file_per_table; # @@ -153,4 +151,3 @@ ROLLBACK; disconnect con1; connection default; DROP TABLE `t``\""e`; -SET NAMES DEFAULT; diff --git a/mysql-test/t/partition_list.test b/mysql-test/t/partition_list.test index 8d2ec88e0f4..e2b6aff300f 100644 --- a/mysql-test/t/partition_list.test +++ b/mysql-test/t/partition_list.test @@ -186,3 +186,26 @@ create table t1 (a char(1)) partition by list (ascii(ucase(a))) (partition p1 values in (2)); +--echo # +--echo # MDEV-11681: PARTITION BY LIST COLUMNS with default partition: +--echo # Assertion `part_info->num_list_values' failed in +--echo # get_part_iter_for_interval_cols_via_map +--echo # +CREATE TABLE t1 (f int) PARTITION BY LIST COLUMNS (f) (PARTITION pdef DEFAULT); +insert into t1 values (1),(2); +select * from t1 where f = 1; + +drop table t1; + +CREATE TABLE t1 (f int, d int) PARTITION BY LIST COLUMNS (f,d) (PARTITION pdef DEFAULT); +insert into t1 values (1,1),(2,2); +select * from t1 where f = 1 and d = 1 ; + +drop table t1; +CREATE TABLE t1 (f int) PARTITION BY LIST (f) (PARTITION pdef DEFAULT); +insert into t1 values (1),(2); +select * from t1 where f = 1; + +drop table t1; + +--echo #end of 10.2 tests diff --git a/mysql-test/t/plugin_auth.test b/mysql-test/t/plugin_auth.test index c5d96e0d612..81b8ba6e0a3 100644 --- a/mysql-test/t/plugin_auth.test +++ b/mysql-test/t/plugin_auth.test @@ -449,7 +449,7 @@ DROP USER uplain@localhost; --echo # Bug #59038 : mysql.user.authentication_string column --echo # causes configuration wizard to fail -INSERT INTO mysql.user( +INSERT IGNORE INTO mysql.user( Host, User, Password, diff --git a/mysql-test/t/pool_of_threads.cnf b/mysql-test/t/pool_of_threads.cnf index c03e1da6450..f6651c878de 100644 --- a/mysql-test/t/pool_of_threads.cnf +++ b/mysql-test/t/pool_of_threads.cnf @@ -7,8 +7,5 @@ loose-thread_pool_max_threads= 2 extra-port= @ENV.MASTER_EXTRA_PORT extra-max-connections=1 -[client] -connect-timeout= 2 - [ENV] MASTER_EXTRA_PORT= @OPT.port diff --git a/mysql-test/t/pool_of_threads.test b/mysql-test/t/pool_of_threads.test index 24e0218db62..f13a096985c 100644 --- a/mysql-test/t/pool_of_threads.test +++ b/mysql-test/t/pool_of_threads.test @@ -15,23 +15,26 @@ SET optimizer_switch=@save_optimizer_switch; # connections on the extra port. # First set two connections running, and check that extra connection -# on normal port fails due to--thread-pool-max_threads=2 -connection default; +# on normal port fails due to --thread-pool-max-threads=2. +# We can afford using a really long sleep, because we won't wait +# till it ends, we'll interrupt it as soon as we don't need it anymore -# Sleep for slightly longer than 5 sec to trigger MDEV-4566 -# (abort in interruptible wait connection check) -send SELECT sleep(5.5); +connection default; +--let $con1_id= `SELECT CONNECTION_ID()` + +send SELECT sleep(50); --sleep 1 connect(con2,localhost,root,,); -connection con2; -send SELECT sleep(5); +--let $con2_id= `SELECT CONNECTION_ID()` + +send SELECT sleep(50); --sleep 0.5 --disable_abort_on_error --disable_result_log --disable_query_log -connect(con3,localhost,root,,); +connect(con3,localhost,root,,,,,connect_timeout=2); --enable_query_log --enable_result_log --enable_abort_on_error @@ -45,24 +48,15 @@ if ($error) --echo # -- Success: more than --thread_pool_max_threads normal connections not possible } -connection default; ---reap -connection con2; ---reap - -# Now try again, but this time use the extra port to successfully connect. - -connection default; -send SELECT sleep(5); - -connection con2; -send SELECT sleep(5); ---sleep 1 - connect(extracon,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,); connection extracon; SELECT 'Connection on extra port ok'; +# Here, sleep just for slightly longer than 5 sec to trigger MDEV-4566 +# (abort in interruptible wait connection check). +send SELECT sleep(5.5); + + connect(extracon2,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,); connection extracon2; SELECT 'Connection on extra port 2 ok'; @@ -70,7 +64,7 @@ SELECT 'Connection on extra port 2 ok'; --disable_abort_on_error --disable_result_log --disable_query_log -connect(extracon3,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,); +connect(extracon3,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,,connect_timeout=2); --enable_query_log --enable_result_log --enable_abort_on_error @@ -84,7 +78,16 @@ if ($error) --echo # -- Success: more than --extra-max-connections + 1 normal connections not possible } +connection extracon2; +--replace_result $con1_id +eval KILL QUERY $con1_id; +--replace_result $con2_id +eval KILL QUERY $con2_id; + connection default; --reap connection con2; --reap + +connection extracon; +--reap diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 00e0c4086bb..549814724d2 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -841,13 +841,13 @@ drop table t1; prepare stmt from 'create table t1 (a varchar(10) character set utf8)'; execute stmt; --disable_warnings -insert into t1 (a) values (repeat('a', 20)); +insert ignore into t1 (a) values (repeat('a', 20)); --enable_warnings select length(a) from t1; drop table t1; execute stmt; --disable_warnings -insert into t1 (a) values (repeat('a', 20)); +insert ignore into t1 (a) values (repeat('a', 20)); --enable_warnings # Check that the data is truncated to the same length select length(a) from t1; @@ -4287,3 +4287,32 @@ INSERT INTO t1 VALUES (1),(2),(3); --error ER_INVALID_DEFAULT_PARAM EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING DEFAULT,DEFAULT; DROP TABLE t1; + +--echo # +--echo # MDEV-11780 Crash with PREPARE + SP out parameter + literal +--echo # + +DELIMITER $$; +CREATE OR REPLACE PROCEDURE p1(OUT a INT) +BEGIN + SET a=10; +END; +$$ +DELIMITER ;$$ + +PREPARE stmt FROM 'CALL p1(?)'; +--error ER_SP_NOT_VAR_ARG +EXECUTE stmt USING 10; +--error ER_SP_NOT_VAR_ARG +EXECUTE stmt USING DEFAULT; +--error ER_SP_NOT_VAR_ARG +EXECUTE stmt USING IGNORE; +DEALLOCATE PREPARE stmt; + +--error ER_SP_NOT_VAR_ARG +EXECUTE IMMEDIATE 'CALL p1(?)' USING 10; +--error ER_SP_NOT_VAR_ARG +EXECUTE IMMEDIATE 'CALL p1(?)' USING DEFAULT; +--error ER_SP_NOT_VAR_ARG +EXECUTE IMMEDIATE 'CALL p1(?)' USING IGNORE; +DROP PROCEDURE p1; diff --git a/mysql-test/t/round.test b/mysql-test/t/round.test index d018fa7e34e..4ba65c08fcf 100644 --- a/mysql-test/t/round.test +++ b/mysql-test/t/round.test @@ -6,13 +6,13 @@ CREATE TABLE t1 (sint8 tinyint not null); INSERT INTO t1 VALUES ('0.1'); INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('127.4'); -INSERT INTO t1 VALUES ('127.5'); +INSERT IGNORE INTO t1 VALUES ('127.5'); INSERT INTO t1 VALUES ('-0.1'); INSERT INTO t1 VALUES ('-0.5'); INSERT INTO t1 VALUES ('-127.4'); INSERT INTO t1 VALUES ('-127.5'); INSERT INTO t1 VALUES ('-128.4'); -INSERT INTO t1 VALUES ('-128.5'); +INSERT IGNORE INTO t1 VALUES ('-128.5'); SELECT * FROM t1; DROP TABLE t1; @@ -22,9 +22,9 @@ INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('127.4'); INSERT INTO t1 VALUES ('127.5'); INSERT INTO t1 VALUES ('-0.1'); -INSERT INTO t1 VALUES ('-0.5'); +INSERT IGNORE INTO t1 VALUES ('-0.5'); INSERT INTO t1 VALUES ('255.4'); -INSERT INTO t1 VALUES ('255.5'); +INSERT IGNORE INTO t1 VALUES ('255.5'); SELECT * FROM t1; DROP TABLE t1; @@ -33,13 +33,13 @@ CREATE TABLE t1 (sint16 smallint not null); INSERT INTO t1 VALUES ('0.1'); INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('32767.4'); -INSERT INTO t1 VALUES ('32767.5'); +INSERT IGNORE INTO t1 VALUES ('32767.5'); INSERT INTO t1 VALUES ('-0.1'); INSERT INTO t1 VALUES ('-0.5'); INSERT INTO t1 VALUES ('-32767.4'); INSERT INTO t1 VALUES ('-32767.5'); INSERT INTO t1 VALUES ('-32768.4'); -INSERT INTO t1 VALUES ('-32768.5'); +INSERT IGNORE INTO t1 VALUES ('-32768.5'); SELECT * FROM t1; DROP TABLE t1; @@ -50,9 +50,9 @@ INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('32767.4'); INSERT INTO t1 VALUES ('32767.5'); INSERT INTO t1 VALUES ('-0.1'); -INSERT INTO t1 VALUES ('-0.5'); +INSERT IGNORE INTO t1 VALUES ('-0.5'); INSERT INTO t1 VALUES ('65535.4'); -INSERT INTO t1 VALUES ('65535.5'); +INSERT IGNORE INTO t1 VALUES ('65535.5'); SELECT * FROM t1; DROP TABLE t1; @@ -60,13 +60,13 @@ CREATE TABLE t1 (sint24 mediumint not null); INSERT INTO t1 VALUES ('0.1'); INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('8388607.4'); -INSERT INTO t1 VALUES ('8388607.5'); +INSERT IGNORE INTO t1 VALUES ('8388607.5'); INSERT INTO t1 VALUES ('-0.1'); INSERT INTO t1 VALUES ('-0.5'); INSERT INTO t1 VALUES ('-8388607.4'); INSERT INTO t1 VALUES ('-8388607.5'); INSERT INTO t1 VALUES ('-8388608.4'); -INSERT INTO t1 VALUES ('-8388608.5'); +INSERT IGNORE INTO t1 VALUES ('-8388608.5'); SELECT * FROM t1; DROP TABLE t1; @@ -76,9 +76,9 @@ INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('8388607.4'); INSERT INTO t1 VALUES ('8388607.5'); INSERT INTO t1 VALUES ('-0.1'); -INSERT INTO t1 VALUES ('-0.5'); +INSERT IGNORE INTO t1 VALUES ('-0.5'); INSERT INTO t1 VALUES ('16777215.4'); -INSERT INTO t1 VALUES ('16777215.5'); +INSERT IGNORE INTO t1 VALUES ('16777215.5'); SELECT * FROM t1; DROP TABLE t1; @@ -86,13 +86,13 @@ CREATE TABLE t1 (sint64 bigint not null); INSERT INTO t1 VALUES ('0.1'); INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('9223372036854775807.4'); -INSERT INTO t1 VALUES ('9223372036854775807.5'); +INSERT IGNORE INTO t1 VALUES ('9223372036854775807.5'); INSERT INTO t1 VALUES ('-0.1'); INSERT INTO t1 VALUES ('-0.5'); INSERT INTO t1 VALUES ('-9223372036854775807.4'); INSERT INTO t1 VALUES ('-9223372036854775807.5'); INSERT INTO t1 VALUES ('-9223372036854775808.4'); -INSERT INTO t1 VALUES ('-9223372036854775808.5'); +INSERT IGNORE INTO t1 VALUES ('-9223372036854775808.5'); SELECT * FROM t1; DROP TABLE t1; @@ -102,9 +102,9 @@ INSERT INTO t1 VALUES ('0.5'); INSERT INTO t1 VALUES ('9223372036854775807.4'); INSERT INTO t1 VALUES ('9223372036854775807.5'); INSERT INTO t1 VALUES ('-0.1'); -INSERT INTO t1 VALUES ('-0.5'); +INSERT IGNORE INTO t1 VALUES ('-0.5'); INSERT INTO t1 VALUES ('18446744073709551615.4'); -INSERT INTO t1 VALUES ('18446744073709551615.5'); +INSERT IGNORE INTO t1 VALUES ('18446744073709551615.5'); INSERT INTO t1 VALUES ('1844674407370955161.0'); INSERT INTO t1 VALUES ('1844674407370955161.1'); INSERT INTO t1 VALUES ('1844674407370955161.2'); diff --git a/mysql-test/t/row-checksum.test b/mysql-test/t/row-checksum.test index 920a2384aa8..82efcf3ef93 100644 --- a/mysql-test/t/row-checksum.test +++ b/mysql-test/t/row-checksum.test @@ -54,7 +54,7 @@ checksum table t1 quick; checksum table t1 extended; drop table if exists t1; -create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=fixed; +create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=compact; insert into t1 values(null, null), (1, "hello"); checksum table t1; checksum table t1 quick; diff --git a/mysql-test/t/row.test b/mysql-test/t/row.test index 1c1d1b00910..80c61c414bf 100644 --- a/mysql-test/t/row.test +++ b/mysql-test/t/row.test @@ -187,6 +187,7 @@ SELECT * FROM t1,t2 WHERE (t1.a,t1.b)=(t2.a,t2.b); EXPLAIN SELECT * FROM t1,t2 WHERE t1.a=t2.a AND t1.b=2; EXPLAIN SELECT * FROM t1,t2 WHERE (t1.a,t1.b)=(t2.a,2); +--sorted_result SELECT * FROM t1,t2 WHERE t1.a=1 and t1.b=t2.b; SELECT * FROM t1,t2 WHERE (t1.a,t1.b)=(t2.a,2); @@ -194,6 +195,7 @@ EXPLAIN EXTENDED SELECT * FROM t1,t2 WHERE (t1.a,t1.b)=(t2.a,t2.b+1); SELECT * FROM t1,t2 WHERE (t1.a,t1.b)=(t2.a,t2.b+1); EXPLAIN EXTENDED SELECT * FROM t1,t2 WHERE (t1.a-1,t1.b)=(t2.a-1,t2.b+1); +--sorted_result SELECT * FROM t1,t2 WHERE (t1.a-1,t1.b)=(t2.a-1,t2.b+1); EXPLAIN SELECT * FROM t2 WHERE a=3 AND b=2; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index b207db042e6..a0caf4992bf 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -2372,7 +2372,7 @@ DROP TABLE t1; # create table t1(a bigint unsigned, b bigint); -insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), +insert ignore into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), (0x10000000000000000, 0x10000000000000000), (0x8fffffffffffffff, 0x8fffffffffffffff); select hex(a), hex(b) from t1; @@ -3808,7 +3808,7 @@ DROP TABLE t1; --echo # CREATE TABLE t1(a INT NOT NULL, b YEAR); -INSERT INTO t1 VALUES (); +INSERT IGNORE INTO t1 VALUES (); CREATE TABLE t2(c INT); --echo # Should not err out because of out-of-memory SELECT 1 FROM t2 JOIN t1 ON 1=1 @@ -3875,7 +3875,7 @@ SET @@sort_buffer_size= 40000; CREATE TABLE t1(a CHAR(0) NOT NULL); --disable_warnings -INSERT INTO t1 VALUES (0), (0), (0); +INSERT IGNORE INTO t1 VALUES (0), (0), (0); --enable_warnings INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12; @@ -3888,7 +3888,7 @@ DROP TABLE t1; CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int); --disable_warnings -INSERT INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1); +INSERT IGNORE INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1); --enable_warnings INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12; diff --git a/mysql-test/t/set_statement.test b/mysql-test/t/set_statement.test index a91c53c8dee..32f56e498df 100644 --- a/mysql-test/t/set_statement.test +++ b/mysql-test/t/set_statement.test @@ -618,8 +618,7 @@ SELECT @@sql_mode; SET STATEMENT sql_mode='ansi' FOR PREPARE stmt FROM 'SELECT "t1".* FROM t1'; execute stmt; ALTER TABLE t1 ADD COLUMN v3 int; -# repreparation with other mode cause an error ---error ER_PARSE_ERROR +# repreparation with other mode does not cause an error execute stmt; ALTER TABLE t1 drop COLUMN v3; deallocate prepare stmt; @@ -632,8 +631,7 @@ PREPARE stmt FROM 'SELECT "t1".* FROM t1'; SET sql_mode=default; execute stmt; ALTER TABLE t1 ADD COLUMN v3 int; -# repreparation with other mode cause an error ---error ER_PARSE_ERROR +# repreparation with other mode does not cause an error execute stmt; ALTER TABLE t1 drop COLUMN v3; deallocate prepare stmt; diff --git a/mysql-test/t/set_statement_debug.test b/mysql-test/t/set_statement_debug.test index a409370a61a..7089733ab4f 100644 --- a/mysql-test/t/set_statement_debug.test +++ b/mysql-test/t/set_statement_debug.test @@ -1,6 +1,8 @@ --source include/have_debug.inc --source include/have_debug_sync.inc +call mtr.add_suppression("Sort aborted.*"); + set @save_debug_dbug= @@debug_dbug; # check that change debug_dbug visible in SELECT diff --git a/mysql-test/t/set_statement_notembedded_binlog.test b/mysql-test/t/set_statement_notembedded_binlog.test index 62c351ed6f7..b0c00008d4f 100644 --- a/mysql-test/t/set_statement_notembedded_binlog.test +++ b/mysql-test/t/set_statement_notembedded_binlog.test @@ -1,5 +1,6 @@ --source include/have_log_bin.inc --source include/not_embedded.inc +--source include/have_binlog_format_statement.inc --disable_warnings drop table if exists t1; diff --git a/mysql-test/t/signal.test b/mysql-test/t/signal.test index 31bc7bc9633..cdb5796f1da 100644 --- a/mysql-test/t/signal.test +++ b/mysql-test/t/signal.test @@ -1346,6 +1346,7 @@ end $$ call test_signal() $$ drop procedure test_signal $$ +SET sql_mode= '' $$ create procedure test_signal() begin DECLARE aaax VARCHAR(65); @@ -1400,6 +1401,7 @@ end $$ call test_signal() $$ drop procedure test_signal $$ +set sql_mode = DEFAULT $$ # Test that HANDLER can catch conditions raised by SIGNAL @@ -1785,7 +1787,7 @@ begin select "after RESIGNAL"; end; - insert into t_warn set a= 9999999999999999; + insert ignore into t_warn set a= 9999999999999999; end $$ call test_resignal() $$ @@ -1904,7 +1906,7 @@ begin select "after RESIGNAL"; end; - insert into t_warn set a= 9999999999999999; + insert ignore into t_warn set a= 9999999999999999; end $$ call test_resignal() $$ @@ -2171,7 +2173,7 @@ begin select "after RESIGNAL"; end; - insert into t_warn set a= 9999999999999999; + insert ignore into t_warn set a= 9999999999999999; end $$ call test_resignal() $$ @@ -2188,7 +2190,7 @@ begin select "after RESIGNAL"; end; - insert into t_warn set a= 9999999999999999; + insert ignore into t_warn set a= 9999999999999999; end $$ --error 5555 @@ -2207,7 +2209,7 @@ begin select "after RESIGNAL"; end; - insert into t_warn set a= 9999999999999999; + insert ignore into t_warn set a= 9999999999999999; end $$ --error 5555 diff --git a/mysql-test/t/sp-dynamic.test b/mysql-test/t/sp-dynamic.test index e6f4aae96ac..3a467e26818 100644 --- a/mysql-test/t/sp-dynamic.test +++ b/mysql-test/t/sp-dynamic.test @@ -214,6 +214,7 @@ drop procedure p1| # statements do not substitute SP variables with their values for binlog, so # SP variables must be not accessible in Dynamic SQL. # +set sql_mode= ''| create procedure p1() begin declare a char(10); @@ -226,6 +227,7 @@ end| call p1()| --error ER_BAD_FIELD_ERROR call p1()| +set sql_mode= DEFAULT| drop procedure p1| # # J. Use of placeholders in Dynamic SQL. diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index e30fc6e30d4..aa537d3596b 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -2734,7 +2734,7 @@ DROP PROCEDURE p1; --echo # --echo # Bug#5889: Exit handler for a warning doesn't hide the warning in trigger --echo # - +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1(a INT, b INT); INSERT INTO t1 VALUES (1, 2); @@ -2758,6 +2758,7 @@ SELECT * FROM t1; DROP TRIGGER t1_bu; DROP TABLE t1; +SET sql_mode = DEFAULT; --echo # --echo # Bug#9857: Stored procedures: handler for sqlwarning ignored @@ -2811,13 +2812,13 @@ CREATE TABLE t2(a SMALLINT, b SMALLINT, c SMALLINT, d SMALLINT, e SMALLINT, f SMALLINT); CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW - INSERT INTO t2(a, b, c) VALUES(99999, 99999, 99999); + INSERT IGNORE INTO t2(a, b, c) VALUES(99999, 99999, 99999); CREATE TRIGGER t1_ai AFTER INSERT ON t1 FOR EACH ROW - INSERT INTO t2(d, e, f) VALUES(99999, 99999, 99999); + INSERT IGNORE INTO t2(d, e, f) VALUES(99999, 99999, 99999); CREATE PROCEDURE p1() - INSERT INTO t1 VALUES(99999, 99999, 99999); + INSERT IGNORE INTO t1 VALUES(99999, 99999, 99999); # What happened before the patch was: # - INSERT INTO t1 added 3 warnings about overflow in 'x', 'y' and 'z' columns; @@ -2845,7 +2846,7 @@ DROP TABLE t2; DROP PROCEDURE p1; --echo # ---------------------------------------------------------------------- - +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1(x SMALLINT, y SMALLINT, z SMALLINT); CREATE TABLE t2(a SMALLINT, b SMALLINT, c SMALLINT NOT NULL); @@ -2875,6 +2876,7 @@ SHOW WARNINGS; DROP TABLE t1; DROP TABLE t2; DROP PROCEDURE p1; +SET sql_mode = DEFAULT; --echo --echo ################################################################### @@ -3558,7 +3560,7 @@ BEGIN # above must be invoked once (for one condition), but all three conditions # must be cleared from the Diagnostics Area. - INSERT INTO t1 VALUES('qqqq', 'ww', 'eee'); + INSERT IGNORE INTO t1 VALUES('qqqq', 'ww', 'eee'); # The following INSERT will not be executed, because of the EXIT HANDLER. @@ -3585,7 +3587,7 @@ BEGIN # invoked once, and all nine SQL-warnings must be cleared from # the Diagnostics Area. - INSERT INTO t2 + INSERT IGNORE INTO t2 SELECT CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), @@ -3665,7 +3667,7 @@ BEGIN SELECT 'Handler for 1292 (2)' AS Msg; END; - INSERT INTO t2 + INSERT IGNORE INTO t2 SELECT CAST(999999 AS SIGNED INTEGER), CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), @@ -3688,7 +3690,7 @@ BEGIN SELECT 'Handler for 1292' Msg; END; - INSERT INTO t2 + INSERT IGNORE INTO t2 SELECT CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER), @@ -3723,6 +3725,7 @@ DROP PROCEDURE IF EXISTS p2; delimiter |; +SET sql_mode = ''; CREATE PROCEDURE p1() BEGIN DECLARE var1 INTEGER DEFAULT 'string'; @@ -3732,6 +3735,7 @@ END| --echo CALL p1()| --echo +SET sql_mode = DEFAULT; CREATE PROCEDURE p2() BEGIN diff --git a/mysql-test/t/sp-prelocking.test b/mysql-test/t/sp-prelocking.test index c1378d59196..38cbd5aa110 100644 --- a/mysql-test/t/sp-prelocking.test +++ b/mysql-test/t/sp-prelocking.test @@ -414,3 +414,33 @@ SELECT f1(); DROP FUNCTION f1; DROP VIEW v1; DROP TABLE t1,t2; + +--echo # +--echo # Bug #16672723 "CAN'T FIND TEMPORARY TABLE". +--echo # +CREATE FUNCTION f1() RETURNS INT RETURN 1; +CREATE TEMPORARY TABLE tmp1(a INT); +PREPARE stmt1 FROM "CREATE TEMPORARY TABLE tmp2 AS SELECT b FROM (SELECT f1() AS b FROM tmp1) AS t"; +--echo # The below statement failed before the fix. +EXECUTE stmt1; +DROP TEMPORARY TABLES tmp1, tmp2; +DEALLOCATE PREPARE stmt1; +DROP FUNCTION f1; + +# +# MDEV-9084 Calling a stored function from a nested select from temporary table causes unpredictable behavior +# +delimiter $$; +create procedure sp1() +begin + drop table if exists t1, t2; + create temporary table t1 select 1 v; + create table t2 (col varchar(45)) select distinct col from (select sf1() as col from t1) t; +end$$ +delimiter ;$$ +create function sf1() returns text return 'blah'; +call test.sp1(); +call test.sp1(); +drop procedure sp1; +drop function sf1; +drop table t2; diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test index c620f415e22..41bfd871c39 100644 --- a/mysql-test/t/sp_notembedded.test +++ b/mysql-test/t/sp_notembedded.test @@ -98,6 +98,7 @@ begin end if; return 1; end| +set statement sql_mode = '' for create procedure bug10100p(prm int, inout res int) begin set res = res * prm; @@ -105,6 +106,7 @@ begin call bug10100p(prm - 1, res); end if; end| +set statement sql_mode = '' for create procedure bug10100t(prm int) begin declare res int; @@ -303,7 +305,7 @@ set session low_priority_updates=default; # # Bug#44798 MySQL engine crashes when creating stored procedures with execute_priv=N # -INSERT INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv, +INSERT IGNORE INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test index 869bf45dbf3..263437a0bf1 100644 --- a/mysql-test/t/sql_mode.test +++ b/mysql-test/t/sql_mode.test @@ -513,3 +513,17 @@ SET @@sql_mode= @org_mode; --echo --echo #End of Test for Bug#12601974 + +--echo # +--echo # MDEV-11848 Automatic statement repreparation changes query semantics +--echo # +SET sql_mode=DEFAULT; +CREATE OR REPLACE TABLE t1 (a TEXT); +PREPARE stmt FROM 'INSERT INTO t1 (a) VALUES (2||3)'; +EXECUTE stmt; +SET sql_mode=ORACLE; +EXECUTE stmt; +ALTER TABLE t1 ADD b INT; +EXECUTE stmt; +SELECT * FROM t1; +DROP TABLE t1; diff --git a/mysql-test/t/statistics.test b/mysql-test/t/statistics.test index d75a01333cb..61ef20605af 100644 --- a/mysql-test/t/statistics.test +++ b/mysql-test/t/statistics.test @@ -7,7 +7,9 @@ drop table if exists t1,t2; set @save_use_stat_tables=@@use_stat_tables; DELETE FROM mysql.table_stats; +--sorted_result DELETE FROM mysql.column_stats; +--sorted_result DELETE FROM mysql.index_stats; set use_stat_tables='preferably'; @@ -171,6 +173,7 @@ DELETE FROM mysql.column_stats; set histogram_size=4; ANALYZE TABLE t1; +--sorted_result SELECT db_name, table_name, column_name, min_value, max_value, nulls_ratio, avg_frequency, @@ -183,6 +186,7 @@ set histogram_size=8; set histogram_type='DOUBLE_PREC_HB'; ANALYZE TABLE t1; +--sorted_result SELECT db_name, table_name, column_name, min_value, max_value, nulls_ratio, avg_frequency, @@ -224,23 +228,34 @@ INSERT INTO t3 VALUES ANALYZE TABLE t3; +--sorted_result SELECT * FROM mysql.table_stats; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; ALTER TABLE t1 RENAME TO s1; +--sorted_result SELECT * FROM mysql.table_stats; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; RENAME TABLE s1 TO t1; +--sorted_result SELECT * FROM mysql.table_stats; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; DROP TABLE t3; SELECT * FROM mysql.table_stats; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; @@ -253,37 +268,49 @@ INSERT INTO t0 SELECT a,b FROM t1; ALTER TABLE t1 CHANGE COLUMN b x varchar(32), CHANGE COLUMN e y double; SHOW CREATE TABLE t1; +--sorted_result SELECT * FROM mysql.column_stats; ALTER TABLE t1 CHANGE COLUMN x b varchar(32), CHANGE COLUMN y e double; SHOW CREATE TABLE t1; +--sorted_result SELECT * FROM mysql.column_stats; ALTER TABLE t1 RENAME TO s1, CHANGE COLUMN b x varchar(32); SHOW CREATE TABLE s1; SELECT * FROM mysql.table_stats; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; ALTER TABLE s1 RENAME TO t1, CHANGE COLUMN x b varchar(32); SHOW CREATE TABLE t1; SELECT * FROM mysql.table_stats; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; ALTER TABLE t1 CHANGE COLUMN b x varchar(30); SHOW CREATE TABLE t1; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; ALTER TABLE t1 CHANGE COLUMN x b varchar(32); SHOW CREATE TABLE t1; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx4); +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR @@ -299,12 +326,16 @@ SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/save_index_stats' ALTER TABLE t1 CHANGE COLUMN b x varchar(30); SHOW CREATE TABLE t1; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; ALTER TABLE t1 CHANGE COLUMN x b varchar(32); SHOW CREATE TABLE t1; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR @@ -317,7 +348,9 @@ eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/save_index_stats' INTO TABLE mysql.index_stats FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; remove_file $MYSQLTEST_VARDIR/tmp/save_column_stats; remove_file $MYSQLTEST_VARDIR/tmp/save_index_stats; @@ -325,11 +358,14 @@ remove_file $MYSQLTEST_VARDIR/tmp/save_index_stats; ALTER TABLE t1 DROP COLUMN b; SHOW CREATE TABLE t1; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; DROP INDEX idx2 ON t1; SHOW CREATE TABLE t1; +--sorted_result SELECT * FROM mysql.index_stats; DROP INDEX idx1 ON t1; @@ -341,22 +377,30 @@ CREATE INDEX idx1 ON t1(b, e); CREATE INDEX idx2 ON t1(c, d); CREATE INDEX idx4 ON t1(e, b, d); SHOW CREATE TABLE t1; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4); +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; UPDATE t1 SET b=(SELECT b FROM t0 WHERE t0.a= t1.a); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4); +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; ALTER TABLE t1 DROP COLUMN b, DROP INDEX idx1, DROP INDEX idx2, DROP INDEX idx4; SHOW CREATE TABLE t1; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; ALTER TABLE t1 ADD COLUMN b varchar(32); @@ -364,10 +408,14 @@ ALTER TABLE t1 ADD INDEX idx1 (b, e), ADD INDEX idx2 (c, d), ADD INDEX idx4 (e, b, d); UPDATE t1 SET b=(SELECT b FROM t0 WHERE t0.a= t1.a); SHOW CREATE TABLE t1; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4); +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; DELETE FROM mysql.table_stats; @@ -381,12 +429,16 @@ SELECT * FROM mysql.index_stats; ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(c,e,b) INDEXES(idx2,idx4); SELECT * FROM mysql.table_stats; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; DELETE FROM mysql.index_stats WHERE table_name='t1' AND index_name='primary'; +--sorted_result SELECT * FROM mysql.index_stats; ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(primary); +--sorted_result SELECT * FROM mysql.index_stats; DELETE FROM mysql.table_stats; @@ -396,7 +448,9 @@ DELETE FROM mysql.index_stats; ANALYZE TABLE t1 PERSISTENT FOR COLUMNS ALL INDEXES ALL; SELECT * FROM mysql.table_stats; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; CREATE TABLE t2 LIKE t1; @@ -407,8 +461,9 @@ set optimizer_switch='extended_keys=off'; ANALYZE TABLE t2; +--sorted_result SELECT * FROM mysql.table_stats; -SELECT * FROM mysql.column_stats ORDER BY column_name; +SELECT * FROM mysql.column_stats ORDER BY column_name, table_name; SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name; DELETE FROM mysql.table_stats; @@ -461,12 +516,16 @@ ALTER TABLE t1 ADD INDEX idx1 (b(4), e), ADD INDEX idx4 (e, b(4), d); +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; ANALYZE TABLE t1; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; DELETE FROM mysql.table_stats; @@ -486,7 +545,9 @@ set use_stat_tables='never'; ANALYZE TABLE t1 PERSISTENT FOR ALL; SELECT * FROM mysql.table_stats; +--sorted_result SELECT * FROM mysql.column_stats; +--sorted_result SELECT * FROM mysql.index_stats; @@ -529,11 +590,14 @@ set use_stat_tables='preferably'; ANALYZE TABLE Country, City, CountryLanguage; --enable_result_log +--sorted_result SELECT UPPER(db_name), UPPER(table_name), cardinality FROM mysql.table_stats; +--sorted_result SELECT UPPER(db_name), UPPER(table_name), column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency FROM mysql.column_stats; +--sorted_result SELECT UPPER(db_name), UPPER(table_name), index_name, prefix_arity, avg_frequency FROM mysql.index_stats; @@ -566,11 +630,14 @@ set use_stat_tables='preferably'; ANALYZE TABLE Country, City, CountryLanguage; --enable_result_log +--sorted_result SELECT UPPER(db_name), UPPER(table_name), cardinality FROM mysql.table_stats; +--sorted_result SELECT UPPER(db_name), UPPER(table_name), column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency FROM mysql.column_stats; +--sorted_result SELECT UPPER(db_name), UPPER(table_name), index_name, prefix_arity, avg_frequency FROM mysql.index_stats; @@ -596,11 +663,14 @@ set histogram_size=default; use test; DROP DATABASE world; +--sorted_result SELECT UPPER(db_name), UPPER(table_name), cardinality FROM mysql.table_stats; +--sorted_result SELECT UPPER(db_name), UPPER(table_name), column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency FROM mysql.column_stats; +--sorted_result SELECT UPPER(db_name), UPPER(table_name), index_name, prefix_arity, avg_frequency FROM mysql.index_stats; diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index 93b31499bef..830f051a5f6 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -1235,6 +1235,7 @@ i int comment 123456789*123456789*123456789*123456789* 123456789*123456789*123456789*123456789*'); set @@sql_mode= @org_mode; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 (i int comment '123456789*123456789*123456789*123456789* diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 77b9c305ac8..f2e0adf9d53 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -12,6 +12,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12; drop view if exists v2; --enable_warnings +call mtr.add_suppression("Sort aborted.*"); + set @subselect_tmp=@@optimizer_switch; set @@optimizer_switch=ifnull(@optimizer_switch_for_subselect_test, "semijoin=on,firstmatch=on,loosescan=on,semijoin_with_cache=on,partial_match_rowid_merge=off,partial_match_table_scan=off"); @@ -676,9 +678,9 @@ CREATE TABLE `t3` ( PRIMARY KEY (`numeropost`), UNIQUE KEY `maxnumrep` (`maxnumrep`) ) ENGINE=MyISAM CHARSET=latin1; -INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); -INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); +INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); INSERT INTO t3 VALUES (1,1); @@ -3339,7 +3341,7 @@ create table t1(f11 int, f12 int); create table t2(f21 int unsigned not null, f22 int, f23 varchar(10)); insert into t1 values(1,1),(2,2), (3, 3); --disable_warnings -insert into t2 +insert ignore into t2 select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a from t0 A, t0 B, t0 C, t0 D; --enable_warnings @@ -5029,6 +5031,7 @@ EXPLAIN SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS (SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1); +--sorted_result SELECT table1.f1, table2.f1_key FROM t1 AS table1, t2 AS table2 WHERE EXISTS (SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1); @@ -5328,6 +5331,7 @@ SELECT DISTINCT f1_key FROM t2 WHERE f1_key != table2.f1_key AND f1_key >= table1.f1 ); +--sorted_result eval $query; eval explain $query; @@ -6014,6 +6018,17 @@ SELECT ( SELECT MIN(v2.f2) FROM t1 ) AS sq FROM v2 GROUP BY sq; drop view v2; drop table t1,t2; +--echo # +--echo # MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*) +--echo # + +CREATE TABLE t1 (f1 CHAR(3) CHARACTER SET utf8 NULL, f2 CHAR(3) CHARACTER SET latin1 NULL); +INSERT INTO t1 VALUES ('foo','bar'); +SELECT * FROM t1 WHERE f2 >= SOME ( SELECT f1 FROM t1 ); +SELECT * FROM t1 WHERE f2 <= SOME ( SELECT f1 FROM t1 ); +DROP TABLE t1; + + --echo # --echo # MDEV-9487: Server crashes in Time_and_counter_tracker::incr_loops --echo # with UNION in ALL subquery diff --git a/mysql-test/t/subselect2.test b/mysql-test/t/subselect2.test index b3c1322184d..c106d40b095 100644 --- a/mysql-test/t/subselect2.test +++ b/mysql-test/t/subselect2.test @@ -28,7 +28,7 @@ DOCID VARCHAR(32)BINARY NOT NULL ) ENGINE=InnoDB ; -INSERT INTO t1 (DOCID) VALUES ("1"), ("2"); +INSERT IGNORE INTO t1 (DOCID) VALUES ("1"), ("2"); CREATE TABLE t2 ( @@ -359,5 +359,55 @@ where t1.a = t2.a and ( t1.a = ( select min(a) from t1 ) or 0 ); drop table t1,t2,t3; +--echo # +--echo # MDEV-10148: Database crashes in the query to the View +--echo # +CREATE TABLE t1 ( + key_code INT(11) NOT NULL, + value_string VARCHAR(50) NULL DEFAULT NULL, + PRIMARY KEY (key_code) +) COLLATE='utf8_general_ci' ENGINE=InnoDB ; + +CREATE TABLE t2 ( + key_code INT(11) NOT NULL, + target_date DATE NULL DEFAULT NULL, + PRIMARY KEY (key_code) +) COLLATE='utf8_general_ci' ENGINE=InnoDB ; + +CREATE TABLE t3 ( + now_date DATE NOT NULL, + PRIMARY KEY (now_date) +) COLLATE='utf8_general_ci' ENGINE=InnoDB ; + +CREATE VIEW v1 +AS +SELECT + B.key_code, + B.target_date +FROM + t2 B INNER JOIN t3 C ON + B.target_date = C.now_date +; +SET @s = 'SELECT A.* FROM t1 A WHERE A.key_code IN (SELECT key_code FROM v1)'; +PREPARE stmt FROM @s; +EXECUTE stmt; #1st time -> success +EXECUTE stmt; #2nd time -> crash +DEALLOCATE PREPARE stmt; +DROP VIEW v1; +DROP TABLE t1,t2,t3; + set optimizer_switch=@subselect2_test_tmp; +# +# Bug #23303485 : HANDLE_FATAL_SIGNAL (SIG=11) IN SUBSELECT_UNION_ENGINE::NO_ROWS +# +create table t1 (a int); +create table t2 (a int); +create table t3(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +insert into t2 select a from t1; +insert into t3 select a from t1; +--error ER_SUBQUERY_NO_1_ROW +select null in (select a from t1 where a < out3.a union select a from t2 where + (select a from t3) +1 < out3.a+1) from t3 out3; +drop table t1, t2, t3; diff --git a/mysql-test/t/subselect4.test b/mysql-test/t/subselect4.test index 4eb9701ee71..253160c46ac 100644 --- a/mysql-test/t/subselect4.test +++ b/mysql-test/t/subselect4.test @@ -1956,5 +1956,56 @@ SELECT x FROM t1 WHERE id > (SELECT MAX(id) - 1000 FROM t1) ORDER BY x LIMIT 1; drop table t1; +--echo # +--echo # MDEV-7691: Assertion `outer_context || !*from_field || *from_field == not_found_field' ... +--echo # +set optimizer_switch=default; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (4),(6); + +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1),(8); + +PREPARE stmt FROM " +SELECT * FROM t2 +HAVING 0 IN ( + SELECT a FROM t1 + WHERE a IN ( + SELECT a FROM t1 + WHERE b = a + ) +) +"; + +EXECUTE stmt; +EXECUTE stmt; + +--echo # Alternative test case, without HAVING +CREATE TABLE t3 (i INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (4),(6); + +PREPARE stmt FROM " +SELECT * FROM t3 AS t10 +WHERE EXISTS ( + SELECT * FROM t3 AS t20 WHERE t10.i IN ( + SELECT i FROM t3 + ) +)"; + +EXECUTE stmt; +EXECUTE stmt; + +drop table t1, t2, t3; + SET optimizer_switch= @@global.optimizer_switch; set @@tmp_table_size= @@global.tmp_table_size; + +--echo # +--echo # MDEV-10232 Scalar result of subquery changes after adding an outer select stmt +--echo # + +create table t1(c1 int, c2 int, primary key(c2)); +insert into t1 values(2,1),(1,2); +select (select c1 from t1 group by c1,c2 order by c1 limit 1) as x; +(select c1 from t1 group by c1,c2 order by c1 limit 1); +drop table t1; diff --git a/mysql-test/t/subselect_cache.test b/mysql-test/t/subselect_cache.test index 21247541fb6..55da0000f13 100644 --- a/mysql-test/t/subselect_cache.test +++ b/mysql-test/t/subselect_cache.test @@ -24,10 +24,10 @@ select a, (select d from t2 where b=c) from t1; show status like "subquery_cache%"; show status like '%Handler_read%'; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select a, (select d from t2 where b=c) from t1; ---replace_regex /"r_total_time_ms": [0-9]*[.]?[0-9]*/"r_total_time_ms": "REPLACED"/ +--source include/analyze-format.inc analyze format=json select a, (select d from t2 where b=c), (select d from t2 where b=c union select 1 order by 1 limit 1) from t1; explain format=json diff --git a/mysql-test/t/subselect_sj2.test b/mysql-test/t/subselect_sj2.test index 5d6639a6d5a..a948b086a85 100644 --- a/mysql-test/t/subselect_sj2.test +++ b/mysql-test/t/subselect_sj2.test @@ -1449,5 +1449,20 @@ SELECT * FROM t1 WHERE t1.id IN ( drop table t1,t2,t3; +--echo # +--echo # MDEV-11108: Assertion `uniq_tuple_length_arg <= table->file->max_key_length()' failed in SJ_TMP_TABLE::create_sj_weedout_tmp_table +--echo # + +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +CREATE TABLE t2 (pk BLOB, b INT, PRIMARY KEY(pk(1000))) ENGINE=InnoDB; +CREATE TABLE t3 (c INT) ENGINE=InnoDB; +CREATE OR REPLACE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3; + +INSERT INTO t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8); +SELECT * FROM t1, t2 +WHERE a IN ( SELECT b FROM t2 LEFT JOIN v3 ON ( c = b ) ) ; +DROP TABLE t1,t2,t3; +DROP VIEW v3; + --echo # This must be the last in the file: set optimizer_switch=@subselect_sj2_tmp; diff --git a/mysql-test/t/subselect_sj_mat.test b/mysql-test/t/subselect_sj_mat.test index 559b380a7dc..e20291cfa67 100644 --- a/mysql-test/t/subselect_sj_mat.test +++ b/mysql-test/t/subselect_sj_mat.test @@ -1329,7 +1329,7 @@ DROP TABLE t1,t2,t3,t4,t5; --echo # CREATE TABLE t2 (a int); -INSERT INTO t2 VALUES ('a'),('a'); +INSERT IGNORE INTO t2 VALUES ('a'),('a'); CREATE TABLE t4 (a varchar(1)); INSERT INTO t4 VALUES ('m'),('o'); diff --git a/mysql-test/t/system_mysql_db_refs.test b/mysql-test/t/system_mysql_db_refs.test index c5146e1b043..63f30e7db63 100644 --- a/mysql-test/t/system_mysql_db_refs.test +++ b/mysql-test/t/system_mysql_db_refs.test @@ -11,37 +11,37 @@ set @name="This is a very long string, that mustn't find room in a system field create table test_db select * from mysql.db; delete from test_db; --disable_warnings -insert into test_db (Host,Db,User) values (@name,@name,@name); +insert ignore into test_db (Host,Db,User) values (@name,@name,@name); --enable_warnings create table test_host select * from mysql.host; delete from test_host; --disable_warnings -insert into test_host (Host,Db) values (@name,@name); +insert ignore into test_host (Host,Db) values (@name,@name); --enable_warnings create table test_user select * from mysql.user; delete from test_user; --disable_warnings -insert into test_user (Host,User) values (@name,@name); +insert ignore into test_user (Host,User) values (@name,@name); --enable_warnings create table test_func select * from mysql.func; delete from test_func; --disable_warnings -insert into test_func (name) values (@name); +insert ignore into test_func (name) values (@name); --enable_warnings create table test_tables_priv select * from mysql.tables_priv; delete from test_tables_priv; --disable_warnings -insert into test_tables_priv (Host,Db,User,Table_name) values (@name,@name,@name,@name); +insert ignore into test_tables_priv (Host,Db,User,Table_name) values (@name,@name,@name,@name); --enable_warnings create table test_columns_priv select * from mysql.columns_priv; delete from test_columns_priv; --disable_warnings -insert into test_columns_priv (Host,Db,User,Table_name,Column_name) values (@name,@name,@name,@name,@name); +insert ignore into test_columns_priv (Host,Db,User,Table_name,Column_name) values (@name,@name,@name,@name,@name); --enable_warnings # 'Host' field must be the same for all the tables: diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index 050bd5ea56e..83b6966c676 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -2367,7 +2367,7 @@ DROP TABLE t1, t2; CREATE TABLE t1 (id INT NOT NULL); CREATE TABLE t2 (id INT NOT NULL); INSERT t1 VALUES (1),(2),(3); -UPDATE t1 SET id=NULL; +UPDATE IGNORE t1 SET id=NULL; CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (3); UPDATE t1 SET id=NULL; @@ -2463,6 +2463,7 @@ DROP TEMPORARY TABLE t2; # Bug#36649: Condition area is not properly cleaned up after stored routine invocation # +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; --disable_warnings DROP TRIGGER IF EXISTS trg1; DROP TABLE IF EXISTS t1; @@ -2512,6 +2513,7 @@ BEGIN END| delimiter ;| +SET sql_mode = DEFAULT; INSERT INTO t1 VALUES (0); SELECT * FROM t1; diff --git a/mysql-test/t/trigger_no_defaults-11698.test b/mysql-test/t/trigger_no_defaults-11698.test new file mode 100644 index 00000000000..fab7845ad7d --- /dev/null +++ b/mysql-test/t/trigger_no_defaults-11698.test @@ -0,0 +1,25 @@ +# +# MDEV-11698 Old Bug possibly not fixed; BEFORE INSERT Trigger on NOT NULL +# +set sql_mode='strict_all_tables'; +create table t1 (a int not null, b int); +--error ER_NO_DEFAULT_FOR_FIELD +insert t1 (b) values (1); +delimiter |; +create trigger trgi before insert on t1 for each row + case new.b + when 10 then + set new.a = new.b; + when 30 then + set new.a = new.a; + else + do 1; + end case| +delimiter ;| +insert t1 (b) values (10); +--error ER_NO_DEFAULT_FOR_FIELD +insert t1 (b) values (20); +# arguably the statement below should fail too +insert t1 (b) values (30); +select * from t1; +drop table t1; diff --git a/mysql-test/t/trigger_null-8605.test b/mysql-test/t/trigger_null-8605.test index 748768a1849..34a57654b48 100644 --- a/mysql-test/t/trigger_null-8605.test +++ b/mysql-test/t/trigger_null-8605.test @@ -373,3 +373,17 @@ show columns from t1; insert into t1 (a) values (3); show columns from t1; drop table t1; + +# +# MDEV-11551 Server crashes in Field::is_real_null +# +create table t1 ( + pk int primary key, + i int, + v1 int as (i) virtual, + v2 int as (i) virtual +); +create trigger tr before update on t1 for each row set @a = 1; +--error ER_BAD_NULL_ERROR +insert into t1 (pk, i) values (null, null); +drop table t1; diff --git a/mysql-test/t/type_binary.test b/mysql-test/t/type_binary.test index b583e257aa9..952bc6ef231 100644 --- a/mysql-test/t/type_binary.test +++ b/mysql-test/t/type_binary.test @@ -74,7 +74,7 @@ select hex(cast(0x10 as binary(2))); # create table t1 (b binary(2), vb varbinary(2)); insert into t1 values(0x4120, 0x4120); -insert into t1 values(0x412020, 0x412020); +insert ignore into t1 values(0x412020, 0x412020); drop table t1; create table t1 (c char(2), vc varchar(2)); insert into t1 values(0x4120, 0x4120); @@ -95,7 +95,7 @@ set @@sql_mode= @old_sql_mode; # Bug#14171: Wrong default value for a BINARY field # create table t1(f1 int, f2 binary(2) not null, f3 char(2) not null); -insert into t1 set f1=1; +insert ignore into t1 set f1=1; select hex(f2), hex(f3) from t1; drop table t1; diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test index 2ca608e76ff..761f200fe0c 100644 --- a/mysql-test/t/type_bit.test +++ b/mysql-test/t/type_bit.test @@ -168,7 +168,7 @@ drop table t1; # create table t1 (a bit(8)) engine=heap; -insert into t1 values ('1111100000'); +insert ignore into t1 values ('1111100000'); select a+0 from t1; drop table t1; @@ -257,7 +257,7 @@ drop table bug15583; # create table t1(a bit(1), b smallint unsigned); -insert into t1 (b, a) values ('2', '1'); +insert ignore into t1 (b, a) values ('2', '1'); select hex(a), b from t1; drop table t1; @@ -324,7 +324,7 @@ DROP TABLE t2; CREATE TABLE t1(a BIT(13), KEY(a)); --disable_warnings -INSERT INTO t1(a) VALUES +INSERT IGNORE INTO t1(a) VALUES (65535),(65525),(65535),(65535),(65535),(65535),(65535),(65535),(65535),(65535); --enable_warnings diff --git a/mysql-test/t/type_bit_innodb.test b/mysql-test/t/type_bit_innodb.test index 27eaeda0f99..4c6f9bc1b49 100644 --- a/mysql-test/t/type_bit_innodb.test +++ b/mysql-test/t/type_bit_innodb.test @@ -38,7 +38,7 @@ select hex(a) from t1; drop table t1; create table t1 (a bit) engine=innodb; -insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001'); +insert ignore into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001'); select hex(a) from t1; # It is not deterministic which duplicate will be seen first --replace_regex /entry '(.*)' for/entry '' for/ @@ -47,7 +47,7 @@ alter table t1 add unique (a); drop table t1; create table t1 (a bit(2)) engine=innodb; -insert into t1 values (b'00'), (b'01'), (b'10'), (b'100'); +insert ignore into t1 values (b'00'), (b'01'), (b'10'), (b'100'); select a+0 from t1; alter table t1 add key (a); explain select a+0 from t1; diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test index b818e1b451d..8db6ac6da2a 100644 --- a/mysql-test/t/type_blob.test +++ b/mysql-test/t/type_blob.test @@ -17,7 +17,9 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7; CREATE TABLE t1 (a blob, b text, c blob(250), d text(70000), e text(70000000)); show columns from t1; # PS doesn't give errors on prepare yet +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 (a char(255), b varbinary(70000), c varchar(70000000)); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t4 (c varchar(65530) character set utf8 not null); show columns from t2; create table t3 (a long, b long byte); @@ -33,6 +35,7 @@ drop table t1,t2,t3,t4; CREATE TABLE t1 (a char(257) default "hello"); --error 1074 CREATE TABLE t2 (a char(256)); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 (a varchar(70000) default "hello"); SHOW CREATE TABLE t1; CREATE TABLE t2 (a blob default "hello"); diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test index 63c89f318fc..11924f696db 100644 --- a/mysql-test/t/type_date.test +++ b/mysql-test/t/type_date.test @@ -121,7 +121,7 @@ DROP TABLE t1, t2, t3; # Test that setting YEAR to invalid string results in default value, not # 2000. (Bug #6067) CREATE TABLE t1 (y YEAR); -INSERT INTO t1 VALUES ('abc'); +INSERT IGNORE INTO t1 VALUES ('abc'); SELECT * FROM t1; DROP TABLE t1; @@ -145,7 +145,7 @@ select year(@d), month(@d), day(@d), cast(@d as date); select @d:=1311; select year(@d), month(@d), day(@d), cast(@d as date); create table t1 (d date , dt datetime , ts timestamp); -insert into t1 values (9912101,9912101,9912101); +insert ignore into t1 values (9912101,9912101,9912101); insert into t1 values (11111,11111,11111); select * from t1; drop table t1; @@ -282,7 +282,7 @@ DROP TABLE t1; # lp:737496 Field_temporal::store_TIME_with_warning() in 5.1-micro # create table t1 (f1 date, key (f1)); -insert t1 values ('2010-10-10 15:foobar'); +insert ignore t1 values ('2010-10-10 15:foobar'); drop table t1; --echo # diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test index b16d426ab70..99c9bb656e6 100644 --- a/mysql-test/t/type_datetime.test +++ b/mysql-test/t/type_datetime.test @@ -24,7 +24,7 @@ select * from t1; # Test some wrong dates truncate table t1; -insert into t1 values("2003-0303 12:13:14"); +insert ignore into t1 values("2003-0303 12:13:14"); select * from t1; drop table t1; @@ -88,16 +88,16 @@ drop table t1; # warnings (for both strings and numbers) # create table t1 (t datetime); -insert into t1 values (20030102030460),(20030102036301),(20030102240401), +insert ignore into t1 values (20030102030460),(20030102036301),(20030102240401), (20030132030401),(20031302030401),(100001202030401); select * from t1; delete from t1; -insert into t1 values +insert ignore into t1 values ("2003-01-02 03:04:60"),("2003-01-02 03:63:01"),("2003-01-02 24:04:01"), ("2003-01-32 03:04:01"),("2003-13-02 03:04:01"), ("10000-12-02 03:04:00"); select * from t1; delete from t1; -insert into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer"); +insert ignore into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer"); select * from t1 order by t; drop table t1; diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test index 834fd0c5327..777bb2f23e5 100644 --- a/mysql-test/t/type_decimal.test +++ b/mysql-test/t/type_decimal.test @@ -162,34 +162,34 @@ create table t1 (a decimal(10,2)); insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); insert into t1 values ("-.1"),("+.1"),(".1"); insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); -insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); -insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); -insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); -insert into t1 values ("1e+4294967296"),("1e-4294967296"); -insert into t1 values ("1e+18446744073709551615"),("1e+18446744073709551616"),("1e-9223372036854775807"),("1e-9223372036854775809"); -insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); +insert ignore into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); +insert ignore into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); +insert ignore into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); +insert ignore into t1 values ("1e+4294967296"),("1e-4294967296"); +insert ignore into t1 values ("1e+18446744073709551615"),("1e+18446744073709551616"),("1e-9223372036854775807"),("1e-9223372036854775809"); +insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); select * from t1; drop table t1; create table t1 (a decimal(10,2) unsigned); insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); -insert into t1 values ("-.1"),("+.1"),(".1"); +insert ignore into t1 values ("-.1"),("+.1"),(".1"); insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); -insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); -insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); -insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); -insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); +insert ignore into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); +insert ignore into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); +insert ignore into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); +insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); select * from t1; drop table t1; create table t1 (a decimal(10,2) zerofill); insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); -insert into t1 values ("-.1"),("+.1"),(".1"); +insert ignore into t1 values ("-.1"),("+.1"),(".1"); insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); -insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); -insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); -insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); -insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); +insert ignore into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); +insert ignore into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); +insert ignore into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); +insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); select * from t1; drop table t1; @@ -199,9 +199,9 @@ create table t1 (a decimal(10,2)); insert into t1 values (0.0),("-0.0"),(+0.0),(01.0),(+01.0),(-01.0); insert into t1 values (-.1),(+.1),(.1); insert into t1 values (00000000000001),(+0000000000001),(-0000000000001); -insert into t1 values (+111111111.11),(111111111.11),(-11111111.11); -insert into t1 values (-111111111.11),(+1111111111.11),(1111111111.11); -insert into t1 values (1e+100),(1e-100),(-1e+100); +insert ignore into t1 values (+111111111.11),(111111111.11),(-11111111.11); +insert ignore into t1 values (-111111111.11),(+1111111111.11),(1111111111.11); +insert ignore into t1 values (1e+100),(1e-100),(-1e+100); insert into t1 values (123.4e0),(123.4e+2),(123.4e-2),(123e1),(123e+0); insert into t1 values (MID("987",1,2)),("987 "),("987.6e+2 "); select * from t1; @@ -212,28 +212,28 @@ drop table t1; # create table t1 (a decimal); -insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999); +insert ignore into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999); select * from t1; drop table t1; create table t1 (a decimal unsigned); -insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); +insert ignore into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); select * from t1; drop table t1; create table t1 (a decimal zerofill); -insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); +insert ignore into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); select * from t1; drop table t1; create table t1 (a decimal unsigned zerofill); -insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); +insert ignore into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); select * from t1; drop table t1; # Exponent overflow bug create table t1(a decimal(10,0)); -insert into t1 values ("1e4294967295"); +insert ignore into t1 values ("1e4294967295"); select * from t1; delete from t1; -insert into t1 values("1e4294967297"); +insert ignore into t1 values("1e4294967297"); select * from t1; drop table t1; diff --git a/mysql-test/t/type_enum.test b/mysql-test/t/type_enum.test index 63e9e9e7b09..105da427219 100644 --- a/mysql-test/t/type_enum.test +++ b/mysql-test/t/type_enum.test @@ -30,9 +30,9 @@ drop table t1; # create table t1 (a enum ('0','1')); -insert into t1 set a='foobar'; +insert ignore into t1 set a='foobar'; select * from t1; -update t1 set a = replace(a,'x','y'); +update ignore t1 set a = replace(a,'x','y'); select * from t1; drop table t1; @@ -165,9 +165,10 @@ CREATE TABLE t1 ( id INT AUTO_INCREMENT PRIMARY KEY, c1 ENUM('a', '', 'b') ); -INSERT INTO t1 (c1) VALUES (0), ('a'), (''), ('b'); +INSERT IGNORE INTO t1 (c1) VALUES (0), ('a'), (''), ('b'); SELECT id, c1 + 0, c1 FROM t1; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 CHANGE c1 c1 ENUM('a', '') NOT NULL; SELECT id, c1 + 0, c1 FROM t1; @@ -191,7 +192,7 @@ drop table t1; CREATE TABLE t1 (c1 ENUM('a', '', 'b')); INSERT INTO t1 (c1) VALUES ('b'); INSERT INTO t1 (c1) VALUES (''); -INSERT INTO t1 (c1) VALUES (0); +INSERT IGNORE INTO t1 (c1) VALUES (0); INSERT INTO t1 (c1) VALUES (''); SELECT c1 + 0, COUNT(c1) FROM t1 GROUP BY c1; @@ -398,12 +399,13 @@ DROP TABLE t1; CREATE TABLE t1 (a ENUM('9e200','9e100')); CREATE TABLE t2 (a DOUBLE); INSERT INTO t2 VALUES ('9e100'); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; SELECT * FROM t1; DROP TABLE t1,t2; CREATE TABLE t1 (a DOUBLE); INSERT INTO t1 VALUES (9e100); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a ENUM('9e200','9e100'); SELECT * FROM t1; DROP TABLE t1; @@ -411,7 +413,7 @@ DROP TABLE t1; CREATE TABLE t1 (a ENUM('200','100')); CREATE TABLE t2 (a DOUBLE); INSERT INTO t2 VALUES ('100'); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; SELECT * FROM t1; DROP TABLE t1,t2; @@ -419,12 +421,13 @@ DROP TABLE t1,t2; CREATE TABLE t1 (a ENUM('200','100')); CREATE TABLE t2 (a INT); INSERT INTO t2 VALUES ('100'); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; SELECT * FROM t1; DROP TABLE t1,t2; CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES ('200'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a ENUM('200','100'); SELECT *FROM t1; DROP TABLE t1; @@ -432,7 +435,7 @@ DROP TABLE t1; CREATE TABLE t1 (a ENUM('200','100')); CREATE TABLE t2 (a INT); INSERT INTO t2 VALUES ('100'); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; SELECT * FROM t1; DROP TABLE t1,t2; @@ -441,12 +444,13 @@ DROP TABLE t1,t2; CREATE TABLE t1 (a ENUM('2001','2002')); CREATE TABLE t2 (a YEAR); INSERT INTO t2 VALUES ('2001'); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; SELECT * FROM t1; DROP TABLE t1,t2; CREATE TABLE t1 (a YEAR); INSERT INTO t1 VALUES ('2001'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a ENUM('2001','2002'); SELECT * FROM t1; DROP TABLE t1; diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test index f54eacf0595..4e8cee75d63 100644 --- a/mysql-test/t/type_float.test +++ b/mysql-test/t/type_float.test @@ -83,8 +83,8 @@ create table t1 (a float(200,100), b double(200,100)); # float in a char(1) field # create table t1 (c20 char); -insert into t1 values (5000.0); -insert into t1 values (0.5e4); +insert ignore into t1 values (5000.0); +insert ignore into t1 values (0.5e4); drop table t1; # Errors @@ -98,18 +98,18 @@ drop table if exists t1; # Don't allow 'double unsigned' to be set to a negative value (Bug #7700) create table t1 (d1 double, d2 double unsigned); insert into t1 set d1 = -1.0; -update t1 set d2 = d1; +update ignore t1 set d2 = d1; select * from t1; drop table t1; # Ensure that maximum values as the result of number of decimals # being specified in table schema are enforced (Bug #7361) create table t1 (f float(4,3)); -insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11"); +insert ignore into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11"); select * from t1; drop table if exists t1; create table t1 (f double(4,3)); -insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11"); +insert ignore into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11"); select * from t1; drop table if exists t1; @@ -241,14 +241,14 @@ DROP TABLE t1; create table t1 (f1 double(200, 0)); insert into t1 values (1e199), (-1e199); insert into t1 values (1e200), (-1e200); -insert into t1 values (2e200), (-2e200); +insert ignore into t1 values (2e200), (-2e200); select f1 + 0e0 from t1; drop table t1; create table t1 (f1 float(30, 0)); insert into t1 values (1e29), (-1e29); insert into t1 values (1e30), (-1e30); -insert into t1 values (2e30), (-2e30); +insert ignore into t1 values (2e30), (-2e30); select f1 + 0e0 from t1; drop table t1; @@ -339,8 +339,8 @@ select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo; CREATE TABLE t1 (f FLOAT); INSERT INTO t1 VALUES ('1.'); -INSERT INTO t1 VALUES ('2.0.'); -INSERT INTO t1 VALUES ('.'); +INSERT IGNORE INTO t1 VALUES ('2.0.'); +INSERT IGNORE INTO t1 VALUES ('.'); SELECT * FROM t1 ORDER BY f; DROP TABLE t1; @@ -467,8 +467,8 @@ DROP TABLE t1; --echo # MDEV-4102 Limitation on DOUBLE or REAL length is ignored with INSERT .. SELECT --echo # CREATE TABLE t1 (d1 DOUBLE(5,2), d2 DOUBLE(10,2)); -INSERT INTO t1 VALUES (10000000.55, 10000000.55); -INSERT INTO t1 SELECT d2, d2 FROM t1; +INSERT IGNORE INTO t1 VALUES (10000000.55, 10000000.55); +INSERT IGNORE INTO t1 SELECT d2, d2 FROM t1; SELECT * FROM t1; DROP TABLE t1; @@ -481,14 +481,14 @@ CREATE TABLE t1 ( d10_10 DOUBLE PRECISION (10,10), d53_10 DOUBLE(53,10) ); -INSERT INTO t1 (f,d10_10,d53_10) VALUES ( +INSERT IGNORE INTO t1 (f,d10_10,d53_10) VALUES ( -9999999999999999999999999999999999999999999.9999999999, -9999999999999999999999999999999999999999999.9999999999, -9999999999999999999999999999999999999999999.9999999999 ); --vertical_results SELECT * FROM t1; -INSERT INTO t1 (f,d10_10,d53_10) SELECT d53_10, d53_10, d53_10 FROM t1; +INSERT IGNORE INTO t1 (f,d10_10,d53_10) SELECT d53_10, d53_10, d53_10 FROM t1; SELECT * FROM t1; ALTER TABLE t1 ADD COLUMN i INT; SELECT * FROM t1; @@ -498,14 +498,14 @@ DROP TABLE t1; CREATE TABLE t1 (d10_10 DOUBLE (10,10)); CREATE TABLE t2 (d53_10 DOUBLE (53,10)); INSERT INTO t2 VALUES (-9999999999999999999999999999999999999999999.9999999999); -INSERT INTO t1 (d10_10) SELECT d53_10 FROM t2; +INSERT IGNORE INTO t1 (d10_10) SELECT d53_10 FROM t2; SELECT * FROM t1; DROP TABLE t1,t2; CREATE TABLE t1 (d2_2 FLOAT (2,2)); CREATE TABLE t2 (d4_2 FLOAT (4,2)); INSERT INTO t2 VALUES (99.99); -INSERT INTO t1 (d2_2) SELECT d4_2 FROM t2; +INSERT IGNORE INTO t1 (d2_2) SELECT d4_2 FROM t2; SELECT * FROM t1; DROP TABLE t1,t2; diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index 152c3ade487..eb0fac57150 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -50,13 +50,13 @@ drop table t1; # create table t1 (a decimal(4,2)); -insert into t1 value (10000), (1.1e10), ("11111"), (100000.1); -insert into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1); +insert ignore into t1 value (10000), (1.1e10), ("11111"), (100000.1); +insert ignore into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1); select a from t1; drop table t1; create table t1 (a decimal(4,2) unsigned); -insert into t1 value (10000), (1.1e10), ("11111"), (100000.1); -insert into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1); +insert ignore into t1 value (10000), (1.1e10), ("11111"), (100000.1); +insert ignore into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1); select a from t1; drop table t1; @@ -65,21 +65,21 @@ drop table t1; # saving in field with overflow from decimal # create table t1 (a bigint); -insert into t1 values (18446744073709551615.0); -insert into t1 values (9223372036854775808.0); -insert into t1 values (-18446744073709551615.0); +insert ignore into t1 values (18446744073709551615.0); +insert ignore into t1 values (9223372036854775808.0); +insert ignore into t1 values (-18446744073709551615.0); select * from t1; drop table t1; create table t1 (a bigint unsigned); insert into t1 values (18446744073709551615.0); insert into t1 values (9223372036854775808.0); -insert into t1 values (9999999999999999999999999.000); -insert into t1 values (-1.0); +insert ignore into t1 values (9999999999999999999999999.000); +insert ignore into t1 values (-1.0); select * from t1; drop table t1; create table t1 (a tinyint); -insert into t1 values (18446744073709551615.0); -insert into t1 values (9223372036854775808.0); +insert ignore into t1 values (18446744073709551615.0); +insert ignore into t1 values (9223372036854775808.0); select * from t1; drop table t1; diff --git a/mysql-test/t/type_num.test b/mysql-test/t/type_num.test index 64242e34160..87f5cc609d9 100644 --- a/mysql-test/t/type_num.test +++ b/mysql-test/t/type_num.test @@ -433,17 +433,17 @@ CREATE TABLE t1 ( ); INSERT INTO t1 VALUES ('1 ','1 ','1 ','1 ','1 ','1 ','1 '); -INSERT INTO t1 VALUES ('','','','','','',''); -INSERT INTO t1 VALUES ('x','x','x','x','x','x','x'); -INSERT INTO t1 VALUES (' x',' x',' x',' x',' x',' x',' x'); -INSERT INTO t1 VALUES ('.','.','.','.','.','.','.'); -INSERT INTO t1 VALUES ('-','-','-','-','-','-','-'); -INSERT INTO t1 VALUES ('+','+','+','+','+','+','+'); -INSERT INTO t1 VALUES ('1x','1x','1x','1x','1x','1x','1x'); -INSERT INTO t1 VALUES ('1e','1e','1e','1e','1e','1e','1e'); -INSERT INTO t1 VALUES ('1e-','1e-','1e-','1e-','1e-','1e-','1e-'); -INSERT INTO t1 VALUES ('1E+','1E+','1E+','1E+','1E+','1E+','1E+'); -INSERT INTO t1 VALUES ('1e1000','1e1000','1e1000','1e1000','1e1000','1e1000','1e1000'); +INSERT IGNORE INTO t1 VALUES ('','','','','','',''); +INSERT IGNORE INTO t1 VALUES ('x','x','x','x','x','x','x'); +INSERT IGNORE INTO t1 VALUES (' x',' x',' x',' x',' x',' x',' x'); +INSERT IGNORE INTO t1 VALUES ('.','.','.','.','.','.','.'); +INSERT IGNORE INTO t1 VALUES ('-','-','-','-','-','-','-'); +INSERT IGNORE INTO t1 VALUES ('+','+','+','+','+','+','+'); +INSERT IGNORE INTO t1 VALUES ('1x','1x','1x','1x','1x','1x','1x'); +INSERT IGNORE INTO t1 VALUES ('1e','1e','1e','1e','1e','1e','1e'); +INSERT IGNORE INTO t1 VALUES ('1e-','1e-','1e-','1e-','1e-','1e-','1e-'); +INSERT IGNORE INTO t1 VALUES ('1E+','1E+','1E+','1E+','1E+','1E+','1E+'); +INSERT IGNORE INTO t1 VALUES ('1e1000','1e1000','1e1000','1e1000','1e1000','1e1000','1e1000'); DELETE FROM t1; INSERT INTO t1 VALUES (0,0,0,0,0,0,0); diff --git a/mysql-test/t/type_ranges.test b/mysql-test/t/type_ranges.test index 44b0835fcae..7bf29321d06 100644 --- a/mysql-test/t/type_ranges.test +++ b/mysql-test/t/type_ranges.test @@ -58,10 +58,10 @@ DROP INDEX test ON t1; insert into t1 values (10, 1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one'); insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,NULL,NULL,NULL,NULL,NULL,NULL,2,2,'two','two,one'); -insert into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3); -insert into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1); -insert into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,NULL,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree"); -insert into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,NULL,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0); +insert ignore into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3); +insert ignore into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1); +insert ignore into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,NULL,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree"); +insert ignore into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,NULL,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0); insert into t1 (tiny) values (1); select auto,string,tiny,short,medium,long_int,longlong,real_float,real_double,utiny,ushort,umedium,ulong,ulonglong,mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000),date_field,time_field,date_time,blob_col,tinyblob_col,mediumblob_col,longblob_col from t1; @@ -103,7 +103,7 @@ CREATE TABLE t2 ( PRIMARY KEY (auto) ); -INSERT INTO t2 (string,mediumblob_col,new_field) SELECT string,mediumblob_col,new_field from t1 where auto > 10; +INSERT IGNORE INTO t2 (string,mediumblob_col,new_field) SELECT string,mediumblob_col,new_field from t1 where auto > 10; select * from t2; diff --git a/mysql-test/t/type_set.test b/mysql-test/t/type_set.test index 16e4f42301d..7a79cd12f70 100644 --- a/mysql-test/t/type_set.test +++ b/mysql-test/t/type_set.test @@ -49,6 +49,7 @@ set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17', '18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33', '34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49', '50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','128')); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1(f1 set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17', '18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33', diff --git a/mysql-test/t/type_temporal_innodb.test b/mysql-test/t/type_temporal_innodb.test index ac5daca6508..1ab68961eaa 100644 --- a/mysql-test/t/type_temporal_innodb.test +++ b/mysql-test/t/type_temporal_innodb.test @@ -12,7 +12,7 @@ SELECT TIME'00:00:00'=''; CREATE TABLE t1 (a ENUM('a'), b TIME, c INT, KEY(b)) ENGINE=InnoDB; -INSERT INTO t1 VALUES ('','00:00:00',0); +INSERT IGNORE INTO t1 VALUES ('','00:00:00',0); SELECT * FROM t1 WHERE b=''; SELECT * FROM t1 IGNORE KEY (b) WHERE b=''; SELECT * FROM t1 WHERE a=b; @@ -29,7 +29,7 @@ DROP TABLE t1; SELECT DATE'0000-00-00'=''; CREATE TABLE t1 (a ENUM('a'), b DATE, c INT, KEY(b)) ENGINE=InnoDB; -INSERT INTO t1 VALUES ('','0000-00-00',0); +INSERT IGNORE INTO t1 VALUES ('','0000-00-00',0); SELECT * FROM t1 WHERE b=''; SELECT * FROM t1 IGNORE KEY (b) WHERE b=''; SELECT * FROM t1 WHERE a=b; @@ -46,7 +46,7 @@ DROP TABLE t1; SELECT TIMESTAMP'0000-00-00 00:00:00'=''; CREATE TABLE t1 (a ENUM('a'), b DATETIME, c INT, KEY(b)) ENGINE=InnoDB; -INSERT INTO t1 VALUES ('','0000-00-00 00:00:00',0); +INSERT IGNORE INTO t1 VALUES ('','0000-00-00 00:00:00',0); SELECT * FROM t1 WHERE b=''; SELECT * FROM t1 IGNORE KEY (b) WHERE b=''; SELECT * FROM t1 WHERE a=b; diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test index c4b93d6dbb2..fb96597e296 100644 --- a/mysql-test/t/type_time.test +++ b/mysql-test/t/type_time.test @@ -11,7 +11,7 @@ insert into t1 values("10:22:33"),("12:34:56.78"),(10),(1234),(123456.78),(12345 insert t1 values (30),(1230),("1230"),("12:30"),("12:30:35"),("1 12:30:31.32"); select * from t1; # Test wrong values -insert into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a"); +insert ignore into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a"); select * from t1; drop table t1; @@ -219,7 +219,7 @@ CREATE TABLE t1 (a TIME(6)); --error ER_TRUNCATED_WRONG_VALUE INSERT INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED)); SET sql_mode=DEFAULT; -INSERT INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED)); +INSERT IGNORE INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED)); SELECT * FROM t1; DROP TABLE t1; SELECT TIME'00:00:00'> CAST(0xFFFFFFFF00000000 AS UNSIGNED); @@ -740,6 +740,7 @@ CREATE TABLE t1 (a YEAR, b TIME, c YEAR); CREATE TABLE t2 (a YEAR); INSERT INTO t2 VALUES (0),(1999),(2000),(2030),(2050),(2070); INSERT INTO t1 (a,b,c) SELECT a,a,a FROM t2; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY c TIME; SELECT * FROM t1; DROP TABLE t1,t2; diff --git a/mysql-test/t/type_timestamp.test b/mysql-test/t/type_timestamp.test index 460769f8961..b90e122aa79 100644 --- a/mysql-test/t/type_timestamp.test +++ b/mysql-test/t/type_timestamp.test @@ -78,7 +78,7 @@ truncate table t1; insert into t1 values ("00000000000000"),("20030101010160"),("20030101016001"),("20030101240101"),("20030132010101"),("20031301010101"),("20031200000000"),("20030000000000"); select ix+0 from t1; truncate table t1; -insert into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer"); +insert ignore into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer"); select ix+0 from t1; drop table t1; diff --git a/mysql-test/t/type_uint.test b/mysql-test/t/type_uint.test index 84fca993d09..ae48b30997a 100644 --- a/mysql-test/t/type_uint.test +++ b/mysql-test/t/type_uint.test @@ -9,8 +9,8 @@ SET SQL_WARNINGS=1; create table t1 (this int unsigned); insert into t1 values (1); -insert into t1 values (-1); -insert into t1 values ('5000000000'); +insert ignore into t1 values (-1); +insert ignore into t1 values ('5000000000'); select * from t1; drop table t1; diff --git a/mysql-test/t/type_year.test b/mysql-test/t/type_year.test index 22f164a757c..117906fd889 100644 --- a/mysql-test/t/type_year.test +++ b/mysql-test/t/type_year.test @@ -17,7 +17,7 @@ drop table t1; # create table t1 (y year); -insert into t1 values (now()); +insert ignore into t1 values (now()); select if(y = now(), 1, 0) from t1; drop table t1; @@ -138,7 +138,7 @@ DROP TABLE t2, t4; --echo # CREATE TABLE t1 (y YEAR NOT NULL, s VARCHAR(4)); -INSERT INTO t1 (s) VALUES ('bad'); +INSERT IGNORE INTO t1 (s) VALUES ('bad'); INSERT INTO t1 (y, s) VALUES (0, 0), (2000, 2000), (2001, 2001); SELECT * FROM t1 ta, t1 tb WHERE ta.y = tb.y; @@ -219,32 +219,34 @@ DROP TABLE t1; --echo # MDEV-9392 Copying from DECIMAL to YEAR is not consistent about warnings --echo # CREATE TABLE t1 (a YEAR); -INSERT INTO t1 VALUES (-0.1); +INSERT IGNORE INTO t1 VALUES (-0.1); DROP TABLE t1; CREATE TABLE t1 (a YEAR); CREATE TABLE t2 (a DECIMAL(10,1)); INSERT INTO t2 VALUES (-0.1); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; DROP TABLE t1,t2; CREATE TABLE t1 (a DECIMAL(10,1)); INSERT INTO t1 VALUES (-0.1); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a YEAR; DROP TABLE t1; CREATE TABLE t1 (a YEAR); -INSERT INTO t1 VALUES (-0.1e0); +INSERT IGNORE INTO t1 VALUES (-0.1e0); DROP TABLE t1; CREATE TABLE t1 (a YEAR); CREATE TABLE t2 (a DOUBLE); INSERT INTO t2 VALUES (-0.1); -INSERT INTO t1 SELECT * FROM t2; +INSERT IGNORE INTO t1 SELECT * FROM t2; DROP TABLE t1,t2; CREATE TABLE t1 (a DOUBLE); INSERT INTO t1 VALUES (-0.1); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a YEAR; DROP TABLE t1; diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index 151512515b9..e0c011e3d20 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -1057,7 +1057,6 @@ ORDER BY a; DROP TABLE t1; ---echo End of 5.0 tests -- echo # -- echo # Bug#32858: Error: "Incorrect usage of UNION and INTO" does not take -- echo # subselects into account @@ -1160,6 +1159,8 @@ create table t1 (a int); insert into t1 values (10),(10),(10),(2),(3),(4),(5),(6),(7),(8),(9),(1),(10); --sorted_result select a from t1 where false UNION select a from t1 limit 8; +--sorted_result +(select a from t1 where false) UNION (select a from t1) limit 8; drop table t1; --echo # @@ -1385,6 +1386,26 @@ UNION drop table t1; + +--echo # +--echo # MDEV-10172: UNION query returns incorrect rows outside +--echo # conditional evaluation +--echo # + +create table t1 (d datetime not null primary key); +insert into t1(d) values ('2016-06-01'),('2016-06-02'),('2016-06-03'),('2016-06-04'); +select * from +( + select * from t1 where d between '2016-06-02' and '2016-06-05' + union + (select * from t1 where d < '2016-06-05' order by d desc limit 1) +) onlyJun2toJun4 +order by d; +drop table t1; + +--echo End of 5.0 tests + + --echo # --echo # WL#1763 Avoid creating temporary table in UNION ALL --echo # @@ -1486,4 +1507,3 @@ SELECT * FROM t1 t1_1 LEFT JOIN t1 t1_2 ON ( t1_2.b = t1_1.a ) WHERE t1_2.b NOT IN ( SELECT 4 UNION ALL SELECT 5 ); DROP TABLE t1; - diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index c3f462eab18..e5dd22c64c3 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -1,11 +1,3 @@ - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t9,`t1a``b`,v1,v2,v3,v4,v5,v6; -drop view if exists t1,t2,t3,t4,t5,t6,t9,`t1a``b`,v1,v2,v3,v4,v5,v6; -drop database if exists mysqltest; ---enable_warnings -use test; - # Save the initial number of concurrent sessions. --source include/count_sessions.inc @@ -1222,6 +1214,7 @@ drop table t1; # # changing value by trigger and CHECK OPTION # +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t1 (s1 tinyint); create trigger t1_bi before insert on t1 for each row set new.s1 = 500; create view v1 as select * from t1 where s1 <> 127 with check option; @@ -1232,6 +1225,7 @@ select * from t1; drop trigger t1_bi; drop view v1; drop table t1; +SET sql_mode = default; # # CASCADED should be used for all underlaying VIEWs @@ -1413,6 +1407,7 @@ execute stmt1 using @a; set @a= 301; execute stmt1 using @a; deallocate prepare stmt1; +--sorted_result select * from v3; drop view v3; @@ -2678,7 +2673,7 @@ DROP TABLE t1,t2; CREATE TABLE t1 (a INT NOT NULL, b INT NULL DEFAULT NULL); CREATE VIEW v1 AS SELECT a, b FROM t1; -INSERT INTO v1 (b) VALUES (2); +INSERT IGNORE INTO v1 (b) VALUES (2); SET SQL_MODE = STRICT_ALL_TABLES; --error ER_NO_DEFAULT_FOR_VIEW_FIELD @@ -3571,7 +3566,7 @@ DROP TABLE t1; --echo # create table t1(f1 int, f2 int not null); create view v1 as select f1 from t1; -insert into v1 values(1); +insert ignore into v1 values(1); set @old_mode=@@sql_mode; set @@sql_mode=traditional; --error ER_NO_DEFAULT_FOR_VIEW_FIELD @@ -5702,6 +5697,28 @@ drop table t1, t2; --error ER_BAD_FIELD_ERROR SELECT 1 FROM (SELECT 1 as a) AS b HAVING (SELECT `SOME_GARBAGE`.b.a)=1; + +--echo # +--echo # MDEV-10035: DBUG_ASSERT on CREATE VIEW v1 AS SELECT * FROM t1 +--echo # FOR UPDATE +--echo # + +CREATE TABLE t1 (a INT); +insert into t1 values (1),(2); + +CREATE VIEW v1 AS SELECT * FROM t1 FOR UPDATE; +SHOW CREATE VIEW v1; +select * from v1; +DROP VIEW v1; + +CREATE VIEW v1 AS SELECT * FROM t1 LOCK IN SHARE MODE; +SHOW CREATE VIEW v1; +select * from v1; +DROP VIEW v1; + +DROP TABLE t1; + + --echo # ----------------------------------------------------------------- --echo # -- End of 10.0 tests. --echo # ----------------------------------------------------------------- @@ -6042,6 +6059,34 @@ INSERT INTO v (f1, f3) VALUES (1,1), (2,2); drop view v; drop tables t1,t2,t3; +# +# MDEV-11784 View is created with invalid definition which causes ERROR 1241 (21000): Operand should contain 1 column(s) +# +create table t1 (i int, j int); +insert t1 values (1,1),(2,2); +create view v1 as select (2, 3) not in (select i, j from t1); +select * from v1; +show create view v1; +drop view v1; +drop table t1; + +--echo # +--echo # MDEV-10704: Assertion `field->field->table == table_arg' +--echo # failed in fill_record(THD*, TABLE*, List&, List&, +--echo # bool, bool) +--echo # + +CREATE TABLE t1 (i INT); +CREATE TABLE t2 (j INT); +CREATE TABLE t3 (k INT); + +CREATE ALGORITHM = MERGE VIEW v AS SELECT j AS f1, k AS f2 FROM ( SELECT j FROM t1, t2 ) sq, t3; +--error ER_VIEW_MULTIUPDATE +REPLACE INTO v (f1,f2) VALUES (1,1); + +drop view v; +drop table t1,t2,t3; + --echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test index 29714438835..573f3c538c7 100644 --- a/mysql-test/t/warnings.test +++ b/mysql-test/t/warnings.test @@ -21,11 +21,11 @@ create table t (i); show count(*) errors; show errors; insert into t1 values (1); -insert into t1 values ("hej"); -insert into t1 values ("hej"),("då"); +insert ignore into t1 values ("hej"); +insert ignore into t1 values ("hej"),("då"); set SQL_WARNINGS=1; -insert into t1 values ("hej"); -insert into t1 values ("hej"),("då"); +insert ignore into t1 values ("hej"); +insert ignore into t1 values ("hej"),("då"); drop table t1; set SQL_WARNINGS=0; @@ -62,17 +62,18 @@ drop table t1; # create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5)); -insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test'); +insert ignore into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test'); +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 modify c char(4); alter table t1 add d char(2); -update t1 set a=NULL where a=10; -update t1 set c='mysql ab' where c='test'; -update t1 set d=c; +update ignore t1 set a=NULL where a=10; +update ignore t1 set c='mysql ab' where c='test'; +update ignore t1 set d=c; create table t2(a tinyint NOT NULL, b char(3)); -insert into t2 select b,c from t1; -insert into t2(b) values('mysqlab'); +insert ignore into t2 select b,c from t1; +insert ignore into t2(b) values('mysqlab'); set sql_warnings=1; -insert into t2(b) values('mysqlab'); +insert ignore into t2(b) values('mysqlab'); set sql_warnings=0; drop table t1, t2; @@ -93,7 +94,7 @@ commit; --enable_query_log alter table t1 add b char; set max_error_count=10; -update t1 set b=a; +update ignore t1 set b=a; --disable_ps_protocol select @@warning_count; --enable_ps_protocol @@ -101,7 +102,7 @@ select @@warning_count; # Bug#9072 set max_error_count=0; show variables like 'max_error_count'; -update t1 set b='hi'; +update ignore t1 set b='hi'; --disable_ps_protocol select @@warning_count; --enable_ps_protocol @@ -119,7 +120,7 @@ drop table t1; create table t1 (a int); insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); # should generate 10 warnings -update t1 set a='abc'; +update ignore t1 set a='abc'; show warnings limit 2, 1; show warnings limit 0, 10; show warnings limit 9, 1; @@ -152,6 +153,7 @@ INSERT INTO t3 VALUES ( 'a`', 'a`', '1000-01-1' ); DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp2; DROP PROCEDURE IF EXISTS sp3; +SET sql_mode = ''; delimiter //; CREATE PROCEDURE sp1() BEGIN @@ -172,8 +174,10 @@ delimiter ;// CALL sp1(); CALL sp2(); CALL sp3(); +SET sql_mode = DEFAULT; DROP PROCEDURE IF EXISTS sp1; +SET sql_mode = ''; delimiter //; CREATE PROCEDURE sp1() BEGIN @@ -182,6 +186,7 @@ SELECT f1 into x from t2 limit 1; END// delimiter ;// CALL sp1(); +SET sql_mode = DEFAULT; DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; diff --git a/mysql-test/t/win.test b/mysql-test/t/win.test index 7052368cf9c..ec083733f77 100644 --- a/mysql-test/t/win.test +++ b/mysql-test/t/win.test @@ -1426,3 +1426,386 @@ select * from v4; drop view v1,v2,v3,v4; drop table t0,t1; + +--echo # +--echo # MDEV-10875: window function in subquery +--echo # + +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (3),(1); + +CREATE TABLE t2 (c VARCHAR(8)); +INSERT INTO t2 VALUES ('foo'),('bar'),('foo'); + +SELECT COUNT(*) OVER (PARTITION BY c) FROM t2; + +SELECT * FROM t1 WHERE i IN ( SELECT COUNT(*) OVER (PARTITION BY c) FROM t2 ); + +DROP TABLE t1, t2; + +--echo # +--echo # MDEV-9976: window function without PARTITION BY and ORDER BY +--echo # + +CREATE TABLE t1 (id int, a int); +INSERT INTO t1 VALUES + (1,1000), (2,1100), (3,1800), (4,1500), (5,1700), (6,1200), + (7,2000), (8,2100), (9,1600); + +--sorted_result +SELECT id, sum(a) OVER (PARTITION BY id + ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) +FROM t1; + +--sorted_result +SELECT id, sum(a) OVER (ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) +FROM t1; + +DROP TABLE t1; + +--echo # +--echo # MDEV-11867: window function with aggregation +--echo # over the result of grouping +--echo # + +create table t1 ( + username varchar(32), + amount int +); + +insert into t1 values +('user1',1), +('user1',5), +('user1',3), +('user2',10), +('user2',20), +('user2',30); + +select username, sum(amount) as s, avg(sum(amount)) over (order by s desc) + from t1 +group by username; + +select username, sum(amount), avg(sum(amount)) over (order by sum(amount) desc) + from t1 +group by username; + +drop table t1; + +--echo # +--echo # MDEV-11594: window function over implicit grouping +--echo # + +create table t1 (id int); +insert into t1 values (1), (2), (3), (2); + +select sum(id) over (order by sum(id)) from t1; + +select sum(sum(id)) over (order by sum(id)) from t1; + +drop table t1; + +--echo # +--echo # MDEV-9923: integer constant in order by list +--echo # of window specification +--echo # + +create table t1 (id int); +insert into t1 values (1), (2), (3), (2); + +select rank() over (order by 1) from t1; +select rank() over (order by 2) from t1; +select rank() over (partition by id order by 2) from t1; + +drop table t1; + +--echo # +--echo # MDEV-10660: view using a simple window function +--echo # + +create table t1 (id int); +insert into t1 values (1), (2), (3), (2); + +create view v1(id,rnk) as + select id, rank() over (order by id) from t1; + +show create view v1; + +select id, rank() over (order by id) from t1; +select * from v1; + +drop view v1; +drop table t1; + +--echo # +--echo # MDEV-11138: window function in the query without tables +--echo # + +select row_number() over (); +select count(*) over (); +select sum(5) over (); +select row_number() over (), sum(5) over (); +select row_number() over (order by 2); +select row_number() over (partition by 2); +select row_number() over (partition by 4 order by 1+2); + +--echo # +--echo # MDEV-11999: execution of prepared statement for +--echo # tableless query with window functions +--echo # + +prepare stmt from +"select row_number() over (partition by 4 order by 1+2)"; +execute stmt; +execute stmt; +deallocate prepare stmt; + +--echo # +--echo # MDEV-11745: window function with min/max +--echo # + +create table t1 (i int, b int); +insert into t1 values + (1,1),(2,1),(3,1),(4,4),(5,4),(6,4),(7,8),(8,8),(9,8),(10,8); + +select b, min(i) over (partition by b) as f + from t1 as tt +order by i; + +select b, min(i) over (partition by b) as f + from (select * from t1) as tt +order by i; + +select b, min(i+10) over (partition by b) as f + from t1 as tt +order by i; + +select b, min(i) over (partition by b) as f + from (select i+10 as i, b from t1) as tt +order by i; + +select b, min(i+20) over (partition by b) as f + from (select i+10 as i, b from t1) as tt +order by i; + +select b, max(i) over (partition by b) as f + from t1 as tt +order by i; + +select b, max(i) over (partition by b) as f + from (select * from t1) as tt +order by i; + +select b, max(i+10) over (partition by b) as f + from t1 as tt +order by i; + +select b, max(i) over (partition by b) as f + from (select i+10 as i, b from t1) as tt +order by i; + +select b, max(i+20) over (partition by b) as f + from (select i+10 as i, b from t1) as tt +order by i; + +select max(i), max(i), sum(i), count(i) + from t1 as tt +group by b; + +select max(i), min(sum(i)) over (partition by count(i)) f + from t1 as tt +group by b; + +select max(i), min(sum(i)) over (partition by count(i)) f + from (select * from t1) as tt +group by b; + +select max(i+10), min(sum(i)+10) over (partition by count(i)) f + from t1 as tt +group by b; + +select max(i), max(i), sum(i), count(i) + from (select i+10 as i, b from t1) as tt +group by b; + +select max(i), min(sum(i)) over (partition by count(i)) f + from (select i+10 as i, b from t1) as tt +group by b; + +select max(i), min(i), min(max(i)-min(i)) over (partition by count(i)) f + from (select i+10 as i, b from t1) as tt +group by b; + +drop table t1; + +--echo # +--echo # MDEV-12015: window function over select with WHERE +--echo # that is always FALSE +--echo # + +CREATE TABLE t1 (i INT); +INSERT INTO t1 VALUES (3), (1), (2); + +SELECT i, ROW_NUMBER() OVER () FROM t1 WHERE 1 = 2; + +SELECT i, COUNT(*) OVER () FROM t1 WHERE 1 = 2; + +DROP TABLE t1; + +--echo # +--echo # MDEV-12051: window function in query with implicit grouping +--echo # on always empty set +--echo # + +create table t1 (a int, b varchar(8)); +insert into t1 values (1,'foo'),(2,'bar'); + +select max(a), row_number() over () from t1 where a > 10; +select max(a), sum(max(a)) over () from t1 where a > 10; +select max(a), sum(max(a)) over (partition by max(a)) from t1 where a > 10; + +select max(a), row_number() over () from t1 where 1 = 2; +select max(a), sum(max(a)) over () from t1 where 1 = 2; +select max(a), sum(max(a)) over (partition by max(a)) from t1 where 1 = 2; + +select max(a), row_number() over () from t1 where 1 = 2 + having max(a) is not null; +select max(a), sum(max(a)) over () from t1 where 1 = 2 + having max(a) is not null; + +drop table t1; + +--echo # +--echo # MDEV-10885: window function in query with implicit grouping +--echo # with constant condition evaluated to false +--echo # + +CREATE TABLE t1 (a INT, b VARCHAR(8)); +INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); + +CREATE TABLE t2 (c INT); +INSERT INTO t2 VALUES (3),(4); + +CREATE TABLE t3 (d INT); +INSERT INTO t3 VALUES (5),(6); + +SELECT MAX(a), ROW_NUMBER() OVER (PARTITION BY MAX(a)) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ); + +SELECT MAX(a), COUNT(MAX(a)) OVER (PARTITION BY MAX(a)) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ); + +SELECT MAX(a), SUM(MAX(a)) OVER (PARTITION BY MAX(a)) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ); + +SELECT MAX(a), ROW_NUMBER() OVER (PARTITION BY MAX(a)) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ) +HAVING MAX(a) IS NOT NULL; + +SELECT a, MAX(a), ROW_NUMBER() OVER (PARTITION BY b) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ); + +SELECT a, COUNT(a), AVG(a) OVER (PARTITION BY b) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ); + +SELECT a, MAX(a), AVG(a) OVER (PARTITION BY b) FROM t1 +WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) ); + +DROP TABLE t1,t2,t3; + +--echo # +--echo # MDEV-10859: Wrong result of aggregate window function in query +--echo # with HAVING and no ORDER BY +--echo # + +create table empsalary (depname varchar(32), empno smallint primary key, salary int); +insert into empsalary values + ('develop', 1, 5000), ('develop', 2, 4000),('sales', 3, '6000'),('sales', 4, 5000); + +--sorted_result +SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary; +--sorted_result +SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary ORDER BY depname; +--echo # +--echo # These last 2 should have the same row results, ignoring order. +--echo # +--sorted_result +SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary HAVING empno > 1; +--sorted_result +SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary HAVING empno > 1 ORDER BY depname; + +drop table empsalary; + +--echo # +--echo # MDEV-11868: min(distinct) over () returns wrong value +--echo # + +create table TDEC (CDEC int, RNUM int); +create view VDEC as select * from TDEC; +insert into TDEC (CDEC) values (null),(-1),(0),(1),(0),(10); +select TDEC.CDEC, min(TDEC.CDEC) over () from TDEC; +select VDEC.CDEC, min(VDEC.CDEC) over () from VDEC; +select TDEC.CDEC, max(TDEC.CDEC) over () from TDEC; +select VDEC.CDEC, max(VDEC.CDEC) over () from VDEC; + +select TDEC.CDEC, min(distinct TDEC.CDEC) over () from TDEC; +select VDEC.CDEC, min(distinct VDEC.CDEC) over () from VDEC; +select TDEC.CDEC, max(distinct TDEC.CDEC) over () from TDEC; +select VDEC.CDEC, max(distinct VDEC.CDEC) over () from VDEC; + +--echo # +--echo # These should be removed once support for them is added. +--echo # +--error ER_NOT_SUPPORTED_YET +select TDEC.CDEC, count(distinct TDEC.CDEC) over () from TDEC; +--error ER_NOT_SUPPORTED_YET +select VDEC.CDEC, count(distinct VDEC.CDEC) over () from VDEC; +--error ER_NOT_SUPPORTED_YET +select TDEC.CDEC, sum(distinct TDEC.CDEC) over () from TDEC; +--error ER_NOT_SUPPORTED_YET +select VDEC.CDEC, sum(distinct VDEC.CDEC) over () from VDEC; +--error ER_NOT_SUPPORTED_YET +select TDEC.CDEC, avg(distinct TDEC.CDEC) over () from TDEC; +--error ER_NOT_SUPPORTED_YET +select VDEC.CDEC, avg(distinct VDEC.CDEC) over () from VDEC; +--error ER_NOT_SUPPORTED_YET +select TDEC.CDEC, GROUP_CONCAT(TDEC.CDEC) over () from TDEC; +--error ER_NOT_SUPPORTED_YET +select VDEC.CDEC, GROUP_CONCAT(distinct VDEC.CDEC) over () from VDEC; + +drop table TDEC; +drop view VDEC; + +--echo # +--echo # MDEV-10700: 10.2.2 windowing function returns incorrect result +--echo # +create table t(a int,b int, c int , d int); +insert into t(a,b,c,d) values(1, rand(10)*1000, rand(10)*1000, rand(10)*1000); +insert into t(a,b,c,d) values(1, rand(10)*1000, rand(10)*1000, rand(10)*1000); +replace into t(a,b,c,d) select 1, rand(10)*1000, rand(10)*1000, rand(10)*1000 from t t1, t t2, t t3, t t4, t t5, t t6, t t7, t t8, t t9, t t10, t t11, t t12, t t13, t t14, t t15, t t16, t t17; + +select count(distinct s) from (select sum(d) over(partition by a,b,c) as s from t) Z where s > 0; +select count(distinct s) from (select sum(d) as s from t group by a,b,c) Z where s > 0; + +select count(distinct s) from (select sum(d) over(partition by a,b) as s from t) Z where s > 0; +select count(distinct s) from (select sum(d) as s from t group by a,b) Z where s > 0; + +select count(distinct s) from (select sum(d) over(partition by a) as s from t) Z where s > 0; +select count(distinct s) from (select sum(d) as s from t group by a) Z where s > 0; + +drop table t; + +--echo # +--echo # MDEV-9924: window function in query with group by optimized away +--echo # + +create table t1 (i int); +insert into t1 values (2),(3),(1); + +select row_number() over () from t1 group by 1+2; +select max(i), row_number() over () from t1 group by 1+2; +select rank() over (order by max(i)) from t1 group by 1+2; + +select i, row_number() over () from t1 group by 1+2; +select i, rank() over (order by i) rnk from t1 group by 1+2; + +drop table t1; diff --git a/mysql-test/t/win_big-mdev-10092.test b/mysql-test/t/win_big-mdev-10092.test new file mode 100644 index 00000000000..090d43b0b7b --- /dev/null +++ b/mysql-test/t/win_big-mdev-10092.test @@ -0,0 +1,103 @@ +--echo # +--echo # MDEV-10092: Server crashes in in ha_heap::rnd_pos / Table_read_cursor::get_next +--echo # + +CREATE TABLE `orders` ( + `o_orderkey` int(11) NOT NULL, + `o_custkey` double DEFAULT NULL, + `o_orderstatus` char(1) DEFAULT NULL, + `o_totalprice` double DEFAULT NULL, + `o_orderDATE` date DEFAULT NULL, + `o_orderpriority` char(15) DEFAULT NULL, + `o_clerk` char(15) DEFAULT NULL, + `o_shippriority` int(11) DEFAULT NULL, + `o_comment` varchar(79) DEFAULT NULL, + KEY `i_o_orderdate` (`o_orderDATE`), + KEY `i_o_custkey` (`o_custkey`) +) DEFAULT CHARSET=latin1; + +delimiter //; + +create procedure add_data() +begin +INSERT INTO `orders` VALUES (593793,3220,'O',181553.02,'1996-10-12','5-LOW','Clerk#000000921',0,'carefully unusual instructions are final pl'); +INSERT INTO `orders` VALUES (593794,4681,'F',32306.35,'1994-03-15','2-HIGH','Clerk#000000776',0,'slyly ironic depths are blithely. final excuses across the unusual instruction'); +INSERT INTO `orders` VALUES (593795,7213,'O',206579.47,'1998-03-04','2-HIGH','Clerk#000000746',0,'ruthlessly regular theodolites atop the blith'); +INSERT INTO `orders` VALUES (593796,10486,'F',181299.81,'1993-01-13','3-MEDIUM','Clerk#000000787',0,'special theodolites detect slyly. p'); +INSERT INTO `orders` VALUES (593797,3316,'O',208149.32,'1996-12-22','1-URGENT','Clerk#000000355',0,'carefully silent theodolites use blithely acco'); +INSERT INTO `orders` VALUES (593798,1613,'F',254625.5,'1995-01-26','2-HIGH','Clerk#000000504',0,'fluffily even requests ar'); +INSERT INTO `orders` VALUES (593799,4418,'F',45122.99,'1993-07-12','1-URGENT','Clerk#000000838',0,'blithely ironic ideas boost furiously above the ironic foxes. special pac'); +INSERT INTO `orders` VALUES (593824,12013,'F',216314.23,'1992-02-28','1-URGENT','Clerk#000000074',0,'quickly furious requests play above the fur'); +INSERT INTO `orders` VALUES (593825,8101,'O',123101.26,'1997-01-23','5-LOW','Clerk#000000649',0,'regular deposits haggle after the carefully i'); +INSERT INTO `orders` VALUES (593826,6958,'O',280097.59,'1995-12-14','2-HIGH','Clerk#000000080',0,'slyly even ideas about the slyly pending escapades cajole above th'); +INSERT INTO `orders` VALUES (593827,14116,'O',103011.78,'1995-12-16','3-MEDIUM','Clerk#000000567',0,'blithely bold decoys are furiously. fluffy deposits serve flu'); +INSERT INTO `orders` VALUES (593828,6839,'F',106697.51,'1993-12-11','4-NOT SPECIFIED','Clerk#000000065',0,'carefully final theodolites wake quickly final theodolites! unus'); +INSERT INTO `orders` VALUES (593829,14605,'O',44147.73,'1997-02-18','3-MEDIUM','Clerk#000000474',0,'ironic requests use carefully against the iro'); +INSERT INTO `orders` VALUES (593830,12976,'F',167393.6,'1994-06-21','1-URGENT','Clerk#000000424',0,'dolphins haggle careful'); +INSERT INTO `orders` VALUES (593831,14107,'O',208417.51,'1997-11-18','4-NOT SPECIFIED','Clerk#000000336',0,'furiously express pinto beans after the blithely pending requests need to '); +INSERT INTO `orders` VALUES (593856,5623,'O',143236.09,'1998-03-24','5-LOW','Clerk#000000382',0,'carefully ironic accounts impress slyly according to the ironic'); +INSERT INTO `orders` VALUES (593857,1828,'O',217673.82,'1996-01-12','1-URGENT','Clerk#000000060',0,'special, special pinto beans haggle blithely. blithel'); +INSERT INTO `orders` VALUES (593858,14755,'O',8032.07,'1997-07-20','4-NOT SPECIFIED','Clerk#000000110',0,'regular excuses use ironic pinto '); +INSERT INTO `orders` VALUES (593859,8780,'F',356852.14,'1992-10-09','2-HIGH','Clerk#000000510',0,'furiously regular accounts eat across the carefully '); +INSERT INTO `orders` VALUES (593860,13318,'O',18413.14,'1998-01-10','2-HIGH','Clerk#000000673',0,'pending pains cajole furiously alo'); +INSERT INTO `orders` VALUES (593861,1175,'O',28859.21,'1996-09-10','4-NOT SPECIFIED','Clerk#000000680',0,'carefully silent instructi'); +INSERT INTO `orders` VALUES (593862,7787,'F',202891.72,'1992-02-27','5-LOW','Clerk#000000988',0,'slyly express requests sleep. express dependencies wake bli'); +INSERT INTO `orders` VALUES (593863,1897,'O',33062.05,'1998-06-29','1-URGENT','Clerk#000000117',0,'accounts integrate carefully across the fluffily even warhorses'); +INSERT INTO `orders` VALUES (593888,5656,'O',20952.26,'1997-02-04','3-MEDIUM','Clerk#000000735',0,'requests could have to cajole about the special, final '); +INSERT INTO `orders` VALUES (593889,2692,'F',282718.42,'1992-08-02','4-NOT SPECIFIED','Clerk#000000669',0,'regular deposits haggle fluff'); +INSERT INTO `orders` VALUES (593890,3685,'O',34012.74,'1996-06-17','5-LOW','Clerk#000000993',0,'furiously even requests'); +INSERT INTO `orders` VALUES (593891,10333,'F',182791.4,'1993-01-23','4-NOT SPECIFIED','Clerk#000000098',0,'slyly final platelets doubt'); +INSERT INTO `orders` VALUES (593892,5687,'F',224381.48,'1994-09-18','2-HIGH','Clerk#000000294',0,'blithely bold epitaphs sleep after the carefully express in'); +INSERT INTO `orders` VALUES (593893,5437,'F',124300.91,'1993-08-04','4-NOT SPECIFIED','Clerk#000000302',0,'daring instructions alongside of the si'); +INSERT INTO `orders` VALUES (593894,1732,'F',150438.64,'1993-11-07','3-MEDIUM','Clerk#000000046',0,'quickly special accounts integrate by the even, dogged platelets? slowly '); +INSERT INTO `orders` VALUES (593895,12230,'O',47380.97,'1997-03-23','2-HIGH','Clerk#000000168',0,'fluffily permanent instructions alongside of the furiously even pack'); +INSERT INTO `orders` VALUES (593920,13871,'F',2919.68,'1992-01-29','5-LOW','Clerk#000000597',0,'quickly regular foxes across the furiously bold accounts wake car'); +INSERT INTO `orders` VALUES (593921,6664,'F',139065.79,'1992-04-21','5-LOW','Clerk#000000017',0,'fluffily final deposits are carefully. quickly special pinto beans bel'); +INSERT INTO `orders` VALUES (593922,2504,'O',179041.45,'1997-04-05','2-HIGH','Clerk#000000902',0,'final pinto beans are furiously. '); +INSERT INTO `orders` VALUES (593923,4978,'O',258843,'1998-02-27','1-URGENT','Clerk#000000654',0,'carefully final asymptotes according to the regular dependencie'); +INSERT INTO `orders` VALUES (593924,7550,'O',232280.81,'1995-10-28','3-MEDIUM','Clerk#000000063',0,'fluffily ironic packages haggle carefully pending platelets. q'); +INSERT INTO `orders` VALUES (593925,12226,'O',319755.48,'1995-09-01','3-MEDIUM','Clerk#000000308',0,'quickly pending packages throughout the quickly unusual requests'); +INSERT INTO `orders` VALUES (593926,2819,'F',204662.4,'1994-11-07','4-NOT SPECIFIED','Clerk#000000298',0,'blithely special grouches cajole ironic instructions. slyly pendin'); +INSERT INTO `orders` VALUES (593927,593,'F',188162.64,'1995-03-04','1-URGENT','Clerk#000000263',0,'express, unusual deposits boost furiously after the unusual dolphi'); +INSERT INTO `orders` VALUES (593952,9362,'P',318688.16,'1995-03-05','4-NOT SPECIFIED','Clerk#000000468',0,'ruthless requests must have to are carefully? special pa'); +INSERT INTO `orders` VALUES (593953,11410,'O',166717.28,'1998-07-29','5-LOW','Clerk#000000509',0,'even, regular instructions snooze. slyly ironic packages nag fluffily.'); +INSERT INTO `orders` VALUES (593954,8875,'O',132909.37,'1996-08-29','3-MEDIUM','Clerk#000000825',0,'special decoys integrate carefully. care'); +INSERT INTO `orders` VALUES (593955,12494,'O',73329.07,'1995-08-05','1-URGENT','Clerk#000000561',0,'quickly special request'); +INSERT INTO `orders` VALUES (593956,1390,'O',187837.11,'1995-10-17','5-LOW','Clerk#000000797',0,'silent, pending foxes'); +INSERT INTO `orders` VALUES (593957,10106,'F',196969.46,'1993-04-03','2-HIGH','Clerk#000000566',0,'blithely ruthless excuses boost slyly about the requests. careful'); +INSERT INTO `orders` VALUES (593958,14770,'F',103528.82,'1993-12-27','3-MEDIUM','Clerk#000000598',0,'carefully special deposits eat above the q'); +INSERT INTO `orders` VALUES (593959,14566,'O',156600.32,'1996-11-16','2-HIGH','Clerk#000000030',0,'accounts are quickly bold packages. carefully ironic depos'); +INSERT INTO `orders` VALUES (593984,4924,'O',47149.15,'1995-05-06','3-MEDIUM','Clerk#000000120',0,'regular asymptotes haggle slyly abo'); +INSERT INTO `orders` VALUES (593985,5185,'O',152533.91,'1997-08-04','3-MEDIUM','Clerk#000000575',0,'blithely special dolphins are even requests. carefully eve'); +INSERT INTO `orders` VALUES (593986,14257,'O',109734.28,'1998-06-05','3-MEDIUM','Clerk#000000930',0,'carefully final instructions against the slyly'); +INSERT INTO `orders` VALUES (593987,5818,'F',64541.52,'1994-04-13','3-MEDIUM','Clerk#000000259',0,'slyly pending deposits are furiously. regular requests h'); +INSERT INTO `orders` VALUES (593988,1178,'F',249608.42,'1994-10-01','2-HIGH','Clerk#000000266',0,'fluffily regular foxes toward the furiously bold accounts sleep furiously'); +INSERT INTO `orders` VALUES (593989,5173,'P',61508.55,'1995-03-02','2-HIGH','Clerk#000000374',0,'slyly express deposits wake between '); +INSERT INTO `orders` VALUES (593990,8395,'O',129696.17,'1997-12-30','4-NOT SPECIFIED','Clerk#000000570',0,'carefully final requests haggle furiously fluffily final accou'); +INSERT INTO `orders` VALUES (593991,1894,'O',145691.27,'1998-04-09','5-LOW','Clerk#000000294',0,'slyly final notornis haggle carefull'); +INSERT INTO `orders` VALUES (594016,14935,'F',144592.29,'1992-10-20','3-MEDIUM','Clerk#000000602',0,'furiously express ideas cajole quickl'); +INSERT INTO `orders` VALUES (594017,892,'F',147267.55,'1994-12-10','1-URGENT','Clerk#000000419',0,'close, pending packages affix blithely. slyly regular reque'); +end; +// + +delimiter ;// +call add_data(); +call add_data(); +set sort_buffer_size = 1024; + +flush status; +select o_custkey, Avg(o_custkey) OVER ( ORDER BY o_custkey ) from orders; +select variable_name, + case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end +from information_schema.session_status +where variable_name like 'Sort_merge_passes'; + +flush status; +select o_custkey, Avg(o_custkey) OVER ( ORDER BY o_custkey RANGE CURRENT ROW ) from orders; +select variable_name, + case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end +from information_schema.session_status +where variable_name like 'Sort_merge_passes'; + +drop table orders; +drop procedure add_data; diff --git a/mysql-test/t/win_big-mdev-11697.test b/mysql-test/t/win_big-mdev-11697.test new file mode 100644 index 00000000000..7103b8522be --- /dev/null +++ b/mysql-test/t/win_big-mdev-11697.test @@ -0,0 +1,50 @@ +create table test_table (id int, random_data varchar(36), static_int int, static_varchar varchar(10)); + +insert into test_table(id, random_data, static_int, static_varchar) +select id, random_data, 42, 'Hello' + from ( + with recursive data_generator(id, random_data) as ( + select 1 as id, uuid() as random_data + union all + select id + 1, uuid() from data_generator where id < 1000 + ) + select * from data_generator + ) as a; + +commit; + +analyze table test_table; + +explain select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10; + +select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10; + +drop table if exists test_table; + +create table test_table (id int, random_data varchar(36), static_int int, static_varchar varchar(10)); + +insert into test_table(id, random_data, static_int, static_varchar) +select id, random_data, 42, 'Hello' + from ( + with recursive data_generator(id, random_data) as ( + select 1 as id, uuid() as random_data + union all + select id + 1, uuid() from data_generator where id < 100000 + ) + select * from data_generator + ) as a; + +commit; + +analyze table test_table; + +explain select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10; + +flush status; +select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10; +select variable_name, + case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end +from information_schema.session_status +where variable_name like 'Sort_merge_passes'; + +drop table test_table; diff --git a/mysql-test/t/win_first_last_value.test b/mysql-test/t/win_first_last_value.test index 5948cefe18a..c7fd58472d8 100644 --- a/mysql-test/t/win_first_last_value.test +++ b/mysql-test/t/win_first_last_value.test @@ -56,3 +56,22 @@ select pk, a, b, c, d, e, from t1; drop table t1; + +--echo # +--echo # MDEV-11746: Wrong result upon using FIRST_VALUE with a window frame +--echo # +create table t1 (i int); +insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); + +select i, + first_value(i) OVER (order by i rows between CURRENT ROW and 1 FOLLOWING) as fst_1f, + last_value(i) OVER (order by i rows between CURRENT ROW and 1 FOLLOWING) as last_1f, + first_value(i) OVER (order by i rows between 1 PRECEDING AND 1 FOLLOWING) as fst_1p1f, + last_value(i) OVER (order by i rows between 1 PRECEDING AND 1 FOLLOWING) as fst_1p1f, + first_value(i) OVER (order by i rows between 2 PRECEDING AND 1 PRECEDING) as fst_2p1p, + last_value(i) OVER (order by i rows between 2 PRECEDING AND 1 PRECEDING) as fst_2p1p, + first_value(i) OVER (order by i rows between 1 FOLLOWING AND 2 FOLLOWING) as fst_1f2f, + last_value(i) OVER (order by i rows between 1 FOLLOWING AND 2 FOLLOWING) as fst_1f2f +from t1; + +drop table t1; diff --git a/mysql-test/t/xa.test b/mysql-test/t/xa.test index f1576f021ec..c1f36129d75 100644 --- a/mysql-test/t/xa.test +++ b/mysql-test/t/xa.test @@ -8,6 +8,8 @@ # Save the initial number of concurrent sessions --source include/count_sessions.inc +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); + --disable_warnings drop table if exists t1, t2; --enable_warnings diff --git a/mysql-test/t/xtradb_mrr.test b/mysql-test/t/xtradb_mrr.test index b56cbb0459f..3e84668955a 100644 --- a/mysql-test/t/xtradb_mrr.test +++ b/mysql-test/t/xtradb_mrr.test @@ -403,7 +403,7 @@ INSERT INTO t1 VALUES ('IB','IBM- Inc.'), ('GO','Google Inc.'); -INSERT INTO t2 VALUES +INSERT IGNORE INTO t2 VALUES ('AB','Sweden'), ('JA','USA'), ('MS','United States of America'), diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index 7b5c2756f11..42985e1d66d 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,66 +23,83 @@ # ############################################################################## -main.alter_table : Modified in 10.1.19 -main.analyze_stmt_slow_query_log : MDEV-7558 - wrong result -main.create : Modified in 10.1.20 +main.alter_table : Modified in 10.1.21 +main.alter_table_trans : MDEV-11805 - timeout +main.analyze_stmt_slow_query_log : Modified in 10.1.21 +main.cast : Modified in 10.1.21 +main.create : Modified in 10.1.21 main.create_delayed : MDEV-10605 - failed with timeout main.create_drop_binlog : Uses binlog_start_pos.inc modified in 10.1.20 -main.create_or_replace : Modified in 10.1.19 +main.ctype_ucs : Modified in 10.1.21 +main.ctype_ucs2_def : Modified in 10.1.21 +main.ctype_ucs2_query_cache : Modified in 10.1.21 +main.ctype_utf16 : Modified in 10.1.21 +main.ctype_utf16_def : Modified in 10.1.21 main.ctype_utf16le : MDEV-10675: timeout or extra warnings +main.ctype_utf32 : Modified in 10.1.21 main.ctype_utf8 : Modified in 10.1.20 main.ctype_utf8mb4 : Modified in 10.1.20 main.default : Modified in 10.1.20 main.derived : Modified in 10.1.20 main.derived_view : Modified in 10.1.20 -main.drop : Modified in 10.1.19 main.events_restart : MDEV-11221: assertion failure +main.events_slowlog : Added in 10.1.21 main.fulltext_charsets : Added in 10.1.20 -main.func_time : Modified in 10.1.20 +main.func_time : Modified in 10.1.21 main.group_by : Modified in 10.1.20 main.group_by_innodb : Modified in 10.1.20 main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown main.index_intersect_innodb : MDEV-10643 - failed with timeout -main.index_merge_innodb : MDEV-7142 - Wrong execution plan -main.information_schema : Modified in 10.1.19 +main.index_merge_innodb : MDEV-7142 - Wrong execution plan, also modified in 10.1.21 +main.information_schema_part : Modified in 10.1.21 main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure +main.join_cache : Modified in 10.1.21 main.kill_processlist-6619 : MDEV-10793 - wrong result in processlist -main.loaddata : Modified in 10.1.20 +main.loaddata : Modified in 10.1.21 +main.log_slow : Modified in 10.1.21 main.lowercase_fs_on : Uses search_pattern_in_file.inc modified in 10.1.20 main.mdev-504 : MDEV-10607 - sporadic "can't connect" main.mdev375 : MDEV-10607 - sporadic "can't connect" main.merge : MDEV-10607 - sporadic "can't connect" -main.mysql : Modified in 10.1.19 -main.mysql_not_windows : Modified in 10.1.19 main.mysqlbinlog : Uses binlog_start_pos.inc modified in 10.1.20 main.mysqldump-max : Uses binlog_start_pos.inc modified in 10.1.20 -main.mysqldump-nl : Added in 10.1.19 -main.mysqltest : MDEV-9269 - fails on Alpha; also modified in 10.1.19 +main.mysqlslap : MDEV-11801 - timeout +main.mysqltest : MDEV-9269 - fails on Alpha main.named_pipe : Uses search_pattern_in_file.inc modified in 10.1.20 -main.null : Modified in 10.1.19 +main.order_by : Modified in 10.1.21 main.order_by_optimizer_innodb : MDEV-10683 - wrong execution plan main.parser : Modified in 10.1.20 -main.pool_of_threads : MDEV-10100 - sporadic error on detecting max connections +main.pool_of_threads : Modified in 10.1.21 main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count main.selectivity : Modified in 10.1.20 -main.selectivity_innodb : Modified in 10.1.19 main.show_explain : MDEV-10674 - sporadic failure -main.sp : Modified in 10.1.20 +main.signal_demo3 : MDEV-11720 - Thread stack overrun on labrador +main.sp : Modified in 10.1.21 +main.sp-prelocking : Modified in 10.1.21 main.sp-security : MDEV-10607 - sporadic "can't connect" main.stat_tables_par_innodb : MDEV-10515 - sporadic wrong results main.statistics : Modified in 10.1.20 main.status : MDEV-8510 - sporadic wrong result -main.subselect : Modified in 10.1.20 +main.subselect : Modified in 10.1.21 +main.subselect2 : Modified in 10.1.21 +main.subselect4 : Modified in 10.1.21 main.subselect_innodb : MDEV-10614 - sporadic wrong results +main.subselect_no_exists_to_in : Uses subselect.test modified in 10.1.21 +main.subselect_no_mat : Uses subselect.test modified in 10.1.21 +main.subselect_no_opts : Uses subselect.test modified in 10.1.21 +main.subselect_no_scache : Uses subselect.test modified in 10.1.21 +main.subselect_no_semijoin : Uses subselect.test modified in 10.1.21 +main.trigger_null-8605 : Modified in 10.1.21 main.type_datetime_hires : MDEV-10687 - timeout main.type_decimal : Modified in 10.1.20 -main.view : Uses search_pattern_in_file.inc modified in 10.1.20 +main.union : Modified in 10.1.21 +main.view : Modified in 10.1.21 main.wait_timeout_not_windows : Uses search_pattern_in_file.inc modified in 10.1.20 #---------------------------------------------------------------- archive.archive-big : MDEV-10615 - table is marked as crashed -archive.discover : MDEV-10510 - table is marked as crashed +archive.discover : MDEV-10510 - table is marked as crashed; modified in 10.1.21 #---------------------------------------------------------------- @@ -101,6 +118,8 @@ binlog_encryption.* : Added in 10.1.20 #---------------------------------------------------------------- +connect.jdbc : Modified in 10.1.21 +connect.jdbc_new : Modified in 10.1.21 connect.tbl : MDEV-9844, MDEV-10179 - sporadic crashes, valgrind warnings, wrong results #---------------------------------------------------------------- @@ -115,27 +134,28 @@ encryption.filekeys_nofile : Uses search_pattern_in_file.inc mo encryption.filekeys_syntax : Uses search_pattern_in_file.inc modified in 10.1.20 encryption.filekeys_tooshort : Uses search_pattern_in_file.inc modified in 10.1.20 encryption.filekeys_unencfile : Uses search_pattern_in_file.inc modified in 10.1.20 -encryption.innodb-bad-key-change : uses keys2.txt modified in 10.1.19 -encryption.innodb-bad-key-change2 : uses keys2.txt modified in 10.1.19 -encryption.innodb-bad-key-change3 : Uses search_pattern_in_file.inc modified in 10.1.20 -encryption.innodb-bad-key-change4 : uses keys2.txt modified in 10.1.19 -encryption.innodb-bad-key-change5 : uses keys2.txt modified in 10.1.19 -encryption.innodb-bad-key-shutdown : MDEV-9105 - valgrind warnings, assertion failures, and uses keys2.txt modified in 10.1.19 -encryption.innodb-discard-import : Uses search_pattern_in_file.inc modified in 10.1.20 -encryption.innodb_encryption_discard_import : MDEV-11218 - wrong result, also uses search_pattern_in_file.inc modified in 10.1.20 +encryption.innodb-bad-key-change3 : Modified in 10.1.21 +encryption.innodb-bad-key-shutdown : MDEV-9105 - valgrind warnings, assertion failures +encryption.innodb-discard-import : Modified in 10.1.21 +encryption.innodb-discard-import-change : Modified in 10.1.21 +encryption.innodb_encryption_discard_import : MDEV-11218 - wrong result, also modified in 10.1.21 encryption.innodb_encryption_filekeys : MDEV-9962 - timeouts +encryption.innodb_encryption-page-compression : MDEV-11420 - Trying to access missing tablespace encryption.innodb_encryption_row_compressed : Uses search_pattern_in_file.inc modified in 10.1.20 encryption.innodb_first_page : MDEV-10689 - crashes -encryption.innodb-log-encrypt : Uses search_pattern_in_file.inc modified in 10.1.20 -encryption.innodb_lotoftables : MDEV-11531 - InnoDB error -encryption.innodb-missing-key : Added in 10.1.19 +encryption.innodb-log-encrypt : Modified in 10.1.21 +encryption.innodb_lotoftables : MDEV-11531 - InnoDB error, also modified in 10.1.21 +encryption.innodb-missing-key : MDEV-9359 - assertion failure encryption.innodb_onlinealter_encryption : MDEV-10099 - wrong results; also uses search_pattern_in_file.inc modified in 10.1.20 encryption.innodb-page_encryption : MDEV-10641 - mutex problem -encryption.innodb_page_encryption_key_change : uses keys2.txt modified in 10.1.19 +encryption.innodb_scrub : MDEV-8139, also was modified in 10.1.21 +encryption.innodb_scrub_background : MDEV_8139, also was modified in 10.1.21 +encryption.innodb_scrub_compressed : MDEV-8139; also was modified and re-enabled in 10.1.21 #---------------------------------------------------------------- -extra/binlog_tests.database : Modified in 10.1.19 (merge) +engines/iuds.* : Not maintained in timely manner +engines/funcs.* : Not maintained in timely manner #---------------------------------------------------------------- @@ -147,51 +167,57 @@ federated.federated_transactions : MDEV-10617, MDEV-10417 - Wrong checksum, time #---------------------------------------------------------------- funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result + +funcs_2.innodb_charset : Modified in 10.1.21 funcs_2.memory_charset : MDEV-10290 - Timeout funcs_2.myisam_charset : MDEV-11535 - Timeout #---------------------------------------------------------------- -galera.* : Added to default suites in 10.1.19 - -galera.galera_var_dirty_reads : Modified in 10.1.20 +galera.galera_var_cluster_address : Modified in 10.1.21 +galera.galera_var_dirty_reads : Modified in 10.1.21 +galera.MW-284 : Modified in 10.1.21 galera.rpl_row_annotate : Uses binlog_start_pos.inc modified in 10.1.20 +galera_split_brain : Modified in 10.1.21 -galera_3nodes.* : Added to default suites in 10.1.19, MDEV-11490 +galera_3nodes.* : MDEV-11490 - Warnings not suppressed #---------------------------------------------------------------- +innodb.101_compatibility : Added in 10.1.21 innodb.binlog_consistent : MDEV-10618 - Server fails to start; also uses binlog_start_pos.inc modified in 10.1.20 +innodb.doublewrite : Added in 10.1.21 innodb.group_commit_binlog_pos : Uses binlog_start_pos.inc modified in 10.1.20 innodb.group_commit_binlog_pos_no_optimize_thread : Uses binlog_start_pos.inc modified in 10.1.20 +innodb.group_commit_crash : Modified in 10.1.21 +innodb.group_commit_crash_no_optimize_thread : Modified in 10.1.21 innodb.innodb-alter-table : MDEV-10619 - Testcase timeout -innodb.innodb-bug-14068765 : MDEV-9105 - valgrind warnings, assertion failures, also uses innodb-util.pl added in 10.1.19 -innodb.innodb-bug-14084530 : MDEV-9105 - valgrind warnings, assertion failures, also uses innodb-util.pl added in 10.1.19 +innodb.innodb-bug-14068765 : MDEV-9105 - valgrind warnings, assertion failures +innodb.innodb-bug-14084530 : MDEV-9105 - valgrind warnings, assertion failures +innodb.innodb_bug14147491 : MDEV-11808, also modified in 10.1.21 +innodb.innodb_bug14676111 : MDEV-11802 - wrong result innodb.innodb_bug30423 : MDEV-7311 - Wrong number of rows in the plan -innodb.innodb-change-buffer-recovery : Uses search_pattern_in_file.inc modified in 10.1.20 +innodb.innodb-change-buffer-recovery : Modified in 10.1.21 innodb.innodb_defragment_fill_factor : Modified in 10.1.20 innodb.innodb-lock-schedule-algorithm : Modified in 10.1.20 innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem innodb.innodb_stats : MDEV-10682 - wrong result innodb.innodb_sys_semaphore_waits : MDEV-10331 - wrong result -innodb.innodb-wl5522 : MDEV-9105 - valgrind warnings, assertion failures, also uses innodb-util.pl added in 10.1.19 -innodb.innodb-wl5522-1 : MDEV-9105 - valgrind warnings, assertion failures, also uses innodb-util.pl added in 10.1.19 -innodb.innodb-wl5522-debug : Modified in 10.1.19 -innodb.innodb-wl5522-debug-zip : Modified in 10.1.20 -innodb.innodb-wl5522-zip : MDEV-9105 - valgrind warnings, assertion failures, also uses innodb-util.pl added in 10.1.19 +innodb.innodb-wl5522 : MDEV-9105 - valgrind warnings, assertion failures +innodb.innodb-wl5522-1 : MDEV-9105 - valgrind warnings, assertion failures +innodb.innodb-wl5522-debug-zip : Modified in 10.1.21 +innodb.log_data_file_size : Added in 10.1.21 innodb.table_index_statistics : Added in 10.1.20 innodb.trigger : Modified in 10.1.20 -innodb.xa_recovery : Modified in 10.1.19 +innodb.xa_recovery : Modified in 10.1.21 #---------------------------------------------------------------- innodb_fts.create : Added in 10.1.20 -innodb_fts.innodb_fts_misc : MDEV-11233 - Crash on CREATE FULLTEXT INDEX #---------------------------------------------------------------- maria.collations : Added in 10.1.20 -maria.encrypt-wrong-key : uses keys2.txt modified in 10.1.19 maria.maria-connect : Uses binlog_start_pos.inc modified in 10.1.20 #---------------------------------------------------------------- @@ -225,24 +251,26 @@ perfschema.func_file_io : MDEV-5708 - fails for s390x perfschema.func_mutex : MDEV-5708 - fails for s390x perfschema.setup_actors : MDEV-10679 - rare crash perfschema.socket_summary_by_event_name_func : MDEV-10622 - Socket summary tables do not match +perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders perfschema.threads_mysql : MDEV-10677 - sporadic wrong result #---------------------------------------------------------------- +plugins.cracklib_password_check : MDEV-11650 - valgrind warnings plugins.feedback_plugin_send : MDEV-7932 - ssl failed for url plugins.server_audit : MDEV-9562 - crashes on sol10-sparc plugins.thread_pool_server_audit : MDEV-9562 - crashes on sol10-sparc - +plugins.two_password_validations : MDEV-11650 - valgrind warnings #---------------------------------------------------------------- roles.role_case_sensitive-10744 : Added in 10.1.20 roles.create_and_drop_role : Modified in 10.1.20 -roles.create_and_grant_role : MDEV-11533 - Extra grant in output #---------------------------------------------------------------- rpl.last_insert_id : MDEV-10625 - warnings in error log +rpl.rpl_alter_extra_persistent : Added in 10.1.21 rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log @@ -252,7 +280,6 @@ rpl.rpl_checksum_cache : MDEV-10626 - Testcase timeout rpl.rpl_circular_for_4_hosts : MDEV-10627 - Testcase timeout rpl.rpl_ddl : MDEV-10417 - Fails on Mips rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result -rpl.rpl_drop_db : Modified in 10.1.19 rpl.rpl_gtid_basic : MDEV-10681 - server startup problem rpl.rpl_gtid_crash : MDEV-9501 - Warning: failed registering on master rpl.rpl_gtid_errorlog : Uses search_pattern_in_file.inc modified in 10.1.20 @@ -260,6 +287,7 @@ rpl.rpl_gtid_master_promote : MDEV-10628 - Timeout in sync_with_master rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown rpl.rpl_gtid_until : MDEV-10625 - warnings in error log +rpl.rpl_heartbeat_basic : MDEV-11668 - wrong result rpl.rpl_innodb_bug30888 : MDEV-10417 - Fails on Mips rpl.rpl_insert : MDEV-9329 - Fails on Ubuntu/s390x rpl.rpl_insert_delayed : MDEV-9329 - Fails on Ubuntu/s390x @@ -278,17 +306,21 @@ rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings rpl.rpl_row_drop_create_temp_table : MDEV-10626 - Testcase timeout rpl.rpl_row_flsh_tbls : Uses binlog_start_pos.inc modified in 10.1.20 rpl.rpl_row_log_innodb : MDEV-10688 - Wrong result +rpl.rpl_row_mysqlbinlog : Modified in 10.1.21 rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x rpl.rpl_semi_sync : MDEV-11220 - Wrong result +rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Wrong plugin status +rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition rpl.rpl_show_slave_hosts : MDEV-10681 - server startup problem rpl.rpl_skip_replication : MDEV-9268 - Fails with timeout in sync_slave_with_master on Alpha rpl.rpl_slave_grp_exec : MDEV-10514 - Unexpected deadlock +rpl.rpl_special_charset : Modified in 10.1.21 rpl.rpl_stm_flsh_tbls : Uses binlog_start_pos.inc modified in 10.1.20 rpl.rpl_stop_slave_error : Uses search_pattern_in_file.inc modified in 10.1.20 rpl.rpl_sync : MDEV-10633 - Database page corruption rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries -rpl.sec_behind_master-5114 : MDEV-8518 - Wrong value of Seconds_Behind_Master +rpl.sec_behind_master-5114 : Modified in 10.1.21 #---------------------------------------------------------------- @@ -301,9 +333,11 @@ spider/bg.ha_part : MDEV-9329 - Fails on Ubuntu/s390x spider/bg.spider_fixes : MDEV-7098, MDEV-9329 - Mutex problem, failures on s390x spider/bg.vp_fixes : MDEV-9329 - Fails on Ubuntu/s390x +spider/handler.* : MDEV-10987, MDEV-10990 - Tests have not been maintained + #---------------------------------------------------------------- -sphinx.* : MDEV-10985, MDEV-10986 - Tests have not been maintained +sphinx.* : MDEV-10986 - Tests have not been maintained #---------------------------------------------------------------- @@ -325,6 +359,7 @@ sys_vars.replicate_ignore_db_basic : Modified in 10.1.20 sys_vars.replicate_ignore_table_basic : Modified in 10.1.20 sys_vars.replicate_wild_do_table_basic : Modified in 10.1.20 sys_vars.replicate_wild_ignore_table_basic : Modified in 10.1.20 +sys_vars.rpl_init_slave_func : MDEV-10149 - wrong results sys_vars.sysvars_innodb : MDEV-6958 - error-prone rdiffs sys_vars.sysvars_server_embedded : MDEV-6958 - error-prone rdiffs sys_vars.table_open_cache_instances_basic : Modified in 10.1.20 @@ -339,6 +374,7 @@ tokudb.table_index_statistics : Added in 10.1.20 tokudb_bugs.checkpoint_lock : MDEV-10637 - Wrong processlist output tokudb_bugs.checkpoint_lock_3 : MDEV-10637 - Wrong processlist output +tokudb_bugs.xa : MDEV-11804 - Lock wait timeout tokudb_rpl.rpl_parallel_optimistic : Added in 10.1.20 tokudb_rpl.rpl_tokudb_rfr_partition_table : Added in 10.1.20 @@ -355,9 +391,7 @@ vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout #---------------------------------------------------------------- wsrep.binlog_format : MDEV-11532 - WSREP has not yet prepared node -wsrep.mdev_10186 : Modified in 10.1.19 #---------------------------------------------------------------- -wsrep_info.* : suite.pm modified in 10.1.19 wsrep_info.plugin : MDEV-11530 - Warnings; also modified in 10.1.20 diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index 3d852120320..6bdbcab4530 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -357,6 +357,17 @@ fun:_dl_init } +# This one is on OpenSuse 10.3 with gcc 5.4 +{ + memory "loss" from _dl_init 2 + Memcheck:Leak + fun:malloc + fun:pool + ... + fun:call_init* + fun:_dl_init +} + # # dlclose can allocate memory for error message, the memory will be # freed by dlerror or other dl* function. @@ -939,6 +950,14 @@ fun:backtrace } +{ + memory leak in mysqld_exit + Memcheck:Leak + fun:malloc + fun:_dl_close_worker + fun:_dl_close +} + # # Bug in Glibc 2.9: http://sourceware.org/bugzilla/show_bug.cgi?id=10391 # Fixed in latest Glibc, but suppressed here for running tests on hosts @@ -1064,6 +1083,16 @@ fun:SSL_library_init } +{ + OpenSSL still reachable. + Memcheck:Leak + fun:*alloc + fun:CRYPTO_malloc + fun:sk_new + fun:SSL_COMP_get_compression_methods + fun:SSL_library_init +} + { libcrypto 2.2.1 leak Memcheck:Leak diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt index 892928ca69b..13ea8dd9f35 100644 --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt @@ -42,6 +42,7 @@ SET(MYSYS_SOURCES array.c charset-def.c charset.c checksum.c my_default.c my_atomic.c my_getncpus.c my_safehash.c my_chmod.c my_rnd.c my_uuid.c wqueue.c waiting_threads.c ma_dyncol.c ../sql-common/my_time.c my_rdtsc.c my_context.c psi_noop.c + my_atomic_writes.c file_logger.c) IF (WIN32) @@ -49,7 +50,7 @@ IF (WIN32) ENDIF() IF(UNIX) - SET (MYSYS_SOURCES ${MYSYS_SOURCES} my_addr_resolve.c) + SET (MYSYS_SOURCES ${MYSYS_SOURCES} my_addr_resolve.c my_setuser.c) ENDIF() IF(HAVE_ALARM) @@ -96,6 +97,10 @@ ADD_EXECUTABLE(thr_timer thr_timer.c) TARGET_LINK_LIBRARIES(thr_timer mysys) SET_TARGET_PROPERTIES(thr_timer PROPERTIES COMPILE_FLAGS "-DMAIN") +ADD_EXECUTABLE(test_hash hash.c) +TARGET_LINK_LIBRARIES(test_hash mysys) +SET_TARGET_PROPERTIES(test_hash PROPERTIES COMPILE_FLAGS "-DMAIN") + IF(MSVC) INSTALL_DEBUG_TARGET(mysys DESTINATION ${INSTALL_LIBDIR}/debug) ENDIF() diff --git a/mysys/hash.c b/mysys/hash.c index 580e21b77d0..b3311c59847 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -23,14 +23,15 @@ #include #include "hash.h" -#define NO_RECORD ((uint) -1) +#define NO_RECORD ~((my_hash_value_type) 0) #define LOWFIND 1 #define LOWUSED 2 #define HIGHFIND 4 #define HIGHUSED 8 typedef struct st_hash_info { - uint next; /* index to next key */ + uint32 next; /* index to next key */ + my_hash_value_type hash_nr; uchar *data; /* data for current entry */ } HASH_LINK; @@ -196,13 +197,10 @@ static uint my_hash_mask(my_hash_value_type hashnr, size_t buffmax, return (uint) (hashnr & ((buffmax >> 1) -1)); } -static uint my_hash_rec_mask(const HASH *hash, HASH_LINK *pos, - size_t buffmax, size_t maxlength) +static inline uint my_hash_rec_mask(HASH_LINK *pos, + size_t buffmax, size_t maxlength) { - size_t length; - uchar *key= (uchar*) my_hash_key(hash, pos->data, &length, 0); - return my_hash_mask(hash->hash_function(hash->charset, key, length), buffmax, - maxlength); + return my_hash_mask(pos->hash_nr, buffmax, maxlength); } @@ -248,13 +246,13 @@ uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { uchar *res; - if (my_hash_inited(hash)) - res= my_hash_first_from_hash_value(hash, - hash->hash_function(hash->charset, key, - length ? length : hash->key_length), - key, length, current_record); - else - res= 0; + DBUG_ASSERT(my_hash_inited(hash)); + + res= my_hash_first_from_hash_value(hash, + hash->hash_function(hash->charset, key, + length ? length : + hash->key_length), + key, length, current_record); return res; } @@ -266,14 +264,13 @@ uchar* my_hash_first_from_hash_value(const HASH *hash, HASH_SEARCH_STATE *current_record) { HASH_LINK *pos; - uint flag,idx; DBUG_ENTER("my_hash_first_from_hash_value"); - flag=1; if (hash->records) { - idx= my_hash_mask(hash_value, - hash->blength, hash->records); + uint flag= 1; + uint idx= my_hash_mask(hash_value, + hash->blength, hash->records); do { pos= dynamic_element(&hash->array,idx,HASH_LINK*); @@ -286,7 +283,7 @@ uchar* my_hash_first_from_hash_value(const HASH *hash, if (flag) { flag=0; /* Reset flag */ - if (my_hash_rec_mask(hash, pos, hash->blength, hash->records) != idx) + if (my_hash_rec_mask(pos, hash->blength, hash->records) != idx) break; /* Wrong link */ } } @@ -378,15 +375,19 @@ static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key, my_bool my_hash_insert(HASH *info, const uchar *record) { int flag; - size_t idx,halfbuff,first_index; - my_hash_value_type hash_nr; - uchar *UNINIT_VAR(ptr_to_rec),*UNINIT_VAR(ptr_to_rec2); + uint idx, halfbuff, first_index; + size_t length; + my_hash_value_type current_hash_nr, UNINIT_VAR(rec_hash_nr), + UNINIT_VAR(rec2_hash_nr); + uchar *UNINIT_VAR(rec_data),*UNINIT_VAR(rec2_data), *key; HASH_LINK *data,*empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; + key= (uchar*) my_hash_key(info, record, &length, 1); + current_hash_nr= info->hash_function(info->charset, key, length); + if (info->flags & HASH_UNIQUE) { - uchar *key= (uchar*) my_hash_key(info, record, &idx, 1); - if (my_hash_search(info, key, idx)) + if (my_hash_search_using_hash_value(info, current_hash_nr, key, length)) return(TRUE); /* Duplicate entry */ } @@ -402,8 +403,9 @@ my_bool my_hash_insert(HASH *info, const uchar *record) { do { + my_hash_value_type hash_nr; pos=data+idx; - hash_nr=rec_hashnr(info,pos->data); + hash_nr= pos->hash_nr; if (flag == 0) /* First loop; Check if ok */ if (my_hash_mask(hash_nr, info->blength, info->records) != first_index) break; @@ -413,17 +415,19 @@ my_bool my_hash_insert(HASH *info, const uchar *record) { if (flag & HIGHFIND) { - flag=LOWFIND | HIGHFIND; + flag= LOWFIND | HIGHFIND; /* key shall be moved to the current empty position */ - gpos=empty; - ptr_to_rec=pos->data; + gpos= empty; + rec_data= pos->data; + rec_hash_nr= pos->hash_nr; empty=pos; /* This place is now free */ } else { - flag=LOWFIND | LOWUSED; /* key isn't changed */ - gpos=pos; - ptr_to_rec=pos->data; + flag= LOWFIND | LOWUSED; /* key isn't changed */ + gpos= pos; + rec_data= pos->data; + rec_hash_nr= pos->hash_nr; } } else @@ -431,12 +435,14 @@ my_bool my_hash_insert(HASH *info, const uchar *record) if (!(flag & LOWUSED)) { /* Change link of previous LOW-key */ - gpos->data=ptr_to_rec; - gpos->next= (uint) (pos-data); + gpos->data= rec_data; + gpos->hash_nr= rec_hash_nr; + gpos->next= (uint) (pos-data); flag= (flag & HIGHFIND) | (LOWFIND | LOWUSED); } - gpos=pos; - ptr_to_rec=pos->data; + gpos= pos; + rec_data= pos->data; + rec_hash_nr= pos->hash_nr; } } else @@ -445,20 +451,24 @@ my_bool my_hash_insert(HASH *info, const uchar *record) { flag= (flag & LOWFIND) | HIGHFIND; /* key shall be moved to the last (empty) position */ - gpos2 = empty; empty=pos; - ptr_to_rec2=pos->data; + gpos2= empty; + empty= pos; + rec2_data= pos->data; + rec2_hash_nr= pos->hash_nr; } else { if (!(flag & HIGHUSED)) { /* Change link of previous hash-key and save */ - gpos2->data=ptr_to_rec2; - gpos2->next=(uint) (pos-data); + gpos2->data= rec2_data; + gpos2->hash_nr= rec2_hash_nr; + gpos2->next= (uint) (pos-data); flag= (flag & LOWFIND) | (HIGHFIND | HIGHUSED); } - gpos2=pos; - ptr_to_rec2=pos->data; + gpos2= pos; + rec2_data= pos->data; + rec2_hash_nr= pos->hash_nr; } } } @@ -466,41 +476,44 @@ my_bool my_hash_insert(HASH *info, const uchar *record) if ((flag & (LOWFIND | LOWUSED)) == LOWFIND) { - gpos->data=ptr_to_rec; - gpos->next=NO_RECORD; + gpos->data= rec_data; + gpos->hash_nr= rec_hash_nr; + gpos->next= NO_RECORD; } if ((flag & (HIGHFIND | HIGHUSED)) == HIGHFIND) { - gpos2->data=ptr_to_rec2; - gpos2->next=NO_RECORD; + gpos2->data= rec2_data; + gpos2->hash_nr= rec2_hash_nr; + gpos2->next= NO_RECORD; } } - /* Check if we are at the empty position */ - idx= my_hash_mask(rec_hashnr(info, record), info->blength, info->records + 1); - pos=data+idx; + idx= my_hash_mask(current_hash_nr, info->blength, info->records + 1); + pos= data+idx; + /* Check if we are at the empty position */ if (pos == empty) { - pos->data=(uchar*) record; pos->next=NO_RECORD; } else { - /* Check if more records in same hash-nr family */ - empty[0]=pos[0]; - gpos= data + my_hash_rec_mask(info, pos, info->blength, info->records + 1); + /* Move conflicting record to empty position (last) */ + empty[0]= pos[0]; + /* Check if the moved record was in same hash-nr family */ + gpos= data + my_hash_rec_mask(pos, info->blength, info->records + 1); if (pos == gpos) { - pos->data=(uchar*) record; - pos->next=(uint) (empty - data); + /* Point to moved record */ + pos->next= (uint32) (empty - data); } else { - pos->data=(uchar*) record; - pos->next=NO_RECORD; + pos->next= NO_RECORD; movelink(data,(uint) (pos-data),(uint) (gpos-data),(uint) (empty-data)); } } + pos->data= (uchar*) record; + pos->hash_nr= current_hash_nr; if (++info->records == info->blength) info->blength+= info->blength; return(0); @@ -557,15 +570,14 @@ my_bool my_hash_delete(HASH *hash, uchar *record) else if (pos->next != NO_RECORD) { empty=data+(empty_index=pos->next); - pos->data=empty->data; - pos->next=empty->next; + pos[0]= empty[0]; } - if (empty == lastpos) /* last key at wrong pos or no next link */ + if (empty == lastpos) /* last key at wrong pos or no next link */ goto exit; /* Move the last key (lastpos) */ - lastpos_hashnr=rec_hashnr(hash,lastpos->data); + lastpos_hashnr= lastpos->hash_nr; /* pos is where lastpos should be */ pos= data + my_hash_mask(lastpos_hashnr, hash->blength, hash->records); if (pos == empty) /* Move to empty position. */ @@ -573,7 +585,7 @@ my_bool my_hash_delete(HASH *hash, uchar *record) empty[0]=lastpos[0]; goto exit; } - pos_hashnr=rec_hashnr(hash,pos->data); + pos_hashnr= pos->hash_nr; /* pos3 is where the pos should be */ pos3= data + my_hash_mask(pos_hashnr, hash->blength, hash->records); if (pos != pos3) @@ -616,23 +628,30 @@ exit: my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key, size_t old_key_length) { - uint new_index,new_pos_index,records; - size_t idx, empty, blength; + uint new_index, new_pos_index, org_index, records, idx; + size_t length, empty, blength; + my_hash_value_type hash_nr; HASH_LINK org_link,*data,*previous,*pos; + uchar *new_key; DBUG_ENTER("my_hash_update"); + + new_key= (uchar*) my_hash_key(hash, record, &length, 1); + hash_nr= hash->hash_function(hash->charset, new_key, length); if (HASH_UNIQUE & hash->flags) { HASH_SEARCH_STATE state; - uchar *found, *new_key= (uchar*) my_hash_key(hash, record, &idx, 1); - if ((found= my_hash_first(hash, new_key, idx, &state))) + uchar *found; + + if ((found= my_hash_first_from_hash_value(hash, hash_nr, new_key, length, + &state))) { do { if (found != record) DBUG_RETURN(1); /* Duplicate entry */ } - while ((found= my_hash_next(hash, new_key, idx, &state))); + while ((found= my_hash_next(hash, new_key, length, &state))); } } @@ -645,19 +664,24 @@ my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key, (old_key_length ? old_key_length : hash->key_length)), blength, records); - new_index= my_hash_mask(rec_hashnr(hash, record), blength, records); - if (idx == new_index) - DBUG_RETURN(0); /* Nothing to do (No record check) */ + org_index= idx; + new_index= my_hash_mask(hash_nr, blength, records); previous=0; for (;;) { - if ((pos= data+idx)->data == record) break; previous=pos; if ((idx=pos->next) == NO_RECORD) DBUG_RETURN(1); /* Not found in links */ } + + if (org_index == new_index) + { + data[idx].hash_nr= hash_nr; /* Hash number may have changed */ + DBUG_RETURN(0); /* Record is in right position */ + } + org_link= *pos; empty=idx; @@ -692,21 +716,24 @@ my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key, data[empty]= org_link; } data[empty].next= NO_RECORD; + data[empty].hash_nr= hash_nr; DBUG_RETURN(0); } pos=data+new_index; - new_pos_index= my_hash_rec_mask(hash, pos, blength, records); + new_pos_index= my_hash_rec_mask(pos, blength, records); if (new_index != new_pos_index) { /* Other record in wrong position */ - data[empty] = *pos; + data[empty]= *pos; movelink(data,new_index,new_pos_index, (uint) empty); org_link.next=NO_RECORD; data[new_index]= org_link; + data[new_index].hash_nr= hash_nr; } else { /* Link in chain at right position */ org_link.next=data[new_index].next; data[empty]=org_link; + data[empty].hash_nr= hash_nr; data[new_index].next= (uint) empty; } DBUG_RETURN(0); @@ -773,7 +800,7 @@ my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument) } -#ifndef DBUG_OFF +#if !defined(DBUG_OFF) || defined(MAIN) my_bool my_hash_check(HASH *hash) { @@ -789,7 +816,15 @@ my_bool my_hash_check(HASH *hash) for (i=found=max_links=seek=0 ; i < records ; i++) { - if (my_hash_rec_mask(hash, data + i, blength, records) == i) + size_t length; + uchar *key= (uchar*) my_hash_key(hash, data[i].data, &length, 0); + if (data[i].hash_nr != hash->hash_function(hash->charset, key, length)) + { + DBUG_PRINT("error", ("record at %d has wrong hash", i)); + error= 1; + } + + if (my_hash_rec_mask(data + i, blength, records) == i) { found++; seek++; links=1; for (idx=data[i].next ; @@ -805,7 +840,7 @@ my_bool my_hash_check(HASH *hash) } hash_info=data+idx; seek+= ++links; - if ((rec_link= my_hash_rec_mask(hash, hash_info, + if ((rec_link= my_hash_rec_mask(hash_info, blength, records)) != i) { DBUG_PRINT("error", ("Record in wrong link at %d: Start %d " @@ -828,6 +863,71 @@ my_bool my_hash_check(HASH *hash) DBUG_PRINT("info", ("records: %u seeks: %d max links: %d hitrate: %.2f", records,seek,max_links,(float) seek / (float) records)); + DBUG_ASSERT(error == 0); return error; } #endif + +#ifdef MAIN + +#define RECORDS 1000 + +uchar *test_get_key(uchar *data, size_t *length, + my_bool not_used __attribute__((unused))) +{ + *length= 2; + return data; +} + + +int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) +{ + uchar records[RECORDS][2], copy[2]; + HASH hash_test; + uint i; + MY_INIT(argv[0]); + DBUG_PUSH("d:t:O,/tmp/test_hash.trace"); + + printf("my_hash_init\n"); + if (my_hash_init2(&hash_test, 100, &my_charset_bin, 20, + 0, 0, (my_hash_get_key) test_get_key, 0, 0, HASH_UNIQUE)) + { + fprintf(stderr, "hash init failed\n"); + exit(1); + } + + printf("my_hash_insert\n"); + for (i= 0 ; i < RECORDS ; i++) + { + int2store(records[i],i); + my_hash_insert(&hash_test, records[i]); + my_hash_check(&hash_test); + } + printf("my_hash_update\n"); + for (i= 0 ; i < RECORDS ; i+=2) + { + memcpy(copy, records[i], 2); + int2store(records[i],i + RECORDS); + if (my_hash_update(&hash_test, records[i], copy, 2)) + { + fprintf(stderr, "hash update failed\n"); + exit(1); + } + my_hash_check(&hash_test); + } + printf("my_hash_delete\n"); + for (i= 0 ; i < RECORDS ; i++) + { + if (my_hash_delete(&hash_test, records[i])) + { + fprintf(stderr, "hash delete failed\n"); + exit(1); + } + my_hash_check(&hash_test); + } + my_hash_free(&hash_test); + printf("ok\n"); + my_end(MY_CHECK_ERROR); + return(0); +} +#endif /* MAIN */ diff --git a/mysys/ma_dyncol.c b/mysys/ma_dyncol.c index 4d281b98d1c..c0622cd2cbf 100644 --- a/mysys/ma_dyncol.c +++ b/mysys/ma_dyncol.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2013, Monty Program Ab +/* Copyright (c) 2011, 2017, MariaDB Corporation. Copyright (c) 2011, 2012, Oleksandr Byelkin Redistribution and use in source and binary forms, with or without @@ -74,15 +74,15 @@ uint32 copy_and_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs, 2 bits which determinate size of offset in the header -1 */ /* mask to get above bits */ -#define DYNCOL_FLG_OFFSET (1|2) -#define DYNCOL_FLG_NAMES 4 -#define DYNCOL_FLG_NMOFFSET (8|16) +#define DYNCOL_FLG_OFFSET (1U|2U) +#define DYNCOL_FLG_NAMES 4U +#define DYNCOL_FLG_NMOFFSET (8U|16U) /** All known flags mask that could be set. @note DYNCOL_FLG_NMOFFSET should be 0 for now. */ -#define DYNCOL_FLG_KNOWN (1|2|4) +#define DYNCOL_FLG_KNOWN (1U|2U|4U) /* formats */ enum enum_dyncol_format @@ -294,7 +294,7 @@ static void set_fixed_header_named(DYNAMIC_COLUMN *str, DYN_HEADER *hdr) DBUG_ASSERT(hdr->offset_size <= MAX_OFFSET_LENGTH_NM); /* size of data offset, named format flag, size of names offset (0 means 2) */ str->str[0]= - (char) ((str->str[0] & ~(DYNCOL_FLG_OFFSET | DYNCOL_FLG_NMOFFSET)) | + (char) (((uchar)str->str[0] & ~(DYNCOL_FLG_OFFSET | DYNCOL_FLG_NMOFFSET)) | (hdr->offset_size - 2) | DYNCOL_FLG_NAMES); int2store(str->str + 1, hdr->column_count); /* columns number */ int2store(str->str + 3, hdr->nmpool_size); @@ -319,7 +319,7 @@ static my_bool type_and_offset_store_num(uchar *place, size_t offset_size, { ulong val = (((ulong) offset) << 3) | (type - 1); DBUG_ASSERT(type != DYN_COL_NULL); - DBUG_ASSERT(((type - 1) & (~7)) == 0); /* fit in 3 bits */ + DBUG_ASSERT(((type - 1) & (~7U)) == 0); /* fit in 3 bits */ DBUG_ASSERT(offset_size >= 1 && offset_size <= 4); /* Index entry starts with column number; jump over it */ @@ -359,7 +359,7 @@ static my_bool type_and_offset_store_named(uchar *place, size_t offset_size, { ulonglong val = (((ulong) offset) << 4) | (type - 1); DBUG_ASSERT(type != DYN_COL_NULL); - DBUG_ASSERT(((type - 1) & (~0xf)) == 0); /* fit in 4 bits */ + DBUG_ASSERT(((type - 1) & (~0xfU)) == 0); /* fit in 4 bits */ DBUG_ASSERT(offset_size >= 2 && offset_size <= 5); /* Index entry starts with name offset; jump over it */ diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index bfdda25cafa..72385daef42 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -397,8 +397,9 @@ void end_slave_io_cache(IO_CACHE *cache) void seek_io_cache(IO_CACHE *cache, my_off_t needed_offset) { my_off_t cached_data_start= cache->pos_in_file; - my_off_t cached_data_end= cache->pos_in_file + (cache->read_pos - + my_off_t cached_data_end= cache->pos_in_file + (cache->read_end - cache->buffer); + if (needed_offset >= cached_data_start && needed_offset < cached_data_end) { @@ -416,11 +417,17 @@ void seek_io_cache(IO_CACHE *cache, my_off_t needed_offset) The offset we're seeking to is not in the buffer. - Set the buffer to be exhausted. - Make the next read to a mysql_file_seek() call to the required - offset (but still use aligned reads). + offset. + TODO(cvicentiu, spetrunia) properly implement aligned seeks for + efficiency. */ - cache->read_pos= cache->read_end; cache->seek_not_done= 1; - cache->pos_in_file= (needed_offset / IO_SIZE) * IO_SIZE; + cache->pos_in_file= needed_offset; + /* When reading it must appear as if we've started from the offset + that we've seeked here. We must let _my_b_cache_read assume that + by implying "no reading starting from pos_in_file" has happened. */ + cache->read_pos= cache->buffer; + cache->read_end= cache->buffer; } } diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index 3077415b243..74eaa12f19d 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -1,4 +1,5 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -274,16 +275,16 @@ struct st_hash_link }; /* simple states of a block */ -#define BLOCK_ERROR 1 /* an error occurred when performing file i/o */ -#define BLOCK_READ 2 /* file block is in the block buffer */ -#define BLOCK_IN_SWITCH 4 /* block is preparing to read new page */ -#define BLOCK_REASSIGNED 8 /* blk does not accept requests for old page */ -#define BLOCK_IN_FLUSH 16 /* block is selected for flush */ -#define BLOCK_CHANGED 32 /* block buffer contains a dirty page */ -#define BLOCK_IN_USE 64 /* block is not free */ -#define BLOCK_IN_EVICTION 128 /* block is selected for eviction */ -#define BLOCK_IN_FLUSHWRITE 256 /* block is in write to file */ -#define BLOCK_FOR_UPDATE 512 /* block is selected for buffer modification */ +#define BLOCK_ERROR 1U/* an error occurred when performing file i/o */ +#define BLOCK_READ 2U/* file block is in the block buffer */ +#define BLOCK_IN_SWITCH 4U/* block is preparing to read new page */ +#define BLOCK_REASSIGNED 8U/* blk does not accept requests for old page */ +#define BLOCK_IN_FLUSH 16U/* block is selected for flush */ +#define BLOCK_CHANGED 32U/* block buffer contains a dirty page */ +#define BLOCK_IN_USE 64U/* block is not free */ +#define BLOCK_IN_EVICTION 128U/* block is selected for eviction */ +#define BLOCK_IN_FLUSHWRITE 256U/* block is in write to file */ +#define BLOCK_FOR_UPDATE 512U/* block is selected for buffer modification */ /* page status, returned by find_key_block */ #define PAGE_READ 0 diff --git a/mysys/my_atomic_writes.c b/mysys/my_atomic_writes.c new file mode 100644 index 00000000000..0b54a207713 --- /dev/null +++ b/mysys/my_atomic_writes.c @@ -0,0 +1,333 @@ +/* Copyright (c) 2016, MariaDB Corporation + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "mysys_priv.h" + +my_bool my_may_have_atomic_write= 0; + +#ifdef __linux__ + +my_bool has_shannon_atomic_write= 0, has_fusion_io_atomic_write= 0; + +#include + + +/*********************************************************************** + FUSION_IO +************************************************************************/ + +/** FusionIO atomic write control info */ +#define DFS_IOCTL_ATOMIC_WRITE_SET _IOW(0x95, 2, uint) + + +/** + Check if the system has a funsion_io card + @return TRUE Card exists +*/ + +static my_bool test_if_fusion_io_card_exists() +{ + /* Fusion card requires fallocate to exists */ +#ifndef HAVE_POSIX_FALLOCATE + return 0; +#else + return (access("/dev/fcta", F_OK)) == 0; +#endif +} + + +/** + Check if a file is on a Fusion_IO device and that it supports atomic_write + @param[in] file OS file handle + @param[in] page_size page size + @return TRUE Atomic write supported +*/ + +static my_bool fusion_io_has_atomic_write(File file, int page_size) +{ + int atomic= 1; + if (page_size <= 32768 && + ioctl(file, DFS_IOCTL_ATOMIC_WRITE_SET, &atomic) != -1) + return(TRUE); + return(FALSE); +} + + +/*********************************************************************** + SHANNON +************************************************************************/ + +#define SHANNON_IOMAGIC 'x' +#define SHANNON_IOCQATOMIC_SIZE _IO(SHANNON_IOMAGIC, 22) + +#define SHANNON_MAX_DEVICES 32 +#define SHANNON_NO_ATOMIC_SIZE_YET -2 + +struct shannon_dev +{ + char dev_name[32]; + dev_t st_dev; + int atomic_size; +}; + + +static struct shannon_dev shannon_devices[SHANNON_MAX_DEVICES+1]; + +/** + Check if the system has a Shannon card + If card exists, record device numbers to allow us to later check if + a given file is on this device. + @return TRUE Card exists +*/ + +static my_bool test_if_shannon_card_exists() +{ + uint shannon_found_devices= 0; + char dev_part; + uint dev_no; + + if (access("/dev/scta", F_OK) < 0) + return 0; + + /* + The Shannon devices are /dev/dfX, where X can be from a-z. + We have to check all of them as some may be missing if the user + removed one with the U.2 interface. + */ + + for (dev_part= 'a' ; dev_part < 'z' ; dev_part++) + { + char path[32]; + struct stat stat_buff; + + sprintf(path, "/dev/df%c", dev_part); +#ifdef TEST_SHANNON + if (lstat(path, &stat_buff) < 0) + { + printf("%s(): lstat failed.\n", __func__); + break; + } +#endif + shannon_devices[shannon_found_devices].st_dev= stat_buff.st_rdev; + sprintf(shannon_devices[shannon_found_devices].dev_name, "/dev/sct%c", + dev_part); + +#ifdef TEST_SHANNON + printf("%s(): i=%d, stat_buff.st_dev=0x%lx, stat_buff.st_rdev=0x%lx, st_rdev=0x%lx, dev_name=%s\n", + __func__, + shannon_found_devices, + (ulong) stat_buff.st_dev, + (ulong) stat_buff.st_rdev, + (ulong) shannon_devices[shannon_found_devices].st_dev, + shannon_devices[shannon_found_devices].dev_name); +#endif + + /* + The atomic size will be checked on first access. This is needed + as a normal user can't open the /dev/scta file + */ + shannon_devices[shannon_found_devices].atomic_size= + SHANNON_NO_ATOMIC_SIZE_YET; + if (++shannon_found_devices== SHANNON_MAX_DEVICES) + goto end; + + for (dev_no= 1 ; dev_no < 9 ; dev_no++) + { + sprintf(path, "/dev/df%c%d", dev_part, dev_no); + if (lstat(path, &stat_buff) < 0) + break; + + shannon_devices[shannon_found_devices].st_dev= stat_buff.st_rdev; + sprintf(shannon_devices[shannon_found_devices].dev_name, "/dev/sct%c%d", + dev_part, dev_no); + +#ifdef TEST_SHANNON + printf("%s(): i=%d, st_dev=0x%lx, st_rdev=0x%lx, dev_name=%s\n", + __func__, + shannon_found_devices, + (ulong) stat_buff.st_dev, + (ulong) shannon_devices[shannon_found_devices].st_dev, + shannon_devices[shannon_found_devices].dev_name); +#endif + + /* + The atomic size will be checked on first access. This is needed + as a normal user can't open the /dev/scta file + */ + shannon_devices[shannon_found_devices].atomic_size= + SHANNON_NO_ATOMIC_SIZE_YET; + if (++shannon_found_devices == SHANNON_MAX_DEVICES) + goto end; + } + } +end: + shannon_devices[shannon_found_devices].st_dev= 0; + return shannon_found_devices > 0; +} + + +static my_bool shannon_dev_has_atomic_write(struct shannon_dev *dev, + int page_size) +{ +#ifdef TEST_SHANNON + printf("%s: enter: page_size=%d, atomic_size=%d, dev_name=%s\n", + __func__, + page_size, + dev->atomic_size, + dev->dev_name); +#endif + if (dev->atomic_size == SHANNON_NO_ATOMIC_SIZE_YET) + { + int fd= open(dev->dev_name, 0); + if (fd < 0) + { + perror("open() failed!"); + dev->atomic_size= 0; /* Don't try again */ + return FALSE; + } + dev->atomic_size= ioctl(fd, SHANNON_IOCQATOMIC_SIZE); + close(fd); + } + +#ifdef TEST_SHANNON + printf("%s: exit: page_size=%d, atomic_size=%d, dev_name=%s\n", + __func__, + page_size, + dev->atomic_size, + dev->dev_name); +#endif + return (page_size <= dev->atomic_size); +} + + +/** + Check if a file is on a Shannon device and that it supports atomic_write + @param[in] file OS file handle + @param[in] page_size page size + @return TRUE Atomic write supported + + @notes + This is called only at first open of a file. In this case it's doesn't + matter so much that we loop over all cards. + We update the atomic size on first access. +*/ + +static my_bool shannon_has_atomic_write(File file, int page_size) +{ + struct shannon_dev *dev; + struct stat stat_buff; + + if (fstat(file, &stat_buff) < 0) + { +#ifdef TEST_SHANNON + printf("%s(): fstat failed\n", __func__); +#endif + return 0; + } + +#ifdef TEST_SHANNON + printf("%s(): st_dev=0x%lx, st_rdev=0x%lx\n", __func__, + (ulong) stat_buff.st_dev, (ulong) stat_buff.st_rdev); +#endif + + for (dev= shannon_devices ; dev->st_dev; dev++) + { +#ifdef TEST_SHANNON + printf("%s(): st_rdev=0x%lx\n", __func__, (ulong) dev->st_dev); +#endif + if (stat_buff.st_dev == dev->st_dev) + return shannon_dev_has_atomic_write(dev, page_size); + } + return 0; +} + + +/*********************************************************************** + Generic atomic write code +************************************************************************/ + +/* + Initalize automic write sub systems. + Checks if we have any devices that supports atomic write +*/ + +void my_init_atomic_write(void) +{ + if ((has_shannon_atomic_write= test_if_shannon_card_exists()) || + (has_fusion_io_atomic_write= test_if_fusion_io_card_exists())) + my_may_have_atomic_write= 1; +#ifdef TEST_SHANNON + printf("%s(): has_shannon_atomic_write=%d, my_may_have_atomic_write=%d\n", + __func__, + has_shannon_atomic_write, + my_may_have_atomic_write); +#endif +} + + +/** + Check if a file supports atomic write + + @return FALSE No atomic write support + TRUE File supports atomic write +*/ + +my_bool my_test_if_atomic_write(File handle, int page_size) +{ +#ifdef TEST_SHANNON + printf("%s(): has_shannon_atomic_write=%d, my_may_have_atomic_write=%d\n", + __func__, + has_shannon_atomic_write, + my_may_have_atomic_write); +#endif + if (!my_may_have_atomic_write) + return 0; + if (has_shannon_atomic_write && + shannon_has_atomic_write(handle, page_size)) + return 1; + + if (has_fusion_io_atomic_write && + fusion_io_has_atomic_write(handle, page_size)) + return 1; + + return 0; +} + +#ifdef TEST_SHANNON +int main() +{ + int fd, ret; + + my_init_atomic_write(); + fd= open("/u01/1.file", O_RDWR); + ret= my_test_if_atomic_write(fd, 4096); + if (ret) + printf("support atomic_write\n"); + else + printf("do not support atomic_write\n"); + close(fd); + return 0; +} +#endif + + +#else /* __linux__ */ + +/* Dummy functions to provide the interfaces for other systems */ + +void my_init_atomic_write(void) +{ +} +#endif /* __linux__ */ diff --git a/mysys/my_default.c b/mysys/my_default.c index a8c3c53adf6..6324c19bdda 100644 --- a/mysys/my_default.c +++ b/mysys/my_default.c @@ -90,7 +90,7 @@ static my_bool defaults_already_read= FALSE; /* Which directories are searched for options (and in which order) */ -#define MAX_DEFAULT_DIRS 6 +#define MAX_DEFAULT_DIRS 7 #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */ static const char **default_directories = NULL; @@ -1182,7 +1182,12 @@ static const char **init_default_directories(MEM_ROOT *alloc) errors += add_directory(alloc, "C:/", dirs); if (my_get_module_parent(fname_buffer, sizeof(fname_buffer)) != NULL) + { errors += add_directory(alloc, fname_buffer, dirs); + + strncat(fname_buffer, "/data", sizeof(fname_buffer)); + errors += add_directory(alloc, fname_buffer, dirs); + } } #else diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index 3f75f6553a2..57b28d1fd8a 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -949,15 +949,39 @@ my_bool getopt_compare_strings(register const char *s, register const char *t, /* function: eval_num_suffix + Transforms suffix like k/m/g to their real value. +*/ + +static inline long eval_num_suffix(char *suffix, int *error) +{ + long num= 1; + if (*suffix == 'k' || *suffix == 'K') + num*= 1024L; + else if (*suffix == 'm' || *suffix == 'M') + num*= 1024L * 1024L; + else if (*suffix == 'g' || *suffix == 'G') + num*= 1024L * 1024L * 1024L; + else if (*suffix) + { + *error= 1; + return 0; + } + return num; +} + +/* + function: eval_num_suffix_ll + Transforms a number with a suffix to real number. Suffix can be k|K for kilo, m|M for mega or g|G for giga. */ -static longlong eval_num_suffix(char *argument, int *error, char *option_name) +static longlong eval_num_suffix_ll(char *argument, + int *error, char *option_name) { char *endchar; longlong num; - DBUG_ENTER("eval_num_suffix"); + DBUG_ENTER("eval_num_suffix_ll"); *error= 0; @@ -970,23 +994,47 @@ static longlong eval_num_suffix(char *argument, int *error, char *option_name) *error= 1; DBUG_RETURN(0); } - if (*endchar == 'k' || *endchar == 'K') - num*= 1024L; - else if (*endchar == 'm' || *endchar == 'M') - num*= 1024L * 1024L; - else if (*endchar == 'g' || *endchar == 'G') - num*= 1024L * 1024L * 1024L; - else if (*endchar) - { + num*= eval_num_suffix(endchar, error); + if (*error) fprintf(stderr, "Unknown suffix '%c' used for variable '%s' (value '%s')\n", *endchar, option_name, argument); + DBUG_RETURN(num); +} + +/* + function: eval_num_suffix_ull + + Transforms a number with a suffix to positive Integer. Suffix can + be k|K for kilo, m|M for mega or g|G for giga. +*/ + +static ulonglong eval_num_suffix_ull(char *argument, + int *error, char *option_name) +{ + char *endchar; + ulonglong num; + DBUG_ENTER("eval_num_suffix_ull"); + + *error= 0; + errno= 0; + num= strtoull(argument, &endchar, 10); + if (errno == ERANGE) + { + my_getopt_error_reporter(ERROR_LEVEL, + "Incorrect integer value: '%s'", argument); *error= 1; DBUG_RETURN(0); } + num*= eval_num_suffix(endchar, error); + if (*error) + fprintf(stderr, + "Unknown suffix '%c' used for variable '%s' (value '%s')\n", + *endchar, option_name, argument); DBUG_RETURN(num); } + /* function: getopt_ll @@ -1000,7 +1048,7 @@ static longlong eval_num_suffix(char *argument, int *error, char *option_name) static longlong getopt_ll(char *arg, const struct my_option *optp, int *err) { - longlong num=eval_num_suffix(arg, err, (char*) optp->name); + longlong num=eval_num_suffix_ll(arg, err, (char*) optp->name); return getopt_ll_limit_value(num, optp, NULL); } @@ -1077,7 +1125,7 @@ longlong getopt_ll_limit_value(longlong num, const struct my_option *optp, static ulonglong getopt_ull(char *arg, const struct my_option *optp, int *err) { - ulonglong num= eval_num_suffix(arg, err, (char*) optp->name); + ulonglong num= eval_num_suffix_ull(arg, err, (char*) optp->name); return getopt_ull_limit_value(num, optp, NULL); } diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c index e533230106e..dc02d3896bd 100644 --- a/mysys/my_malloc.c +++ b/mysys/my_malloc.c @@ -48,7 +48,6 @@ static inline size_t malloc_size_and_flag(void *p, my_bool *is_thread_specific) #define MALLOC_FIX_POINTER_FOR_FREE(p) (((char*) (p)) - MALLOC_PREFIX_SIZE) #endif /* SAFEMALLOC */ -static MALLOC_SIZE_CB malloc_size_cb_func= NULL; /** Inform application that memory usage has changed @@ -59,17 +58,19 @@ static MALLOC_SIZE_CB malloc_size_cb_func= NULL; The type os size is long long, to be able to handle negative numbers to decrement the memory usage -*/ -static void update_malloc_size(long long size, my_bool is_thread_specific) -{ - if (malloc_size_cb_func) - malloc_size_cb_func(size, is_thread_specific); -} + @return 0 - ok + 1 - failure, abort the allocation +*/ +static void dummy(long long size __attribute__((unused)), + my_bool is_thread_specific __attribute__((unused))) +{} + +static MALLOC_SIZE_CB update_malloc_size= dummy; void set_malloc_size_cb(MALLOC_SIZE_CB func) { - malloc_size_cb_func= func; + update_malloc_size= func ? func : dummy; } diff --git a/mysys/my_setuser.c b/mysys/my_setuser.c new file mode 100644 index 00000000000..14ab04dd10f --- /dev/null +++ b/mysys/my_setuser.c @@ -0,0 +1,82 @@ +#include +#include +#include +#include +#ifdef HAVE_PWD_H +#include +#endif +#ifdef HAVE_GRP_H +#include +#endif + +struct passwd *my_check_user(const char *user, myf MyFlags) +{ + struct passwd *user_info; + uid_t user_id= geteuid(); + DBUG_ENTER("my_check_user"); + + // Don't bother if we aren't superuser + if (user_id) + { + if (user) + { + /* Don't give a warning, if real user is same as given with --user */ + user_info= getpwnam(user); + if (!user_info || user_id != user_info->pw_uid) + { + my_errno= EPERM; + if (MyFlags & MY_WME) + my_printf_error(my_errno, "One can only use the --user switch if " + "running as root", MYF(ME_JUST_WARNING|ME_NOREFRESH)); + } + } + DBUG_RETURN(NULL); + } + if (!user) + { + if (MyFlags & MY_FAE) + { + my_errno= EINVAL; + my_printf_error(my_errno, "Please consult the Knowledge Base to find " + "out how to run mysqld as root!", MYF(ME_NOREFRESH)); + } + DBUG_RETURN(NULL); + } + if (!strcmp(user,"root")) + DBUG_RETURN(NULL); + + if (!(user_info= getpwnam(user))) + { + // Allow a numeric uid to be used + int err= 0; + user_id= my_strtoll10(user, NULL, &err); + if (err || !(user_info= getpwuid(user_id))) + { + my_errno= EINVAL; + my_printf_error(my_errno, "Can't change to run as user '%s'. Please " + "check that the user exists!", MYF(ME_NOREFRESH), user); + DBUG_RETURN(NULL); + } + } + DBUG_ASSERT(user_info); + DBUG_RETURN(user_info); +} + +int my_set_user(const char *user, struct passwd *user_info, myf MyFlags) +{ + DBUG_ENTER("my_set_user"); + + DBUG_ASSERT(user_info != 0); +#ifdef HAVE_INITGROUPS + initgroups(user, user_info->pw_gid); +#endif + if (setgid(user_info->pw_gid) == -1 || setuid(user_info->pw_uid) == -1) + { + my_errno= errno; + if (MyFlags & MY_WME) + my_printf_error(errno, "Cannot change uid/gid (errno: %d)", MYF(ME_NOREFRESH), + errno); + DBUG_RETURN(my_errno); + } + DBUG_RETURN(0); +} diff --git a/mysys_ssl/my_crypt.cc b/mysys_ssl/my_crypt.cc index 49bd9af3f60..5411a908bf8 100644 --- a/mysys_ssl/my_crypt.cc +++ b/mysys_ssl/my_crypt.cc @@ -168,6 +168,9 @@ public: */ if (!ctx.encrypt) { + /* encrypted string must contain authenticaton tag (see MDEV-11174) */ + if (slen < MY_AES_BLOCK_SIZE) + return MY_AES_BAD_DATA; slen-= MY_AES_BLOCK_SIZE; if(!EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_GCM_SET_TAG, MY_AES_BLOCK_SIZE, (void*)(src + slen))) diff --git a/mysys_ssl/yassl.cc b/mysys_ssl/yassl.cc index 9717870fe26..5146c9a9abc 100644 --- a/mysys_ssl/yassl.cc +++ b/mysys_ssl/yassl.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2015 MariaDB Corporation + Copyright (c) 2015, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,9 +27,9 @@ using yaSSL::yaERR_remove_state; -#define EVP_CIPH_ECB_MODE 0x1 -#define EVP_CIPH_CBC_MODE 0x2 -#define EVP_CIPH_NO_PADDING 0x100 +#define EVP_CIPH_ECB_MODE 0x1U +#define EVP_CIPH_CBC_MODE 0x2U +#define EVP_CIPH_NO_PADDING 0x100U /* note that TaoCrypt::AES object is not explicitly put into EVP_CIPHER_CTX. diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c index a06c0409cd6..95b9586a1c5 100644 --- a/plugin/server_audit/server_audit.c +++ b/plugin/server_audit/server_audit.c @@ -2843,6 +2843,7 @@ void __attribute__ ((constructor)) audit_plugin_so_init(void) _mysql_plugin_declarations_[0].info= mysql_v4_descriptor; use_event_data_for_disconnect= 1; } + MYSQL_SYSVAR_NAME(loc_info).flags= PLUGIN_VAR_READONLY | PLUGIN_VAR_MEMALLOC; } memset(locinfo_ini_value, 'O', sizeof(locinfo_ini_value)-1); diff --git a/scripts/mariadb-service-convert b/scripts/mariadb-service-convert index 42654f68420..83c92659144 100755 --- a/scripts/mariadb-service-convert +++ b/scripts/mariadb-service-convert @@ -16,7 +16,7 @@ # # PURPOSE: # -# Used to generate a mariadb.service file based on the curent mysql/maridb settings +# Used to generate a mariadb.service file based on the current mysql/mariadb settings # # This is to assist distro maintainers in migrating to systemd service definations from # a user mysqld_safe settings in the my.cnf files. diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 3b48dad649c..f8f4859e627 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -35,11 +35,26 @@ force=0 in_rpm=0 ip_only=0 cross_bootstrap=0 +install_params="" +auth_root_authentication_method=normal +auth_root_socket_user='root' usage() { cat < /dev/null +case "$auth_root_authentication_method" in + normal) + install_params="$install_params +SET @skip_auth_root_nopasswd=NULL; +SET @auth_root_socket=NULL;" ;; + socket) + install_params="$install_params +SET @skip_auth_root_nopasswd=1; +SET @auth_root_socket='$auth_root_socket_user';" ;; +esac +if { echo "use mysql;$install_params"; cat "$create_system_tables" "$create_system_tables2" "$fill_system_tables" "$fill_help_tables" "$maria_add_gis_sp"; } | eval "$filter_cmd_line" | mysqld_install_cmd_line > /dev/null then s_echo "OK" else diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql index 075aafd5e3b..9556e7ba160 100644 --- a/scripts/mysql_system_tables_data.sql +++ b/scripts/mysql_system_tables_data.sql @@ -38,15 +38,24 @@ DROP TABLE tmp_db; -- Fill "user" table with default users allowing root access -- from local machine if "user" table didn't exist before -CREATE TEMPORARY TABLE tmp_user LIKE user; -INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N', 'N','', 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','Y','','','','',0,0,0,0,'','','N','N','',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,'','','N','N','',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,'','','N','N', '', 0); -INSERT INTO tmp_user (host,user) VALUES ('localhost',''); -INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost'; -INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; -DROP TABLE tmp_user; +CREATE TEMPORARY TABLE tmp_user_nopasswd LIKE user; +CREATE TEMPORARY TABLE tmp_user_socket LIKE user; +CREATE TEMPORARY TABLE tmp_user_anonymous LIKE user; +-- Classic passwordless root account. +INSERT INTO tmp_user_nopasswd VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N', 'N','', 0); +REPLACE INTO tmp_user_nopasswd SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N','',0 FROM dual WHERE @current_hostname != 'localhost'; +REPLACE INTO tmp_user_nopasswd VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N','',0); +REPLACE INTO tmp_user_nopasswd VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N', '', 0); +-- More secure root account using unix sucket auth. +INSERT INTO tmp_user_socket VALUES ('localhost',IFNULL(@auth_root_socket, '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,'unix_socket','','N', 'N','', 0); +-- Anonymous user with no privileges. +INSERT INTO tmp_user_anonymous (host,user) VALUES ('localhost',''); +INSERT INTO tmp_user_anonymous (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost'; + +INSERT INTO user SELECT * FROM tmp_user_nopasswd WHERE @had_user_table=0 AND @skip_auth_root_nopasswd IS NULL; +INSERT INTO user SELECT * FROM tmp_user_socket WHERE @had_user_table=0 AND @auth_root_socket IS NOT NULL; +INSERT INTO user SELECT * FROM tmp_user_anonymous WHERE @had_user_table=0 AND @skip_auth_anonymous IS NULL; +DROP TABLE tmp_user_nopasswd, tmp_user_socket, tmp_user_anonymous; CREATE TEMPORARY TABLE tmp_proxies_priv LIKE proxies_priv; INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now()); diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index ea1059cdd78..80d0ef714a3 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -164,6 +164,12 @@ ALTER TABLE user MODIFY Host char(60) NOT NULL default '', MODIFY User char(80) NOT NULL default '', ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; + +# In MySQL 5.7.6 the Password column is removed. Recreate it to preserve the number +# of columns MariaDB expects in the user table. +ALTER TABLE user + ADD Password char(41) character set latin1 collate latin1_bin NOT NULL default '' AFTER User; + ALTER TABLE user MODIFY Password char(41) character set latin1 collate latin1_bin NOT NULL default '', MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 000271f7808..48baf61be3a 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -132,6 +132,18 @@ my_which () return $ret # Success } +find_in_bin() { + if test -x "$MY_BASEDIR_VERSION/bin/$1" + then + echo "$MY_BASEDIR_VERSION/bin/$1" + elif test -x "@bindir@/$1" + then + echo "@bindir@/$1" + else + echo "$1" + fi +} + log_generic () { [ $dry_run -eq 1 ] && return priority="$1" @@ -141,7 +153,7 @@ log_generic () { echo "$msg" case $logging in init) ;; # Just echo the message, don't save it anywhere - file) echo "$msg" >> "$err_log" ;; + file) echo "$msg" | "$helper" "$user" log "$err_log" ;; syslog) logger -t "$syslog_tag_mysqld_safe" -p "$priority" "$*" ;; *) echo "Internal program error (non-fatal):" \ @@ -161,7 +173,7 @@ log_notice () { eval_log_error () { local cmd="$1" case $logging in - file) cmd="$cmd >> "`shell_quote_string "$err_log"`" 2>&1" ;; + file) cmd="$cmd 2>&1 | "`shell_quote_string "$helper"`" $user log "`shell_quote_string "$err_log"` ;; syslog) # mysqld often prefixes its messages with a timestamp, which is # redundant when logging to syslog (which adds its own timestamp) @@ -282,7 +294,6 @@ parse_arguments() { for arg do val=`echo "$arg" | sed -e "s;--[^=]*=;;"` case "$arg" in - --crash[-_]script=*) CRASH_SCRIPT="$val" ;; # these get passed explicitly to mysqld --basedir=*) MY_BASEDIR_VERSION="$val" ;; --datadir=*|--data=*) DATADIR="$val" ;; @@ -311,6 +322,7 @@ parse_arguments() { --core[-_]file[-_]size=*) core_file_size="$val" ;; --ledir=*) ledir="$val" ;; --malloc[-_]lib=*) set_malloc_lib "$val" ;; + --crash[-_]script=*) crash_script="$val" ;; --mysqld=*) MYSQLD="$val" ;; --mysqld[-_]version=*) if test -n "$val" @@ -498,15 +510,8 @@ set_malloc_lib() { # First, try to find BASEDIR and ledir (where mysqld is) # -if echo '@pkgdatadir@' | grep '^@prefix@' > /dev/null -then - relpkgdata=`echo '@pkgdatadir@' | sed -e 's,^@prefix@,,' -e 's,^/,,' -e 's,^,./,'` -else - # pkgdatadir is not relative to prefix - relpkgdata='@pkgdatadir@' -fi - -MY_PWD=`pwd` +MY_PWD=`dirname $0` +MY_PWD=`cd "$MY_PWD"/.. && pwd` # Check for the directories we would expect from a binary release install if test -n "$MY_BASEDIR_VERSION" -a -d "$MY_BASEDIR_VERSION" then @@ -522,16 +527,16 @@ then else ledir="$MY_BASEDIR_VERSION/bin" fi -elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/bin/mysqld" +elif test -x "$MY_PWD/bin/mysqld" then MY_BASEDIR_VERSION="$MY_PWD" # Where bin, share and data are ledir="$MY_PWD/bin" # Where mysqld is # Check for the directories we would expect from a source install -elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/libexec/mysqld" +elif test -x "$MY_PWD/libexec/mysqld" then MY_BASEDIR_VERSION="$MY_PWD" # Where libexec, share and var are ledir="$MY_PWD/libexec" # Where mysqld is -elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/sbin/mysqld" +elif test -x "$MY_PWD/sbin/mysqld" then MY_BASEDIR_VERSION="$MY_PWD" # Where sbin, share and var are ledir="$MY_PWD/sbin" # Where mysqld is @@ -541,6 +546,8 @@ else ledir='@libexecdir@' fi +helper=`find_in_bin mysqld_safe_helper` +print_defaults=`find_in_bin my_print_defaults` # # Second, try to find the data directory @@ -571,34 +578,15 @@ $MY_BASEDIR_VERSION/my.cnf" fi export MYSQL_HOME - -# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe] -# and then merge with the command line arguments -if test -x "$MY_BASEDIR_VERSION/bin/my_print_defaults" -then - print_defaults="$MY_BASEDIR_VERSION/bin/my_print_defaults" -elif test -x `dirname $0`/my_print_defaults -then - print_defaults="`dirname $0`/my_print_defaults" -elif test -x ./bin/my_print_defaults -then - print_defaults="./bin/my_print_defaults" -elif test -x @bindir@/my_print_defaults -then - print_defaults="@bindir@/my_print_defaults" -elif test -x @bindir@/mysql_print_defaults -then - print_defaults="@bindir@/mysql_print_defaults" -else - print_defaults="my_print_defaults" -fi - append_arg_to_args () { args="$args "`shell_quote_string "$1"` } args= +# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe] +# and then merge with the command line arguments + SET_USER=2 parse_arguments `$print_defaults $defaults --loose-verbose --mysqld` if test $SET_USER -eq 2 @@ -707,11 +695,6 @@ then log_notice "Logging to '$err_log'." logging=file - if [ ! -f "$err_log" ]; then # if error log already exists, - touch "$err_log" # we just append. otherwise, - chmod "$fmode" "$err_log" # fix the permissions here! - fi - else if [ -n "$syslog_tag" ] then @@ -731,11 +714,6 @@ then then USER_OPTION="--user=$user" fi - # Change the err log to the right user, if it is in use - if [ $want_syslog -eq 0 ]; then - touch "$err_log" - chown $user "$err_log" - fi if test -n "$open_files" then ulimit -n $open_files @@ -973,10 +951,6 @@ cmd="$cmd $args" # Avoid 'nohup: ignoring input' warning test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null" -# close stdout and stderr, everything goes to $logging now -exec 1>&- -exec 2>&- - log_notice "Starting $MYSQLD daemon with databases from $DATADIR" # variable to track the current number of "fast" (a.k.a. subsecond) restarts @@ -986,6 +960,15 @@ max_fast_restarts=5 # flag whether a usable sleep command exists have_sleep=1 +# close stdout and stderr, everything goes to $logging now +if expr "${-}" : '.*x' > /dev/null +then + : +else + exec 1>&- + exec 2>&- +fi + # maximum number of wsrep restarts max_wsrep_restarts=0 @@ -1014,13 +997,6 @@ do else eval_log_error "$cmd" fi - - if [ $want_syslog -eq 0 -a ! -f "$err_log" ]; then - touch "$err_log" # hypothetical: log was renamed but not - chown $user "$err_log" # flushed yet. we'd recreate it with - chmod "$fmode" "$err_log" # wrong owner next time we log, so set - fi # it up correctly while we can! - end_time=`date +%M%S` if test ! -f "$pid_file" # This is removed if normal shutdown @@ -1098,12 +1074,11 @@ do fi log_notice "mysqld restarted" - if test -n "$CRASH_SCRIPT" + if test -n "$crash_script" then - crash_script_output=`$CRASH_SCRIPT 2>&1` + crash_script_output=`$crash_script 2>&1` log_error "$crash_script_output" fi done log_notice "mysqld from pid file $pid_file ended" - diff --git a/sql-common/my_time.c b/sql-common/my_time.c index 88f28e1d44a..5571b87e08a 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -1,6 +1,6 @@ /* Copyright (c) 2004, 2012, Oracle and/or its affiliates. - Copyright (c) 2010, 2013, Monty Program Ab. + Copyright (c) 2010, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1444,11 +1444,11 @@ MYSQL_TIME *unpack_time(longlong packed, MYSQL_TIME *my_time) if ((my_time->neg= packed < 0)) packed= -packed; get_one(my_time->second_part, 1000000ULL); - get_one(my_time->second, 60ULL); - get_one(my_time->minute, 60ULL); - get_one(my_time->hour, 24ULL); - get_one(my_time->day, 32ULL); - get_one(my_time->month, 13ULL); + get_one(my_time->second, 60U); + get_one(my_time->minute, 60U); + get_one(my_time->hour, 24U); + get_one(my_time->day, 32U); + get_one(my_time->month, 13U); my_time->year= (uint)packed; my_time->time_type= MYSQL_TIMESTAMP_DATETIME; return my_time; diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index d011b1a07d2..814993355b0 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -413,6 +413,7 @@ IF(WIN32) ${CMAKE_CURRENT_BINARY_DIR}/mysql_bootstrap_sql.c COMPONENT Server ) + SET_TARGET_PROPERTIES(mysql_install_db PROPERTIES COMPILE_FLAGS -DINSTALL_PLUGINDIR=${INSTALL_PLUGINDIR}) TARGET_LINK_LIBRARIES(mysql_install_db mysys) ADD_LIBRARY(winservice STATIC winservice.c) diff --git a/sql/compat56.cc b/sql/compat56.cc index 3bd6b21a154..704d1db9a98 100644 --- a/sql/compat56.cc +++ b/sql/compat56.cc @@ -65,7 +65,7 @@ void TIME_from_longlong_time_packed(MYSQL_TIME *ltime, longlong tmp) long hms; if ((ltime->neg= (tmp < 0))) tmp= -tmp; - hms= MY_PACKED_TIME_GET_INT_PART(tmp); + hms= (long) MY_PACKED_TIME_GET_INT_PART(tmp); ltime->year= (uint) 0; ltime->month= (uint) 0; ltime->day= (uint) 0; @@ -264,11 +264,11 @@ void TIME_from_longlong_datetime_packed(MYSQL_TIME *ltime, longlong tmp) ltime->day= ymd % (1 << 5); ltime->month= ym % 13; - ltime->year= ym / 13; + ltime->year= (uint) (ym / 13); ltime->second= hms % (1 << 6); ltime->minute= (hms >> 6) % (1 << 6); - ltime->hour= (hms >> 12); + ltime->hour= (uint) (hms >> 12); ltime->time_type= MYSQL_TIMESTAMP_DATETIME; } diff --git a/sql/create_options.cc b/sql/create_options.cc index 40382c7887e..7edc2cb95f2 100644 --- a/sql/create_options.cc +++ b/sql/create_options.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Monty Program Ab +/* Copyright (C) 2010, 2017, MariaDB Corporation Ab This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ #include #include "set_var.h" -#define FRM_QUOTED_VALUE 0x8000 +#define FRM_QUOTED_VALUE 0x8000U /** Links this item to the given list end diff --git a/sql/datadict.cc b/sql/datadict.cc index 287e8568d90..c1e1e85c377 100644 --- a/sql/datadict.cc +++ b/sql/datadict.cc @@ -94,7 +94,7 @@ frm_type_enum dd_frm_type(THD *thd, char *path, enum legacy_db_type *dbt) if (mysql_file_seek(file, 0, SEEK_SET, MYF(MY_WME))) goto err; - if (read_string(file, &frm_image, state.st_size)) + if (read_string(file, &frm_image, (size_t)state.st_size)) goto err; if ((n_length= uint4korr(frm_image+55))) diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc index c96060cd5df..ca4d93eb240 100644 --- a/sql/event_db_repository.cc +++ b/sql/event_db_repository.cc @@ -18,6 +18,7 @@ #include "sql_priv.h" #include "unireg.h" #include "sql_base.h" // close_thread_tables +#include "sql_parse.h" #include "event_db_repository.h" #include "key.h" // key_copy #include "sql_db.h" // get_default_db_collation @@ -702,19 +703,17 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, restore_record(table, s->default_values); // Get default values for fields - if (system_charset_info->cset-> - numchars(system_charset_info, parse_data->dbname.str, - parse_data->dbname.str + parse_data->dbname.length) > - table->field[ET_FIELD_DB]->char_length()) + if (check_string_char_length(&parse_data->dbname, 0, + table->field[ET_FIELD_DB]->char_length(), + system_charset_info, 1)) { my_error(ER_TOO_LONG_IDENT, MYF(0), parse_data->dbname.str); goto end; } - if (system_charset_info->cset-> - numchars(system_charset_info, parse_data->name.str, - parse_data->name.str + parse_data->name.length) > - table->field[ET_FIELD_NAME]->char_length()) + if (check_string_char_length(&parse_data->name, 0, + table->field[ET_FIELD_NAME]->char_length(), + system_charset_info, 1)) { my_error(ER_TOO_LONG_IDENT, MYF(0), parse_data->name.str); goto end; diff --git a/sql/field.cc b/sql/field.cc index 262252e9787..b85bdeb7091 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1371,12 +1371,15 @@ void Field_num::prepend_zeros(String *value) const int diff; if ((diff= (int) (field_length - value->length())) > 0) { - bmove_upp((uchar*) value->ptr()+field_length, - (uchar*) value->ptr()+value->length(), - value->length()); - bfill((uchar*) value->ptr(),diff,'0'); - value->length(field_length); - (void) value->c_ptr_quick(); // Avoid warnings in purify + const bool error= value->realloc(field_length); + if (!error) + { + bmove_upp((uchar*) value->ptr()+field_length, + (uchar*) value->ptr()+value->length(), + value->length()); + bfill((uchar*) value->ptr(),diff,'0'); + value->length(field_length); + } } } @@ -2309,9 +2312,10 @@ void Field::set_default() { if (default_value) { - table->in_use->reset_arena_for_cached_items(table->expr_arena); + Query_arena backup_arena; + table->in_use->set_n_backup_active_arena(table->expr_arena, &backup_arena); (void) default_value->expr->save_in_field(this, 0); - table->in_use->reset_arena_for_cached_items(0); + table->in_use->restore_active_arena(table->expr_arena, &backup_arena); return; } /* Copy constant value stored in s->default_values */ @@ -5260,6 +5264,7 @@ int Field_timestamp::set_time() Mark the field as having an explicit default value. @param value if available, the value that the field is being set to + @returns whether the explicit default bit was set @note Fields that have an explicit default value should not be updated @@ -5275,13 +5280,14 @@ int Field_timestamp::set_time() This is how MySQL has worked since it's start. */ -void Field_timestamp::set_explicit_default(Item *value) +bool Field_timestamp::set_explicit_default(Item *value) { if (((value->type() == Item::DEFAULT_VALUE_ITEM && !((Item_default_value*)value)->arg) || (!maybe_null() && value->null_value))) - return; + return false; set_has_explicit_value(); + return true; } #ifdef NOT_USED @@ -10509,7 +10515,7 @@ Column_definition::Column_definition(THD *thd, Field *old_field, if (length != 4) { char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1]; - my_snprintf(buff, sizeof(buff), "YEAR(%lu)", length); + my_snprintf(buff, sizeof(buff), "YEAR(%llu)", length); push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, ER_WARN_DEPRECATED_SYNTAX, ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX), @@ -10786,12 +10792,13 @@ key_map Field::get_possible_keys() analyzed to check if it really should count as a value. */ -void Field::set_explicit_default(Item *value) +bool Field::set_explicit_default(Item *value) { if (value->type() == Item::DEFAULT_VALUE_ITEM && !((Item_default_value*)value)->arg) - return; + return false; set_has_explicit_value(); + return true; } @@ -10864,3 +10871,14 @@ bool Field::save_in_field_ignore_value(bool view_error_processing) return save_in_field_default_value(view_error_processing); return 0; // ignore } + + +void Field::register_field_in_read_map() +{ + if (vcol_info) + { + Item *vcol_item= vcol_info->expr; + vcol_item->walk(&Item::register_field_in_read_map, 1, 0); + } + bitmap_set_bit(table->read_set, field_index); +} diff --git a/sql/field.h b/sql/field.h index eb7af2e015b..7aa45cf1177 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1,7 +1,7 @@ #ifndef FIELD_INCLUDED #define FIELD_INCLUDED /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2008, 2015, MariaDB + Copyright (c) 2008, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -948,16 +948,13 @@ public: */ void set_has_explicit_value() { - if (table->has_value_set) /* If we have default functions */ - bitmap_set_bit(table->has_value_set, field_index); + bitmap_set_bit(&table->has_value_set, field_index); } bool has_explicit_value() { - /* This function is only called when we have default functions */ - DBUG_ASSERT(table->has_value_set); - return bitmap_is_set(table->has_value_set, field_index); + return bitmap_is_set(&table->has_value_set, field_index); } - virtual void set_explicit_default(Item *value); + virtual bool set_explicit_default(Item *value); /** Evaluates the @c UPDATE default function, if one exists, and stores the @@ -1025,7 +1022,7 @@ public: virtual int cmp_max(const uchar *a, const uchar *b, uint max_len) { return cmp(a, b); } virtual int cmp(const uchar *,const uchar *)=0; - virtual int cmp_binary(const uchar *a,const uchar *b, uint32 max_length=~0L) + virtual int cmp_binary(const uchar *a,const uchar *b, uint32 max_length=~0U) { return memcmp(a,b,pack_length()); } virtual int cmp_offset(uint row_offset) { return cmp(ptr,ptr+row_offset); } @@ -1376,7 +1373,8 @@ public: void set_storage_type(ha_storage_media storage_type_arg) { DBUG_ASSERT(field_storage_type() == HA_SM_DEFAULT); - flags |= (storage_type_arg << FIELD_FLAGS_STORAGE_MEDIA); + flags |= static_cast(storage_type_arg) << + FIELD_FLAGS_STORAGE_MEDIA; } column_format_type column_format() const @@ -1388,7 +1386,8 @@ public: void set_column_format(column_format_type column_format_arg) { DBUG_ASSERT(column_format() == COLUMN_FORMAT_TYPE_DEFAULT); - flags |= (column_format_arg << FIELD_FLAGS_COLUMN_FORMAT); + flags |= static_cast(column_format_arg) << + FIELD_FLAGS_COLUMN_FORMAT; } /* @@ -1475,6 +1474,9 @@ public: bool save_in_field_default_value(bool view_eror_processing); bool save_in_field_ignore_value(bool view_error_processing); + /* Mark field in read map. Updates also virtual fields */ + void register_field_in_read_map(); + friend int cre_myisam(char * name, register TABLE *form, uint options, ulonglong auto_increment_value); friend class Copy_field; @@ -2379,9 +2381,9 @@ public: uint32 pack_length() const { return 4; } void sql_type(String &str) const; bool zero_pack() const { return 0; } - virtual int set_time(); - virtual void set_explicit_default(Item *value); - virtual int evaluate_update_default_function() + int set_time(); + bool set_explicit_default(Item *value); + int evaluate_update_default_function() { int res= 0; if (has_update_default_function()) @@ -2813,8 +2815,8 @@ public: void sql_type(String &str) const; bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate) { return Field_datetime::get_TIME(ltime, ptr, fuzzydate); } - virtual int set_time(); - virtual int evaluate_update_default_function() + int set_time(); + int evaluate_update_default_function() { int res= 0; if (has_update_default_function()) @@ -3134,7 +3136,7 @@ public: int cmp_max(const uchar *, const uchar *, uint max_length); int cmp(const uchar *a,const uchar *b) { - return cmp_max(a, b, ~0L); + return cmp_max(a, b, ~0U); } void sort_string(uchar *buff,uint length); uint get_key_image(uchar *buff,uint length, imagetype type); @@ -3143,7 +3145,7 @@ public: virtual uchar *pack(uchar *to, const uchar *from, uint max_length); virtual const uchar *unpack(uchar* to, const uchar *from, const uchar *from_end, uint param_data); - int cmp_binary(const uchar *a,const uchar *b, uint32 max_length=~0L); + int cmp_binary(const uchar *a,const uchar *b, uint32 max_length=~0U); int key_cmp(const uchar *,const uchar*); int key_cmp(const uchar *str, uint length); uint packed_col_length(const uchar *to, uint length); @@ -3176,6 +3178,12 @@ protected: The 'value'-object is a cache fronting the storage engine. */ String value; + /** + Cache for blob values when reading a row with a virtual blob + field. This is needed to not destroy the old cached value when + updating the blob with a new value when creating the new row. + */ + String read_value; static void do_copy_blob(Copy_field *copy); static void do_conv_blob(Copy_field *copy); @@ -3247,9 +3255,9 @@ public: my_decimal *val_decimal(my_decimal *); int cmp_max(const uchar *, const uchar *, uint max_length); int cmp(const uchar *a,const uchar *b) - { return cmp_max(a, b, ~0L); } + { return cmp_max(a, b, ~0U); } int cmp(const uchar *a, uint32 a_length, const uchar *b, uint32 b_length); - int cmp_binary(const uchar *a,const uchar *b, uint32 max_length=~0L); + int cmp_binary(const uchar *a,const uchar *b, uint32 max_length=~0U); int key_cmp(const uchar *,const uchar*); int key_cmp(const uchar *str, uint length); /* Never update the value of min_val for a blob field */ @@ -3279,7 +3287,7 @@ public: return (uint32) (((ulonglong) 1 << (packlength*8)) -1); } int reset(void) { bzero(ptr, packlength+sizeof(uchar*)); return 0; } - void reset_fields() { bzero((uchar*) &value,sizeof(value)); } + void reset_fields() { bzero((uchar*) &value,sizeof(value)); bzero((uchar*) &read_value,sizeof(read_value)); } uint32 get_field_buffer_size(void) { return value.alloced_length(); } void store_length(uchar *i_ptr, uint i_packlength, uint32 i_number); inline void store_length(uint32 number) @@ -3332,16 +3340,41 @@ public: memcpy(ptr+packlength, &tmp, sizeof(char*)); return 0; } + /* store value for the duration of the current read record */ + inline void swap_value_and_read_value() + { + read_value.swap(value); + } + inline void set_value(uchar *data) + { + /* Set value pointer. Lengths are not important */ + value.reset((char*) data, 1, 1, &my_charset_bin); + } virtual uchar *pack(uchar *to, const uchar *from, uint max_length); virtual const uchar *unpack(uchar *to, const uchar *from, const uchar *from_end, uint param_data); uint packed_col_length(const uchar *col_ptr, uint length); uint max_packed_col_length(uint max_length); - void free() { value.free(); } - inline void clear_temporary() { bzero((uchar*) &value, sizeof(value)); } - inline bool owns_ptr(uchar* p) const { return p == (uchar*)value.ptr(); } - inline void own_value_ptr() - { value.reset((char*)get_ptr(), get_length(), get_length(), value.charset()); } + void free() + { + value.free(); + read_value.free(); + } + inline void clear_temporary() + { + uchar *tmp= get_ptr(); + if (likely(value.ptr() == (char*) tmp)) + bzero((uchar*) &value, sizeof(value)); + else + { + /* + Currently read_value should never point to tmp, the following code + is mainly here to make things future proof. + */ + if (unlikely(read_value.ptr() == (char*) tmp)) + bzero((uchar*) &read_value, sizeof(read_value)); + } + } uint size_of() const { return sizeof(*this); } bool has_charset(void) const { return charset() == &my_charset_bin ? FALSE : TRUE; } @@ -3924,26 +3957,26 @@ bool check_expression(Virtual_column_info *vcol, const char *name, The following are for the interface with the .frm file */ -#define FIELDFLAG_DECIMAL 1 -#define FIELDFLAG_BINARY 1 // Shares same flag -#define FIELDFLAG_NUMBER 2 -#define FIELDFLAG_ZEROFILL 4 -#define FIELDFLAG_PACK 120 // Bits used for packing -#define FIELDFLAG_INTERVAL 256 // mangled with decimals! -#define FIELDFLAG_BITFIELD 512 // mangled with decimals! -#define FIELDFLAG_BLOB 1024 // mangled with decimals! -#define FIELDFLAG_GEOM 2048 // mangled with decimals! +#define FIELDFLAG_DECIMAL 1U +#define FIELDFLAG_BINARY 1U // Shares same flag +#define FIELDFLAG_NUMBER 2U +#define FIELDFLAG_ZEROFILL 4U +#define FIELDFLAG_PACK 120U // Bits used for packing +#define FIELDFLAG_INTERVAL 256U // mangled with decimals! +#define FIELDFLAG_BITFIELD 512U // mangled with decimals! +#define FIELDFLAG_BLOB 1024U // mangled with decimals! +#define FIELDFLAG_GEOM 2048U // mangled with decimals! -#define FIELDFLAG_TREAT_BIT_AS_CHAR 4096 /* use Field_bit_as_char */ -#define FIELDFLAG_LONG_DECIMAL 8192 -#define FIELDFLAG_NO_DEFAULT 16384 /* sql */ -#define FIELDFLAG_MAYBE_NULL ((uint) 32768)// sql -#define FIELDFLAG_HEX_ESCAPE ((uint) 0x10000) +#define FIELDFLAG_TREAT_BIT_AS_CHAR 4096U /* use Field_bit_as_char */ +#define FIELDFLAG_LONG_DECIMAL 8192U +#define FIELDFLAG_NO_DEFAULT 16384U /* sql */ +#define FIELDFLAG_MAYBE_NULL 32768U // sql +#define FIELDFLAG_HEX_ESCAPE 0x10000U #define FIELDFLAG_PACK_SHIFT 3 #define FIELDFLAG_DEC_SHIFT 8 -#define FIELDFLAG_MAX_DEC 63 +#define FIELDFLAG_MAX_DEC 63U -#define MTYP_TYPENR(type) (type & 127) /* Remove bits from type */ +#define MTYP_TYPENR(type) (type & 127U) /* Remove bits from type */ #define f_is_dec(x) ((x) & FIELDFLAG_DECIMAL) #define f_is_num(x) ((x) & FIELDFLAG_NUMBER) @@ -3957,7 +3990,7 @@ bool check_expression(Virtual_column_info *vcol, const char *name, #define f_is_bitfield(x) (((x) & (FIELDFLAG_BITFIELD | FIELDFLAG_NUMBER)) == FIELDFLAG_BITFIELD) #define f_is_blob(x) (((x) & (FIELDFLAG_BLOB | FIELDFLAG_NUMBER)) == FIELDFLAG_BLOB) #define f_is_geom(x) (((x) & (FIELDFLAG_GEOM | FIELDFLAG_NUMBER)) == FIELDFLAG_GEOM) -#define f_settype(x) (((int) (x)) << FIELDFLAG_PACK_SHIFT) +#define f_settype(x) (((uint) (x)) << FIELDFLAG_PACK_SHIFT) #define f_maybe_null(x) ((x) & FIELDFLAG_MAYBE_NULL) #define f_no_default(x) ((x) & FIELDFLAG_NO_DEFAULT) #define f_bit_as_char(x) ((x) & FIELDFLAG_TREAT_BIT_AS_CHAR) diff --git a/sql/filesort.cc b/sql/filesort.cc index 2210dc569df..baeb75b3b0b 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -716,7 +716,7 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select, TABLE *sort_form; handler *file; MY_BITMAP *save_read_set, *save_write_set, *save_vcol_set; - + Item *sort_cond; DBUG_ENTER("find_all_keys"); DBUG_PRINT("info",("using: %s", (select ? select->quick ? "ranges" : "where": @@ -747,29 +747,29 @@ static ha_rows find_all_keys(THD *thd, Sort_param *param, SQL_SELECT *select, DBUG_SET("+d,ha_rnd_init_fail");); if (file->ha_rnd_init_with_error(1)) DBUG_RETURN(HA_POS_ERROR); - file->extra_opt(HA_EXTRA_CACHE, - current_thd->variables.read_buff_size); + file->extra_opt(HA_EXTRA_CACHE, thd->variables.read_buff_size); } /* Remember original bitmaps */ save_read_set= sort_form->read_set; save_write_set= sort_form->write_set; - save_vcol_set= sort_form->vcol_set; - /* Set up temporary column read map for columns used by sort */ - bitmap_clear_all(&sort_form->tmp_set); - /* Temporary set for register_used_fields and register_field_in_read_map */ - sort_form->read_set= &sort_form->tmp_set; - register_used_fields(param); - if (quick_select) - select->quick->add_used_key_part_to_set(sort_form->read_set); + save_vcol_set= sort_form->vcol_set; - Item *sort_cond= !select ? - 0 : !select->pre_idx_push_select_cond ? - select->cond : select->pre_idx_push_select_cond; - if (sort_cond) - sort_cond->walk(&Item::register_field_in_read_map, 1, sort_form); + /* Set up temporary column read map for columns used by sort */ + DBUG_ASSERT(save_read_set != &sort_form->tmp_set); + bitmap_clear_all(&sort_form->tmp_set); sort_form->column_bitmaps_set(&sort_form->tmp_set, &sort_form->tmp_set, &sort_form->tmp_set); + register_used_fields(param); + if (quick_select) + select->quick->add_used_key_part_to_set(); + + sort_cond= (!select ? 0 : + (!select->pre_idx_push_select_cond ? + select->cond : select->pre_idx_push_select_cond)); + if (sort_cond) + sort_cond->walk(&Item::register_field_in_read_map, 1, sort_form); + sort_form->file->column_bitmaps_signal(); if (quick_select) { @@ -1259,7 +1259,6 @@ static void register_used_fields(Sort_param *param) { reg1 SORT_FIELD *sort_field; TABLE *table=param->sort_form; - MY_BITMAP *bitmap= table->read_set; for (sort_field= param->local_sortorder ; sort_field != param->end ; @@ -1269,14 +1268,7 @@ static void register_used_fields(Sort_param *param) if ((field= sort_field->field)) { if (field->table == table) - { - if (field->vcol_info) - { - Item *vcol_item= field->vcol_info->expr; - vcol_item->walk(&Item::register_field_in_read_map, 1, 0); - } - bitmap_set_bit(bitmap, field->field_index); - } + field->register_field_in_read_map(); } else { // Item @@ -1289,7 +1281,7 @@ static void register_used_fields(Sort_param *param) SORT_ADDON_FIELD *addonf= param->addon_field; Field *field; for ( ; (field= addonf->field) ; addonf++) - bitmap_set_bit(bitmap, field->field_index); + field->register_field_in_read_map(); } else { @@ -1680,7 +1672,7 @@ int merge_buffers(Sort_param *param, IO_CACHE *from_file, if (!(error= (int) read_to_buffer(from_file, buffpek, rec_length))) { - queue_remove(&queue,0); + (void) queue_remove_top(&queue); reuse_freed_buff(&queue, buffpek, rec_length); } else if (error == -1) diff --git a/sql/handler.cc b/sql/handler.cc index d20da5c0129..181aec4b79a 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2580,7 +2580,7 @@ int handler::ha_rnd_next(uchar *buf) { update_rows_read(); if (table->vfield && buf == table->record[0]) - table->update_virtual_fields(VCOL_UPDATE_FOR_READ); + table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ); increment_statistics(&SSV::ha_read_rnd_next_count); } else if (result == HA_ERR_RECORD_DELETED) @@ -2608,7 +2608,7 @@ int handler::ha_rnd_pos(uchar *buf, uchar *pos) { update_rows_read(); if (table->vfield && buf == table->record[0]) - table->update_virtual_fields(VCOL_UPDATE_FOR_READ); + table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ); } table->status=result ? STATUS_NOT_FOUND: 0; DBUG_RETURN(result); @@ -2631,7 +2631,7 @@ int handler::ha_index_read_map(uchar *buf, const uchar *key, { update_index_statistics(); if (table->vfield && buf == table->record[0]) - table->update_virtual_fields(VCOL_UPDATE_FOR_READ); + table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ); } table->status=result ? STATUS_NOT_FOUND: 0; DBUG_RETURN(result); @@ -2660,7 +2660,7 @@ int handler::ha_index_read_idx_map(uchar *buf, uint index, const uchar *key, update_rows_read(); index_rows_read[index]++; if (table->vfield && buf == table->record[0]) - table->update_virtual_fields(VCOL_UPDATE_FOR_READ); + table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ); } table->status=result ? STATUS_NOT_FOUND: 0; return result; @@ -2681,7 +2681,7 @@ int handler::ha_index_next(uchar * buf) { update_index_statistics(); if (table->vfield && buf == table->record[0]) - table->update_virtual_fields(VCOL_UPDATE_FOR_READ); + table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ); } table->status=result ? STATUS_NOT_FOUND: 0; DBUG_RETURN(result); @@ -2702,7 +2702,7 @@ int handler::ha_index_prev(uchar * buf) { update_index_statistics(); if (table->vfield && buf == table->record[0]) - table->update_virtual_fields(VCOL_UPDATE_FOR_READ); + table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ); } table->status=result ? STATUS_NOT_FOUND: 0; DBUG_RETURN(result); @@ -2722,7 +2722,7 @@ int handler::ha_index_first(uchar * buf) { update_index_statistics(); if (table->vfield && buf == table->record[0]) - table->update_virtual_fields(VCOL_UPDATE_FOR_READ); + table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ); } table->status=result ? STATUS_NOT_FOUND: 0; return result; @@ -2750,7 +2750,7 @@ int handler::ha_index_last(uchar * buf) { update_index_statistics(); if (table->vfield && buf == table->record[0]) - table->update_virtual_fields(VCOL_UPDATE_FOR_READ); + table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ); } table->status=result ? STATUS_NOT_FOUND: 0; return result; @@ -2770,7 +2770,7 @@ int handler::ha_index_next_same(uchar *buf, const uchar *key, uint keylen) { update_index_statistics(); if (table->vfield && buf == table->record[0]) - table->update_virtual_fields(VCOL_UPDATE_FOR_READ); + table->update_virtual_fields(this, VCOL_UPDATE_FOR_READ); } table->status=result ? STATUS_NOT_FOUND: 0; return result; @@ -3230,11 +3230,9 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment, { ulonglong nr; int error; + MY_BITMAP *old_read_set; - (void) extra(HA_EXTRA_KEYREAD); - table->mark_columns_used_by_index_no_reset(table->s->next_number_index, - table->read_set); - column_bitmaps_signal(); + old_read_set= table->prepare_for_keyread(table->s->next_number_index); if (ha_index_init(table->s->next_number_index, 1)) { @@ -3286,7 +3284,7 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment, nr= ((ulonglong) table->next_number_field-> val_int_offset(table->s->rec_buff_length)+1); ha_index_end(); - (void) extra(HA_EXTRA_NO_KEYREAD); + table->restore_column_maps_after_keyread(old_read_set); *first_value= nr; return; } @@ -4557,7 +4555,7 @@ void handler::get_dynamic_partition_info(PARTITION_STATS *stat_info, stat_info->update_time= stats.update_time; stat_info->check_time= stats.check_time; stat_info->check_sum= 0; - if (table_flags() & (HA_HAS_OLD_CHECKSUM | HA_HAS_OLD_CHECKSUM)) + if (table_flags() & (HA_HAS_OLD_CHECKSUM | HA_HAS_NEW_CHECKSUM)) stat_info->check_sum= checksum(); return; } @@ -4982,7 +4980,7 @@ public: bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) { @@ -4995,7 +4993,7 @@ public: return TRUE; } - if (level == Sql_condition::WARN_LEVEL_ERROR) + if (*level == Sql_condition::WARN_LEVEL_ERROR) m_unhandled_errors++; return FALSE; } @@ -5781,7 +5779,7 @@ static int write_locked_table_maps(THD *thd) typedef bool Log_func(THD*, TABLE*, bool, const uchar*, const uchar*); - +static int check_wsrep_max_ws_rows(); static int binlog_log_row_internal(TABLE* table, const uchar *before_record, @@ -5810,6 +5808,13 @@ static int binlog_log_row_internal(TABLE* table, bool const has_trans= thd->lex->sql_command == SQLCOM_CREATE_TABLE || table->file->has_transactions(); error= (*log_func)(thd, table, has_trans, before_record, after_record); + + /* + Now that the record has been logged, increment wsrep_affected_rows and + also check whether its within the allowable limits (wsrep_max_ws_rows). + */ + if (error == 0) + error= check_wsrep_max_ws_rows(); } return error ? HA_ERR_RBR_LOGGING_FAILED : 0; } @@ -5912,7 +5917,7 @@ int handler::ha_reset() table->s->column_bitmap_size == (uchar*) table->def_write_set.bitmap); DBUG_ASSERT(bitmap_is_set_all(&table->s->all_set)); - DBUG_ASSERT(table->key_read == 0); + DBUG_ASSERT(!table->file->keyread_enabled()); /* ensure that ha_index_end / ha_rnd_end has been called */ DBUG_ASSERT(inited == NONE); /* reset the bitmaps to point to defaults */ @@ -5975,7 +5980,7 @@ int handler::ha_write_row(uchar *buf) error= binlog_log_row(table, 0, buf, log_func); } DEBUG_SYNC_C("ha_write_row_end"); - DBUG_RETURN(error ? error : check_wsrep_max_ws_rows()); + DBUG_RETURN(error); } @@ -6006,7 +6011,7 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data) rows_changed++; error= binlog_log_row(table, old_data, new_data, log_func); } - return error ? error : check_wsrep_max_ws_rows(); + return error; } int handler::ha_delete_row(const uchar *buf) @@ -6033,7 +6038,7 @@ int handler::ha_delete_row(const uchar *buf) rows_changed++; error= binlog_log_row(table, buf, 0, log_func); } - return error ? error : check_wsrep_max_ws_rows(); + return error; } diff --git a/sql/handler.h b/sql/handler.h index 8717f229a46..c418429d10c 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -2,7 +2,7 @@ #define HANDLER_INCLUDED /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB + Copyright (c) 2009, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -236,12 +236,12 @@ enum enum_alter_inplace_result { @note This optimization in combination with batching may be used to remove even more roundtrips. */ -#define HA_READ_BEFORE_WRITE_REMOVAL (1LL << 43) +#define HA_READ_BEFORE_WRITE_REMOVAL (1ULL << 43) /* Engine supports extended fulltext API */ -#define HA_CAN_FULLTEXT_EXT (1LL << 44) +#define HA_CAN_FULLTEXT_EXT (1ULL << 44) /* Storage engine supports table export using the @@ -249,7 +249,7 @@ enum enum_alter_inplace_result { (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) +#define HA_CAN_EXPORT (1ULL << 45) /* Storage engine does not require an exclusive metadata lock @@ -259,7 +259,7 @@ enum enum_alter_inplace_result { read or modify the table - this is defined by THR locks and the ::store_lock() method). */ -#define HA_CONCURRENT_OPTIMIZE (1LL << 46) +#define HA_CONCURRENT_OPTIMIZE (1ULL << 46) /* Set of all binlog flags. Currently only contain the capabilities @@ -298,24 +298,24 @@ enum enum_alter_inplace_result { Partitioning needs both ADD and DROP to be supported by its underlying handlers, due to error handling, see bug#57778. */ -#define HA_INPLACE_ADD_INDEX_NO_READ_WRITE (1L << 0) -#define HA_INPLACE_DROP_INDEX_NO_READ_WRITE (1L << 1) -#define HA_INPLACE_ADD_UNIQUE_INDEX_NO_READ_WRITE (1L << 2) -#define HA_INPLACE_DROP_UNIQUE_INDEX_NO_READ_WRITE (1L << 3) -#define HA_INPLACE_ADD_PK_INDEX_NO_READ_WRITE (1L << 4) -#define HA_INPLACE_DROP_PK_INDEX_NO_READ_WRITE (1L << 5) +#define HA_INPLACE_ADD_INDEX_NO_READ_WRITE (1UL << 0) +#define HA_INPLACE_DROP_INDEX_NO_READ_WRITE (1UL << 1) +#define HA_INPLACE_ADD_UNIQUE_INDEX_NO_READ_WRITE (1UL << 2) +#define HA_INPLACE_DROP_UNIQUE_INDEX_NO_READ_WRITE (1UL << 3) +#define HA_INPLACE_ADD_PK_INDEX_NO_READ_WRITE (1UL << 4) +#define HA_INPLACE_DROP_PK_INDEX_NO_READ_WRITE (1UL << 5) /* These are set if different kinds of indexes can be created or dropped in-place while still allowing concurrent reads (but not writes) of table data. If a handler is capable of one or more of these, it should also set the corresponding *_NO_READ_WRITE bit(s). */ -#define HA_INPLACE_ADD_INDEX_NO_WRITE (1L << 6) -#define HA_INPLACE_DROP_INDEX_NO_WRITE (1L << 7) -#define HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE (1L << 8) -#define HA_INPLACE_DROP_UNIQUE_INDEX_NO_WRITE (1L << 9) -#define HA_INPLACE_ADD_PK_INDEX_NO_WRITE (1L << 10) -#define HA_INPLACE_DROP_PK_INDEX_NO_WRITE (1L << 11) +#define HA_INPLACE_ADD_INDEX_NO_WRITE (1UL << 6) +#define HA_INPLACE_DROP_INDEX_NO_WRITE (1UL << 7) +#define HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE (1UL << 8) +#define HA_INPLACE_DROP_UNIQUE_INDEX_NO_WRITE (1UL << 9) +#define HA_INPLACE_ADD_PK_INDEX_NO_WRITE (1UL << 10) +#define HA_INPLACE_DROP_PK_INDEX_NO_WRITE (1UL << 11) /* HA_PARTITION_FUNCTION_SUPPORTED indicates that the function is supported at all. @@ -341,9 +341,9 @@ enum enum_alter_inplace_result { the storage engine. A typical engine to support this is NDB (through WL #2498). */ -#define HA_PARTITION_FUNCTION_SUPPORTED (1L << 12) -#define HA_FAST_CHANGE_PARTITION (1L << 13) -#define HA_PARTITION_ONE_PHASE (1L << 14) +#define HA_PARTITION_FUNCTION_SUPPORTED (1UL << 12) +#define HA_FAST_CHANGE_PARTITION (1UL << 13) +#define HA_PARTITION_ONE_PHASE (1UL << 14) /* operations for disable/enable indexes */ #define HA_KEY_SWITCH_NONUNIQ 0 @@ -369,25 +369,25 @@ enum enum_alter_inplace_result { HA_GET_INFO does an implicit HA_ABORT_IF_LOCKED */ -#define HA_OPEN_KEYFILE 1 -#define HA_READ_ONLY 16 /* File opened as readonly */ +#define HA_OPEN_KEYFILE 1U +#define HA_READ_ONLY 16U /* File opened as readonly */ /* Try readonly if can't open with read and write */ -#define HA_TRY_READ_ONLY 32 +#define HA_TRY_READ_ONLY 32U /* Some key definitions */ #define HA_KEY_NULL_LENGTH 1 #define HA_KEY_BLOB_LENGTH 2 -#define HA_LEX_CREATE_TMP_TABLE 1 -#define HA_CREATE_TMP_ALTER 8 +#define HA_LEX_CREATE_TMP_TABLE 1U +#define HA_CREATE_TMP_ALTER 8U #define HA_MAX_REC_LENGTH 65535 /* Table caching type */ #define HA_CACHE_TBL_NONTRANSACT 0 -#define HA_CACHE_TBL_NOCACHE 1 -#define HA_CACHE_TBL_ASKTRANSACT 2 -#define HA_CACHE_TBL_TRANSACT 4 +#define HA_CACHE_TBL_NOCACHE 1U +#define HA_CACHE_TBL_ASKTRANSACT 2U +#define HA_CACHE_TBL_TRANSACT 4U /** Options for the START TRANSACTION statement. @@ -409,9 +409,9 @@ static const uint MYSQL_START_TRANS_OPT_READ_ONLY = 2; static const uint MYSQL_START_TRANS_OPT_READ_WRITE = 4; /* Flags for method is_fatal_error */ -#define HA_CHECK_DUP_KEY 1 -#define HA_CHECK_DUP_UNIQUE 2 -#define HA_CHECK_FK_ERROR 4 +#define HA_CHECK_DUP_KEY 1U +#define HA_CHECK_DUP_UNIQUE 2U +#define HA_CHECK_FK_ERROR 4U #define HA_CHECK_DUP (HA_CHECK_DUP_KEY + HA_CHECK_DUP_UNIQUE) #define HA_CHECK_ALL (~0U) @@ -479,49 +479,49 @@ enum enum_binlog_command { /* struct to hold information about the table that should be created */ /* Bits in used_fields */ -#define HA_CREATE_USED_AUTO (1L << 0) -#define HA_CREATE_USED_RAID (1L << 1) //RAID is no longer availble -#define HA_CREATE_USED_UNION (1L << 2) -#define HA_CREATE_USED_INSERT_METHOD (1L << 3) -#define HA_CREATE_USED_MIN_ROWS (1L << 4) -#define HA_CREATE_USED_MAX_ROWS (1L << 5) -#define HA_CREATE_USED_AVG_ROW_LENGTH (1L << 6) -#define HA_CREATE_USED_PACK_KEYS (1L << 7) -#define HA_CREATE_USED_CHARSET (1L << 8) -#define HA_CREATE_USED_DEFAULT_CHARSET (1L << 9) -#define HA_CREATE_USED_DATADIR (1L << 10) -#define HA_CREATE_USED_INDEXDIR (1L << 11) -#define HA_CREATE_USED_ENGINE (1L << 12) -#define HA_CREATE_USED_CHECKSUM (1L << 13) -#define HA_CREATE_USED_DELAY_KEY_WRITE (1L << 14) -#define HA_CREATE_USED_ROW_FORMAT (1L << 15) -#define HA_CREATE_USED_COMMENT (1L << 16) -#define HA_CREATE_USED_PASSWORD (1L << 17) -#define HA_CREATE_USED_CONNECTION (1L << 18) -#define HA_CREATE_USED_KEY_BLOCK_SIZE (1L << 19) +#define HA_CREATE_USED_AUTO (1UL << 0) +#define HA_CREATE_USED_RAID (1UL << 1) //RAID is no longer availble +#define HA_CREATE_USED_UNION (1UL << 2) +#define HA_CREATE_USED_INSERT_METHOD (1UL << 3) +#define HA_CREATE_USED_MIN_ROWS (1UL << 4) +#define HA_CREATE_USED_MAX_ROWS (1UL << 5) +#define HA_CREATE_USED_AVG_ROW_LENGTH (1UL << 6) +#define HA_CREATE_USED_PACK_KEYS (1UL << 7) +#define HA_CREATE_USED_CHARSET (1UL << 8) +#define HA_CREATE_USED_DEFAULT_CHARSET (1UL << 9) +#define HA_CREATE_USED_DATADIR (1UL << 10) +#define HA_CREATE_USED_INDEXDIR (1UL << 11) +#define HA_CREATE_USED_ENGINE (1UL << 12) +#define HA_CREATE_USED_CHECKSUM (1UL << 13) +#define HA_CREATE_USED_DELAY_KEY_WRITE (1UL << 14) +#define HA_CREATE_USED_ROW_FORMAT (1UL << 15) +#define HA_CREATE_USED_COMMENT (1UL << 16) +#define HA_CREATE_USED_PASSWORD (1UL << 17) +#define HA_CREATE_USED_CONNECTION (1UL << 18) +#define HA_CREATE_USED_KEY_BLOCK_SIZE (1UL << 19) /* The following two are used by Maria engine: */ -#define HA_CREATE_USED_TRANSACTIONAL (1L << 20) -#define HA_CREATE_USED_PAGE_CHECKSUM (1L << 21) +#define HA_CREATE_USED_TRANSACTIONAL (1UL << 20) +#define HA_CREATE_USED_PAGE_CHECKSUM (1UL << 21) /** This is set whenever STATS_PERSISTENT=0|1|default has been specified in CREATE/ALTER TABLE. See also HA_OPTION_STATS_PERSISTENT in include/my_base.h. It is possible to distinguish whether STATS_PERSISTENT=default has been specified or no STATS_PERSISTENT= is given at all. */ -#define HA_CREATE_USED_STATS_PERSISTENT (1L << 22) +#define HA_CREATE_USED_STATS_PERSISTENT (1UL << 22) /** This is set whenever STATS_AUTO_RECALC=0|1|default has been specified in CREATE/ALTER TABLE. See enum_stats_auto_recalc. It is possible to distinguish whether STATS_AUTO_RECALC=default has been specified or no STATS_AUTO_RECALC= is given at all. */ -#define HA_CREATE_USED_STATS_AUTO_RECALC (1L << 23) +#define HA_CREATE_USED_STATS_AUTO_RECALC (1UL << 23) /** This is set whenever STATS_SAMPLE_PAGES=N|default has been specified in CREATE/ALTER TABLE. It is possible to distinguish whether STATS_SAMPLE_PAGES=default has been specified or no STATS_SAMPLE_PAGES= is given at all. */ -#define HA_CREATE_USED_STATS_SAMPLE_PAGES (1L << 24) +#define HA_CREATE_USED_STATS_SAMPLE_PAGES (1UL << 24) /* @@ -615,8 +615,7 @@ struct xid_t { } uint length() { - return sizeof(formatID)+sizeof(gtrid_length)+sizeof(bqual_length)+ - gtrid_length+bqual_length; + return static_cast(sizeof(formatID)) + key_length(); } uchar *key() const { @@ -624,7 +623,8 @@ struct xid_t { } uint key_length() const { - return sizeof(gtrid_length)+sizeof(bqual_length)+gtrid_length+bqual_length; + return static_cast(sizeof(gtrid_length)+sizeof(bqual_length)+ + gtrid_length+bqual_length); } }; typedef struct xid_t XID; @@ -2333,12 +2333,13 @@ public: /** Whether or not all costs in the object are zero - + @return true if all costs are zero, false otherwise */ bool is_zero() const - { - return !(io_count || cpu_cost || import_cost || mem_cost); + { + return io_count == 0.0 && cpu_cost == 0.0 && + import_cost == 0.0 && mem_cost == 0.0; } void reset() @@ -2403,29 +2404,29 @@ void get_sweep_read_cost(TABLE *table, ha_rows nrows, bool interrupted, The ranges may not use the full key but all of them will use the same number of key parts. */ -#define HA_MRR_SINGLE_POINT 1 -#define HA_MRR_FIXED_KEY 2 +#define HA_MRR_SINGLE_POINT 1U +#define HA_MRR_FIXED_KEY 2U /* Indicates that RANGE_SEQ_IF::next(&range) doesn't need to fill in the 'range' parameter. */ -#define HA_MRR_NO_ASSOCIATION 4 +#define HA_MRR_NO_ASSOCIATION 4U /* The MRR user will provide ranges in key order, and MRR implementation must return rows in key order. */ -#define HA_MRR_SORTED 8 +#define HA_MRR_SORTED 8U /* MRR implementation doesn't have to retrieve full records */ -#define HA_MRR_INDEX_ONLY 16 +#define HA_MRR_INDEX_ONLY 16U /* The passed memory buffer is of maximum possible size, the caller can't assume larger buffer. */ -#define HA_MRR_LIMITS 32 +#define HA_MRR_LIMITS 32U /* @@ -2434,14 +2435,14 @@ void get_sweep_read_cost(TABLE *table, ha_rows nrows, bool interrupted, flag. SQL layer remembers the flag value and then passes it to multi_read_range_init(). */ -#define HA_MRR_USE_DEFAULT_IMPL 64 +#define HA_MRR_USE_DEFAULT_IMPL 64U /* Used only as parameter to multi_range_read_info(): Flag set <=> the caller guarantees that the bounds of the scanned ranges will not have NULL values. */ -#define HA_MRR_NO_NULL_ENDPOINTS 128 +#define HA_MRR_NO_NULL_ENDPOINTS 128U /* The MRR user has materialized range keys somewhere in the user's buffer. @@ -2452,7 +2453,7 @@ void get_sweep_read_cost(TABLE *table, ha_rows nrows, bool interrupted, pointer in range->start_key.key will point to a key value that will remain there until the end of the MRR scan. */ -#define HA_MRR_MATERIALIZED_KEYS 256 +#define HA_MRR_MATERIALIZED_KEYS 256U /* The following bits are reserved for use by MRR implementation. The intended @@ -2470,15 +2471,15 @@ void get_sweep_read_cost(TABLE *table, ha_rows nrows, bool interrupted, handler->multi_range_read_explain_info(mrr_mode) to get a text description of the picked MRR scan; the description will be a part of EXPLAIN output. */ -#define HA_MRR_IMPLEMENTATION_FLAG1 512 -#define HA_MRR_IMPLEMENTATION_FLAG2 1024 -#define HA_MRR_IMPLEMENTATION_FLAG3 2048 -#define HA_MRR_IMPLEMENTATION_FLAG4 4096 -#define HA_MRR_IMPLEMENTATION_FLAG5 8192 -#define HA_MRR_IMPLEMENTATION_FLAG6 16384 +#define HA_MRR_IMPLEMENTATION_FLAG1 512U +#define HA_MRR_IMPLEMENTATION_FLAG2 1024U +#define HA_MRR_IMPLEMENTATION_FLAG3 2048U +#define HA_MRR_IMPLEMENTATION_FLAG4 4096U +#define HA_MRR_IMPLEMENTATION_FLAG5 8192U +#define HA_MRR_IMPLEMENTATION_FLAG6 16384U #define HA_MRR_IMPLEMENTATION_FLAGS \ - (512 | 1024 | 2048 | 4096 | 8192 | 16384) + (512U | 1024U | 2048U | 4096U | 8192U | 16384U) /* This is a buffer area that the handler can use to store rows. @@ -2654,7 +2655,7 @@ public: uint errkey; /* Last dup key */ uint key_used_on_scan; - uint active_index; + uint active_index, keyread; /** Length of ref (1-8 or the clustered key length) */ uint ref_length; @@ -2696,7 +2697,6 @@ private: public: void set_time_tracker(Exec_time_tracker *tracker_arg) { tracker=tracker_arg;} - Item *pushed_idx_cond; uint pushed_idx_cond_keyno; /* The index which the above condition is for */ @@ -2751,7 +2751,7 @@ public: check_table_binlog_row_based_result(0), in_range_check_pushed_down(FALSE), key_used_on_scan(MAX_KEY), - active_index(MAX_KEY), + active_index(MAX_KEY), keyread(MAX_KEY), ref_length(sizeof(my_off_t)), ft_handler(0), inited(NONE), pushed_cond(0), next_insert_id(0), insert_id_for_cur_row(0), @@ -2856,6 +2856,22 @@ public: int ha_delete_row(const uchar * buf); void ha_release_auto_increment(); + bool keyread_enabled() { return keyread < MAX_KEY; } + int ha_start_keyread(uint idx) + { + if (keyread_enabled()) + return 0; + keyread= idx; + return extra(HA_EXTRA_KEYREAD); + } + int ha_end_keyread() + { + if (!keyread_enabled()) + return 0; + keyread= MAX_KEY; + return extra(HA_EXTRA_NO_KEYREAD); + } + int check_collation_compatibility(); int ha_check_for_upgrade(HA_CHECK_OPT *check_opt); /** to be actually called to get 'check()' functionality*/ diff --git a/sql/item.cc b/sql/item.cc index 682f88317f1..c34d27fa63b 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -544,7 +544,14 @@ uint Item::decimal_precision() const unsigned_flag); return MY_MIN(prec, DECIMAL_MAX_PRECISION); } - return MY_MIN(max_char_length(), DECIMAL_MAX_PRECISION); + uint res= max_char_length(); + /* + Return at least one decimal digit, even if Item::max_char_length() + returned 0. This is important to avoid attempts to create fields of types + INT(0) or DECIMAL(0,0) when converting NULL or empty strings to INT/DECIMAL: + CREATE TABLE t1 AS SELECT CONVERT(NULL,SIGNED) AS a; + */ + return res ? MY_MIN(res, DECIMAL_MAX_PRECISION) : 1; } @@ -1182,7 +1189,8 @@ Item *Item_cache::safe_charset_converter(THD *thd, CHARSET_INFO *tocs) if (conv == example) return this; Item_cache *cache; - if (!conv || !(cache= new (thd->mem_root) Item_cache_str(thd, conv))) + if (!conv || conv->fix_fields(thd, (Item **) NULL) || + !(cache= new (thd->mem_root) Item_cache_str(thd, conv))) return NULL; // Safe conversion is not possible, or OEM cache->setup(thd, conv); cache->fixed= false; // Make Item::fix_fields() happy @@ -2878,6 +2886,44 @@ void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref) depended_from= NULL; if (context) { + bool need_change= false; + /* + Suppose there are nested selects: + + select_id=1 + select_id=2 + select_id=3 <----+ + select_id=4 -+ + select_id=5 --+ + + Suppose, pullout operation has moved anything that had select_id=4 or 5 + in to select_id=3. + + If this Item_field had a name resolution context pointing into select_lex + with id=4 or id=5, it needs a new name resolution context. + + However, it could also be that this object is a part of outer reference: + Item_ref(Item_field(field in select with select_id=1))). + - The Item_ref object has a context with select_id=5, and so needs a new + name resolution context. + - The Item_field object has a context with select_id=1, and doesn't need + a new name resolution context. + + So, the following loop walks from Item_field's current context upwards. + If we find that the select we've been pulled out to is up there, we + create the new name resolution context. Otherwise, we don't. + */ + for (Name_resolution_context *ct= context; ct; ct= ct->outer_context) + { + if (new_parent == ct->select_lex) + { + need_change= true; + break; + } + } + if (!need_change) + return; + Name_resolution_context *ctx= new Name_resolution_context(); if (context->select_lex == new_parent) { @@ -3302,11 +3348,19 @@ Item_param::Item_param(THD *thd, uint pos_in_query_arg): Rewritable_query_parameter(pos_in_query_arg, 1), Type_handler_hybrid_field_type(MYSQL_TYPE_VARCHAR), state(NO_VALUE), - indicators(0), indicator(STMT_INDICATOR_NONE), /* Don't pretend to be a literal unless value for this item is set. */ item_type(PARAM_ITEM), + indicators(0), indicator(STMT_INDICATOR_NONE), set_param_func(default_set_param_func), - m_out_param_info(NULL) + m_out_param_info(NULL), + /* + Set m_is_settable_routine_parameter to "true" by default. + This is needed for client-server protocol, + whose parameters are always settable. + For dynamic SQL, settability depends on the type of Item passed + as an actual parameter. See Item_param::set_from_item(). + */ + m_is_settable_routine_parameter(true) { name= (char*) "?"; /* @@ -3331,7 +3385,7 @@ void Item_param::set_null() max_length= 0; decimals= 0; state= NULL_VALUE; - item_type= Item::NULL_ITEM; + fix_type(Item::NULL_ITEM); DBUG_VOID_RETURN; } @@ -3343,6 +3397,7 @@ void Item_param::set_int(longlong i, uint32 max_length_arg) max_length= max_length_arg; decimals= 0; maybe_null= 0; + fix_type(Item::INT_ITEM); DBUG_VOID_RETURN; } @@ -3354,6 +3409,7 @@ void Item_param::set_double(double d) max_length= DBL_DIG + 8; decimals= NOT_FIXED_DEC; maybe_null= 0; + fix_type(Item::REAL_ITEM); DBUG_VOID_RETURN; } @@ -3383,21 +3439,41 @@ void Item_param::set_decimal(const char *str, ulong length) my_decimal_precision_to_length_no_truncation(decimal_value.precision(), decimals, unsigned_flag); maybe_null= 0; + fix_type(Item::DECIMAL_ITEM); DBUG_VOID_RETURN; } -void Item_param::set_decimal(const my_decimal *dv) +void Item_param::set_decimal(const my_decimal *dv, bool unsigned_arg) { state= DECIMAL_VALUE; my_decimal2decimal(dv, &decimal_value); decimals= (uint8) decimal_value.frac; - unsigned_flag= !decimal_value.sign(); + unsigned_flag= unsigned_arg; max_length= my_decimal_precision_to_length(decimal_value.intg + decimals, decimals, unsigned_flag); + fix_type(Item::DECIMAL_ITEM); } + +void Item_param::fix_temporal(uint32 max_length_arg, uint decimals_arg) +{ + state= TIME_VALUE; + max_length= max_length_arg; + decimals= decimals_arg; + fix_type(Item::DATE_ITEM); +} + + +void Item_param::set_time(const MYSQL_TIME *tm, + uint32 max_length_arg, uint decimals_arg) +{ + value.time= *tm; + fix_temporal(max_length_arg, decimals_arg); +} + + /** Set parameter value from MYSQL_TIME value. @@ -3426,11 +3502,9 @@ void Item_param::set_time(MYSQL_TIME *tm, timestamp_type time_type, &str, time_type, 0); set_zero_time(&value.time, MYSQL_TIMESTAMP_ERROR); } - - state= TIME_VALUE; maybe_null= 0; - max_length= max_length_arg; - decimals= tm->second_part > 0 ? TIME_SECOND_PART_DIGITS : 0; + fix_temporal(max_length_arg, + tm->second_part > 0 ? TIME_SECOND_PART_DIGITS : 0); DBUG_VOID_RETURN; } @@ -3451,6 +3525,7 @@ bool Item_param::set_str(const char *str, ulong length) maybe_null= 0; /* max_length and decimals are set after charset conversion */ /* sic: str may be not null-terminated, don't add DBUG_PRINT here */ + fix_type(Item::STRING_ITEM); DBUG_RETURN(FALSE); } @@ -3482,6 +3557,7 @@ bool Item_param::set_longdata(const char *str, ulong length) DBUG_RETURN(TRUE); state= LONG_DATA_VALUE; maybe_null= 0; + fix_type(Item::STRING_ITEM); DBUG_RETURN(FALSE); } @@ -3528,6 +3604,7 @@ bool Item_param::CONVERSION_INFO::convert(THD *thd, String *str) bool Item_param::set_from_item(THD *thd, Item *item) { DBUG_ENTER("Item_param::set_from_item"); + m_is_settable_routine_parameter= item->get_settable_routine_parameter(); if (limit_clause_param) { longlong val= item->val_int(); @@ -3540,7 +3617,6 @@ bool Item_param::set_from_item(THD *thd, Item *item) { unsigned_flag= item->unsigned_flag; set_int(val, MY_INT64_NUM_DECIMAL_DIGITS); - item_type= Item::INT_ITEM; set_handler_by_result_type(item->result_type()); DBUG_RETURN(!unsigned_flag && value.integer < 0 ? 1 : 0); } @@ -3552,12 +3628,10 @@ bool Item_param::set_from_item(THD *thd, Item *item) switch (item->cmp_type()) { case REAL_RESULT: set_double(tmp.value.m_double); - item_type= Item::REAL_ITEM; set_handler_by_field_type(MYSQL_TYPE_DOUBLE); break; case INT_RESULT: set_int(tmp.value.m_longlong, MY_INT64_NUM_DECIMAL_DIGITS); - item_type= Item::INT_ITEM; set_handler_by_field_type(MYSQL_TYPE_LONGLONG); break; case STRING_RESULT: @@ -3567,7 +3641,6 @@ bool Item_param::set_from_item(THD *thd, Item *item) Exact value of max_length is not known unless data is converted to charset of connection, so we have to set it later. */ - item_type= Item::STRING_ITEM; set_handler_by_field_type(MYSQL_TYPE_VARCHAR); if (set_str(tmp.m_string.ptr(), tmp.m_string.length())) @@ -3576,24 +3649,13 @@ bool Item_param::set_from_item(THD *thd, Item *item) } case DECIMAL_RESULT: { - const my_decimal *ent_value= &tmp.m_decimal; - my_decimal2decimal(ent_value, &decimal_value); - state= DECIMAL_VALUE; - decimals= ent_value->frac; - max_length= - my_decimal_precision_to_length_no_truncation(ent_value->precision(), - decimals, unsigned_flag); - item_type= Item::DECIMAL_ITEM; + set_decimal(&tmp.m_decimal, unsigned_flag); set_handler_by_field_type(MYSQL_TYPE_NEWDECIMAL); break; } case TIME_RESULT: { - value.time= tmp.value.m_time; - state= TIME_VALUE; - max_length= item->max_length; - decimals= item->decimals; - item_type= Item::DATE_ITEM; + set_time(&tmp.value.m_time, item->max_length, item->decimals); set_handler(item->type_handler()); break; } @@ -3634,6 +3696,7 @@ void Item_param::reset() state= NO_VALUE; maybe_null= 1; null_value= 0; + fixed= false; /* Don't reset item_type to PARAM_ITEM: it's only needed to guard us from item optimizations at prepare stage, when item doesn't yet @@ -3971,6 +4034,7 @@ bool Item_param::convert_str_value(THD *thd) bool Item_param::basic_const_item() const { + DBUG_ASSERT(fixed || state == NO_VALUE); if (state == NO_VALUE || state == TIME_VALUE) return FALSE; return TRUE; @@ -4105,6 +4169,7 @@ Item_param::set_param_type_and_swap_value(Item_param *src) maybe_null= src->maybe_null; null_value= src->null_value; state= src->state; + fixed= src->fixed; value= src->value; decimal_value.swap(src->decimal_value); @@ -4115,7 +4180,9 @@ Item_param::set_param_type_and_swap_value(Item_param *src) void Item_param::set_default() { + m_is_settable_routine_parameter= false; state= DEFAULT_VALUE; + fixed= true; /* When Item_param is set to DEFAULT_VALUE: - its val_str() and val_decimal() return NULL @@ -4129,7 +4196,9 @@ void Item_param::set_default() void Item_param::set_ignore() { + m_is_settable_routine_parameter= false; state= IGNORE_VALUE; + fixed= true; null_value= true; } @@ -4175,18 +4244,15 @@ Item_param::set_value(THD *thd, sp_rcontext *ctx, Item **it) str_value.charset()); collation.set(str_value.charset(), DERIVATION_COERCIBLE); decimals= 0; - item_type= Item::STRING_ITEM; break; } case REAL_RESULT: set_double(arg->val_real()); - item_type= Item::REAL_ITEM; break; case INT_RESULT: set_int(arg->val_int(), arg->max_length); - item_type= Item::INT_ITEM; break; case DECIMAL_RESULT: @@ -4197,8 +4263,7 @@ Item_param::set_value(THD *thd, sp_rcontext *ctx, Item **it) if (!dv) return TRUE; - set_decimal(dv); - item_type= Item::DECIMAL_ITEM; + set_decimal(dv, !dv->sign()); break; } @@ -4208,7 +4273,6 @@ Item_param::set_value(THD *thd, sp_rcontext *ctx, Item **it) DBUG_ASSERT(TRUE); // Abort in debug mode. set_null(); // Set to NULL in release mode. - item_type= Item::NULL_ITEM; return FALSE; } @@ -8694,17 +8758,22 @@ bool Item_default_value::fix_fields(THD *thd, Item **items) goto error; memcpy((void *)def_field, (void *)field_arg->field, field_arg->field->size_of()); - def_field->move_field_offset((my_ptrdiff_t) - (def_field->table->s->default_values - - def_field->table->record[0])); - set_field(def_field); - if (field->default_value) + IF_DBUG(def_field->is_stat_field=1,); // a hack to fool ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED + if (def_field->default_value && def_field->default_value->flags) { - fix_session_vcol_expr_for_read(thd, field, field->default_value); + uchar *newptr= (uchar*) thd->alloc(1+def_field->pack_length()); + if (!newptr) + goto error; + fix_session_vcol_expr_for_read(thd, def_field, def_field->default_value); if (thd->mark_used_columns != MARK_COLUMNS_NONE) - field->default_value->expr->walk(&Item::register_field_in_read_map, 1, 0); - IF_DBUG(def_field->is_stat_field=1,); // a hack to fool ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED + def_field->default_value->expr->walk(&Item::register_field_in_read_map, 1, 0); + def_field->move_field(newptr+1, def_field->maybe_null() ? newptr : 0, 1); } + else + def_field->move_field_offset((my_ptrdiff_t) + (def_field->table->s->default_values - + def_field->table->record[0])); + set_field(def_field); return FALSE; error: @@ -8729,6 +8798,7 @@ void Item_default_value::calculate() { if (field->default_value) field->set_default(); + DEBUG_SYNC(field->table->in_use, "after_Item_default_value_calculate"); } String *Item_default_value::val_str(String *str) @@ -8770,15 +8840,25 @@ bool Item_default_value::send(Protocol *protocol, String *buffer) int Item_default_value::save_in_field(Field *field_arg, bool no_conversions) { if (arg) - calculate(); - else { - return field_arg->save_in_field_default_value(context->error_processor == - &view_error_processor); + calculate(); + return Item_field::save_in_field(field_arg, no_conversions); } - return Item_field::save_in_field(field_arg, no_conversions); + + if (field_arg->default_value && field_arg->default_value->flags) + return 0; // defaut fields will be set later, no need to do it twice + return field_arg->save_in_field_default_value(context->error_processor == + &view_error_processor); } +table_map Item_default_value::used_tables() const +{ + if (!field || !field->default_value) + return static_cast(0); + if (!field->default_value->expr) // not fully parsed field + return static_cast(RAND_TABLE_BIT); + return field->default_value->expr->used_tables(); +} /** This method like the walk method traverses the item tree, but at the diff --git a/sql/item.h b/sql/item.h index 1f3e0f02971..67640ce5f4d 100644 --- a/sql/item.h +++ b/sql/item.h @@ -2,7 +2,7 @@ #define SQL_ITEM_INCLUDED /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB + Copyright (c) 2009, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -97,10 +97,10 @@ enum precedence { typedef Bounds_checked_array Ref_ptr_array; static inline uint32 -char_to_byte_length_safe(uint32 char_length_arg, uint32 mbmaxlen_arg) +char_to_byte_length_safe(size_t char_length_arg, uint32 mbmaxlen_arg) { - ulonglong tmp= ((ulonglong) char_length_arg) * mbmaxlen_arg; - return (tmp > UINT_MAX32) ? (uint32) UINT_MAX32 : (uint32) tmp; + ulonglong tmp= ((ulonglong) char_length_arg) * mbmaxlen_arg; + return tmp > UINT_MAX32 ? UINT_MAX32 : static_cast(tmp); } bool mark_unsupported_function(const char *where, void *store, uint result); @@ -523,7 +523,7 @@ class Copy_query_with_rewrite bool copy_up_to(size_t bytes) { DBUG_ASSERT(bytes >= from); - return dst->append(src + from, bytes - from); + return dst->append(src + from, uint32(bytes - from)); } public: @@ -1095,6 +1095,8 @@ public: Returns the val_str() value converted to the given character set. */ String *val_str(String *str, String *converter, CHARSET_INFO *to); + + virtual String *val_json(String *str) { return val_str(str); } /* Return decimal representation of item with fixed point. @@ -1833,7 +1835,7 @@ public: max_length= char_to_byte_length_safe(max_char_length_arg, cs->mbmaxlen); collation.collation= cs; } - void fix_char_length(uint32 max_char_length_arg) + void fix_char_length(size_t max_char_length_arg) { max_length= char_to_byte_length_safe(max_char_length_arg, collation.collation->mbmaxlen); @@ -2762,7 +2764,47 @@ class Item_param :public Item_basic_value, public Rewritable_query_parameter, public Type_handler_hybrid_field_type { -public: + /* + NO_VALUE is a special value meaning that the parameter has not been + assigned yet. Item_param::state is assigned to NO_VALUE in constructor + and is used at prepare time. + + 1. At prepare time + Item_param::fix_fields() sets "fixed" to true, + but as Item_param::state is still NO_VALUE, + Item_param::basic_const_item() returns false. This prevents various + optimizations to happen at prepare time fix_fields(). + For example, in this query: + PREPARE stmt FROM 'SELECT FORMAT(10000,2,?)'; + Item_param::basic_const_item() is tested from + Item_func_format::fix_length_and_dec(). + + 2. At execute time: + When Item_param gets a value + (or a pseudo-value like DEFAULT_VALUE or IGNORE_VALUE): + - Item_param::state changes from NO_VALUE to something else + - Item_param::fixed is changed to true + All Item_param::set_xxx() make sure to do so. + In the state with an assigned value: + - Item_param::basic_const_item() returns true + - Item::type() returns NULL_ITEM, INT_ITEM, REAL_ITEM, DECIMAL_ITEM, + DATE_ITEM, STRING_ITEM, depending on the value assigned. + So in this state Item_param behaves in many cases like a literal. + + When Item_param::cleanup() is called: + - Item_param::state does not change + - Item_param::fixed changes to false + Note, this puts Item_param into an inconsistent state: + - Item_param::basic_const_item() still returns "true" + - Item_param::type() still pretends to be a basic constant Item + Both are not expected in combination with fixed==false. + However, these methods are not really called in this state, + see asserts in Item_param::basic_const_item() and Item_param::type(). + + When Item_param::reset() is called: + - Item_param::state changes to NO_VALUE + - Item_param::fixed changes to false + */ enum enum_item_param_state { NO_VALUE, NULL_VALUE, INT_VALUE, REAL_VALUE, @@ -2770,6 +2812,17 @@ public: DECIMAL_VALUE, DEFAULT_VALUE, IGNORE_VALUE } state; + enum Type item_type; + + void fix_type(Type type) + { + item_type= type; + fixed= true; + } + + void fix_temporal(uint32 max_length_arg, uint decimals_arg); + +public: struct CONVERSION_INFO { /* @@ -2838,8 +2891,6 @@ public: MYSQL_TIME time; } value; - enum Type item_type; - enum_field_types field_type() const { return Type_handler_hybrid_field_type::field_type(); } enum Item_result result_type () const @@ -2849,7 +2900,11 @@ public: Item_param(THD *thd, uint pos_in_query_arg); - enum Type type() const { return item_type; } + enum Type type() const + { + DBUG_ASSERT(fixed || state == NO_VALUE); + return item_type; + } double val_real(); longlong val_int(); @@ -2864,10 +2919,11 @@ public: void set_int(longlong i, uint32 max_length_arg); void set_double(double i); void set_decimal(const char *str, ulong length); - void set_decimal(const my_decimal *dv); + void set_decimal(const my_decimal *dv, bool unsigned_arg); bool set_str(const char *str, ulong length); bool set_longdata(const char *str, ulong length); void set_time(MYSQL_TIME *tm, timestamp_type type, uint32 max_length_arg); + void set_time(const MYSQL_TIME *tm, uint32 max_length_arg, uint decimals_arg); bool set_from_item(THD *thd, Item *item); void reset(); /* @@ -2893,6 +2949,18 @@ public: bool is_null() { DBUG_ASSERT(state != NO_VALUE); return state == NULL_VALUE; } bool basic_const_item() const; + bool has_no_value() const + { + return state == NO_VALUE; + } + bool has_long_data_value() const + { + return state == LONG_DATA_VALUE; + } + bool has_int_value() const + { + return state == INT_VALUE; + } /* This method is used to make a copy of a basic constant item when propagating constants in the optimizer. The reason to create a new @@ -2916,7 +2984,7 @@ public: Rewritable_query_parameter *get_rewritable_query_parameter() { return this; } Settable_routine_parameter *get_settable_routine_parameter() - { return this; } + { return m_is_settable_routine_parameter ? this : NULL; } bool append_for_log(THD *thd, String *str); bool check_vcol_func_processor(void *int_arg) {return FALSE;} @@ -2936,6 +3004,7 @@ public: private: Send_field *m_out_param_info; + bool m_is_settable_routine_parameter; }; @@ -3413,7 +3482,7 @@ class Item_blob :public Item_partition_func_safe_string { public: Item_blob(THD *thd, const char *name_arg, uint length): - Item_partition_func_safe_string(thd, name_arg, length, &my_charset_bin) + Item_partition_func_safe_string(thd, name_arg, strlen(name_arg), &my_charset_bin) { max_length= length; } enum Type type() const { return TYPE_HOLDER; } enum_field_types field_type() const { return MYSQL_TYPE_BLOB; } @@ -5118,7 +5187,7 @@ public: param->set_default(); return false; } - table_map used_tables() const { return (table_map)0L; } + table_map used_tables() const; Field *get_tmp_table_field() { return 0; } Item *get_tmp_table_item(THD *thd) { return this; } Item_field *field_for_view_update() { return 0; } diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 2856cea0697..a3b9041aed4 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -610,7 +610,7 @@ int Arg_comparator::set_compare_func(Item_func_or_sum *item, Item_result type) int Arg_comparator::set_cmp_func(Item_func_or_sum *owner_arg, Item **a1, Item **a2) { - thd= current_thd; + THD *thd= current_thd; owner= owner_arg; set_null= set_null && owner_arg; a= a1; @@ -742,12 +742,10 @@ get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg, if (cache_arg && item->const_item() && !(item->type() == Item::CACHE_ITEM && item->cmp_type() == TIME_RESULT)) { - Query_arena backup; - Query_arena *save_arena= thd->switch_to_arena_for_cached_items(&backup); - Item_cache_temporal *cache= new (thd->mem_root) Item_cache_temporal(thd, f_type); - if (save_arena) - thd->set_query_arena(save_arena); + if (!thd) + thd= current_thd; + Item_cache_temporal *cache= new (thd->mem_root) Item_cache_temporal(thd, f_type); cache->store_packed(value, item); *cache_arg= cache; *item_arg= cache_arg; @@ -782,12 +780,12 @@ int Arg_comparator::compare_temporal(enum_field_types type) owner->null_value= 1; /* Get DATE/DATETIME/TIME value of the 'a' item. */ - a_value= get_datetime_value(thd, &a, &a_cache, type, &a_is_null); + a_value= get_datetime_value(0, &a, &a_cache, type, &a_is_null); if (a_is_null) return -1; /* Get DATE/DATETIME/TIME value of the 'b' item. */ - b_value= get_datetime_value(thd, &b, &b_cache, type, &b_is_null); + b_value= get_datetime_value(0, &b, &b_cache, type, &b_is_null); if (b_is_null) return -1; @@ -805,10 +803,10 @@ int Arg_comparator::compare_e_temporal(enum_field_types type) longlong a_value, b_value; /* Get DATE/DATETIME/TIME value of the 'a' item. */ - a_value= get_datetime_value(thd, &a, &a_cache, type, &a_is_null); + a_value= get_datetime_value(0, &a, &a_cache, type, &a_is_null); /* Get DATE/DATETIME/TIME value of the 'b' item. */ - b_value= get_datetime_value(thd, &b, &b_cache, type, &b_is_null); + b_value= get_datetime_value(0, &b, &b_cache, type, &b_is_null); return a_is_null || b_is_null ? a_is_null == b_is_null : a_value == b_value; } @@ -3742,7 +3740,7 @@ uchar *in_datetime::get_value(Item *item) Item **tmp_item= lval_cache ? &lval_cache : &item; enum_field_types f_type= tmp_item[0]->field_type_for_temporal_comparison(warn_item); - tmp.val= get_datetime_value(thd, &tmp_item, &lval_cache, f_type, &is_null); + tmp.val= get_datetime_value(0, &tmp_item, &lval_cache, f_type, &is_null); if (item->null_value) return 0; tmp.unsigned_flag= 1L; @@ -4007,7 +4005,7 @@ void cmp_item_datetime::store_value(Item *item) Item **tmp_item= lval_cache ? &lval_cache : &item; enum_field_types f_type= tmp_item[0]->field_type_for_temporal_comparison(warn_item); - value= get_datetime_value(thd, &tmp_item, &lval_cache, f_type, &is_null); + value= get_datetime_value(0, &tmp_item, &lval_cache, f_type, &is_null); m_null_value= item->null_value; } diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 7774663bd57..cb51b1dda82 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -55,7 +55,6 @@ class Arg_comparator: public Sql_alloc Arg_comparator *comparators; // used only for compare_row() double precision; /* Fields used in DATE/DATETIME comparison. */ - THD *thd; Item *a_cache, *b_cache; // Cached values of a and b items // when one of arguments is NULL. int set_compare_func(Item_func_or_sum *owner, Item_result type); @@ -70,12 +69,12 @@ public: Arg_comparator(): m_compare_type(STRING_RESULT), m_compare_collation(&my_charset_bin), - set_null(TRUE), comparators(0), thd(0), + set_null(TRUE), comparators(0), a_cache(0), b_cache(0) {}; Arg_comparator(Item **a1, Item **a2): a(a1), b(a2), m_compare_type(STRING_RESULT), m_compare_collation(&my_charset_bin), - set_null(TRUE), comparators(0), thd(0), + set_null(TRUE), comparators(0), a_cache(0), b_cache(0) {}; public: @@ -1268,15 +1267,13 @@ public: class in_datetime :public in_longlong { public: - THD *thd; /* An item used to issue warnings. */ Item *warn_item; /* Cache for the left item. */ Item *lval_cache; in_datetime(THD *thd, Item *warn_item_arg, uint elements) - :in_longlong(thd, elements), thd(current_thd), warn_item(warn_item_arg), - lval_cache(0) {}; + :in_longlong(thd, elements), warn_item(warn_item_arg), lval_cache(0) {}; void set(uint pos,Item *item); uchar *get_value(Item *item); Item *create_item(THD *thd); @@ -1445,14 +1442,13 @@ class cmp_item_datetime : public cmp_item_scalar { longlong value; public: - THD *thd; /* Item used for issuing warnings. */ Item *warn_item; /* Cache for the left item. */ Item *lval_cache; cmp_item_datetime(Item *warn_item_arg) - :thd(current_thd), warn_item(warn_item_arg), lval_cache(0) {} + : warn_item(warn_item_arg), lval_cache(0) {} void store_value(Item *item); int cmp(Item *arg); int compare(cmp_item *ci); diff --git a/sql/item_create.cc b/sql/item_create.cc index a506ab948d1..4730e187ebe 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -1261,6 +1261,34 @@ protected: #endif +#ifdef HAVE_SPATIAL +class Create_func_geometry_from_json : public Create_native_func +{ +public: + virtual Item *create_native(THD *thd, LEX_STRING name, List *item_list); + + static Create_func_geometry_from_json s_singleton; + +protected: + Create_func_geometry_from_json() {} + virtual ~Create_func_geometry_from_json() {} +}; + + +class Create_func_as_geojson : public Create_native_func +{ +public: + virtual Item *create_native(THD *thd, LEX_STRING name, List *item_list); + + static Create_func_as_geojson s_singleton; + +protected: + Create_func_as_geojson() {} + virtual ~Create_func_as_geojson() {} +}; +#endif /*HAVE_SPATIAL*/ + + #ifdef HAVE_SPATIAL class Create_func_geometry_type : public Create_func_arg1 { @@ -1734,6 +1762,45 @@ protected: }; +class Create_func_json_compact : public Create_func_arg1 +{ +public: + virtual Item *create_1_arg(THD *thd, Item *arg1); + + static Create_func_json_compact s_singleton; + +protected: + Create_func_json_compact() {} + virtual ~Create_func_json_compact() {} +}; + + +class Create_func_json_loose : public Create_func_arg1 +{ +public: + virtual Item *create_1_arg(THD *thd, Item *arg1); + + static Create_func_json_loose s_singleton; + +protected: + Create_func_json_loose() {} + virtual ~Create_func_json_loose() {} +}; + + +class Create_func_json_detailed: public Create_native_func +{ +public: + virtual Item *create_native(THD *thd, LEX_STRING name, List *item_list); + + static Create_func_json_detailed s_singleton; + +protected: + Create_func_json_detailed() {} + virtual ~Create_func_json_detailed() {} +}; + + class Create_func_json_type : public Create_func_arg1 { public: @@ -4532,6 +4599,101 @@ Create_func_geometry_from_wkb::create_native(THD *thd, LEX_STRING name, #endif +#ifdef HAVE_SPATIAL +Create_func_geometry_from_json Create_func_geometry_from_json::s_singleton; + +Item* +Create_func_geometry_from_json::create_native(THD *thd, LEX_STRING name, + List *item_list) +{ + Item *func= NULL; + int arg_count= 0; + + if (item_list != NULL) + arg_count= item_list->elements; + + switch (arg_count) { + case 1: + { + Item *json= item_list->pop(); + func= new (thd->mem_root) Item_func_geometry_from_json(thd, json); + thd->lex->uncacheable(UNCACHEABLE_RAND); + break; + } + case 2: + { + Item *json= item_list->pop(); + Item *options= item_list->pop(); + func= new (thd->mem_root) Item_func_geometry_from_json(thd, json, options); + break; + } + case 3: + { + Item *json= item_list->pop(); + Item *options= item_list->pop(); + Item *srid= item_list->pop(); + func= new (thd->mem_root) Item_func_geometry_from_json(thd, json, options, + srid); + break; + } + default: + { + my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); + break; + } + } + + return func; +} + + +Create_func_as_geojson Create_func_as_geojson::s_singleton; + +Item* +Create_func_as_geojson::create_native(THD *thd, LEX_STRING name, + List *item_list) +{ + Item *func= NULL; + int arg_count= 0; + + if (item_list != NULL) + arg_count= item_list->elements; + + switch (arg_count) { + case 1: + { + Item *geom= item_list->pop(); + func= new (thd->mem_root) Item_func_as_geojson(thd, geom); + thd->lex->uncacheable(UNCACHEABLE_RAND); + break; + } + case 2: + { + Item *geom= item_list->pop(); + Item *max_dec= item_list->pop(); + func= new (thd->mem_root) Item_func_as_geojson(thd, geom, max_dec); + break; + } + case 3: + { + Item *geom= item_list->pop(); + Item *max_dec= item_list->pop(); + Item *options= item_list->pop(); + func= new (thd->mem_root) Item_func_as_geojson(thd, geom, max_dec, options); + break; + } + default: + { + my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); + break; + } + } + + return func; +} +#endif /*HAVE_SPATIAL*/ + + #ifdef HAVE_SPATIAL Create_func_geometry_type Create_func_geometry_type::s_singleton; @@ -4880,6 +5042,51 @@ Create_func_json_exists::create_2_arg(THD *thd, Item *arg1, Item *arg2) } +Create_func_json_detailed Create_func_json_detailed::s_singleton; + +Item* +Create_func_json_detailed::create_native(THD *thd, LEX_STRING name, + List *item_list) +{ + Item *func= NULL; + int arg_count= 0; + + if (item_list != NULL) + arg_count= item_list->elements; + + if (arg_count < 1 || arg_count > 2 /* json_doc, [path]...*/) + { + my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); + } + else + { + func= new (thd->mem_root) Item_func_json_format(thd, *item_list); + } + + return func; +} + + +Create_func_json_loose Create_func_json_loose::s_singleton; + +Item* +Create_func_json_loose::create_1_arg(THD *thd, Item *arg1) +{ + return new (thd->mem_root) Item_func_json_format(thd, arg1, + Item_func_json_format::LOOSE); +} + + +Create_func_json_compact Create_func_json_compact::s_singleton; + +Item* +Create_func_json_compact::create_1_arg(THD *thd, Item *arg1) +{ + return new (thd->mem_root) Item_func_json_format(thd, arg1, + Item_func_json_format::COMPACT); +} + + Create_func_json_valid Create_func_json_valid::s_singleton; Item* @@ -6605,14 +6812,17 @@ static Native_func_registry func_array[] = { { C_STRING_WITH_LEN("JSON_ARRAY") }, BUILDER(Create_func_json_array)}, { { C_STRING_WITH_LEN("JSON_ARRAY_APPEND") }, BUILDER(Create_func_json_array_append)}, { { C_STRING_WITH_LEN("JSON_ARRAY_INSERT") }, BUILDER(Create_func_json_array_insert)}, + { { C_STRING_WITH_LEN("JSON_COMPACT") }, BUILDER(Create_func_json_compact)}, { { C_STRING_WITH_LEN("JSON_CONTAINS") }, BUILDER(Create_func_json_contains)}, { { C_STRING_WITH_LEN("JSON_CONTAINS_PATH") }, BUILDER(Create_func_json_contains_path)}, { { C_STRING_WITH_LEN("JSON_DEPTH") }, BUILDER(Create_func_json_depth)}, + { { C_STRING_WITH_LEN("JSON_DETAILED") }, BUILDER(Create_func_json_detailed)}, { { C_STRING_WITH_LEN("JSON_EXISTS") }, BUILDER(Create_func_json_exists)}, { { C_STRING_WITH_LEN("JSON_EXTRACT") }, BUILDER(Create_func_json_extract)}, { { C_STRING_WITH_LEN("JSON_INSERT") }, BUILDER(Create_func_json_insert)}, { { C_STRING_WITH_LEN("JSON_KEYS") }, BUILDER(Create_func_json_keys)}, { { C_STRING_WITH_LEN("JSON_LENGTH") }, BUILDER(Create_func_json_length)}, + { { C_STRING_WITH_LEN("JSON_LOOSE") }, BUILDER(Create_func_json_loose)}, { { C_STRING_WITH_LEN("JSON_MERGE") }, BUILDER(Create_func_json_merge)}, { { C_STRING_WITH_LEN("JSON_QUERY") }, BUILDER(Create_func_json_query)}, { { C_STRING_WITH_LEN("JSON_QUOTE") }, BUILDER(Create_func_json_quote)}, @@ -6723,6 +6933,7 @@ static Native_func_registry func_array[] = { { C_STRING_WITH_LEN("STR_TO_DATE") }, BUILDER(Create_func_str_to_date)}, { { C_STRING_WITH_LEN("ST_AREA") }, GEOM_BUILDER(Create_func_area)}, { { C_STRING_WITH_LEN("ST_ASBINARY") }, GEOM_BUILDER(Create_func_as_wkb)}, + { { C_STRING_WITH_LEN("ST_ASGEOJSON") }, GEOM_BUILDER(Create_func_as_geojson)}, { { C_STRING_WITH_LEN("ST_ASTEXT") }, GEOM_BUILDER(Create_func_as_wkt)}, { { C_STRING_WITH_LEN("ST_ASWKB") }, GEOM_BUILDER(Create_func_as_wkb)}, { { C_STRING_WITH_LEN("ST_ASWKT") }, GEOM_BUILDER(Create_func_as_wkt)}, @@ -6748,6 +6959,7 @@ static Native_func_registry func_array[] = { { C_STRING_WITH_LEN("ST_GEOMETRYFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, { { C_STRING_WITH_LEN("ST_GEOMETRYN") }, GEOM_BUILDER(Create_func_geometryn)}, { { C_STRING_WITH_LEN("ST_GEOMETRYTYPE") }, GEOM_BUILDER(Create_func_geometry_type)}, + { { C_STRING_WITH_LEN("ST_GEOMFROMGEOJSON") }, GEOM_BUILDER(Create_func_geometry_from_json)}, { { C_STRING_WITH_LEN("ST_GEOMFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, { { C_STRING_WITH_LEN("ST_GEOMFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, #ifndef DBUG_OFF @@ -7016,9 +7228,6 @@ create_func_cast(THD *thd, Item *a, Cast_target cast_type, res= new (thd->mem_root) Item_char_typecast(thd, a, len, real_cs); break; } - case ITEM_CAST_JSON: - res= new (thd->mem_root) Item_json_typecast(thd, a); - break; default: { DBUG_ASSERT(0); diff --git a/sql/item_func.cc b/sql/item_func.cc index c38bdba05c2..2e0596da2d1 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2725,7 +2725,6 @@ void Item_func_min_max::fix_length_and_dec() decimals=0; max_length=0; maybe_null=0; - thd= current_thd; Item_result tmp_cmp_type= args[0]->cmp_type(); uint string_type_count= 0; uint temporal_type_count= 0; @@ -2867,10 +2866,8 @@ bool Item_func_min_max::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) longlong res= args[i]->val_temporal_packed(Item_func_min_max::field_type()); /* Check if we need to stop (because of error or KILL) and stop the loop */ - if (thd->is_error() || args[i]->null_value) - { + if (args[i]->null_value) return (null_value= 1); - } if (i == 0 || (res < min_max ? cmp_sign : -cmp_sign) > 0) min_max= res; @@ -4127,7 +4124,7 @@ public: bool handle_condition(THD * /* thd */, uint sql_errno, const char * /* sqlstate */, - Sql_condition::enum_warning_level /* level */, + Sql_condition::enum_warning_level* /* level */, const char *message, Sql_condition ** /* cond_hdl */); }; @@ -4136,7 +4133,7 @@ bool Lock_wait_timeout_handler:: handle_condition(THD *thd, uint sql_errno, const char * /* sqlstate */, - Sql_condition::enum_warning_level /* level */, + Sql_condition::enum_warning_level* /* level */, const char *message, Sql_condition ** /* cond_hdl */) { @@ -4302,7 +4299,8 @@ longlong Item_func_release_lock::val_int() User_level_lock *ull; - if (!(ull= + if (!my_hash_inited(&thd->ull_hash) || + !(ull= (User_level_lock*) my_hash_search(&thd->ull_hash, ull_key.ptr(), ull_key.length()))) { @@ -4579,7 +4577,7 @@ longlong Item_func_sleep::val_int() bool Item_func_user_var::check_vcol_func_processor(void *arg) { - return mark_unsupported_function("@", name.str, arg, VCOL_IMPOSSIBLE); + return mark_unsupported_function("@", name.str, arg, VCOL_NON_DETERMINISTIC); } #define extra_size sizeof(double) diff --git a/sql/item_func.h b/sql/item_func.h index d4314f7bd6a..133074122dd 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -636,8 +636,15 @@ public: } void fix_length_and_dec() { - fix_char_length(MY_MIN(args[0]->max_char_length(), - MY_INT64_NUM_DECIMAL_DIGITS)); + uint32 char_length= MY_MIN(args[0]->max_char_length(), + MY_INT64_NUM_DECIMAL_DIGITS); + /* + args[0]->max_char_length() can return 0. + Reserve max_length to fit at least one character for one digit, + plus one character for the sign (if signed). + */ + set_if_bigger(char_length, 1U + (unsigned_flag ? 0 : 1)); + fix_char_length(char_length); } virtual void print(String *str, enum_query_type query_type); uint decimal_precision() const { return args[0]->decimal_precision(); } @@ -1156,7 +1163,6 @@ class Item_func_min_max :public Item_hybrid_func { String tmp_value; int cmp_sign; - THD *thd; public: Item_func_min_max(THD *thd, List &list, int cmp_sign_arg): Item_hybrid_func(thd, list), cmp_sign(cmp_sign_arg) @@ -2215,7 +2221,7 @@ enum Cast_target { ITEM_CAST_BINARY, ITEM_CAST_SIGNED_INT, ITEM_CAST_UNSIGNED_INT, ITEM_CAST_DATE, ITEM_CAST_TIME, ITEM_CAST_DATETIME, ITEM_CAST_CHAR, - ITEM_CAST_DECIMAL, ITEM_CAST_DOUBLE, ITEM_CAST_JSON + ITEM_CAST_DECIMAL, ITEM_CAST_DOUBLE }; diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index c856aa985b3..7ac2e054e8c 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -121,6 +121,65 @@ String *Item_func_geometry_from_wkb::val_str(String *str) } +void report_json_error_ex(String *js, json_engine_t *je, + const char *fname, int n_param, + Sql_condition::enum_warning_level lv); + +String *Item_func_geometry_from_json::val_str(String *str) +{ + DBUG_ASSERT(fixed == 1); + Geometry_buffer buffer; + String *js= args[0]->val_str_ascii(&tmp_js); + uint32 srid= 0; + json_engine_t je; + + if ((null_value= args[0]->null_value)) + return 0; + + if ((arg_count == 2) && !args[1]->null_value) + srid= (uint32)args[1]->val_int(); + + str->set_charset(&my_charset_bin); + if (str->reserve(SRID_SIZE, 512)) + return 0; + str->length(0); + str->q_append(srid); + + json_scan_start(&je, js->charset(), (const uchar *) js->ptr(), + (const uchar *) js->end()); + + if ((null_value= !Geometry::create_from_json(&buffer, &je, str))) + { + int code= 0; + + switch (je.s.error) + { + case Geometry::GEOJ_INCORRECT_GEOJSON: + code= ER_GEOJSON_INCORRECT; + break; + case Geometry::GEOJ_TOO_FEW_POINTS: + code= ER_GEOJSON_TOO_FEW_POINTS; + break; + case Geometry::GEOJ_POLYGON_NOT_CLOSED: + code= ER_GEOJSON_NOT_CLOSED; + break; + default: + report_json_error_ex(js, &je, func_name(), 0, Sql_condition::WARN_LEVEL_WARN); + return NULL; + } + + if (code) + { + THD *thd= current_thd; + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, code, + ER_THD(thd, code)); + } + return 0; + } + return str; +} + + String *Item_func_as_wkt::val_str_ascii(String *str) { DBUG_ASSERT(fixed == 1); @@ -170,6 +229,37 @@ String *Item_func_as_wkb::val_str(String *str) } +void Item_func_as_geojson::fix_length_and_dec() +{ + collation.set(default_charset(), DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII); + max_length=MAX_BLOB_WIDTH; + maybe_null= 1; +} + + +String *Item_func_as_geojson::val_str_ascii(String *str) +{ + DBUG_ASSERT(fixed == 1); + String arg_val; + String *swkb= args[0]->val_str(&arg_val); + Geometry_buffer buffer; + Geometry *geom= NULL; + const char *dummy; + + if ((null_value= + (args[0]->null_value || + !(geom= Geometry::construct(&buffer, swkb->ptr(), swkb->length()))))) + return 0; + + str->length(0); + str->set_charset(&my_charset_latin1); + if ((null_value= geom->as_json(str, FLOATING_POINT_DECIMALS, &dummy))) + return 0; + + return str; +} + + String *Item_func_geometry_type::val_str_ascii(String *str) { DBUG_ASSERT(fixed == 1); diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h index 1584090c29e..a164f9dec89 100644 --- a/sql/item_geofunc.h +++ b/sql/item_geofunc.h @@ -67,6 +67,23 @@ public: { return get_item_copy(thd, mem_root, this); } }; + +class Item_func_geometry_from_json: public Item_geometry_func +{ + String tmp_js; +public: + Item_func_geometry_from_json(THD *thd, Item *js): Item_geometry_func(thd, js) {} + Item_func_geometry_from_json(THD *thd, Item *js, Item *opt): + Item_geometry_func(thd, js, opt) {} + Item_func_geometry_from_json(THD *thd, Item *js, Item *opt, Item *srid): + Item_geometry_func(thd, js, opt, srid) {} + const char *func_name() const { return "st_geomfromgeojson"; } + String *val_str(String *); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy(thd, mem_root, this); } +}; + + class Item_func_as_wkt: public Item_str_ascii_func { public: @@ -89,6 +106,23 @@ public: { return get_item_copy(thd, mem_root, this); } }; + +class Item_func_as_geojson: public Item_str_ascii_func +{ +public: + Item_func_as_geojson(THD *thd, Item *js): Item_str_ascii_func(thd, js) {} + Item_func_as_geojson(THD *thd, Item *js, Item *max_dec_digits): + Item_str_ascii_func(thd, js, max_dec_digits) {} + Item_func_as_geojson(THD *thd, Item *js, Item *max_dec_digits, Item *opt): + Item_str_ascii_func(thd, js, max_dec_digits, opt) {} + const char *func_name() const { return "st_asgeojson"; } + void fix_length_and_dec(); + String *val_str_ascii(String *); + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy(thd, mem_root, this); } +}; + + class Item_func_geometry_type: public Item_str_ascii_func { public: diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc index 9b9490a0cbc..925a7e437f2 100644 --- a/sql/item_jsonfunc.cc +++ b/sql/item_jsonfunc.cc @@ -113,13 +113,146 @@ static int st_append_escaped(String *s, const String *a) } +static const int TAB_SIZE_LIMIT= 8; +static const char tab_arr[TAB_SIZE_LIMIT+1]= " "; + +static int append_tab(String *js, int depth, int tab_size) +{ + if (js->append("\n", 1)) + return 1; + for (int i=0; iappend(tab_arr, tab_size)) + return 1; + } + return 0; +} + + +static int json_nice(json_engine_t *je, String *nice_js, + Item_func_json_format::formats mode, int tab_size=4) +{ + int depth= 0; + const char *comma, *colon; + uint comma_len, colon_len; + int first_value= 1; + + DBUG_ASSERT(je->s.cs == nice_js->charset()); + DBUG_ASSERT(mode != Item_func_json_format::DETAILED || + (tab_size >= 0 && tab_size <= TAB_SIZE_LIMIT)); + + comma= ", "; + colon= "\": "; + if (mode == Item_func_json_format::LOOSE) + { + comma_len= 2; + colon_len= 3; + } + else if (mode == Item_func_json_format::DETAILED) + { + comma_len= 1; + colon_len= 3; + } + else + { + comma_len= 1; + colon_len= 2; + } + + do + { + switch (je->state) + { + case JST_KEY: + { + const uchar *key_start= je->s.c_str; + const uchar *key_end; + + do + { + key_end= je->s.c_str; + } while (json_read_keyname_chr(je) == 0); + + if (je->s.error) + goto error; + + if (!first_value) + nice_js->append(comma, comma_len); + + if (mode == Item_func_json_format::DETAILED && + append_tab(nice_js, depth, tab_size)) + goto error; + + nice_js->append("\"", 1); + append_simple(nice_js, key_start, key_end - key_start); + nice_js->append(colon, colon_len); + } + /* now we have key value to handle, so no 'break'. */ + DBUG_ASSERT(je->state == JST_VALUE); + goto handle_value; + + case JST_VALUE: + if (!first_value) + nice_js->append(comma, comma_len); + + if (mode == Item_func_json_format::DETAILED && + depth > 0 && + append_tab(nice_js, depth, tab_size)) + goto error; + +handle_value: + if (json_read_value(je)) + goto error; + if (json_value_scalar(je)) + { + if (append_simple(nice_js, je->value_begin, + je->value_end - je->value_begin)) + goto error; + + first_value= 0; + } + else + { + if (mode == Item_func_json_format::DETAILED && + depth > 0 && + append_tab(nice_js, depth, tab_size)) + goto error; + nice_js->append((je->value_type == JSON_VALUE_OBJECT) ? "{" : "[", 1); + first_value= 1; + depth++; + } + + break; + + case JST_OBJ_END: + case JST_ARRAY_END: + depth--; + if (mode == Item_func_json_format::DETAILED && + append_tab(nice_js, depth, tab_size)) + goto error; + nice_js->append((je->state == JST_OBJ_END) ? "}": "]", 1); + first_value= 0; + break; + + default: + break; + }; + } while (json_scan_next(je) == 0); + + return je->s.error; + +error: + return 1; +} + + #define report_json_error(js, je, n_param) \ report_json_error_ex(js, je, func_name(), n_param, \ Sql_condition::WARN_LEVEL_WARN) -static void report_json_error_ex(String *js, json_engine_t *je, - const char *fname, int n_param, - Sql_condition::enum_warning_level lv) +void report_json_error_ex(String *js, json_engine_t *je, + const char *fname, int n_param, + Sql_condition::enum_warning_level lv) { THD *thd= current_thd; int position= (const char *) je->s.c_str - js->ptr(); @@ -168,6 +301,7 @@ static void report_json_error_ex(String *js, json_engine_t *je, #define NO_WILDCARD_ALLOWED 1 #define SHOULD_END_WITH_ARRAY 2 +#define TRIVIAL_PATH_NOT_ALLOWED 3 #define report_path_error(js, je, n_param) \ report_path_error_ex(js, je, func_name(), n_param,\ @@ -205,6 +339,11 @@ static void report_path_error_ex(String *ps, json_path_t *p, code= ER_JSON_PATH_NO_WILDCARD; break; + case TRIVIAL_PATH_NOT_ALLOWED: + code= ER_JSON_PATH_EMPTY; + break; + + default: return; } @@ -234,7 +373,7 @@ static int path_setup_nwc(json_path_t *p, CHARSET_INFO *i_cs, longlong Item_func_json_valid::val_int() { - String *js= args[0]->val_str(&tmp_value); + String *js= args[0]->val_json(&tmp_value); json_engine_t je; if ((null_value= args[0]->null_value)) @@ -262,7 +401,7 @@ longlong Item_func_json_exists::val_int() json_engine_t je; uint array_counters[JSON_DEPTH_LIMIT]; - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); if (!path.parsed) { @@ -315,7 +454,7 @@ void Item_func_json_value::fix_length_and_dec() String *Item_func_json_value::val_str(String *str) { json_engine_t je; - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); int error= 0; uint array_counters[JSON_DEPTH_LIMIT]; @@ -448,7 +587,7 @@ void Item_func_json_unquote::fix_length_and_dec() String *Item_func_json_unquote::val_str(String *str) { - String *js= args[0]->val_str(&tmp_s); + String *js= args[0]->val_json(&tmp_s); json_engine_t je; int c_len; @@ -547,22 +686,43 @@ void Item_func_json_extract::fix_length_and_dec() } +static bool path_exact(const json_path_with_flags *paths_list, int n_paths, + const json_path_t *p, enum json_value_types vt) +{ + for (; n_paths > 0; n_paths--, paths_list++) + { + if (json_path_compare(&paths_list->p, p, vt) == 0) + return TRUE; + } + return FALSE; +} + + +static bool path_ok(const json_path_with_flags *paths_list, int n_paths, + const json_path_t *p, enum json_value_types vt) +{ + for (; n_paths > 0; n_paths--, paths_list++) + { + if (json_path_compare(&paths_list->p, p, vt) >= 0) + return TRUE; + } + return FALSE; +} + + String *Item_func_json_extract::val_str(String *str) { - String *js= args[0]->val_str(&tmp_js); - json_engine_t je; - bool multiple_values_found= FALSE; + String *js= args[0]->val_json(&tmp_js); + json_engine_t je, sav_je; + json_path_t p; const uchar *value; - const char *first_value= NULL; - uint n_arg, v_len, first_len; - uint array_counters[JSON_DEPTH_LIMIT]; + int not_first_value= 0; + uint n_arg, v_len; + int possible_multiple_values; if ((null_value= args[0]->null_value)) return 0; - str->set_charset(js->charset()); - str->length(0); - for (n_arg=1; n_arg < arg_count; n_arg++) { json_path_with_flags *c_path= paths + n_arg - 1; @@ -572,84 +732,84 @@ String *Item_func_json_extract::val_str(String *str) if (s_p && json_path_setup(&c_path->p,s_p->charset(),(const uchar *) s_p->ptr(), (const uchar *) s_p->ptr() + s_p->length())) + { + report_path_error(s_p, &c_path->p, n_arg); goto return_null; + } c_path->parsed= c_path->constant; } if (args[n_arg]->null_value) goto return_null; + } - json_scan_start(&je, js->charset(),(const uchar *) js->ptr(), - (const uchar *) js->ptr() + js->length()); + possible_multiple_values= arg_count > 2 || + (paths[0].p.types_used & (JSON_PATH_WILD | JSON_PATH_DOUBLE_WILD)); - c_path->cur_step= c_path->p.steps; + str->set_charset(js->charset()); + str->length(0); - while (!json_find_path(&je, &c_path->p, &c_path->cur_step, array_counters)) + if (possible_multiple_values && str->append("[", 1)) + goto error; + + json_get_path_start(&je, js->charset(),(const uchar *) js->ptr(), + (const uchar *) js->ptr() + js->length(), &p); + + while (json_get_path_next(&je, &p) == 0) + { + if (!path_exact(paths, arg_count-1, &p, je.value_type)) + continue; + + value= je.value_begin; + + if (json_value_scalar(&je)) + v_len= je.value_end - value; + else { - if (json_read_value(&je)) + if (possible_multiple_values) + sav_je= je; + if (json_skip_level(&je)) goto error; - - value= je.value_begin; - if (json_value_scalar(&je)) - v_len= je.value_end - value; - else - { - if (json_skip_level(&je)) - goto error; - v_len= je.s.c_str - value; - } - - if (!multiple_values_found) - { - if (first_value == NULL) - { - /* - Just remember the first value as we don't know yet - if we need to create an array out of it or not. - */ - first_value= (const char *) value; - first_len= v_len; - } - else - { - multiple_values_found= TRUE; /* We have to make an JSON array. */ - if (str->append("[", 1) || - str->append(first_value, first_len)) - goto error; /* Out of memory. */ - } - - } - if (multiple_values_found && - (str->append(", ", 2) || - str->append((const char *) value, v_len))) - goto error; /* Out of memory. */ - - if (json_scan_next(&je)) - break; - + v_len= je.s.c_str - value; + if (possible_multiple_values) + je= sav_je; } + + if ((not_first_value && str->append(", ", 2)) || + str->append((const char *) value, v_len)) + goto error; /* Out of memory. */ + + not_first_value= 1; + + if (!possible_multiple_values) + break; } if (je.s.error) goto error; - if (first_value == NULL) + if (!not_first_value) { /* Nothing was found. */ goto return_null; } - if (multiple_values_found ? - str->append("]") : - str->append(first_value, first_len)) + if (possible_multiple_values && str->append("]", 1)) goto error; /* Out of memory. */ - return str; + js= str; + json_scan_start(&je, js->charset(),(const uchar *) js->ptr(), + (const uchar *) js->ptr() + js->length()); + tmp_js.length(0); + tmp_js.set_charset(js->charset()); + if (json_nice(&je, &tmp_js, Item_func_json_format::LOOSE)) + goto error; + + return &tmp_js; error: report_json_error(js, &je, 0); return_null: - /* TODO: launch error messages. */ null_value= 1; return 0; } @@ -657,7 +817,7 @@ return_null: longlong Item_func_json_extract::val_int() { - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); json_engine_t je; uint n_arg; uint array_counters[JSON_DEPTH_LIMIT]; @@ -771,8 +931,10 @@ static int check_contains(json_engine_t *js, json_engine_t *value) DBUG_ASSERT(value->state == JST_KEY); k_start= value->s.c_str; - while (json_read_keyname_chr(value) == 0) + do + { k_end= value->s.c_str; + } while (json_read_keyname_chr(value) == 0); if (value->s.error || json_read_value(value)) return FALSE; @@ -796,12 +958,14 @@ static int check_contains(json_engine_t *js, json_engine_t *value) { while (json_scan_next(js) == 0 && js->state != JST_ARRAY_END) { - json_level_t c_level; + int c_level, v_scalar; DBUG_ASSERT(js->state == JST_VALUE); if (json_read_value(js)) return FALSE; - c_level= json_value_scalar(js) ? NULL : json_get_level(js); + if (!(v_scalar= json_value_scalar(js))) + c_level= json_get_level(js); + if (check_contains(js, value)) { if (json_skip_level(js)) @@ -809,7 +973,7 @@ static int check_contains(json_engine_t *js, json_engine_t *value) return TRUE; } if (value->s.error || js->s.error || - (c_level && json_skip_to_level(js, c_level))) + (!v_scalar && json_skip_to_level(js, c_level))) return FALSE; } return FALSE; @@ -876,7 +1040,7 @@ static int check_contains(json_engine_t *js, json_engine_t *value) longlong Item_func_json_contains::val_int() { - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); json_engine_t je, ve; int result; @@ -885,7 +1049,7 @@ longlong Item_func_json_contains::val_int() if (!a2_parsed) { - val= args[1]->val_str(&tmp_val); + val= args[1]->val_json(&tmp_val); a2_parsed= a2_constant; } @@ -955,6 +1119,8 @@ return_null: bool Item_func_json_contains_path::fix_fields(THD *thd, Item **ref) { return alloc_tmp_paths(thd, arg_count-2, &paths, &tmp_paths) || + (p_found= (bool *) alloc_root(thd->mem_root, + (arg_count-2)*sizeof(bool))) == NULL || Item_int_func::fix_fields(thd, ref); } @@ -1010,9 +1176,10 @@ static int parse_one_or_all(const Item_func *f, Item *ooa_arg, } +#ifdef DUMMY longlong Item_func_json_contains_path::val_int() { - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); json_engine_t je; uint n_arg; longlong result; @@ -1076,6 +1243,87 @@ return_null: null_value= 1; return 0; } +#endif /*DUMMY*/ + +longlong Item_func_json_contains_path::val_int() +{ + String *js= args[0]->val_json(&tmp_js); + json_engine_t je; + uint n_arg; + longlong result; + json_path_t p; + int n_found; + + if ((null_value= args[0]->null_value)) + return 0; + + if (parse_one_or_all(this, args[1], &ooa_parsed, ooa_constant, &mode_one)) + goto null_return;; + + for (n_arg=2; n_arg < arg_count; n_arg++) + { + json_path_with_flags *c_path= paths + n_arg - 2; + if (!c_path->parsed) + { + String *s_p= args[n_arg]->val_str(tmp_paths + (n_arg-2)); + if (s_p && + json_path_setup(&c_path->p,s_p->charset(),(const uchar *) s_p->ptr(), + (const uchar *) s_p->ptr() + s_p->length())) + { + report_path_error(s_p, &c_path->p, n_arg); + goto null_return; + } + c_path->parsed= c_path->constant; + } + if (args[n_arg]->null_value) + goto null_return; + } + + json_get_path_start(&je, js->charset(),(const uchar *) js->ptr(), + (const uchar *) js->ptr() + js->length(), &p); + + + if (!mode_one) + { + bzero(p_found, (arg_count-2) * sizeof(bool)); + n_found= arg_count - 2; + } + + result= 0; + while (json_get_path_next(&je, &p) == 0) + { + int n_path= arg_count - 2; + json_path_with_flags *c_path= paths; + for (; n_path > 0; n_path--, c_path++) + { + if (json_path_compare(&c_path->p, &p, je.value_type) >= 0) + { + if (mode_one) + { + result= 1; + break; + } + /* mode_all */ + if (p_found[n_path-1]) + continue; /* already found */ + if (--n_found == 0) + { + result= 1; + break; + } + p_found[n_path-1]= TRUE; + } + } + } + + if (je.s.error == 0) + return result; + + report_json_error(js, &je, 0); +null_return: + null_value= 1; + return 0; +} static int append_json_value(String *str, Item *item, String *tmp_val) @@ -1103,7 +1351,7 @@ static int append_json_value(String *str, Item *item, String *tmp_val) return str->append(t_f, t_f_len); } { - String *sv= item->val_str(tmp_val); + String *sv= item->val_json(tmp_val); if (item->null_value) goto append_null; if (item->is_json_type()) @@ -1213,7 +1461,7 @@ void Item_func_json_array_append::fix_length_and_dec() String *Item_func_json_array_append::val_str(String *str) { json_engine_t je; - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); uint n_arg, n_path, str_rest_len; const uchar *ar_end; @@ -1319,7 +1567,14 @@ String *Item_func_json_array_append::val_str(String *str) } } - return js; + json_scan_start(&je, js->charset(),(const uchar *) js->ptr(), + (const uchar *) js->ptr() + js->length()); + str->length(0); + str->set_charset(js->charset()); + if (json_nice(&je, str, Item_func_json_format::LOOSE)) + goto js_error; + + return str; js_error: report_json_error(js, &je, 0); @@ -1333,7 +1588,7 @@ return_null: String *Item_func_json_array_insert::val_str(String *str) { json_engine_t je; - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); uint n_arg, n_path; DBUG_ASSERT(fixed == 1); @@ -1453,7 +1708,14 @@ String *Item_func_json_array_insert::val_str(String *str) } } - return js; + json_scan_start(&je, js->charset(),(const uchar *) js->ptr(), + (const uchar *) js->ptr() + js->length()); + str->length(0); + str->set_charset(js->charset()); + if (json_nice(&je, str, Item_func_json_format::LOOSE)) + goto js_error; + + return str; js_error: report_json_error(js, &je, 0); @@ -1496,11 +1758,208 @@ err_return: } +static int do_merge(String *str, json_engine_t *je1, json_engine_t *je2) +{ + if (json_read_value(je1) || json_read_value(je2)) + return 1; + + if (je1->value_type == JSON_VALUE_OBJECT && + je2->value_type == JSON_VALUE_OBJECT) + { + json_engine_t sav_je1= *je1; + json_engine_t sav_je2= *je2; + + int first_key= 1; + json_string_t key_name; + + json_string_set_cs(&key_name, je1->s.cs); + + if (str->append("{", 1)) + return 3; + while (json_scan_next(je1) == 0 && + je1->state != JST_OBJ_END) + { + const uchar *key_start, *key_end; + /* Loop through the Json_1 keys and compare with the Json_2 keys. */ + DBUG_ASSERT(je1->state == JST_KEY); + key_start= je1->s.c_str; + do + { + key_end= je1->s.c_str; + } while (json_read_keyname_chr(je1) == 0); + + if (je1->s.error) + return 1; + + if (first_key) + first_key= 0; + else + { + if (str->append(", ", 2)) + return 3; + *je2= sav_je2; + } + + if (str->append("\"", 1) || + append_simple(str, key_start, key_end - key_start) || + str->append("\":", 2)) + return 3; + + while (json_scan_next(je2) == 0 && + je2->state != JST_OBJ_END) + { + int ires; + DBUG_ASSERT(je2->state == JST_KEY); + json_string_set_str(&key_name, key_start, key_end); + if (!json_key_matches(je2, &key_name)) + { + if (je2->s.error || json_skip_key(je2)) + return 2; + continue; + } + + /* Json_2 has same key as Json_1. Merge them. */ + if ((ires= do_merge(str, je1, je2))) + return ires; + goto merged_j1; + } + if (je2->s.error) + return 2; + + key_start= je1->s.c_str; + /* Just append the Json_1 key value. */ + if (json_skip_key(je1)) + return 1; + if (append_simple(str, key_start, je1->s.c_str - key_start)) + return 3; + +merged_j1: + continue; + } + + *je2= sav_je2; + /* + Now loop through the Json_2 keys. + Skip if there is same key in Json_1 + */ + while (json_scan_next(je2) == 0 && + je2->state != JST_OBJ_END) + { + const uchar *key_start, *key_end; + DBUG_ASSERT(je2->state == JST_KEY); + key_start= je2->s.c_str; + do + { + key_end= je2->s.c_str; + } while (json_read_keyname_chr(je2) == 0); + + if (je2->s.error) + return 1; + + *je1= sav_je1; + while (json_scan_next(je1) == 0 && + je1->state != JST_OBJ_END) + { + DBUG_ASSERT(je1->state == JST_KEY); + json_string_set_str(&key_name, key_start, key_end); + if (!json_key_matches(je1, &key_name)) + { + if (je1->s.error || json_skip_key(je1)) + return 2; + continue; + } + if (json_skip_key(je2) || + json_skip_level(je1)) + return 1; + goto continue_j2; + } + + if (je1->s.error) + return 2; + + if (first_key) + first_key= 0; + else if (str->append(", ", 2)) + return 3; + + if (json_skip_key(je2)) + return 1; + + if (str->append("\"", 1) || + append_simple(str, key_start, je2->s.c_str - key_start)) + return 3; + +continue_j2: + continue; + } + + if (str->append("}", 1)) + return 3; + } + else + { + const uchar *end1, *beg1, *end2, *beg2; + + beg1= je1->value_begin; + + /* Merge as a single array. */ + if (je1->value_type == JSON_VALUE_ARRAY) + { + if (json_skip_level(je1)) + return 1; + end1= je1->s.c_str - je1->sav_c_len; + } + else + { + if (str->append("[", 1)) + return 3; + if (je1->value_type == JSON_VALUE_OBJECT) + { + if (json_skip_level(je1)) + return 1; + end1= je1->s.c_str; + } + else + end1= je1->value_end; + } + + if (str->append((const char*) beg1, end1 - beg1), + str->append(", ", 2)) + return 3; + + if (json_value_scalar(je2)) + { + beg2= je2->value_begin; + end2= je2->value_end; + } + else + { + if (je2->value_type == JSON_VALUE_OBJECT) + beg2= je2->value_begin; + else + beg2= je2->s.c_str; + if (json_skip_level(je2)) + return 2; + end2= je2->s.c_str; + } + + if (str->append((const char*) beg2, end2 - beg2)) + return 3; + + if (je2->value_type != JSON_VALUE_ARRAY && + str->append("]", 1)) + return 3; + } + + return 0; +} + + String *Item_func_json_merge::val_str(String *str) { DBUG_ASSERT(fixed == 1); json_engine_t je1, je2; - String *js1= args[0]->val_str(&tmp_js1), *js2; + String *js1= args[0]->val_json(&tmp_js1), *js2; uint n_arg; if (args[0]->null_value) @@ -1508,7 +1967,10 @@ String *Item_func_json_merge::val_str(String *str) for (n_arg=1; n_arg < arg_count; n_arg++) { - js2= args[n_arg]->val_str(&tmp_js2); + str->set_charset(js1->charset()); + str->length(0); + + js2= args[n_arg]->val_json(&tmp_js2); if (args[n_arg]->null_value) goto null_return; @@ -1518,58 +1980,9 @@ String *Item_func_json_merge::val_str(String *str) json_scan_start(&je2, js2->charset(),(const uchar *) js2->ptr(), (const uchar *) js2->ptr() + js2->length()); - if (json_read_value(&je1) || json_read_value(&je2)) + if (do_merge(str, &je1, &je2)) goto error_return; - str->length(0); - if (je1.value_type == JSON_VALUE_OBJECT && - je2.value_type == JSON_VALUE_OBJECT) - { - /* Wrap as a single objects. */ - if (json_skip_level(&je1)) - goto error_return; - if (str->append(js1->ptr(), - ((const char *)je1.s.c_str - js1->ptr()) - je1.sav_c_len) || - str->append(", ", 2) || - str->append((const char *)je2.s.c_str, - js2->length() - ((const char *)je2.s.c_str - js2->ptr()))) - goto error_return; - } - else - { - const char *end1, *beg2; - - /* Merge as a single array. */ - if (je1.value_type == JSON_VALUE_ARRAY) - { - if (json_skip_level(&je1)) - goto error_return; - end1= (const char *) (je1.s.c_str - je1.sav_c_len); - } - else - { - if (str->append("[", 1)) - goto error_return; - end1= js1->end(); - } - - if (str->append(js1->ptr(), end1 - js1->ptr()), - str->append(", ", 2)) - goto error_return; - - if (je2.value_type == JSON_VALUE_ARRAY) - beg2= (const char *) je2.s.c_str; - else - beg2= js2->ptr(); - - if (str->append(beg2, js2->end() - beg2)) - goto error_return; - - if (je2.value_type != JSON_VALUE_ARRAY && - str->append("]", 1)) - goto error_return; - } - { /* Swap str and js1. */ if (str == &tmp_js1) @@ -1585,8 +1998,15 @@ String *Item_func_json_merge::val_str(String *str) } } + json_scan_start(&je1, js1->charset(),(const uchar *) js1->ptr(), + (const uchar *) js1->ptr() + js1->length()); + str->length(0); + str->set_charset(js1->charset()); + if (json_nice(&je1, str, Item_func_json_format::LOOSE)) + goto error_return; + null_value= 0; - return js1; + return str; error_return: if (je1.s.error) @@ -1608,7 +2028,7 @@ void Item_func_json_length::fix_length_and_dec() longlong Item_func_json_length::val_int() { - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); json_engine_t je; uint length= 0; uint array_counters[JSON_DEPTH_LIMIT]; @@ -1626,10 +2046,10 @@ longlong Item_func_json_length::val_int() { String *s_p= args[1]->val_str(&tmp_path); if (s_p && - json_path_setup(&path.p, s_p->charset(), (const uchar *) s_p->ptr(), - (const uchar *) s_p->ptr() + s_p->length())) + path_setup_nwc(&path.p, s_p->charset(), (const uchar *) s_p->ptr(), + (const uchar *) s_p->ptr() + s_p->length())) { - report_path_error(s_p, &path.p, 2); + report_path_error(s_p, &path.p, 1); goto null_return; } path.parsed= path.constant; @@ -1685,7 +2105,7 @@ null_return: longlong Item_func_json_depth::val_int() { - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); json_engine_t je; uint depth= 0, c_depth= 0; bool inc_depth= TRUE; @@ -1744,7 +2164,7 @@ void Item_func_json_type::fix_length_and_dec() String *Item_func_json_type::val_str(String *str) { - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); json_engine_t je; const char *type; @@ -1812,7 +2232,7 @@ void Item_func_json_insert::fix_length_and_dec() String *Item_func_json_insert::val_str(String *str) { json_engine_t je; - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); uint n_arg, n_path; json_string_t key_name; @@ -1855,6 +2275,9 @@ String *Item_func_json_insert::val_str(String *str) json_scan_start(&je, js->charset(),(const uchar *) js->ptr(), (const uchar *) js->ptr() + js->length()); + if (c_path->p.last_step < c_path->p.steps) + goto v_found; + c_path->cur_step= c_path->p.steps; if (c_path->p.last_step >= c_path->p.steps && @@ -1862,6 +2285,7 @@ String *Item_func_json_insert::val_str(String *str) { if (je.s.error) goto js_error; + continue; } if (json_read_value(&je)) @@ -1875,13 +2299,31 @@ String *Item_func_json_insert::val_str(String *str) if (je.value_type != JSON_VALUE_ARRAY) { const uchar *v_from= je.value_begin; - if (!mode_insert) - continue; + int do_array_autowrap; + + if (mode_insert) + { + if (mode_replace) + do_array_autowrap= lp->n_item > 0; + else + { + if (lp->n_item == 0) + continue; + do_array_autowrap= 1; + } + } + else + { + if (lp->n_item) + continue; + do_array_autowrap= 0; + } + str->length(0); /* Wrap the value as an array. */ if (append_simple(str, js->ptr(), (const char *) v_from - js->ptr()) || - str->append("[", 1)) + (do_array_autowrap && str->append("[", 1))) goto js_error; /* Out of memory. */ if (je.value_type == JSON_VALUE_OBJECT) @@ -1890,10 +2332,11 @@ String *Item_func_json_insert::val_str(String *str) goto js_error; } - if (append_simple(str, v_from, je.s.c_str - v_from) || - str->append(", ", 2) || + if ((do_array_autowrap && + (append_simple(str, v_from, je.s.c_str - v_from) || + str->append(", ", 2))) || append_json_value(str, args[n_arg+1], &tmp_val) || - str->append("]", 1) || + (do_array_autowrap && str->append("]", 1)) || append_simple(str, je.s.c_str, js->end()-(const char *) je.s.c_str)) goto js_error; /* Out of memory. */ @@ -1925,7 +2368,7 @@ String *Item_func_json_insert::val_str(String *str) v_to= (const char *) (je.s.c_str - je.sav_c_len); str->length(0); if (append_simple(str, js->ptr(), v_to - js->ptr()) || - str->append(", ", 2) || + (n_item > 0 && str->append(", ", 2)) || append_json_value(str, args[n_arg+1], &tmp_val) || append_simple(str, v_to, js->end() - v_to)) goto js_error; /* Out of memory. */ @@ -2006,7 +2449,14 @@ continue_point: } } - return js; + json_scan_start(&je, js->charset(),(const uchar *) js->ptr(), + (const uchar *) js->ptr() + js->length()); + str->length(0); + str->set_charset(js->charset()); + if (json_nice(&je, str, Item_func_json_format::LOOSE)) + goto js_error; + + return str; js_error: report_json_error(js, &je, 0); @@ -2028,7 +2478,7 @@ void Item_func_json_remove::fix_length_and_dec() String *Item_func_json_remove::val_str(String *str) { json_engine_t je; - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); uint n_arg, n_path; json_string_t key_name; @@ -2040,7 +2490,7 @@ String *Item_func_json_remove::val_str(String *str) str->set_charset(js->charset()); json_string_set_cs(&key_name, js->charset()); - for (n_arg=1, n_path=0; n_arg < arg_count; n_arg+=2, n_path++) + for (n_arg=1, n_path=0; n_arg < arg_count; n_arg++, n_path++) { uint array_counters[JSON_DEPTH_LIMIT]; json_path_with_flags *c_path= paths + n_path; @@ -2064,7 +2514,11 @@ String *Item_func_json_remove::val_str(String *str) /* We search to the last step. */ c_path->p.last_step--; if (c_path->p.last_step < c_path->p.steps) + { + c_path->p.s.error= TRIVIAL_PATH_NOT_ALLOWED; + report_path_error(s_p, &c_path->p, n_arg); goto null_return; + } } c_path->parsed= c_path->constant; } @@ -2178,7 +2632,14 @@ v_found: } } - return js; + json_scan_start(&je, js->charset(),(const uchar *) js->ptr(), + (const uchar *) js->ptr() + js->length()); + str->length(0); + str->set_charset(js->charset()); + if (json_nice(&je, str, Item_func_json_format::LOOSE)) + goto js_error; + + return str; js_error: report_json_error(js, &je, 0); @@ -2200,7 +2661,7 @@ void Item_func_json_keys::fix_length_and_dec() String *Item_func_json_keys::val_str(String *str) { json_engine_t je; - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); uint n_keys= 0; uint array_counters[JSON_DEPTH_LIMIT]; @@ -2258,10 +2719,10 @@ skip_search: { case JST_KEY: key_start= je.s.c_str; - while (json_read_keyname_chr(&je) == 0) + do { key_end= je.s.c_str; - } + } while (json_read_keyname_chr(&je) == 0); if (je.s.error || (n_keys > 0 && str->append(", ", 2)) || str->append("\"", 1) || @@ -2300,14 +2761,17 @@ bool Item_func_json_search::fix_fields(THD *thd, Item **ref) return TRUE; if (arg_count < 4) + { + escape= '\\'; return FALSE; + } return fix_escape_item(thd, args[3], &tmp_js, true, args[0]->collation.collation, &escape); } -static const uint SQR_MAX_BLOB_WIDTH= sqrt(MAX_BLOB_WIDTH); +static const uint SQR_MAX_BLOB_WIDTH= (uint) sqrt(MAX_BLOB_WIDTH); void Item_func_json_search::fix_length_and_dec() { @@ -2371,63 +2835,9 @@ static int append_json_path(String *str, const json_path_t *p) } -static int json_path_compare(const json_path_t *a, const json_path_t *b) -{ - const json_path_step_t *sa= a->steps + 1; - const json_path_step_t *sb= b->steps + 1; - - if (a->last_step - sa > b->last_step - sb) - return -2; - - while (sa <= a->last_step) - { - if (sb > b->last_step) - return -2; - - if (!((sa->type & sb->type) & JSON_PATH_KEY_OR_ARRAY)) - goto step_failed; - - if (sa->type & JSON_PATH_ARRAY) - { - if (!(sa->type & JSON_PATH_WILD) && sa->n_item != sb->n_item) - goto step_failed; - } - else /* JSON_PATH_KEY */ - { - if (!(sa->type & JSON_PATH_WILD) && - (sa->key_end - sa->key != sb->key_end - sb->key || - memcmp(sa->key, sb->key, sa->key_end - sa->key) != 0)) - goto step_failed; - } - sb++; - sa++; - continue; - -step_failed: - if (!(sa->type & JSON_PATH_DOUBLE_WILD)) - return -1; - sb++; - } - - return sb <= b->last_step; -} - - -static bool path_ok(const json_path_with_flags *paths_list, int n_paths, - const json_path_t *p) -{ - for (; n_paths > 0; n_paths--, paths_list++) - { - if (json_path_compare(&paths_list->p, p) >= 0) - return TRUE; - } - return FALSE; -} - - String *Item_func_json_search::val_str(String *str) { - String *js= args[0]->val_str(&tmp_js); + String *js= args[0]->val_json(&tmp_js); String *s_str= args[2]->val_str(&tmp_js); json_engine_t je; json_path_t p, sav_path; @@ -2462,75 +2872,38 @@ String *Item_func_json_search::val_str(String *str) goto null_return; } - json_scan_start(&je, js->charset(),(const uchar *) js->ptr(), - (const uchar *) js->ptr() + js->length()); + json_get_path_start(&je, js->charset(),(const uchar *) js->ptr(), + (const uchar *) js->ptr() + js->length(), &p); - p.last_step= p.steps; - p.steps[0].type= JSON_PATH_ARRAY_WILD; - p.steps[0].n_item= 0; - - do + while (json_get_path_next(&je, &p) == 0) { - switch (je.state) + if (json_value_scalar(&je)) { - case JST_KEY: - p.last_step->key= je.s.c_str; - while (json_read_keyname_chr(&je) == 0) - p.last_step->key_end= je.s.c_str; - if (je.s.error) - goto js_error; - /* Now we have je.state == JST_VALUE, so let's handle it. */ - - case JST_VALUE: - if (json_read_value(&je)) - goto js_error; - if (json_value_scalar(&je)) + if ((arg_count < 5 || path_ok(paths, arg_count - 4, &p, je.value_type)) && + compare_json_value_wild(&je, s_str) != 0) { - if ((arg_count < 5 || path_ok(paths, n_arg - 4, &p)) && - compare_json_value_wild(&je, s_str) != 0) + ++n_path_found; + if (n_path_found == 1) { - ++n_path_found; - if (n_path_found == 1) - { - sav_path= p; - sav_path.last_step= sav_path.steps + (p.last_step - p.steps); - } - else - { - if (n_path_found == 2) - { - if (str->append("[", 1) || - append_json_path(str, &sav_path)) - goto js_error; - } - if (str->append(", ", 2) || append_json_path(str, &p)) - goto js_error; - } - - if (mode_one) - goto end; + sav_path= p; + sav_path.last_step= sav_path.steps + (p.last_step - p.steps); } - if (p.last_step->type & JSON_PATH_ARRAY) - p.last_step->n_item++; - + else + { + if (n_path_found == 2) + { + if (str->append("[", 1) || + append_json_path(str, &sav_path)) + goto js_error; + } + if (str->append(", ", 2) || append_json_path(str, &p)) + goto js_error; + } + if (mode_one) + goto end; } - else - { - p.last_step++; - p.last_step->type= (enum json_path_step_types) je.value_type; - p.last_step->n_item= 0; - } - break; - case JST_OBJ_END: - case JST_ARRAY_END: - p.last_step--; - if (p.last_step->type & JSON_PATH_ARRAY) - p.last_step->n_item++; - break; - default: - break; } - } while (json_scan_next(&je) == 0); + } if (je.s.error) goto js_error; @@ -2556,23 +2929,84 @@ end: js_error: report_json_error(js, &je, 0); null_return: - /* TODO: launch error messages. */ null_value= 1; return 0; } -void Item_json_typecast::fix_length_and_dec() +const char *Item_func_json_format::func_name() const { - maybe_null= args[0]->maybe_null; + switch (fmt) + { + case COMPACT: + return "json_compact"; + case LOOSE: + return "json_loose"; + case DETAILED: + return "json_detailed"; + default: + DBUG_ASSERT(0); + }; + + return ""; +} + + +void Item_func_json_format::fix_length_and_dec() +{ + decimals= 0; max_length= args[0]->max_length; } -String *Item_json_typecast::val_str(String *str) +String *Item_func_json_format::val_str(String *str) { - String *vs= args[0]->val_str(str); - null_value= args[0]->null_value; - return vs; + String *js= args[0]->val_json(&tmp_js); + json_engine_t je; + int tab_size= 4; + + if ((null_value= args[0]->null_value)) + return 0; + + if (fmt == DETAILED) + { + if (arg_count > 1) + { + tab_size= args[1]->val_int(); + if (args[1]->null_value) + { + null_value= 1; + return 0; + } + } + if (tab_size < 0) + tab_size= 0; + else if (tab_size > TAB_SIZE_LIMIT) + tab_size= TAB_SIZE_LIMIT; + } + + json_scan_start(&je, js->charset(), (const uchar *) js->ptr(), + (const uchar *) js->ptr()+js->length()); + + str->length(0); + str->set_charset(js->charset()); + if (json_nice(&je, str, fmt, tab_size)) + { + null_value= 1; + report_json_error(js, &je, 0); + return 0; + } + + return str; } + +String *Item_func_json_format::val_json(String *str) +{ + String *js= args[0]->val_json(&tmp_js); + if ((null_value= args[0]->null_value)) + return 0; + return js; +} + + diff --git a/sql/item_jsonfunc.h b/sql/item_jsonfunc.h index 07741536f55..535f1bf73a5 100644 --- a/sql/item_jsonfunc.h +++ b/sql/item_jsonfunc.h @@ -197,6 +197,7 @@ protected: String *tmp_paths; bool mode_one; bool ooa_constant, ooa_parsed; + bool *p_found; public: Item_func_json_contains_path(THD *thd, List &list): @@ -413,16 +414,32 @@ public: }; -class Item_json_typecast: public Item_str_func +class Item_func_json_format: public Item_str_func { public: - Item_json_typecast(THD *thd, Item *a): Item_str_func(thd, a) {} - const char *func_name() const { return "cast_as_json"; } - bool is_json_type() { return true; } + enum formats + { + NONE, + COMPACT, + LOOSE, + DETAILED + }; +protected: + formats fmt; + String tmp_js; +public: + Item_func_json_format(THD *thd, Item *js, formats format): + Item_str_func(thd, js), fmt(format) {} + Item_func_json_format(THD *thd, List &list): + Item_str_func(thd, list), fmt(DETAILED) {} + + const char *func_name() const; void fix_length_and_dec(); String *val_str(String *str); + String *val_json(String *str); + bool is_json_type() { return true; } Item *get_copy(THD *thd, MEM_ROOT *mem_root) - { return get_item_copy(thd, mem_root, this); } + { return get_item_copy(thd, mem_root, this); } }; diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 9740dc9dae1..21f8ccb4348 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -5091,9 +5091,10 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) case DYN_COL_UINT: if (signed_value || val.x.ulong_value <= LONGLONG_MAX) { - bool neg= val.x.ulong_value > LONGLONG_MAX; - if (int_to_datetime_with_warn(neg, neg ? -val.x.ulong_value : - val.x.ulong_value, + longlong llval = (longlong)val.x.ulong_value; + bool neg = llval < 0; + if (int_to_datetime_with_warn(neg, (ulonglong)(neg ? -llval : + llval), ltime, fuzzy_date, 0 /* TODO */)) goto null; return 0; diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 89c663b5f16..94bc71ca889 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2002, 2015, Oracle and/or its affiliates. - Copyright (c) 2010, 2015, MariaDB +/* Copyright (c) 2002, 2016, Oracle and/or its affiliates. + Copyright (c) 2010, 2016, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -3520,9 +3520,14 @@ bool subselect_union_engine::is_executed() const bool subselect_union_engine::no_rows() { /* Check if we got any rows when reading UNION result from temp. table: */ - return MY_TEST(!(unit->fake_select_lex ? - unit->fake_select_lex->join->send_records : - ((select_union_direct *)(unit->get_union_result())) + if (unit->fake_select_lex) + { + JOIN *join= unit->fake_select_lex->join; + if (join) + return MY_TEST(!join->send_records); + return false; + } + return MY_TEST(!(((select_union_direct *)(unit->get_union_result())) ->send_records)); } @@ -4897,9 +4902,9 @@ bool subselect_hash_sj_engine::init(List *tmp_columns, uint subquery_id) result= result_sink; /* - If the subquery has blobs, or the total key lenght is bigger than + If the subquery has blobs, or the total key length is bigger than some length, or the total number of key parts is more than the - allowed maximum (currently MAX_REF_PARTS == 16), then the created + allowed maximum (currently MAX_REF_PARTS == 32), then the created index cannot be used for lookups and we can't use hash semi join. If this is the case, delete the temporary table since it will not be used, and tell the caller we failed to initialize the diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 823dbc6c281..805e8958246 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -399,7 +399,7 @@ public: bool val_bool(); bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec(); - virtual void print(String *str, enum_query_type query_type); + void print(String *str, enum_query_type query_type); bool select_transformer(JOIN *join); void top_level_item() { abort_on_null=1; } inline bool is_top_level_item() { return abort_on_null; } @@ -616,7 +616,8 @@ public: void update_null_value () { (void) val_bool(); } bool val_bool(); bool test_limit(st_select_lex_unit *unit); - virtual void print(String *str, enum_query_type query_type); + void print(String *str, enum_query_type query_type); + enum precedence precedence() const { return CMP_PRECEDENCE; } bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec(); void fix_after_pullout(st_select_lex *new_parent, Item **ref); @@ -740,7 +741,7 @@ public: subs_type substype() { return all?ALL_SUBS:ANY_SUBS; } bool select_transformer(JOIN *join); void create_comp_func(bool invert) { func= func_creator(invert); } - virtual void print(String *str, enum_query_type query_type); + void print(String *str, enum_query_type query_type); bool is_maxmin_applicable(JOIN *join); bool transform_into_max_min(JOIN *join); void no_rows_in_result(); @@ -849,7 +850,7 @@ public: uint8 uncacheable(); void exclude(); table_map upper_select_const_tables(); - virtual void print (String *str, enum_query_type query_type); + void print (String *str, enum_query_type query_type); bool change_result(Item_subselect *si, select_result_interceptor *result, bool temp); @@ -883,7 +884,7 @@ public: uint8 uncacheable(); void exclude(); table_map upper_select_const_tables(); - virtual void print (String *str, enum_query_type query_type); + void print (String *str, enum_query_type query_type); bool change_result(Item_subselect *si, select_result_interceptor *result, bool temp= FALSE); @@ -940,7 +941,7 @@ public: uint8 uncacheable() { return UNCACHEABLE_DEPENDENT_INJECTED; } void exclude(); table_map upper_select_const_tables() { return 0; } - virtual void print (String *str, enum_query_type query_type); + void print (String *str, enum_query_type query_type); bool change_result(Item_subselect *si, select_result_interceptor *result, bool temp= FALSE); @@ -998,7 +999,7 @@ public: having(having_arg) {} int exec(); - virtual void print (String *str, enum_query_type query_type); + void print (String *str, enum_query_type query_type); virtual enum_engine_type engine_type() { return INDEXSUBQUERY_ENGINE; } }; @@ -1073,11 +1074,8 @@ public: void cleanup(); int prepare(THD *); int exec(); - virtual void print(String *str, enum_query_type query_type); - uint cols() - { - return materialize_engine->cols(); - } + void print(String *str, enum_query_type query_type); + uint cols() { return materialize_engine->cols(); } uint8 uncacheable() { return materialize_engine->uncacheable(); } table_map upper_select_const_tables() { return 0; } bool no_rows() { return !tmp_table->file->stats.records; } diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 51a6c2bd3eb..3ac861d61ff 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -151,6 +151,8 @@ bool Item_sum::check_sum_func(THD *thd, Item **ref) curr_sel->name_visibility_map); bool invalid= FALSE; DBUG_ASSERT(curr_sel->name_visibility_map); // should be set already + if (window_func_sum_expr_flag) + return false; /* The value of max_arg_level is updated if an argument of the set function contains a column reference resolved against a subquery whose level is @@ -460,6 +462,7 @@ void Item_sum::mark_as_sum_func() const_item_cache= false; with_sum_func= 1; with_field= 0; + window_func_sum_expr_flag= false; } @@ -468,6 +471,13 @@ void Item_sum::print(String *str, enum_query_type query_type) /* orig_args is not filled with valid values until fix_fields() */ Item **pargs= fixed ? orig_args : args; str->append(func_name()); + /* + TODO: + The fact that func_name() may return a name with an extra '(' + is really annoying. This shoud be fixed. + */ + if (!is_aggr_sum_func()) + str->append('('); for (uint i=0 ; i < arg_count ; i++) { if (i) @@ -591,7 +601,9 @@ Item *Item_sum::result_item(THD *thd, Field *field) bool Item_sum::check_vcol_func_processor(void *arg) { - return mark_unsupported_function(func_name(), ")", arg, VCOL_IMPOSSIBLE); + return mark_unsupported_function(func_name(), + is_aggr_sum_func() ? ")" : "()", + arg, VCOL_IMPOSSIBLE); } @@ -1149,7 +1161,8 @@ Item_sum_hybrid::fix_fields(THD *thd, Item **ref) case TIME_RESULT: DBUG_ASSERT(0); }; - setup_hybrid(thd, args[0], NULL); + if (!is_window_func_sum_expr()) + setup_hybrid(thd, args[0], NULL); /* MIN/MAX can return NULL for empty set indepedent of the used column */ maybe_null= 1; result_field=0; @@ -3106,7 +3119,7 @@ int dump_leaf_key(void* key_arg, element_count count __attribute__((unused)), { Item_func_group_concat *item= (Item_func_group_concat *) item_arg; TABLE *table= item->table; - uint max_length= table->in_use->variables.group_concat_max_len; + uint max_length= (uint)table->in_use->variables.group_concat_max_len; String tmp((char *)table->record[1], table->s->reclength, default_charset_info); String tmp2; @@ -3466,7 +3479,7 @@ Item_func_group_concat::fix_fields(THD *thd, Item **ref) args[i]->fix_fields(thd, args + i)) || args[i]->check_cols(1)) return TRUE; - with_subselect|= args[i]->with_subselect; + with_subselect|= args[i]->with_subselect; } /* skip charset aggregation for order columns */ diff --git a/sql/item_sum.h b/sql/item_sum.h index 84049814ef9..57375b29114 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -340,6 +340,9 @@ private: */ bool with_distinct; + /* TRUE if this is aggregate function of a window function */ + bool window_func_sum_expr_flag; + public: bool has_force_copy_fields() const { return force_copy_fields; } @@ -406,10 +409,31 @@ public: Item_sum(THD *thd, Item_sum *item); enum Type type() const { return SUM_FUNC_ITEM; } virtual enum Sumfunctype sum_func () const=0; + bool is_aggr_sum_func() + { + switch (sum_func()) { + case COUNT_FUNC: + case COUNT_DISTINCT_FUNC: + case SUM_FUNC: + case SUM_DISTINCT_FUNC: + case AVG_FUNC: + case AVG_DISTINCT_FUNC: + case MIN_FUNC: + case MAX_FUNC: + case STD_FUNC: + case VARIANCE_FUNC: + case SUM_BIT_FUNC: + case UDF_SUM_FUNC: + case GROUP_CONCAT_FUNC: + return true; + default: + return false; + } + } /** Resets the aggregate value to its default and aggregates the current value of its attribute(s). - */ + */ inline bool reset_and_add() { aggregator_clear(); @@ -551,6 +575,9 @@ public: virtual void cleanup(); bool check_vcol_func_processor(void *arg); virtual void setup_window_func(THD *thd, Window_spec *window_spec) {} + void mark_as_window_func_sum_expr() { window_func_sum_expr_flag= true; } + bool is_window_func_sum_expr() { return window_func_sum_expr_flag; } + virtual void setup_caches(THD *thd) {}; }; @@ -1028,6 +1055,7 @@ protected: void no_rows_in_result(); void restore_to_before_no_rows_in_result(); Field *create_tmp_field(bool group, TABLE *table); + void setup_caches(THD *thd) { setup_hybrid(thd, arguments()[0], NULL); } }; diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 27ce83f3f2b..0a564780ac2 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -426,7 +426,7 @@ static bool extract_date_time(DATE_TIME_FORMAT *format, { if (!my_isspace(&my_charset_latin1,*val)) { - make_truncated_value_warning(current_thd, + make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, val_begin, length, cached_timestamp_type, NullS); @@ -711,7 +711,7 @@ static bool get_interval_info(const char *str,uint length,CHARSET_INFO *cs, { longlong value; const char *start= str; - for (value=0; str != end && my_isdigit(cs, *str) ; str++) + for (value= 0; str != end && my_isdigit(cs, *str); str++) value= value*10 + *str - '0'; msec_length= 6 - (str - start); values[i]= value; diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc index a13967eaaad..59a22c63ed5 100644 --- a/sql/item_windowfunc.cc +++ b/sql/item_windowfunc.cc @@ -150,6 +150,7 @@ void Item_window_func::split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array, Item **p_item= &window_func()->arguments()[i]; (*p_item)->split_sum_func2(thd, ref_pointer_array, fields, p_item, flags); } + window_func()->setup_caches(thd); } @@ -220,18 +221,6 @@ void Item_sum_percent_rank::setup_window_func(THD *thd, Window_spec *window_spec clear(); } -bool Item_sum_first_value::add() -{ - if (value_added) - return false; - - /* TODO(cvicentiu) This is done like this due to how Item_sum_hybrid works. - For this usecase we can actually get rid of arg_cache. arg_cache is just - for running a comparison function. */ - value_added= true; - Item_sum_hybrid_simple::add(); - return false; -} bool Item_sum_hybrid_simple::fix_fields(THD *thd, Item **ref) { diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h index 15e5c9a7c5b..b4953c8a6ac 100644 --- a/sql/item_windowfunc.h +++ b/sql/item_windowfunc.h @@ -127,7 +127,7 @@ public: } const char*func_name() const { - return "row_number("; + return "row_number"; } Item *get_copy(THD *thd, MEM_ROOT *mem_root) @@ -331,16 +331,8 @@ class Item_sum_first_value : public Item_sum_hybrid_simple { public: Item_sum_first_value(THD* thd, Item* arg_expr) : - Item_sum_hybrid_simple(thd, arg_expr), - value_added(false) {} + Item_sum_hybrid_simple(thd, arg_expr) {} - bool add(); - - void clear() - { - value_added= false; - Item_sum_hybrid_simple::clear(); - } enum Sumfunctype sum_func () const { @@ -354,9 +346,6 @@ class Item_sum_first_value : public Item_sum_hybrid_simple Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return get_item_copy(thd, mem_root, this); } - - private: - bool value_added; }; /* diff --git a/sql/key.cc b/sql/key.cc index 77660c0fc8c..0c931184da7 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -465,19 +465,8 @@ void key_unpack(String *to, TABLE *table, KEY *key) bool is_key_used(TABLE *table, uint idx, const MY_BITMAP *fields) { - bitmap_clear_all(&table->tmp_set); - table->mark_columns_used_by_index_no_reset(idx, &table->tmp_set); - if (bitmap_is_overlapping(&table->tmp_set, fields)) - return 1; - - /* - If table handler has primary key as part of the index, check that primary - key is not updated - */ - if (idx != table->s->primary_key && table->s->primary_key < MAX_KEY && - (table->file->ha_table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX)) - return is_key_used(table, table->s->primary_key, fields); - return 0; + table->mark_columns_used_by_index(idx, &table->tmp_set); + return bitmap_is_overlapping(&table->tmp_set, fields); } diff --git a/sql/lex.h b/sql/lex.h index c40aa8f546d..baeae088234 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -517,8 +517,8 @@ static SYMBOL symbols[] = { { "ROLLUP", SYM(ROLLUP_SYM)}, { "ROUTINE", SYM(ROUTINE_SYM)}, { "ROW", SYM(ROW_SYM)}, - { "ROW_COUNT", SYM(ROW_COUNT_SYM)}, { "ROWS", SYM(ROWS_SYM)}, + { "ROW_COUNT", SYM(ROW_COUNT_SYM)}, { "ROW_FORMAT", SYM(ROW_FORMAT_SYM)}, { "RTREE", SYM(RTREE_SYM)}, { "SAVEPOINT", SYM(SAVEPOINT_SYM)}, diff --git a/sql/log.cc b/sql/log.cc index 57984bd03f4..7ad9790bb13 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB + Copyright (c) 2009, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -195,7 +195,7 @@ public: virtual bool handle_condition(THD *thd, uint sql_errno, const char* sql_state, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl); const char *message() const { return m_message; } @@ -205,7 +205,7 @@ bool Silence_log_table_errors::handle_condition(THD *, uint, const char*, - Sql_condition::enum_warning_level, + Sql_condition::enum_warning_level*, const char* msg, Sql_condition ** cond_hdl) { @@ -646,7 +646,7 @@ void Log_to_csv_event_handler::cleanup() bool Log_to_csv_event_handler:: log_general(THD *thd, my_hrtime_t event_time, const char *user_host, - uint user_host_len, int thread_id_arg, + uint user_host_len, my_thread_id thread_id_arg, const char *command_type, uint command_type_len, const char *sql_text, uint sql_text_len, CHARSET_INFO *client_cs) @@ -1056,7 +1056,7 @@ bool Log_to_file_event_handler:: bool Log_to_file_event_handler:: log_general(THD *thd, my_hrtime_t event_time, const char *user_host, - uint user_host_len, int thread_id_arg, + uint user_host_len, my_thread_id thread_id_arg, const char *command_type, uint command_type_len, const char *sql_text, uint sql_text_len, CHARSET_INFO *client_cs) @@ -2850,12 +2850,11 @@ void MYSQL_QUERY_LOG::reopen_file() */ bool MYSQL_QUERY_LOG::write(time_t event_time, const char *user_host, - uint user_host_len, int thread_id_arg, + uint user_host_len, my_thread_id thread_id_arg, const char *command_type, uint command_type_len, const char *sql_text, uint sql_text_len) { char buff[32]; - uint length= 0; char local_time_buff[MAX_TIME_SIZE]; struct tm start; uint time_buff_len= 0; @@ -2889,7 +2888,7 @@ bool MYSQL_QUERY_LOG::write(time_t event_time, const char *user_host, goto err; /* command_type, thread_id */ - length= my_snprintf(buff, 32, "%5ld ", (long) thread_id_arg); + size_t length= my_snprintf(buff, 32, "%5llu ", thread_id_arg); if (my_b_write(&log_file, (uchar*) buff, length)) goto err; @@ -2973,7 +2972,7 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time, int tmp_errno= 0; char buff[80], *end; char query_time_buff[22+7], lock_time_buff[22+7]; - uint buff_len; + size_t buff_len; end= buff; if (!(specialflag & SPECIAL_SHORT_LOG_FORMAT)) @@ -10244,8 +10243,8 @@ IO_CACHE * get_trans_log(THD * thd) if (cache_mngr) return cache_mngr->get_binlog_cache_log(true); - WSREP_DEBUG("binlog cache not initialized, conn: %lld", - (longlong) thd->thread_id); + WSREP_DEBUG("binlog cache not initialized, conn: %llu", + thd->thread_id); return NULL; } @@ -10283,8 +10282,8 @@ void thd_binlog_trx_reset(THD * thd) void thd_binlog_rollback_stmt(THD * thd) { - WSREP_DEBUG("thd_binlog_rollback_stmt connection: %lld", - (longlong) thd->thread_id); + WSREP_DEBUG("thd_binlog_rollback_stmt connection: %llu", + thd->thread_id); binlog_cache_mngr *const cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); if (cache_mngr) diff --git a/sql/log.h b/sql/log.h index 8ddf8641cfa..f1a025edfb9 100644 --- a/sql/log.h +++ b/sql/log.h @@ -1,5 +1,5 @@ /* Copyright (c) 2005, 2016, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, Monty Program Ab + Copyright (c) 2009, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -287,9 +287,9 @@ typedef struct st_log_info #define MAX_LOG_HANDLERS_NUM 3 /* log event handler flags */ -#define LOG_NONE 1 -#define LOG_FILE 2 -#define LOG_TABLE 4 +#define LOG_NONE 1U +#define LOG_FILE 2U +#define LOG_TABLE 4U class Log_event; class Rows_log_event; @@ -355,7 +355,7 @@ public: MYSQL_QUERY_LOG() : last_time(0) {} void reopen_file(); bool write(time_t event_time, const char *user_host, - uint user_host_len, int thread_id, + uint user_host_len, my_thread_id thread_id, const char *command_type, uint command_type_len, const char *sql_text, uint sql_text_len); bool write(THD *thd, time_t current_time, @@ -907,7 +907,7 @@ public: virtual bool log_error(enum loglevel level, const char *format, va_list args)= 0; virtual bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, - uint user_host_len, int thread_id, + uint user_host_len, my_thread_id thread_id, const char *command_type, uint command_type_len, const char *sql_text, uint sql_text_len, CHARSET_INFO *client_cs)= 0; @@ -936,7 +936,7 @@ public: virtual bool log_error(enum loglevel level, const char *format, va_list args); virtual bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, - uint user_host_len, int thread_id, + uint user_host_len, my_thread_id thread_id, const char *command_type, uint command_type_len, const char *sql_text, uint sql_text_len, CHARSET_INFO *client_cs); @@ -968,7 +968,7 @@ public: virtual bool log_error(enum loglevel level, const char *format, va_list args); virtual bool log_general(THD *thd, my_hrtime_t event_time, const char *user_host, - uint user_host_len, int thread_id, + uint user_host_len, my_thread_id thread_id, const char *command_type, uint command_type_len, const char *sql_text, uint sql_text_len, CHARSET_INFO *client_cs); diff --git a/sql/log_event.cc b/sql/log_event.cc index 85dce217743..69d0f52d211 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -300,17 +300,34 @@ public: constructor, but it would be possible to create a subclass holding the IO_CACHE itself. */ - Write_on_release_cache(IO_CACHE *cache, FILE *file, flag_set flags = 0) - : m_cache(cache), m_file(file), m_flags(flags) + Write_on_release_cache(IO_CACHE *cache, FILE *file, flag_set flags = 0, Log_event *ev = NULL) + : m_cache(cache), m_file(file), m_flags(flags), m_ev(ev) { reinit_io_cache(m_cache, WRITE_CACHE, 0L, FALSE, TRUE); } ~Write_on_release_cache() { +#ifdef MYSQL_CLIENT + if(m_ev == NULL) + { + copy_event_cache_to_file_and_reinit(m_cache, m_file); + if (m_flags & FLUSH_F) + fflush(m_file); + } + else // if m_ev<>NULL, then storing the output in output_buf + { + LEX_STRING tmp_str; + if (copy_event_cache_to_string_and_reinit(m_cache, &tmp_str)) + exit(1); + m_ev->output_buf.append(tmp_str.str, tmp_str.length); + my_free(tmp_str.str); + } +#else /* MySQL_SERVER */ copy_event_cache_to_file_and_reinit(m_cache, m_file); if (m_flags & FLUSH_F) fflush(m_file); +#endif } /* @@ -340,6 +357,7 @@ private: IO_CACHE *m_cache; FILE *m_file; flag_set m_flags; + Log_event *m_ev; // Used for Flashback }; /* @@ -1794,7 +1812,7 @@ int Log_event::read_log_event(IO_CACHE* file, String* packet, if (fdle->crypto_data.scheme) { uchar iv[BINLOG_IV_LENGTH]; - fdle->crypto_data.set_iv(iv, my_b_tell(file) - data_len); + fdle->crypto_data.set_iv(iv, (uint32) (my_b_tell(file) - data_len)); char *newpkt= (char*)my_malloc(data_len + ev_offset + 1, MYF(MY_WME)); if (!newpkt) @@ -2760,7 +2778,7 @@ log_event_print_value(IO_CACHE *file, const uchar *ptr, d= (ulong) (i64 / 1000000); t= (ulong) (i64 % 1000000); - my_b_printf(file, "%04d-%02d-%02d %02d:%02d:%02d", + my_b_printf(file, "'%04d-%02d-%02d %02d:%02d:%02d'", (int) (d / 10000), (int) (d % 10000) / 100, (int) (d % 100), (int) (t / 10000), (int) (t % 10000) / 100, (int) t % 100); return 8; @@ -2876,8 +2894,8 @@ log_event_print_value(IO_CACHE *file, const uchar *ptr, case 2: { strmake(typestr, "ENUM(2 bytes)", typestr_length); - if (!ptr) - goto return_null; + if (!ptr) + goto return_null; int32 i32= uint2korr(ptr); my_b_printf(file, "%d", i32); @@ -2994,22 +3012,30 @@ size_t Rows_log_event::print_verbose_one_row(IO_CACHE *file, table_def *td, PRINT_EVENT_INFO *print_event_info, MY_BITMAP *cols_bitmap, - const uchar *value, const uchar *prefix) + const uchar *value, const uchar *prefix, + const my_bool no_fill_output) { const uchar *value0= value; const uchar *null_bits= value; uint null_bit_index= 0; char typestr[64]= ""; - + +#ifdef WHEN_FLASHBACK_REVIEW_READY + /* Storing the review SQL */ + IO_CACHE *review_sql= &print_event_info->review_sql_cache; + LEX_STRING review_str; +#endif + /* Skip metadata bytes which gives the information about nullabity of master columns. Master writes one bit for each affected column. */ value+= (bitmap_bits_set(cols_bitmap) + 7) / 8; - - my_b_printf(file, "%s", prefix); - + + if (!no_fill_output) + my_b_printf(file, "%s", prefix); + for (size_t i= 0; i < td->size(); i ++) { size_t size; @@ -3018,47 +3044,226 @@ Rows_log_event::print_verbose_one_row(IO_CACHE *file, table_def *td, if (bitmap_is_set(cols_bitmap, i) == 0) continue; - - my_b_printf(file, "### @%d=", static_cast(i + 1)); + + if (!no_fill_output) + my_b_printf(file, "### @%d=", static_cast(i + 1)); + if (!is_null) { size_t fsize= td->calc_field_size((uint)i, (uchar*) value); if (value + fsize > m_rows_end) { - my_b_printf(file, "***Corrupted replication event was detected." - " Not printing the value***\n"); + if (!no_fill_output) + my_b_printf(file, "***Corrupted replication event was detected." + " Not printing the value***\n"); value+= fsize; return 0; } } - if (!(size= log_event_print_value(file,is_null? NULL: value, - td->type(i), td->field_metadata(i), - typestr, sizeof(typestr)))) + + if (!no_fill_output) + { + size= log_event_print_value(file,is_null? NULL: value, + td->type(i), td->field_metadata(i), + typestr, sizeof(typestr)); +#ifdef WHEN_FLASHBACK_REVIEW_READY + if (need_flashback_review) + { + String tmp_str, hex_str; + IO_CACHE tmp_cache; + + // Using a tmp IO_CACHE to get the value output + open_cached_file(&tmp_cache, NULL, NULL, 0, MYF(MY_WME | MY_NABP)); + size= log_event_print_value(&tmp_cache, is_null? NULL: value, + td->type(i), td->field_metadata(i), + typestr, sizeof(typestr)); + if (copy_event_cache_to_string_and_reinit(&tmp_cache, &review_str)) + exit(1); + close_cached_file(&tmp_cache); + + switch (td->type(i)) // Converting a string to HEX format + { + case MYSQL_TYPE_VARCHAR: + case MYSQL_TYPE_VAR_STRING: + case MYSQL_TYPE_STRING: + case MYSQL_TYPE_BLOB: + // Avoid write_pos changed to a new area + // tmp_str.free(); + tmp_str.append(review_str.str + 1, review_str.length - 2); // Removing quotation marks + if (hex_str.alloc(tmp_str.length()*2+1)) // If out of memory + { + fprintf(stderr, "\nError: Out of memory. " + "Could not print correct binlog event.\n"); + exit(1); + } + octet2hex((char*) hex_str.ptr(), tmp_str.ptr(), tmp_str.length()); + my_b_printf(review_sql, ", UNHEX('%s')", hex_str.ptr()); + break; + default: + tmp_str.free(); + tmp_str.append(review_str.str, review_str.length); + my_b_printf(review_sql, ", %s", tmp_str.ptr()); + break; + } + my_free(revieww_str.str); + } +#endif + } + else + { + IO_CACHE tmp_cache; + open_cached_file(&tmp_cache, NULL, NULL, 0, MYF(MY_WME | MY_NABP)); + size= log_event_print_value(&tmp_cache,is_null? NULL: value, + td->type(i), td->field_metadata(i), + typestr, sizeof(typestr)); + close_cached_file(&tmp_cache); + } + + if (!size) return 0; if (!is_null) value+= size; - if (print_event_info->verbose > 1) + if (print_event_info->verbose > 1 && !no_fill_output) { my_b_write(file, (uchar*)" /* ", 4); my_b_printf(file, "%s ", typestr); - + my_b_printf(file, "meta=%d nullable=%d is_null=%d ", td->field_metadata(i), td->maybe_null(i), is_null); my_b_write(file, (uchar*)"*/", 2); } - - my_b_write_byte(file, '\n'); - + + if (!no_fill_output) + my_b_write_byte(file, '\n'); + null_bit_index++; } return value - value0; } +/** + Exchange the SET part and WHERE part for the Update events. + Revert the operations order for the Write and Delete events. + And then revert the events order from the last one to the first one. + + @param[in] print_event_info PRINT_EVENT_INFO + @param[in] rows_buff Packed event buff +*/ + +void Rows_log_event::change_to_flashback_event(PRINT_EVENT_INFO *print_event_info, + uchar *rows_buff, Log_event_type ev_type) +{ + Table_map_log_event *map; + table_def *td; + DYNAMIC_ARRAY rows_arr; + uchar *swap_buff1, *swap_buff2; + uchar *rows_pos= rows_buff + m_rows_before_size; + + if (!(map= print_event_info->m_table_map.get_table(m_table_id)) || + !(td= map->create_table_def())) + return; + + /* If the write rows event contained no values for the AI */ + if (((get_general_type_code() == WRITE_ROWS_EVENT) && (m_rows_buf==m_rows_end))) + goto end; + + (void) my_init_dynamic_array(&rows_arr, sizeof(LEX_STRING), 8, 8, MYF(0)); + + for (uchar *value= m_rows_buf; value < m_rows_end; ) + { + uchar *start_pos= value; + size_t length1= 0; + if (!(length1= print_verbose_one_row(NULL, td, print_event_info, + &m_cols, value, + (const uchar*) "", TRUE))) + { + fprintf(stderr, "\nError row length: %zu\n", length1); + exit(1); + } + value+= length1; + + swap_buff1= (uchar *) my_malloc(length1, MYF(0)); + if (!swap_buff1) + { + fprintf(stderr, "\nError: Out of memory. " + "Could not exchange to flashback event.\n"); + exit(1); + } + memcpy(swap_buff1, start_pos, length1); + + // For Update_event, we have the second part + size_t length2= 0; + if (ev_type == UPDATE_ROWS_EVENT || + ev_type == UPDATE_ROWS_EVENT_V1) + { + if (!(length2= print_verbose_one_row(NULL, td, print_event_info, + &m_cols, value, + (const uchar*) "", TRUE))) + { + fprintf(stderr, "\nError row length: %zu\n", length2); + exit(1); + } + value+= length2; + + swap_buff2= (uchar *) my_malloc(length2, MYF(0)); + if (!swap_buff2) + { + fprintf(stderr, "\nError: Out of memory. " + "Could not exchange to flashback event.\n"); + exit(1); + } + memcpy(swap_buff2, start_pos + length1, length2); // WHERE part + } + + if (ev_type == UPDATE_ROWS_EVENT || + ev_type == UPDATE_ROWS_EVENT_V1) + { + /* Swap SET and WHERE part */ + memcpy(start_pos, swap_buff2, length2); + memcpy(start_pos + length2, swap_buff1, length1); + } + + /* Free tmp buffers */ + my_free(swap_buff1); + if (ev_type == UPDATE_ROWS_EVENT || + ev_type == UPDATE_ROWS_EVENT_V1) + my_free(swap_buff2); + + /* Copying one row into a buff, and pushing into the array */ + LEX_STRING one_row; + + one_row.length= length1 + length2; + one_row.str= (char *) my_malloc(one_row.length, MYF(0)); + memcpy(one_row.str, start_pos, one_row.length); + if (one_row.str == NULL || push_dynamic(&rows_arr, (uchar *) &one_row)) + { + fprintf(stderr, "\nError: Out of memory. " + "Could not push flashback event into array.\n"); + exit(1); + } + } + + /* Copying rows from the end to the begining into event */ + for (uint i= rows_arr.elements; i > 0; --i) + { + LEX_STRING *one_row= dynamic_element(&rows_arr, i - 1, LEX_STRING*); + + memcpy(rows_pos, (uchar *)one_row->str, one_row->length); + rows_pos+= one_row->length; + my_free(one_row->str); + } + delete_dynamic(&rows_arr); + +end: + delete td; +} + + /** Print a row event into IO cache in human readable form (in SQL format) @@ -3071,8 +3276,12 @@ void Rows_log_event::print_verbose(IO_CACHE *file, Table_map_log_event *map; table_def *td; const char *sql_command, *sql_clause1, *sql_clause2; + const char *sql_command_short __attribute__((unused)); Log_event_type general_type_code= get_general_type_code(); - +#ifdef WHEN_FLASHBACK_REVIEW_READY + IO_CACHE *review_sql= &print_event_info->review_sql_cache; +#endif + if (m_extra_row_data) { uint8 extra_data_len= m_extra_row_data[EXTRA_ROW_INFO_LEN_OFFSET]; @@ -3102,19 +3311,23 @@ void Rows_log_event::print_verbose(IO_CACHE *file, sql_command= "INSERT INTO"; sql_clause1= "### SET\n"; sql_clause2= NULL; + sql_command_short= "I"; break; case DELETE_ROWS_EVENT: sql_command= "DELETE FROM"; sql_clause1= "### WHERE\n"; sql_clause2= NULL; + sql_command_short= "D"; break; case UPDATE_ROWS_EVENT: sql_command= "UPDATE"; sql_clause1= "### WHERE\n"; sql_clause2= "### SET\n"; + sql_command_short= "U"; break; default: sql_command= sql_clause1= sql_clause2= NULL; + sql_command_short= ""; DBUG_ASSERT(0); /* Not possible */ } @@ -3140,6 +3353,13 @@ void Rows_log_event::print_verbose(IO_CACHE *file, my_b_printf(file, "### %s %`s.%`s\n", sql_command, map->get_db_name(), map->get_table_name()); + +#ifdef WHEN_FLASHBACK_REVIEW_READY + if (need_flashback_review) + my_b_printf(review_sql, "\nINSERT INTO `%s`.`%s` VALUES ('%s'", + map->get_review_dbname(), map->get_review_tablename(), sql_command_short); +#endif + /* Print the first image */ if (!(length= print_verbose_one_row(file, td, print_event_info, &m_cols, value, @@ -3156,6 +3376,17 @@ void Rows_log_event::print_verbose(IO_CACHE *file, goto end; value+= length; } +#ifdef WHEN_FLASHBACK_REVIEW_READY + else + { + if (need_flashback_review) + for (size_t i= 0; i < td->size(); i ++) + my_b_printf(review_sql, ", NULL"); + } + + if (need_flashback_review) + my_b_printf(review_sql, ")%s\n", print_event_info->delimiter); +#endif } end: @@ -3171,7 +3402,7 @@ void Log_event::print_base64(IO_CACHE* file, PRINT_EVENT_INFO* print_event_info, bool more) { - const uchar *ptr= (const uchar *)temp_buf; + uchar *ptr= (uchar *)temp_buf; uint32 size= uint4korr(ptr + EVENT_LEN_OFFSET); DBUG_ENTER("Log_event::print_base64"); @@ -3183,6 +3414,51 @@ void Log_event::print_base64(IO_CACHE* file, DBUG_VOID_RETURN; } + if (is_flashback) + { + uint tmp_size= size; + Rows_log_event *ev= NULL; + Log_event_type ev_type = (enum Log_event_type) ptr[EVENT_TYPE_OFFSET]; + if (checksum_alg != BINLOG_CHECKSUM_ALG_UNDEF && + checksum_alg != BINLOG_CHECKSUM_ALG_OFF) + tmp_size-= BINLOG_CHECKSUM_LEN; // checksum is displayed through the header + switch (ev_type) { + case WRITE_ROWS_EVENT: + ptr[EVENT_TYPE_OFFSET]= DELETE_ROWS_EVENT; + ev= new Delete_rows_log_event((const char*) ptr, tmp_size, + glob_description_event); + ev->change_to_flashback_event(print_event_info, ptr, ev_type); + break; + case WRITE_ROWS_EVENT_V1: + ptr[EVENT_TYPE_OFFSET]= DELETE_ROWS_EVENT_V1; + ev= new Delete_rows_log_event((const char*) ptr, tmp_size, + glob_description_event); + ev->change_to_flashback_event(print_event_info, ptr, ev_type); + break; + case DELETE_ROWS_EVENT: + ptr[EVENT_TYPE_OFFSET]= WRITE_ROWS_EVENT; + ev= new Write_rows_log_event((const char*) ptr, tmp_size, + glob_description_event); + ev->change_to_flashback_event(print_event_info, ptr, ev_type); + break; + case DELETE_ROWS_EVENT_V1: + ptr[EVENT_TYPE_OFFSET]= WRITE_ROWS_EVENT_V1; + ev= new Write_rows_log_event((const char*) ptr, tmp_size, + glob_description_event); + ev->change_to_flashback_event(print_event_info, ptr, ev_type); + break; + case UPDATE_ROWS_EVENT: + case UPDATE_ROWS_EVENT_V1: + ev= new Update_rows_log_event((const char*) ptr, tmp_size, + glob_description_event); + ev->change_to_flashback_event(print_event_info, ptr, ev_type); + break; + default: + break; + } + delete ev; + } + if (my_base64_encode(ptr, (size_t) size, tmp_str)) { DBUG_ASSERT(0); @@ -3198,8 +3474,12 @@ void Log_event::print_base64(IO_CACHE* file, if (!more) my_b_printf(file, "'%s\n", print_event_info->delimiter); } - + +#ifdef WHEN_FLASHBACK_REVIEW_READY + if (print_event_info->verbose || need_flashback_review) +#else if (print_event_info->verbose) +#endif { Rows_log_event *ev= NULL; Log_event_type et= (Log_event_type) ptr[EVENT_TYPE_OFFSET]; @@ -3207,7 +3487,7 @@ void Log_event::print_base64(IO_CACHE* file, if (checksum_alg != BINLOG_CHECKSUM_ALG_UNDEF && checksum_alg != BINLOG_CHECKSUM_ALG_OFF) size-= BINLOG_CHECKSUM_LEN; // checksum is displayed through the header - + switch (et) { case TABLE_MAP_EVENT: @@ -3215,6 +3495,13 @@ void Log_event::print_base64(IO_CACHE* file, Table_map_log_event *map; map= new Table_map_log_event((const char*) ptr, size, glob_description_event); +#ifdef WHEN_FLASHBACK_REVIEW_READY + if (need_flashback_review) + { + map->set_review_dbname(m_review_dbname.ptr()); + map->set_review_tablename(m_review_tablename.ptr()); + } +#endif print_event_info->m_table_map.set_table(map->get_table_id(), map); break; } @@ -3263,14 +3550,27 @@ void Log_event::print_base64(IO_CACHE* file, default: break; } - + if (ev) { +#ifdef WHEN_FLASHBACK_REVIEW_READY + ev->need_flashback_review= need_flashback_review; + if (print_event_info->verbose) + ev->print_verbose(file, print_event_info); + else + { + IO_CACHE tmp_cache; + open_cached_file(&tmp_cache, NULL, NULL, 0, MYF(MY_WME | MY_NABP)); + ev->print_verbose(&tmp_cache, print_event_info); + close_cached_file(&tmp_cache); + } +#else ev->print_verbose(file, print_event_info); +#endif delete ev; } } - + my_free(tmp_str); DBUG_VOID_RETURN; } @@ -4631,7 +4931,7 @@ void Query_log_event::print_query_header(IO_CACHE* file, void Query_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info) { - Write_on_release_cache cache(&print_event_info->head_cache, file); + Write_on_release_cache cache(&print_event_info->head_cache, file, 0, this); /** reduce the size of io cache so that the write function is called @@ -4640,8 +4940,24 @@ void Query_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info) DBUG_EXECUTE_IF ("simulate_file_write_error", {(&cache)->write_pos= (&cache)->write_end- 500;}); print_query_header(&cache, print_event_info); - my_b_write(&cache, (uchar*) query, q_len); - my_b_printf(&cache, "\n%s\n", print_event_info->delimiter); + if (!is_flashback) + { + my_b_write(&cache, (uchar*) query, q_len); + my_b_printf(&cache, "\n%s\n", print_event_info->delimiter); + } + else // is_flashback == 1 + { + if (strcmp("BEGIN", query) == 0) + { + my_b_write(&cache, (uchar*) "COMMIT", 6); + my_b_printf(&cache, "\n%s\n", print_event_info->delimiter); + } + else if (strcmp("COMMIT", query) == 0) + { + my_b_write(&cache, (uchar*) "BEGIN", 5); + my_b_printf(&cache, "\n%s\n", print_event_info->delimiter); + } + } } #endif /* MYSQL_CLIENT */ @@ -7058,7 +7374,7 @@ Binlog_checkpoint_log_event::Binlog_checkpoint_log_event( uint8 header_size= description_event->common_header_len; uint8 post_header_len= description_event->post_header_len[BINLOG_CHECKPOINT_EVENT-1]; - if (event_len < header_size + post_header_len || + if (event_len < (uint) header_size + (uint) post_header_len || post_header_len < BINLOG_CHECKPOINT_HEADER_LEN) return; buf+= header_size; @@ -7096,7 +7412,7 @@ Gtid_log_event::Gtid_log_event(const char *buf, uint event_len, { uint8 header_size= description_event->common_header_len; uint8 post_header_len= description_event->post_header_len[GTID_EVENT-1]; - if (event_len < header_size + post_header_len || + if (event_len < (uint) header_size + (uint) post_header_len || post_header_len < GTID_HEADER_LEN) return; @@ -7351,11 +7667,11 @@ void Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) { Write_on_release_cache cache(&print_event_info->head_cache, file, - Write_on_release_cache::FLUSH_F); + Write_on_release_cache::FLUSH_F, this); char buf[21]; char buf2[21]; - if (!print_event_info->short_form) + if (!print_event_info->short_form & !is_flashback) { print_header(&cache, print_event_info, FALSE); longlong10_to_str(seq_no, buf, 10); @@ -7401,11 +7717,12 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) print_event_info->server_id_printed= true; } - my_b_printf(&cache, "/*!100001 SET @@session.gtid_seq_no=%s*/%s\n", - buf, print_event_info->delimiter); + if (!is_flashback) + my_b_printf(&cache, "/*!100001 SET @@session.gtid_seq_no=%s*/%s\n", + buf, print_event_info->delimiter); } if (!(flags2 & FL_STANDALONE)) - my_b_printf(&cache, "BEGIN\n%s\n", print_event_info->delimiter); + my_b_printf(&cache, is_flashback ? "COMMIT\n%s\n" : "BEGIN\n%s\n", print_event_info->delimiter); } #endif /* MYSQL_SERVER */ @@ -7421,7 +7738,7 @@ Gtid_list_log_event::Gtid_list_log_event(const char *buf, uint event_len, uint32 val; uint8 header_size= description_event->common_header_len; uint8 post_header_len= description_event->post_header_len[GTID_LIST_EVENT-1]; - if (event_len < header_size + post_header_len || + if (event_len < (uint) header_size + (uint) post_header_len || post_header_len < GTID_LIST_HEADER_LEN) return; @@ -7605,6 +7922,7 @@ Gtid_list_log_event::do_apply_event(rpl_group_info *rgi) rli->abort_slave= true; rli->stop_for_until= true; } + free_root(thd->mem_root, MYF(MY_KEEP_PREALLOC)); return ret; } @@ -8047,7 +8365,7 @@ bool Xid_log_event::write() void Xid_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info) { Write_on_release_cache cache(&print_event_info->head_cache, file, - Write_on_release_cache::FLUSH_F); + Write_on_release_cache::FLUSH_F, this); if (!print_event_info->short_form) { @@ -8057,7 +8375,7 @@ void Xid_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info) print_header(&cache, print_event_info, FALSE); my_b_printf(&cache, "\tXid = %s\n", buf); } - my_b_printf(&cache, "COMMIT%s\n", print_event_info->delimiter); + my_b_printf(&cache, is_flashback ? "BEGIN%s\n" : "COMMIT%s\n", print_event_info->delimiter); } #endif /* MYSQL_CLIENT */ @@ -8706,7 +9024,7 @@ void Unknown_log_event::print(FILE* file_arg, PRINT_EVENT_INFO* print_event_info void Stop_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info) { Write_on_release_cache cache(&print_event_info->head_cache, file, - Write_on_release_cache::FLUSH_F); + Write_on_release_cache::FLUSH_F, this); if (print_event_info->short_form) return; @@ -10042,6 +10360,7 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len, m_rows_end= m_rows_buf + data_size; m_rows_cur= m_rows_end; memcpy(m_rows_buf, ptr_rows_data, data_size); + m_rows_before_size= ptr_rows_data - (const uchar *) buf; // Get the size that before SET part } else m_cols.bitmap= 0; // to not free it @@ -10958,6 +11277,10 @@ void Rows_log_event::print_helper(FILE *file, { IO_CACHE *const head= &print_event_info->head_cache; IO_CACHE *const body= &print_event_info->body_cache; +#ifdef WHEN_FLASHBACK_REVIEW_READY + IO_CACHE *const sql= &print_event_info->review_sql_cache; +#endif + if (!print_event_info->short_form) { bool const last_stmt_event= get_flags(STMT_END_F); @@ -10970,8 +11293,19 @@ void Rows_log_event::print_helper(FILE *file, if (get_flags(STMT_END_F)) { - copy_event_cache_to_file_and_reinit(head, file); - copy_event_cache_to_file_and_reinit(body, file); + reinit_io_cache(head, READ_CACHE, 0L, FALSE, FALSE); + output_buf.append(head, head->end_of_file); + reinit_io_cache(head, WRITE_CACHE, 0, FALSE, TRUE); + + reinit_io_cache(body, READ_CACHE, 0L, FALSE, FALSE); + output_buf.append(body, body->end_of_file); + reinit_io_cache(body, WRITE_CACHE, 0, FALSE, TRUE); + +#ifdef WHEN_FLASHBACK_REVIEW_READY + reinit_io_cache(sql, READ_CACHE, 0L, FALSE, FALSE); + output_buf.append(sql, sql->end_of_file); + reinit_io_cache(sql, WRITE_CACHE, 0, FALSE, TRUE); +#endif } } #endif @@ -12374,7 +12708,7 @@ void Write_rows_log_event::print(FILE *file, PRINT_EVENT_INFO* print_event_info) { DBUG_EXECUTE_IF("simulate_cache_read_error", {DBUG_SET("+d,simulate_my_b_fill_error");}); - Rows_log_event::print_helper(file, print_event_info, "Write_rows"); + Rows_log_event::print_helper(file, print_event_info, is_flashback ? "Delete_rows" : "Write_rows"); } void Write_rows_compressed_log_event::print(FILE *file, @@ -13048,7 +13382,7 @@ int Delete_rows_log_event::do_exec_row(rpl_group_info *rgi) void Delete_rows_log_event::print(FILE *file, PRINT_EVENT_INFO* print_event_info) { - Rows_log_event::print_helper(file, print_event_info, "Delete_rows"); + Rows_log_event::print_helper(file, print_event_info, is_flashback ? "Write_rows" : "Delete_rows"); } void Delete_rows_compressed_log_event::print(FILE *file, @@ -13600,6 +13934,9 @@ st_print_event_info::st_print_event_info() myf const flags = MYF(MY_WME | MY_NABP); open_cached_file(&head_cache, NULL, NULL, 0, flags); open_cached_file(&body_cache, NULL, NULL, 0, flags); +#ifdef WHEN_FLASHBACK_REVIEW_READY + open_cached_file(&review_sql_cache, NULL, NULL, 0, flags); +#endif } #endif diff --git a/sql/log_event.h b/sql/log_event.h index 7b8704636af..5689d36aea8 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2014, Oracle and/or its affiliates. - Copyright (c) 2009, 2014, Monty Program Ab. + Copyright (c) 2009, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -41,6 +41,7 @@ #include "rpl_utility.h" #include "hash.h" #include "rpl_tblmap.h" +#include "sql_string.h" #endif #ifdef MYSQL_SERVER @@ -52,7 +53,9 @@ #include "rpl_gtid.h" /* Forward declarations */ +#ifndef MYSQL_CLIENT class String; +#endif #define PREFIX_SQL_LOAD "SQL_LOAD-" #define LONG_FIND_ROW_THRESHOLD 60 /* seconds */ @@ -825,7 +828,7 @@ typedef struct st_print_event_info char time_zone_str[MAX_TIME_ZONE_NAME_LENGTH]; uint lc_time_names_number; uint charset_database_number; - uint thread_id; + my_thread_id thread_id; bool thread_id_printed; uint32 server_id; bool server_id_printed; @@ -845,9 +848,16 @@ typedef struct st_print_event_info ~st_print_event_info() { close_cached_file(&head_cache); close_cached_file(&body_cache); +#ifdef WHEN_FLASHBACK_REVIEW_READY + close_cached_file(&review_sql_cache); +#endif } bool init_ok() /* tells if construction was successful */ - { return my_b_inited(&head_cache) && my_b_inited(&body_cache); } + { return my_b_inited(&head_cache) && my_b_inited(&body_cache) +#ifdef WHEN_FLASHBACK_REVIEW_READY + && my_b_inited(&review_sql_cache) +#endif + ; } /* Settings on how to print the events */ @@ -875,6 +885,10 @@ typedef struct st_print_event_info */ IO_CACHE head_cache; IO_CACHE body_cache; +#ifdef WHEN_FLASHBACK_REVIEW_READY + /* Storing the SQL for reviewing */ + IO_CACHE review_sql_cache; +#endif } PRINT_EVENT_INFO; #endif @@ -1223,6 +1237,37 @@ public: void print_base64(IO_CACHE* file, PRINT_EVENT_INFO* print_event_info, bool is_more); #endif + + /* The following code used for Flashback */ +#ifdef MYSQL_CLIENT + my_bool is_flashback; + my_bool need_flashback_review; + String output_buf; // Storing the event output +#ifdef WHEN_FLASHBACK_REVIEW_READY + String m_review_dbname; + String m_review_tablename; + + void set_review_dbname(const char *name) + { + if (name) + { + m_review_dbname.free(); + m_review_dbname.append(name); + } + } + void set_review_tablename(const char *name) + { + if (name) + { + m_review_tablename.free(); + m_review_tablename.append(name); + } + } + const char *get_review_dbname() const { return m_review_dbname.ptr(); } + const char *get_review_tablename() const { return m_review_tablename.ptr(); } +#endif +#endif + /* read_log_event() functions read an event from a binlog or relay log; used by SHOW BINLOG EVENTS, the binlog_dump thread on the @@ -1963,7 +2008,7 @@ public: uint32 q_len; uint32 db_len; uint16 error_code; - ulong thread_id; + my_thread_id thread_id; /* For events created by Query_log_event::do_apply_event (and Load_log_event::do_apply_event()) we need the *original* thread @@ -2390,7 +2435,7 @@ public: void print_query(THD *thd, bool need_db, const char *cs, String *buf, my_off_t *fn_start, my_off_t *fn_end, const char *qualify_db); - ulong thread_id; + my_thread_id thread_id; ulong slave_proxy_id; uint32 table_name_len; /* @@ -4362,12 +4407,14 @@ public: #ifdef MYSQL_CLIENT /* not for direct call, each derived has its own ::print() */ virtual void print(FILE *file, PRINT_EVENT_INFO *print_event_info)= 0; + void change_to_flashback_event(PRINT_EVENT_INFO *print_event_info, uchar *rows_buff, Log_event_type ev_type); void print_verbose(IO_CACHE *file, PRINT_EVENT_INFO *print_event_info); size_t print_verbose_one_row(IO_CACHE *file, table_def *td, PRINT_EVENT_INFO *print_event_info, MY_BITMAP *cols_bitmap, - const uchar *ptr, const uchar *prefix); + const uchar *ptr, const uchar *prefix, + const my_bool no_fill_output= 0); // if no_fill_output=1, then print result is unnecessary #endif #ifdef MYSQL_SERVER @@ -4506,6 +4553,8 @@ protected: uchar *m_rows_cur; /* One-after the end of the data */ uchar *m_rows_end; /* One-after the end of the allocated space */ + size_t m_rows_before_size; /* The length before m_rows_buf */ + flag_set m_flags; /* Flags for row-level events */ Log_event_type m_type; /* Actual event type */ @@ -5040,6 +5089,29 @@ public: }; +static inline bool copy_event_cache_to_string_and_reinit(IO_CACHE *cache, LEX_STRING *to) +{ + String tmp; + + reinit_io_cache(cache, READ_CACHE, 0L, FALSE, FALSE); + if (tmp.append(cache, cache->end_of_file)) + goto err; + reinit_io_cache(cache, WRITE_CACHE, 0, FALSE, TRUE); + + /* + Can't change the order, because the String::release() will clear the + length. + */ + to->length= tmp.length(); + to->str= tmp.release(); + + return false; + +err: + perror("Out of memory: can't allocate memory in copy_event_cache_to_string_and_reinit()."); + return true; +} + static inline bool copy_event_cache_to_file_and_reinit(IO_CACHE *cache, FILE *file) { diff --git a/sql/log_slow.h b/sql/log_slow.h index 3ae2060cc27..c641d2be87d 100644 --- a/sql/log_slow.h +++ b/sql/log_slow.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Monty Program Ab +/* Copyright (C) 2009, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,23 +16,22 @@ /* Defining what to log to slow log */ #define LOG_SLOW_VERBOSITY_INIT 0 -#define LOG_SLOW_VERBOSITY_INNODB (1 << 0) -#define LOG_SLOW_VERBOSITY_QUERY_PLAN (1 << 1) -#define LOG_SLOW_VERBOSITY_EXPLAIN (1 << 2) +#define LOG_SLOW_VERBOSITY_INNODB (1U << 0) +#define LOG_SLOW_VERBOSITY_QUERY_PLAN (1U << 1) +#define LOG_SLOW_VERBOSITY_EXPLAIN (1U << 2) #define QPLAN_INIT QPLAN_QC_NO -#define QPLAN_ADMIN (1 << 0) -#define QPLAN_FILESORT (1 << 1) -#define QPLAN_FILESORT_DISK (1 << 2) -#define QPLAN_FULL_JOIN (1 << 3) -#define QPLAN_FULL_SCAN (1 << 4) -#define QPLAN_QC (1 << 5) -#define QPLAN_QC_NO (1 << 6) -#define QPLAN_TMP_DISK (1 << 7) -#define QPLAN_TMP_TABLE (1 << 8) -#define QPLAN_FILESORT_PRIORITY_QUEUE (1 << 9) +#define QPLAN_ADMIN (1U << 0) +#define QPLAN_FILESORT (1U << 1) +#define QPLAN_FILESORT_DISK (1U << 2) +#define QPLAN_FULL_JOIN (1U << 3) +#define QPLAN_FULL_SCAN (1U << 4) +#define QPLAN_QC (1U << 5) +#define QPLAN_QC_NO (1U << 6) +#define QPLAN_TMP_DISK (1U << 7) +#define QPLAN_TMP_TABLE (1U << 8) +#define QPLAN_FILESORT_PRIORITY_QUEUE (1U << 9) /* ... */ -#define QPLAN_MAX (((ulong) 1) << 31) /* reserved as placeholder */ - +#define QPLAN_MAX (1UL << 31) /* reserved as placeholder */ diff --git a/sql/my_json_writer.cc b/sql/my_json_writer.cc index d36fdd1192a..135ce353552 100644 --- a/sql/my_json_writer.cc +++ b/sql/my_json_writer.cc @@ -125,7 +125,7 @@ void Json_writer::start_element() void Json_writer::add_ll(longlong val) { char buf[64]; - my_snprintf(buf, sizeof(buf), "%ld", val); + my_snprintf(buf, sizeof(buf), "%lld", val); add_unquoted_str(buf); } @@ -135,16 +135,16 @@ void Json_writer::add_size(longlong val) { char buf[64]; if (val < 1024) - my_snprintf(buf, sizeof(buf), "%ld", val); + my_snprintf(buf, sizeof(buf), "%lld", val); else if (val < 1024*1024*16) { /* Values less than 16MB are specified in KB for precision */ - size_t len= my_snprintf(buf, sizeof(buf), "%ld", val/1024); + size_t len= my_snprintf(buf, sizeof(buf), "%lld", val/1024); strcpy(buf + len, "Kb"); } else { - size_t len= my_snprintf(buf, sizeof(buf), "%ld", val/(1024*1024)); + size_t len= my_snprintf(buf, sizeof(buf), "%lld", val/(1024*1024)); strcpy(buf + len, "Mb"); } add_str(buf); diff --git a/sql/mysql_install_db.cc b/sql/mysql_install_db.cc index c39789f7c97..c23a20ebac9 100644 --- a/sql/mysql_install_db.cc +++ b/sql/mysql_install_db.cc @@ -233,6 +233,20 @@ static void get_basedir(char *basedir, int size, const char *mysqld_path) } } +#define STR(s) _STR(s) +#define _STR(s) #s + +static char *get_plugindir() +{ + static char plugin_dir[2*MAX_PATH]; + get_basedir(plugin_dir, sizeof(plugin_dir), mysqld_path); + strcat(plugin_dir, "/" STR(INSTALL_PLUGINDIR)); + + if (access(plugin_dir, 0) == 0) + return plugin_dir; + + return NULL; +} /** Allocate and initialize command line for mysqld --bootstrap. @@ -313,6 +327,10 @@ static int create_myini() fprintf(myini,"protocol=pipe\n"); else if (opt_port) fprintf(myini,"port=%d\n",opt_port); + + char *plugin_dir = get_plugindir(); + if (plugin_dir) + fprintf(myini, "plugin-dir=%s\n", plugin_dir); fclose(myini); return 0; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 84d6e3b582f..7b8e3ee0ee6 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2008, 2016, MariaDB + Copyright (c) 2008, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -130,10 +130,7 @@ extern "C" { // Because of SCO 3.2V4.2 #include #endif #ifdef HAVE_PWD_H -#include // For getpwent -#endif -#ifdef HAVE_GRP_H -#include +#include // For struct passwd #endif #include @@ -393,7 +390,7 @@ bool opt_bin_log_compress; uint opt_bin_log_compress_min_len; my_bool opt_log, debug_assert_if_crashed_table= 0, opt_help= 0; my_bool debug_assert_on_not_freed_memory= 0; -my_bool disable_log_notes; +my_bool disable_log_notes, opt_support_flashback= 0; static my_bool opt_abort; ulonglong log_output_options; my_bool opt_userstat_running; @@ -485,9 +482,7 @@ ulong opt_binlog_rows_event_max_size; my_bool opt_master_verify_checksum= 0; my_bool opt_slave_sql_verify_checksum= 1; const char *binlog_format_names[]= {"MIXED", "STATEMENT", "ROW", NullS}; -#ifdef HAVE_INITGROUPS volatile sig_atomic_t calling_initgroups= 0; /**< Used in SIGSEGV handler. */ -#endif uint mysqld_port, test_flags, select_errors, dropping_tables, ha_open_options; uint mysqld_extra_port; uint mysqld_port_timeout; @@ -2421,59 +2416,18 @@ static void set_ports() static struct passwd *check_user(const char *user) { -#if !defined(__WIN__) - struct passwd *tmp_user_info; - uid_t user_id= geteuid(); + myf flags= 0; + if (global_system_variables.log_warnings) + flags|= MY_WME; + if (!opt_bootstrap && !opt_help) + flags|= MY_FAE; - // Don't bother if we aren't superuser - if (user_id) - { - if (user) - { - /* Don't give a warning, if real user is same as given with --user */ - /* purecov: begin tested */ - tmp_user_info= getpwnam(user); - if ((!tmp_user_info || user_id != tmp_user_info->pw_uid) && - global_system_variables.log_warnings) - sql_print_warning( - "One can only use the --user switch if running as root\n"); - /* purecov: end */ - } - return NULL; - } - if (!user) - { - if (!opt_bootstrap && !opt_help) - { - sql_print_error("Fatal error: Please consult the Knowledge Base " - "to find out how to run mysqld as root!\n"); - unireg_abort(1); - } - return NULL; - } - /* purecov: begin tested */ - if (!strcmp(user,"root")) - return NULL; // Avoid problem with dynamic libraries + struct passwd *tmp_user_info= my_check_user(user, MYF(flags)); - if (!(tmp_user_info= getpwnam(user))) - { - // Allow a numeric uid to be used - const char *pos; - for (pos= user; my_isdigit(mysqld_charset,*pos); pos++) ; - if (*pos) // Not numeric id - goto err; - if (!(tmp_user_info= getpwuid(atoi(user)))) - goto err; - } + if (!tmp_user_info && my_errno==EINVAL && (flags & MY_FAE)) + unireg_abort(1); return tmp_user_info; - /* purecov: end */ - -err: - sql_print_error("Fatal error: Can't change to run as user '%s' ; Please check that the user exists!\n",user); - unireg_abort(1); -#endif - return NULL; } static inline void allow_coredumps() @@ -2490,10 +2444,6 @@ static inline void allow_coredumps() static void set_user(const char *user, struct passwd *user_info_arg) { - /* purecov: begin tested */ -#if !defined(__WIN__) - DBUG_ASSERT(user_info_arg != 0); -#ifdef HAVE_INITGROUPS /* We can get a SIGSEGV when calling initgroups() on some systems when NSS is configured to use LDAP and the server is statically linked. We set @@ -2501,22 +2451,11 @@ static void set_user(const char *user, struct passwd *user_info_arg) output a specific message to help the user resolve this problem. */ calling_initgroups= 1; - initgroups((char*) user, user_info_arg->pw_gid); + int res= my_set_user(user, user_info_arg, MYF(MY_WME)); calling_initgroups= 0; -#endif - if (setgid(user_info_arg->pw_gid) == -1) - { - sql_perror("setgid"); + if (res) unireg_abort(1); - } - if (setuid(user_info_arg->pw_uid) == -1) - { - sql_perror("setuid"); - unireg_abort(1); - } allow_coredumps(); -#endif - /* purecov: end */ } @@ -4087,8 +4026,8 @@ extern "C" { static void my_malloc_size_cb_func(long long size, my_bool is_thread_specific) { THD *thd= current_thd; - - if (likely(is_thread_specific)) /* If thread specific memory */ + + if (is_thread_specific) /* If thread specific memory */ { /* When thread specfic is set, both mysqld_server_initialized and thd @@ -4100,14 +4039,22 @@ static void my_malloc_size_cb_func(long long size, my_bool is_thread_specific) (longlong) thd->status_var.local_memory_used, size)); thd->status_var.local_memory_used+= size; + if (thd->status_var.local_memory_used > (int64)thd->variables.max_mem_used && + !thd->killed) + { + char buf[1024]; + thd->killed= KILL_QUERY; + my_snprintf(buf, sizeof(buf), "--max-thread-mem-used=%llu", + thd->variables.max_mem_used); + my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), buf); + } DBUG_ASSERT((longlong) thd->status_var.local_memory_used >= 0 || !debug_assert_on_not_freed_memory); } else if (likely(thd)) { DBUG_PRINT("info", ("global thd memory_used: %lld size: %lld", - (longlong) thd->status_var.global_memory_used, - size)); + (longlong) thd->status_var.global_memory_used, size)); thd->status_var.global_memory_used+= size; } else @@ -4580,19 +4527,24 @@ static int init_common_variables() default_charset_info= default_collation; } /* Set collactions that depends on the default collation */ - global_system_variables.collation_server= default_charset_info; - global_system_variables.collation_database= default_charset_info; - global_system_variables.collation_connection= default_charset_info; - global_system_variables.character_set_results= default_charset_info; - if (default_charset_info->mbminlen > 1) + global_system_variables.collation_server= default_charset_info; + global_system_variables.collation_database= default_charset_info; + if (is_supported_parser_charset(default_charset_info)) { - global_system_variables.character_set_client= &my_charset_latin1; - sql_print_warning("Cannot use %s as character_set_client, %s will be used instead", - default_charset_info->csname, - global_system_variables.character_set_client->csname); + global_system_variables.collation_connection= default_charset_info; + global_system_variables.character_set_results= default_charset_info; + global_system_variables.character_set_client= default_charset_info; } else - global_system_variables.character_set_client= default_charset_info; + { + sql_print_warning("'%s' can not be used as client character set. " + "'%s' will be used as default client character set.", + default_charset_info->csname, + my_charset_latin1.csname); + global_system_variables.collation_connection= &my_charset_latin1; + global_system_variables.character_set_results= &my_charset_latin1; + global_system_variables.character_set_client= &my_charset_latin1; + } if (!(character_set_filesystem= get_charset_by_csname(character_set_filesystem_name, @@ -5862,6 +5814,9 @@ int mysqld_main(int argc, char **argv) if (my_setwd(mysql_real_data_home, opt_abort ? 0 : MYF(MY_WME)) && !opt_abort) unireg_abort(1); /* purecov: inspected */ + /* Atomic write initialization must be done as root */ + my_init_atomic_write(); + if ((user_info= check_user(mysqld_user))) { #if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) @@ -7266,8 +7221,8 @@ struct my_option my_long_options[]= "The value has to be a multiple of 256.", &opt_binlog_rows_event_max_size, &opt_binlog_rows_event_max_size, 0, GET_ULONG, REQUIRED_ARG, - /* def_value */ 1024, /* min_value */ 256, /* max_value */ ULONG_MAX, - /* sub_size */ 0, /* block_size */ 256, + /* def_value */ 8192, /* min_value */ 256, /* max_value */ ULONG_MAX, + /* sub_size */ 0, /* block_size */ 256, /* app_type */ 0 }, #ifndef DISABLE_GRANT_OPTIONS @@ -7402,6 +7357,10 @@ struct my_option my_long_options[]= 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, /* We must always support the next option to make scripts like mysqltest easier to do */ + {"flashback", 0, + "Setup the server to use flashback. This enables binary log in row mode and will enable extra logging for DDL's needed by flashback feature", + &opt_support_flashback, &opt_support_flashback, + 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"gdb", 0, "Set up signals usable for debugging. Deprecated, use --debug-gdb instead.", &opt_debugging, &opt_debugging, @@ -8811,7 +8770,7 @@ static int mysql_init_variables(void) mysql_home_ptr= mysql_home; log_error_file_ptr= log_error_file; protocol_version= PROTOCOL_VERSION; - what_to_log= ~ (1L << (uint) COM_TIME); + what_to_log= ~(1UL << COM_TIME); denied_connections= 0; executed_events= 0; global_query_id= 1; @@ -9518,7 +9477,10 @@ static int get_options(int *argc_ptr, char ***argv_ptr) if ((opt_log_slow_admin_statements || opt_log_queries_not_using_indexes || opt_log_slow_slave_statements) && !global_system_variables.sql_log_slow) - sql_print_warning("options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log_slow_queries is not set"); + sql_print_information("options --log-slow-admin-statements, " + "--log-queries-not-using-indexes and " + "--log-slow-slave-statements have no " + "effect if --log-slow-queries is not set"); if (global_system_variables.net_buffer_length > global_system_variables.max_allowed_packet) { @@ -9576,6 +9538,18 @@ static int get_options(int *argc_ptr, char ***argv_ptr) else global_system_variables.option_bits&= ~OPTION_BIG_SELECTS; + if (opt_support_flashback) + { + /* Force binary logging */ + if (!opt_bin_logname) + opt_bin_logname= (char*) ""; // Use default name + opt_bin_log= opt_bin_log_used= 1; + + /* Force format to row */ + binlog_format_used= 1; + global_system_variables.binlog_format= BINLOG_FORMAT_ROW; + } + if (!opt_bootstrap && WSREP_PROVIDER_EXISTS && global_system_variables.binlog_format != BINLOG_FORMAT_ROW) { diff --git a/sql/mysqld.h b/sql/mysqld.h index 96944c012ce..8f74194181a 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -1,5 +1,5 @@ /* Copyright (c) 2006, 2016, Oracle and/or its affiliates. - Copyright (c) 2010, 2016, MariaDB + Copyright (c) 2010, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -49,16 +49,16 @@ typedef Bitmap<((MAX_INDEXES+7)/8*8)> key_map; /* Used for finding keys */ #endif /* Bits from testflag */ -#define TEST_PRINT_CACHED_TABLES 1 -#define TEST_NO_KEY_GROUP 2 -#define TEST_MIT_THREAD 4 -#define TEST_BLOCKING 8 -#define TEST_KEEP_TMP_TABLES 16 -#define TEST_READCHECK 64 /**< Force use of readcheck */ -#define TEST_NO_EXTRA 128 -#define TEST_CORE_ON_SIGNAL 256 /**< Give core if signal */ -#define TEST_SIGINT 1024 /**< Allow sigint on threads */ -#define TEST_SYNCHRONIZATION 2048 /**< get server to do sleep in +#define TEST_PRINT_CACHED_TABLES 1U +#define TEST_NO_KEY_GROUP 2U +#define TEST_MIT_THREAD 4U +#define TEST_BLOCKING 8U +#define TEST_KEEP_TMP_TABLES 16U +#define TEST_READCHECK 64U /**< Force use of readcheck */ +#define TEST_NO_EXTRA 128U +#define TEST_CORE_ON_SIGNAL 256U /**< Give core if signal */ +#define TEST_SIGINT 1024U /**< Allow sigint on threads */ +#define TEST_SYNCHRONIZATION 2048U /**< get server to do sleep in some places */ /* Keep things compatible */ @@ -114,6 +114,7 @@ extern uint opt_bin_log_compress_min_len; extern my_bool opt_log, opt_bootstrap; extern my_bool opt_backup_history_log; extern my_bool opt_backup_progress_log; +extern my_bool opt_support_flashback; extern ulonglong log_output_options; extern ulong log_backup_output_options; extern my_bool opt_log_queries_not_using_indexes; @@ -720,7 +721,7 @@ inline query_id_t get_query_id() /* increment global_thread_id and return it. */ inline __attribute__((warn_unused_result)) my_thread_id next_thread_id() { - return my_atomic_add64_explicit(&global_thread_id, 1, MY_MEMORY_ORDER_RELAXED); + return my_atomic_add64_explicit((int64*) &global_thread_id, 1, MY_MEMORY_ORDER_RELAXED); } #if defined(MYSQL_DYNAMIC_PLUGIN) && defined(_WIN32) diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 01b836fddf7..61fe64c3930 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1236,7 +1236,7 @@ QUICK_SELECT_I::QUICK_SELECT_I() QUICK_RANGE_SELECT::QUICK_RANGE_SELECT(THD *thd, TABLE *table, uint key_nr, bool no_alloc, MEM_ROOT *parent_alloc, bool *create_error) - :doing_key_read(0),free_file(0),cur_range(NULL),last_range(0),dont_free(0) + :free_file(0),cur_range(NULL),last_range(0),dont_free(0) { my_bitmap_map *bitmap; DBUG_ENTER("QUICK_RANGE_SELECT::QUICK_RANGE_SELECT"); @@ -1318,8 +1318,7 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT() if (file) { range_end(); - if (doing_key_read) - file->extra(HA_EXTRA_NO_KEYREAD); + file->ha_end_keyread(); if (free_file) { DBUG_PRINT("info", ("Freeing separate handler 0x%lx (free: %d)", (long) file, @@ -1475,7 +1474,6 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler, MEM_ROOT *local_alloc) { handler *save_file= file, *org_file; - my_bool org_key_read; THD *thd= head->in_use; MY_BITMAP * const save_vcol_set= head->vcol_set; MY_BITMAP * const save_read_set= head->read_set; @@ -1490,7 +1488,6 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler, { DBUG_RETURN(1); } - head->column_bitmaps_set(&column_bitmap, &column_bitmap, &column_bitmap); goto end; } @@ -1515,8 +1512,6 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler, goto failure; /* purecov: inspected */ } - head->column_bitmaps_set(&column_bitmap, &column_bitmap, &column_bitmap); - if (file->ha_external_lock(thd, F_RDLCK)) goto failure; @@ -1530,28 +1525,19 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler, last_rowid= file->ref; end: - DBUG_ASSERT(head->read_set == &column_bitmap); /* We are only going to read key fields and call position() on 'file' The following sets head->read_set (== column_bitmap) to only use this key. The 'column_bitmap' is used in ::get_next() */ org_file= head->file; - org_key_read= head->key_read; head->file= file; - head->key_read= 0; - head->mark_columns_used_by_index_no_reset(index, &column_bitmap); - - if (!head->no_keyread) - { - doing_key_read= 1; - head->set_keyread(true); - } + head->column_bitmaps_set_no_signal(&column_bitmap, &column_bitmap, &column_bitmap); + head->prepare_for_keyread(index, &column_bitmap); head->prepare_for_position(); head->file= org_file; - head->key_read= org_key_read; /* Restore head->read_set (and write_set) to what they had before the call */ head->column_bitmaps_set(save_read_set, save_write_set); @@ -10631,7 +10617,7 @@ QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table, /* Call multi_range_read_info() to get the MRR flags and buffer size */ quick->mrr_flags= HA_MRR_NO_ASSOCIATION | - (table->key_read ? HA_MRR_INDEX_ONLY : 0); + (table->file->keyread_enabled() ? HA_MRR_INDEX_ONLY : 0); if (thd->lex->sql_command != SQLCOM_SELECT) quick->mrr_flags |= HA_MRR_USE_DEFAULT_IMPL; @@ -10681,15 +10667,10 @@ int read_keys_and_merge_scans(THD *thd, Unique *unique= *unique_ptr; handler *file= head->file; bool with_cpk_filter= pk_quick_select != NULL; - bool enabled_keyread= 0; DBUG_ENTER("read_keys_and_merge"); /* We're going to just read rowids. */ - if (!head->key_read) - { - enabled_keyread= 1; - head->set_keyread(true); - } + head->file->ha_start_keyread(head->s->primary_key); head->prepare_for_position(); cur_quick_it.rewind(); @@ -10780,16 +10761,14 @@ int read_keys_and_merge_scans(THD *thd, /* index merge currently doesn't support "using index" at all */ - if (enabled_keyread) - head->set_keyread(false); + head->file->ha_end_keyread(); if (init_read_record(read_record, thd, head, (SQL_SELECT*) 0, &unique->sort, 1 , 1, TRUE)) result= 1; DBUG_RETURN(result); err: - if (enabled_keyread) - head->set_keyread(false); + head->file->ha_end_keyread(); DBUG_RETURN(1); } @@ -11101,6 +11080,7 @@ int QUICK_RANGE_SELECT::reset() HANDLER_BUFFER empty_buf; MY_BITMAP * const save_read_set= head->read_set; MY_BITMAP * const save_write_set= head->write_set; + MY_BITMAP * const save_vcol_set= head->vcol_set; DBUG_ENTER("QUICK_RANGE_SELECT::reset"); last_range= NULL; cur_range= (QUICK_RANGE**) ranges.buffer; @@ -11114,7 +11094,8 @@ int QUICK_RANGE_SELECT::reset() } if (in_ror_merged_scan) - head->column_bitmaps_set_no_signal(&column_bitmap, &column_bitmap); + head->column_bitmaps_set_no_signal(&column_bitmap, &column_bitmap, + &column_bitmap); if (file->inited == handler::NONE) { @@ -11157,8 +11138,8 @@ int QUICK_RANGE_SELECT::reset() err: /* Restore bitmaps set on entry */ if (in_ror_merged_scan) - head->column_bitmaps_set_no_signal(save_read_set, save_write_set); - + head->column_bitmaps_set_no_signal(save_read_set, save_write_set, + save_vcol_set); DBUG_RETURN(error); } @@ -11189,13 +11170,16 @@ int QUICK_RANGE_SELECT::get_next() MY_BITMAP * const save_read_set= head->read_set; MY_BITMAP * const save_write_set= head->write_set; + MY_BITMAP * const save_vcol_set= head->vcol_set; /* We don't need to signal the bitmap change as the bitmap is always the same for this head->file */ - head->column_bitmaps_set_no_signal(&column_bitmap, &column_bitmap); + head->column_bitmaps_set_no_signal(&column_bitmap, &column_bitmap, + &column_bitmap); result= file->multi_range_read_next(&dummy); - head->column_bitmaps_set_no_signal(save_read_set, save_write_set); + head->column_bitmaps_set_no_signal(save_read_set, save_write_set, + save_vcol_set); DBUG_RETURN(result); } @@ -11372,7 +11356,7 @@ QUICK_SELECT_DESC::QUICK_SELECT_DESC(QUICK_RANGE_SELECT *q, used_key_parts (used_key_parts_arg) { QUICK_RANGE *r; - /* + /* Use default MRR implementation for reverse scans. No table engine currently can do an MRR scan with output in reverse index order. */ @@ -11847,62 +11831,76 @@ void QUICK_ROR_UNION_SELECT::add_keys_and_lengths(String *key_names, } -void QUICK_RANGE_SELECT::add_used_key_part_to_set(MY_BITMAP *col_set) +void QUICK_RANGE_SELECT::add_used_key_part_to_set() { uint key_len; KEY_PART *part= key_parts; for (key_len=0; key_len < max_used_key_length; key_len += (part++)->store_length) { - bitmap_set_bit(col_set, part->field->field_index); + /* + We have to use field_index instead of part->field + as for partial fields, part->field points to + a temporary field that is only part of the original + field. field_index always points to the original field + */ + Field *field= head->field[part->field->field_index]; + field->register_field_in_read_map(); } } -void QUICK_GROUP_MIN_MAX_SELECT::add_used_key_part_to_set(MY_BITMAP *col_set) +void QUICK_GROUP_MIN_MAX_SELECT::add_used_key_part_to_set() { uint key_len; KEY_PART_INFO *part= index_info->key_part; for (key_len=0; key_len < max_used_key_length; key_len += (part++)->store_length) { - bitmap_set_bit(col_set, part->field->field_index); + /* + We have to use field_index instead of part->field + as for partial fields, part->field points to + a temporary field that is only part of the original + field. field_index always points to the original field + */ + Field *field= head->field[part->field->field_index]; + field->register_field_in_read_map(); } } -void QUICK_ROR_INTERSECT_SELECT::add_used_key_part_to_set(MY_BITMAP *col_set) +void QUICK_ROR_INTERSECT_SELECT::add_used_key_part_to_set() { List_iterator_fast it(quick_selects); QUICK_SELECT_WITH_RECORD *quick; while ((quick= it++)) { - quick->quick->add_used_key_part_to_set(col_set); + quick->quick->add_used_key_part_to_set(); } } -void QUICK_INDEX_SORT_SELECT::add_used_key_part_to_set(MY_BITMAP *col_set) +void QUICK_INDEX_SORT_SELECT::add_used_key_part_to_set() { QUICK_RANGE_SELECT *quick; List_iterator_fast it(quick_selects); while ((quick= it++)) { - quick->add_used_key_part_to_set(col_set); + quick->add_used_key_part_to_set(); } if (pk_quick_select) - pk_quick_select->add_used_key_part_to_set(col_set); + pk_quick_select->add_used_key_part_to_set(); } -void QUICK_ROR_UNION_SELECT::add_used_key_part_to_set(MY_BITMAP *col_set) +void QUICK_ROR_UNION_SELECT::add_used_key_part_to_set() { QUICK_SELECT_I *quick; List_iterator_fast it(quick_selects); while ((quick= it++)) { - quick->add_used_key_part_to_set(col_set); + quick->add_used_key_part_to_set(); } } @@ -13321,7 +13319,7 @@ QUICK_GROUP_MIN_MAX_SELECT(TABLE *table, JOIN *join_arg, bool have_min_arg, group_prefix_len(group_prefix_len_arg), group_key_parts(group_key_parts_arg), have_min(have_min_arg), have_max(have_max_arg), have_agg_distinct(have_agg_distinct_arg), - seen_first_key(FALSE), doing_key_read(FALSE), min_max_arg_part(min_max_arg_part_arg), + seen_first_key(FALSE), min_max_arg_part(min_max_arg_part_arg), key_infix(key_infix_arg), key_infix_len(key_infix_len_arg), min_functions_it(NULL), max_functions_it(NULL), is_index_scan(is_index_scan_arg) @@ -13461,8 +13459,7 @@ QUICK_GROUP_MIN_MAX_SELECT::~QUICK_GROUP_MIN_MAX_SELECT() if (file->inited != handler::NONE) { DBUG_ASSERT(file == head->file); - if (doing_key_read) - head->set_keyread(false); + head->file->ha_end_keyread(); /* There may be a code path when the same table was first accessed by index, then the index is closed, and the table is scanned (order by + loose scan). @@ -13652,11 +13649,8 @@ int QUICK_GROUP_MIN_MAX_SELECT::reset(void) DBUG_ENTER("QUICK_GROUP_MIN_MAX_SELECT::reset"); seen_first_key= FALSE; - if (!head->key_read) - { - doing_key_read= 1; - head->set_keyread(true); /* We need only the key attributes */ - } + head->file->ha_start_keyread(index); /* We need only the key attributes */ + if ((result= file->ha_index_init(index,1))) { head->file->print_error(result, MYF(0)); diff --git a/sql/opt_range.h b/sql/opt_range.h index 6970b87f6d8..c1f7079ce7f 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -1006,7 +1006,7 @@ public: This is used by an optimization in filesort. */ - virtual void add_used_key_part_to_set(MY_BITMAP *col_set)=0; + virtual void add_used_key_part_to_set()=0; }; @@ -1037,7 +1037,6 @@ class QUICK_RANGE_SELECT : public QUICK_SELECT_I { protected: /* true if we enabled key only reads */ - bool doing_key_read; handler *file; /* Members to deal with case when this quick select is a ROR-merged scan */ @@ -1097,7 +1096,7 @@ public: virtual void replace_handler(handler *new_file) { file= new_file; } QUICK_SELECT_I *make_reverse(uint used_key_parts_arg); - virtual void add_used_key_part_to_set(MY_BITMAP *col_set); + virtual void add_used_key_part_to_set(); private: /* Default copy ctor used by QUICK_SELECT_DESC */ @@ -1261,7 +1260,7 @@ public: /* used to get rows collected in Unique */ READ_RECORD read_record; - virtual void add_used_key_part_to_set(MY_BITMAP *col_set); + virtual void add_used_key_part_to_set(); }; @@ -1336,7 +1335,7 @@ public: void add_keys_and_lengths(String *key_names, String *used_lengths); Explain_quick_select *get_explain(MEM_ROOT *alloc); bool is_keys_used(const MY_BITMAP *fields); - void add_used_key_part_to_set(MY_BITMAP *col_set); + void add_used_key_part_to_set(); #ifndef DBUG_OFF void dbug_dump(int indent, bool verbose); #endif @@ -1416,7 +1415,7 @@ public: void add_keys_and_lengths(String *key_names, String *used_lengths); Explain_quick_select *get_explain(MEM_ROOT *alloc); bool is_keys_used(const MY_BITMAP *fields); - void add_used_key_part_to_set(MY_BITMAP *col_set); + void add_used_key_part_to_set(); #ifndef DBUG_OFF void dbug_dump(int indent, bool verbose); #endif @@ -1560,7 +1559,7 @@ public: bool unique_key_range() { return false; } int get_type() { return QS_TYPE_GROUP_MIN_MAX; } void add_keys_and_lengths(String *key_names, String *used_lengths); - void add_used_key_part_to_set(MY_BITMAP *col_set); + void add_used_key_part_to_set(); #ifndef DBUG_OFF void dbug_dump(int indent, bool verbose); #endif diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index a9222cbca42..dc0caa32998 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -3978,7 +3978,7 @@ SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD *thd) &tmpname, (uint) strlen(path)+1, &group_buff, (!using_unique_constraint ? uniq_tuple_length_arg : 0), - &bitmaps, bitmap_buffer_size(1)*5, + &bitmaps, bitmap_buffer_size(1)*6, NullS)) { if (temp_pool_slot != MY_BIT_NONE) @@ -4053,13 +4053,13 @@ SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD *thd) share->db_plugin= ha_lock_engine(0, TMP_ENGINE_HTON); table->file= get_new_handler(share, &table->mem_root, share->db_type()); - DBUG_ASSERT(uniq_tuple_length_arg <= table->file->max_key_length()); } else { share->db_plugin= ha_lock_engine(0, heap_hton); table->file= get_new_handler(share, &table->mem_root, share->db_type()); + DBUG_ASSERT(uniq_tuple_length_arg <= table->file->max_key_length()); } if (!table->file) goto err; diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index ad3f5aed112..e7bf4658d5c 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -406,7 +406,7 @@ int opt_sum_query(THD *thd, if (!error && reckey_in_range(is_max, &ref, item_field->field, conds, range_fl, prefix_len)) error= HA_ERR_KEY_NOT_FOUND; - table->set_keyread(false); + table->file->ha_end_keyread(); table->file->ha_index_end(); if (error) { @@ -968,7 +968,7 @@ static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref, converted (for example to upper case) */ if (field->part_of_key.is_set(idx)) - table->set_keyread(true); + table->file->ha_start_keyread(idx); DBUG_RETURN(TRUE); } } diff --git a/sql/records.cc b/sql/records.cc index fccfa751c7e..3ec9ea814cc 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -69,7 +69,7 @@ static int rr_index_desc(READ_RECORD *info); bool init_read_record_idx(READ_RECORD *info, THD *thd, TABLE *table, bool print_error, uint idx, bool reverse) { - int error; + int error= 0; DBUG_ENTER("init_read_record_idx"); empty_record(table); @@ -279,6 +279,18 @@ bool init_read_record(READ_RECORD *info,THD *thd, TABLE *table, info->read_record= (addon_field ? rr_unpack_from_buffer : rr_from_pointers); } + else if (table->file->keyread_enabled()) + { + int error; + info->read_record= rr_index_first; + if (!table->file->inited && + (error= table->file->ha_index_init(table->file->keyread, 1))) + { + if (print_error) + table->file->print_error(error, MYF(0)); + DBUG_RETURN(1); + } + } else { DBUG_PRINT("info",("using rr_sequential")); diff --git a/sql/records.h b/sql/records.h index 1928acfd4f4..473cb610be5 100644 --- a/sql/records.h +++ b/sql/records.h @@ -27,6 +27,10 @@ class SQL_SELECT; class Copy_field; class SORT_INFO; +struct READ_RECORD; + +void end_read_record(READ_RECORD *info); + /** A context for reading through a single table using a chosen access method: index read, scan, etc, use of cache, etc. @@ -73,7 +77,8 @@ struct READ_RECORD Copy_field *copy_field; Copy_field *copy_field_end; public: - READ_RECORD() {} + READ_RECORD() : table(NULL), cache(NULL) {} + ~READ_RECORD() { end_read_record(this); } }; bool init_read_record(READ_RECORD *info, THD *thd, TABLE *reg_form, @@ -82,7 +87,6 @@ bool init_read_record(READ_RECORD *info, THD *thd, TABLE *reg_form, bool print_errors, bool disable_rr_cache); bool init_read_record_idx(READ_RECORD *info, THD *thd, TABLE *table, bool print_error, uint idx, bool reverse); -void end_read_record(READ_RECORD *info); void rr_unlock_row(st_join_table *tab); diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc index fd04e233d35..a141d238f78 100644 --- a/sql/rpl_mi.cc +++ b/sql/rpl_mi.cc @@ -1172,7 +1172,7 @@ bool Master_info_index::init_all_master_info() else if (succ_num) // Have some Error and some Success { sql_print_warning("Reading of some Master_info entries failed"); - DBUG_RETURN(2); + DBUG_RETURN(1); } else // All failed { diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc index c753f76c930..0ef13c2cbb7 100644 --- a/sql/rpl_record.cc +++ b/sql/rpl_record.cc @@ -419,8 +419,7 @@ unpack_row(rpl_group_info *rgi, /* Add Extra slave persistent columns */ - int error= 0; - if ((error= fill_extra_persistent_columns(table, cols->n_bits))) + if (int error= fill_extra_persistent_columns(table, cols->n_bits)) DBUG_RETURN(error); /* diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h index 5c637702d04..60a75859050 100644 --- a/sql/rpl_rli.h +++ b/sql/rpl_rli.h @@ -522,7 +522,7 @@ public: } int32 get_sql_delay() { return sql_delay; } - void set_sql_delay(time_t _sql_delay) { sql_delay= _sql_delay; } + void set_sql_delay(int32 _sql_delay) { sql_delay= _sql_delay; } time_t get_sql_delay_end() { return sql_delay_end; } private: diff --git a/sql/session_tracker.h b/sql/session_tracker.h index 3f73b5dc705..684692aae0c 100644 --- a/sql/session_tracker.h +++ b/sql/session_tracker.h @@ -2,7 +2,7 @@ #define SESSION_TRACKER_INCLUDED /* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. - Copyright (c) 2016, MariaDB + Copyright (c) 2016, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -280,7 +280,7 @@ private: inline void update_change_flags(THD *thd) { - tx_changed &= ~TX_CHG_STATE; + tx_changed &= uint(~TX_CHG_STATE); tx_changed |= (tx_curr_state != tx_reported_state) ? TX_CHG_STATE : 0; if (tx_changed != TX_CHG_NONE) mark_as_changed(thd, NULL); diff --git a/sql/set_var.cc b/sql/set_var.cc index 26eb5127a0b..07395e3e708 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -401,7 +401,7 @@ double sys_var::val_real(bool *is_null, switch (show_type()) { case_get_string_as_lex_string; - case_for_integers(return val); + case_for_integers(return (double)val); case_for_double(return val); case SHOW_MY_BOOL: return *(my_bool*)value; default: @@ -464,7 +464,7 @@ bool throw_bounds_warning(THD *thd, const char *name, else llstr(v, buf); - if (thd->is_strict_mode()) + if (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) { my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, buf); return true; @@ -484,7 +484,7 @@ bool throw_bounds_warning(THD *thd, const char *name, bool fixed, double v) my_gcvt(v, MY_GCVT_ARG_DOUBLE, sizeof(buf) - 1, buf, NULL); - if (thd->is_strict_mode()) + if (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) { my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, buf); return true; diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 03fba3fde49..8939910fc29 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -7355,7 +7355,7 @@ ER_UNACCEPTABLE_MUTUAL_RECURSION eng "Unacceptable mutual recursion with anchored table '%s'" ER_REF_TO_RECURSIVE_WITH_TABLE_IN_DERIVED eng "Reference to recursive WITH table '%s' in materialized derived" -ER_NOT_STANDARDS_COMPLIANT_RECURSIVE +ER_NOT_STANDARD_COMPLIANT_RECURSIVE eng "Restrictions imposed on recursive definitions are violated for table '%s'"R_WRONG_WINDOW_SPEC_NAME ER_WRONG_WINDOW_SPEC_NAME eng "Window specification with name '%s' is not defined" @@ -7417,7 +7417,7 @@ ER_BINLOG_UNCOMPRESS_ERROR ER_JSON_BAD_CHR eng "Broken JSON string in argument %d to function '%s' at position %d" ER_JSON_NOT_JSON_CHR - eng "Character disallowd in JSON in argument %d to function '%s' at position %d" + eng "Character disallowed in JSON in argument %d to function '%s' at position %d" ER_JSON_EOS eng "Unexpected end of JSON text in argument %d to function '%s'" ER_JSON_SYNTAX @@ -7438,3 +7438,13 @@ ER_JSON_PATH_ARRAY eng "JSON path should end with an array identifier in argument %d to function '%s'" ER_JSON_ONE_OR_ALL eng "Argument 2 to function '%s' must be "one" or "all"." +ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE + eng "CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE." +ER_GEOJSON_INCORRECT + eng "Incorrect GeoJSON format specified for st_geomfromgeojson function." +ER_GEOJSON_TOO_FEW_POINTS + eng "Incorrect GeoJSON format - too few points for linestring specified." +ER_GEOJSON_NOT_CLOSED + eng "Incorrect GeoJSON format - polygon not closed." +ER_JSON_PATH_EMPTY + eng "Path expression '$' is not allowed in argument %d to function '%s'." diff --git a/sql/signal_handler.cc b/sql/signal_handler.cc index ad7fb873c68..dc90fcae576 100644 --- a/sql/signal_handler.cc +++ b/sql/signal_handler.cc @@ -156,7 +156,7 @@ extern "C" sig_handler handle_fatal_signal(int sig) if (opt_stack_trace) { - my_safe_printf_stderr("Thread pointer: 0x%p\n", thd); + my_safe_printf_stderr("Thread pointer: %p\n", thd); my_safe_printf_stderr("%s", "Attempting backtrace. You can use the following " "information to find out\n" diff --git a/sql/slave.cc b/sql/slave.cc index 05e967c4edb..e031a424ea6 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3445,7 +3445,7 @@ sql_delay_event(Log_event *ev, THD *thd, rpl_group_info *rgi) // The time we will have to sleep before executing the event. unsigned long nap_time= 0; if (sql_delay_end > now) - nap_time= sql_delay_end - now; + nap_time= (ulong)(sql_delay_end - now); DBUG_PRINT("info", ("sql_delay= %lu " "ev->when= %lu " diff --git a/sql/slave.h b/sql/slave.h index b2a1e308aba..38f3b7c8430 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -49,7 +49,7 @@ #include "rpl_filter.h" #include "rpl_tblmap.h" -#define SLAVE_NET_TIMEOUT 3600 +#define SLAVE_NET_TIMEOUT 60 #define MAX_SLAVE_ERROR 2000 diff --git a/sql/sp.cc b/sql/sp.cc index 05f075390c1..a1662cefb9e 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -691,7 +691,7 @@ public: virtual bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl); }; @@ -701,13 +701,13 @@ Silence_deprecated_warning::handle_condition( THD *, uint sql_errno, const char*, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char*, Sql_condition ** cond_hdl) { *cond_hdl= NULL; if (sql_errno == ER_WARN_DEPRECATED_SYNTAX && - level == Sql_condition::WARN_LEVEL_WARN) + *level == Sql_condition::WARN_LEVEL_WARN) return TRUE; return FALSE; @@ -780,7 +780,7 @@ public: virtual bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* message, Sql_condition ** cond_hdl); @@ -794,7 +794,8 @@ bool Bad_db_error_handler::handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level + *level, const char* message, Sql_condition ** cond_hdl) { @@ -1477,7 +1478,7 @@ public: bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) { diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 0b9b503aef3..251b829fb1d 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -523,12 +523,8 @@ check_routine_name(LEX_STRING *ident) my_error(ER_SP_WRONG_NAME, MYF(0), ident->str); return TRUE; } - if (check_string_char_length(ident, 0, NAME_CHAR_LEN, - system_charset_info, 1)) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), ident->str); + if (check_ident_length(ident)) return TRUE; - } return FALSE; } @@ -3152,23 +3148,23 @@ sp_instr_stmt::execute(THD *thd, uint *nextp) thd->query_length()) <= 0) { res= m_lex_keeper.reset_lex_and_exec_core(thd, nextp, FALSE, this); + bool log_slow= !res && thd->enable_slow_log; - if (thd->get_stmt_da()->is_eof()) - { - /* Finalize server status flags after executing a statement. */ + /* Finalize server status flags after executing a statement. */ + if (log_slow || thd->get_stmt_da()->is_eof()) thd->update_server_status(); + if (thd->get_stmt_da()->is_eof()) thd->protocol->end_statement(); - } query_cache_end_of_result(thd); mysql_audit_general(thd, MYSQL_AUDIT_GENERAL_STATUS, - thd->get_stmt_da()->is_error() ? - thd->get_stmt_da()->sql_errno() : 0, - command_name[COM_QUERY].str); + thd->get_stmt_da()->is_error() ? + thd->get_stmt_da()->sql_errno() : 0, + command_name[COM_QUERY].str); - if (!res && unlikely(thd->enable_slow_log)) + if (log_slow) log_slow_statement(thd); } else diff --git a/sql/spatial.cc b/sql/spatial.cc index 9c4fe168fe3..7c9d8bb771e 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -58,12 +58,14 @@ Geometry::Class_info *Geometry::ci_collection[Geometry::wkb_last+1]= static Geometry::Class_info **ci_collection_end= Geometry::ci_collection+Geometry::wkb_last + 1; -Geometry::Class_info::Class_info(const char *name, int type_id, - create_geom_t create_func): +Geometry::Class_info::Class_info(const char *name, const char *geojson_name, + int type_id, create_geom_t create_func): m_type_id(type_id), m_create_func(create_func) { m_name.str= (char *) name; m_name.length= strlen(name); + m_geojson_name.str= (char *) geojson_name; + m_geojson_name.length= strlen(geojson_name); ci_collection[type_id]= this; } @@ -105,26 +107,27 @@ static Geometry *create_geometrycollection(char *buffer) -static Geometry::Class_info point_class("POINT", +static Geometry::Class_info point_class("POINT", "Point", Geometry::wkb_point, create_point); -static Geometry::Class_info linestring_class("LINESTRING", +static Geometry::Class_info linestring_class("LINESTRING", "LineString", Geometry::wkb_linestring, create_linestring); -static Geometry::Class_info polygon_class("POLYGON", +static Geometry::Class_info polygon_class("POLYGON", "Polygon", Geometry::wkb_polygon, create_polygon); -static Geometry::Class_info multipoint_class("MULTIPOINT", +static Geometry::Class_info multipoint_class("MULTIPOINT", "MultiPoint", Geometry::wkb_multipoint, create_multipoint); static Geometry::Class_info -multilinestring_class("MULTILINESTRING", +multilinestring_class("MULTILINESTRING", "MultiLineString", Geometry::wkb_multilinestring, create_multilinestring); -static Geometry::Class_info multipolygon_class("MULTIPOLYGON", +static Geometry::Class_info multipolygon_class("MULTIPOLYGON", "MultiPolygon", Geometry::wkb_multipolygon, create_multipolygon); static Geometry::Class_info -geometrycollection_class("GEOMETRYCOLLECTION",Geometry::wkb_geometrycollection, +geometrycollection_class("GEOMETRYCOLLECTION", "GeometryCollection", + Geometry::wkb_geometrycollection, create_geometrycollection); static void get_point(double *x, double *y, const char *data) @@ -230,6 +233,50 @@ int Geometry::as_wkt(String *wkt, const char **end) } +static const uchar type_keyname[]= "type"; +static const int type_keyname_len= 4; +static const uchar coord_keyname[]= "coordinates"; +static const int coord_keyname_len= 11; +static const uchar geometries_keyname[]= "geometries"; +static const int geometries_keyname_len= 10; +static const uchar features_keyname[]= "features"; +static const int features_keyname_len= 8; +static const uchar geometry_keyname[]= "geometry"; +static const int geometry_keyname_len= 8; + +static const int max_keyname_len= 11; /*'coordinates' keyname is the longest.*/ + +static const uchar feature_type[]= "feature"; +static const int feature_type_len= 7; +static const uchar feature_coll_type[]= "featurecollection"; +static const int feature_coll_type_len= 17; + + +int Geometry::as_json(String *wkt, uint max_dec_digits, const char **end) +{ + uint32 len= (uint) get_class_info()->m_geojson_name.length; + if (wkt->reserve(4 + type_keyname_len + 2 + len + 2 + 2 + + coord_keyname_len + 4, 512)) + return 1; + wkt->qs_append("{\"", 2); + wkt->qs_append((const char *) type_keyname, type_keyname_len); + wkt->qs_append("\": \"", 4); + wkt->qs_append(get_class_info()->m_geojson_name.str, len); + wkt->qs_append("\", \"", 4); + if (get_class_info() == &geometrycollection_class) + wkt->qs_append((const char *) geometries_keyname, geometries_keyname_len); + else + wkt->qs_append((const char *) coord_keyname, coord_keyname_len); + + wkt->qs_append("\": ", 3); + if (get_data_as_json(wkt, max_dec_digits, end) || + wkt->reserve(1)) + return 1; + wkt->qs_append('}'); + return 0; +} + + static double wkb_get_double(const char *ptr, Geometry::wkbByteOrder bo) { double res; @@ -291,6 +338,196 @@ Geometry *Geometry::create_from_wkb(Geometry_buffer *buffer, } +Geometry *Geometry::create_from_json(Geometry_buffer *buffer, + json_engine_t *je, String *res) +{ + Class_info *ci= NULL; + const uchar *coord_start= NULL, *geom_start= NULL, + *features_start= NULL, *geometry_start= NULL; + Geometry *result; + uchar key_buf[max_keyname_len]; + uint key_len; + int fcoll_type_found= 0, feature_type_found= 0; + + + if (json_read_value(je)) + goto err_return; + + if (je->value_type != JSON_VALUE_OBJECT) + { + je->s.error= GEOJ_INCORRECT_GEOJSON; + goto err_return; + } + + while (json_scan_next(je) == 0 && je->state != JST_OBJ_END) + { + DBUG_ASSERT(je->state == JST_KEY); + + key_len=0; + while (json_read_keyname_chr(je) == 0) + { + if (je->s.c_next > 127 || key_len >= max_keyname_len) + { + /* Symbol out of range, or keyname too long. No need to compare.. */ + key_len=0; + break; + } + key_buf[key_len++]= (uchar)je->s.c_next | 0x20; /* make it lowercase. */ + } + + if (je->s.error) + goto err_return; + + if (key_len == type_keyname_len && + memcmp(key_buf, type_keyname, type_keyname_len) == 0) + { + /* + Found the "type" key. Let's check it's a string and remember + the feature's type. + */ + if (json_read_value(je)) + goto err_return; + + if (je->value_type == JSON_VALUE_STRING) + { + if ((ci= find_class((const char *) je->value, je->value_len))) + { + if ((coord_start= + (ci == &geometrycollection_class) ? geom_start : coord_start)) + goto create_geom; + } + else if (je->value_len == feature_coll_type_len && + my_strnncoll(&my_charset_latin1, je->value, je->value_len, + feature_coll_type, feature_coll_type_len) == 0) + { + /* + 'FeatureCollection' type found. Handle the 'Featurecollection'/'features' + GeoJSON construction. + */ + if (features_start) + goto handle_feature_collection; + fcoll_type_found= 1; + } + else if (je->value_len == feature_type_len && + my_strnncoll(&my_charset_latin1, je->value, je->value_len, + feature_type, feature_type_len) == 0) + { + if (geometry_start) + goto handle_geometry_key; + feature_type_found= 1; + } + } + } + else if (key_len == coord_keyname_len && + memcmp(key_buf, coord_keyname, coord_keyname_len) == 0) + { + /* + Found the "coordinates" key. Let's check it's an array + and remember where it starts. + */ + if (json_read_value(je)) + goto err_return; + + if (je->value_type == JSON_VALUE_ARRAY) + { + coord_start= je->value_begin; + if (ci && ci != &geometrycollection_class) + goto create_geom; + } + } + else if (key_len == geometries_keyname_len && + memcmp(key_buf, geometries_keyname, geometries_keyname_len) == 0) + { + /* + Found the "geometries" key. Let's check it's an array + and remember where it starts. + */ + if (json_read_value(je)) + goto err_return; + + if (je->value_type == JSON_VALUE_ARRAY) + { + geom_start= je->value_begin; + if (ci == &geometrycollection_class) + { + coord_start= geom_start; + goto create_geom; + } + } + } + else if (key_len == features_keyname_len && + memcmp(key_buf, features_keyname, features_keyname_len) == 0) + { + /* + 'features' key found. Handle the 'Featurecollection'/'features' + GeoJSON construction. + */ + if (json_read_value(je)) + goto err_return; + if (je->value_type == JSON_VALUE_ARRAY) + { + features_start= je->value_begin; + if (fcoll_type_found) + goto handle_feature_collection; + } + } + else if (key_len == geometry_keyname_len && + memcmp(key_buf, geometry_keyname, geometry_keyname_len) == 0) + { + if (json_read_value(je)) + goto err_return; + if (je->value_type == JSON_VALUE_OBJECT) + { + geometry_start= je->value_begin; + if (feature_type_found) + goto handle_geometry_key; + } + } + else + { + if (json_skip_key(je)) + goto err_return; + } + } + + if (je->s.error == 0) + { + /* + We didn't find all the required keys. That are "type" and "coordinates" + or "geometries" for GeometryCollection. + */ + je->s.error= GEOJ_INCORRECT_GEOJSON; + } + goto err_return; + +handle_feature_collection: + ci= &geometrycollection_class; + coord_start= features_start; + +create_geom: + + json_scan_start(je, je->s.cs, coord_start, je->s.str_end); + + if (res->reserve(1 + 4, 512)) + goto err_return; + + result= (*ci->m_create_func)(buffer->data); + res->q_append((char) wkb_ndr); + res->q_append((uint32) result->get_class_info()->m_type_id); + if (result->init_from_json(je, res)) + goto err_return; + + return result; + +handle_geometry_key: + json_scan_start(je, je->s.cs, geometry_start, je->s.str_end); + return create_from_json(buffer, je, res); + +err_return: + return NULL; +} + + Geometry *Geometry::create_from_opresult(Geometry_buffer *g_buf, String *res, Gcalc_result_receiver &rr) { @@ -429,6 +666,47 @@ const char *Geometry::append_points(String *txt, uint32 n_points, } +static void append_json_point(String *txt, uint max_dec, const char *data) +{ + double x,y; + get_point(&x, &y, data); + txt->qs_append('['); + txt->qs_append(x); + txt->qs_append(", ", 2); + txt->qs_append(y); + txt->qs_append(']'); +} + + +/* + Append N points from packed format to json + + SYNOPSIS + append_json_points() + txt Append points here + n_points Number of points + data Packed data + offset Offset between points + + RETURN + # end of data +*/ + +static const char *append_json_points(String *txt, uint max_dec, + uint32 n_points, const char *data, uint32 offset) +{ + txt->qs_append('['); + while (n_points--) + { + data+= offset; + append_json_point(txt, max_dec, data); + data+= POINT_DATA_SIZE; + txt->qs_append(", ", 2); + } + txt->length(txt->length() - 2);// Remove ending ', ' + txt->qs_append(']'); + return data; +} /* Get most bounding rectangle (mbr) for X points @@ -502,6 +780,58 @@ uint Gis_point::init_from_wkb(const char *wkb, uint len, } +static int read_point_from_json(json_engine_t *je, double *x, double *y) +{ + int n_coord= 0, err; + double tmp, *d; + char *endptr; + + while (json_scan_next(je) == 0 && je->state != JST_ARRAY_END) + { + DBUG_ASSERT(je->state == JST_VALUE); + if (json_read_value(je)) + return 1; + + if (je->value_type != JSON_VALUE_NUMBER) + goto bad_coordinates; + + d= (n_coord == 0) ? x : ((n_coord == 1) ? y : &tmp); + *d= my_strntod(je->s.cs, (char *) je->value, + je->value_len, &endptr, &err); + if (err) + goto bad_coordinates; + n_coord++; + } + + return 0; +bad_coordinates: + je->s.error= Geometry::GEOJ_INCORRECT_GEOJSON; + return 1; +} + + +bool Gis_point::init_from_json(json_engine_t *je, String *wkb) +{ + double x, y; + if (json_read_value(je)) + return TRUE; + + if (je->value_type != JSON_VALUE_ARRAY) + { + je->s.error= GEOJ_INCORRECT_GEOJSON; + return TRUE; + } + + if (read_point_from_json(je, &x, &y) || + wkb->reserve(POINT_DATA_SIZE)) + return TRUE; + + wkb->q_append(x); + wkb->q_append(y); + return FALSE; +} + + bool Gis_point::get_data_as_wkt(String *txt, const char **end) const { double x, y; @@ -517,6 +847,17 @@ bool Gis_point::get_data_as_wkt(String *txt, const char **end) const } +bool Gis_point::get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const +{ + if (txt->reserve(MAX_DIGITS_IN_DOUBLE * 2 + 4)) + return 1; + append_json_point(txt, max_dec_digits, m_data); + *end= m_data+ POINT_DATA_SIZE; + return 0; +} + + bool Gis_point::get_mbr(MBR *mbr, const char **end) const { double x, y; @@ -630,6 +971,43 @@ uint Gis_line_string::init_from_wkb(const char *wkb, uint len, } +bool Gis_line_string::init_from_json(json_engine_t *je, String *wkb) +{ + uint32 n_points= 0; + uint32 np_pos= wkb->length(); + Gis_point p; + + if (json_read_value(je)) + return TRUE; + + if (je->value_type != JSON_VALUE_ARRAY) + { + je->s.error= GEOJ_INCORRECT_GEOJSON; + return TRUE; + } + + if (wkb->reserve(4, 512)) + return TRUE; + wkb->length(wkb->length()+4); // Reserve space for n_points + + while (json_scan_next(je) == 0 && je->state != JST_ARRAY_END) + { + DBUG_ASSERT(je->state == JST_VALUE); + + if (p.init_from_json(je, wkb)) + return TRUE; + n_points++; + } + if (n_points < 1) + { + je->s.error= GEOJ_TOO_FEW_POINTS; + return TRUE; + } + wkb->write_at_position(np_pos, n_points); + return FALSE; +} + + bool Gis_line_string::get_data_as_wkt(String *txt, const char **end) const { uint32 n_points; @@ -661,6 +1039,28 @@ bool Gis_line_string::get_data_as_wkt(String *txt, const char **end) const } +bool Gis_line_string::get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const +{ + uint32 n_points; + const char *data= m_data; + + if (no_data(data, 4)) + return 1; + n_points= uint4korr(data); + data += 4; + + if (n_points < 1 || + not_enough_points(data, n_points) || + txt->reserve((MAX_DIGITS_IN_DOUBLE*2 + 6) * n_points + 2)) + return 1; + + *end= append_json_points(txt, max_dec_digits, n_points, data, 0); + + return 0; +} + + bool Gis_line_string::get_mbr(MBR *mbr, const char **end) const { return (*end=get_mbr_for_points(mbr, m_data, 0)) == 0; @@ -854,7 +1254,7 @@ bool Gis_polygon::init_from_wkt(Gis_read_stream *trs, String *wkb) if (wkb->reserve(4, 512)) return 1; - wkb->length(wkb->length()+4); // Reserve space for points + wkb->length(wkb->length()+4); // Reserve space for n_rings for (;;) { Gis_line_string ls; @@ -964,6 +1364,46 @@ uint Gis_polygon::init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, } +bool Gis_polygon::init_from_json(json_engine_t *je, String *wkb) +{ + uint32 n_linear_rings= 0; + uint32 lr_pos= wkb->length(); + int closed; + + if (json_read_value(je)) + return TRUE; + + if (je->value_type != JSON_VALUE_ARRAY) + { + je->s.error= GEOJ_INCORRECT_GEOJSON; + return TRUE; + } + + if (wkb->reserve(4, 512)) + return TRUE; + wkb->length(wkb->length()+4); // Reserve space for n_rings + + while (json_scan_next(je) == 0 && je->state != JST_ARRAY_END) + { + Gis_line_string ls; + DBUG_ASSERT(je->state == JST_VALUE); + + uint32 ls_pos=wkb->length(); + if (ls.init_from_json(je, wkb)) + return TRUE; + ls.set_data_ptr(wkb->ptr() + ls_pos, wkb->length() - ls_pos); + if (ls.is_closed(&closed) || !closed) + { + je->s.error= GEOJ_POLYGON_NOT_CLOSED; + return TRUE; + } + n_linear_rings++; + } + wkb->write_at_position(lr_pos, n_linear_rings); + return FALSE; +} + + bool Gis_polygon::get_data_as_wkt(String *txt, const char **end) const { uint32 n_linear_rings; @@ -996,6 +1436,39 @@ bool Gis_polygon::get_data_as_wkt(String *txt, const char **end) const } +bool Gis_polygon::get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const +{ + uint32 n_linear_rings; + const char *data= m_data; + + if (no_data(data, 4) || txt->reserve(1, 512)) + return 1; + + n_linear_rings= uint4korr(data); + data+= 4; + + txt->qs_append('['); + while (n_linear_rings--) + { + uint32 n_points; + if (no_data(data, 4)) + return 1; + n_points= uint4korr(data); + data+= 4; + if (not_enough_points(data, n_points) || + txt->reserve(4 + (MAX_DIGITS_IN_DOUBLE * 2 + 6) * n_points)) + return 1; + data= append_json_points(txt, max_dec_digits, n_points, data, 0); + txt->qs_append(", ", 2); + } + txt->length(txt->length() - 2);// Remove ending ', ' + txt->qs_append(']'); + *end= data; + return 0; +} + + bool Gis_polygon::get_mbr(MBR *mbr, const char **end) const { uint32 n_linear_rings; @@ -1382,6 +1855,44 @@ uint Gis_multi_point::init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, } +bool Gis_multi_point::init_from_json(json_engine_t *je, String *wkb) +{ + uint32 n_points= 0; + uint32 np_pos= wkb->length(); + Gis_point p; + + if (json_read_value(je)) + return TRUE; + + if (je->value_type != JSON_VALUE_ARRAY) + { + je->s.error= GEOJ_INCORRECT_GEOJSON; + return TRUE; + } + + if (wkb->reserve(4, 512)) + return TRUE; + wkb->length(wkb->length()+4); // Reserve space for n_points + + while (json_scan_next(je) == 0 && je->state != JST_ARRAY_END) + { + DBUG_ASSERT(je->state == JST_VALUE); + + if (wkb->reserve(1 + 4, 512)) + return TRUE; + wkb->q_append((char) wkb_ndr); + wkb->q_append((uint32) wkb_point); + + if (p.init_from_json(je, wkb)) + return TRUE; + n_points++; + } + + wkb->write_at_position(np_pos, n_points); + return FALSE; +} + + bool Gis_multi_point::get_data_as_wkt(String *txt, const char **end) const { uint32 n_points; @@ -1399,6 +1910,24 @@ bool Gis_multi_point::get_data_as_wkt(String *txt, const char **end) const } +bool Gis_multi_point::get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const +{ + uint32 n_points; + if (no_data(m_data, 4)) + return 1; + + n_points= uint4korr(m_data); + if (n_points > max_n_points || + not_enough_points(m_data+4, n_points, WKB_HEADER_SIZE) || + txt->reserve((MAX_DIGITS_IN_DOUBLE * 2 + 6) * n_points + 2)) + return 1; + *end= append_json_points(txt, max_dec_digits, n_points, m_data+4, + WKB_HEADER_SIZE); + return 0; +} + + bool Gis_multi_point::get_mbr(MBR *mbr, const char **end) const { return (*end= get_mbr_for_points(mbr, m_data, WKB_HEADER_SIZE)) == 0; @@ -1594,6 +2123,44 @@ uint Gis_multi_line_string::init_from_wkb(const char *wkb, uint len, } +bool Gis_multi_line_string::init_from_json(json_engine_t *je, String *wkb) +{ + uint32 n_line_strings= 0; + uint32 ls_pos= wkb->length(); + + if (json_read_value(je)) + return TRUE; + + if (je->value_type != JSON_VALUE_ARRAY) + { + je->s.error= GEOJ_INCORRECT_GEOJSON; + return TRUE; + } + + if (wkb->reserve(4, 512)) + return TRUE; + wkb->length(wkb->length()+4); // Reserve space for n_rings + + while (json_scan_next(je) == 0 && je->state != JST_ARRAY_END) + { + Gis_line_string ls; + DBUG_ASSERT(je->state == JST_VALUE); + + if (wkb->reserve(1 + 4, 512)) + return TRUE; + wkb->q_append((char) wkb_ndr); + wkb->q_append((uint32) wkb_linestring); + + if (ls.init_from_json(je, wkb)) + return TRUE; + + n_line_strings++; + } + wkb->write_at_position(ls_pos, n_line_strings); + return FALSE; +} + + bool Gis_multi_line_string::get_data_as_wkt(String *txt, const char **end) const { @@ -1626,6 +2193,38 @@ bool Gis_multi_line_string::get_data_as_wkt(String *txt, } +bool Gis_multi_line_string::get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const +{ + uint32 n_line_strings; + const char *data= m_data; + + if (no_data(data, 4) || txt->reserve(1, 512)) + return 1; + n_line_strings= uint4korr(data); + data+= 4; + + txt->qs_append('['); + while (n_line_strings--) + { + uint32 n_points; + if (no_data(data, (WKB_HEADER_SIZE + 4))) + return 1; + n_points= uint4korr(data + WKB_HEADER_SIZE); + data+= WKB_HEADER_SIZE + 4; + if (not_enough_points(data, n_points) || + txt->reserve(2 + (MAX_DIGITS_IN_DOUBLE * 2 + 6) * n_points)) + return 1; + data= append_json_points(txt, max_dec_digits, n_points, data, 0); + txt->qs_append(", ", 2); + } + txt->length(txt->length() - 2); + txt->qs_append(']'); + *end= data; + return 0; +} + + bool Gis_multi_line_string::get_mbr(MBR *mbr, const char **end) const { uint32 n_line_strings; @@ -1912,6 +2511,44 @@ uint Gis_multi_polygon::init_from_opresult(String *bin, } +bool Gis_multi_polygon::init_from_json(json_engine_t *je, String *wkb) +{ + uint32 n_polygons= 0; + int np_pos= wkb->length(); + Gis_polygon p; + + if (json_read_value(je)) + return TRUE; + + if (je->value_type != JSON_VALUE_ARRAY) + { + je->s.error= GEOJ_INCORRECT_GEOJSON; + return TRUE; + } + + if (wkb->reserve(4, 512)) + return TRUE; + wkb->length(wkb->length()+4); // Reserve space for n_rings + + while (json_scan_next(je) == 0 && je->state != JST_ARRAY_END) + { + DBUG_ASSERT(je->state == JST_VALUE); + + if (wkb->reserve(1 + 4, 512)) + return TRUE; + wkb->q_append((char) wkb_ndr); + wkb->q_append((uint32) wkb_polygon); + + if (p.init_from_json(je, wkb)) + return TRUE; + + n_polygons++; + } + wkb->write_at_position(np_pos, n_polygons); + return FALSE; +} + + bool Gis_multi_polygon::get_data_as_wkt(String *txt, const char **end) const { uint32 n_polygons; @@ -1956,6 +2593,51 @@ bool Gis_multi_polygon::get_data_as_wkt(String *txt, const char **end) const } +bool Gis_multi_polygon::get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const +{ + uint32 n_polygons; + const char *data= m_data; + + if (no_data(data, 4) || txt->reserve(1, 512)) + return 1; + n_polygons= uint4korr(data); + data+= 4; + + txt->q_append('['); + while (n_polygons--) + { + uint32 n_linear_rings; + if (no_data(data, 4 + WKB_HEADER_SIZE) || + txt->reserve(1, 512)) + return 1; + n_linear_rings= uint4korr(data+WKB_HEADER_SIZE); + data+= 4 + WKB_HEADER_SIZE; + txt->q_append('['); + + while (n_linear_rings--) + { + if (no_data(data, 4)) + return 1; + uint32 n_points= uint4korr(data); + data+= 4; + if (not_enough_points(data, n_points) || + txt->reserve(2 + (MAX_DIGITS_IN_DOUBLE * 2 + 6) * n_points, + 512)) + return 1; + data= append_json_points(txt, max_dec_digits, n_points, data, 0); + txt->qs_append(", ", 2); + } + txt->length(txt->length() - 2); + txt->qs_append("], ", 3); + } + txt->length(txt->length() - 2); + txt->q_append(']'); + *end= data; + return 0; +} + + bool Gis_multi_polygon::get_mbr(MBR *mbr, const char **end) const { uint32 n_polygons; @@ -2304,6 +2986,47 @@ uint Gis_geometry_collection::init_from_wkb(const char *wkb, uint len, } +bool Gis_geometry_collection::init_from_json(json_engine_t *je, String *wkb) +{ + uint32 n_objects= 0; + uint32 no_pos= wkb->length(); + Geometry_buffer buffer; + Geometry *g; + + if (json_read_value(je)) + return TRUE; + + if (je->value_type != JSON_VALUE_ARRAY) + { + je->s.error= GEOJ_INCORRECT_GEOJSON; + return TRUE; + } + + if (wkb->reserve(4, 512)) + return TRUE; + wkb->length(wkb->length()+4); // Reserve space for n_objects + + while (json_scan_next(je) == 0 && je->state != JST_ARRAY_END) + { + json_engine_t sav_je= *je; + + DBUG_ASSERT(je->state == JST_VALUE); + + if (!(g= create_from_json(&buffer, je, wkb))) + return TRUE; + + *je= sav_je; + if (json_skip_array_item(je)) + return TRUE; + + n_objects++; + } + + wkb->write_at_position(no_pos, n_objects); + return FALSE; +} + + bool Gis_geometry_collection::get_data_as_wkt(String *txt, const char **end) const { @@ -2348,6 +3071,44 @@ exit: } +bool Gis_geometry_collection::get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const +{ + uint32 n_objects; + Geometry_buffer buffer; + Geometry *geom; + const char *data= m_data; + + if (no_data(data, 4) || txt->reserve(1, 512)) + return 1; + n_objects= uint4korr(data); + data+= 4; + + txt->qs_append('['); + while (n_objects--) + { + uint32 wkb_type; + + if (no_data(data, WKB_HEADER_SIZE)) + return 1; + wkb_type= uint4korr(data + 1); + data+= WKB_HEADER_SIZE; + + if (!(geom= create_by_typeid(&buffer, wkb_type))) + return 1; + geom->set_data_ptr(data, (uint) (m_data_end - data)); + if (geom->as_json(txt, max_dec_digits, &data) || + txt->append(STRING_WITH_LEN(", "), 512)) + return 1; + } + txt->length(txt->length() - 2); + txt->qs_append(']'); + + *end= data; + return 0; +} + + bool Gis_geometry_collection::get_mbr(MBR *mbr, const char **end) const { uint32 n_objects; diff --git a/sql/spatial.h b/sql/spatial.h index 2e449844d47..3858c0d2e51 100644 --- a/sql/spatial.h +++ b/sql/spatial.h @@ -20,6 +20,7 @@ #include "sql_string.h" /* String, LEX_STRING */ #include +#include #ifdef HAVE_SPATIAL @@ -249,6 +250,13 @@ public: wkb_xdr= 0, /* Big Endian */ wkb_ndr= 1 /* Little Endian */ }; + enum geojson_errors + { + GEOJ_INCORRECT_GEOJSON= 1, + GEOJ_TOO_FEW_POINTS= 2, + GEOJ_POLYGON_NOT_CLOSED= 3, + }; + /** Callback which creates Geometry objects on top of a given placement. */ typedef Geometry *(*create_geom_t)(char *); @@ -257,9 +265,11 @@ public: { public: LEX_STRING m_name; + LEX_STRING m_geojson_name; int m_type_id; create_geom_t m_create_func; - Class_info(const char *name, int type_id, create_geom_t create_func); + Class_info(const char *name, const char *gejson_name, + int type_id, create_geom_t create_func); }; virtual const Class_info *get_class_info() const=0; @@ -271,8 +281,11 @@ public: virtual uint init_from_opresult(String *bin, const char *opres, uint res_len) { return init_from_wkb(opres + 4, UINT_MAX32, wkb_ndr, bin) + 4; } + virtual bool init_from_json(json_engine_t *je, String *wkb) {return true;} virtual bool get_data_as_wkt(String *txt, const char **end) const=0; + virtual bool get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const=0; virtual bool get_mbr(MBR *mbr, const char **end) const=0; virtual bool dimension(uint32 *dim, const char **end) const=0; virtual int get_x(double *x) const { return -1; } @@ -302,9 +315,12 @@ public: bool init_stream=1); static Geometry *create_from_wkb(Geometry_buffer *buffer, const char *wkb, uint32 len, String *res); + static Geometry *create_from_json(Geometry_buffer *buffer, + json_engine_t *je, String *res); static Geometry *create_from_opresult(Geometry_buffer *g_buf, String *res, Gcalc_result_receiver &rr); int as_wkt(String *wkt, const char **end); + int as_json(String *wkt, uint max_dec_digits, const char **end); inline void set_data_ptr(const char *data, uint32 data_len) { @@ -379,7 +395,10 @@ public: uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); + bool init_from_json(json_engine_t *je, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; + bool get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const; bool get_mbr(MBR *mbr, const char **end) const; int get_xy(double *x, double *y) const @@ -431,7 +450,10 @@ public: uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); + bool init_from_json(json_engine_t *je, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; + bool get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const; bool get_mbr(MBR *mbr, const char **end) const; int geom_length(double *len, const char **end) const; int area(double *ar, const char **end) const; @@ -462,7 +484,10 @@ public: bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_opresult(String *bin, const char *opres, uint res_len); + bool init_from_json(json_engine_t *je, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; + bool get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const; bool get_mbr(MBR *mbr, const char **end) const; int area(double *ar, const char **end) const; int exterior_ring(String *result) const; @@ -496,7 +521,10 @@ public: bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_opresult(String *bin, const char *opres, uint res_len); + bool init_from_json(json_engine_t *je, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; + bool get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const; bool get_mbr(MBR *mbr, const char **end) const; int num_geometries(uint32 *num) const; int geometry_n(uint32 num, String *result) const; @@ -522,7 +550,10 @@ public: bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_opresult(String *bin, const char *opres, uint res_len); + bool init_from_json(json_engine_t *je, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; + bool get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const; bool get_mbr(MBR *mbr, const char **end) const; int num_geometries(uint32 *num) const; int geometry_n(uint32 num, String *result) const; @@ -549,7 +580,10 @@ public: uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); + bool init_from_json(json_engine_t *je, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; + bool get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const; bool get_mbr(MBR *mbr, const char **end) const; int num_geometries(uint32 *num) const; int geometry_n(uint32 num, String *result) const; @@ -578,7 +612,10 @@ public: bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_opresult(String *bin, const char *opres, uint res_len); + bool init_from_json(json_engine_t *je, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; + bool get_data_as_json(String *txt, uint max_dec_digits, + const char **end) const; bool get_mbr(MBR *mbr, const char **end) const; int area(double *ar, const char **end) const; int geom_length(double *len, const char **end) const; diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index ce7de2ed72b..d18a5b4d503 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -365,6 +365,10 @@ static bool show_table_and_column_privileges(THD *, const char *, const char *, static int show_routine_grants(THD *, const char *, const char *, HASH *, const char *, int, char *, int); +class Grant_tables; +class User_table; +class Proxies_priv_table; + class ACL_PROXY_USER :public ACL_ACCESS { acl_host_and_ip host; @@ -412,14 +416,7 @@ public: with_grant_arg); } - void init(TABLE *table, MEM_ROOT *mem) - { - init (get_field(mem, table->field[MYSQL_PROXIES_PRIV_HOST]), - get_field(mem, table->field[MYSQL_PROXIES_PRIV_USER]), - get_field(mem, table->field[MYSQL_PROXIES_PRIV_PROXIED_HOST]), - get_field(mem, table->field[MYSQL_PROXIES_PRIV_PROXIED_USER]), - table->field[MYSQL_PROXIES_PRIV_WITH_GRANT]->val_int() != 0); - } + void init(const Proxies_priv_table& proxies_priv_table, MEM_ROOT *mem); bool get_with_grant() { return with_grant; } const char *get_user() { return user; } @@ -731,7 +728,6 @@ static DYNAMIC_ARRAY acl_wild_hosts; static Hash_filo *acl_cache; static uint grant_version=0; /* Version of priv tables. incremented by acl_load */ static ulong get_access(TABLE *form,uint fieldnr, uint *next_field=0); -static bool check_is_role(TABLE *form); static int acl_compare(ACL_ACCESS *a,ACL_ACCESS *b); static ulong get_sort(uint count,...); static void init_check_host(void); @@ -742,12 +738,12 @@ static ACL_USER *find_user_wild(const char *host, const char *user, const char * static ACL_ROLE *find_acl_role(const char *user); static ROLE_GRANT_PAIR *find_role_grant_pair(const LEX_STRING *u, const LEX_STRING *h, const LEX_STRING *r); static ACL_USER_BASE *find_acl_user_base(const char *user, const char *host); -static bool update_user_table(THD *, TABLE *, const char *, const char *, const +static bool update_user_table(THD *, const User_table &, const char *, const char *, const char *, uint); -static bool acl_load(THD *thd, TABLE_LIST *tables); -static bool grant_load(THD *thd, TABLE_LIST *tables); +static bool acl_load(THD *thd, const Grant_tables& grant_tables); static inline void get_grantor(THD *thd, char* grantor); static bool add_role_user_mapping(const char *uname, const char *hname, const char *rname); +static bool get_YN_as_bool(Field *field); #define ROLE_CYCLE_FOUND 2 static int traverse_role_graph_up(ACL_ROLE *, void *, @@ -784,31 +780,641 @@ static const int Table_procs_priv= 1 << PROCS_PRIV_TABLE; static const int Table_proxies_priv= 1 << PROXIES_PRIV_TABLE; static const int Table_roles_mapping= 1 << ROLES_MAPPING_TABLE; -static int open_grant_tables(THD *thd, TABLE_LIST *tables, - enum thr_lock_type lock_type, int tables_to_open); +/** + Base class representing a generic grant table from the mysql database. -const LEX_STRING acl_table_names[]= // matches enum_acl_tables + The potential tables that this class can represent are: + user, db, columns_priv, tables_priv, host, procs_priv, proxies_priv, + roles_mapping + + Objects belonging to this parent class can only be constructed by the + Grants_table class. This ensures the correct initialization of the objects. +*/ +class Grant_table_base { - { C_STRING_WITH_LEN("user") }, - { C_STRING_WITH_LEN("db") }, - { C_STRING_WITH_LEN("tables_priv") }, - { C_STRING_WITH_LEN("columns_priv") }, - { C_STRING_WITH_LEN("host") }, - { C_STRING_WITH_LEN("procs_priv") }, - { C_STRING_WITH_LEN("proxies_priv") }, - { C_STRING_WITH_LEN("roles_mapping") } + public: + /* Number of fields for this Grant Table. */ + uint num_fields() const { return tl.table->s->fields; } + /* Check if the table exists after an attempt to open it was made. + Some tables, such as the host table in MySQL 5.6.7+ are missing. */ + bool table_exists() const { return tl.table; }; + /* Initializes the READ_RECORD structure provided as a parameter + to read through the whole table, with all columns available. Cleaning up + is the caller's job. */ + bool init_read_record(READ_RECORD* info, THD* thd) const + { + DBUG_ASSERT(tl.table); + bool result= ::init_read_record(info, thd, tl.table, NULL, NULL, 1, + true, false); + if (!result) + tl.table->use_all_columns(); + return result; + } + + /* Return the number of privilege columns for this table. */ + uint num_privileges() const { return num_privilege_cols; } + /* Return a privilege column by index. */ + Field* priv_field(uint privilege_idx) const + { + DBUG_ASSERT(privilege_idx < num_privileges()); + return tl.table->field[start_privilege_column + privilege_idx]; + } + + /* Fetch the privileges from the table as a set of bits. The first column + is represented by the first bit in the result, the second column by the + second bit, etc. */ + ulong get_access() const + { + return get_access(start_privilege_column, + start_privilege_column + num_privileges() - 1); + } + + /* Return the underlying TABLE handle. */ + TABLE* table() const + { + return tl.table; + } + + /** Check if the table was opened, issue an error otherwise. */ + int no_such_table() const + { + if (table_exists()) + return 0; + + my_error(ER_NO_SUCH_TABLE, MYF(0), tl.db, tl.alias); + return 1; + } + + + protected: + friend class Grant_tables; + + Grant_table_base() : start_privilege_column(0), num_privilege_cols(0) + { + bzero(&tl, sizeof(tl)); + }; + + /* Initialization sequence common for all grant tables. This should be called + after all table-specific initialization is performed. */ + void init(enum thr_lock_type lock_type, bool is_optional) + { + tl.open_type= OT_BASE_ONLY; + if (lock_type >= TL_WRITE_ALLOW_WRITE) + tl.updating= 1; + if (is_optional) + tl.open_strategy= TABLE_LIST::OPEN_IF_EXISTS; + } + + /* + Get all access bits from table between start_field and end_field indices. + + IMPLEMENTATION + The record should be already read in table->record[0]. All privileges + are specified as an ENUM(Y,N). + + SYNOPSIS + get_access() + start_field_idx The field index at which the first privilege + specification begins. + end_field_idx The field index at which the last privilege + specification is located. + + RETURN VALUE + privilege mask + */ + ulong get_access(uint start_field_idx, uint end_field_idx) const + { + ulong access_bits= 0, bit= 1; + for (uint i = start_field_idx; i <= end_field_idx; i++, bit<<=1) + { + if (get_YN_as_bool(tl.table->field[i])) + access_bits|= bit; + } + return access_bits; + } + + /* Compute how many privilege columns this table has. This method + can only be called after the table has been opened. + + IMPLEMENTATION + A privilege column is of type enum('Y', 'N'). Privilege columns are + expected to be one after another. + */ + void compute_num_privilege_cols() + { + if (!table_exists()) // Table does not exist or not opened. + return; + + num_privilege_cols= 0; + for (uint i= 0; i < num_fields(); i++) + { + Field *field= tl.table->field[i]; + if (num_privilege_cols > 0 && field->real_type() != MYSQL_TYPE_ENUM) + return; + if (field->real_type() == MYSQL_TYPE_ENUM && + static_cast(field)->typelib->count == 2) + { + num_privilege_cols++; + if (num_privilege_cols == 1) + start_privilege_column= i; + } + } + } + + /* The index at which privilege columns start. */ + uint start_privilege_column; + /* The number of privilege columns in the table. */ + uint num_privilege_cols; + + TABLE_LIST tl; }; -/** check if the table was opened, issue an error otherwise */ -static int no_such_table(TABLE_LIST *tl) +class User_table: public Grant_table_base { - if (tl->table) - return 0; + public: + /* Field getters return NULL if the column is not present in the table. + This is consistent only if the table is in a supported version. We do + not guard against corrupt tables. (yet) */ + Field* host() const + { return get_field(0); } + Field* user() const + { return get_field(1); } + Field* password() const + { return have_password() ? NULL : tl.table->field[2]; } + /* Columns after privilege columns. */ + Field* ssl_type() const + { return get_field(start_privilege_column + num_privileges()); } + Field* ssl_cipher() const + { return get_field(start_privilege_column + num_privileges() + 1); } + Field* x509_issuer() const + { return get_field(start_privilege_column + num_privileges() + 2); } + Field* x509_subject() const + { return get_field(start_privilege_column + num_privileges() + 3); } + Field* max_questions() const + { return get_field(start_privilege_column + num_privileges() + 4); } + Field* max_updates() const + { return get_field(start_privilege_column + num_privileges() + 5); } + Field* max_connections() const + { return get_field(start_privilege_column + num_privileges() + 6); } + Field* max_user_connections() const + { return get_field(start_privilege_column + num_privileges() + 7); } + Field* plugin() const + { return get_field(start_privilege_column + num_privileges() + 8); } + Field* authentication_string() const + { return get_field(start_privilege_column + num_privileges() + 9); } + Field* password_expired() const + { return get_field(start_privilege_column + num_privileges() + 10); } + Field* is_role() const + { return get_field(start_privilege_column + num_privileges() + 11); } + Field* default_role() const + { return get_field(start_privilege_column + num_privileges() + 12); } + Field* max_statement_time() const + { return get_field(start_privilege_column + num_privileges() + 13); } - my_error(ER_NO_SUCH_TABLE, MYF(0), tl->db, tl->alias); - return 1; + /* + Check if a user entry in the user table is marked as being a role entry + + IMPLEMENTATION + Access the coresponding column and check the coresponding ENUM of the form + ENUM('N', 'Y') + + SYNOPSIS + check_is_role() + form an open table to read the entry from. + The record should be already read in table->record[0] + + RETURN VALUE + TRUE if the user is marked as a role + FALSE otherwise + */ + bool check_is_role() const + { + /* Table version does not support roles */ + if (!is_role()) + return false; + + return get_YN_as_bool(is_role()); + } + + + private: + friend class Grant_tables; + + /* Only Grant_tables can instantiate this class. */ + User_table() {}; + + void init(enum thr_lock_type lock_type) + { + /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */ + tl.init_one_table(C_STRING_WITH_LEN("mysql"), + C_STRING_WITH_LEN("user"), + NULL, lock_type); + Grant_table_base::init(lock_type, false); + } + + /* The user table is a bit different compared to the other Grant tables. + Usually, we only add columns to the grant tables when adding functionality. + This makes it easy to test which version of the table we are using, by + just looking at the number of fields present in the table. + + In MySQL 5.7.6 the Password column was removed. We need to guard for that. + The field-fetching methods for the User table return NULL if the field + doesn't exist. This simplifies checking of table "version", as we don't + have to make use of num_fields() any more. + */ + inline Field* get_field(uint field_num) const + { + if (field_num >= num_fields()) + return NULL; + + return tl.table->field[field_num]; + } + + /* Normally password column is the third column in the table. If privileges + start on the third column instead, we are missing the password column. + This means we are using a MySQL 5.7.6+ data directory. */ + bool have_password() const { return start_privilege_column == 2; } + +}; + +class Db_table: public Grant_table_base +{ + public: + Field* host() const { return tl.table->field[0]; } + Field* db() const { return tl.table->field[1]; } + Field* user() const { return tl.table->field[2]; } + + private: + friend class Grant_tables; + + Db_table() {}; + + void init(enum thr_lock_type lock_type) + { + /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */ + tl.init_one_table(C_STRING_WITH_LEN("mysql"), + C_STRING_WITH_LEN("db"), + NULL, lock_type); + Grant_table_base::init(lock_type, false); + } +}; + +class Tables_priv_table: public Grant_table_base +{ + public: + Field* host() const { return tl.table->field[0]; } + Field* db() const { return tl.table->field[1]; } + Field* user() const { return tl.table->field[2]; } + Field* table_name() const { return tl.table->field[3]; } + Field* grantor() const { return tl.table->field[4]; } + Field* timestamp() const { return tl.table->field[5]; } + Field* table_priv() const { return tl.table->field[6]; } + Field* column_priv() const { return tl.table->field[7]; } + + private: + friend class Grant_tables; + + Tables_priv_table() {}; + + void init(enum thr_lock_type lock_type, Grant_table_base *next_table= NULL) + { + /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */ + tl.init_one_table(C_STRING_WITH_LEN("mysql"), + C_STRING_WITH_LEN("tables_priv"), + NULL, lock_type); + Grant_table_base::init(lock_type, false); + } +}; + +class Columns_priv_table: public Grant_table_base +{ + public: + Field* host() const { return tl.table->field[0]; } + Field* db() const { return tl.table->field[1]; } + Field* user() const { return tl.table->field[2]; } + Field* table_name() const { return tl.table->field[3]; } + Field* column_name() const { return tl.table->field[4]; } + Field* timestamp() const { return tl.table->field[5]; } + Field* column_priv() const { return tl.table->field[6]; } + + private: + friend class Grant_tables; + + Columns_priv_table() {}; + + void init(enum thr_lock_type lock_type) + { + /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */ + tl.init_one_table(C_STRING_WITH_LEN("mysql"), + C_STRING_WITH_LEN("columns_priv"), + NULL, lock_type); + Grant_table_base::init(lock_type, false); + } +}; + +class Host_table: public Grant_table_base +{ + public: + Field* host() const { return tl.table->field[0]; } + Field* db() const { return tl.table->field[1]; } + + private: + friend class Grant_tables; + + Host_table() {} + + void init(enum thr_lock_type lock_type) + { + /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */ + tl.init_one_table(C_STRING_WITH_LEN("mysql"), + C_STRING_WITH_LEN("host"), + NULL, lock_type); + Grant_table_base::init(lock_type, true); + } +}; + +class Procs_priv_table: public Grant_table_base +{ + public: + Field* host() const { return tl.table->field[0]; } + Field* db() const { return tl.table->field[1]; } + Field* user() const { return tl.table->field[2]; } + Field* routine_name() const { return tl.table->field[3]; } + Field* routine_type() const { return tl.table->field[4]; } + Field* grantor() const { return tl.table->field[5]; } + Field* proc_priv() const { return tl.table->field[6]; } + Field* timestamp() const { return tl.table->field[7]; } + + private: + friend class Grant_tables; + + Procs_priv_table() {} + + void init(enum thr_lock_type lock_type) + { + /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */ + tl.init_one_table(C_STRING_WITH_LEN("mysql"), + C_STRING_WITH_LEN("procs_priv"), + NULL, lock_type); + Grant_table_base::init(lock_type, true); + } +}; + +class Proxies_priv_table: public Grant_table_base +{ + public: + Field* host() const { return tl.table->field[0]; } + Field* user() const { return tl.table->field[1]; } + Field* proxied_host() const { return tl.table->field[2]; } + Field* proxied_user() const { return tl.table->field[3]; } + Field* with_grant() const { return tl.table->field[4]; } + Field* grantor() const { return tl.table->field[5]; } + Field* timestamp() const { return tl.table->field[6]; } + + private: + friend class Grant_tables; + + Proxies_priv_table() {} + + void init(enum thr_lock_type lock_type) + { + /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */ + tl.init_one_table(C_STRING_WITH_LEN("mysql"), + C_STRING_WITH_LEN("proxies_priv"), + NULL, lock_type); + Grant_table_base::init(lock_type, true); + } +}; + +class Roles_mapping_table: public Grant_table_base +{ + public: + Field* host() const { return tl.table->field[0]; } + Field* user() const { return tl.table->field[1]; } + Field* role() const { return tl.table->field[2]; } + Field* admin_option() const { return tl.table->field[3]; } + + private: + friend class Grant_tables; + + Roles_mapping_table() {} + + void init(enum thr_lock_type lock_type) + { + /* We are relying on init_one_table zeroing out the TABLE_LIST structure. */ + tl.init_one_table(C_STRING_WITH_LEN("mysql"), + C_STRING_WITH_LEN("roles_mapping"), + NULL, lock_type); + Grant_table_base::init(lock_type, true); + } +}; + +/** + Class that represents a collection of grant tables. +*/ +class Grant_tables +{ + public: + /* When constructing the Grant_tables object, we initialize only + the tables which are going to be opened. + @param which_tables Bitmap of which tables to open. + @param lock_type Lock type to use when opening tables. + */ + Grant_tables(int which_tables, enum thr_lock_type lock_type) + { + DBUG_ENTER("Grant_tables::Grant_tables"); + DBUG_PRINT("info", ("which_tables: %x, lock_type: %u", + which_tables, lock_type)); + DBUG_ASSERT(which_tables); /* At least one table must be opened. */ + Grant_table_base* prev= NULL; + /* We start from the last table, Table_roles_mapping, such that + the first one in the linked list is Table_user. */ + if (which_tables & Table_roles_mapping) + { + m_roles_mapping_table.init(lock_type); + prev= &m_roles_mapping_table; + } + if (which_tables & Table_proxies_priv) + { + m_proxies_priv_table.init(lock_type); + link_tables(&m_proxies_priv_table, prev); + prev= &m_proxies_priv_table; + } + if (which_tables & Table_procs_priv) + { + m_procs_priv_table.init(lock_type); + link_tables(&m_procs_priv_table, prev); + prev= &m_procs_priv_table; + } + if (which_tables & Table_host) + { + m_host_table.init(lock_type); + link_tables(&m_host_table, prev); + prev= &m_host_table; + } + if (which_tables & Table_columns_priv) + { + m_columns_priv_table.init(lock_type); + link_tables(&m_columns_priv_table, prev); + prev= &m_columns_priv_table; + } + if (which_tables & Table_tables_priv) + { + m_tables_priv_table.init(lock_type); + link_tables(&m_tables_priv_table, prev); + prev= &m_tables_priv_table; + } + if (which_tables & Table_db) + { + m_db_table.init(lock_type); + link_tables(&m_db_table, prev); + prev= &m_db_table; + } + if (which_tables & Table_user) + { + m_user_table.init(lock_type); + link_tables(&m_user_table, prev); + prev= &m_user_table; + } + + first_table_in_list= prev; + DBUG_VOID_RETURN; + } + + /* Before any operation is possible on grant tables, they must be opened. + This opens the tables according to the lock type specified during + construction. + + @retval 1 replication filters matched. Abort the operation, + but return OK (!) + @retval 0 tables were opened successfully + @retval -1 error, tables could not be opened + */ + int open_and_lock(THD *thd) + { + DBUG_ENTER("Grant_tables::open_and_lock"); + DBUG_ASSERT(first_table_in_list); +#ifdef HAVE_REPLICATION + if (first_table_in_list->tl.lock_type >= TL_WRITE_ALLOW_WRITE && + thd->slave_thread && !thd->spcont) + { + /* + GRANT and REVOKE are applied the slave in/exclusion rules as they are + some kind of updates to the mysql.% tables. + */ + Rpl_filter *rpl_filter= thd->system_thread_info.rpl_sql_info->rpl_filter; + if (rpl_filter->is_on() && + !rpl_filter->tables_ok(0, &first_table_in_list->tl)) + DBUG_RETURN(1); + } +#endif + if (open_and_lock_tables(thd, &first_table_in_list->tl, FALSE, + MYSQL_LOCK_IGNORE_TIMEOUT)) + DBUG_RETURN(-1); + + /* + We can read privilege tables even when !initialized. + This can be acl_load() - server startup or FLUSH PRIVILEGES + */ + if (first_table_in_list->tl.lock_type >= TL_WRITE_ALLOW_WRITE && + !initialized) + { + my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-grant-tables"); + DBUG_RETURN(-1); + } + + /* The privilge columns vary based on MariaDB version. Figure out + how many we have after we've opened the table. */ + m_user_table.compute_num_privilege_cols(); + m_db_table.compute_num_privilege_cols(); + m_tables_priv_table.compute_num_privilege_cols(); + m_columns_priv_table.compute_num_privilege_cols(); + m_host_table.compute_num_privilege_cols(); + m_procs_priv_table.compute_num_privilege_cols(); + m_proxies_priv_table.compute_num_privilege_cols(); + m_roles_mapping_table.compute_num_privilege_cols(); + DBUG_RETURN(0); + } + + inline const User_table& user_table() const + { + return m_user_table; + } + + inline const Db_table& db_table() const + { + return m_db_table; + } + + + inline const Tables_priv_table& tables_priv_table() const + { + return m_tables_priv_table; + } + + inline const Columns_priv_table& columns_priv_table() const + { + return m_columns_priv_table; + } + + inline const Host_table& host_table() const + { + return m_host_table; + } + + inline const Procs_priv_table& procs_priv_table() const + { + return m_procs_priv_table; + } + + inline const Proxies_priv_table& proxies_priv_table() const + { + return m_proxies_priv_table; + } + + inline const Roles_mapping_table& roles_mapping_table() const + { + return m_roles_mapping_table; + } + + private: + User_table m_user_table; + Db_table m_db_table; + Tables_priv_table m_tables_priv_table; + Columns_priv_table m_columns_priv_table; + Host_table m_host_table; + Procs_priv_table m_procs_priv_table; + Proxies_priv_table m_proxies_priv_table; + Roles_mapping_table m_roles_mapping_table; + + /* The grant tables are set-up in a linked list. We keep the head of it. */ + Grant_table_base *first_table_in_list; + /** + Chain two grant tables' TABLE_LIST members. + */ + static void link_tables(Grant_table_base *from, Grant_table_base *to) + { + DBUG_ASSERT(from); + if (to) + from->tl.next_local= from->tl.next_global= &to->tl; + else + from->tl.next_local= from->tl.next_global= NULL; + } +}; + + +void ACL_PROXY_USER::init(const Proxies_priv_table& proxies_priv_table, + MEM_ROOT *mem) +{ + init(get_field(mem, proxies_priv_table.host()), + get_field(mem, proxies_priv_table.user()), + get_field(mem, proxies_priv_table.proxied_host()), + get_field(mem, proxies_priv_table.proxied_user()), + proxies_priv_table.with_grant()->val_int() != 0); } + + /* Enumeration of various ACL's and Hashes used in handle_grant_struct() */ @@ -892,7 +1498,7 @@ static my_bool do_validate(THD *, plugin_ref plugin, void *arg) } -static bool validate_password(LEX_USER *user) +static bool validate_password(LEX_USER *user, THD *thd) { if (user->pwtext.length || !user->pwhash.length) { @@ -908,7 +1514,8 @@ static bool validate_password(LEX_USER *user) } else { - if (strict_password_validation && has_validation_plugins()) + if (!thd->slave_thread && + strict_password_validation && has_validation_plugins()) { my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--strict-password-validation"); return true; @@ -1193,33 +1800,30 @@ static bool set_user_plugin (ACL_USER *user, int password_len) TRUE Error */ -static bool acl_load(THD *thd, TABLE_LIST *tables) +static bool acl_load(THD *thd, const Grant_tables& tables) { - TABLE *table; READ_RECORD read_record_info; - bool return_val= TRUE; bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE; char tmp_name[SAFE_NAME_LEN+1]; int password_length; - sql_mode_t old_sql_mode= thd->variables.sql_mode; + Sql_mode_save old_mode_save(thd); DBUG_ENTER("acl_load"); thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH; grant_version++; /* Privileges updated */ + const Host_table& host_table= tables.host_table(); init_sql_alloc(&acl_memroot, ACL_ALLOC_BLOCK_SIZE, 0, MYF(0)); - if ((table= tables[HOST_TABLE].table)) // "host" table may not exist (e.g. in MySQL 5.6.7+) + if (host_table.table_exists()) // "host" table may not exist (e.g. in MySQL 5.6.7+) { - if (init_read_record(&read_record_info, thd, table, NULL, NULL, - 1, 1, FALSE)) - goto end; - table->use_all_columns(); + if (host_table.init_read_record(&read_record_info, thd)) + DBUG_RETURN(true); while (!(read_record_info.read_record(&read_record_info))) { ACL_HOST host; - update_hostname(&host.host,get_field(&acl_memroot, table->field[0])); - host.db= get_field(&acl_memroot, table->field[1]); + update_hostname(&host.host, get_field(&acl_memroot, host_table.host())); + host.db= get_field(&acl_memroot, host_table.db()); if (lower_case_table_names && host.db) { /* @@ -1240,9 +1844,9 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) "possible to remove this privilege using REVOKE.", host.host.hostname, host.db); } - host.access= get_access(table,2); + host.access= host_table.get_access(); host.access= fix_rights_for_db(host.access); - host.sort= get_sort(2,host.host.hostname,host.db); + host.sort= get_sort(2, host.host.hostname, host.db); if (check_no_resolve && hostname_requires_resolving(host.host.hostname)) { sql_print_warning("'host' entry '%s|%s' " @@ -1252,7 +1856,7 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) continue; } #ifndef TO_BE_REMOVED - if (table->s->fields == 8) + if (host_table.num_fields() == 8) { // Without grant if (host.access & CREATE_ACL) host.access|=REFERENCES_ACL | INDEX_ACL | ALTER_ACL | CREATE_TMP_ACL; @@ -1260,60 +1864,62 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) #endif (void) push_dynamic(&acl_hosts,(uchar*) &host); } - my_qsort((uchar*) dynamic_element(&acl_hosts,0,ACL_HOST*),acl_hosts.elements, - sizeof(ACL_HOST),(qsort_cmp) acl_compare); + my_qsort((uchar*) dynamic_element(&acl_hosts, 0, ACL_HOST*), + acl_hosts.elements, sizeof(ACL_HOST),(qsort_cmp) acl_compare); end_read_record(&read_record_info); } freeze_size(&acl_hosts); - if (init_read_record(&read_record_info, thd, table=tables[USER_TABLE].table, - NULL, NULL, 1, 1, FALSE)) - goto end; - table->use_all_columns(); + const User_table& user_table= tables.user_table(); + if (user_table.init_read_record(&read_record_info, thd)) + DBUG_RETURN(true); - username_char_length= MY_MIN(table->field[1]->char_length(), + username_char_length= MY_MIN(user_table.user()->char_length(), USERNAME_CHAR_LENGTH); - password_length= table->field[2]->field_length / - table->field[2]->charset()->mbmaxlen; - if (password_length < SCRAMBLED_PASSWORD_CHAR_LENGTH_323) + if (user_table.password()) // Password column might be missing. (MySQL 5.7.6+) { - sql_print_error("Fatal error: mysql.user table is damaged or in " - "unsupported 3.20 format."); - goto end; - } - - DBUG_PRINT("info",("user table fields: %d, password length: %d", - table->s->fields, password_length)); - - mysql_mutex_lock(&LOCK_global_system_variables); - if (password_length < SCRAMBLED_PASSWORD_CHAR_LENGTH) - { - if (opt_secure_auth) + password_length= user_table.password()->field_length / + user_table.password()->charset()->mbmaxlen; + if (password_length < SCRAMBLED_PASSWORD_CHAR_LENGTH_323) { - mysql_mutex_unlock(&LOCK_global_system_variables); - sql_print_error("Fatal error: mysql.user table is in old format, " - "but server started with --secure-auth option."); - goto end; + sql_print_error("Fatal error: mysql.user table is damaged or in " + "unsupported 3.20 format."); + DBUG_RETURN(TRUE); + } + + DBUG_PRINT("info",("user table fields: %d, password length: %d", + user_table.num_fields(), password_length)); + + mysql_mutex_lock(&LOCK_global_system_variables); + if (password_length < SCRAMBLED_PASSWORD_CHAR_LENGTH) + { + if (opt_secure_auth) + { + mysql_mutex_unlock(&LOCK_global_system_variables); + sql_print_error("Fatal error: mysql.user table is in old format, " + "but server started with --secure-auth option."); + DBUG_RETURN(TRUE); + } + mysql_user_table_is_in_short_password_format= true; + if (global_system_variables.old_passwords) + mysql_mutex_unlock(&LOCK_global_system_variables); + else + { + extern sys_var *Sys_old_passwords_ptr; + Sys_old_passwords_ptr->value_origin= sys_var::AUTO; + global_system_variables.old_passwords= 1; + mysql_mutex_unlock(&LOCK_global_system_variables); + sql_print_warning("mysql.user table is not updated to new password format; " + "Disabling new password usage until " + "mysql_fix_privilege_tables is run"); + } + thd->variables.old_passwords= 1; } - mysql_user_table_is_in_short_password_format= true; - if (global_system_variables.old_passwords) - mysql_mutex_unlock(&LOCK_global_system_variables); else { - extern sys_var *Sys_old_passwords_ptr; - Sys_old_passwords_ptr->value_origin= sys_var::AUTO; - global_system_variables.old_passwords= 1; + mysql_user_table_is_in_short_password_format= false; mysql_mutex_unlock(&LOCK_global_system_variables); - sql_print_warning("mysql.user table is not updated to new password format; " - "Disabling new password usage until " - "mysql_fix_privilege_tables is run"); } - thd->variables.old_passwords= 1; - } - else - { - mysql_user_table_is_in_short_password_format= false; - mysql_mutex_unlock(&LOCK_global_system_variables); } allow_all_hosts=0; @@ -1322,8 +1928,8 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) ACL_USER user; bool is_role= FALSE; bzero(&user, sizeof(user)); - update_hostname(&user.host, get_field(&acl_memroot, table->field[0])); - char *username= get_field(&acl_memroot, table->field[1]); + update_hostname(&user.host, get_field(&acl_memroot, user_table.host())); + char *username= get_field(&acl_memroot, user_table.user()); user.user.str= username; user.user.length= safe_strlen(username); @@ -1331,7 +1937,7 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) If the user entry is a role, skip password and hostname checks A user can not log in with a role so some checks are not necessary */ - is_role= check_is_role(table); + is_role= user_table.check_is_role(); if (is_role && is_invalid_role_name(username)) { @@ -1349,7 +1955,9 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) continue; } - char *password= get_field(&acl_memroot, table->field[2]); + char *password= const_cast(""); + if (user_table.password()) + password= get_field(&acl_memroot, user_table.password()); uint password_len= safe_strlen(password); user.auth_string.str= safe_str(password); user.auth_string.length= password_len; @@ -1357,30 +1965,29 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) if (!is_role && set_user_plugin(&user, password_len)) continue; - + { - uint next_field; - user.access= get_access(table,3,&next_field) & GLOBAL_ACLS; + user.access= user_table.get_access() & GLOBAL_ACLS; /* if it is pre 5.0.1 privilege table then map CREATE privilege on CREATE VIEW & SHOW VIEW privileges */ - if (table->s->fields <= 31 && (user.access & CREATE_ACL)) + if (user_table.num_fields() <= 31 && (user.access & CREATE_ACL)) user.access|= (CREATE_VIEW_ACL | SHOW_VIEW_ACL); /* if it is pre 5.0.2 privilege table then map CREATE/ALTER privilege on CREATE PROCEDURE & ALTER PROCEDURE privileges */ - if (table->s->fields <= 33 && (user.access & CREATE_ACL)) + if (user_table.num_fields() <= 33 && (user.access & CREATE_ACL)) user.access|= CREATE_PROC_ACL; - if (table->s->fields <= 33 && (user.access & ALTER_ACL)) + if (user_table.num_fields() <= 33 && (user.access & ALTER_ACL)) user.access|= ALTER_PROC_ACL; /* pre 5.0.3 did not have CREATE_USER_ACL */ - if (table->s->fields <= 36 && (user.access & GRANT_ACL)) + if (user_table.num_fields() <= 36 && (user.access & GRANT_ACL)) user.access|= CREATE_USER_ACL; @@ -1388,13 +1995,13 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) if it is pre 5.1.6 privilege table then map CREATE privilege on CREATE|ALTER|DROP|EXECUTE EVENT */ - if (table->s->fields <= 37 && (user.access & SUPER_ACL)) + if (user_table.num_fields() <= 37 && (user.access & SUPER_ACL)) user.access|= EVENT_ACL; /* if it is pre 5.1.6 privilege then map TRIGGER privilege on CREATE. */ - if (table->s->fields <= 38 && (user.access & SUPER_ACL)) + if (user_table.num_fields() <= 38 && (user.access & SUPER_ACL)) user.access|= TRIGGER_ACL; user.sort= get_sort(2, user.host.hostname, user.user.str); @@ -1403,9 +2010,9 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) user.user_resource.max_statement_time= 0.0; /* Starting from 4.0.2 we have more fields */ - if (table->s->fields >= 31) + if (user_table.ssl_type()) { - char *ssl_type=get_field(thd->mem_root, table->field[next_field++]); + char *ssl_type=get_field(thd->mem_root, user_table.ssl_type()); if (!ssl_type) user.ssl_type=SSL_TYPE_NONE; else if (!strcmp(ssl_type, "ANY")) @@ -1415,37 +2022,38 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) else /* !strcmp(ssl_type, "SPECIFIED") */ user.ssl_type=SSL_TYPE_SPECIFIED; - user.ssl_cipher= get_field(&acl_memroot, table->field[next_field++]); - user.x509_issuer= get_field(&acl_memroot, table->field[next_field++]); - user.x509_subject= get_field(&acl_memroot, table->field[next_field++]); + user.ssl_cipher= get_field(&acl_memroot, user_table.ssl_cipher()); + user.x509_issuer= get_field(&acl_memroot, user_table.x509_issuer()); + user.x509_subject= get_field(&acl_memroot, user_table.x509_subject()); - char *ptr = get_field(thd->mem_root, table->field[next_field++]); + char *ptr = get_field(thd->mem_root, user_table.max_questions()); user.user_resource.questions=ptr ? atoi(ptr) : 0; - ptr = get_field(thd->mem_root, table->field[next_field++]); + ptr = get_field(thd->mem_root, user_table.max_updates()); user.user_resource.updates=ptr ? atoi(ptr) : 0; - ptr = get_field(thd->mem_root, table->field[next_field++]); + ptr = get_field(thd->mem_root, user_table.max_connections()); user.user_resource.conn_per_hour= ptr ? atoi(ptr) : 0; if (user.user_resource.questions || user.user_resource.updates || user.user_resource.conn_per_hour) mqh_used=1; - if (table->s->fields >= 36) + if (user_table.max_user_connections()) { /* Starting from 5.0.3 we have max_user_connections field */ - ptr= get_field(thd->mem_root, table->field[next_field++]); + ptr= get_field(thd->mem_root, user_table.max_user_connections()); user.user_resource.user_conn= ptr ? atoi(ptr) : 0; } - if (!is_role && table->s->fields >= 41) + if (!is_role && user_table.plugin()) { /* We may have plugin & auth_String fields */ - char *tmpstr= get_field(&acl_memroot, table->field[next_field++]); + char *tmpstr= get_field(&acl_memroot, user_table.plugin()); if (tmpstr) { user.plugin.str= tmpstr; user.plugin.length= strlen(user.plugin.str); user.auth_string.str= - safe_str(get_field(&acl_memroot, table->field[next_field++])); + safe_str(get_field(&acl_memroot, + user_table.authentication_string())); user.auth_string.length= strlen(user.auth_string.str); if (user.auth_string.length && password_len) @@ -1461,11 +2069,11 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) } } - if (table->s->fields > MAX_STATEMENT_TIME_COLUMN_IDX) + if (user_table.max_statement_time()) { /* Starting from 10.1.1 we can have max_statement_time */ ptr= get_field(thd->mem_root, - table->field[MAX_STATEMENT_TIME_COLUMN_IDX]); + user_table.max_statement_time()); user.user_resource.max_statement_time= ptr ? atof(ptr) : 0.0; } } @@ -1473,7 +2081,7 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) { user.ssl_type=SSL_TYPE_NONE; #ifndef TO_BE_REMOVED - if (table->s->fields <= 13) + if (user_table.num_fields() <= 13) { // Without grant if (user.access & CREATE_ACL) user.access|=REFERENCES_ACL | INDEX_ACL | ALTER_ACL; @@ -1491,10 +2099,10 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) 8, 8, MYF(0)); /* check default role, if any */ - if (!is_role && table->s->fields > DEFAULT_ROLE_COLUMN_IDX) + if (!is_role && user_table.default_role()) { user.default_rolename.str= - get_field(&acl_memroot, table->field[DEFAULT_ROLE_COLUMN_IDX]); + get_field(&acl_memroot, user_table.default_role()); user.default_rolename.length= safe_strlen(user.default_rolename.str); } @@ -1524,19 +2132,18 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) end_read_record(&read_record_info); freeze_size(&acl_users); - if (init_read_record(&read_record_info, thd, table=tables[DB_TABLE].table, - NULL, NULL, 1, 1, FALSE)) - goto end; - table->use_all_columns(); + const Db_table& db_table= tables.db_table(); + if (db_table.init_read_record(&read_record_info, thd)) + DBUG_RETURN(TRUE); while (!(read_record_info.read_record(&read_record_info))) { ACL_DB db; - db.user=get_field(&acl_memroot, table->field[MYSQL_DB_FIELD_USER]); - const char *hostname= get_field(&acl_memroot, table->field[MYSQL_DB_FIELD_HOST]); + db.user=get_field(&acl_memroot, db_table.user()); + const char *hostname= get_field(&acl_memroot, db_table.host()); if (!hostname && find_acl_role(db.user)) hostname= ""; update_hostname(&db.host, hostname); - db.db=get_field(&acl_memroot, table->field[MYSQL_DB_FIELD_DB]); + db.db=get_field(&acl_memroot, db_table.db()); if (!db.db) { sql_print_warning("Found an entry in the 'db' table with empty database name; Skipped"); @@ -1545,11 +2152,11 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) if (check_no_resolve && hostname_requires_resolving(db.host.hostname)) { sql_print_warning("'db' entry '%s %s@%s' " - "ignored in --skip-name-resolve mode.", + "ignored in --skip-name-resolve mode.", db.db, safe_str(db.user), safe_str(db.host.hostname)); continue; } - db.access=get_access(table,3); + db.access= db_table.get_access(); db.access=fix_rights_for_db(db.access); db.initial_access= db.access; if (lower_case_table_names) @@ -1576,7 +2183,7 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) } db.sort=get_sort(3,db.host.hostname,db.db,db.user); #ifndef TO_BE_REMOVED - if (table->s->fields <= 9) + if (db_table.num_fields() <= 9) { // Without grant if (db.access & CREATE_ACL) db.access|=REFERENCES_ACL | INDEX_ACL | ALTER_ACL; @@ -1589,23 +2196,19 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) end_read_record(&read_record_info); freeze_size(&acl_dbs); - if ((table= tables[PROXIES_PRIV_TABLE].table)) + const Proxies_priv_table& proxies_priv_table= tables.proxies_priv_table(); + if (proxies_priv_table.table_exists()) { - if (init_read_record(&read_record_info, thd, table, - NULL, NULL, 1, 1, FALSE)) - goto end; - table->use_all_columns(); + if (proxies_priv_table.init_read_record(&read_record_info, thd)) + DBUG_RETURN(TRUE); while (!(read_record_info.read_record(&read_record_info))) { ACL_PROXY_USER proxy; - proxy.init(table, &acl_memroot); + proxy.init(proxies_priv_table, &acl_memroot); if (proxy.check_validity(check_no_resolve)) continue; if (push_dynamic(&acl_proxy_users, (uchar*) &proxy)) - { - end_read_record(&read_record_info); - goto end; - } + DBUG_RETURN(TRUE); } my_qsort((uchar*) dynamic_element(&acl_proxy_users, 0, ACL_PROXY_USER*), acl_proxy_users.elements, @@ -1619,21 +2222,20 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) } freeze_size(&acl_proxy_users); - if ((table= tables[ROLES_MAPPING_TABLE].table)) + const Roles_mapping_table& roles_mapping_table= tables.roles_mapping_table(); + if (roles_mapping_table.table_exists()) { - if (init_read_record(&read_record_info, thd, table, NULL, NULL, 1, 1, - FALSE)) - goto end; - table->use_all_columns(); + if (roles_mapping_table.init_read_record(&read_record_info, thd)) + DBUG_RETURN(TRUE); MEM_ROOT temp_root; init_alloc_root(&temp_root, ACL_ALLOC_BLOCK_SIZE, 0, MYF(0)); while (!(read_record_info.read_record(&read_record_info))) { - char *hostname= safe_str(get_field(&temp_root, table->field[0])); - char *username= safe_str(get_field(&temp_root, table->field[1])); - char *rolename= safe_str(get_field(&temp_root, table->field[2])); - bool with_grant_option= get_YN_as_bool(table->field[3]); + char *hostname= safe_str(get_field(&temp_root, roles_mapping_table.host())); + char *username= safe_str(get_field(&temp_root, roles_mapping_table.user())); + char *rolename= safe_str(get_field(&temp_root, roles_mapping_table.role())); + bool with_grant_option= get_YN_as_bool(roles_mapping_table.admin_option()); if (add_role_user_mapping(username, hostname, rolename)) { sql_print_error("Invalid roles_mapping table entry user:'%s@%s', rolename:'%s'", @@ -1661,12 +2263,7 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) init_check_host(); initialized=1; - return_val= FALSE; - -end: - end_read_record(&read_record_info); - thd->variables.sql_mode= old_sql_mode; - DBUG_RETURN(return_val); + DBUG_RETURN(FALSE); } @@ -1714,19 +2311,19 @@ void acl_free(bool end) bool acl_reload(THD *thd) { - TABLE_LIST tables[TABLES_MAX]; DYNAMIC_ARRAY old_acl_hosts, old_acl_users, old_acl_dbs, old_acl_proxy_users; HASH old_acl_roles, old_acl_roles_mappings; MEM_ROOT old_mem; int result; DBUG_ENTER("acl_reload"); + Grant_tables tables(Table_host | Table_user | Table_db | Table_proxies_priv | + Table_roles_mapping, TL_READ); /* To avoid deadlocks we should obtain table locks before obtaining acl_cache->lock mutex. */ - if ((result= open_grant_tables(thd, tables, TL_READ, Table_host | - Table_user | Table_db | Table_proxies_priv | Table_roles_mapping))) + if ((result= tables.open_and_lock(thd))) { DBUG_ASSERT(result <= 0); /* @@ -1829,34 +2426,6 @@ static ulong get_access(TABLE *form, uint fieldnr, uint *next_field) return access_bits; } -/* - Check if a user entry in the user table is marked as being a role entry - - IMPLEMENTATION - Access the coresponding column and check the coresponding ENUM of the form - ENUM('N', 'Y') - - SYNOPSIS - check_is_role() - form an open table to read the entry from. - The record should be already read in table->record[0] - - RETURN VALUE - TRUE if the user is marked as a role - FALSE otherwise -*/ - -static bool check_is_role(TABLE *form) -{ - char buff[2]; - String res(buff, sizeof(buff), &my_charset_latin1); - /* Table version does not support roles */ - if (form->s->fields <= ROLE_ASSIGN_COLUMN_IDX) - return FALSE; - - return get_YN_as_bool(form->field[ROLE_ASSIGN_COLUMN_IDX]); -} - /* Return a number which, if sorted 'desc', puts strings in this order: @@ -2748,7 +3317,7 @@ bool check_change_password(THD *thd, LEX_USER *user) LEX_USER *real_user= get_current_user(thd, user); if (fix_and_copy_user(real_user, user, thd) || - validate_password(real_user)) + validate_password(real_user, thd)) return true; *user= *real_user; @@ -2769,7 +3338,7 @@ bool check_change_password(THD *thd, LEX_USER *user) */ bool change_password(THD *thd, LEX_USER *user) { - TABLE_LIST tables[TABLES_MAX]; + Grant_tables tables(Table_user, TL_WRITE); /* Buffer should be extended when password length is extended. */ char buff[512]; ulong query_length= 0; @@ -2804,7 +3373,7 @@ bool change_password(THD *thd, LEX_USER *user) WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, (char*)"user", NULL); } - if ((result= open_grant_tables(thd, tables, TL_WRITE, Table_user))) + if ((result= tables.open_and_lock(thd))) DBUG_RETURN(result != 1); result= 1; @@ -2833,7 +3402,7 @@ bool change_password(THD *thd, LEX_USER *user) ER_SET_PASSWORD_AUTH_PLUGIN, ER_THD(thd, ER_SET_PASSWORD_AUTH_PLUGIN)); - if (update_user_table(thd, tables[USER_TABLE].table, + if (update_user_table(thd, tables.user_table(), safe_str(acl_user->host.hostname), safe_str(acl_user->user.str), user->pwhash.str, user->pwhash.length)) @@ -2878,8 +3447,7 @@ int acl_check_set_default_role(THD *thd, const char *host, const char *user) int acl_set_default_role(THD *thd, const char *host, const char *user, const char *rolename) { - TABLE_LIST tables[TABLES_MAX]; - TABLE *table; + Grant_tables tables(Table_user, TL_WRITE); char user_key[MAX_KEY_LENGTH]; int result= 1; int error; @@ -2929,83 +3497,93 @@ int acl_set_default_role(THD *thd, const char *host, const char *user, WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, (char*)"user", NULL); } - if ((result= open_grant_tables(thd, tables, TL_WRITE, Table_user))) - DBUG_RETURN(result != 1); - - table= tables[USER_TABLE].table; - result= 1; - - mysql_mutex_lock(&acl_cache->lock); - ACL_USER *acl_user; - if (!(acl_user= find_user_exact(host, user))) + /* + Extra block due to WSREP_TO_ISOLATION_BEGIN using goto. + TODO(cvicentiu) Should move this block out in a new function. + */ { + if ((result= tables.open_and_lock(thd))) + DBUG_RETURN(result != 1); + + const User_table& user_table= tables.user_table(); + TABLE *table= user_table.table(); + + result= 1; + + mysql_mutex_lock(&acl_cache->lock); + ACL_USER *acl_user; + if (!(acl_user= find_user_exact(host, user))) + { + mysql_mutex_unlock(&acl_cache->lock); + my_message(ER_PASSWORD_NO_MATCH, ER_THD(thd, ER_PASSWORD_NO_MATCH), + MYF(0)); + goto end; + } + + if (!clear_role) + { + /* set new default_rolename */ + acl_user->default_rolename.str= safe_strdup_root(&acl_memroot, rolename); + acl_user->default_rolename.length= strlen(rolename); + } + else + { + /* clear the default_rolename */ + acl_user->default_rolename.str = NULL; + acl_user->default_rolename.length = 0; + } + + /* update the mysql.user table with the new default role */ + tables.user_table().table()->use_all_columns(); + if (!tables.user_table().default_role()) + { + my_error(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE, MYF(0), + table->alias.c_ptr(), DEFAULT_ROLE_COLUMN_IDX + 1, + tables.user_table().num_fields(), + static_cast(table->s->mysql_version), MYSQL_VERSION_ID); + mysql_mutex_unlock(&acl_cache->lock); + goto end; + } + user_table.host()->store(host,(uint) strlen(host), system_charset_info); + user_table.user()->store(user,(uint) strlen(user), system_charset_info); + key_copy((uchar *) user_key, table->record[0], table->key_info, + table->key_info->key_length); + + if (table->file->ha_index_read_idx_map(table->record[0], 0, + (uchar *) user_key, HA_WHOLE_KEY, + HA_READ_KEY_EXACT)) + { + mysql_mutex_unlock(&acl_cache->lock); + my_message(ER_PASSWORD_NO_MATCH, ER_THD(thd, ER_PASSWORD_NO_MATCH), + MYF(0)); + goto end; + } + store_record(table, record[1]); + user_table.default_role()->store(acl_user->default_rolename.str, + acl_user->default_rolename.length, + system_charset_info); + if ((error=table->file->ha_update_row(table->record[1],table->record[0])) && + error != HA_ERR_RECORD_IS_THE_SAME) + { + mysql_mutex_unlock(&acl_cache->lock); + table->file->print_error(error,MYF(0)); /* purecov: deadcode */ + goto end; + } + + acl_cache->clear(1); mysql_mutex_unlock(&acl_cache->lock); - my_message(ER_PASSWORD_NO_MATCH, ER_THD(thd, ER_PASSWORD_NO_MATCH), - MYF(0)); - goto end; + result= 0; + if (mysql_bin_log.is_open()) + { + DBUG_ASSERT(query_length); + thd->clear_error(); + result= thd->binlog_query(THD::STMT_QUERY_TYPE, buff, query_length, + FALSE, FALSE, FALSE, 0); + } + end: + close_mysql_tables(thd); } - if (!clear_role) { - /* set new default_rolename */ - acl_user->default_rolename.str= safe_strdup_root(&acl_memroot, rolename); - acl_user->default_rolename.length= strlen(rolename); - } - else - { - /* clear the default_rolename */ - acl_user->default_rolename.str = NULL; - acl_user->default_rolename.length = 0; - } - - /* update the mysql.user table with the new default role */ - table->use_all_columns(); - if (table->s->fields <= DEFAULT_ROLE_COLUMN_IDX) - { - my_error(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE, MYF(0), - table->alias.c_ptr(), DEFAULT_ROLE_COLUMN_IDX + 1, table->s->fields, - static_cast(table->s->mysql_version), MYSQL_VERSION_ID); - mysql_mutex_unlock(&acl_cache->lock); - goto end; - } - table->field[0]->store(host,(uint) strlen(host), system_charset_info); - table->field[1]->store(user,(uint) strlen(user), system_charset_info); - key_copy((uchar *) user_key, table->record[0], table->key_info, - table->key_info->key_length); - - if (table->file->ha_index_read_idx_map(table->record[0], 0, - (uchar *) user_key, HA_WHOLE_KEY, - HA_READ_KEY_EXACT)) - { - mysql_mutex_unlock(&acl_cache->lock); - my_message(ER_PASSWORD_NO_MATCH, ER_THD(thd, ER_PASSWORD_NO_MATCH), - MYF(0)); - goto end; - } - store_record(table, record[1]); - table->field[DEFAULT_ROLE_COLUMN_IDX]->store(acl_user->default_rolename.str, - acl_user->default_rolename.length, - system_charset_info); - if ((error=table->file->ha_update_row(table->record[1],table->record[0])) && - error != HA_ERR_RECORD_IS_THE_SAME) - { - mysql_mutex_unlock(&acl_cache->lock); - table->file->print_error(error,MYF(0)); /* purecov: deadcode */ - goto end; - } - - acl_cache->clear(1); - mysql_mutex_unlock(&acl_cache->lock); - result= 0; - if (mysql_bin_log.is_open()) - { - DBUG_ASSERT(query_length); - thd->clear_error(); - result= thd->binlog_query(THD::STMT_QUERY_TYPE, buff, query_length, - FALSE, FALSE, FALSE, 0); - } -end: - close_mysql_tables(thd); - #ifdef WITH_WSREP error: // this label is used in WSREP_TO_ISOLATION_END if (WSREP(thd) && !thd->wsrep_applier) @@ -3276,6 +3854,27 @@ bool hostname_requires_resolving(const char *hostname) } +void set_authentication_plugin_from_password(const User_table& user_table, + const char* password, + uint password_length) +{ + if (password_length == SCRAMBLED_PASSWORD_CHAR_LENGTH) + { + user_table.plugin()->store(native_password_plugin_name.str, + native_password_plugin_name.length, + system_charset_info); + } + else + { + DBUG_ASSERT(password_length == SCRAMBLED_PASSWORD_CHAR_LENGTH_323); + user_table.plugin()->store(old_password_plugin_name.str, + old_password_plugin_name.length, + system_charset_info); + } + user_table.authentication_string()->store(password, + password_length, + system_charset_info); +} /** Update record for user in mysql.user privilege table with new password. @@ -3289,18 +3888,19 @@ bool hostname_requires_resolving(const char *hostname) @see change_password */ -static bool update_user_table(THD *thd, TABLE *table, +static bool update_user_table(THD *thd, const User_table& user_table, const char *host, const char *user, - const char *new_password, uint new_password_len) + const char *new_password, uint new_password_len) { char user_key[MAX_KEY_LENGTH]; int error; DBUG_ENTER("update_user_table"); DBUG_PRINT("enter",("user: %s host: %s",user,host)); + TABLE *table= user_table.table(); table->use_all_columns(); - table->field[0]->store(host,(uint) strlen(host), system_charset_info); - table->field[1]->store(user,(uint) strlen(user), system_charset_info); + user_table.host()->store(host,(uint) strlen(host), system_charset_info); + user_table.user()->store(user,(uint) strlen(user), system_charset_info); key_copy((uchar *) user_key, table->record[0], table->key_info, table->key_info->key_length); @@ -3309,15 +3909,23 @@ static bool update_user_table(THD *thd, TABLE *table, HA_READ_KEY_EXACT)) { my_message(ER_PASSWORD_NO_MATCH, ER_THD(thd, ER_PASSWORD_NO_MATCH), - MYF(0)); /* purecov: deadcode */ - DBUG_RETURN(1); /* purecov: deadcode */ + MYF(0)); /* purecov: deadcode */ + DBUG_RETURN(1); /* purecov: deadcode */ } store_record(table,record[1]); - table->field[2]->store(new_password, new_password_len, system_charset_info); + /* If the password column is missing, we use the + authentication_string column. */ + if (user_table.password()) + user_table.password()->store(new_password, new_password_len, system_charset_info); + else + set_authentication_plugin_from_password(user_table, new_password, + new_password_len); + + if ((error=table->file->ha_update_row(table->record[1],table->record[0])) && error != HA_ERR_RECORD_IS_THE_SAME) { - table->file->print_error(error,MYF(0)); /* purecov: deadcode */ + table->file->print_error(error,MYF(0)); /* purecov: deadcode */ DBUG_RETURN(1); } DBUG_RETURN(0); @@ -3363,8 +3971,9 @@ static bool test_if_create_new_users(THD *thd) Handle GRANT commands ****************************************************************************/ -static int replace_user_table(THD *thd, TABLE *table, LEX_USER &combo, - ulong rights, bool revoke_grant, +static int replace_user_table(THD *thd, const User_table &user_table, + LEX_USER &combo, + ulong rights, bool revoke_grant, bool can_create_user, bool no_auto_create) { int error = -1; @@ -3373,6 +3982,7 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER &combo, uchar user_key[MAX_KEY_LENGTH]; bool handle_as_role= combo.is_role(); LEX *lex= thd->lex; + TABLE *table= user_table.table(); DBUG_ENTER("replace_user_table"); mysql_mutex_assert_owner(&acl_cache->lock); @@ -3391,18 +4001,18 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER &combo, combo.pwhash= empty_lex_str; /* if the user table is not up to date, we can't handle role updates */ - if (table->s->fields <= ROLE_ASSIGN_COLUMN_IDX && handle_as_role) + if (!user_table.is_role() && handle_as_role) { my_error(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE, MYF(0), - table->alias.c_ptr(), ROLE_ASSIGN_COLUMN_IDX + 1, table->s->fields, + "user", ROLE_ASSIGN_COLUMN_IDX + 1, user_table.num_fields(), static_cast(table->s->mysql_version), MYSQL_VERSION_ID); DBUG_RETURN(-1); } table->use_all_columns(); - table->field[0]->store(combo.host.str,combo.host.length, + user_table.host()->store(combo.host.str,combo.host.length, system_charset_info); - table->field[1]->store(combo.user.str,combo.user.length, + user_table.user()->store(combo.user.str,combo.user.length, system_charset_info); key_copy(user_key, table->record[0], table->key_info, table->key_info->key_length); @@ -3451,9 +4061,9 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER &combo, old_row_exists = 0; restore_record(table,s->default_values); - table->field[0]->store(combo.host.str,combo.host.length, + user_table.host()->store(combo.host.str,combo.host.length, system_charset_info); - table->field[1]->store(combo.user.str,combo.user.length, + user_table.user()->store(combo.user.str,combo.user.length, system_charset_info); } else @@ -3463,107 +4073,124 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER &combo, } if (!old_row_exists || combo.pwtext.length || combo.pwhash.length) - if (!handle_as_role && validate_password(&combo)) + if (!handle_as_role && validate_password(&combo, thd)) goto end; /* Update table columns with new privileges */ - Field **tmp_field; ulong priv; - uint next_field; - for (tmp_field= table->field+3, priv = SELECT_ACL; - *tmp_field && (*tmp_field)->real_type() == MYSQL_TYPE_ENUM && - ((Field_enum*) (*tmp_field))->typelib->count == 2 ; - tmp_field++, priv <<= 1) + priv = SELECT_ACL; + for (uint i= 0; i < user_table.num_privileges(); i++, priv <<= 1) { - if (priv & rights) // set requested privileges - (*tmp_field)->store(&what, 1, &my_charset_latin1); + if (priv & rights) + user_table.priv_field(i)->store(&what, 1, &my_charset_latin1); } - rights= get_access(table, 3, &next_field); - DBUG_PRINT("info",("table fields: %d",table->s->fields)); - if (combo.pwhash.str[0]) - table->field[2]->store(combo.pwhash.str, combo.pwhash.length, system_charset_info); - if (table->s->fields >= 31) /* From 4.0.0 we have more fields */ + + rights= user_table.get_access(); + + DBUG_PRINT("info",("table fields: %d", user_table.num_fields())); + /* If we don't have a password column, we'll use the authentication_string + column later. */ + if (combo.pwhash.str[0] && user_table.password()) + user_table.password()->store(combo.pwhash.str, combo.pwhash.length, + system_charset_info); + /* We either have the password column, the plugin column, or both. Otherwise + we have a corrupt user table. */ + DBUG_ASSERT(user_table.password() || user_table.plugin()); + if (user_table.ssl_type()) /* From 4.0.0 we have more fields */ { /* We write down SSL related ACL stuff */ switch (lex->ssl_type) { case SSL_TYPE_ANY: - table->field[next_field]->store(STRING_WITH_LEN("ANY"), - &my_charset_latin1); - table->field[next_field+1]->store("", 0, &my_charset_latin1); - table->field[next_field+2]->store("", 0, &my_charset_latin1); - table->field[next_field+3]->store("", 0, &my_charset_latin1); + user_table.ssl_type()->store(STRING_WITH_LEN("ANY"), + &my_charset_latin1); + user_table.ssl_cipher()->store("", 0, &my_charset_latin1); + user_table.x509_issuer()->store("", 0, &my_charset_latin1); + user_table.x509_subject()->store("", 0, &my_charset_latin1); break; case SSL_TYPE_X509: - table->field[next_field]->store(STRING_WITH_LEN("X509"), - &my_charset_latin1); - table->field[next_field+1]->store("", 0, &my_charset_latin1); - table->field[next_field+2]->store("", 0, &my_charset_latin1); - table->field[next_field+3]->store("", 0, &my_charset_latin1); + user_table.ssl_type()->store(STRING_WITH_LEN("X509"), + &my_charset_latin1); + user_table.ssl_cipher()->store("", 0, &my_charset_latin1); + user_table.x509_issuer()->store("", 0, &my_charset_latin1); + user_table.x509_subject()->store("", 0, &my_charset_latin1); break; case SSL_TYPE_SPECIFIED: - table->field[next_field]->store(STRING_WITH_LEN("SPECIFIED"), - &my_charset_latin1); - table->field[next_field+1]->store("", 0, &my_charset_latin1); - table->field[next_field+2]->store("", 0, &my_charset_latin1); - table->field[next_field+3]->store("", 0, &my_charset_latin1); + user_table.ssl_type()->store(STRING_WITH_LEN("SPECIFIED"), + &my_charset_latin1); + user_table.ssl_cipher()->store("", 0, &my_charset_latin1); + user_table.x509_issuer()->store("", 0, &my_charset_latin1); + user_table.x509_subject()->store("", 0, &my_charset_latin1); if (lex->ssl_cipher) - table->field[next_field+1]->store(lex->ssl_cipher, - strlen(lex->ssl_cipher), system_charset_info); + user_table.ssl_cipher()->store(lex->ssl_cipher, + strlen(lex->ssl_cipher), + system_charset_info); if (lex->x509_issuer) - table->field[next_field+2]->store(lex->x509_issuer, - strlen(lex->x509_issuer), system_charset_info); + user_table.x509_issuer()->store(lex->x509_issuer, + strlen(lex->x509_issuer), + system_charset_info); if (lex->x509_subject) - table->field[next_field+3]->store(lex->x509_subject, - strlen(lex->x509_subject), system_charset_info); + user_table.x509_subject()->store(lex->x509_subject, + strlen(lex->x509_subject), + system_charset_info); break; case SSL_TYPE_NOT_SPECIFIED: break; case SSL_TYPE_NONE: - table->field[next_field]->store("", 0, &my_charset_latin1); - table->field[next_field+1]->store("", 0, &my_charset_latin1); - table->field[next_field+2]->store("", 0, &my_charset_latin1); - table->field[next_field+3]->store("", 0, &my_charset_latin1); + user_table.ssl_type()->store("", 0, &my_charset_latin1); + user_table.ssl_cipher()->store("", 0, &my_charset_latin1); + user_table.x509_issuer()->store("", 0, &my_charset_latin1); + user_table.x509_subject()->store("", 0, &my_charset_latin1); break; } - next_field+=4; USER_RESOURCES mqh= lex->mqh; if (mqh.specified_limits & USER_RESOURCES::QUERIES_PER_HOUR) - table->field[next_field]->store((longlong) mqh.questions, TRUE); + user_table.max_questions()->store((longlong) mqh.questions, TRUE); if (mqh.specified_limits & USER_RESOURCES::UPDATES_PER_HOUR) - table->field[next_field+1]->store((longlong) mqh.updates, TRUE); + user_table.max_updates()->store((longlong) mqh.updates, TRUE); if (mqh.specified_limits & USER_RESOURCES::CONNECTIONS_PER_HOUR) - table->field[next_field+2]->store((longlong) mqh.conn_per_hour, TRUE); - if (table->s->fields >= 36 && + user_table.max_connections()->store((longlong) mqh.conn_per_hour, TRUE); + if (user_table.max_user_connections() && (mqh.specified_limits & USER_RESOURCES::USER_CONNECTIONS)) - table->field[next_field+3]->store((longlong) mqh.user_conn, FALSE); - next_field+= 4; - if (table->s->fields >= 41) + user_table.max_user_connections()->store((longlong) mqh.user_conn, FALSE); + if (user_table.plugin()) { - table->field[next_field]->set_notnull(); - table->field[next_field + 1]->set_notnull(); + user_table.plugin()->set_notnull(); + user_table.authentication_string()->set_notnull(); if (combo.plugin.str[0]) { DBUG_ASSERT(combo.pwhash.str[0] == 0); - table->field[2]->reset(); - table->field[next_field]->store(combo.plugin.str, combo.plugin.length, - system_charset_info); - table->field[next_field + 1]->store(combo.auth.str, combo.auth.length, - system_charset_info); + if (user_table.password()) + user_table.password()->reset(); + user_table.plugin()->store(combo.plugin.str, combo.plugin.length, + system_charset_info); + user_table.authentication_string()->store(combo.auth.str, combo.auth.length, + system_charset_info); } if (combo.pwhash.str[0]) { DBUG_ASSERT(combo.plugin.str[0] == 0); - table->field[next_field]->reset(); - table->field[next_field + 1]->reset(); + /* We have Password column. */ + if (user_table.password()) + { + user_table.plugin()->reset(); + user_table.authentication_string()->reset(); + } + else + { + /* We do not have Password column. Use PLUGIN && Authentication_string + columns instead. */ + set_authentication_plugin_from_password(user_table, + combo.pwhash.str, + combo.pwhash.length); + } } - if (table->s->fields > MAX_STATEMENT_TIME_COLUMN_IDX) + if (user_table.max_statement_time()) { if (mqh.specified_limits & USER_RESOURCES::MAX_STATEMENT_TIME) - table->field[MAX_STATEMENT_TIME_COLUMN_IDX]-> - store(mqh.max_statement_time); + user_table.max_statement_time()->store(mqh.max_statement_time); } } mqh_used= (mqh_used || mqh.questions || mqh.updates || mqh.conn_per_hour || @@ -3572,11 +4199,11 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER &combo, /* table format checked earlier */ if (handle_as_role) { - if (old_row_exists && !check_is_role(table)) + if (old_row_exists && !user_table.check_is_role()) { goto end; } - table->field[ROLE_ASSIGN_COLUMN_IDX]->store("Y", 1, system_charset_info); + user_table.is_role()->store("Y", 1, system_charset_info); } } @@ -3586,7 +4213,7 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER &combo, We should NEVER delete from the user table, as a uses can still use mysqld even if he doesn't have any privileges in the user table! */ - if (cmp_record(table,record[1])) + if (cmp_record(table, record[1])) { if ((error= table->file->ha_update_row(table->record[1],table->record[0])) && @@ -4365,6 +4992,8 @@ table_hash_search(const char *host, const char *ip, const char *db, static GRANT_COLUMN * column_hash_search(GRANT_TABLE *t, const char *cname, uint length) { + if (!my_hash_inited(&t->hash_columns)) + return (GRANT_COLUMN*) 0; return (GRANT_COLUMN*) my_hash_search(&t->hash_columns, (uchar*) cname, length); } @@ -5762,7 +6391,6 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, int result; List_iterator str_list (user_list); LEX_USER *Str, *tmp_Str; - TABLE_LIST tables[TABLES_MAX]; bool create_new_users=0; char *db_name, *table_name; DBUG_ENTER("mysql_table_grant"); @@ -5851,8 +6479,9 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, */ thd->lex->sql_command= backup.sql_command; - if ((result= open_grant_tables(thd, tables, TL_WRITE, Table_user | - Table_tables_priv | maybe_columns_priv))) + Grant_tables tables(Table_user | Table_tables_priv | maybe_columns_priv, + TL_WRITE); + if ((result= tables.open_and_lock(thd))) { thd->lex->restore_backup_query_tables_list(&backup); DBUG_RETURN(result != 1); @@ -5877,7 +6506,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, } /* Create user if needed */ error= copy_and_check_auth(Str, tmp_Str, thd) || - replace_user_table(thd, tables[USER_TABLE].table, *Str, + replace_user_table(thd, tables.user_table(), *Str, 0, revoke_grant, create_new_users, MY_TEST(thd->variables.sql_mode & MODE_NO_AUTO_CREATE_USER)); @@ -5948,16 +6577,20 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, /* update table and columns */ - if (replace_table_table(thd, grant_table, tables[TABLES_PRIV_TABLE].table, + /* TODO(cvicentiu) refactor replace_table_table to use Tables_priv_table + instead of TABLE directly. */ + if (replace_table_table(thd, grant_table, tables.tables_priv_table().table(), *Str, db_name, table_name, rights, column_priv, revoke_grant)) { /* Should only happen if table is crashed */ result= TRUE; /* purecov: deadcode */ } - else if (tables[COLUMNS_PRIV_TABLE].table) + else if (tables.columns_priv_table().table_exists()) { - if (replace_column_table(grant_table, tables[COLUMNS_PRIV_TABLE].table, + /* TODO(cvicentiu) refactor replace_column_table to use Columns_priv_table + instead of TABLE directly. */ + if (replace_column_table(grant_table, tables.columns_priv_table().table(), *Str, columns, db_name, table_name, rights, revoke_grant)) { @@ -6008,7 +6641,6 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, { List_iterator str_list (user_list); LEX_USER *Str, *tmp_Str; - TABLE_LIST tables[TABLES_MAX]; bool create_new_users= 0, result; char *db_name, *table_name; DBUG_ENTER("mysql_routine_grant"); @@ -6027,8 +6659,8 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, DBUG_RETURN(TRUE); } - if ((result= open_grant_tables(thd, tables, TL_WRITE, Table_user | - Table_procs_priv))) + Grant_tables tables(Table_user | Table_procs_priv, TL_WRITE); + if ((result= tables.open_and_lock(thd))) DBUG_RETURN(result != 1); DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row()); @@ -6052,7 +6684,7 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, } /* Create user if needed */ if (copy_and_check_auth(Str, tmp_Str, thd) || - replace_user_table(thd, tables[USER_TABLE].table, *Str, + replace_user_table(thd, tables.user_table(), *Str, 0, revoke_grant, create_new_users, MY_TEST(thd->variables.sql_mode & MODE_NO_AUTO_CREATE_USER))) @@ -6086,8 +6718,10 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, } } - if (no_such_table(tables + PROCS_PRIV_TABLE) || - replace_routine_table(thd, grant_name, tables[PROCS_PRIV_TABLE].table, + /* TODO(cvicentiu) refactor replace_routine_table to use Tables_procs_priv + instead of TABLE directly. */ + if (tables.procs_priv_table().no_such_table() || + replace_routine_table(thd, grant_name, tables.procs_priv_table().table(), *Str, db_name, table_name, is_proc, rights, revoke_grant) != 0) { @@ -6227,9 +6861,8 @@ bool mysql_grant_role(THD *thd, List &list, bool revoke) no_auto_create_user= MY_TEST(thd->variables.sql_mode & MODE_NO_AUTO_CREATE_USER); - TABLE_LIST tables[TABLES_MAX]; - if ((result= open_grant_tables(thd, tables, TL_WRITE, - Table_user | Table_roles_mapping))) + Grant_tables tables(Table_user | Table_roles_mapping, TL_WRITE); + if ((result= tables.open_and_lock(thd))) DBUG_RETURN(result != 1); mysql_rwlock_wrlock(&LOCK_grant); @@ -6328,7 +6961,7 @@ bool mysql_grant_role(THD *thd, List &list, bool revoke) user_combo.user = username; if (copy_and_check_auth(&user_combo, &user_combo, thd) || - replace_user_table(thd, tables[USER_TABLE].table, user_combo, 0, + replace_user_table(thd, tables.user_table(), user_combo, 0, false, create_new_user, no_auto_create_user)) { @@ -6394,7 +7027,9 @@ bool mysql_grant_role(THD *thd, List &list, bool revoke) } /* write into the roles_mapping table */ - if (replace_roles_mapping_table(tables[ROLES_MAPPING_TABLE].table, + /* TODO(cvicentiu) refactor replace_roles_mapping_table to use + Roles_mapping_table instead of TABLE directly. */ + if (replace_roles_mapping_table(tables.roles_mapping_table().table(), &username, &hostname, &rolename, thd->lex->with_admin_option, hash_entry, revoke)) @@ -6445,7 +7080,6 @@ bool mysql_grant(THD *thd, const char *db, List &list, LEX_USER *Str, *tmp_Str, *proxied_user= NULL; char tmp_db[SAFE_NAME_LEN+1]; bool create_new_users=0, result; - TABLE_LIST tables[TABLES_MAX]; DBUG_ENTER("mysql_grant"); if (lower_case_table_names && db) @@ -6466,8 +7100,9 @@ bool mysql_grant(THD *thd, const char *db, List &list, proxied_user= str_list++; } - if ((result= open_grant_tables(thd, tables, TL_WRITE, Table_user | - (is_proxy ? Table_proxies_priv : Table_db)))) + Grant_tables tables(Table_user | (is_proxy ? Table_proxies_priv : Table_db), + TL_WRITE); + if ((result= tables.open_and_lock(thd))) DBUG_RETURN(result != 1); DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row()); @@ -6496,7 +7131,7 @@ bool mysql_grant(THD *thd, const char *db, List &list, } if (copy_and_check_auth(Str, tmp_Str, thd) || - replace_user_table(thd, tables[USER_TABLE].table, *Str, + replace_user_table(thd, tables.user_table(), *Str, (!db ? rights : 0), revoke_grant, create_new_users, MY_TEST(thd->variables.sql_mode & MODE_NO_AUTO_CREATE_USER))) @@ -6506,7 +7141,7 @@ bool mysql_grant(THD *thd, const char *db, List &list, ulong db_rights= rights & DB_ACLS; if (db_rights == rights) { - if (replace_db_table(tables[DB_TABLE].table, db, *Str, db_rights, + if (replace_db_table(tables.db_table().table(), db, *Str, db_rights, revoke_grant)) result= true; } @@ -6518,8 +7153,10 @@ bool mysql_grant(THD *thd, const char *db, List &list, } else if (is_proxy) { - if (no_such_table(tables + PROXIES_PRIV_TABLE) || - replace_proxies_priv_table (thd, tables[PROXIES_PRIV_TABLE].table, + /* TODO(cvicentiu) refactor replace_proxies_priv_table to use + Proxies_priv_table instead of TABLE directly. */ + if (tables.proxies_priv_table().no_such_table() || + replace_proxies_priv_table (thd, tables.proxies_priv_table().table(), Str, proxied_user, rights & GRANT_ACL ? TRUE : FALSE, revoke_grant)) @@ -6599,7 +7236,10 @@ bool grant_init() @retval TRUE Error */ -static bool grant_load(THD *thd, TABLE_LIST *tables) +static bool grant_load(THD *thd, + const Tables_priv_table& tables_priv, + const Columns_priv_table& columns_priv, + const Procs_priv_table& procs_priv) { bool return_val= 1; TABLE *t_table, *c_table, *p_table; @@ -6619,9 +7259,9 @@ static bool grant_load(THD *thd, TABLE_LIST *tables) 0,0,0, (my_hash_get_key) get_grant_table, 0,0); init_sql_alloc(&grant_memroot, ACL_ALLOC_BLOCK_SIZE, 0, MYF(0)); - t_table= tables[TABLES_PRIV_TABLE].table; - c_table= tables[COLUMNS_PRIV_TABLE].table; - p_table= tables[PROCS_PRIV_TABLE].table; // this can be NULL + t_table= tables_priv.table(); + c_table= columns_priv.table(); + p_table= procs_priv.table(); // this can be NULL if (t_table->file->ha_index_init(0, 1)) goto end_index_init; @@ -6636,6 +7276,7 @@ static bool grant_load(THD *thd, TABLE_LIST *tables) do { GRANT_TABLE *mem_check; + /* TODO(cvicentiu) convert this to use tables_priv and columns_priv. */ if (!(mem_check= new (&grant_memroot) GRANT_TABLE(t_table, c_table))) { /* This could only happen if we are out memory */ @@ -6698,12 +7339,12 @@ static bool grant_load(THD *thd, TABLE_LIST *tables) continue; } } - if (p_table->field[4]->val_int() == TYPE_ENUM_PROCEDURE) + if (procs_priv.routine_type()->val_int() == TYPE_ENUM_PROCEDURE) { hash= &proc_priv_hash; } else - if (p_table->field[4]->val_int() == TYPE_ENUM_FUNCTION) + if (procs_priv.routine_type()->val_int() == TYPE_ENUM_FUNCTION) { hash= &func_priv_hash; } @@ -6772,7 +7413,6 @@ static my_bool role_propagate_grants_action(void *ptr, bool grant_reload(THD *thd) { - TABLE_LIST tables[TABLES_MAX]; HASH old_column_priv_hash, old_proc_priv_hash, old_func_priv_hash; MEM_ROOT old_mem; int result; @@ -6783,8 +7423,9 @@ bool grant_reload(THD *thd) obtaining LOCK_grant rwlock. */ - if ((result= open_grant_tables(thd, tables, TL_READ, Table_tables_priv | - Table_columns_priv | Table_procs_priv))) + Grant_tables tables(Table_tables_priv | Table_columns_priv| Table_procs_priv, + TL_READ); + if ((result= tables.open_and_lock(thd))) DBUG_RETURN(result != 1); mysql_rwlock_wrlock(&LOCK_grant); @@ -6799,7 +7440,10 @@ bool grant_reload(THD *thd) */ old_mem= grant_memroot; - if ((result= grant_load(thd, tables))) + if ((result= grant_load(thd, + tables.tables_priv_table(), + tables.columns_priv_table(), + tables.procs_priv_table()))) { // Error. Revert to old hash DBUG_PRINT("error",("Reverting to old privileges")); grant_free(); /* purecov: deadcode */ @@ -8547,70 +9191,6 @@ void get_mqh(const char *user, const char *host, USER_CONN *uc) mysql_mutex_unlock(&acl_cache->lock); } -/* - Initialize a TABLE_LIST array and open grant tables - - All tables will be opened with the same lock type, either read or write. - - @retval 1 replication filters matched. Abort the operation, but return OK (!) - @retval 0 tables were opened successfully - @retval -1 error, tables could not be opened -*/ - -static int open_grant_tables(THD *thd, TABLE_LIST *tables, - enum thr_lock_type lock_type, int tables_to_open) -{ - DBUG_ENTER("open_grant_tables"); - - /* - We can read privilege tables even when !initialized. - This can be acl_load() - server startup or FLUSH PRIVILEGES - */ - if (lock_type >= TL_WRITE_ALLOW_WRITE && !initialized) - { - my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-grant-tables"); - DBUG_RETURN(-1); - } - - int prev= -1; - bzero(tables, sizeof(TABLE_LIST) * TABLES_MAX); - for (int cur=TABLES_MAX-1, mask= 1 << cur; mask; cur--, mask >>= 1) - { - if ((tables_to_open & mask) == 0) - continue; - tables[cur].init_one_table(C_STRING_WITH_LEN("mysql"), - acl_table_names[cur].str, - acl_table_names[cur].length, - acl_table_names[cur].str, lock_type); - tables[cur].open_type= OT_BASE_ONLY; - if (lock_type >= TL_WRITE_ALLOW_WRITE) - tables[cur].updating= 1; - if (cur >= FIRST_OPTIONAL_TABLE) - tables[cur].open_strategy= TABLE_LIST::OPEN_IF_EXISTS; - if (prev != -1) - tables[cur].next_local= tables[cur].next_global= & tables[prev]; - prev= cur; - } - -#ifdef HAVE_REPLICATION - if (lock_type >= TL_WRITE_ALLOW_WRITE && thd->slave_thread && !thd->spcont) - { - /* - GRANT and REVOKE are applied the slave in/exclusion rules as they are - some kind of updates to the mysql.% tables. - */ - Rpl_filter *rpl_filter= thd->system_thread_info.rpl_sql_info->rpl_filter; - if (rpl_filter->is_on() && !rpl_filter->tables_ok(0, tables)) - DBUG_RETURN(1); - } -#endif - - if (open_and_lock_tables(thd, tables + prev, FALSE, - MYSQL_LOCK_IGNORE_TIMEOUT)) - DBUG_RETURN(-1); - - DBUG_RETURN(0); -} /* Modify a privilege table. @@ -8751,8 +9331,8 @@ static int handle_roles_mappings_table(TABLE *table, bool drop, SYNOPSIS handle_grant_table() - tables The array with the four open tables. - table_no The number of the table to handle (0..4). + grant_table An open grant table handle. + which_table Which grant table to handle. drop If user_from is to be dropped. user_from The the user to be searched/dropped/renamed. user_to The new name for the user if to be renamed, @@ -8770,18 +9350,21 @@ static int handle_roles_mappings_table(TABLE *table, bool drop, > 0 At least one record matched. 0 OK, but no record matched. < 0 Error. + + TODO(cvicentiu) refactor handle_grant_table to use + Grant_table_base instead of TABLE directly. */ -static int handle_grant_table(THD *thd, TABLE_LIST *tables, - enum enum_acl_tables table_no, bool drop, +static int handle_grant_table(THD *thd, const Grant_table_base& grant_table, + enum enum_acl_tables which_table, bool drop, LEX_USER *user_from, LEX_USER *user_to) { int result= 0; int error; - TABLE *table= tables[table_no].table; + TABLE *table= grant_table.table(); Field *host_field= table->field[0]; - Field *user_field= table->field[table_no == USER_TABLE || - table_no == PROXIES_PRIV_TABLE ? 1 : 2]; + Field *user_field= table->field[which_table == USER_TABLE || + which_table == PROXIES_PRIV_TABLE ? 1 : 2]; const char *host_str= user_from->host.str; const char *user_str= user_from->user.str; const char *host; @@ -8790,14 +9373,14 @@ static int handle_grant_table(THD *thd, TABLE_LIST *tables, uint key_prefix_length; DBUG_ENTER("handle_grant_table"); - if (table_no == ROLES_MAPPING_TABLE) + if (which_table == ROLES_MAPPING_TABLE) { result= handle_roles_mappings_table(table, drop, user_from, user_to); DBUG_RETURN(result); } table->use_all_columns(); - if (table_no == USER_TABLE) // mysql.user table + if (which_table == USER_TABLE) // mysql.user table { /* The 'user' table has an unique index on (host, user). @@ -8822,7 +9405,8 @@ static int handle_grant_table(THD *thd, TABLE_LIST *tables, HA_READ_KEY_EXACT); if (!error && !*host_str) { // verify that we got a role or a user, as needed - if (check_is_role(table) != user_from->is_role()) + if (static_cast(grant_table).check_is_role() != + user_from->is_role()) error= HA_ERR_KEY_NOT_FOUND; } if (error) @@ -8873,7 +9457,7 @@ static int handle_grant_table(THD *thd, TABLE_LIST *tables, user= safe_str(get_field(thd->mem_root, user_field)); #ifdef EXTRA_DEBUG - if (table_no != PROXIES_PRIV_TABLE) + if (which_table != PROXIES_PRIV_TABLE) { DBUG_PRINT("loop",("scan fields: '%s'@'%s' '%s' '%s' '%s'", user, host, @@ -9292,7 +9876,7 @@ static int handle_grant_struct(enum enum_acl_lists struct_no, bool drop, < 0 Error. */ -static int handle_grant_data(THD *thd, TABLE_LIST *tables, bool drop, +static int handle_grant_data(THD *thd, Grant_tables& tables, bool drop, LEX_USER *user_from, LEX_USER *user_to) { int result= 0; @@ -9315,7 +9899,8 @@ static int handle_grant_data(THD *thd, TABLE_LIST *tables, bool drop, } /* Handle db table. */ - if ((found= handle_grant_table(thd, tables, DB_TABLE, drop, user_from, + if ((found= handle_grant_table(thd, tables.db_table(), + DB_TABLE, drop, user_from, user_to)) < 0) { /* Handle of table failed, don't touch the in-memory array. */ @@ -9336,7 +9921,8 @@ static int handle_grant_data(THD *thd, TABLE_LIST *tables, bool drop, } /* Handle stored routines table. */ - if ((found= handle_grant_table(thd, tables, PROCS_PRIV_TABLE, drop, + if ((found= handle_grant_table(thd, tables.procs_priv_table(), + PROCS_PRIV_TABLE, drop, user_from, user_to)) < 0) { /* Handle of table failed, don't touch in-memory array. */ @@ -9365,7 +9951,8 @@ static int handle_grant_data(THD *thd, TABLE_LIST *tables, bool drop, } /* Handle tables table. */ - if ((found= handle_grant_table(thd, tables, TABLES_PRIV_TABLE, drop, + if ((found= handle_grant_table(thd, tables.tables_priv_table(), + TABLES_PRIV_TABLE, drop, user_from, user_to)) < 0) { /* Handle of table failed, don't touch columns and in-memory array. */ @@ -9382,7 +9969,8 @@ static int handle_grant_data(THD *thd, TABLE_LIST *tables, bool drop, } /* Handle columns table. */ - if ((found= handle_grant_table(thd, tables, COLUMNS_PRIV_TABLE, drop, + if ((found= handle_grant_table(thd, tables.columns_priv_table(), + COLUMNS_PRIV_TABLE, drop, user_from, user_to)) < 0) { /* Handle of table failed, don't touch the in-memory array. */ @@ -9400,9 +9988,10 @@ static int handle_grant_data(THD *thd, TABLE_LIST *tables, bool drop, } /* Handle proxies_priv table. */ - if (tables[PROXIES_PRIV_TABLE].table) + if (tables.proxies_priv_table().table_exists()) { - if ((found= handle_grant_table(thd, tables, PROXIES_PRIV_TABLE, drop, + if ((found= handle_grant_table(thd, tables.proxies_priv_table(), + PROXIES_PRIV_TABLE, drop, user_from, user_to)) < 0) { /* Handle of table failed, don't touch the in-memory array. */ @@ -9420,9 +10009,10 @@ static int handle_grant_data(THD *thd, TABLE_LIST *tables, bool drop, } /* Handle roles_mapping table. */ - if (tables[ROLES_MAPPING_TABLE].table) + if (tables.roles_mapping_table().table_exists()) { - if ((found= handle_grant_table(thd, tables, ROLES_MAPPING_TABLE, drop, + if ((found= handle_grant_table(thd, tables.roles_mapping_table(), + ROLES_MAPPING_TABLE, drop, user_from, user_to)) < 0) { /* Handle of table failed, don't touch the in-memory array. */ @@ -9440,8 +10030,8 @@ static int handle_grant_data(THD *thd, TABLE_LIST *tables, bool drop, } /* Handle user table. */ - if ((found= handle_grant_table(thd, tables, USER_TABLE, drop, user_from, - user_to)) < 0) + if ((found= handle_grant_table(thd, tables.user_table(), USER_TABLE, + drop, user_from, user_to)) < 0) { /* Handle of table failed, don't touch the in-memory array. */ result= -1; @@ -9480,7 +10070,6 @@ bool mysql_create_user(THD *thd, List &list, bool handle_as_role) String wrong_users; LEX_USER *user_name; List_iterator user_list(list); - TABLE_LIST tables[TABLES_MAX]; bool binlog= false; DBUG_ENTER("mysql_create_user"); DBUG_PRINT("entry", ("Handle as %s", handle_as_role ? "role" : "user")); @@ -9489,10 +10078,11 @@ bool mysql_create_user(THD *thd, List &list, bool handle_as_role) DBUG_RETURN(TRUE); /* CREATE USER may be skipped on replication client. */ - if ((result= open_grant_tables(thd, tables, TL_WRITE, Table_user | Table_db | - Table_tables_priv | Table_columns_priv | - Table_procs_priv | Table_proxies_priv | - Table_roles_mapping))) + Grant_tables tables(Table_user | Table_db | + Table_tables_priv | Table_columns_priv | + Table_procs_priv | Table_proxies_priv | + Table_roles_mapping, TL_WRITE); + if ((result= tables.open_and_lock(thd))) DBUG_RETURN(result != 1); mysql_rwlock_wrlock(&LOCK_grant); @@ -9574,7 +10164,7 @@ bool mysql_create_user(THD *thd, List &list, bool handle_as_role) } binlog= true; - if (replace_user_table(thd, tables[USER_TABLE].table, *user_name, 0, 0, 1, 0)) + if (replace_user_table(thd, tables.user_table(), *user_name, 0, 0, 1, 0)) { append_user(thd, &wrong_users, user_name); result= TRUE; @@ -9595,7 +10185,9 @@ bool mysql_create_user(THD *thd, List &list, bool handle_as_role) if (grantee) add_role_user_mapping(grantee, role); - if (replace_roles_mapping_table(tables[ROLES_MAPPING_TABLE].table, + /* TODO(cvicentiu) refactor replace_roles_mapping_table to use + Roles_mapping_table instead of TABLE directly. */ + if (replace_roles_mapping_table(tables.roles_mapping_table().table(), &thd->lex->definer->user, &thd->lex->definer->host, &user_name->user, true, @@ -9646,17 +10238,17 @@ bool mysql_drop_user(THD *thd, List &list, bool handle_as_role) String wrong_users; LEX_USER *user_name, *tmp_user_name; List_iterator user_list(list); - TABLE_LIST tables[TABLES_MAX]; bool binlog= false; sql_mode_t old_sql_mode= thd->variables.sql_mode; DBUG_ENTER("mysql_drop_user"); DBUG_PRINT("entry", ("Handle as %s", handle_as_role ? "role" : "user")); /* DROP USER may be skipped on replication client. */ - if ((result= open_grant_tables(thd, tables, TL_WRITE, Table_user | Table_db | - Table_tables_priv | Table_columns_priv | - Table_procs_priv | Table_proxies_priv | - Table_roles_mapping))) + Grant_tables tables(Table_user | Table_db | + Table_tables_priv | Table_columns_priv | + Table_procs_priv | Table_proxies_priv | + Table_roles_mapping, TL_WRITE); + if ((result= tables.open_and_lock(thd))) DBUG_RETURN(result != 1); thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH; @@ -9758,15 +10350,15 @@ bool mysql_rename_user(THD *thd, List &list) LEX_USER *user_from, *tmp_user_from; LEX_USER *user_to, *tmp_user_to; List_iterator user_list(list); - TABLE_LIST tables[TABLES_MAX]; bool some_users_renamed= FALSE; DBUG_ENTER("mysql_rename_user"); /* RENAME USER may be skipped on replication client. */ - if ((result= open_grant_tables(thd, tables, TL_WRITE, Table_user | Table_db | - Table_tables_priv | Table_columns_priv | - Table_procs_priv | Table_proxies_priv | - Table_roles_mapping))) + Grant_tables tables(Table_user | Table_db | + Table_tables_priv | Table_columns_priv | + Table_procs_priv | Table_proxies_priv | + Table_roles_mapping, TL_WRITE); + if ((result= tables.open_and_lock(thd))) DBUG_RETURN(result != 1); DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row()); @@ -9844,13 +10436,14 @@ int mysql_alter_user(THD* thd, List &users_list) { DBUG_ENTER("mysql_alter_user"); int result= 0; - TABLE_LIST tables[TABLES_MAX]; String wrong_users; - // The only table we're altering is the user table. - if ((result= open_grant_tables(thd, tables, TL_WRITE, Table_user))) - DBUG_RETURN(result); - // Lock ACL data structures until we finish altering all users. + /* The only table we're altering is the user table. */ + Grant_tables tables(Table_user, TL_WRITE); + if ((result= tables.open_and_lock(thd))) + DBUG_RETURN(result != 1); + + /* Lock ACL data structures until we finish altering all users. */ mysql_rwlock_wrlock(&LOCK_grant); mysql_mutex_lock(&acl_cache->lock); @@ -9861,7 +10454,7 @@ int mysql_alter_user(THD* thd, List &users_list) LEX_USER* lex_user= get_current_user(thd, tmp_lex_user, false); if (!lex_user || fix_lex_user(thd, lex_user) || - replace_user_table(thd, tables[USER_TABLE].table, *lex_user,0, + replace_user_table(thd, tables.user_table(), *lex_user, 0, false, false, true)) { thd->clear_error(); @@ -9871,13 +10464,13 @@ int mysql_alter_user(THD* thd, List &users_list) } } - // Unlock ACL data structures. + /* Unlock ACL data structures. */ mysql_mutex_unlock(&acl_cache->lock); mysql_rwlock_unlock(&LOCK_grant); if (result) { - // 'if exists' flag leads to warnings instead of errors. + /* 'if exists' flag leads to warnings instead of errors. */ if (thd->lex->create_info.if_exists()) { push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, @@ -9915,13 +10508,13 @@ bool mysql_revoke_all(THD *thd, List &list) uint counter, revoked, is_proc; int result; ACL_DB *acl_db; - TABLE_LIST tables[TABLES_MAX]; DBUG_ENTER("mysql_revoke_all"); - if ((result= open_grant_tables(thd, tables, TL_WRITE, Table_user | Table_db | - Table_tables_priv | Table_columns_priv | - Table_procs_priv | Table_proxies_priv | - Table_roles_mapping))) + Grant_tables tables(Table_user | Table_db | + Table_tables_priv | Table_columns_priv | + Table_procs_priv | Table_proxies_priv | + Table_roles_mapping, TL_WRITE); + if ((result= tables.open_and_lock(thd))) DBUG_RETURN(result != 1); DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row()); @@ -9947,7 +10540,7 @@ bool mysql_revoke_all(THD *thd, List &list) continue; } - if (replace_user_table(thd, tables[USER_TABLE].table, *lex_user, + if (replace_user_table(thd, tables.user_table(), *lex_user, ~(ulong)0, 1, 0, 0)) { result= -1; @@ -9974,8 +10567,10 @@ bool mysql_revoke_all(THD *thd, List &list) if (!strcmp(lex_user->user.str, user) && !strcmp(lex_user->host.str, host)) { - if (!replace_db_table(tables[DB_TABLE].table, acl_db->db, *lex_user, - ~(ulong)0, 1)) + /* TODO(cvicentiu) refactor replace_db_table to use + Db_table instead of TABLE directly. */ + if (!replace_db_table(tables.db_table().table(), acl_db->db, *lex_user, + ~(ulong)0, 1)) { /* Don't increment counter as replace_db_table deleted the @@ -10004,9 +10599,11 @@ bool mysql_revoke_all(THD *thd, List &list) if (!strcmp(lex_user->user.str,user) && !strcmp(lex_user->host.str, host)) { + /* TODO(cvicentiu) refactor replace_db_table to use + Db_table instead of TABLE directly. */ if (replace_table_table(thd, grant_table, - tables[TABLES_PRIV_TABLE].table, - *lex_user, grant_table->db, + tables.tables_priv_table().table(), + *lex_user, grant_table->db, grant_table->tname, ~(ulong)0, 0, 1)) { result= -1; @@ -10019,8 +10616,10 @@ bool mysql_revoke_all(THD *thd, List &list) continue; } List columns; + /* TODO(cvicentiu) refactor replace_db_table to use + Db_table instead of TABLE directly. */ if (!replace_column_table(grant_table, - tables[COLUMNS_PRIV_TABLE].table, + tables.columns_priv_table().table(), *lex_user, columns, grant_table->db, grant_table->tname, ~(ulong)0, 1)) { @@ -10044,20 +10643,21 @@ bool mysql_revoke_all(THD *thd, List &list) user= safe_str(grant_proc->user); host= safe_str(grant_proc->host.hostname); - if (!strcmp(lex_user->user.str,user) && + if (!strcmp(lex_user->user.str,user) && !strcmp(lex_user->host.str, host)) - { - if (replace_routine_table(thd, grant_proc, - tables[PROCS_PRIV_TABLE].table, *lex_user, + { + if (replace_routine_table(thd, grant_proc, + tables.procs_priv_table().table(), + *lex_user, grant_proc->db, grant_proc->tname, is_proc, ~(ulong)0, 1) == 0) - { - revoked= 1; - continue; - } - result= -1; // Something went wrong - } - counter++; + { + revoked= 1; + continue; + } + result= -1; // Something went wrong + } + counter++; } } while (revoked); @@ -10083,7 +10683,9 @@ bool mysql_revoke_all(THD *thd, List &list) ROLE_GRANT_PAIR *pair = find_role_grant_pair(&lex_user->user, &lex_user->host, &role_grant->user); - if (replace_roles_mapping_table(tables[ROLES_MAPPING_TABLE].table, + /* TODO(cvicentiu) refactor replace_roles_mapping_table to use + Roles_mapping_table instead of TABLE directly. */ + if (replace_roles_mapping_table(tables.roles_mapping_table().table(), &lex_user->user, &lex_user->host, &role_grant->user, false, pair, true)) { @@ -10153,7 +10755,7 @@ public: virtual bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl); @@ -10168,12 +10770,12 @@ Silence_routine_definer_errors::handle_condition( THD *thd, uint sql_errno, const char*, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) { *cond_hdl= NULL; - if (level == Sql_condition::WARN_LEVEL_ERROR) + if (*level == Sql_condition::WARN_LEVEL_ERROR) { switch (sql_errno) { @@ -10213,15 +10815,15 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name, { uint counter, revoked; int result; - TABLE_LIST tables[TABLES_MAX]; HASH *hash= is_proc ? &proc_priv_hash : &func_priv_hash; Silence_routine_definer_errors error_handler; DBUG_ENTER("sp_revoke_privileges"); - if ((result= open_grant_tables(thd, tables, TL_WRITE, Table_user | Table_db | - Table_tables_priv | Table_columns_priv | - Table_procs_priv | Table_proxies_priv | - Table_roles_mapping))) + Grant_tables tables(Table_user | Table_db | + Table_tables_priv | Table_columns_priv | + Table_procs_priv | Table_proxies_priv | + Table_roles_mapping, TL_WRITE); + if ((result= tables.open_and_lock(thd))) DBUG_RETURN(result != 1); DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row()); @@ -10246,9 +10848,9 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name, lex_user.user.length= strlen(grant_proc->user); lex_user.host.str= safe_str(grant_proc->host.hostname); lex_user.host.length= strlen(lex_user.host.str); - if (replace_routine_table(thd, grant_proc, - tables[PROCS_PRIV_TABLE].table, lex_user, - grant_proc->db, grant_proc->tname, + if (replace_routine_table(thd, grant_proc, + tables.procs_priv_table().table(), lex_user, + grant_proc->db, grant_proc->tname, is_proc, ~(ulong)0, 1) == 0) { revoked= 1; @@ -11860,7 +12462,7 @@ static bool parse_com_change_user_packet(MPVIO_EXT *mpvio, uint packet_length) { my_message(ER_UNKNOWN_COM_ERROR, ER_THD(thd, ER_UNKNOWN_COM_ERROR), MYF(0)); - DBUG_RETURN(packet_error); + DBUG_RETURN(1); } DBUG_PRINT("info", ("client_plugin=%s, restart", client_plugin)); diff --git a/sql/sql_acl.h b/sql/sql_acl.h index be206b1f86f..daa36f6c32a 100644 --- a/sql/sql_acl.h +++ b/sql/sql_acl.h @@ -2,6 +2,7 @@ #define SQL_ACL_INCLUDED /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,35 +21,35 @@ #include "violite.h" /* SSL_type */ #include "sql_class.h" /* LEX_COLUMN */ -#define SELECT_ACL (1L << 0) -#define INSERT_ACL (1L << 1) -#define UPDATE_ACL (1L << 2) -#define DELETE_ACL (1L << 3) -#define CREATE_ACL (1L << 4) -#define DROP_ACL (1L << 5) -#define RELOAD_ACL (1L << 6) -#define SHUTDOWN_ACL (1L << 7) -#define PROCESS_ACL (1L << 8) -#define FILE_ACL (1L << 9) -#define GRANT_ACL (1L << 10) -#define REFERENCES_ACL (1L << 11) -#define INDEX_ACL (1L << 12) -#define ALTER_ACL (1L << 13) -#define SHOW_DB_ACL (1L << 14) -#define SUPER_ACL (1L << 15) -#define CREATE_TMP_ACL (1L << 16) -#define LOCK_TABLES_ACL (1L << 17) -#define EXECUTE_ACL (1L << 18) -#define REPL_SLAVE_ACL (1L << 19) -#define REPL_CLIENT_ACL (1L << 20) -#define CREATE_VIEW_ACL (1L << 21) -#define SHOW_VIEW_ACL (1L << 22) -#define CREATE_PROC_ACL (1L << 23) -#define ALTER_PROC_ACL (1L << 24) -#define CREATE_USER_ACL (1L << 25) -#define EVENT_ACL (1L << 26) -#define TRIGGER_ACL (1L << 27) -#define CREATE_TABLESPACE_ACL (1L << 28) +#define SELECT_ACL (1UL << 0) +#define INSERT_ACL (1UL << 1) +#define UPDATE_ACL (1UL << 2) +#define DELETE_ACL (1UL << 3) +#define CREATE_ACL (1UL << 4) +#define DROP_ACL (1UL << 5) +#define RELOAD_ACL (1UL << 6) +#define SHUTDOWN_ACL (1UL << 7) +#define PROCESS_ACL (1UL << 8) +#define FILE_ACL (1UL << 9) +#define GRANT_ACL (1UL << 10) +#define REFERENCES_ACL (1UL << 11) +#define INDEX_ACL (1UL << 12) +#define ALTER_ACL (1UL << 13) +#define SHOW_DB_ACL (1UL << 14) +#define SUPER_ACL (1UL << 15) +#define CREATE_TMP_ACL (1UL << 16) +#define LOCK_TABLES_ACL (1UL << 17) +#define EXECUTE_ACL (1UL << 18) +#define REPL_SLAVE_ACL (1UL << 19) +#define REPL_CLIENT_ACL (1UL << 20) +#define CREATE_VIEW_ACL (1UL << 21) +#define SHOW_VIEW_ACL (1UL << 22) +#define CREATE_PROC_ACL (1UL << 23) +#define ALTER_PROC_ACL (1UL << 24) +#define CREATE_USER_ACL (1UL << 25) +#define EVENT_ACL (1UL << 26) +#define TRIGGER_ACL (1UL << 27) +#define CREATE_TABLESPACE_ACL (1UL << 28) /* don't forget to update 1. static struct show_privileges_st sys_privileges[] @@ -57,7 +58,7 @@ 4. acl_init() or whatever - to define behaviour for old privilege tables 5. sql_yacc.yy - for GRANT/REVOKE to work */ -#define NO_ACCESS (1L << 30) +#define NO_ACCESS (1UL << 30) #define DB_ACLS \ (UPDATE_ACL | SELECT_ACL | INSERT_ACL | DELETE_ACL | CREATE_ACL | DROP_ACL | \ GRANT_ACL | REFERENCES_ACL | INDEX_ACL | ALTER_ACL | CREATE_TMP_ACL | \ diff --git a/sql/sql_audit.h b/sql/sql_audit.h index d6f670538cd..5f530c676c3 100644 --- a/sql/sql_audit.h +++ b/sql/sql_audit.h @@ -2,6 +2,7 @@ #define SQL_AUDIT_INCLUDED /* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -160,7 +161,7 @@ void mysql_audit_general(THD *thd, uint event_subtype, event.general_user_length= make_user_name(thd, user_buff); event.general_thread_id= (unsigned long)thd->thread_id; event.general_query= thd->query_string.str(); - event.general_query_length= thd->query_string.length(); + event.general_query_length= (unsigned) thd->query_string.length(); event.general_charset= thd->query_string.charset(); event.general_rows= thd->get_stmt_da()->current_row_for_warning(); event.database= thd->db; diff --git a/sql/sql_base.cc b/sql/sql_base.cc index b6cfd2f2cc1..65cfe99649e 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -68,7 +68,7 @@ bool No_such_table_error_handler::handle_condition(THD *, uint sql_errno, const char*, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char*, Sql_condition ** cond_hdl) { @@ -79,7 +79,7 @@ No_such_table_error_handler::handle_condition(THD *, return TRUE; } - if (level == Sql_condition::WARN_LEVEL_ERROR) + if (*level == Sql_condition::WARN_LEVEL_ERROR) m_unhandled_errors++; return FALSE; } @@ -112,7 +112,7 @@ public: bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl); @@ -142,7 +142,7 @@ bool Repair_mrg_table_error_handler::handle_condition(THD *, uint sql_errno, const char*, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char*, Sql_condition ** cond_hdl) { @@ -769,6 +769,23 @@ void close_thread_tables(THD *thd) thd->derived_tables= 0; } + if (thd->rec_tables) + { + TABLE *next; + /* + Close all temporary tables created for recursive table references. + This action was postponed because the table could be used in the + statements like ANALYZE WITH r AS (...) SELECT * from r + where r is defined through recursion. + */ + for (table= thd->rec_tables ; table ; table= next) + { + next= table->next; + free_tmp_table(thd, table); + } + thd->rec_tables= 0; + } + /* Mark all temporary tables used by this statement as free for reuse. */ @@ -842,7 +859,7 @@ void close_thread_table(THD *thd, TABLE **table_ptr) DBUG_ENTER("close_thread_table"); DBUG_PRINT("tcache", ("table: '%s'.'%s' 0x%lx", table->s->db.str, table->s->table_name.str, (long) table)); - DBUG_ASSERT(table->key_read == 0); + DBUG_ASSERT(!table->file->keyread_enabled()); DBUG_ASSERT(!table->file || table->file->inited == handler::NONE); /* @@ -1043,7 +1060,7 @@ next: { /* Try to fix */ TABLE_LIST *derived= res->belong_to_derived; - if (derived->is_merged_derived()) + if (derived->is_merged_derived() && !derived->derived->is_excluded()) { DBUG_PRINT("info", ("convert merged to materialization to resolve the conflict")); @@ -1254,7 +1271,7 @@ public: virtual bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl); @@ -1273,7 +1290,7 @@ private: bool MDL_deadlock_handler::handle_condition(THD *, uint sql_errno, const char*, - Sql_condition::enum_warning_level, + Sql_condition::enum_warning_level*, const char*, Sql_condition ** cond_hdl) { @@ -2834,7 +2851,7 @@ public: virtual bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) { @@ -4806,9 +4823,9 @@ static bool fix_all_session_vcol_exprs(THD *thd, TABLE_LIST *tables) fix_session_vcol_expr(thd, (*df)->default_value)) goto err; - for (Virtual_column_info **cc= t->check_constraints; cc && *cc; cc++) - if (fix_session_vcol_expr(thd, (*cc))) - goto err; + for (Virtual_column_info **cc= t->check_constraints; cc && *cc; cc++) + if (fix_session_vcol_expr(thd, (*cc))) + goto err; thd->security_ctx= save_security_ctx; } @@ -7900,14 +7917,14 @@ fill_record(THD *thd, TABLE *table_arg, List &fields, List &values, table_arg->update_default_fields(0, ignore_errors)) goto err; /* Update virtual fields */ - thd->abort_on_warning= FALSE; if (table_arg->vfield && - table_arg->update_virtual_fields(VCOL_UPDATE_FOR_WRITE)) + table_arg->update_virtual_fields(table_arg->file, VCOL_UPDATE_FOR_WRITE)) goto err; thd->abort_on_warning= save_abort_on_warning; thd->no_errors= save_no_errors; DBUG_RETURN(thd->is_error()); err: + DBUG_PRINT("error",("got error")); thd->abort_on_warning= save_abort_on_warning; thd->no_errors= save_no_errors; if (fields.elements) @@ -8043,17 +8060,15 @@ fill_record_n_invoke_before_triggers(THD *thd, TABLE *table, Re-calculate virtual fields to cater for cases when base columns are updated by the triggers. */ - List_iterator_fast f(fields); - Item *fld; - Item_field *item_field; - if (fields.elements) + if (table->vfield && fields.elements) { - fld= (Item_field*)f++; - item_field= fld->field_for_view_update(); - if (item_field && table->vfield) + Item *fld= (Item_field*) fields.head(); + Item_field *item_field= fld->field_for_view_update(); + if (item_field) { DBUG_ASSERT(table == item_field->field->table); - result= table->update_virtual_fields(VCOL_UPDATE_FOR_WRITE); + result|= table->update_virtual_fields(table->file, + VCOL_UPDATE_FOR_WRITE); } } } @@ -8088,6 +8103,7 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List &values, { List_iterator_fast v(values); List tbl_list; + bool all_fields_have_values= true; Item *value; Field *field; bool abort_on_warning_saved= thd->abort_on_warning; @@ -8140,13 +8156,15 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List &values, else if (value->save_in_field(field, 0) < 0) goto err; - field->set_explicit_default(value); + all_fields_have_values &= field->set_explicit_default(value); } - /* There is no default fields to update, as all fields are updated */ + if (!all_fields_have_values && table->default_field && + table->update_default_fields(0, ignore_errors)) + goto err; /* Update virtual fields */ thd->abort_on_warning= FALSE; if (table->vfield && - table->update_virtual_fields(VCOL_UPDATE_FOR_WRITE)) + table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_WRITE)) goto err; thd->abort_on_warning= abort_on_warning_saved; DBUG_RETURN(thd->is_error()); @@ -8200,7 +8218,7 @@ fill_record_n_invoke_before_triggers(THD *thd, TABLE *table, Field **ptr, { DBUG_ASSERT(table == (*ptr)->table); if (table->vfield) - result= table->update_virtual_fields(VCOL_UPDATE_FOR_WRITE); + result= table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_WRITE); } return result; diff --git a/sql/sql_base.h b/sql/sql_base.h index 8f363a73863..374ac56c3d8 100644 --- a/sql/sql_base.h +++ b/sql/sql_base.h @@ -624,7 +624,7 @@ public: bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 1837f2878c7..f042e6600e0 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2008, 2016, MariaDB + Copyright (c) 2008, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -640,7 +640,7 @@ char *thd_security_context(THD *thd, bool Drop_table_error_handler::handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) { @@ -660,7 +660,7 @@ MDL_deadlock_and_lock_abort_error_handler:: handle_condition(THD *thd, uint sql_errno, const char *sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition **cond_hdl) { @@ -742,8 +742,8 @@ THD::THD(my_thread_id id, bool is_wsrep_applier) #endif { ulong tmp; + bzero(&variables, sizeof(variables)); - mdl_context.init(this); /* We set THR_THD to temporally point to this THD to register all the variables that allocates memory for this THD @@ -753,8 +753,11 @@ THD::THD(my_thread_id id, bool is_wsrep_applier) status_var.local_memory_used= sizeof(THD); status_var.global_memory_used= 0; variables.pseudo_thread_id= thread_id; + variables.max_mem_used= global_system_variables.max_mem_used; main_da.init(); + mdl_context.init(this); + /* Pass nominal parameters to init_alloc_root only to ensure that the destructor works OK in case of an error. The main_mem_root @@ -800,7 +803,6 @@ THD::THD(my_thread_id id, bool is_wsrep_applier) connection_name.str= 0; connection_name.length= 0; - bzero(&variables, sizeof(variables)); file_id = 0; query_id= 0; query_name_consts= 0; @@ -916,7 +918,6 @@ THD::THD(my_thread_id id, bool is_wsrep_applier) m_internal_handler= NULL; m_binlog_invoker= INVOKER_NONE; - arena_for_cached_items= 0; memset(&invoker_user, 0, sizeof(invoker_user)); memset(&invoker_host, 0, sizeof(invoker_host)); prepare_derived_at_open= FALSE; @@ -945,7 +946,7 @@ void THD::push_internal_handler(Internal_error_handler *handler) bool THD::handle_condition(uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) { @@ -1072,6 +1073,7 @@ Sql_condition* THD::raise_condition(uint sql_errno, Diagnostics_area *da= get_stmt_da(); Sql_condition *cond= NULL; DBUG_ENTER("THD::raise_condition"); + DBUG_ASSERT(level < Sql_condition::WARN_LEVEL_END); if (!(variables.option_bits & OPTION_SQL_NOTES) && (level == Sql_condition::WARN_LEVEL_NOTE)) @@ -1099,24 +1101,23 @@ Sql_condition* THD::raise_condition(uint sql_errno, push_warning and strict SQL_MODE case. */ level= Sql_condition::WARN_LEVEL_ERROR; - killed= KILL_BAD_DATA; } - switch (level) - { + if (handle_condition(sql_errno, sqlstate, &level, msg, &cond)) + DBUG_RETURN(cond); + + switch (level) { case Sql_condition::WARN_LEVEL_NOTE: case Sql_condition::WARN_LEVEL_WARN: got_warning= 1; break; case Sql_condition::WARN_LEVEL_ERROR: break; - default: - DBUG_ASSERT(FALSE); + case Sql_condition::WARN_LEVEL_END: + /* Impossible */ + break; } - if (handle_condition(sql_errno, sqlstate, level, msg, &cond)) - DBUG_RETURN(cond); - if (level == Sql_condition::WARN_LEVEL_ERROR) { mysql_audit_general(this, MYSQL_AUDIT_GENERAL_ERROR, sql_errno, msg); @@ -6488,21 +6489,19 @@ void THD::binlog_prepare_row_images(TABLE *table) */ DBUG_ASSERT(table->read_set != &table->tmp_set); - bitmap_clear_all(&table->tmp_set); - switch(thd->variables.binlog_row_image) { case BINLOG_ROW_IMAGE_MINIMAL: /* MINIMAL: Mark only PK */ - table->mark_columns_used_by_index_no_reset(table->s->primary_key, - &table->tmp_set); + table->mark_columns_used_by_index(table->s->primary_key, + &table->tmp_set); break; case BINLOG_ROW_IMAGE_NOBLOB: /** NOBLOB: Remove unnecessary BLOB fields from read_set (the ones that are not part of PK). */ - bitmap_union(&table->tmp_set, table->read_set); + bitmap_copy(&table->tmp_set, table->read_set); for (Field **ptr=table->field ; *ptr ; ptr++) { Field *field= (*ptr); diff --git a/sql/sql_class.h b/sql/sql_class.h index ef10d7e4053..22895d7a2d8 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB + Copyright (c) 2009, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -179,7 +179,7 @@ public: } inline char *str() const { return string.str; } - inline uint32 length() const { return string.length; } + inline size_t length() const { return string.length; } CHARSET_INFO *charset() const { return cs; } friend LEX_STRING * thd_query_string (MYSQL_THD thd); @@ -201,99 +201,6 @@ typedef struct st_user_var_events bool unsigned_flag; } BINLOG_USER_VAR_EVENT; - -/* - When updating a table with virtual BLOB columns, the following might happen: - - an old record is read from the table, it has no vcol blob. - - update_virtual_fields() is run, vcol blob gets its value into the - record. But only a pointer to the value is in the table->record[0], - the value is in Field_blob::value String (or, it can be elsewhere!) - - store_record(table,record[1]), old record now is in record[1] - - fill_record() prepares new values in record[0], vcol blob is updated, - new value replaces the old one in the Field_blob::value - - now both record[1] and record[0] have a pointer that points to the - *new* vcol blob value. Or record[1] has a pointer to nowhere if - Field_blob::value had to realloc. - - To resolve this we unlink vcol blobs from the pointer to the - data (in the record[1]). The orphan memory must be freed manually - (but, again, only if it was owned by Field_blob::value String). - - With REPLACE and INSERT ... ON DUP KEY UPATE it's even more complex. - There is no store_record(table,record[1]), instead the row is read - directly into record[1]. -*/ -struct BLOB_VALUE_ORPHANAGE { - MY_BITMAP map; - TABLE *table; - BLOB_VALUE_ORPHANAGE() { map.bitmap= NULL; } - ~BLOB_VALUE_ORPHANAGE() { free(); } - bool init(TABLE *table_arg) - { - table= table_arg; - if (table->s->virtual_fields && table->s->blob_fields) - return bitmap_init(&map, NULL, table->s->virtual_fields, FALSE); - map.bitmap= NULL; - return 0; - } - void free() { bitmap_free(&map); } - - /** Remove blob's ownership from blob value memory - - @note the memory becomes orphaned, it needs to be freed using - free_orphans() or re-attached back to blobs using adopt_orphans() - */ - void make_orphans() - { - DBUG_ASSERT(!table || !table->s->virtual_fields || !table->s->blob_fields || map.bitmap); - if (!map.bitmap) - return; - for (Field **ptr=table->vfield; *ptr; ptr++) - { - Field_blob *vb= (Field_blob*)(*ptr); - if (!(vb->flags & BLOB_FLAG) || !vb->owns_ptr(vb->get_ptr())) - continue; - bitmap_set_bit(&map, ptr - table->vfield); - vb->clear_temporary(); - } - } - - /** Frees orphaned blob values - - @note It is assumed that value pointers are in table->record[1], while - Field_blob::ptr's point to table->record[0] as usual - */ - void free_orphans() - { - DBUG_ASSERT(!table || !table->s->virtual_fields || !table->s->blob_fields || map.bitmap); - if (!map.bitmap) - return; - for (Field **ptr=table->vfield; *ptr; ptr++) - { - Field_blob *vb= (Field_blob*)(*ptr); - if (vb->flags & BLOB_FLAG && bitmap_fast_test_and_clear(&map, ptr - table->vfield)) - my_free(vb->get_ptr(table->s->rec_buff_length)); - } - DBUG_ASSERT(bitmap_is_clear_all(&map)); - } - - /** Restores blob's ownership over previously orphaned values */ - void adopt_orphans() - { - DBUG_ASSERT(!table || !table->s->virtual_fields || !table->s->blob_fields || map.bitmap); - if (!map.bitmap) - return; - for (Field **ptr=table->vfield; *ptr; ptr++) - { - Field_blob *vb= (Field_blob*)(*ptr); - if (vb->flags & BLOB_FLAG && bitmap_fast_test_and_clear(&map, ptr - table->vfield)) - vb->own_value_ptr(); - } - DBUG_ASSERT(bitmap_is_clear_all(&map)); - } -}; - - /* The COPY_INFO structure is used by INSERT/REPLACE code. The schema of the row counting by the INSERT/INSERT ... ON DUPLICATE KEY @@ -306,7 +213,7 @@ struct BLOB_VALUE_ORPHANAGE { of the INSERT ... ON DUPLICATE KEY UPDATE no matter whether the row was actually changed or not. */ -struct COPY_INFO { +typedef struct st_copy_info { ha_rows records; /**< Number of processed records */ ha_rows deleted; /**< Number of deleted records */ ha_rows updated; /**< Number of updated records */ @@ -322,8 +229,7 @@ struct COPY_INFO { /* for VIEW ... WITH CHECK OPTION */ TABLE_LIST *view; TABLE_LIST *table_list; /* Normal table */ - BLOB_VALUE_ORPHANAGE vblobs0, vblobs1; // vcol blobs of record[0] and record[1] -}; +} COPY_INFO; class Key_part_spec :public Sql_alloc { @@ -640,6 +546,7 @@ typedef struct system_variables ulonglong sortbuff_size; ulonglong group_concat_max_len; ulonglong default_regex_flags; + ulonglong max_mem_used; /** Place holders to store Multi-source variables in sys_var.cc during @@ -728,7 +635,7 @@ typedef struct system_variables my_bool old_alter_table; my_bool old_passwords; my_bool big_tables; - my_bool only_standards_compliant_cte; + my_bool only_standard_compliant_cte; my_bool query_cache_strip_comments; my_bool sql_log_slow; my_bool sql_log_bin; @@ -1161,7 +1068,10 @@ public: inline char *query() const { return query_string.str(); } - inline uint32 query_length() const { return query_string.length(); } + inline uint32 query_length() const + { + return static_cast(query_string.length()); + } CHARSET_INFO *query_charset() const { return query_string.charset(); } void set_query_inner(const CSET_STRING &string_arg) { @@ -1474,6 +1384,11 @@ public: */ TABLE *derived_tables; + /* + Temporary tables created for recursive table references. + */ + TABLE *rec_tables; + /* During a MySQL session, one can lock tables in two modes: automatic or manual. In automatic mode all necessary tables are locked just before @@ -1554,6 +1469,7 @@ public: open_tables= 0; temporary_tables= 0; derived_tables= 0; + rec_tables= 0; extra_lock= 0; lock= 0; locked_tables_mode= LTM_NONE; @@ -1652,6 +1568,7 @@ show_system_thread(enum_thread_type thread) Internal error handlers are exception handlers used by the server implementation. */ + class Internal_error_handler { protected: @@ -1689,7 +1606,7 @@ public: virtual bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) = 0; @@ -1710,7 +1627,7 @@ public: bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) { @@ -1737,7 +1654,7 @@ public: bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl); @@ -1758,7 +1675,7 @@ public: bool handle_condition(THD *thd, uint sql_errno, const char *sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition **cond_hdl); @@ -3912,7 +3829,7 @@ private: */ bool handle_condition(uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl); @@ -4084,27 +4001,7 @@ public: } } -private: - /* - This reference points to the table arena when the expression - for a virtual column is being evaluated - */ - Query_arena *arena_for_cached_items; - public: - void reset_arena_for_cached_items(Query_arena *new_arena) - { - arena_for_cached_items= new_arena; - } - Query_arena *switch_to_arena_for_cached_items(Query_arena *backup) - { - if (!arena_for_cached_items) - return 0; - set_n_backup_active_arena(arena_for_cached_items, backup); - return backup; - } - - void clear_wakeup_ready() { wakeup_ready= false; } /* Sleep waiting for others to wake us up with signal_wakeup_ready(). @@ -5435,7 +5332,6 @@ class multi_update :public select_result_interceptor TABLE_LIST *update_tables, *table_being_updated; TABLE **tmp_tables, *main_table, *table_to_update; TMP_TABLE_PARAM *tmp_table_param; - BLOB_VALUE_ORPHANAGE *vblobs; ha_rows updated, found; List *fields, *values; List **fields_for_table, **values_for_table; @@ -5819,6 +5715,22 @@ inline bool binlog_should_compress(ulong len) len >= opt_bin_log_compress_min_len; } + +/** + Save thd sql_mode on instantiation. + On destruction it resets the mode to the previously stored value. +*/ +class Sql_mode_save +{ + public: + Sql_mode_save(THD *thd) : thd(thd), old_mode(thd->variables.sql_mode) {} + ~Sql_mode_save() { thd->variables.sql_mode = old_mode; } + + private: + THD *thd; + sql_mode_t old_mode; // SQL mode saved at construction time. +}; + #endif /* MYSQL_SERVER */ #endif /* SQL_CLASS_INCLUDED */ diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index fe6a101f999..5cb4cd87296 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2007, 2013, Oracle and/or its affiliates. - Copyright (c) 2008, 2014, SkySQL Ab. + Copyright (c) 2008, 2016, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc index a4ceae52e5e..3011b510761 100644 --- a/sql/sql_cte.cc +++ b/sql/sql_cte.cc @@ -1048,7 +1048,7 @@ bool TABLE_LIST::is_with_table_recursive_reference() false otherwise */ -bool st_select_lex::check_unrestricted_recursive(bool only_standards_compliant) +bool st_select_lex::check_unrestricted_recursive(bool only_standard_compliant) { With_element *with_elem= get_with_element(); if (!with_elem ||!with_elem->is_recursive) @@ -1077,9 +1077,9 @@ bool st_select_lex::check_unrestricted_recursive(bool only_standards_compliant) with_elem->get_mutually_recursive()); /* Report an error on unrestricted specification if this is required */ - if (only_standards_compliant && with_elem->is_unrestricted()) + if (only_standard_compliant && with_elem->is_unrestricted()) { - my_error(ER_NOT_STANDARDS_COMPLIANT_RECURSIVE, + my_error(ER_NOT_STANDARD_COMPLIANT_RECURSIVE, MYF(0), with_elem->query_name->str); return true; } @@ -1246,6 +1246,12 @@ bool st_select_lex::check_subqueries_with_recursive_references() void With_clause::print(String *str, enum_query_type query_type) { + /* + Any with clause contains just definitions of CTE tables. + No data expansion is applied to these definitions. + */ + query_type= (enum_query_type) (query_type | QT_NO_DATA_EXPANSION); + str->append(STRING_WITH_LEN("with ")); if (with_recursive) str->append(STRING_WITH_LEN("recursive ")); @@ -1253,9 +1259,9 @@ void With_clause::print(String *str, enum_query_type query_type) with_elem; with_elem= with_elem->next) { - with_elem->print(str, query_type); if (with_elem != with_list.first) str->append(", "); + with_elem->print(str, query_type); } } diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index e9a3be30060..eb5f0d7a477 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -560,10 +560,9 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ! thd->is_error()) { explain->tracker.on_record_read(); - if (table->vfield) - table->update_virtual_fields(VCOL_UPDATE_FOR_WRITE); thd->inc_examined_row_count(1); - // thd->is_error() is tested to disallow delete row on error + if (table->vfield) + (void) table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_DELETE); if (!select || select->skip_record(thd) > 0) { explain->tracker.on_record_after_where(); @@ -1347,4 +1346,3 @@ bool multi_delete::send_eof() } return 0; } - diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index daac90d56f6..76cb27d7d62 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -969,7 +969,10 @@ bool TABLE_LIST::fill_recursive(THD *thd) if (!rc) { TABLE *src= with->rec_result->table; - rc =src->insert_all_rows_into(thd, table, true); + rc =src->insert_all_rows_into_tmp_table(thd, + table, + &with->rec_result->tmp_table_param, + true); } return rc; } @@ -1096,6 +1099,11 @@ bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived) unit->types.empty(); /* for derived tables & PS (which can't be reset by Item_subselect) */ unit->reinit_exec_mechanism(); + for (st_select_lex *sl= unit->first_select(); sl; sl= sl->next_select()) + { + sl->cond_pushed_into_where= NULL; + sl->cond_pushed_into_having= NULL; + } unit->set_thd(thd); DBUG_RETURN(FALSE); } @@ -1126,23 +1134,24 @@ bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived) bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived) { + DBUG_ENTER("pushdown_cond_for_derived"); if (!cond) - return false; + DBUG_RETURN(false); st_select_lex_unit *unit= derived->get_unit(); st_select_lex *sl= unit->first_select(); /* Do not push conditions into constant derived */ if (unit->executed) - return false; + DBUG_RETURN(false); /* Do not push conditions into recursive with tables */ if (derived->is_recursive_with_table()) - return false; + DBUG_RETURN(false); /* Do not push conditions into unit with global ORDER BY ... LIMIT */ if (unit->fake_select_lex && unit->fake_select_lex->explicit_limit) - return false; + DBUG_RETURN(false); /* Check whether any select of 'unit' allows condition pushdown */ bool some_select_allows_cond_pushdown= false; @@ -1155,7 +1164,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived) } } if (!some_select_allows_cond_pushdown) - return false; + DBUG_RETURN(false); /* Build the most restrictive condition extractable from 'cond' @@ -1170,7 +1179,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived) if (!extracted_cond) { /* Nothing can be pushed into the derived table */ - return false; + DBUG_RETURN(false); } /* Push extracted_cond into every select of the unit specifying 'derived' */ st_select_lex *save_curr_select= thd->lex->current_select; @@ -1254,6 +1263,6 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived) sl->cond_pushed_into_having= extracted_cond_copy; } thd->lex->current_select= save_curr_select; - return false; + DBUG_RETURN(false); } diff --git a/sql/sql_error.h b/sql/sql_error.h index aa8e6c6b0f3..3aef5d38368 100644 --- a/sql/sql_error.h +++ b/sql/sql_error.h @@ -1,4 +1,5 @@ /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -50,7 +51,7 @@ public: Convert a bitmask consisting of MYSQL_TIME_{NOTE|WARN}_XXX bits to WARN_LEVEL_XXX */ - static enum_warning_level time_warn_level(int warnings) + static enum_warning_level time_warn_level(uint warnings) { return MYSQL_TIME_WARN_HAVE_WARNINGS(warnings) ? WARN_LEVEL_WARN : WARN_LEVEL_NOTE; diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 58db104ec96..4a27244f5b9 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -458,9 +458,10 @@ bool mysql_ha_close(THD *thd, TABLE_LIST *tables) my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0)); DBUG_RETURN(TRUE); } - if ((handler= (SQL_HANDLER*) my_hash_search(&thd->handler_tables_hash, - (uchar*) tables->alias, - strlen(tables->alias) + 1))) + if ((my_hash_inited(&thd->handler_tables_hash)) && + (handler= (SQL_HANDLER*) my_hash_search(&thd->handler_tables_hash, + (uchar*) tables->alias, + strlen(tables->alias) + 1))) { mysql_ha_close_table(handler); my_hash_delete(&thd->handler_tables_hash, (uchar*) handler); @@ -497,8 +498,10 @@ bool mysql_ha_close(THD *thd, TABLE_LIST *tables) SQL_HANDLER *mysql_ha_find_handler(THD *thd, const char *name) { SQL_HANDLER *handler; - if ((handler= (SQL_HANDLER*) my_hash_search(&thd->handler_tables_hash, - (uchar*) name, strlen(name) + 1))) + if ((my_hash_inited(&thd->handler_tables_hash)) && + (handler= (SQL_HANDLER*) my_hash_search(&thd->handler_tables_hash, + (uchar*) name, + strlen(name) + 1))) { DBUG_PRINT("info-in-hash",("'%s'.'%s' as '%s' table: %p", handler->db.str, diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 9c21cb74802..27820c16543 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -309,6 +309,32 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list, DBUG_RETURN(0); } +static bool has_no_default_value(THD *thd, Field *field, TABLE_LIST *table_list) +{ + if ((field->flags & NO_DEFAULT_VALUE_FLAG) && field->real_type() != MYSQL_TYPE_ENUM) + { + bool view= false; + if (table_list) + { + table_list= table_list->top_table(); + view= table_list->view != NULL; + } + if (view) + { + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_NO_DEFAULT_FOR_VIEW_FIELD, + ER_THD(thd, ER_NO_DEFAULT_FOR_VIEW_FIELD), + table_list->view_db.str, table_list->view_name.str); + } + else + { + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_NO_DEFAULT_FOR_FIELD, + ER_THD(thd, ER_NO_DEFAULT_FOR_FIELD), field->field_name); + } + return true; + } + return false; +} + /** Check if update fields are correct. @@ -744,13 +770,10 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, DBUG_ASSERT(bulk_iterations > 0); if (mysql_prepare_insert(thd, table_list, table, fields, values, update_fields, update_values, duplic, &unused_conds, - FALSE, - (fields.elements || !value_count || - table_list->view != 0), - !ignore && thd->is_strict_mode())) + FALSE)) goto abort; - /* mysql_prepare_insert set table_list->table if it was not set */ + /* mysql_prepare_insert sets table_list->table if it was not set */ table= table_list->table; context= &thd->lex->select_lex.context; @@ -812,11 +835,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, info.update_values= &update_values; info.view= (table_list->view ? table_list : 0); info.table_list= table_list; - if (duplic != DUP_ERROR) - { - info.vblobs0.init(table); - info.vblobs1.init(table); - } /* Count warnings for all inserts. @@ -884,6 +902,15 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, table->prepare_triggers_for_insert_stmt_or_event(); table->mark_columns_needed_for_insert(); + if (fields.elements || !value_count || table_list->view != 0) + { + if (check_that_all_fields_are_given_values(thd, table, table_list)) + { + error= 1; + goto values_loop_end; + } + } + if (table_list->prepare_where(thd, 0, TRUE) || table_list->prepare_check_option(thd)) error= 1; @@ -964,6 +991,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, share->default_values[share->null_bytes - 1]; } } + table->reset_default_fields(); if (fill_record_n_invoke_before_triggers(thd, table, table->field_to_fill(), *values, 0, TRG_EVENT_INSERT)) @@ -978,6 +1006,24 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, } } + /* + with triggers a field can get a value *conditionally*, so we have to repeat + has_no_default_value() check for every row + */ + if (table->triggers && + table->triggers->has_triggers(TRG_EVENT_INSERT, TRG_ACTION_BEFORE)) + { + for (Field **f=table->field ; *f ; f++) + { + if (!(*f)->has_explicit_value() && + has_no_default_value(thd, *f, table_list)) + { + error= 1; + goto values_loop_end; + } + } + } + if ((res= table_list->view_check_option(thd, (values_list.elements == 1 ? 0 : @@ -989,6 +1035,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, error= 1; break; } + #ifndef EMBEDDED_LIBRARY if (lock_type == TL_WRITE_DELAYED) { @@ -1184,6 +1231,7 @@ values_loop_end: thd->lex->current_select->save_leaf_tables(thd); thd->lex->current_select->first_cond_optimization= 0; } + DBUG_RETURN(FALSE); abort: @@ -1388,10 +1436,6 @@ static void prepare_for_positional_update(TABLE *table, TABLE_LIST *tables) be taken from table_list->table) where Where clause (for insert ... select) select_insert TRUE if INSERT ... SELECT statement - check_fields TRUE if need to check that all INSERT fields are - given values. - abort_on_warning whether to report if some INSERT field is not - assigned as an error (TRUE) or as a warning (FALSE). TODO (in far future) In cases of: @@ -1411,9 +1455,8 @@ static void prepare_for_positional_update(TABLE *table, TABLE_LIST *tables) bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, TABLE *table, List &fields, List_item *values, List &update_fields, List &update_values, - enum_duplicates duplic, - COND **where, bool select_insert, - bool check_fields, bool abort_on_warning) + enum_duplicates duplic, COND **where, + bool select_insert) { SELECT_LEX *select_lex= &thd->lex->select_lex; Name_resolution_context *context= &select_lex->context; @@ -1485,17 +1528,6 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, check_insert_fields(thd, context->table_list, fields, *values, !insert_into_view, 0, &map)); - if (!res && check_fields) - { - bool saved_abort_on_warning= thd->abort_on_warning; - thd->abort_on_warning= abort_on_warning; - res= check_that_all_fields_are_given_values(thd, - table ? table : - context->table_list->table, - context->table_list); - thd->abort_on_warning= saved_abort_on_warning; - } - if (!res) res= setup_fields(thd, Ref_ptr_array(), update_values, MARK_COLUMNS_READ, 0, 0); @@ -1695,12 +1727,13 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) } if (table->vfield) { - info->vblobs0.make_orphans(); + /* + We have not yet called update_virtual_fields(VOL_UPDATE_FOR_READ) + in handler methods for the just read row in record[1]. + */ table->move_fields(table->field, table->record[1], table->record[0]); - table->update_virtual_fields(VCOL_UPDATE_INDEXED); - info->vblobs1.make_orphans(); + table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_REPLACE); table->move_fields(table->field, table->record[0], table->record[1]); - info->vblobs0.adopt_orphans(); } if (info->handle_duplicates == DUP_UPDATE) { @@ -1861,7 +1894,6 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) trg_error= 1; goto ok_or_after_trg_err; } - info->vblobs1.free_orphans(); /* Let us attempt do write_row() once more */ } } @@ -1912,7 +1944,6 @@ ok_or_after_trg_err: my_safe_afree(key,table->s->max_unique_length); if (!table->file->has_transactions()) thd->transaction.stmt.modified_non_trans_table= TRUE; - info->vblobs1.free_orphans(); DBUG_RETURN(trg_error); err: @@ -1924,7 +1955,6 @@ before_trg_err: if (key) my_safe_afree(key, table->s->max_unique_length); table->column_bitmaps_set(save_read_set, save_write_set); - info->vblobs1.free_orphans(); DBUG_RETURN(1); } @@ -1933,8 +1963,8 @@ before_trg_err: Check that all fields with arn't null_fields are used ******************************************************************************/ -int check_that_all_fields_are_given_values(THD *thd, TABLE *entry, - TABLE_LIST *table_list) + +int check_that_all_fields_are_given_values(THD *thd, TABLE *entry, TABLE_LIST *table_list) { int err= 0; MY_BITMAP *write_set= entry->write_set; @@ -1942,32 +1972,8 @@ int check_that_all_fields_are_given_values(THD *thd, TABLE *entry, for (Field **field=entry->field ; *field ; field++) { if (!bitmap_is_set(write_set, (*field)->field_index) && - ((*field)->flags & NO_DEFAULT_VALUE_FLAG) && - ((*field)->real_type() != MYSQL_TYPE_ENUM)) - { - bool view= FALSE; - if (table_list) - { - table_list= table_list->top_table(); - view= MY_TEST(table_list->view); - } - if (view) - { - push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - ER_NO_DEFAULT_FOR_VIEW_FIELD, - ER_THD(thd, ER_NO_DEFAULT_FOR_VIEW_FIELD), - table_list->view_db.str, - table_list->view_name.str); - } - else - { - push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - ER_NO_DEFAULT_FOR_FIELD, - ER_THD(thd, ER_NO_DEFAULT_FOR_FIELD), - (*field)->field_name); - } - err= 1; - } + has_no_default_value(thd, *field, table_list)) + err=1; } return thd->abort_on_warning ? err : 0; } @@ -2529,10 +2535,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) } if (share->default_fields || share->default_expressions) { - if (!(copy->has_value_set= (MY_BITMAP*) alloc_root(client_thd->mem_root, - sizeof(MY_BITMAP)))) - goto error; - my_bitmap_init(copy->has_value_set, + my_bitmap_init(©->has_value_set, (my_bitmap_map*) (bitmap + bitmaps_used*share->column_bitmap_size), share->fields, FALSE); @@ -2922,6 +2925,8 @@ pthread_handler_t handle_delayed_insert(void *arg) thd->mdl_context.set_needs_thr_lock_abort(TRUE); di->table->mark_columns_needed_for_insert(); + /* Mark all columns for write as we don't know which columns we get from user */ + bitmap_set_all(di->table->write_set); /* Now wait until we get an insert or lock to handle */ /* We will not abort as long as a client thread uses this thread */ @@ -3089,7 +3094,7 @@ pthread_handler_t handle_delayed_insert(void *arg) } -/* Remove pointers from temporary fields to allocated values */ +/* Remove all pointers to data for blob fields so that original table doesn't try to free them */ static void unlink_blobs(register TABLE *table) { @@ -3106,14 +3111,24 @@ static void free_delayed_insert_blobs(register TABLE *table) { for (Field **ptr=table->field ; *ptr ; ptr++) { - Field_blob *f= (Field_blob*)(*ptr); - if (f->flags & BLOB_FLAG) + if ((*ptr)->flags & BLOB_FLAG) + ((Field_blob *) *ptr)->free(); + } +} + + +/* set value field for blobs to point to data in record */ + +static void set_delayed_insert_blobs(register TABLE *table) +{ + for (Field **ptr=table->field ; *ptr ; ptr++) + { + if ((*ptr)->flags & BLOB_FLAG) { - if (f->vcol_info) - f->free(); - else - my_free(f->get_ptr()); - f->reset(); + Field_blob *blob= ((Field_blob *) *ptr); + uchar *data= blob->get_ptr(); + if (data) + blob->set_value(data); // Set value.ptr() to point to data } } } @@ -3135,9 +3150,6 @@ bool Delayed_insert::handle_inserts(void) table->next_number_field=table->found_next_number_field; table->use_all_columns(); - info.vblobs0.init(table); - info.vblobs1.init(table); - THD_STAGE_INFO(&thd, stage_upgrading_lock); if (thr_upgrade_write_delay_lock(*thd.lock->locks, delayed_lock, thd.variables.lock_wait_timeout)) @@ -3171,9 +3183,12 @@ bool Delayed_insert::handle_inserts(void) while ((row=rows.get())) { + int tmp_error; stacked_inserts--; mysql_mutex_unlock(&mutex); memcpy(table->record[0],row->record,table->s->reclength); + if (table->s->blob_fields) + set_delayed_insert_blobs(table); thd.start_time=row->start_time; thd.query_start_used=row->query_start_used; @@ -3244,9 +3259,20 @@ bool Delayed_insert::handle_inserts(void) if (info.handle_duplicates == DUP_UPDATE) table->file->extra(HA_EXTRA_INSERT_WITH_UPDATE); thd.clear_error(); // reset error for binlog + + tmp_error= 0; if (table->vfield) - table->update_virtual_fields(VCOL_UPDATE_FOR_WRITE); - if (write_record(&thd, table, &info)) + { + /* + Virtual fields where not calculated by caller as the temporary + TABLE object used had vcol_set empty. Better to calculate them + here to make the caller faster. + */ + tmp_error= table->update_virtual_fields(table->file, + VCOL_UPDATE_FOR_WRITE); + } + + if (tmp_error || write_record(&thd, table, &info)) { info.error_count++; // Ignore errors thread_safe_increment(delayed_insert_errors,&LOCK_delayed_status); @@ -3352,8 +3378,6 @@ bool Delayed_insert::handle_inserts(void) DBUG_PRINT("error", ("HA_EXTRA_NO_CACHE failed after loop")); goto err; } - info.vblobs0.free(); - info.vblobs1.free(); query_cache_invalidate3(&thd, table, 1); mysql_mutex_lock(&mutex); DBUG_RETURN(0); @@ -3362,8 +3386,6 @@ bool Delayed_insert::handle_inserts(void) #ifndef DBUG_OFF max_rows= 0; // For DBUG output #endif - info.vblobs0.free(); - info.vblobs1.free(); /* Remove all not used rows */ mysql_mutex_lock(&mutex); while ((row=rows.get())) @@ -3371,6 +3393,7 @@ bool Delayed_insert::handle_inserts(void) if (table->s->blob_fields) { memcpy(table->record[0],row->record,table->s->reclength); + set_delayed_insert_blobs(table); free_delayed_insert_blobs(table); } delete row; @@ -3417,9 +3440,8 @@ bool mysql_insert_select_prepare(THD *thd) if (mysql_prepare_insert(thd, lex->query_tables, lex->query_tables->table, lex->field_list, 0, - lex->update_list, lex->value_list, - lex->duplicates, - &select_lex->where, TRUE, FALSE, FALSE)) + lex->update_list, lex->value_list, lex->duplicates, + &select_lex->where, TRUE)) DBUG_RETURN(TRUE); DBUG_ASSERT(select_lex->leaf_tables.elements != 0); @@ -3506,8 +3528,7 @@ select_insert::prepare(List &values, SELECT_LEX_UNIT *u) { bool saved_abort_on_warning= thd->abort_on_warning; thd->abort_on_warning= !info.ignore && thd->is_strict_mode(); - res= check_that_all_fields_are_given_values(thd, table_list->table, - table_list); + res= check_that_all_fields_are_given_values(thd, table_list->table, table_list); thd->abort_on_warning= saved_abort_on_warning; } @@ -3611,11 +3632,6 @@ select_insert::prepare(List &values, SELECT_LEX_UNIT *u) restore_record(table,s->default_values); // Get empty record table->reset_default_fields(); table->next_number_field=table->found_next_number_field; - if (info.handle_duplicates != DUP_ERROR) - { - info.vblobs0.init(table); - info.vblobs1.init(table); - } #ifdef HAVE_REPLICATION if (thd->rgi_slave && diff --git a/sql/sql_insert.h b/sql/sql_insert.h index 5ec1846425d..aea0dac6b0d 100644 --- a/sql/sql_insert.h +++ b/sql/sql_insert.h @@ -21,13 +21,13 @@ /* Instead of including sql_lex.h we add this typedef here */ typedef List List_item; +typedef struct st_copy_info COPY_INFO; bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, TABLE *table, List &fields, List_item *values, List &update_fields, List &update_values, enum_duplicates duplic, - COND **where, bool select_insert, - bool check_fields, bool abort_on_warning); + COND **where, bool select_insert); bool mysql_insert(THD *thd,TABLE_LIST *table,List &fields, List &values, List &update_fields, List &update_values, enum_duplicates flag, diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc index b9d7f660a5a..8a293956da7 100644 --- a/sql/sql_join_cache.cc +++ b/sql/sql_join_cache.cc @@ -1376,7 +1376,8 @@ uint JOIN_CACHE::write_record_data(uchar * link, bool *is_full) if (copy->referenced_field_no) copy->offset= cp-curr_rec_pos; - if (copy->type == CACHE_BLOB) + switch (copy->type) { + case CACHE_BLOB: { Field_blob *blob_field= (Field_blob *) copy->field; if (last_record) @@ -1397,69 +1398,66 @@ uint JOIN_CACHE::write_record_data(uchar * link, bool *is_full) memcpy(cp+copy->length, copy->str, copy->blob_length); cp+= copy->length+copy->blob_length; } + break; } - else + case CACHE_VARSTR1: + /* Copy the significant part of the short varstring field */ + len= (uint) copy->str[0] + 1; + DBUG_ASSERT(cp + len <= buff + buff_size); + memcpy(cp, copy->str, len); + cp+= len; + break; + case CACHE_VARSTR2: + /* Copy the significant part of the long varstring field */ + len= uint2korr(copy->str) + 2; + DBUG_ASSERT(cp + len <= buff + buff_size); + memcpy(cp, copy->str, len); + cp+= len; + break; + case CACHE_STRIPPED: { - switch (copy->type) { - case CACHE_VARSTR1: - /* Copy the significant part of the short varstring field */ - len= (uint) copy->str[0] + 1; - DBUG_ASSERT(cp + len <= buff + buff_size); - memcpy(cp, copy->str, len); - cp+= len; - break; - case CACHE_VARSTR2: - /* Copy the significant part of the long varstring field */ - len= uint2korr(copy->str) + 2; - DBUG_ASSERT(cp + len <= buff + buff_size); - memcpy(cp, copy->str, len); - cp+= len; - break; - case CACHE_STRIPPED: + /* + Put down the field value stripping all trailing spaces off. + After this insert the length of the written sequence of bytes. + */ + uchar *str, *end; + for (str= copy->str, end= str+copy->length; + end > str && end[-1] == ' '; + end--) ; + len=(uint) (end-str); + DBUG_ASSERT(cp + len + 2 <= buff + buff_size); + int2store(cp, len); + memcpy(cp+2, str, len); + cp+= len+2; + break; + } + case CACHE_ROWID: + if (!copy->length) { - /* - Put down the field value stripping all trailing spaces off. - After this insert the length of the written sequence of bytes. - */ - uchar *str, *end; - for (str= copy->str, end= str+copy->length; - end > str && end[-1] == ' '; - end--) ; - len=(uint) (end-str); - DBUG_ASSERT(cp + len + 2 <= buff + buff_size); - int2store(cp, len); - memcpy(cp+2, str, len); - cp+= len+2; - break; - } - case CACHE_ROWID: - if (!copy->length) - { + /* + This may happen only for ROWID fields of materialized + derived tables and views. + */ + TABLE *table= (TABLE *) copy->str; + copy->str= table->file->ref; + copy->length= table->file->ref_length; + if (!copy->str) + { /* - This may happen only for ROWID fields of materialized - derived tables and views. - */ - TABLE *table= (TABLE *) copy->str; - copy->str= table->file->ref; - copy->length= table->file->ref_length; - if (!copy->str) - { - /* - If table is an empty inner table of an outer join and it is - a materialized derived table then table->file->ref == NULL. - */ - cp+= copy->length; - break; - } + If table is an empty inner table of an outer join and it is + a materialized derived table then table->file->ref == NULL. + */ + cp+= copy->length; + break; } - /* fall through */ - default: - /* Copy the entire image of the field from the record buffer */ - DBUG_ASSERT(cp + copy->length <= buff + buff_size); - if (copy->str) - memcpy(cp, copy->str, copy->length); - cp+= copy->length; } + /* fall through */ + default: + /* Copy the entire image of the field from the record buffer */ + DBUG_ASSERT(cp + copy->length <= buff + buff_size); + if (copy->str) + memcpy(cp, copy->str, copy->length); + cp+= copy->length; } } @@ -1717,7 +1715,7 @@ uint JOIN_CACHE::aux_buffer_incr(ulong recno) The function reads all flag and data fields of a record from the join buffer into the corresponding record buffers. The fields are read starting from the position 'pos' which is - supposed to point to the beginning og the first record field. + supposed to point to the beginning of the first record field. The function increments the value of 'pos' by the length of the read data. @@ -1808,60 +1806,58 @@ uint JOIN_CACHE::read_flag_fields() uint JOIN_CACHE::read_record_field(CACHE_FIELD *copy, bool blob_in_rec_buff) { uint len; - /* Do not copy the field if its value is null */ + /* Do not copy the field if its value is null */ if (copy->field && copy->field->maybe_null() && copy->field->is_null()) - return 0; - if (copy->type == CACHE_BLOB) - { - Field_blob *blob_field= (Field_blob *) copy->field; - /* - Copy the length and the pointer to data but not the blob data - itself to the record buffer - */ - if (blob_in_rec_buff) + return 0; + switch (copy->type) { + case CACHE_BLOB: { - blob_field->set_image(pos, copy->length+sizeof(char*), - blob_field->charset()); - len= copy->length+sizeof(char*); - } - else - { - blob_field->set_ptr(pos, pos+copy->length); - len= copy->length+blob_field->get_length(); - } - } - else - { - switch (copy->type) { - case CACHE_VARSTR1: - /* Copy the significant part of the short varstring field */ - len= (uint) pos[0] + 1; - memcpy(copy->str, pos, len); - break; - case CACHE_VARSTR2: - /* Copy the significant part of the long varstring field */ - len= uint2korr(pos) + 2; - memcpy(copy->str, pos, len); - break; - case CACHE_STRIPPED: - /* Pad the value by spaces that has been stripped off */ - len= uint2korr(pos); - memcpy(copy->str, pos+2, len); - memset(copy->str+len, ' ', copy->length-len); - len+= 2; - break; - case CACHE_ROWID: - if (!copy->str) + Field_blob *blob_field= (Field_blob *) copy->field; + /* + Copy the length and the pointer to data but not the blob data + itself to the record buffer + */ + if (blob_in_rec_buff) { - len= copy->length; - break; + blob_field->set_image(pos, copy->length + sizeof(char*), + blob_field->charset()); + len= copy->length + sizeof(char*); + } + else + { + blob_field->set_ptr(pos, pos+copy->length); + len= copy->length + blob_field->get_length(); } - /* fall through */ - default: - /* Copy the entire image of the field from the record buffer */ - len= copy->length; - memcpy(copy->str, pos, len); } + break; + case CACHE_VARSTR1: + /* Copy the significant part of the short varstring field */ + len= (uint) pos[0] + 1; + memcpy(copy->str, pos, len); + break; + case CACHE_VARSTR2: + /* Copy the significant part of the long varstring field */ + len= uint2korr(pos) + 2; + memcpy(copy->str, pos, len); + break; + case CACHE_STRIPPED: + /* Pad the value by spaces that has been stripped off */ + len= uint2korr(pos); + memcpy(copy->str, pos+2, len); + memset(copy->str+len, ' ', copy->length-len); + len+= 2; + break; + case CACHE_ROWID: + if (!copy->str) + { + len= copy->length; + break; + } + /* fall through */ + default: + /* Copy the entire image of the field from the record buffer */ + len= copy->length; + memcpy(copy->str, pos, len); } pos+= len; return len; @@ -2718,7 +2714,7 @@ int JOIN_CACHE_HASHED::init(bool for_explain) data_fields_offset+= copy->length; } - DBUG_RETURN(rc); + DBUG_RETURN(0); } @@ -3927,9 +3923,9 @@ static void bka_range_seq_key_info(void *init_params, uint *length, key_part_map *map) { -TABLE_REF *ref= &(((JOIN_CACHE*)init_params)->join_tab->ref); -*length= ref->key_length; -*map= (key_part_map(1) << ref->key_parts) - 1; + TABLE_REF *ref= &(((JOIN_CACHE*)init_params)->join_tab->ref); + *length= ref->key_length; + *map= (key_part_map(1) << ref->key_parts) - 1; } @@ -3957,10 +3953,10 @@ RETURN VALUE static range_seq_t bka_range_seq_init(void *init_param, uint n_ranges, uint flags) { -DBUG_ENTER("bka_range_seq_init"); -JOIN_CACHE_BKA *cache= (JOIN_CACHE_BKA *) init_param; -cache->reset(0); -DBUG_RETURN((range_seq_t) init_param); + DBUG_ENTER("bka_range_seq_init"); + JOIN_CACHE_BKA *cache= (JOIN_CACHE_BKA *) init_param; + cache->reset(0); + DBUG_RETURN((range_seq_t) init_param); } @@ -3988,21 +3984,21 @@ RETURN VALUE static bool bka_range_seq_next(range_seq_t rseq, KEY_MULTI_RANGE *range) { -DBUG_ENTER("bka_range_seq_next"); -JOIN_CACHE_BKA *cache= (JOIN_CACHE_BKA *) rseq; -TABLE_REF *ref= &cache->join_tab->ref; -key_range *start_key= &range->start_key; -if ((start_key->length= cache->get_next_key((uchar **) &start_key->key))) -{ - start_key->keypart_map= (1 << ref->key_parts) - 1; - start_key->flag= HA_READ_KEY_EXACT; - range->end_key= *start_key; - range->end_key.flag= HA_READ_AFTER_KEY; - range->ptr= (char *) cache->get_curr_rec(); - range->range_flag= EQ_RANGE; - DBUG_RETURN(0); -} -DBUG_RETURN(1); + DBUG_ENTER("bka_range_seq_next"); + JOIN_CACHE_BKA *cache= (JOIN_CACHE_BKA *) rseq; + TABLE_REF *ref= &cache->join_tab->ref; + key_range *start_key= &range->start_key; + if ((start_key->length= cache->get_next_key((uchar **) &start_key->key))) + { + start_key->keypart_map= (1 << ref->key_parts) - 1; + start_key->flag= HA_READ_KEY_EXACT; + range->end_key= *start_key; + range->end_key.flag= HA_READ_AFTER_KEY; + range->ptr= (char *) cache->get_curr_rec(); + range->range_flag= EQ_RANGE; + DBUG_RETURN(0); + } + DBUG_RETURN(1); } @@ -4034,11 +4030,11 @@ RETURN VALUE static bool bka_range_seq_skip_record(range_seq_t rseq, range_id_t range_info, uchar *rowid) { -DBUG_ENTER("bka_range_seq_skip_record"); -JOIN_CACHE_BKA *cache= (JOIN_CACHE_BKA *) rseq; -bool res= cache->get_match_flag_by_pos((uchar *) range_info) == - JOIN_CACHE::MATCH_FOUND; -DBUG_RETURN(res); + DBUG_ENTER("bka_range_seq_skip_record"); + JOIN_CACHE_BKA *cache= (JOIN_CACHE_BKA *) rseq; + bool res= cache->get_match_flag_by_pos((uchar *) range_info) == + JOIN_CACHE::MATCH_FOUND; + DBUG_RETURN(res); } @@ -4065,14 +4061,14 @@ RETURN VALUE static bool bka_skip_index_tuple(range_seq_t rseq, range_id_t range_info) { -DBUG_ENTER("bka_skip_index_tuple"); -JOIN_CACHE_BKA *cache= (JOIN_CACHE_BKA *) rseq; -THD *thd= cache->thd(); -bool res; -status_var_increment(thd->status_var.ha_icp_attempts); -if (!(res= cache->skip_index_tuple(range_info))) - status_var_increment(thd->status_var.ha_icp_match); -DBUG_RETURN(res); + DBUG_ENTER("bka_skip_index_tuple"); + JOIN_CACHE_BKA *cache= (JOIN_CACHE_BKA *) rseq; + THD *thd= cache->thd(); + bool res; + status_var_increment(thd->status_var.ha_icp_attempts); + if (!(res= cache->skip_index_tuple(range_info))) + status_var_increment(thd->status_var.ha_icp_match); + DBUG_RETURN(res); } @@ -4101,10 +4097,10 @@ RETURN VALUE bool JOIN_CACHE_BKA::prepare_look_for_matches(bool skip_last) { -if (!records) - return TRUE; -rem_records= 1; -return FALSE; + if (!records) + return TRUE; + rem_records= 1; + return FALSE; } @@ -4133,11 +4129,11 @@ RETURN VALUE uchar *JOIN_CACHE_BKA::get_next_candidate_for_match() { -if (!rem_records) - return 0; -rem_records--; -return curr_association; -} + if (!rem_records) + return 0; + rem_records--; + return curr_association; +} /* @@ -4161,8 +4157,8 @@ RETURN VALUE bool JOIN_CACHE_BKA::skip_next_candidate_for_match(uchar *rec_ptr) { -return join_tab->check_only_first_match() && - (get_match_flag_by_pos(rec_ptr) == MATCH_FOUND); + return join_tab->check_only_first_match() && + (get_match_flag_by_pos(rec_ptr) == MATCH_FOUND); } @@ -4189,8 +4185,8 @@ RETURN VALUE void JOIN_CACHE_BKA::read_next_candidate_for_match(uchar *rec_ptr) { -get_record_by_pos(rec_ptr); -} + get_record_by_pos(rec_ptr); +} /* @@ -4216,30 +4212,29 @@ RETURN VALUE int JOIN_CACHE_BKA::init(bool for_explain) { -int res; -bool check_only_first_match= join_tab->check_only_first_match(); + int res; + bool check_only_first_match= join_tab->check_only_first_match(); -RANGE_SEQ_IF rs_funcs= { bka_range_seq_key_info, - bka_range_seq_init, - bka_range_seq_next, - check_only_first_match ? - bka_range_seq_skip_record : 0, - bka_skip_index_tuple }; + RANGE_SEQ_IF rs_funcs= { bka_range_seq_key_info, + bka_range_seq_init, + bka_range_seq_next, + check_only_first_match ? bka_range_seq_skip_record : 0, + bka_skip_index_tuple }; -DBUG_ENTER("JOIN_CACHE_BKA::init"); + DBUG_ENTER("JOIN_CACHE_BKA::init"); -JOIN_TAB_SCAN_MRR *jsm; -if (!(join_tab_scan= jsm= new JOIN_TAB_SCAN_MRR(join, join_tab, - mrr_mode, rs_funcs))) - DBUG_RETURN(1); + JOIN_TAB_SCAN_MRR *jsm; + if (!(join_tab_scan= jsm= new JOIN_TAB_SCAN_MRR(join, join_tab, + mrr_mode, rs_funcs))) + DBUG_RETURN(1); -if ((res= JOIN_CACHE::init(for_explain))) - DBUG_RETURN(res); + if ((res= JOIN_CACHE::init(for_explain))) + DBUG_RETURN(res); -if (use_emb_key) - jsm->mrr_mode |= HA_MRR_MATERIALIZED_KEYS; + if (use_emb_key) + jsm->mrr_mode |= HA_MRR_MATERIALIZED_KEYS; -DBUG_RETURN(0); + DBUG_RETURN(0); } @@ -4278,96 +4273,96 @@ RETURN VALUE uint JOIN_CACHE_BKA::get_next_key(uchar ** key) { -uint len; -uint32 rec_len; -uchar *init_pos; -JOIN_CACHE *cache; + uint len; + uint32 rec_len; + uchar *init_pos; + JOIN_CACHE *cache; start: -/* Any record in a BKA cache is prepended with its length */ -DBUG_ASSERT(with_length); - -if ((pos+size_of_rec_len) > last_rec_pos || !records) - return 0; + /* Any record in a BKA cache is prepended with its length */ + DBUG_ASSERT(with_length); -/* Read the length of the record */ -rec_len= get_rec_length(pos); -pos+= size_of_rec_len; -init_pos= pos; + if ((pos+size_of_rec_len) > last_rec_pos || !records) + return 0; -/* Read a reference to the previous cache if any */ -if (prev_cache) - pos+= prev_cache->get_size_of_rec_offset(); + /* Read the length of the record */ + rec_len= get_rec_length(pos); + pos+= size_of_rec_len; + init_pos= pos; -curr_rec_pos= pos; + /* Read a reference to the previous cache if any */ + if (prev_cache) + pos+= prev_cache->get_size_of_rec_offset(); -/* Read all flag fields of the record */ -read_flag_fields(); + curr_rec_pos= pos; -if (with_match_flag && - (Match_flag) curr_rec_pos[0] == MATCH_IMPOSSIBLE ) -{ - pos= init_pos+rec_len; - goto start; -} + /* Read all flag fields of the record */ + read_flag_fields(); -if (use_emb_key) -{ - /* An embedded key is taken directly from the join buffer */ - *key= pos; - len= emb_key_length; -} -else -{ - /* Read key arguments from previous caches if there are any such fields */ - if (external_key_arg_fields) + if (with_match_flag && + (Match_flag) curr_rec_pos[0] == MATCH_IMPOSSIBLE ) { - uchar *rec_ptr= curr_rec_pos; - uint key_arg_count= external_key_arg_fields; - CACHE_FIELD **copy_ptr= blob_ptr-key_arg_count; - for (cache= prev_cache; key_arg_count; cache= cache->prev_cache) - { - uint len= 0; - DBUG_ASSERT(cache); - rec_ptr= cache->get_rec_ref(rec_ptr); - while (!cache->referenced_fields) + pos= init_pos+rec_len; + goto start; + } + + if (use_emb_key) + { + /* An embedded key is taken directly from the join buffer */ + *key= pos; + len= emb_key_length; + } + else + { + /* Read key arguments from previous caches if there are any such fields */ + if (external_key_arg_fields) + { + uchar *rec_ptr= curr_rec_pos; + uint key_arg_count= external_key_arg_fields; + CACHE_FIELD **copy_ptr= blob_ptr-key_arg_count; + for (cache= prev_cache; key_arg_count; cache= cache->prev_cache) { - cache= cache->prev_cache; + uint len= 0; DBUG_ASSERT(cache); rec_ptr= cache->get_rec_ref(rec_ptr); - } - while (key_arg_count && - cache->read_referenced_field(*copy_ptr, rec_ptr, &len)) - { - copy_ptr++; - --key_arg_count; + while (!cache->referenced_fields) + { + cache= cache->prev_cache; + DBUG_ASSERT(cache); + rec_ptr= cache->get_rec_ref(rec_ptr); + } + while (key_arg_count && + cache->read_referenced_field(*copy_ptr, rec_ptr, &len)) + { + copy_ptr++; + --key_arg_count; + } } } + + /* + Read the other key arguments from the current record. The fields for + these arguments are always first in the sequence of the record's fields. + */ + CACHE_FIELD *copy= field_descr+flag_fields; + CACHE_FIELD *copy_end= copy+local_key_arg_fields; + bool blob_in_rec_buff= blob_data_is_in_rec_buff(curr_rec_pos); + for ( ; copy < copy_end; copy++) + read_record_field(copy, blob_in_rec_buff); + + /* Build the key over the fields read into the record buffers */ + TABLE_REF *ref= &join_tab->ref; + cp_buffer_from_ref(join->thd, join_tab->table, ref); + *key= ref->key_buff; + len= ref->key_length; } - - /* - Read the other key arguments from the current record. The fields for - these arguments are always first in the sequence of the record's fields. - */ - CACHE_FIELD *copy= field_descr+flag_fields; - CACHE_FIELD *copy_end= copy+local_key_arg_fields; - bool blob_in_rec_buff= blob_data_is_in_rec_buff(curr_rec_pos); - for ( ; copy < copy_end; copy++) - read_record_field(copy, blob_in_rec_buff); - - /* Build the key over the fields read into the record buffers */ - TABLE_REF *ref= &join_tab->ref; - cp_buffer_from_ref(join->thd, join_tab->table, ref); - *key= ref->key_buff; - len= ref->key_length; + + pos= init_pos+rec_len; + + return len; } -pos= init_pos+rec_len; - -return len; -} - /* Check the index condition of the joined table for a record from the BKA cache @@ -4407,9 +4402,9 @@ RETURN VALUE bool JOIN_CACHE_BKA::skip_index_tuple(range_id_t range_info) { -DBUG_ENTER("JOIN_CACHE_BKA::skip_index_tuple"); -get_record_by_pos((uchar*)range_info); -DBUG_RETURN(!join_tab->cache_idx_cond->val_int()); + DBUG_ENTER("JOIN_CACHE_BKA::skip_index_tuple"); + get_record_by_pos((uchar*)range_info); + DBUG_RETURN(!join_tab->cache_idx_cond->val_int()); } @@ -4439,10 +4434,10 @@ RETURN VALUE static range_seq_t bkah_range_seq_init(void *init_param, uint n_ranges, uint flags) { -DBUG_ENTER("bkah_range_seq_init"); -JOIN_CACHE_BKAH *cache= (JOIN_CACHE_BKAH *) init_param; -cache->reset(0); -DBUG_RETURN((range_seq_t) init_param); + DBUG_ENTER("bkah_range_seq_init"); + JOIN_CACHE_BKAH *cache= (JOIN_CACHE_BKAH *) init_param; + cache->reset(0); + DBUG_RETURN((range_seq_t) init_param); } @@ -4467,24 +4462,24 @@ RETURN VALUE TRUE no more ranges */ -static +static bool bkah_range_seq_next(range_seq_t rseq, KEY_MULTI_RANGE *range) { -DBUG_ENTER("bkah_range_seq_next"); -JOIN_CACHE_BKAH *cache= (JOIN_CACHE_BKAH *) rseq; -TABLE_REF *ref= &cache->join_tab->ref; -key_range *start_key= &range->start_key; -if ((start_key->length= cache->get_next_key((uchar **) &start_key->key))) -{ - start_key->keypart_map= (1 << ref->key_parts) - 1; - start_key->flag= HA_READ_KEY_EXACT; - range->end_key= *start_key; - range->end_key.flag= HA_READ_AFTER_KEY; - range->ptr= (char *) cache->get_curr_key_chain(); - range->range_flag= EQ_RANGE; - DBUG_RETURN(0); -} -DBUG_RETURN(1); + DBUG_ENTER("bkah_range_seq_next"); + JOIN_CACHE_BKAH *cache= (JOIN_CACHE_BKAH *) rseq; + TABLE_REF *ref= &cache->join_tab->ref; + key_range *start_key= &range->start_key; + if ((start_key->length= cache->get_next_key((uchar **) &start_key->key))) + { + start_key->keypart_map= (1 << ref->key_parts) - 1; + start_key->flag= HA_READ_KEY_EXACT; + range->end_key= *start_key; + range->end_key.flag= HA_READ_AFTER_KEY; + range->ptr= (char *) cache->get_curr_key_chain(); + range->range_flag= EQ_RANGE; + DBUG_RETURN(0); + } + DBUG_RETURN(1); } @@ -4512,14 +4507,13 @@ RETURN VALUE 0 the record is to be left in the stream */ -static -bool bkah_range_seq_skip_record(range_seq_t rseq, range_id_t range_info, - uchar *rowid) +static +bool bkah_range_seq_skip_record(range_seq_t rseq, range_id_t range_info, uchar *rowid) { -DBUG_ENTER("bkah_range_seq_skip_record"); -JOIN_CACHE_BKAH *cache= (JOIN_CACHE_BKAH *) rseq; -bool res= cache->check_all_match_flags_for_key((uchar *) range_info); -DBUG_RETURN(res); + DBUG_ENTER("bkah_range_seq_skip_record"); + JOIN_CACHE_BKAH *cache= (JOIN_CACHE_BKAH *) rseq; + bool res= cache->check_all_match_flags_for_key((uchar *) range_info); + DBUG_RETURN(res); } @@ -4546,14 +4540,14 @@ RETURN VALUE static bool bkah_skip_index_tuple(range_seq_t rseq, range_id_t range_info) { -DBUG_ENTER("bka_unique_skip_index_tuple"); -JOIN_CACHE_BKAH *cache= (JOIN_CACHE_BKAH *) rseq; -THD *thd= cache->thd(); -bool res; -status_var_increment(thd->status_var.ha_icp_attempts); -if (!(res= cache->skip_index_tuple(range_info))) - status_var_increment(thd->status_var.ha_icp_match); -DBUG_RETURN(res); + DBUG_ENTER("bka_unique_skip_index_tuple"); + JOIN_CACHE_BKAH *cache= (JOIN_CACHE_BKAH *) rseq; + THD *thd= cache->thd(); + bool res; + status_var_increment(thd->status_var.ha_icp_attempts); + if (!(res= cache->skip_index_tuple(range_info))) + status_var_increment(thd->status_var.ha_icp_match); + DBUG_RETURN(res); } @@ -4581,8 +4575,8 @@ RETURN VALUE bool JOIN_CACHE_BKAH::prepare_look_for_matches(bool skip_last) { -last_matching_rec_ref_ptr= next_matching_rec_ref_ptr= 0; -if (no_association && + last_matching_rec_ref_ptr= next_matching_rec_ref_ptr= 0; + if (no_association && !(curr_matching_chain= get_matching_chain_by_join_key())) //psergey: added '!' return 1; last_matching_rec_ref_ptr= get_next_rec_ref(curr_matching_chain); diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index b2dd04d8fd5..c59edfd8751 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -466,7 +466,7 @@ int my_wc_mb_utf8_with_escape(CHARSET_INFO *cs, my_wc_t escape, my_wc_t wc, DBUG_ASSERT(escape > 0); if (str + 1 >= end) return MY_CS_TOOSMALL2; // Not enough space, need at least two bytes. - *str= escape; + *str= (uchar)escape; int cnvres= my_charset_utf8_handler.wc_mb(cs, wc, str + 1, end); if (cnvres > 0) return cnvres + 1; // The character was normally put @@ -2375,9 +2375,12 @@ void st_select_lex_unit::exclude_level() if (next) next->prev= prev; } + // Mark it excluded + prev= NULL; } +#if 0 /* Exclude subtree of current unit from tree of SELECTs @@ -2403,6 +2406,7 @@ void st_select_lex_unit::exclude_tree() if (next) next->prev= prev; } +#endif /* @@ -3415,6 +3419,9 @@ void LEX::first_lists_tables_same() if (query_tables_last == &first_table->next_global) query_tables_last= first_table->prev_global; + if (query_tables_own_last == &first_table->next_global) + query_tables_own_last= first_table->prev_global; + if ((next= *first_table->prev_global= first_table->next_global)) next->prev_global= first_table->prev_global; /* include in new place */ @@ -4587,6 +4594,12 @@ bool st_select_lex::is_merged_child_of(st_select_lex *ancestor) { continue; } + + if (sl->master_unit()->derived && + sl->master_unit()->derived->is_merged_derived()) + { + continue; + } all_merged= FALSE; break; } diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 8f5deb8e7bd..3b45b1ad40c 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2010, 2016, MariaDB + Copyright (c) 2010, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -697,7 +697,8 @@ public: } st_select_lex* return_after_parsing() { return return_to; } void exclude_level(); - void exclude_tree(); + // void exclude_tree(); // it is not used for long time + bool is_excluded() { return prev == NULL; } /* UNION methods */ bool prepare(THD *thd, select_result *result, ulong additional_options); @@ -1128,7 +1129,7 @@ public: return master_unit()->with_element; } With_element *find_table_def_in_with_clauses(TABLE_LIST *table); - bool check_unrestricted_recursive(bool only_standards_compliant); + bool check_unrestricted_recursive(bool only_standard_compliant); bool check_subqueries_with_recursive_references(); void collect_grouping_fields(THD *thd); void check_cond_extraction_for_grouping_fields(Item *cond, @@ -1496,8 +1497,8 @@ public: This has all flags from 0 (inclusive) to BINLOG_STMT_FLAG_COUNT (exclusive) set. */ - static const int BINLOG_STMT_UNSAFE_ALL_FLAGS= - ((1 << BINLOG_STMT_UNSAFE_COUNT) - 1); + static const uint32 BINLOG_STMT_UNSAFE_ALL_FLAGS= + ((1U << BINLOG_STMT_UNSAFE_COUNT) - 1); /** Maps elements of enum_binlog_stmt_unsafe to error codes. diff --git a/sql/sql_load.cc b/sql/sql_load.cc index c25e73e7346..6f0e97a61c9 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -537,12 +537,6 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, !(thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES))) ? (*escaped)[0] : INT_MAX; - if (handle_duplicates != DUP_ERROR) - { - info.vblobs0.init(table); - info.vblobs1.init(table); - } - READ_INFO read_info(thd, file, tot_length, ex->cs ? ex->cs : thd->variables.collation_database, *field_term,*ex->line_start, *ex->line_term, *enclosed, diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 6ddb5bc7995..b616f8db7e0 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -171,8 +171,8 @@ const LEX_STRING command_name[257]={ { C_STRING_WITH_LEN("Set option") }, //27 { C_STRING_WITH_LEN("Fetch") }, //28 { C_STRING_WITH_LEN("Daemon") }, //29 - { 0, 0 }, //30 - { 0, 0 }, //31 + { C_STRING_WITH_LEN("Unimpl get tid") }, //30 + { C_STRING_WITH_LEN("Reset connection") },//31 { 0, 0 }, //32 { 0, 0 }, //33 { 0, 0 }, //34 @@ -523,7 +523,9 @@ void init_update_queries(void) server_command_flags[COM_STMT_RESET]= CF_SKIP_QUESTIONS | CF_SKIP_WSREP_CHECK; server_command_flags[COM_STMT_EXECUTE]= CF_SKIP_WSREP_CHECK; server_command_flags[COM_STMT_SEND_LONG_DATA]= CF_SKIP_WSREP_CHECK; + server_command_flags[COM_REGISTER_SLAVE]= CF_SKIP_WSREP_CHECK; server_command_flags[COM_MULTI]= CF_SKIP_WSREP_CHECK | CF_NO_COM_MULTI; + server_command_flags[CF_NO_COM_MULTI]= CF_NO_COM_MULTI; /* Initialize the sql command flags array. */ memset(sql_command_flags, 0, sizeof(sql_command_flags)); @@ -1083,9 +1085,10 @@ void do_handle_bootstrap(THD *thd) handle_bootstrap_impl(thd); end: - in_bootstrap= FALSE; delete thd; + mysql_mutex_lock(&LOCK_thread_count); + in_bootstrap = FALSE; mysql_cond_broadcast(&COND_thread_count); mysql_mutex_unlock(&LOCK_thread_count); @@ -1567,7 +1570,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd, { wsrep_client_rollback(thd); } - if (thd->wsrep_conflict_state== ABORTED) + /* We let COM_QUIT and COM_STMT_CLOSE to execute even if wsrep aborted. */ + if (thd->wsrep_conflict_state == ABORTED && + command != COM_STMT_CLOSE && command != COM_QUIT) { my_error(ER_LOCK_DEADLOCK, MYF(0), "wsrep aborted transaction"); WSREP_DEBUG("Deadlock error for: %s", thd->query()); @@ -1670,6 +1675,14 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; } #endif + case COM_RESET_CONNECTION: + { + thd->status_var.com_other++; + thd->change_user(); + thd->clear_error(); // if errors from rollback + my_ok(thd, 0, 0, 0); + break; + } case COM_CHANGE_USER: { int auth_rc; @@ -2306,6 +2319,7 @@ com_multi_end: case COM_TIME: // Impossible from client case COM_DELAYED_INSERT: case COM_END: + case COM_UNIMPLEMENTED: default: my_message(ER_UNKNOWN_COM_ERROR, ER_THD(thd, ER_UNKNOWN_COM_ERROR), MYF(0)); @@ -2317,6 +2331,12 @@ com_multi_end: if (WSREP(thd)) { + /* + MDEV-10812 + In the case of COM_QUIT/COM_STMT_CLOSE thread status should be disabled. + */ + DBUG_ASSERT((command != COM_QUIT && command != COM_STMT_CLOSE) + || thd->get_stmt_da()->is_disabled()); /* wsrep BF abort in query exec phase */ mysql_mutex_lock(&thd->LOCK_wsrep_thd); do_end_of_statement= thd->wsrep_conflict_state != REPLAYING && @@ -3080,7 +3100,7 @@ mysql_execute_command(THD *thd) } /* endif unlikely slave */ #endif #ifdef WITH_WSREP - if (WSREP(thd)) + if (wsrep && WSREP(thd)) { /* change LOCK TABLE WRITE to transaction @@ -3108,7 +3128,7 @@ mysql_execute_command(THD *thd) /* Bail out if DB snapshot has not been installed. SET and SHOW commands, however, are always allowed. - + Select query is also allowed if it does not access any table. We additionally allow all other commands that do not change data in case wsrep_dirty_reads is enabled. */ @@ -3116,6 +3136,8 @@ mysql_execute_command(THD *thd) !wsrep_is_show_query(lex->sql_command) && !(thd->variables.wsrep_dirty_reads && !is_update_query(lex->sql_command)) && + !(lex->sql_command == SQLCOM_SELECT && + !all_tables) && !wsrep_node_is_ready(thd)) goto error; } @@ -5963,11 +5985,8 @@ end_with_restore_list: } case SQLCOM_SHOW_CREATE_TRIGGER: { - if (lex->spname->m_name.length > NAME_LEN) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str); + if (check_ident_length(&lex->spname->m_name)) goto error; - } #ifdef WITH_WSREP if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; @@ -9667,6 +9686,18 @@ bool check_string_char_length(LEX_STRING *str, uint err_msg, return TRUE; } + +bool check_ident_length(LEX_STRING *ident) +{ + if (check_string_char_length(ident, 0, NAME_CHAR_LEN, system_charset_info, 1)) + { + my_error(ER_TOO_LONG_IDENT, MYF(0), ident->str); + return 1; + } + return 0; +} + + C_MODE_START /* diff --git a/sql/sql_parse.h b/sql/sql_parse.h index ad29bb2cdd3..d669f36acef 100644 --- a/sql/sql_parse.h +++ b/sql/sql_parse.h @@ -77,6 +77,7 @@ bool check_string_byte_length(LEX_STRING *str, uint err_msg, bool check_string_char_length(LEX_STRING *str, uint err_msg, uint max_char_length, CHARSET_INFO *cs, bool no_error); +bool check_ident_length(LEX_STRING *ident); CHARSET_INFO* merge_charset_and_collation(CHARSET_INFO *cs, CHARSET_INFO *cl); CHARSET_INFO *find_bin_collation(CHARSET_INFO *cs); bool check_host_name(LEX_STRING *str); diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 972ab3aa1f1..4e71e792a08 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -7703,6 +7703,9 @@ int get_part_iter_for_interval_cols_via_map(partition_info *part_info, } else if (part_info->part_type == LIST_PARTITION) { + if (part_info->has_default_partititon() && + part_info->num_parts == 1) + DBUG_RETURN(-1); //only DEFAULT partition get_col_endpoint= get_partition_id_cols_list_for_endpoint; part_iter->get_next= get_next_partition_id_list; part_iter->part_info= part_info; diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h index 9a0acea1d18..7b89246a9f9 100644 --- a/sql/sql_plugin.h +++ b/sql/sql_plugin.h @@ -1,5 +1,5 @@ /* Copyright (c) 2005, 2012, Oracle and/or its affiliates. - Copyright (c) 2009, 2012, Monty Program Ab + Copyright (c) 2009, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -53,9 +53,9 @@ extern ulong dlopen_count; /* the following flags are valid for plugin_init() */ -#define PLUGIN_INIT_SKIP_DYNAMIC_LOADING 1 -#define PLUGIN_INIT_SKIP_PLUGIN_TABLE 2 -#define PLUGIN_INIT_SKIP_INITIALIZATION 4 +#define PLUGIN_INIT_SKIP_DYNAMIC_LOADING 1U +#define PLUGIN_INIT_SKIP_PLUGIN_TABLE 2U +#define PLUGIN_INIT_SKIP_INITIALIZATION 4U #define INITIAL_LEX_PLUGIN_LIST_SIZE 16 @@ -71,12 +71,12 @@ typedef struct st_mysql_show_var SHOW_VAR; It's a bitmap, because it makes it easier to test "whether the state is one of those..." */ -#define PLUGIN_IS_FREED 1 -#define PLUGIN_IS_DELETED 2 -#define PLUGIN_IS_UNINITIALIZED 4 -#define PLUGIN_IS_READY 8 -#define PLUGIN_IS_DYING 16 -#define PLUGIN_IS_DISABLED 32 +#define PLUGIN_IS_FREED 1U +#define PLUGIN_IS_DELETED 2U +#define PLUGIN_IS_UNINITIALIZED 4U +#define PLUGIN_IS_READY 8U +#define PLUGIN_IS_DYING 16U +#define PLUGIN_IS_DISABLED 32U struct st_ptr_backup { void **ptr; diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index d7a23a41002..c8765f45273 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -227,6 +227,7 @@ private: SELECT_LEX and other classes). */ MEM_ROOT main_mem_root; + sql_mode_t m_sql_mode; private: bool set_db(const char *db, uint db_length); bool set_parameters(String *expanded_query, @@ -742,45 +743,35 @@ static void setup_one_conversion_function(THD *thd, Item_param *param, switch (param_type) { case MYSQL_TYPE_TINY: param->set_param_func= set_param_tiny; - param->item_type= Item::INT_ITEM; break; case MYSQL_TYPE_SHORT: param->set_param_func= set_param_short; - param->item_type= Item::INT_ITEM; break; case MYSQL_TYPE_LONG: param->set_param_func= set_param_int32; - param->item_type= Item::INT_ITEM; break; case MYSQL_TYPE_LONGLONG: param->set_param_func= set_param_int64; - param->item_type= Item::INT_ITEM; break; case MYSQL_TYPE_FLOAT: param->set_param_func= set_param_float; - param->item_type= Item::REAL_ITEM; break; case MYSQL_TYPE_DOUBLE: param->set_param_func= set_param_double; - param->item_type= Item::REAL_ITEM; break; case MYSQL_TYPE_DECIMAL: case MYSQL_TYPE_NEWDECIMAL: param->set_param_func= set_param_decimal; - param->item_type= Item::DECIMAL_ITEM; break; case MYSQL_TYPE_TIME: param->set_param_func= set_param_time; - param->item_type= Item::STRING_ITEM; break; case MYSQL_TYPE_DATE: param->set_param_func= set_param_date; - param->item_type= Item::STRING_ITEM; break; case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_TIMESTAMP: param->set_param_func= set_param_datetime; - param->item_type= Item::STRING_ITEM; break; case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_MEDIUM_BLOB: @@ -792,7 +783,6 @@ static void setup_one_conversion_function(THD *thd, Item_param *param, thd->variables.character_set_client; DBUG_ASSERT(thd->variables.character_set_client); param->value.cs_info.final_character_set_of_str_value= &my_charset_bin; - param->item_type= Item::STRING_ITEM; break; default: /* @@ -821,7 +811,6 @@ static void setup_one_conversion_function(THD *thd, Item_param *param, Exact value of max_length is not known unless data is converted to charset of connection, so we have to set it later. */ - param->item_type= Item::STRING_ITEM; } } param->set_handler_by_field_type((enum enum_field_types) param_type); @@ -892,7 +881,7 @@ static bool insert_params_with_log(Prepared_statement *stmt, uchar *null_array, for (Item_param **it= begin; it < end; ++it) { Item_param *param= *it; - if (param->state != Item_param::LONG_DATA_VALUE) + if (!param->has_long_data_value()) { if (is_param_null(null_array, (uint) (it - begin))) param->set_null(); @@ -901,13 +890,12 @@ static bool insert_params_with_log(Prepared_statement *stmt, uchar *null_array, if (read_pos >= data_end) DBUG_RETURN(1); param->set_param_func(param, &read_pos, (uint) (data_end - read_pos)); - if (param->state == Item_param::NO_VALUE) + if (param->has_no_value()) DBUG_RETURN(1); - if (param->limit_clause_param && param->state != Item_param::INT_VALUE) + if (param->limit_clause_param && !param->has_int_value()) { param->set_int(param->val_int(), MY_INT64_NUM_DECIMAL_DIGITS); - param->item_type= Item::INT_ITEM; if (!param->unsigned_flag && param->value.integer < 0) DBUG_RETURN(1); } @@ -947,7 +935,7 @@ static bool insert_params(Prepared_statement *stmt, uchar *null_array, for (Item_param **it= begin; it < end; ++it) { Item_param *param= *it; - if (param->state != Item_param::LONG_DATA_VALUE) + if (!param->has_long_data_value()) { if (is_param_null(null_array, (uint) (it - begin))) param->set_null(); @@ -956,7 +944,7 @@ static bool insert_params(Prepared_statement *stmt, uchar *null_array, if (read_pos >= data_end) DBUG_RETURN(1); param->set_param_func(param, &read_pos, (uint) (data_end - read_pos)); - if (param->state == Item_param::NO_VALUE) + if (param->has_no_value()) DBUG_RETURN(1); } } @@ -989,7 +977,7 @@ static bool insert_bulk_params(Prepared_statement *stmt, Item_param *param= *it; if (reset) param->reset(); - if (param->state != Item_param::LONG_DATA_VALUE) + if (!param->has_long_data_value()) { if (param->indicators) param->indicator= (enum_indicator_type) *((*read_pos)++); @@ -1003,7 +991,7 @@ static bool insert_bulk_params(Prepared_statement *stmt, if ((*read_pos) >= data_end) DBUG_RETURN(1); param->set_param_func(param, read_pos, (uint) (data_end - (*read_pos))); - if (param->state == Item_param::NO_VALUE) + if (param->has_no_value()) DBUG_RETURN(1); break; case STMT_INDICATOR_NULL: @@ -1093,7 +1081,7 @@ static bool emb_insert_params(Prepared_statement *stmt, String *expanded_query) { Item_param *param= *it; setup_one_conversion_function(thd, param, client_param->buffer_type); - if (param->state != Item_param::LONG_DATA_VALUE) + if (!param->has_long_data_value()) { if (*client_param->is_null) param->set_null(); @@ -1105,7 +1093,7 @@ static bool emb_insert_params(Prepared_statement *stmt, String *expanded_query) client_param->length ? *client_param->length : client_param->buffer_length); - if (param->state == Item_param::NO_VALUE) + if (param->has_no_value()) DBUG_RETURN(1); } } @@ -1129,7 +1117,7 @@ static bool emb_insert_params_with_log(Prepared_statement *stmt, String *query) { Item_param *param= *it; setup_one_conversion_function(thd, param, client_param->buffer_type); - if (param->state != Item_param::LONG_DATA_VALUE) + if (!param->has_long_data_value()) { if (*client_param->is_null) param->set_null(); @@ -1141,7 +1129,7 @@ static bool emb_insert_params_with_log(Prepared_statement *stmt, String *query) client_param->length ? *client_param->length : client_param->buffer_length); - if (param->state == Item_param::NO_VALUE) + if (param->has_no_value()) DBUG_RETURN(1); } } @@ -1358,7 +1346,7 @@ static bool mysql_test_insert(Prepared_statement *stmt, if (mysql_prepare_insert(thd, table_list, table_list->table, fields, values, update_fields, update_values, - duplic, &unused_conds, FALSE, FALSE, FALSE)) + duplic, &unused_conds, FALSE)) goto error; value_count= values->elements; @@ -1603,7 +1591,7 @@ static int mysql_test_select(Prepared_statement *stmt, */ if (unit->prepare(thd, 0, 0)) goto error; - if (!lex->describe && !stmt->is_sql_prepare()) + if (!lex->describe && !thd->lex->analyze_stmt && !stmt->is_sql_prepare()) { /* Make copy of item list, as change_columns may change it */ List fields(lex->select_lex.item_list); @@ -3616,7 +3604,8 @@ Prepared_statement::Prepared_statement(THD *thd_arg) param_count(0), last_errno(0), flags((uint) IS_IN_USE), - start_param(0) + start_param(0), + m_sql_mode(thd->variables.sql_mode) { init_sql_alloc(&main_mem_root, thd_arg->variables.query_alloc_block_size, thd_arg->variables.query_prealloc_size, MYF(MY_THREAD_SPECIFIC)); @@ -3790,6 +3779,7 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len) Statement stmt_backup; Query_arena *old_stmt_arena; DBUG_ENTER("Prepared_statement::prepare"); + DBUG_ASSERT(m_sql_mode == thd->variables.sql_mode); /* If this is an SQLCOM_PREPARE, we also increase Com_prepare_sql. However, it seems handy if com_stmt_prepare is increased always, @@ -4378,6 +4368,7 @@ Prepared_statement::reprepare() bool error; Prepared_statement copy(thd); + copy.m_sql_mode= m_sql_mode; copy.set_sql_prepare(); /* To suppress sending metadata to the client. */ @@ -4387,9 +4378,12 @@ Prepared_statement::reprepare() &cur_db_changed)) return TRUE; + sql_mode_t save_sql_mode= thd->variables.sql_mode; + thd->variables.sql_mode= m_sql_mode; error= ((name.str && copy.set_name(&name)) || copy.prepare(query(), query_length()) || validate_metadata(©)); + thd->variables.sql_mode= save_sql_mode; if (cur_db_changed) mysql_change_db(thd, &saved_cur_db_name, TRUE); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 331a4942bda..07aaf99a0c3 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -788,10 +788,15 @@ JOIN::prepare(TABLE_LIST *tables_init, if (mixed_implicit_grouping && tbl->table) tbl->table->maybe_null= 1; } + + uint real_og_num= og_num; + if (skip_order_by && + select_lex != select_lex->master_unit()->global_parameters()) + real_og_num+= select_lex->order_list.elements; if (setup_wild(thd, tables_list, fields_list, &all_fields, wild_num)) DBUG_RETURN(-1); - if (select_lex->setup_ref_array(thd, og_num)) + if (select_lex->setup_ref_array(thd, real_og_num)) DBUG_RETURN(-1); ref_ptrs= ref_ptr_array_slice(0); @@ -815,9 +820,12 @@ JOIN::prepare(TABLE_LIST *tables_init, if (skip_order_by && select_lex != select_lex->master_unit()->global_parameters()) { + nesting_map save_allow_sum_func= thd->lex->allow_sum_func; + thd->lex->allow_sum_func|= (nesting_map)1 << select_lex->nest_level; if (setup_order(thd, ref_ptrs, tables_list, fields_list, all_fields, select_lex->order_list.first)) DBUG_RETURN(-1); + thd->lex->allow_sum_func= save_allow_sum_func; select_lex->order_list.empty(); } @@ -858,7 +866,7 @@ JOIN::prepare(TABLE_LIST *tables_init, With_element *with_elem= select_lex->get_with_element(); if (with_elem && select_lex->check_unrestricted_recursive( - thd->variables.only_standards_compliant_cte)) + thd->variables.only_standard_compliant_cte)) DBUG_RETURN(-1); select_lex->check_subqueries_with_recursive_references(); @@ -1106,6 +1114,34 @@ int JOIN::optimize() } +int JOIN::init_join_caches() +{ + JOIN_TAB *tab; + + for (tab= first_linear_tab(this, WITH_BUSH_ROOTS, WITHOUT_CONST_TABLES); + tab; + tab= next_linear_tab(this, tab, WITH_BUSH_ROOTS)) + { + TABLE *table= tab->table; + if (table->file->keyread_enabled()) + { + if (!(table->file->index_flags(table->file->keyread, 0, 1) & HA_CLUSTERED_INDEX)) + table->mark_columns_used_by_index(table->file->keyread, table->read_set); + } + else if ((tab->read_first_record == join_read_first || + tab->read_first_record == join_read_last) && + !tab->filesort && table->covering_keys.is_set(tab->index) && + !table->no_keyread) + { + table->prepare_for_keyread(tab->index, table->read_set); + } + if (tab->cache && tab->cache->init(select_options & SELECT_DESCRIBE)) + revise_cache_usage(tab); + } + return 0; +} + + /** global select optimisation. @@ -1439,8 +1475,6 @@ JOIN::optimize_inner() { DBUG_PRINT("info",("No tables")); error= 0; - if (make_aggr_tables_info()) - DBUG_RETURN(1); goto setup_subq_exit; } error= -1; // Error is sent to client @@ -1724,7 +1758,8 @@ JOIN::optimize_inner() to ORDER BY . There are three exceptions: - if skip_sort_order is set (see above), then we can simply skip GROUP BY; - - if we are in a subquery, we don't have to maintain order + - if we are in a subquery, we don't have to maintain order unless there + is a limit clause in the subquery. - we can only rewrite ORDER BY if the ORDER BY fields are 'compatible' with the GROUP BY ones, i.e. either one is a prefix of another. We only check if the ORDER BY is a prefix of GROUP BY. In this case @@ -1736,7 +1771,7 @@ JOIN::optimize_inner() if (!order || test_if_subpart(group_list, order)) { if (skip_sort_order || - select_lex->master_unit()->item) // This is a subquery + (select_lex->master_unit()->item && select_limit == HA_POS_ERROR)) // This is a subquery order= NULL; else order= group_list; @@ -2118,6 +2153,9 @@ JOIN::optimize_inner() if (make_aggr_tables_info()) DBUG_RETURN(1); + if (init_join_caches()) + DBUG_RETURN(1); + error= 0; if (select_options & SELECT_DESCRIBE) @@ -2128,7 +2166,17 @@ JOIN::optimize_inner() setup_subq_exit: /* Choose an execution strategy for this JOIN. */ if (!tables_list || !table_count) + { choose_tableless_subquery_plan(); + if (select_lex->have_window_funcs()) + { + if (!(join_tab= (JOIN_TAB*) thd->alloc(sizeof(JOIN_TAB)))) + DBUG_RETURN(1); + need_tmp= 1; + } + if (make_aggr_tables_info()) + DBUG_RETURN(1); + } /* Even with zero matching rows, subqueries in the HAVING clause may need to be evaluated if there are aggregate functions in the query. @@ -2177,13 +2225,19 @@ bool JOIN::make_aggr_tables_info() const bool has_group_by= this->group; sort_and_group_aggr_tab= NULL; + + if (group_optimized_away) + implicit_grouping= true; + + bool implicit_grouping_with_window_funcs= implicit_grouping && + select_lex->have_window_funcs(); /* Setup last table to provide fields and all_fields lists to the next node in the plan. */ - if (join_tab) + if (join_tab && top_join_tab_count) { join_tab[top_join_tab_count - 1].fields= &fields_list; join_tab[top_join_tab_count - 1].all_fields= &all_fields; @@ -2307,7 +2361,8 @@ bool JOIN::make_aggr_tables_info() single table queries, thus it is sufficient to test only the first join_tab element of the plan for its access method. */ - if (join_tab && join_tab->is_using_loose_index_scan()) + if (join_tab && top_join_tab_count && + join_tab->is_using_loose_index_scan()) tmp_table_param.precomputed_group_by= !join_tab->is_using_agg_loose_index_scan(); @@ -2338,9 +2393,11 @@ bool JOIN::make_aggr_tables_info() distinct= select_distinct && !group_list && !select_lex->have_window_funcs(); keep_row_order= false; + bool save_sum_fields= (group_list && simple_group) || + implicit_grouping_with_window_funcs; if (create_postjoin_aggr_table(curr_tab, - &all_fields, tmp_group, - group_list && simple_group, + &all_fields, tmp_group, + save_sum_fields, distinct, keep_row_order)) DBUG_RETURN(true); exec_tmp_table= curr_tab->table; @@ -2357,13 +2414,18 @@ bool JOIN::make_aggr_tables_info() If having is not handled here, it will be checked before the row is sent to the client. + + In the case of window functions however, we *must* make sure to not + store any rows which don't match HAVING within the temp table, + as rows will end up being used during their computation. */ if (having && - (sort_and_group || (exec_tmp_table->distinct && !group_list))) + (sort_and_group || (exec_tmp_table->distinct && !group_list) || + select_lex->have_window_funcs())) { - // Attach HAVING to tmp table's condition + /* Attach HAVING to tmp table's condition */ curr_tab->having= having; - having= NULL; // Already done + having= NULL; /* Already done */ } /* Change sum_fields reference to calculated fields in tmp_table */ @@ -2515,7 +2577,7 @@ bool JOIN::make_aggr_tables_info() tmp_table_param.copy_field= tmp_table_param.copy_field_end=0; first_record= sort_and_group=0; - if (!group_optimized_away) + if (!group_optimized_away || implicit_grouping_with_window_funcs) { group= false; } @@ -2540,7 +2602,9 @@ bool JOIN::make_aggr_tables_info() count_field_types(select_lex, &tmp_table_param, *curr_all_fields, false); } - if (group || implicit_grouping || tmp_table_param.sum_func_count) + if (group || + (implicit_grouping && !implicit_grouping_with_window_funcs) || + tmp_table_param.sum_func_count) { if (make_group_fields(this, this)) DBUG_RETURN(true); @@ -2763,8 +2827,9 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List *table_fields, tmp_table_param.using_outer_summary_function= tab->tmp_table_param->using_outer_summary_function; tab->join= this; - DBUG_ASSERT(tab > tab->join->join_tab); - (tab - 1)->next_select= sub_select_postjoin_aggr; + DBUG_ASSERT(tab > join_tab || select_lex->have_window_funcs()); + if (tab > join_tab) + (tab - 1)->next_select= sub_select_postjoin_aggr; tab->aggr= new (thd->mem_root) AGGR_OP(tab); if (!tab->aggr) goto err; @@ -2772,13 +2837,15 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List *table_fields, table->reginfo.join_tab= tab; /* if group or order on first table, sort first */ - if (group_list && simple_group) + if ((group_list && simple_group) || + (implicit_grouping && select_lex->have_window_funcs())) { DBUG_PRINT("info",("Sorting for group")); THD_STAGE_INFO(thd, stage_sorting_for_group); if (ordered_index_usage != ordered_index_group_by && (join_tab + const_tables)->type != JT_CONST && // Don't sort 1 row + !implicit_grouping && add_sorting_to_table(join_tab + const_tables, group_list)) goto err; @@ -3317,13 +3384,21 @@ void JOIN::exec_inner() if (zero_result_cause) { - (void) return_zero_rows(this, result, select_lex->leaf_tables, - *columns_list, - send_row_on_empty_set(), - select_options, - zero_result_cause, - having ? having : tmp_having, all_fields); - DBUG_VOID_RETURN; + if (select_lex->have_window_funcs()) + { + const_tables= table_count; + first_select= sub_select_postjoin_aggr; + } + else + { + (void) return_zero_rows(this, result, select_lex->leaf_tables, + *columns_list, + send_row_on_empty_set(), + select_options, + zero_result_cause, + having ? having : tmp_having, all_fields); + DBUG_VOID_RETURN; + } } /* @@ -3415,7 +3490,6 @@ JOIN::destroy() if (join_tab) { - DBUG_ASSERT(table_count+aggr_tables > 0); for (JOIN_TAB *tab= first_linear_tab(this, WITH_BUSH_ROOTS, WITH_CONST_TABLES); tab; tab= next_linear_tab(this, tab, WITH_BUSH_ROOTS)) @@ -10376,11 +10450,10 @@ void set_join_cache_denial(JOIN_TAB *join_tab) if (join_tab->cache->prev_cache) join_tab->cache->prev_cache->next_cache= 0; /* - No need to do the same for next_cache since cache denial is done - backwards starting from the latest cache in the linked list (see - revise_cache_usage()). + Same for the next_cache */ - DBUG_ASSERT(!join_tab->cache->next_cache); + if (join_tab->cache->next_cache) + join_tab->cache->next_cache->prev_cache= 0; join_tab->cache->free(); join_tab->cache= 0; @@ -10720,6 +10793,7 @@ uint check_join_cache_usage(JOIN_TAB *tab, uint bufsz= 4096; JOIN_CACHE *prev_cache=0; JOIN *join= tab->join; + MEM_ROOT *root= join->thd->mem_root; uint cache_level= tab->used_join_cache_level; bool force_unlinked_cache= !(join->allowed_join_cache_types & JOIN_CACHE_INCREMENTAL_BIT); @@ -10839,8 +10913,7 @@ uint check_join_cache_usage(JOIN_TAB *tab, case JT_ALL: if (cache_level == 1) prev_cache= 0; - if ((tab->cache= new JOIN_CACHE_BNL(join, tab, prev_cache)) && - !tab->cache->init(options & SELECT_DESCRIBE)) + if ((tab->cache= new (root) JOIN_CACHE_BNL(join, tab, prev_cache))) { tab->icp_other_tables_ok= FALSE; return (2 - MY_TEST(!prev_cache)); @@ -10874,8 +10947,7 @@ uint check_join_cache_usage(JOIN_TAB *tab, goto no_join_cache; if (cache_level == 3) prev_cache= 0; - if ((tab->cache= new JOIN_CACHE_BNLH(join, tab, prev_cache)) && - !tab->cache->init(options & SELECT_DESCRIBE)) + if ((tab->cache= new (root) JOIN_CACHE_BNLH(join, tab, prev_cache))) { tab->icp_other_tables_ok= FALSE; return (4 - MY_TEST(!prev_cache)); @@ -10895,8 +10967,7 @@ uint check_join_cache_usage(JOIN_TAB *tab, { if (cache_level == 5) prev_cache= 0; - if ((tab->cache= new JOIN_CACHE_BKA(join, tab, flags, prev_cache)) && - !tab->cache->init(options & SELECT_DESCRIBE)) + if ((tab->cache= new (root) JOIN_CACHE_BKA(join, tab, flags, prev_cache))) return (6 - MY_TEST(!prev_cache)); goto no_join_cache; } @@ -10904,10 +10975,9 @@ uint check_join_cache_usage(JOIN_TAB *tab, { if (cache_level == 7) prev_cache= 0; - if ((tab->cache= new JOIN_CACHE_BKAH(join, tab, flags, prev_cache)) && - !tab->cache->init(options & SELECT_DESCRIBE)) + if ((tab->cache= new (root) JOIN_CACHE_BKAH(join, tab, flags, prev_cache))) { - tab->idx_cond_fact_out= FALSE; + tab->idx_cond_fact_out= FALSE; return (8 - MY_TEST(!prev_cache)); } goto no_join_cache; @@ -11224,20 +11294,18 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after) case JT_SYSTEM: // Only happens with left join case JT_CONST: // Only happens with left join /* Only happens with outer joins */ - tab->read_first_record= tab->type == JT_SYSTEM ? - join_read_system :join_read_const; - if (table->covering_keys.is_set(tab->ref.key) && - !table->no_keyread) - table->set_keyread(true); + tab->read_first_record= tab->type == JT_SYSTEM ? join_read_system + : join_read_const; + if (table->covering_keys.is_set(tab->ref.key) && !table->no_keyread) + table->file->ha_start_keyread(tab->ref.key); else if ((!jcl || jcl > 4) && !tab->ref.is_access_triggered()) push_index_cond(tab, tab->ref.key); break; case JT_EQ_REF: tab->read_record.unlock_row= join_read_key_unlock_row; /* fall through */ - if (table->covering_keys.is_set(tab->ref.key) && - !table->no_keyread) - table->set_keyread(true); + if (table->covering_keys.is_set(tab->ref.key) && !table->no_keyread) + table->file->ha_start_keyread(tab->ref.key); else if ((!jcl || jcl > 4) && !tab->ref.is_access_triggered()) push_index_cond(tab, tab->ref.key); break; @@ -11250,9 +11318,8 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after) } delete tab->quick; tab->quick=0; - if (table->covering_keys.is_set(tab->ref.key) && - !table->no_keyread) - table->set_keyread(true); + if (table->covering_keys.is_set(tab->ref.key) && !table->no_keyread) + table->file->ha_start_keyread(tab->ref.key); else if ((!jcl || jcl > 4) && !tab->ref.is_access_triggered()) push_index_cond(tab, tab->ref.key); break; @@ -11315,7 +11382,7 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after) if (tab->select && tab->select->quick && tab->select->quick->index != MAX_KEY && //not index_merge table->covering_keys.is_set(tab->select->quick->index)) - table->set_keyread(true); + table->file->ha_start_keyread(tab->select->quick->index); else if (!table->covering_keys.is_clear_all() && !(tab->select && tab->select->quick)) { // Only read index tree @@ -11344,7 +11411,8 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after) } } if (tab->select && tab->select->quick && - tab->select->quick->index != MAX_KEY && ! tab->table->key_read) + tab->select->quick->index != MAX_KEY && + !tab->table->file->keyread_enabled()) push_index_cond(tab, tab->select->quick->index); } break; @@ -11497,12 +11565,12 @@ void JOIN_TAB::cleanup() if (table && (table->s->tmp_table != INTERNAL_TMP_TABLE || table->is_created())) { - table->set_keyread(FALSE); + table->file->ha_end_keyread(); table->file->ha_index_or_rnd_end(); } if (table) { - table->set_keyread(false); + table->file->ha_end_keyread(); table->file->ha_index_or_rnd_end(); preread_init_done= FALSE; if (table->pos_in_table_list && @@ -13010,9 +13078,12 @@ COND *Item_cond_and::build_equal_items(THD *thd, COND_EQUAL cond_equal; cond_equal.upper_levels= inherited; + if (check_stack_overrun(thd, STACK_MIN_SIZE, NULL)) + return this; // Fatal error flag is set! + List eq_list; List *cond_args= argument_list(); - + List_iterator li(*cond_args); Item *item; @@ -13022,7 +13093,7 @@ COND *Item_cond_and::build_equal_items(THD *thd, that are subject to substitution by multiple equality items and removing each such predicate from the conjunction after having found/created a multiple equality whose inference the predicate is. - */ + */ while ((item= li++)) { /* @@ -16116,6 +16187,9 @@ setup_tmp_table_column_bitmaps(TABLE *table, uchar *bitmaps, uint field_count) bitmaps+= bitmap_size; my_bitmap_init(&table->cond_set, (my_bitmap_map*) bitmaps, field_count, FALSE); + bitmaps+= bitmap_size; + my_bitmap_init(&table->has_value_set, + (my_bitmap_map*) bitmaps, field_count, FALSE); /* write_set and all_set are copies of read_set */ table->def_write_set= table->def_read_set; table->s->all_set= table->def_read_set; @@ -16291,7 +16365,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List &fields, &tmpname, (uint) strlen(path)+1, &group_buff, (group && ! using_unique_constraint ? param->group_length : 0), - &bitmaps, bitmap_buffer_size(field_count)*5, + &bitmaps, bitmap_buffer_size(field_count)*6, NullS)) { if (temp_pool_slot != MY_BIT_NONE) @@ -17021,7 +17095,7 @@ bool Virtual_tmp_table::init(uint field_count) &s, sizeof(*s), &field, (field_count + 1) * sizeof(Field*), &blob_field, (field_count + 1) * sizeof(uint), - &bitmaps, bitmap_buffer_size(field_count) * 5, + &bitmaps, bitmap_buffer_size(field_count) * 6, NullS)) return true; bzero(s, sizeof(*s)); @@ -17826,7 +17900,7 @@ do_select(JOIN *join, Procedure *procedure) } join->procedure= procedure; - join->send_records=0; + join->duplicate_rows= join->send_records=0; if (join->only_const_tables() && !join->need_tmp) { Next_select_func end_select= setup_end_select_func(join, NULL); @@ -17889,7 +17963,7 @@ do_select(JOIN *join, Procedure *procedure) error= join->first_select(join,join_tab,1); } - join->thd->limit_found_rows= join->send_records; + join->thd->limit_found_rows= join->send_records - join->duplicate_rows; if (error == NESTED_LOOP_NO_MORE_ROWS || join->thd->killed == ABORT_QUERY) error= NESTED_LOOP_OK; @@ -18787,15 +18861,15 @@ join_read_const_table(THD *thd, JOIN_TAB *tab, POSITION *pos) } else { - if (!table->key_read && table->covering_keys.is_set(tab->ref.key) && - !table->no_keyread && + if (/*!table->file->key_read && */ + table->covering_keys.is_set(tab->ref.key) && !table->no_keyread && (int) table->reginfo.lock_type <= (int) TL_READ_HIGH_PRIORITY) { - table->set_keyread(true); + table->file->ha_start_keyread(tab->ref.key); tab->index= tab->ref.key; } error=join_read_const(tab); - table->set_keyread(false); + table->file->ha_end_keyread(); if (error) { tab->info= ET_UNIQUE_ROW_NOT_FOUND; @@ -19310,9 +19384,9 @@ join_read_first(JOIN_TAB *tab) TABLE *table=tab->table; DBUG_ENTER("join_read_first"); - if (table->covering_keys.is_set(tab->index) && !table->no_keyread && - !table->key_read) - table->set_keyread(true); + DBUG_ASSERT(table->no_keyread || + !table->covering_keys.is_set(tab->index) || + table->file->keyread == tab->index); tab->table->status=0; tab->read_record.read_record=join_read_next; tab->read_record.table=table; @@ -19350,9 +19424,9 @@ join_read_last(JOIN_TAB *tab) int error= 0; DBUG_ENTER("join_read_first"); - if (table->covering_keys.is_set(tab->index) && !table->no_keyread && - !table->key_read) - table->set_keyread(true); + DBUG_ASSERT(table->no_keyread || + !table->covering_keys.is_set(tab->index) || + table->file->keyread == tab->index); tab->table->status=0; tab->read_record.read_record=join_read_prev; tab->read_record.table=table; @@ -19506,7 +19580,12 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), int error; /* result < 0 if row was not accepted and should not be counted */ if ((error= join->result->send_data(*fields))) - DBUG_RETURN(error < 0 ? NESTED_LOOP_OK : NESTED_LOOP_ERROR); + { + if (error > 0) + DBUG_RETURN(NESTED_LOOP_ERROR); + // error < 0 => duplicate row + join->duplicate_rows++; + } } ++join->send_records; @@ -19652,7 +19731,7 @@ end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), if (error < 0) { /* Duplicate row, don't count */ - join->send_records--; + join->duplicate_rows++; error= 0; } } @@ -19961,8 +20040,11 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), } if (join->rollup.state != ROLLUP::STATE_NONE) { - if (join->rollup_write_data((uint) (idx+1), table)) + if (join->rollup_write_data((uint) (idx+1), + join_tab->tmp_table_param, table)) + { DBUG_RETURN(NESTED_LOOP_ERROR); + } } if (end_of_records) goto end; @@ -21212,13 +21294,10 @@ check_reverse_order: If ref_key used index tree reading only ('Using index' in EXPLAIN), and best_key doesn't, then revert the decision. */ - if (!table->covering_keys.is_set(best_key)) - table->set_keyread(false); + if (table->covering_keys.is_set(best_key)) + table->file->ha_start_keyread(best_key); else - { - if (!table->key_read) - table->set_keyread(true); - } + table->file->ha_end_keyread(); if (!quick_created) { @@ -21248,7 +21327,7 @@ check_reverse_order: tab->ref.key_parts= 0; if (select_limit < table->stat_records()) tab->limit= select_limit; - table->set_keyread(false); + table->file->ha_end_keyread(); } } else if (tab->type != JT_ALL || tab->select->quick) @@ -21403,9 +21482,6 @@ create_sort_index(THD *thd, JOIN *join, JOIN_TAB *tab, Filesort *fsort) table= tab->table; select= fsort->select; - /* Currently ORDER BY ... LIMIT is not supported in subqueries. */ - DBUG_ASSERT(join->group_list || !join->is_in_subquery()); - table->status=0; // May be wrong if quick_select if (!tab->preread_init_done && tab->preread_init()) @@ -21425,7 +21501,7 @@ create_sort_index(THD *thd, JOIN *join, JOIN_TAB *tab, Filesort *fsort) and in index_merge 'Only index' cannot be used */ if (((uint) tab->ref.key != select->quick->index)) - table->set_keyread(FALSE); + table->file->ha_end_keyread(); } else { @@ -21478,7 +21554,7 @@ create_sort_index(THD *thd, JOIN *join, JOIN_TAB *tab, Filesort *fsort) select->cleanup(); } - table->set_keyread(FALSE); // Restore if we used indexes + table->file->ha_end_keyread(); if (tab->type == JT_FT) table->file->ft_end(); else @@ -21911,7 +21987,7 @@ cp_buffer_from_ref(THD *thd, TABLE *table, TABLE_REF *ref) @param[in,out] all_fields All select, group and order by fields @param[in] is_group_field True if order is a GROUP field, false if ORDER by field - @param[in] search_in_all_fields If true then search in all_fields + @param[in] from_window_spec If true then order is from a window spec @retval FALSE if OK @@ -21922,7 +21998,7 @@ cp_buffer_from_ref(THD *thd, TABLE *table, TABLE_REF *ref) static bool find_order_in_list(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, ORDER *order, List &fields, List &all_fields, - bool is_group_field, bool search_in_all_fields) + bool is_group_field, bool from_window_spec) { Item *order_item= *order->item; /* The item from the GROUP/ORDER caluse. */ Item::Type order_item_type; @@ -21935,7 +22011,8 @@ find_order_in_list(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables Local SP variables may be int but are expressions, not positions. (And they can't be used before fix_fields is called for them). */ - if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item()) + if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item() && + !from_window_spec) { /* Order by position */ uint count; if (order->counter_used) @@ -22027,7 +22104,7 @@ find_order_in_list(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables thd->where); } } - else if (search_in_all_fields) + else if (from_window_spec) { Item **found_item= find_item_in_list(order_item, all_fields, &counter, REPORT_EXCEPT_NOT_FOUND, &resolution, @@ -22087,14 +22164,14 @@ find_order_in_list(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables int setup_order(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, List &fields, List &all_fields, ORDER *order, - bool search_in_all_fields) + bool from_window_spec) { enum_parsing_place parsing_place= thd->lex->current_select->parsing_place; thd->where="order clause"; for (; order; order=order->next) { if (find_order_in_list(thd, ref_pointer_array, tables, order, fields, - all_fields, FALSE, search_in_all_fields)) + all_fields, FALSE, from_window_spec)) return 1; if ((*order->item)->with_window_func && parsing_place != IN_ORDER_BY) { @@ -22121,7 +22198,7 @@ int setup_order(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, @param order The fields we should do GROUP/PARTITION BY on @param hidden_group_fields Pointer to flag that is set to 1 if we added any fields to all_fields. - @param search_in_all_fields If true then search in all_fields + @param from_window_spec If true then list is from a window spec @todo change ER_WRONG_FIELD_WITH_GROUP to more detailed @@ -22136,7 +22213,7 @@ int setup_order(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, int setup_group(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, List &fields, List &all_fields, ORDER *order, - bool *hidden_group_fields, bool search_in_all_fields) + bool *hidden_group_fields, bool from_window_spec) { enum_parsing_place parsing_place= thd->lex->current_select->parsing_place; *hidden_group_fields=0; @@ -22151,7 +22228,7 @@ setup_group(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, for (ord= order; ord; ord= ord->next) { if (find_order_in_list(thd, ref_pointer_array, tables, ord, fields, - all_fields, TRUE, search_in_all_fields)) + all_fields, TRUE, from_window_spec)) return 1; (*ord->item)->marker= UNDEF_POS; /* Mark found */ if ((*ord->item)->with_sum_func && parsing_place == IN_GROUP_BY) @@ -23773,7 +23850,7 @@ int JOIN::rollup_send_data(uint idx) 1 if write_data_failed() */ -int JOIN::rollup_write_data(uint idx, TABLE *table_arg) +int JOIN::rollup_write_data(uint idx, TMP_TABLE_PARAM *tmp_table_param_arg, TABLE *table_arg) { uint i; for (i= send_group_parts ; i-- > idx ; ) @@ -23794,8 +23871,8 @@ int JOIN::rollup_write_data(uint idx, TABLE *table_arg) if ((write_error= table_arg->file->ha_write_tmp_row(table_arg->record[0]))) { if (create_internal_tmp_table_from_heap(thd, table_arg, - tmp_table_param.start_recinfo, - &tmp_table_param.recinfo, + tmp_table_param_arg->start_recinfo, + &tmp_table_param_arg->recinfo, write_error, 0, NULL)) return 1; } @@ -24172,7 +24249,7 @@ void JOIN_TAB::save_explain_data(Explain_table_access *eta, } /* Build "Extra" field and save it */ - key_read=table->key_read; + key_read= table->file->keyread_enabled(); if ((tab_type == JT_NEXT || tab_type == JT_CONST) && table->covering_keys.is_set(index)) key_read=1; diff --git a/sql/sql_select.h b/sql/sql_select.h index f3b59e5d20c..0d4570fbe47 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -2,7 +2,7 @@ #define SQL_SELECT_INCLUDED /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2008, 2015, MariaDB + Copyright (c) 2008, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,9 +36,9 @@ typedef struct st_join_table JOIN_TAB; /* Values in optimize */ -#define KEY_OPTIMIZE_EXISTS 1 -#define KEY_OPTIMIZE_REF_OR_NULL 2 -#define KEY_OPTIMIZE_EQ 4 +#define KEY_OPTIMIZE_EXISTS 1U +#define KEY_OPTIMIZE_REF_OR_NULL 2U +#define KEY_OPTIMIZE_EQ 4U inline uint get_hash_join_key_no() { return MAX_KEY; } @@ -178,10 +178,10 @@ enum sj_strategy_enum }; /* Values for JOIN_TAB::packed_info */ -#define TAB_INFO_HAVE_VALUE 1 -#define TAB_INFO_USING_INDEX 2 -#define TAB_INFO_USING_WHERE 4 -#define TAB_INFO_FULL_SCAN_ON_NULL 8 +#define TAB_INFO_HAVE_VALUE 1U +#define TAB_INFO_USING_INDEX 2U +#define TAB_INFO_USING_WHERE 4U +#define TAB_INFO_FULL_SCAN_ON_NULL 8U typedef enum_nested_loop_state (*Next_select_func)(JOIN *, struct st_join_table *, bool); @@ -1149,6 +1149,10 @@ public: (if sql_calc_found_rows is used, LIMIT is ignored) */ ha_rows select_limit; + /* + Number of duplicate rows found in UNION. + */ + ha_rows duplicate_rows; /** Used to fetch no more than given amount of rows per one fetch operation of server side cursor. @@ -1420,7 +1424,7 @@ public: sort_and_group= 0; first_record= 0; do_send_rows= 1; - send_records= 0; + duplicate_rows= send_records= 0; found_records= 0; fetch_limit= HA_POS_ERROR; thd= thd_arg; @@ -1508,6 +1512,7 @@ public: bool flatten_subqueries(); bool optimize_unflattened_subqueries(); bool optimize_constant_subqueries(); + int init_join_caches(); bool make_sum_func_list(List &all_fields, List &send_fields, bool before_group_by, bool recompute= FALSE); @@ -1554,7 +1559,7 @@ public: bool rollup_make_fields(List &all_fields, List &fields, Item_sum ***func); int rollup_send_data(uint idx); - int rollup_write_data(uint idx, TABLE *table); + int rollup_write_data(uint idx, TMP_TABLE_PARAM *tmp_table_param, TABLE *table); void join_free(); /** Cleanup this JOIN, possibly for reuse */ void cleanup(bool full); @@ -1943,10 +1948,10 @@ int safe_index_read(JOIN_TAB *tab); int get_quick_record(SQL_SELECT *select); int setup_order(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, List &fields, List &all_fields, ORDER *order, - bool search_in_all_fields= true); + bool from_window_spec= false); int setup_group(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, List &fields, List &all_fields, ORDER *order, - bool *hidden_group_fields, bool search_in_all_fields= true); + bool *hidden_group_fields, bool from_window_spec= false); bool fix_inner_refs(THD *thd, List &all_fields, SELECT_LEX *select, Ref_ptr_array ref_pointer_array); int join_read_key2(THD *thd, struct st_join_table *tab, TABLE *table, diff --git a/sql/sql_show.cc b/sql/sql_show.cc index d3998450184..e176f7e6301 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1069,7 +1069,7 @@ public: } bool handle_condition(THD *thd, uint sql_errno, const char * /* sqlstate */, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char *message, Sql_condition ** /* cond_hdl */) { /* @@ -4675,7 +4675,7 @@ public: bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) { @@ -4684,7 +4684,7 @@ public: sql_errno == ER_TRG_NO_CREATION_CTX) return true; - if (level != Sql_condition::WARN_LEVEL_ERROR) + if (*level != Sql_condition::WARN_LEVEL_ERROR) return false; if (!thd->get_stmt_da()->is_error()) diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 6de8727876c..979852e2f6b 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -2633,9 +2633,7 @@ int collect_statistics_for_index(THD *thd, TABLE *table, uint index) DBUG_RETURN(rc); } - table->key_read= 1; - table->file->extra(HA_EXTRA_KEYREAD); - + table->file->ha_start_keyread(index); table->file->ha_index_init(index, TRUE); rc= table->file->ha_index_first(table->record[0]); while (rc != HA_ERR_END_OF_FILE) @@ -2649,7 +2647,7 @@ int collect_statistics_for_index(THD *thd, TABLE *table, uint index) index_prefix_calc.add(); rc= table->file->ha_index_next(table->record[0]); } - table->key_read= 0; + table->file->ha_end_keyread(); table->file->ha_index_end(); rc= (rc == HA_ERR_END_OF_FILE && !thd->killed) ? 0 : 1; diff --git a/sql/sql_string.h b/sql/sql_string.h index 4b70675dca4..18f5f4cac5c 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -3,7 +3,7 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2008, 2013, Monty Program Ab. + Copyright (c) 2008, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -97,9 +97,9 @@ public: Convert a string between character sets. "dstcs" and "srccs" cannot be &my_charset_bin. */ - uint convert_fix(CHARSET_INFO *dstcs, char *dst, uint dst_length, - CHARSET_INFO *srccs, const char *src, uint src_length, - uint nchars) + size_t convert_fix(CHARSET_INFO *dstcs, char *dst, uint dst_length, + CHARSET_INFO *srccs, const char *src, uint src_length, + uint nchars) { return my_convert_fix(dstcs, dst, dst_length, srccs, src, src_length, nchars, this, this); @@ -673,7 +673,7 @@ public: { DBUG_ASSERT(Alloced_length >= (str_length + net_length_size(length))); char *pos= (char *) net_store_length((uchar *)(Ptr + str_length), length); - str_length= pos - Ptr; + str_length= uint32(pos - Ptr); } void q_net_store_data(const uchar *from, size_t length) { diff --git a/sql/sql_table.cc b/sql/sql_table.cc index b22f831ddab..07af3b891ea 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2010, 2016, MariaDB + Copyright (c) 2010, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2474,7 +2474,19 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, int frm_delete_error, trigger_drop_error= 0; /* Delete the table definition file */ strmov(end,reg_ext); - frm_delete_error= mysql_file_delete(key_file_frm, path, MYF(MY_WME)); + if (table_type && table_type != view_pseudo_hton && + table_type->discover_table) + { + /* + Table type is using discovery and may not need a .frm file. + Delete it silently if it exists + */ + (void) mysql_file_delete(key_file_frm, path, MYF(0)); + frm_delete_error= 0; + } + else + frm_delete_error= mysql_file_delete(key_file_frm, path, + MYF(MY_WME)); if (frm_delete_error) frm_delete_error= my_errno; else @@ -2490,7 +2502,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, else if (frm_delete_error && if_exists) thd->clear_error(); } - non_tmp_error= error ? TRUE : non_tmp_error; + non_tmp_error|= MY_TEST(error); } if (error) { @@ -2876,7 +2888,7 @@ void calculate_interval_lengths(CHARSET_INFO *cs, TYPELIB *interval, int prepare_create_field(Column_definition *sql_field, uint *blob_columns, - longlong table_flags) + ulonglong table_flags) { uint dup_val_count; uint decimals= sql_field->decimals; @@ -3463,7 +3475,6 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, sql_field->pack_length= dup_field->pack_length; sql_field->key_length= dup_field->key_length; sql_field->decimals= dup_field->decimals; - sql_field->create_length_to_internal_length(); sql_field->unireg_check= dup_field->unireg_check; /* We're making one field from two, the result field will have @@ -3473,6 +3484,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, if (!(sql_field->flags & NOT_NULL_FLAG)) null_fields--; sql_field->flags= dup_field->flags; + sql_field->create_length_to_internal_length(); sql_field->interval= dup_field->interval; sql_field->vcol_info= dup_field->vcol_info; it2.remove(); // Remove first (create) definition @@ -3598,12 +3610,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, my_error(ER_TOO_MANY_KEY_PARTS,MYF(0),tmp); DBUG_RETURN(TRUE); } - if (check_string_char_length(&key->name, 0, NAME_CHAR_LEN, - system_charset_info, 1)) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), key->name.str); + if (check_ident_length(&key->name)) DBUG_RETURN(TRUE); - } key_iterator2.rewind (); if (key->type != Key::FOREIGN_KEY) { @@ -4118,7 +4126,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, } if (thd->variables.sql_mode & MODE_NO_ZERO_DATE && - !sql_field->default_value && + !sql_field->default_value && !sql_field->vcol_info && is_timestamp_type(sql_field->sql_type) && (sql_field->flags & NOT_NULL_FLAG) && (type == Field::NONE || type == Field::TIMESTAMP_UN_FIELD)) @@ -6002,7 +6010,7 @@ drop_create_field: while ((f_key= fk_key_it++)) { if (my_strcasecmp(system_charset_info, f_key->foreign_id->str, - key->name.str) == 0) + keyname) == 0) goto remove_key; } } @@ -9831,7 +9839,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, if (to->default_field) to->update_default_fields(0, ignore); if (to->vfield) - to->update_virtual_fields(VCOL_UPDATE_FOR_WRITE); + to->update_virtual_fields(to->file, VCOL_UPDATE_FOR_WRITE); /* This will set thd->is_error() if fatal failure */ if (to->verify_constraints(ignore) == VIEW_CHECK_SKIP) diff --git a/sql/sql_table.h b/sql/sql_table.h index 628c51f678f..5abb25d1ea5 100644 --- a/sql/sql_table.h +++ b/sql/sql_table.h @@ -1,5 +1,5 @@ /* Copyright (c) 2006, 2014, Oracle and/or its affiliates. - Copyright (c) 2011, 2014, Monty Program Ab. + Copyright (c) 2011, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -254,7 +254,7 @@ void close_cached_table(THD *thd, TABLE *table); void sp_prepare_create_field(THD *thd, Column_definition *sql_field); int prepare_create_field(Column_definition *sql_field, uint *blob_columns, - longlong table_flags); + ulonglong table_flags); CHARSET_INFO* get_sql_field_charset(Create_field *sql_field, HA_CREATE_INFO *create_info); bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags); diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 14812d2f73b..ca9b1431785 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -308,7 +308,7 @@ public: virtual bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* message, Sql_condition ** cond_hdl) { @@ -1206,7 +1206,7 @@ bool Table_triggers_list::prepare_record_accessors(TABLE *table) (table->s->stored_fields != table->s->null_fields)) { - int null_bytes= (table->s->stored_fields - table->s->null_fields + 7)/8; + int null_bytes= (table->s->fields - table->s->null_fields + 7)/8; if (!(extra_null_bitmap= (uchar*)alloc_root(&table->mem_root, null_bytes))) return 1; if (!(record0_field= (Field **)alloc_root(&table->mem_root, @@ -2266,6 +2266,7 @@ void Table_triggers_list::mark_fields_used(trg_event_type event) { int action_time; Item_trigger_field *trg_field; + DBUG_ENTER("Table_triggers_list::mark_fields_used"); for (action_time= 0; action_time < (int)TRG_ACTION_MAX; action_time++) { @@ -2280,14 +2281,19 @@ void Table_triggers_list::mark_fields_used(trg_event_type event) /* We cannot mark fields which does not present in table. */ if (trg_field->field_idx != (uint)-1) { + DBUG_PRINT("info", ("marking field: %d", trg_field->field_idx)); bitmap_set_bit(trigger_table->read_set, trg_field->field_idx); if (trg_field->get_settable_routine_parameter()) bitmap_set_bit(trigger_table->write_set, trg_field->field_idx); + if (trigger_table->field[trg_field->field_idx]->vcol_info) + trigger_table->mark_virtual_col(trigger_table-> + field[trg_field->field_idx]); } } } } trigger_table->file->column_bitmaps_signal(); + DBUG_VOID_RETURN; } @@ -2498,4 +2504,3 @@ bool load_table_name_for_trigger(THD *thd, DBUG_RETURN(FALSE); } - diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h index afe47fb36f4..9d1c79cc7cf 100644 --- a/sql/sql_trigger.h +++ b/sql/sql_trigger.h @@ -3,6 +3,7 @@ /* Copyright (c) 2004, 2011, Oracle and/or its affiliates. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -273,8 +274,8 @@ public: Field **nullable_fields() { return record0_field; } void reset_extra_null_bitmap() { - int null_bytes= (trigger_table->s->stored_fields - - trigger_table->s->null_fields + 7)/8; + size_t null_bytes= (trigger_table->s->stored_fields - + trigger_table->s->null_fields + 7)/8; bzero(extra_null_bitmap, null_bytes); } diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index db2ef93204c..394fa713445 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -501,12 +501,8 @@ int mysql_create_function(THD *thd,udf_func *udf) my_message(ER_UDF_NO_PATHS, ER_THD(thd, ER_UDF_NO_PATHS), MYF(0)); DBUG_RETURN(1); } - if (check_string_char_length(&udf->name, 0, NAME_CHAR_LEN, - system_charset_info, 1)) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), udf->name.str); + if (check_ident_length(&udf->name)) DBUG_RETURN(1); - } tables.init_one_table(STRING_WITH_LEN("mysql"), STRING_WITH_LEN("func"), "func", TL_WRITE); diff --git a/sql/sql_union.cc b/sql/sql_union.cc index aad3701cca2..71d0e331101 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -105,7 +105,7 @@ int select_union_recursive::send_data(List &values) { int rc= select_union::send_data(values); - if (!write_err) + if (write_err != HA_ERR_FOUND_DUPP_KEY) { int err; if ((err= incr_table->file->ha_write_tmp_row(table->record[0]))) @@ -283,7 +283,14 @@ void select_union_recursive::cleanup() tab->file->extra(HA_EXTRA_RESET_STATE); tab->file->ha_delete_all_rows(); } - free_tmp_table(thd, tab); + /* + The table will be closed later in close_thread_tables(), + because it might be used in the statements like + ANALYZE WITH r AS (...) SELECT * from r + where r is defined through recursion. + */ + tab->next= thd->rec_tables; + thd->rec_tables= tab; } } @@ -1192,6 +1199,7 @@ bool st_select_lex_unit::exec_recursive() st_select_lex *end= NULL; bool is_unrestricted= with_element->is_unrestricted(); List_iterator_fast
li(with_element->rec_result->rec_tables); + TMP_TABLE_PARAM *tmp_table_param= &with_element->rec_result->tmp_table_param; ha_rows examined_rows= 0; bool was_executed= executed; TABLE *rec_table; @@ -1247,7 +1255,9 @@ bool st_select_lex_unit::exec_recursive() while ((rec_table= li++)) { saved_error= - incr_table->insert_all_rows_into(thd, rec_table, !is_unrestricted); + incr_table->insert_all_rows_into_tmp_table(thd, rec_table, + tmp_table_param, + !is_unrestricted); if (!with_element->rec_result->first_rec_table_to_update) with_element->rec_result->first_rec_table_to_update= rec_table; if (with_element->level == 1) diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 1f1af7f2660..35e1fe24b97 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -191,7 +191,7 @@ static void prepare_record_for_error_message(int error, TABLE *table) /* Create unique_map with all fields used by that index. */ my_bitmap_init(&unique_map, unique_map_buf, table->s->fields, FALSE); - table->mark_columns_used_by_index_no_reset(keynr, &unique_map); + table->mark_columns_used_by_index(keynr, &unique_map); /* Subtract read_set and write_set. */ bitmap_subtract(&unique_map, table->read_set); @@ -273,7 +273,6 @@ int mysql_update(THD *thd, SORT_INFO *file_sort= 0; READ_RECORD info; SELECT_LEX *select_lex= &thd->lex->select_lex; - BLOB_VALUE_ORPHANAGE vblobs; ulonglong id; List all_fields; killed_state killed_status= NOT_KILLED; @@ -535,16 +534,9 @@ int mysql_update(THD *thd, /* We can't update table directly; We must first search after all matching rows before updating the table! + + note: We avoid sorting if we sort on the used index */ - MY_BITMAP *save_read_set= table->read_set; - MY_BITMAP *save_write_set= table->write_set; - - if (query_plan.index < MAX_KEY && old_covering_keys.is_set(query_plan.index)) - table->add_read_columns_used_by_index(query_plan.index); - else - table->use_all_columns(); - - /* note: We avoid sorting if we sort on the used index */ if (query_plan.using_filesort) { /* @@ -570,6 +562,14 @@ int mysql_update(THD *thd, } else { + MY_BITMAP *save_read_set= table->read_set; + MY_BITMAP *save_write_set= table->write_set; + + if (query_plan.index < MAX_KEY && old_covering_keys.is_set(query_plan.index)) + table->prepare_for_keyread(query_plan.index); + else + table->use_all_columns(); + /* We are doing a search on a key that is updated. In this case we go trough the matching rows, save a pointer to them and @@ -619,8 +619,6 @@ int mysql_update(THD *thd, while (!(error=info.read_record(&info)) && !thd->killed) { explain->buf_tracker.on_record_read(); - if (table->vfield) - table->update_virtual_fields(VCOL_UPDATE_FOR_READ_WRITE); thd->inc_examined_row_count(1); if (!select || (error= select->skip_record(thd)) > 0) { @@ -684,9 +682,10 @@ int mysql_update(THD *thd, select->file=tempfile; // Read row ptrs from this file if (error >= 0) goto err; + + table->file->ha_end_keyread(); + table->column_bitmaps_set(save_read_set, save_write_set); } - table->set_keyread(false); - table->column_bitmaps_set(save_read_set, save_write_set); } if (ignore) @@ -725,8 +724,6 @@ int mysql_update(THD *thd, table->reset_default_fields(); - vblobs.init(table); - /* We can use compare_record() to optimize away updates if the table handler is returning all columns OR if @@ -738,8 +735,6 @@ int mysql_update(THD *thd, while (!(error=info.read_record(&info)) && !thd->killed) { explain->tracker.on_record_read(); - if (table->vfield) - table->update_virtual_fields(VCOL_UPDATE_FOR_READ_WRITE); thd->inc_examined_row_count(1); if (!select || select->skip_record(thd) > 0) { @@ -748,9 +743,6 @@ int mysql_update(THD *thd, explain->tracker.on_record_after_where(); store_record(table,record[1]); - - vblobs.make_orphans(); - if (fill_record_n_invoke_before_triggers(thd, table, fields, values, 0, TRG_EVENT_UPDATE)) break; /* purecov: inspected */ @@ -910,9 +902,7 @@ int mysql_update(THD *thd, error= 1; break; } - vblobs.free_orphans(); } - vblobs.free_orphans(); ANALYZE_STOP_TRACKING(&explain->command_tracker); table->auto_increment_field_not_null= FALSE; dup_key_found= 0; @@ -1044,7 +1034,7 @@ err: delete select; delete file_sort; free_underlaid_joins(thd, select_lex); - table->set_keyread(false); + table->file->ha_end_keyread(); thd->abort_on_warning= 0; DBUG_RETURN(1); @@ -1760,8 +1750,6 @@ int multi_update::prepare(List ¬_used_values, table_count); values_for_table= (List_item **) thd->alloc(sizeof(List_item *) * table_count); - vblobs= (BLOB_VALUE_ORPHANAGE *)thd->calloc(sizeof(*vblobs) * table_count); - if (thd->is_fatal_error) DBUG_RETURN(1); for (i=0 ; i < table_count ; i++) @@ -1794,7 +1782,6 @@ int multi_update::prepare(List ¬_used_values, TABLE *table= ((Item_field*)(fields_for_table[i]->head()))->field->table; switch_to_nullable_trigger_fields(*fields_for_table[i], table); switch_to_nullable_trigger_fields(*values_for_table[i], table); - vblobs[i].init(table); } } copy_field= new Copy_field[max_fields]; @@ -2076,8 +2063,6 @@ multi_update::~multi_update() free_tmp_table(thd, tmp_tables[cnt]); tmp_table_param[cnt].cleanup(); } - vblobs[cnt].free_orphans(); - vblobs[cnt].free(); } } if (copy_field) @@ -2123,9 +2108,7 @@ int multi_update::send_data(List ¬_used_values) can_compare_record= records_are_comparable(table); table->status|= STATUS_UPDATED; - vblobs[offset].free_orphans(); store_record(table,record[1]); - vblobs[offset].make_orphans(); if (fill_record_n_invoke_before_triggers(thd, table, *fields_for_table[offset], *values_for_table[offset], 0, @@ -2342,7 +2325,17 @@ int multi_update::do_updates() goto err; } table->file->extra(HA_EXTRA_NO_CACHE); - empty_record(table); + /* + We have to clear the base record, if we have virtual indexed + blob fields, as some storage engines will access the blob fields + to calculate the keys to see if they have changed. Without + clearing the blob pointers will contain random values which can + cause a crash. + This is a workaround for engines that access columns not present in + either read or write set. + */ + if (table->vfield) + empty_record(table); check_opt_it.rewind(); while(TABLE *tbl= check_opt_it++) @@ -2412,13 +2405,13 @@ int multi_update::do_updates() field_num++; } while ((tbl= check_opt_it++)); - if (table->vfield && table->update_virtual_fields(VCOL_UPDATE_INDEXED)) + if (table->vfield && + table->update_virtual_fields(table->file, + VCOL_UPDATE_INDEXED_FOR_UPDATE)) goto err2; table->status|= STATUS_UPDATED; - vblobs[offset].free_orphans(); store_record(table,record[1]); - vblobs[offset].make_orphans(); /* Copy data from temporary table to current table */ for (copy_field_ptr=copy_field; @@ -2441,7 +2434,7 @@ int multi_update::do_updates() (error= table->update_default_fields(1, ignore))) goto err2; if (table->vfield && - table->update_virtual_fields(VCOL_UPDATE_FOR_WRITE)) + table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_WRITE)) goto err2; if ((error= cur_table->view_check_option(thd, ignore)) != VIEW_CHECK_OK) diff --git a/sql/sql_window.cc b/sql/sql_window.cc index f49cc945504..557c7503306 100644 --- a/sql/sql_window.cc +++ b/sql/sql_window.cc @@ -632,9 +632,10 @@ private: /* If io_cache=!NULL, use it */ IO_CACHE *io_cache; uchar *ref_buffer; /* Buffer for the last returned rowid */ - uint rownum; /* Number of the rowid that is about to be returned */ - bool cache_eof; /* whether we've reached EOF */ - + ha_rows rownum; /* Number of the rowid that is about to be returned */ + ha_rows current_ref_buffer_rownum; + bool ref_buffer_valid; + /* The following are used when we are reading from an array of pointers */ uchar *cache_start; uchar *cache_pos; @@ -655,34 +656,26 @@ public: { //DBUG_ASSERT(info->read_record == rr_from_tempfile); rownum= 0; - cache_eof= false; io_cache= (IO_CACHE*)my_malloc(sizeof(IO_CACHE), MYF(0)); init_slave_io_cache(info->io_cache, io_cache); ref_buffer= (uchar*)my_malloc(ref_length, MYF(0)); + ref_buffer_valid= false; } } virtual int next() { + /* Allow multiple next() calls in EOF state. */ + if (at_eof()) + return -1; + if (io_cache) { - if (cache_eof) - return 1; - - if (my_b_read(io_cache,ref_buffer,ref_length)) - { - cache_eof= 1; // TODO: remove cache_eof - return -1; - } rownum++; - return 0; } else { - /* Allow multiple next() calls in EOF state. */ - if (cache_pos == cache_end) - return -1; cache_pos+= ref_length; DBUG_ASSERT(cache_pos <= cache_end); } @@ -696,7 +689,7 @@ public: if (rownum == 0) return -1; - move_to(rownum - 1); + rownum--; return 0; } else @@ -722,9 +715,7 @@ public: { if (io_cache) { - seek_io_cache(io_cache, row_number * ref_length); rownum= row_number; - Rowid_seq_cursor::next(); } else { @@ -738,18 +729,36 @@ protected: { if (io_cache) { - return cache_eof; + return rownum * ref_length >= io_cache->end_of_file; } else return (cache_pos == cache_end); } - uchar *get_curr_rowid() + bool get_curr_rowid(uchar **row_id) { if (io_cache) - return ref_buffer; + { + DBUG_ASSERT(!at_eof()); + if (!ref_buffer_valid || current_ref_buffer_rownum != rownum) + { + seek_io_cache(io_cache, rownum * ref_length); + if (my_b_read(io_cache,ref_buffer,ref_length)) + { + /* Error reading from file. */ + return true; + } + ref_buffer_valid= true; + current_ref_buffer_rownum = rownum; + } + *row_id = ref_buffer; + return false; + } else - return cache_pos; + { + *row_id= cache_pos; + return false; + } } }; @@ -775,7 +784,9 @@ public: if (at_eof()) return -1; - uchar* curr_rowid= get_curr_rowid(); + uchar* curr_rowid; + if (get_curr_rowid(&curr_rowid)) + return -1; return table->file->ha_rnd_pos(record, curr_rowid); } @@ -2311,19 +2322,6 @@ void add_special_frame_cursors(THD *thd, Cursor_manager *cursor_manager, fc->add_sum_func(item_sum); cursor_manager->add_cursor(fc); break; - case Item_sum::FIRST_VALUE_FUNC: - fc= get_frame_cursor(thd, spec, true); - fc->set_no_action(); - cursor_manager->add_cursor(fc); - fc= new Frame_positional_cursor(*fc); - fc->add_sum_func(item_sum); - cursor_manager->add_cursor(fc); - break; - case Item_sum::LAST_VALUE_FUNC: - fc= get_frame_cursor(thd, spec, false); - fc->add_sum_func(item_sum); - cursor_manager->add_cursor(fc); - break; case Item_sum::LEAD_FUNC: case Item_sum::LAG_FUNC: { @@ -2347,6 +2345,38 @@ void add_special_frame_cursors(THD *thd, Cursor_manager *cursor_manager, cursor_manager->add_cursor(fc); break; } + case Item_sum::FIRST_VALUE_FUNC: + { + Frame_cursor *bottom_bound= get_frame_cursor(thd, spec, false); + Frame_cursor *top_bound= get_frame_cursor(thd, spec, true); + cursor_manager->add_cursor(bottom_bound); + cursor_manager->add_cursor(top_bound); + DBUG_ASSERT(item_sum->fixed); + Item *offset_item= new (thd->mem_root) Item_int(thd, 0); + offset_item->fix_fields(thd, &offset_item); + fc= new Frame_positional_cursor(*top_bound, + *top_bound, *bottom_bound, + *offset_item, false); + fc->add_sum_func(item_sum); + cursor_manager->add_cursor(fc); + break; + } + case Item_sum::LAST_VALUE_FUNC: + { + Frame_cursor *bottom_bound= get_frame_cursor(thd, spec, false); + Frame_cursor *top_bound= get_frame_cursor(thd, spec, true); + cursor_manager->add_cursor(bottom_bound); + cursor_manager->add_cursor(top_bound); + DBUG_ASSERT(item_sum->fixed); + Item *offset_item= new (thd->mem_root) Item_int(thd, 0); + offset_item->fix_fields(thd, &offset_item); + fc= new Frame_positional_cursor(*bottom_bound, + *top_bound, *bottom_bound, + *offset_item, false); + fc->add_sum_func(item_sum); + cursor_manager->add_cursor(fc); + break; + } case Item_sum::NTH_VALUE_FUNC: { Frame_cursor *bottom_bound= get_frame_cursor(thd, spec, false); @@ -2669,10 +2699,20 @@ bool Window_func_runner::add_function_to_run(Item_window_func *win_func) { /* Distinct is not yet supported. */ case Item_sum::GROUP_CONCAT_FUNC: + my_error(ER_NOT_SUPPORTED_YET, MYF(0), + "GROUP_CONCAT() aggregate as window function"); + return true; case Item_sum::SUM_DISTINCT_FUNC: + my_error(ER_NOT_SUPPORTED_YET, MYF(0), + "SUM(DISTINCT) aggregate as window function"); + return true; case Item_sum::AVG_DISTINCT_FUNC: my_error(ER_NOT_SUPPORTED_YET, MYF(0), - "This aggregate as window function"); + "AVG(DISTINCT) aggregate as window function"); + return true; + case Item_sum::COUNT_DISTINCT_FUNC: + my_error(ER_NOT_SUPPORTED_YET, MYF(0), + "COUNT(DISTINCT) aggregate as window function"); return true; default: break; @@ -2801,6 +2841,11 @@ bool Window_funcs_sort::setup(THD *thd, SQL_SELECT *sel, sort_order= order; } filesort= new (thd->mem_root) Filesort(sort_order, HA_POS_ERROR, true, NULL); + if (!join_tab->join->top_join_tab_count) + { + filesort->tracker= + new (thd->mem_root) Filesort_tracker(thd->lex->analyze_stmt); + } /* Apply the same condition that the subsequent sort has. */ filesort->select= sel; @@ -2816,6 +2861,12 @@ bool Window_funcs_computation::setup(THD *thd, order_window_funcs_by_window_specs(window_funcs); SQL_SELECT *sel= NULL; + /* + If the tmp table is filtered during sorting + (ex: SELECT with HAVING && ORDER BY), we must make sure to keep the + filtering conditions when we perform sorting for window function + computation. + */ if (tab->filesort && tab->filesort->select) { sel= tab->filesort->select; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index ff4a5e12e56..fe387ed80f2 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1021,15 +1021,16 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %parse-param { THD *thd } %lex-param { THD *thd } /* - Currently there are 103 shift/reduce conflicts. + Currently there are 102 shift/reduce conflicts. We should not introduce new conflicts any more. */ -%expect 103 +%expect 102 /* Comments for TOKENS. For each token, please include in the same line a comment that contains the following tags: + SQL-2011-N : Non Reserved keywird as per SQL-2011 SQL-2003-R : Reserved keyword as per SQL-2003 SQL-2003-N : Non Reserved keyword as per SQL-2003 SQL-1999-R : Reserved keyword as per SQL-1999 @@ -1219,7 +1220,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token EVERY_SYM /* SQL-2003-N */ %token EXCHANGE_SYM %token EXAMINED_SYM -%token EXCLUDE_SYM +%token EXCLUDE_SYM /* SQL-2011-N */ %token EXECUTE_SYM /* SQL-2003-R */ %token EXISTS /* SQL-2003-R */ %token EXIT_SYM @@ -1240,7 +1241,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token FLOAT_SYM /* SQL-2003-R */ %token FLUSH_SYM %token FOLLOWS_SYM /* MYSQL trigger*/ -%token FOLLOWING_SYM +%token FOLLOWING_SYM /* SQL-2011-N */ %token FORCE_SYM %token FOREIGN /* SQL-2003-R */ %token FOR_SYM /* SQL-2003-R */ @@ -1442,7 +1443,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token ORDER_SYM /* SQL-2003-R */ %token OR_OR_SYM /* OPERATOR */ %token OR_SYM /* SQL-2003-R */ -%token OTHERS_SYM +%token OTHERS_SYM /* SQL-2011-N */ %token OUTER %token OUTFILE %token OUT_SYM /* SQL-2003-R */ @@ -1469,7 +1470,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token PORT_SYM %token POSITION_SYM /* SQL-2003-N */ %token PRECEDES_SYM /* MYSQL */ -%token PRECEDING_SYM +%token PRECEDING_SYM /* SQL-2011-N */ %token PRECISION /* SQL-2003-R */ %token PREPARE_SYM /* SQL-2003-R */ %token PRESERVE_SYM @@ -1534,10 +1535,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token ROLLBACK_SYM /* SQL-2003-R */ %token ROLLUP_SYM /* SQL-2003-R */ %token ROUTINE_SYM /* SQL-2003-N */ -%token ROWS_SYM /* SQL-2003-R */ -%token ROW_FORMAT_SYM %token ROW_SYM /* SQL-2003-R */ +%token ROWS_SYM /* SQL-2003-R */ %token ROW_COUNT_SYM /* SQL-2003-N */ +%token ROW_FORMAT_SYM %token ROW_NUMBER_SYM %token RTREE_SYM %token SAVEPOINT_SYM /* SQL-2003-R */ @@ -1630,7 +1631,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token TEXT_SYM %token THAN_SYM %token THEN_SYM /* SQL-2003-R */ -%token TIES_SYM +%token TIES_SYM /* SQL-2011-N */ %token TIMESTAMP /* SQL-2003-R */ %token TIMESTAMP_ADD %token TIMESTAMP_DIFF @@ -1651,7 +1652,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token TYPE_SYM /* SQL-2003-N */ %token UDF_RETURNS_SYM %token ULONGLONG_NUM -%token UNBOUNDED_SYM +%token UNBOUNDED_SYM /* SQL-2011-N */ %token UNCOMMITTED_SYM /* SQL-2003-N */ %token UNDEFINED_SYM %token UNDERSCORE_CHARSET @@ -1992,6 +1993,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); definer_opt no_definer definer get_diagnostics parse_vcol_expr vcol_opt_specifier vcol_opt_attribute vcol_opt_attribute_list vcol_attribute + opt_serial_attribute opt_serial_attribute_list serial_attribute explainable_command END_OF_INPUT @@ -5195,6 +5197,8 @@ part_name: { partition_info *part_info= Lex->part_info; partition_element *p_elem= part_info->curr_part_elem; + if (check_ident_length(&$1)) + MYSQL_YYABORT; p_elem->partition_name= $1.str; } ; @@ -5499,7 +5503,11 @@ sub_part_definition: sub_name: ident_or_text - { Lex->part_info->curr_part_elem->partition_name= $1.str; } + { + if (check_ident_length(&$1)) + MYSQL_YYABORT; + Lex->part_info->curr_part_elem->partition_name= $1.str; + } ; opt_part_options: @@ -6144,8 +6152,7 @@ field_spec: lex->init_last_field(f, $1.str, NULL); $$= f; } - field_type { Lex->set_last_field_type($3); } - field_def + field_type_or_serial { LEX *lex=Lex; $$= $2; @@ -6163,10 +6170,37 @@ field_spec: } ; +field_type_or_serial: + field_type { Lex->set_last_field_type($1); } field_def + | SERIAL_SYM + { + Lex_field_type_st type; + type.set(MYSQL_TYPE_LONGLONG); + Lex->set_last_field_type(type); + Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG + | UNSIGNED_FLAG | UNIQUE_KEY_FLAG; + } + opt_serial_attribute + ; + +opt_serial_attribute: + /* empty */ {} + | opt_serial_attribute_list {} + ; + +opt_serial_attribute_list: + opt_serial_attribute_list serial_attribute {} + | serial_attribute + ; + + field_def: opt_attribute | opt_generated_always AS virtual_column_func - { Lex->last_field->vcol_info= $3; } + { + Lex->last_field->vcol_info= $3; + Lex->last_field->flags&= ~NOT_NULL_FLAG; // undo automatic NOT NULL for timestamps + } vcol_opt_specifier vcol_opt_attribute ; @@ -6440,12 +6474,6 @@ field_type: { $$.set(MYSQL_TYPE_SET); } | LONG_SYM opt_binary { $$.set(MYSQL_TYPE_MEDIUM_BLOB); } - | SERIAL_SYM - { - $$.set(MYSQL_TYPE_LONGLONG); - Lex->last_field->flags|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG | - UNIQUE_KEY_FLAG); - } ; spatial_type: @@ -6568,7 +6596,6 @@ opt_attribute_list: attribute: NULL_SYM { Lex->last_field->flags&= ~ NOT_NULL_FLAG; } - | not NULL_SYM { Lex->last_field->flags|= NOT_NULL_FLAG; } | DEFAULT column_default_expr { Lex->last_field->default_value= $2; } | ON UPDATE_SYM NOW_SYM opt_default_time_precision { @@ -6584,6 +6611,18 @@ attribute: lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_KEY_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } + | COLLATE_SYM collation_name + { + if (Lex->charset && !my_charset_same(Lex->charset,$2)) + my_yyabort_error((ER_COLLATION_CHARSET_MISMATCH, MYF(0), + $2->name,Lex->charset->csname)); + Lex->last_field->charset= $2; + } + | serial_attribute + ; + +serial_attribute: + not NULL_SYM { Lex->last_field->flags|= NOT_NULL_FLAG; } | opt_primary KEY_SYM { LEX *lex=Lex; @@ -6603,13 +6642,6 @@ attribute: lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } | COMMENT_SYM TEXT_STRING_sys { Lex->last_field->comment= $2; } - | COLLATE_SYM collation_name - { - if (Lex->charset && !my_charset_same(Lex->charset,$2)) - my_yyabort_error((ER_COLLATION_CHARSET_MISMATCH, MYF(0), - $2->name,Lex->charset->csname)); - Lex->last_field->charset= $2; - } | IDENT_sys equal TEXT_STRING_sys { if ($3.length > ENGINE_OPTION_MAX_LENGTH) @@ -10463,6 +10495,9 @@ window_func: simple_window_func | sum_expr + { + ((Item_sum *) $1)->mark_as_window_func_sum_expr(); + } ; simple_window_func: @@ -10679,7 +10714,6 @@ cast_type: } | cast_type_numeric { $$= $1; Lex->charset= NULL; } | cast_type_temporal { $$= $1; Lex->charset= NULL; } - | JSON_SYM { $$.set(ITEM_CAST_JSON); } ; cast_type_numeric: @@ -14539,9 +14573,11 @@ keyword: | DO_SYM {} | END {} | EXAMINED_SYM {} + | EXCLUDE_SYM {} | EXECUTE_SYM {} | FLUSH_SYM {} | FOLLOWS_SYM {} + | FOLLOWING_SYM {} | FORMAT_SYM {} | GET_SYM {} | HANDLER_SYM {} @@ -14553,10 +14589,12 @@ keyword: | OPEN_SYM {} | OPTION {} | OPTIONS_SYM {} + | OTHERS_SYM {} | OWNER_SYM {} | PARSER_SYM {} | PORT_SYM {} | PRECEDES_SYM {} + | PRECEDING_SYM {} | PREPARE_SYM {} | REMOVE_SYM {} | REPAIR {} @@ -14575,9 +14613,11 @@ keyword: | START_SYM {} | STOP_SYM {} | STORED_SYM {} + | TIES_SYM {} | TRUNCATE_SYM {} | UNICODE_SYM {} | UNINSTALL_SYM {} + | UNBOUNDED_SYM {} | WRAPPER_SYM {} | XA_SYM {} | UPGRADE_SYM {} @@ -14828,7 +14868,6 @@ keyword_sp: | ROLE_SYM {} | ROLLUP_SYM {} | ROUTINE_SYM {} - | ROWS_SYM {} | ROW_COUNT_SYM {} | ROW_FORMAT_SYM {} | ROW_SYM {} diff --git a/sql/structs.h b/sql/structs.h index 144e12ca06c..98eb0f2585d 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -2,6 +2,7 @@ #define STRUCTS_INCLUDED /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -205,7 +206,7 @@ typedef int *(*update_var)(THD *, struct st_mysql_show_var *); typedef struct st_lex_user { LEX_STRING user, host, plugin, auth; LEX_STRING pwtext, pwhash; - bool is_role() { return user.str[0] && !host.str[0]; } + bool is_role() const { return user.str[0] && !host.str[0]; } void set_lex_string(LEX_STRING *l, char *buf) { if (is_role()) @@ -331,26 +332,26 @@ typedef struct st_index_stats /* Bits in form->update */ -#define REG_MAKE_DUPP 1 /* Make a copy of record when read */ -#define REG_NEW_RECORD 2 /* Write a new record if not found */ -#define REG_UPDATE 4 /* Uppdate record */ -#define REG_DELETE 8 /* Delete found record */ -#define REG_PROG 16 /* User is updating database */ -#define REG_CLEAR_AFTER_WRITE 32 -#define REG_MAY_BE_UPDATED 64 -#define REG_AUTO_UPDATE 64 /* Used in D-forms for scroll-tables */ -#define REG_OVERWRITE 128 -#define REG_SKIP_DUP 256 +#define REG_MAKE_DUPP 1U /* Make a copy of record when read */ +#define REG_NEW_RECORD 2U /* Write a new record if not found */ +#define REG_UPDATE 4U /* Uppdate record */ +#define REG_DELETE 8U /* Delete found record */ +#define REG_PROG 16U /* User is updating database */ +#define REG_CLEAR_AFTER_WRITE 32U +#define REG_MAY_BE_UPDATED 64U +#define REG_AUTO_UPDATE 64U /* Used in D-forms for scroll-tables */ +#define REG_OVERWRITE 128U +#define REG_SKIP_DUP 256U /* Bits in form->status */ -#define STATUS_NO_RECORD (1+2) /* Record isn't usably */ -#define STATUS_GARBAGE 1 -#define STATUS_NOT_FOUND 2 /* No record in database when needed */ -#define STATUS_NO_PARENT 4 /* Parent record wasn't found */ -#define STATUS_NOT_READ 8 /* Record isn't read */ -#define STATUS_UPDATED 16 /* Record is updated by formula */ -#define STATUS_NULL_ROW 32 /* table->null_row is set */ -#define STATUS_DELETED 64 +#define STATUS_NO_RECORD (1U+2U) /* Record isn't usable */ +#define STATUS_GARBAGE 1U +#define STATUS_NOT_FOUND 2U /* No record in database when needed */ +#define STATUS_NO_PARENT 4U /* Parent record wasn't found */ +#define STATUS_NOT_READ 8U /* Record isn't read */ +#define STATUS_UPDATED 16U /* Record is updated by formula */ +#define STATUS_NULL_ROW 32U /* table->null_row is set */ +#define STATUS_DELETED 64U /* Such interval is "discrete": it is the set of diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index bdfedc30d46..9a9e920c6dd 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2002, 2015, Oracle and/or its affiliates. - Copyright (c) 2012, 2016, MariaDB Corporation + Copyright (c) 2012, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -449,16 +449,17 @@ static bool binlog_format_check(sys_var *self, THD *thd, set_var *var) /* MariaDB Galera does not support STATEMENT or MIXED binlog format currently. */ - if (WSREP(thd) && var->save_result.ulonglong_value != BINLOG_FORMAT_ROW) + if ((WSREP(thd) || opt_support_flashback) && + var->save_result.ulonglong_value != BINLOG_FORMAT_ROW) { // Push a warning to the error log. push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR, - "MariaDB Galera does not support binlog format: %s", + "MariaDB Galera and flashback do not support binlog format: %s", binlog_format_names[var->save_result.ulonglong_value]); if (var->type == OPT_GLOBAL) { - WSREP_ERROR("MariaDB Galera does not support binlog format: %s", + WSREP_ERROR("MariaDB Galera and flashback do not support binlog format: %s", binlog_format_names[var->save_result.ulonglong_value]); return true; } @@ -513,7 +514,7 @@ static Sys_var_enum Sys_binlog_format( "UDFs) or the UUID() function; for those, row-based binary logging is " "automatically used.", SESSION_VAR(binlog_format), CMD_LINE(REQUIRED_ARG, OPT_BINLOG_FORMAT), - binlog_format_names, DEFAULT(BINLOG_FORMAT_STMT), + binlog_format_names, DEFAULT(BINLOG_FORMAT_MIXED), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(binlog_format_check), ON_UPDATE(fix_binlog_format_after_update)); @@ -641,6 +642,7 @@ static bool check_cs_client(sys_var *self, THD *thd, set_var *var) if (check_charset_not_null(self, thd, var)) return true; + // Currently, UCS-2 cannot be used as a client character set if (!is_supported_parser_charset((CHARSET_INFO *)(var->save_result.ptr))) return true; @@ -1143,7 +1145,7 @@ static Sys_var_ulong Sys_lock_wait_timeout( "lock_wait_timeout", "Timeout in seconds to wait for a lock before returning an error.", SESSION_VAR(lock_wait_timeout), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(LONG_TIMEOUT), BLOCK_SIZE(1)); + VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(24 * 60 * 60), BLOCK_SIZE(1)); #ifdef HAVE_MLOCKALL static Sys_var_mybool Sys_locked_in_memory( @@ -1202,13 +1204,13 @@ static Sys_var_mybool Sys_log_slow_admin_statements( "Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to " "the slow log if it is open.", GLOBAL_VAR(opt_log_slow_admin_statements), - CMD_LINE(OPT_ARG), DEFAULT(FALSE)); + CMD_LINE(OPT_ARG), DEFAULT(TRUE)); static Sys_var_mybool Sys_log_slow_slave_statements( "log_slow_slave_statements", "Log slow statements executed by slave thread to the slow log if it is open.", GLOBAL_VAR(opt_log_slow_slave_statements), - CMD_LINE(OPT_ARG), DEFAULT(FALSE)); + CMD_LINE(OPT_ARG), DEFAULT(TRUE)); static Sys_var_ulong Sys_log_warnings( "log_warnings", @@ -1216,7 +1218,7 @@ static Sys_var_ulong Sys_log_warnings( "Value can be between 0 and 11. Higher values mean more verbosity", SESSION_VAR(log_warnings), CMD_LINE(OPT_ARG, 'W'), - VALID_RANGE(0, UINT_MAX), DEFAULT(1), BLOCK_SIZE(1)); + VALID_RANGE(0, UINT_MAX), DEFAULT(2), BLOCK_SIZE(1)); static bool update_cached_long_query_time(sys_var *self, THD *thd, enum_var_type type) @@ -1255,9 +1257,9 @@ static bool update_cached_max_statement_time(sys_var *self, THD *thd, static Sys_var_double Sys_max_statement_time( "max_statement_time", - "A SELECT query that have taken more than max_statement_time seconds " + "A query that has taken more than max_statement_time seconds " "will be aborted. The argument will be treated as a decimal value " - "with microsecond precision. A value of 0 (default) means no timeout", + "with microsecond precision. A value of 0 (default) means no timeout", SESSION_VAR(max_statement_time_double), CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, LONG_TIMEOUT), DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), @@ -1336,7 +1338,7 @@ static Sys_var_ulong Sys_max_allowed_packet( "max_allowed_packet", "Max packet length to send to or receive from the server", SESSION_VAR(max_allowed_packet), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(1024, 1024*1024*1024), DEFAULT(4*1024*1024), + VALID_RANGE(1024, 1024*1024*1024), DEFAULT(16*1024*1024), BLOCK_SIZE(1024), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_max_allowed_packet)); @@ -2463,7 +2465,7 @@ static Sys_var_uint Sys_protocol_version( "protocol_version", "The version of the client/server protocol used by the MySQL server", READ_ONLY GLOBAL_VAR(protocol_version), CMD_LINE_HELP_ONLY, - VALID_RANGE(0, ~0), DEFAULT(PROTOCOL_VERSION), BLOCK_SIZE(1)); + VALID_RANGE(0, ~0U), DEFAULT(PROTOCOL_VERSION), BLOCK_SIZE(1)); static Sys_var_proxy_user Sys_proxy_user( "proxy_user", "The proxy user account name used when logging in", @@ -3117,7 +3119,9 @@ static Sys_var_set Sys_sql_mode( "Sets the sql mode", SESSION_VAR(sql_mode), CMD_LINE(REQUIRED_ARG), sql_mode_names, - DEFAULT(MODE_NO_ENGINE_SUBSTITUTION | + DEFAULT(MODE_STRICT_TRANS_TABLES | + MODE_ERROR_FOR_DIVISION_BY_ZERO | + MODE_NO_ENGINE_SUBSTITUTION | MODE_NO_AUTO_CREATE_USER), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_sql_mode), ON_UPDATE(fix_sql_mode)); @@ -3185,10 +3189,10 @@ static Sys_var_charptr Sys_ssl_crlpath( READ_ONLY GLOBAL_VAR(opt_ssl_crlpath), SSL_OPT(OPT_SSL_CRLPATH), IN_FS_CHARSET, DEFAULT(0)); -static Sys_var_mybool Sys_standards_compliant_cte( - "standards_compliant_cte", - "Allow only standards compiant CTE", - SESSION_VAR(only_standards_compliant_cte), CMD_LINE(OPT_ARG), +static Sys_var_mybool Sys_standard_compliant_cte( + "standard_compliant_cte", + "Allow only CTEs compliant to SQL standard", + SESSION_VAR(only_standard_compliant_cte), CMD_LINE(OPT_ARG), DEFAULT(TRUE)); @@ -3358,7 +3362,7 @@ static Sys_var_uint Sys_threadpool_max_threads( "thread_pool_max_threads", "Maximum allowed number of worker threads in the thread pool", GLOBAL_VAR(threadpool_max_threads), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(1, 65536), DEFAULT(1000), BLOCK_SIZE(1), + VALID_RANGE(1, 65536), DEFAULT(65536), BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(fix_tp_max_threads) ); @@ -3988,9 +3992,9 @@ static Sys_var_ulong Sys_default_week_format( static Sys_var_ulonglong Sys_group_concat_max_len( "group_concat_max_len", - "The maximum length of the result of function GROUP_CONCAT()", + "The maximum length of the result of function GROUP_CONCAT()", SESSION_VAR(group_concat_max_len), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(4, SIZE_T_MAX), DEFAULT(1024), BLOCK_SIZE(1)); + VALID_RANGE(4, SIZE_T_MAX), DEFAULT(1024*1024), BLOCK_SIZE(1)); static char *glob_hostname_ptr; static Sys_var_charptr Sys_hostname( @@ -5263,7 +5267,7 @@ static Sys_var_mybool Sys_binlog_annotate_row_events( "Tells the master to annotate RBR events with the statement that " "caused these events", SESSION_VAR(binlog_annotate_row_events), CMD_LINE(OPT_ARG), - DEFAULT(FALSE)); + DEFAULT(TRUE)); #ifdef HAVE_REPLICATION static Sys_var_mybool Sys_replicate_annotate_row_events( @@ -5271,7 +5275,7 @@ static Sys_var_mybool Sys_replicate_annotate_row_events( "Tells the slave to write annotate rows events received from the master " "to its own binary log. Ignored if log_slave_updates is not set", READ_ONLY GLOBAL_VAR(opt_replicate_annotate_row_events), - CMD_LINE(OPT_ARG), DEFAULT(0)); + CMD_LINE(OPT_ARG), DEFAULT(TRUE)); #endif static Sys_var_ulonglong Sys_join_buffer_space_limit( @@ -5468,6 +5472,13 @@ static Sys_var_ulong Sys_log_tc_size( BLOCK_SIZE(my_getpagesize())); #endif +static Sys_var_ulonglong Sys_max_thread_mem( + "max_session_mem_used", "Amount of memory a single user session " + "is allowed to allocate. This limits the value of the " + "session variable MEM_USED", SESSION_VAR(max_mem_used), + CMD_LINE(REQUIRED_ARG), VALID_RANGE(8192, ULONGLONG_MAX), + DEFAULT(LONGLONG_MAX), BLOCK_SIZE(1)); + #ifndef EMBEDDED_LIBRARY static Sys_var_sesvartrack Sys_track_session_sys_vars( diff --git a/sql/sys_vars.ic b/sql/sys_vars.ic index c7f148afd39..780450b484b 100644 --- a/sql/sys_vars.ic +++ b/sql/sys_vars.ic @@ -1347,7 +1347,7 @@ public: if (var->value->result_type() == STRING_RESULT) { - if (!(res=var->value->val_str(&str))) + if (!(res=var->value->val_str_ascii(&str))) return true; else { diff --git a/sql/table.cc b/sql/table.cc index 4688b77ecd7..404c43bef17 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1073,6 +1073,8 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table, &((*field_ptr)->default_value), error_reported); *(dfield_ptr++)= *field_ptr; + if (vcol && (vcol->flags & (VCOL_NON_DETERMINISTIC | VCOL_SESSION_FUNC))) + table->s->non_determinstic_insert= true; break; case VCOL_CHECK_FIELD: vcol= unpack_vcol_info_from_frm(thd, mem_root, table, &expr_str, @@ -2410,8 +2412,9 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, } } } - DBUG_ASSERT((table_check_constraints - share->check_constraints) == - share->table_check_constraints - share->field_check_constraints); + DBUG_ASSERT((uint) (table_check_constraints - share->check_constraints) == + (uint) (share->table_check_constraints - + share->field_check_constraints)); if (options) { @@ -2760,12 +2763,6 @@ bool fix_session_vcol_expr_for_read(THD *thd, Field *field, the virtual column vcol_field. The expression is used to compute the values of this column. - @note - If the virtual column has stored_in_db set and it uses non deterministic - function then table->non_determinstic_insert is set. - This is used in replication to ensure that row based replication is used - for inserts. - @retval TRUE An error occurred, something was wrong with the function @retval @@ -2815,13 +2812,6 @@ static bool fix_and_check_vcol_expr(THD *thd, TABLE *table, } vcol->flags= res.errors; - /* - Mark what kind of default / virtual fields the table has - */ - if (vcol->stored_in_db && - vcol->flags & (VCOL_NON_DETERMINISTIC | VCOL_SESSION_FUNC)) - table->s->non_determinstic_insert= true; - if (vcol->flags & VCOL_SESSION_FUNC) table->s->vcols_need_refixing= true; @@ -3110,7 +3100,8 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share, share->default_expressions +1)* sizeof(Field*)), &check_constraint_ptr, - (uint) ((share->table_check_constraints + 1)* + (uint) ((share->table_check_constraints + + share->field_check_constraints + 1)* sizeof(Virtual_column_info*)), NullS)) goto err; @@ -3212,11 +3203,9 @@ partititon_err: /* Allocate bitmaps */ bitmap_size= share->column_bitmap_size; - bitmap_count= 6; + bitmap_count= 7; if (share->virtual_fields) bitmap_count++; - if (outparam->default_field) - bitmap_count++; if (!(bitmaps= (uchar*) alloc_root(&outparam->mem_root, bitmap_size * bitmap_count))) @@ -3229,7 +3218,7 @@ partititon_err: (my_bitmap_map*) bitmaps, share->fields, FALSE); bitmaps+= bitmap_size; - /* Don't allocate vcol_bitmap or explicit_value if we don't need it */ + /* Don't allocate vcol_bitmap if we don't need it */ if (share->virtual_fields) { if (!(outparam->def_vcol_set= (MY_BITMAP*) @@ -3239,16 +3228,10 @@ partititon_err: (my_bitmap_map*) bitmaps, share->fields, FALSE); bitmaps+= bitmap_size; } - if (outparam->default_field) - { - if (!(outparam->has_value_set= (MY_BITMAP*) - alloc_root(&outparam->mem_root, sizeof(*outparam->has_value_set)))) - goto err; - my_bitmap_init(outparam->has_value_set, - (my_bitmap_map*) bitmaps, share->fields, FALSE); - bitmaps+= bitmap_size; - } + my_bitmap_init(&outparam->has_value_set, + (my_bitmap_map*) bitmaps, share->fields, FALSE); + bitmaps+= bitmap_size; my_bitmap_init(&outparam->tmp_set, (my_bitmap_map*) bitmaps, share->fields, FALSE); bitmaps+= bitmap_size; @@ -4453,7 +4436,7 @@ void TABLE::init(THD *thd, TABLE_LIST *tl) (*f_ptr)->cond_selectivity= 1.0; } - DBUG_ASSERT(key_read == 0); + DBUG_ASSERT(!file->keyread_enabled()); /* mark the record[0] uninitialized */ TRASH_ALLOC(record[0], s->reclength); @@ -4930,7 +4913,7 @@ bool TABLE_LIST::prep_check_option(THD *thd, uint8 check_opt_type) void TABLE_LIST::hide_view_error(THD *thd) { - if (thd->killed || thd->get_internal_handler()) + if ((thd->killed && !thd->is_error())|| thd->get_internal_handler()) return; /* Hide "Unknown column" or "Unknown function" error */ DBUG_ASSERT(thd->is_error()); @@ -5483,7 +5466,8 @@ void TABLE_LIST::set_check_merged() It is not simple to check all, but at least this should be checked: this select is not excluded or the exclusion came from above. */ - DBUG_ASSERT(!derived->first_select()->exclude_from_table_unique_test || + DBUG_ASSERT(derived->is_excluded() || + !derived->first_select()->exclude_from_table_unique_test || derived->outer_select()-> exclude_from_table_unique_test); } @@ -5496,6 +5480,7 @@ void TABLE_LIST::set_check_materialized() if (view) derived= &view->unit; DBUG_ASSERT(derived); + DBUG_ASSERT(!derived->is_excluded()); if (!derived->first_select()->exclude_from_table_unique_test) derived->set_unique_exclude(); else @@ -6085,50 +6070,34 @@ void TABLE::prepare_for_position() } -/* - Mark that only fields from one key is used +MY_BITMAP *TABLE::prepare_for_keyread(uint index, MY_BITMAP *map) +{ + MY_BITMAP *backup= read_set; + DBUG_ENTER("TABLE::prepare_for_keyread"); + if (!no_keyread) + file->ha_start_keyread(index); + if (map != read_set || !(file->index_flags(index, 0, 1) & HA_CLUSTERED_INDEX)) + { + mark_columns_used_by_index(index, map); + column_bitmaps_set(map); + } + DBUG_RETURN(backup); +} - NOTE: - This changes the bitmap to use the tmp bitmap - After this, you can't access any other columns in the table until - bitmaps are reset, for example with TABLE::clear_column_bitmaps() - or TABLE::restore_column_maps_after_mark_index() + +/* + Mark that only fields from one key is used. Useful before keyread. */ -void TABLE::mark_columns_used_by_index(uint index) +void TABLE::mark_columns_used_by_index(uint index, MY_BITMAP *bitmap) { - MY_BITMAP *bitmap= &tmp_set; DBUG_ENTER("TABLE::mark_columns_used_by_index"); - set_keyread(true); bitmap_clear_all(bitmap); mark_columns_used_by_index_no_reset(index, bitmap); - column_bitmaps_set(bitmap, bitmap); DBUG_VOID_RETURN; } - -/* - Add fields used by a specified index to the table's read_set. - - NOTE: - The original state can be restored with - restore_column_maps_after_mark_index(). -*/ - -void TABLE::add_read_columns_used_by_index(uint index) -{ - MY_BITMAP *bitmap= &tmp_set; - DBUG_ENTER("TABLE::add_read_columns_used_by_index"); - - set_keyread(true); - bitmap_copy(bitmap, read_set); - mark_columns_used_by_index_no_reset(index, bitmap); - column_bitmaps_set(bitmap, write_set); - DBUG_VOID_RETURN; -} - - /* Restore to use normal column maps after key read @@ -6140,12 +6109,11 @@ void TABLE::add_read_columns_used_by_index(uint index) when calling mark_columns_used_by_index */ -void TABLE::restore_column_maps_after_mark_index() +void TABLE::restore_column_maps_after_keyread(MY_BITMAP *backup) { DBUG_ENTER("TABLE::restore_column_maps_after_mark_index"); - - set_keyread(false); - default_column_bitmaps(); + file->ha_end_keyread(); + read_set= backup; file->column_bitmaps_signal(); DBUG_VOID_RETURN; } @@ -6155,20 +6123,15 @@ void TABLE::restore_column_maps_after_mark_index() mark columns used by key, but don't reset other fields */ -void TABLE::mark_columns_used_by_index_no_reset(uint index, - MY_BITMAP *bitmap) +void TABLE::mark_columns_used_by_index_no_reset(uint index, MY_BITMAP *bitmap) { KEY_PART_INFO *key_part= key_info[index].key_part; - KEY_PART_INFO *key_part_end= (key_part + - key_info[index].user_defined_key_parts); + KEY_PART_INFO *key_part_end= (key_part + key_info[index].user_defined_key_parts); for (;key_part != key_part_end; key_part++) - { bitmap_set_bit(bitmap, key_part->fieldnr-1); - if (key_part->field->vcol_info && - key_part->field->vcol_info->expr) - key_part->field->vcol_info-> - expr->walk(&Item::register_field_in_bitmap, 1, bitmap); - } + if (file->ha_table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX && + s->primary_key != MAX_KEY && s->primary_key != index) + mark_columns_used_by_index_no_reset(s->primary_key, bitmap); } @@ -6280,7 +6243,7 @@ void TABLE::mark_columns_needed_for_delete() void TABLE::mark_columns_needed_for_update() { - DBUG_ENTER("mark_columns_needed_for_update"); + DBUG_ENTER("TABLE::mark_columns_needed_for_update"); bool need_signal= false; mark_columns_per_binlog_row_image(); @@ -6571,6 +6534,7 @@ bool TABLE::mark_virtual_columns_for_write(bool insert_fl) { Field **vfield_ptr, *tmp_vfield; bool bitmap_updated= false; + DBUG_ENTER("mark_virtual_columns_for_write"); for (vfield_ptr= vfield; *vfield_ptr; vfield_ptr++) { @@ -6609,7 +6573,7 @@ bool TABLE::mark_virtual_columns_for_write(bool insert_fl) } if (bitmap_updated) file->column_bitmaps_signal(); - return bitmap_updated; + DBUG_RETURN(bitmap_updated); } /* @@ -7305,6 +7269,24 @@ bool is_simple_order(ORDER *order) return TRUE; } +class Turn_errors_to_warnings_handler : public Internal_error_handler +{ +public: + Turn_errors_to_warnings_handler() {} + bool handle_condition(THD *thd, + uint sql_errno, + const char* sqlstate, + Sql_condition::enum_warning_level *level, + const char* msg, + Sql_condition ** cond_hdl) + { + *cond_hdl= NULL; + if (*level == Sql_condition::WARN_LEVEL_ERROR) + *level= Sql_condition::WARN_LEVEL_WARN; + return(0); + } +}; + /* @brief Compute values for virtual columns used in query @@ -7320,13 +7302,32 @@ bool is_simple_order(ORDER *order) >0 Error occurred when storing a virtual field value */ -int TABLE::update_virtual_fields(enum_vcol_update_mode update_mode) +int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode) { DBUG_ENTER("TABLE::update_virtual_fields"); + DBUG_PRINT("enter", ("update_mode: %d", update_mode)); Field **vfield_ptr, *vf; + Query_arena backup_arena; + Turn_errors_to_warnings_handler Suppress_errors; + int error; + bool handler_pushed= 0; DBUG_ASSERT(vfield); - in_use->reset_arena_for_cached_items(expr_arena); + if (h->keyread_enabled()) + DBUG_RETURN(0); + + error= 0; + in_use->set_n_backup_active_arena(expr_arena, &backup_arena); + + /* When reading or deleting row, ignore errors from virtual columns */ + if (update_mode == VCOL_UPDATE_FOR_READ || + update_mode == VCOL_UPDATE_FOR_DELETE || + update_mode == VCOL_UPDATE_INDEXED) + { + in_use->push_internal_handler(&Suppress_errors); + handler_pushed= 1; + } + /* Iterate over virtual fields in the table */ for (vfield_ptr= vfield; *vfield_ptr; vfield_ptr++) { @@ -7335,52 +7336,84 @@ int TABLE::update_virtual_fields(enum_vcol_update_mode update_mode) DBUG_ASSERT(vcol_info); DBUG_ASSERT(vcol_info->expr); - bool update; + bool update, swap_values= 0; switch (update_mode) { - case VCOL_UPDATE_FOR_READ_WRITE: - if (triggers) - { - update= true; - break; - } case VCOL_UPDATE_FOR_READ: update= !vcol_info->stored_in_db - && !(key_read && vf->part_of_key.is_set(file->active_index)) && bitmap_is_set(vcol_set, vf->field_index); + swap_values= 1; break; + case VCOL_UPDATE_FOR_DELETE: + /* Fall trough */ case VCOL_UPDATE_FOR_WRITE: - update= triggers || bitmap_is_set(vcol_set, vf->field_index); + update= bitmap_is_set(vcol_set, vf->field_index); break; - case VCOL_UPDATE_INDEXED: + case VCOL_UPDATE_FOR_REPLACE: update= !vcol_info->stored_in_db && (vf->flags & PART_KEY_FLAG) && bitmap_is_set(vcol_set, vf->field_index); + if (update && (vf->flags & BLOB_FLAG)) + { + /* + The row has been read into record[1] and Field_blob::value + contains the value for record[0]. Swap value and read_value + to ensure that the virtual column data for the read row will + be in read_value at the end of this function + */ + ((Field_blob*) vf)->swap_value_and_read_value(); + /* Ensure we call swap_value_and_read_value() after update */ + swap_values= 1; + } + break; + case VCOL_UPDATE_INDEXED: + case VCOL_UPDATE_INDEXED_FOR_UPDATE: + /* Read indexed fields that was not updated in VCOL_UPDATE_FOR_READ */ + update= !vcol_info->stored_in_db && (vf->flags & PART_KEY_FLAG) && + bitmap_is_set(vcol_set, vf->field_index); + swap_values= 1; break; } if (update) { + int field_error __attribute__((unused)) = 0; /* Compute the actual value of the virtual fields */ - vcol_info->expr->save_in_field(vf, 0); - DBUG_PRINT("info", ("field '%s' - updated", vf->field_name)); + if (vcol_info->expr->save_in_field(vf, 0)) + field_error= error= 1; + DBUG_PRINT("info", ("field '%s' - updated error: %d", + vf->field_name, field_error)); + if (swap_values && (vf->flags & BLOB_FLAG)) + { + /* + Remember the read value to allow other update_virtual_field() calls + for the same blob field for the row to be updated. + Field_blob->read_value always contains the virtual column data for + any read row. + */ + ((Field_blob*) vf)->swap_value_and_read_value(); + } } else { DBUG_PRINT("info", ("field '%s' - skipped", vf->field_name)); } } - in_use->reset_arena_for_cached_items(0); - DBUG_RETURN(0); + if (handler_pushed) + in_use->pop_internal_handler(); + in_use->restore_active_arena(expr_arena, &backup_arena); + + /* Return 1 only of we got a fatal error, not a warning */ + DBUG_RETURN(in_use->is_error()); } int TABLE::update_virtual_field(Field *vf) { + Query_arena backup_arena; DBUG_ENTER("TABLE::update_virtual_field"); - - in_use->reset_arena_for_cached_items(expr_arena); + in_use->set_n_backup_active_arena(expr_arena, &backup_arena); bitmap_clear_all(&tmp_set); vf->vcol_info->expr->walk(&Item::update_vcol_processor, 0, &tmp_set); vf->vcol_info->expr->save_in_field(vf, 0); - in_use->reset_arena_for_cached_items(0); + in_use->restore_active_arena(expr_arena, &backup_arena); DBUG_RETURN(0); } @@ -7407,12 +7440,13 @@ int TABLE::update_virtual_field(Field *vf) int TABLE::update_default_fields(bool update_command, bool ignore_errors) { - DBUG_ENTER("TABLE::update_default_fields"); + Query_arena backup_arena; Field **field_ptr; int res= 0; + DBUG_ENTER("TABLE::update_default_fields"); DBUG_ASSERT(default_field); - in_use->reset_arena_for_cached_items(expr_arena); + in_use->set_n_backup_active_arena(expr_arena, &backup_arena); /* Iterate over fields with default functions in the table */ for (field_ptr= default_field; *field_ptr ; field_ptr++) @@ -7440,7 +7474,7 @@ int TABLE::update_default_fields(bool update_command, bool ignore_errors) res= 0; } } - in_use->reset_arena_for_cached_items(0); + in_use->restore_active_arena(expr_arena, &backup_arena); DBUG_RETURN(res); } @@ -7451,8 +7485,7 @@ int TABLE::update_default_fields(bool update_command, bool ignore_errors) void TABLE::reset_default_fields() { DBUG_ENTER("reset_default_fields"); - if (has_value_set) - bitmap_clear_all(has_value_set); + bitmap_clear_all(&has_value_set); DBUG_VOID_RETURN; } @@ -7573,46 +7606,58 @@ bool TABLE::validate_default_values_of_unset_fields(THD *thd) const } -bool TABLE::insert_all_rows_into(THD *thd, TABLE *dest, bool with_cleanup) +bool TABLE::insert_all_rows_into_tmp_table(THD *thd, + TABLE *tmp_table, + TMP_TABLE_PARAM *tmp_table_param, + bool with_cleanup) { int write_err= 0; - DBUG_ENTER("TABLE::insert_all_rows_into"); + DBUG_ENTER("TABLE::insert_all_rows_into_tmp_table"); if (with_cleanup) { - if ((write_err= dest->file->ha_delete_all_rows())) + if ((write_err= tmp_table->file->ha_delete_all_rows())) goto err; } if (file->indexes_are_disabled()) - dest->file->ha_disable_indexes(HA_KEY_SWITCH_ALL); + tmp_table->file->ha_disable_indexes(HA_KEY_SWITCH_ALL); file->ha_index_or_rnd_end(); if (file->ha_rnd_init_with_error(1)) DBUG_RETURN(1); - if (dest->no_rows) - dest->file->extra(HA_EXTRA_NO_ROWS); + if (tmp_table->no_rows) + tmp_table->file->extra(HA_EXTRA_NO_ROWS); else { /* update table->file->stats.records */ file->info(HA_STATUS_VARIABLE); - dest->file->ha_start_bulk_insert(file->stats.records); + tmp_table->file->ha_start_bulk_insert(file->stats.records); } - while (!file->ha_rnd_next(dest->record[1])) + while (!file->ha_rnd_next(tmp_table->record[0])) { - write_err= dest->file->ha_write_tmp_row(dest->record[1]); + write_err= tmp_table->file->ha_write_tmp_row(tmp_table->record[0]); if (write_err) - goto err; + { + bool is_duplicate; + if (tmp_table->file->is_fatal_error(write_err, HA_CHECK_DUP) && + create_internal_tmp_table_from_heap(thd, tmp_table, + tmp_table_param->start_recinfo, + &tmp_table_param->recinfo, + write_err, 1, &is_duplicate)) + DBUG_RETURN(1); + + } if (thd->check_killed()) { thd->send_kill_message(); goto err_killed; } } - if (!dest->no_rows && dest->file->ha_end_bulk_insert()) + if (!tmp_table->no_rows && tmp_table->file->ha_end_bulk_insert()) goto err; DBUG_RETURN(0); diff --git a/sql/table.h b/sql/table.h index 6552a8e13da..f9b6ac4ae22 100644 --- a/sql/table.h +++ b/sql/table.h @@ -2,7 +2,7 @@ #define TABLE_INCLUDED /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. Copyright (c) 2009, 2014, SkySQL Ab. - Copyright (c) 2016, MariaDB Corporation + Copyright (c) 2016, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -53,6 +53,7 @@ class With_element; struct TDC_element; class Virtual_column_info; class Table_triggers_list; +class TMP_TABLE_PARAM; /* Used to identify NESTED_JOIN structures within a join (applicable only to @@ -326,9 +327,11 @@ enum release_type { RELEASE_NORMAL, RELEASE_WAIT_FOR_DROP }; enum enum_vcol_update_mode { VCOL_UPDATE_FOR_READ= 0, - VCOL_UPDATE_FOR_READ_WRITE, VCOL_UPDATE_FOR_WRITE, - VCOL_UPDATE_INDEXED + VCOL_UPDATE_FOR_DELETE, + VCOL_UPDATE_INDEXED, + VCOL_UPDATE_INDEXED_FOR_UPDATE, + VCOL_UPDATE_FOR_REPLACE }; @@ -1101,7 +1104,7 @@ public: /* Set if using virtual fields */ MY_BITMAP *vcol_set, *def_vcol_set; /* On INSERT: fields that the user specified a value for */ - MY_BITMAP *has_value_set; + MY_BITMAP has_value_set; /* The ID of the query that opened and is using this table. Has different @@ -1242,11 +1245,6 @@ public: */ bool keep_row_order; - /** - If set, the optimizer has found that row retrieval should access index - tree only. - */ - bool key_read; bool no_keyread; /** If set, indicate that the table is not replicated by the server. @@ -1308,10 +1306,12 @@ public: void reset_item_list(List *item_list) const; void clear_column_bitmaps(void); void prepare_for_position(void); + MY_BITMAP *prepare_for_keyread(uint index, MY_BITMAP *map); + MY_BITMAP *prepare_for_keyread(uint index) + { return prepare_for_keyread(index, &tmp_set); } + void mark_columns_used_by_index(uint index, MY_BITMAP *map); void mark_columns_used_by_index_no_reset(uint index, MY_BITMAP *map); - void mark_columns_used_by_index(uint index); - void add_read_columns_used_by_index(uint index); - void restore_column_maps_after_mark_index(); + void restore_column_maps_after_keyread(MY_BITMAP *backup); void mark_auto_increment_column(void); void mark_columns_needed_for_update(void); void mark_columns_needed_for_delete(void); @@ -1323,6 +1323,12 @@ public: void mark_columns_used_by_check_constraints(void); void mark_check_constraint_columns_for_read(void); int verify_constraints(bool ignore_failure); + inline void column_bitmaps_set(MY_BITMAP *read_set_arg) + { + read_set= read_set_arg; + if (file) + file->column_bitmaps_signal(); + } inline void column_bitmaps_set(MY_BITMAP *read_set_arg, MY_BITMAP *write_set_arg) { @@ -1385,23 +1391,6 @@ public: tablenr= tablenr_arg; } - void set_keyread(bool flag) - { - DBUG_ASSERT(file); - if (flag && !key_read) - { - key_read= 1; - if (is_created()) - file->extra(HA_EXTRA_KEYREAD); - } - else if (!flag && key_read) - { - key_read= 0; - if (is_created()) - file->extra(HA_EXTRA_NO_KEYREAD); - } - } - /// Return true if table is instantiated, and false otherwise. bool is_created() const { return created; } @@ -1413,7 +1402,7 @@ public: { if (created) return; - if (key_read) + if (file->keyread_enabled()) file->extra(HA_EXTRA_KEYREAD); created= true; } @@ -1435,7 +1424,7 @@ public: uint actual_n_key_parts(KEY *keyinfo); ulong actual_key_flags(KEY *keyinfo); int update_virtual_field(Field *vf); - int update_virtual_fields(enum_vcol_update_mode update_mode); + int update_virtual_fields(handler *h, enum_vcol_update_mode update_mode); int update_default_fields(bool update, bool ignore_errors); void reset_default_fields(); inline ha_rows stat_records() { return used_stat_records; } @@ -1447,7 +1436,10 @@ public: inline Field **field_to_fill(); bool validate_default_values_of_unset_fields(THD *thd) const; - bool insert_all_rows_into(THD *thd, TABLE *dest, bool with_cleanup); + bool insert_all_rows_into_tmp_table(THD *thd, + TABLE *tmp_table, + TMP_TABLE_PARAM *tmp_table_param, + bool with_cleanup); }; @@ -1508,13 +1500,13 @@ typedef struct st_foreign_key_info LEX_CSTRING *fk_option_name(enum_fk_option opt); -#define MY_I_S_MAYBE_NULL 1 -#define MY_I_S_UNSIGNED 2 +#define MY_I_S_MAYBE_NULL 1U +#define MY_I_S_UNSIGNED 2U -#define SKIP_OPEN_TABLE 0 // do not open table -#define OPEN_FRM_ONLY 1 // open FRM file only -#define OPEN_FULL_TABLE 2 // open FRM,MYD, MYI files +#define SKIP_OPEN_TABLE 0U // do not open table +#define OPEN_FRM_ONLY 1U // open FRM file only +#define OPEN_FULL_TABLE 2U // open FRM,MYD, MYI files typedef struct st_field_info { @@ -1578,27 +1570,27 @@ class IS_table_read_plan; Types of derived tables. The ending part is a bitmap of phases that are applicable to a derived table of the type. */ -#define DTYPE_ALGORITHM_UNDEFINED 0 -#define DTYPE_VIEW 1 -#define DTYPE_TABLE 2 -#define DTYPE_MERGE 4 -#define DTYPE_MATERIALIZE 8 -#define DTYPE_MULTITABLE 16 -#define DTYPE_MASK 19 +#define DTYPE_ALGORITHM_UNDEFINED 0U +#define DTYPE_VIEW 1U +#define DTYPE_TABLE 2U +#define DTYPE_MERGE 4U +#define DTYPE_MATERIALIZE 8U +#define DTYPE_MULTITABLE 16U +#define DTYPE_MASK (DTYPE_VIEW|DTYPE_TABLE|DTYPE_MULTITABLE) /* Phases of derived tables/views handling, see sql_derived.cc Values are used as parts of a bitmap attached to derived table types. */ -#define DT_INIT 1 -#define DT_PREPARE 2 -#define DT_OPTIMIZE 4 -#define DT_MERGE 8 -#define DT_MERGE_FOR_INSERT 16 -#define DT_CREATE 32 -#define DT_FILL 64 -#define DT_REINIT 128 -#define DT_PHASES 8 +#define DT_INIT 1U +#define DT_PREPARE 2U +#define DT_OPTIMIZE 4U +#define DT_MERGE 8U +#define DT_MERGE_FOR_INSERT 16U +#define DT_CREATE 32U +#define DT_FILL 64U +#define DT_REINIT 128U +#define DT_PHASES 8U /* Phases that are applicable to all derived tables. */ #define DT_COMMON (DT_INIT + DT_PREPARE + DT_REINIT + DT_OPTIMIZE) /* Phases that are applicable only to materialized derived tables. */ @@ -1618,13 +1610,13 @@ class IS_table_read_plan; representation for backward compatibility. */ -#define VIEW_ALGORITHM_UNDEFINED_FRM 0 -#define VIEW_ALGORITHM_MERGE_FRM 1 -#define VIEW_ALGORITHM_TMPTABLE_FRM 2 +#define VIEW_ALGORITHM_UNDEFINED_FRM 0U +#define VIEW_ALGORITHM_MERGE_FRM 1U +#define VIEW_ALGORITHM_TMPTABLE_FRM 2U -#define JOIN_TYPE_LEFT 1 -#define JOIN_TYPE_RIGHT 2 -#define JOIN_TYPE_OUTER 4 /* Marker that this is an outer join */ +#define JOIN_TYPE_LEFT 1U +#define JOIN_TYPE_RIGHT 2U +#define JOIN_TYPE_OUTER 4U /* Marker that this is an outer join */ #define VIEW_SUID_INVOKER 0 #define VIEW_SUID_DEFINER 1 diff --git a/sql/unireg.cc b/sql/unireg.cc index 959f8341a90..0bb8a4e77c6 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -58,7 +58,7 @@ static bool make_empty_rec(THD *, uchar *, uint, List &, uint, static uchar *extra2_write_len(uchar *pos, size_t len) { if (len <= 255) - *pos++= len; + *pos++= (uchar)len; else { /* diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index 04ccc1a7e45..0332432a199 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -178,7 +178,7 @@ extern wsrep_seqno_t wsrep_locked_seqno; strcmp(wsrep_provider, WSREP_NONE)) #define WSREP(thd) \ - (WSREP_ON && wsrep && (thd && thd->variables.wsrep_on)) + (WSREP_ON && thd->variables.wsrep_on) #define WSREP_CLIENT(thd) \ (WSREP(thd) && thd->wsrep_client_thread) diff --git a/storage/connect/ApacheInterface.java b/storage/connect/ApacheInterface.java index b4c8a4e9885..47b46dc0506 100644 --- a/storage/connect/ApacheInterface.java +++ b/storage/connect/ApacheInterface.java @@ -35,7 +35,10 @@ public class ApacheInterface extends JdbcInterface { ds.setPassword(parms[3]); pool.put(url, ds); } // endif ds - + + // if (parms.length > 4 && parms[4] != null) + // ds.setConnectionProperties(parms[4]); + // Get a connection from the data source conn = ds.getConnection(); diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index 95d88538119..ce6de424421 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -20,25 +20,25 @@ SET(CONNECT_SOURCES ha_connect.cc connect.cc user_connect.cc mycat.cc fmdlex.c osutil.c plugutil.c rcmsg.c rcmsg.h array.cpp blkfil.cpp colblk.cpp csort.cpp -filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.cpp filamzip.cpp +filamap.cpp filamdbf.cpp filamfix.cpp filamgz.cpp filamtxt.cpp filter.cpp json.cpp jsonudf.cpp maputil.cpp myconn.cpp myutil.cpp plgdbutl.cpp reldef.cpp tabcol.cpp tabdos.cpp tabfix.cpp tabfmt.cpp tabjson.cpp table.cpp tabmul.cpp tabmysql.cpp taboccur.cpp tabpivot.cpp tabsys.cpp tabtbl.cpp tabutil.cpp -tabvct.cpp tabvir.cpp tabxcl.cpp valblk.cpp value.cpp xindex.cpp xobject.cpp +tabvir.cpp tabxcl.cpp valblk.cpp value.cpp xindex.cpp xobject.cpp array.h blkfil.h block.h catalog.h checklvl.h colblk.h connect.h csort.h -engmsg.h filamap.h filamdbf.h filamfix.h filamtxt.h filamvct.h filamzip.h +engmsg.h filamap.h filamdbf.h filamfix.h filamgz.h filamtxt.h filter.h global.h ha_connect.h inihandl.h json.h jsonudf.h maputil.h msgid.h mycat.h myconn.h myutil.h os.h osutil.h plgcnx.h plgdbsem.h preparse.h reldef.h resource.h tabcol.h tabdos.h tabfix.h tabfmt.h tabjson.h tabmul.h tabmysql.h -taboccur.h tabpivot.h tabsys.h tabtbl.h tabutil.h tabvct.h tabvir.h tabxcl.h +taboccur.h tabpivot.h tabsys.h tabtbl.h tabutil.h tabvir.h tabxcl.h user_connect.h valblk.h value.h xindex.h xobject.h xtable.h) # # Definitions that are shared for all OSes # add_definitions( -DMARIADB -DFORCE_INIT_OF_VARS -Dconnect_EXPORTS) -add_definitions( -DHUGE_SUPPORT -DZIP_SUPPORT -DPIVOT_SUPPORT ) +add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT -DPIVOT_SUPPORT ) # @@ -89,6 +89,18 @@ ELSE(NOT UNIX) ENDIF(UNIX) +# +# VCT: the VEC format might be not supported in future versions +# + +OPTION(CONNECT_WITH_VCT "Compile CONNECT storage engine with VCT support" ON) + +IF(CONNECT_WITH_VCT) + SET(CONNECT_SOURCES ${CONNECT_SOURCES} filamvct.cpp tabvct.cpp filamvct.h tabvct.h) + add_definitions(-DVCT_SUPPORT) +ENDIF(CONNECT_WITH_VCT) + + # # XML # @@ -236,9 +248,9 @@ ENDIF(CONNECT_WITH_ODBC) # JDBC # IF(APPLE) - OPTION(CONNECT_WITH_JDBC "some comment" OFF) + OPTION(CONNECT_WITH_JDBC "Compile CONNECT storage engine without JDBC support" OFF) ELSE() - OPTION(CONNECT_WITH_JDBC "some comment" ON) + OPTION(CONNECT_WITH_JDBC "Compile CONNECT storage engine with JDBC support" ON) ENDIF() IF(CONNECT_WITH_JDBC) @@ -252,18 +264,33 @@ IF(CONNECT_WITH_JDBC) SET(CONNECT_SOURCES ${CONNECT_SOURCES} jdbconn.cpp tabjdbc.cpp jdbconn.h tabjdbc.h jdbccat.h JdbcInterface.java ApacheInterface.java MariadbInterface.java - MysqlInterface.java OracleInterface.java PostgresqlInterface.java) + MysqlInterface.java OracleInterface.java PostgresqlInterface.java + JavaWrappers.jar) # TODO: Find how to compile and install the java wrapper classes # Find required libraries and include directories SET (JAVA_SOURCES JdbcInterface.java) add_jar(JdbcInterface ${JAVA_SOURCES}) - install_jar(JdbcInterface DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine) + install_jar(JdbcInterface DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/JavaWrappers.jar + DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine) add_definitions(-DJDBC_SUPPORT) ELSE() SET(JDBC_LIBRARY "") ENDIF() ENDIF(CONNECT_WITH_JDBC) +# +# ZIP +# + +OPTION(CONNECT_WITH_ZIP "Compile CONNECT storage engine with ZIP support" ON) + +IF(CONNECT_WITH_ZIP) + SET(CONNECT_SOURCES ${CONNECT_SOURCES} filamzip.cpp tabzip.cpp unzip.c ioapi.c zip.c + filamzip.h tabzip.h ioapi.h unzip.h zip.h) + add_definitions(-DZIP_SUPPORT -DNOCRYPT) +ENDIF(CONNECT_WITH_ZIP) + # # XMAP diff --git a/storage/connect/JavaWrappers.jar b/storage/connect/JavaWrappers.jar new file mode 100644 index 00000000000..8c01c364a3f Binary files /dev/null and b/storage/connect/JavaWrappers.jar differ diff --git a/storage/connect/JdbcInterface.java b/storage/connect/JdbcInterface.java index 34af8c4e013..a1b1360e6ea 100644 --- a/storage/connect/JdbcInterface.java +++ b/storage/connect/JdbcInterface.java @@ -82,6 +82,9 @@ public class JdbcInterface { System.out.println("URL=" + parms[1]); CheckURL(parms[1], null); + + // This is required for drivers using context class loaders + Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); if (parms[2] != null && !parms[2].isEmpty()) { if (DEBUG) @@ -220,6 +223,19 @@ public class JdbcInterface { } // end of SetTimestampParm + public int SetNullParm(int i, int typ) { + int rc = 0; + + try { + pstmt.setNull(i, typ); + } catch (Exception e) { + SetErrmsg(e); + rc = -1; + } // end try/catch + + return rc; + } // end of SetNullParm + public int ExecutePrep() { int n = -3; diff --git a/storage/connect/blkfil.cpp b/storage/connect/blkfil.cpp index 1f5a1a27ae5..50535d20a3d 100644 --- a/storage/connect/blkfil.cpp +++ b/storage/connect/blkfil.cpp @@ -412,7 +412,7 @@ void BLKFILMR2::MakeValueBitmap(void) Void = !Bmp[N]; // There are no good values in the file for (i = 0; i < N; i++) { - Bxp[i] = ~0; + Bxp[i] = ~0U; if (noteq) Bmp[i] = Bxp[i]; @@ -708,7 +708,7 @@ void BLKFILIN2::MakeValueBitmap(void) Void = !Bmp[N]; // There are no good values in the file for (i = 0; i < N; i++) { - Bxp[i] = ~0; + Bxp[i] = ~0U; if (noteq) { Bmp[i] = Bxp[i]; @@ -828,7 +828,7 @@ BLKFILIN2::BLKFILIN2(PGLOBAL g, PTDBDOS tdbp, int op, int opm, PXOB *xp) Bxp[i] |= btp; for (N = i--; i >= 0; i--) - Bxp[i] = ~0; + Bxp[i] = ~0U; break; } // endif Bmp diff --git a/storage/connect/domdoc.cpp b/storage/connect/domdoc.cpp index 64a0a172956..eb9660b439d 100644 --- a/storage/connect/domdoc.cpp +++ b/storage/connect/domdoc.cpp @@ -89,30 +89,43 @@ DOMDOC::DOMDOC(char *nsl, char *nsdf, char *enc, PFBLOCK fp) /******************************************************************/ /* Initialize XML parser and check library compatibility. */ /******************************************************************/ -bool DOMDOC::Initialize(PGLOBAL g) - { - if (TestHr(g, CoInitialize(NULL))) +bool DOMDOC::Initialize(PGLOBAL g, char *entry, bool zipped) +{ + if (zipped && InitZip(g, entry)) + return true; + + if (TestHr(g, CoInitialize(NULL))) return true; if (TestHr(g, Docp.CreateInstance("msxml2.domdocument"))) return true; return MakeNSlist(g); - } // end of Initialize +} // end of Initialize /******************************************************************/ /* Parse the XML file and construct node tree in memory. */ /******************************************************************/ -bool DOMDOC::ParseFile(char *fn) - { - // Load the document +bool DOMDOC::ParseFile(PGLOBAL g, char *fn) +{ + bool b; + Docp->async = false; - if (!(bool)Docp->load((_bstr_t)fn)) + if (zip) { + // Parse an in memory document + char *xdoc = GetMemDoc(g, fn); + + b = (xdoc) ? (bool)Docp->loadXML((_bstr_t)xdoc) : false; + } else + // Load the document + b = (bool)Docp->load((_bstr_t)fn); + + if (!b) return true; return false; - } // end of ParseFile +} // end of ParseFile /******************************************************************/ /* Create or reuse an Xblock for this document. */ @@ -239,6 +252,7 @@ int DOMDOC::DumpDoc(PGLOBAL g, char *ofn) void DOMDOC::CloseDoc(PGLOBAL g, PFBLOCK xp) { CloseXMLFile(g, xp, false); + CloseZip(); } // end of Close /* ----------------------- class DOMNODE ------------------------ */ @@ -616,13 +630,13 @@ PXNODE DOMNODELIST::GetItem(PGLOBAL g, int n, PXNODE np) /* Reset the pointer on the deleted item. */ /******************************************************************/ bool DOMNODELIST::DropItem(PGLOBAL g, int n) - { - if (Listp == NULL || Listp->length <= n) - return true; +{ + if (Listp == NULL || Listp->length < n) + return true; //Listp->item[n] = NULL; La propriété n'a pas de méthode 'set' return false; - } // end of DeleteItem +} // end of DeleteItem /* ----------------------- class DOMATTR ------------------------ */ diff --git a/storage/connect/domdoc.h b/storage/connect/domdoc.h index 2cffec499e2..cfec98a9422 100644 --- a/storage/connect/domdoc.h +++ b/storage/connect/domdoc.h @@ -37,8 +37,8 @@ class DOMDOC : public XMLDOCUMENT { virtual void SetNofree(bool b) {} // Only libxml2 // Methods - virtual bool Initialize(PGLOBAL g); - virtual bool ParseFile(char *fn); + virtual bool Initialize(PGLOBAL g, char *entry, bool zipped); + virtual bool ParseFile(PGLOBAL g, char *fn); virtual bool NewDoc(PGLOBAL g, char *ver); virtual void AddComment(PGLOBAL g, char *com); virtual PXNODE GetRoot(PGLOBAL g); diff --git a/storage/connect/filamap.cpp b/storage/connect/filamap.cpp index c6b4585a839..94c562a9981 100644 --- a/storage/connect/filamap.cpp +++ b/storage/connect/filamap.cpp @@ -87,7 +87,7 @@ int MAPFAM::GetFileLength(PGLOBAL g) { int len; - len = (To_Fb) ? To_Fb->Length : TXTFAM::GetFileLength(g); + len = (To_Fb && To_Fb->Count) ? To_Fb->Length : TXTFAM::GetFileLength(g); if (trace) htrc("Mapped file length=%d\n", len); @@ -319,11 +319,13 @@ int MAPFAM::SkipRecord(PGLOBAL g, bool header) /***********************************************************************/ int MAPFAM::ReadBuffer(PGLOBAL g) { - int len; + int rc, len; // Are we at the end of the memory - if (Mempos >= Top) - return RC_EF; + if (Mempos >= Top) + if ((rc = GetNext(g)) != RC_OK) + return rc; + if (!Placed) { /*******************************************************************/ @@ -341,8 +343,10 @@ int MAPFAM::ReadBuffer(PGLOBAL g) /*******************************************************************/ switch (Tdbp->TestBlock(g)) { case RC_EF: - return RC_EF; - case RC_NF: + if ((rc = GetNext(g)) != RC_OK) + return rc; + + case RC_NF: // Skip this record if ((rc = SkipRecord(g, false)) != RC_OK) return rc; @@ -498,7 +502,7 @@ int MAPFAM::DeleteRecords(PGLOBAL g, int irc) void MAPFAM::CloseTableFile(PGLOBAL g, bool) { PlugCloseFile(g, To_Fb); - To_Fb = NULL; // To get correct file size in Cardinality +//To_Fb = NULL; // To get correct file size in Cardinality if (trace) htrc("MAP Close: closing %s count=%d\n", @@ -569,7 +573,7 @@ int MBKFAM::GetRowID(void) /***********************************************************************/ int MBKFAM::ReadBuffer(PGLOBAL g) { - int len; + int rc, len; /*********************************************************************/ /* Sequential block reading when Placed is not true. */ @@ -577,8 +581,10 @@ int MBKFAM::ReadBuffer(PGLOBAL g) if (Placed) { Placed = false; } else if (Mempos >= Top) { // Are we at the end of the memory - return RC_EF; - } else if (++CurNum < Nrec) { + if ((rc = GetNext(g)) != RC_OK) + return rc; + + } else if (++CurNum < Nrec) { Fpos = Mempos; } else { /*******************************************************************/ @@ -588,7 +594,8 @@ int MBKFAM::ReadBuffer(PGLOBAL g) next: if (++CurBlk >= Block) - return RC_EF; + if ((rc = GetNext(g)) != RC_OK) + return rc; /*******************************************************************/ /* Before reading a new block, check whether block optimization */ @@ -596,8 +603,11 @@ int MBKFAM::ReadBuffer(PGLOBAL g) /*******************************************************************/ switch (Tdbp->TestBlock(g)) { case RC_EF: - return RC_EF; - case RC_NF: + if ((rc = GetNext(g)) != RC_OK) + return rc; + + break; + case RC_NF: goto next; } // endswitch rc @@ -697,14 +707,18 @@ int MPXFAM::InitDelete(PGLOBAL, int fpos, int) /***********************************************************************/ int MPXFAM::ReadBuffer(PGLOBAL g) { + int rc; + /*********************************************************************/ /* Sequential block reading when Placed is not true. */ /*********************************************************************/ if (Placed) { Placed = false; } else if (Mempos >= Top) { // Are we at the end of the memory - return RC_EF; - } else if (++CurNum < Nrec) { + if ((rc = GetNext(g)) != RC_OK) + return rc; + + } else if (++CurNum < Nrec) { Fpos = Mempos; } else { /*******************************************************************/ @@ -714,7 +728,7 @@ int MPXFAM::ReadBuffer(PGLOBAL g) next: if (++CurBlk >= Block) - return RC_EF; + return GetNext(g); /*******************************************************************/ /* Before reading a new block, check whether block optimization */ @@ -722,8 +736,11 @@ int MPXFAM::ReadBuffer(PGLOBAL g) /*******************************************************************/ switch (Tdbp->TestBlock(g)) { case RC_EF: - return RC_EF; - case RC_NF: + if ((rc = GetNext(g)) != RC_OK) + return rc; + + break; + case RC_NF: goto next; } // endswitch rc diff --git a/storage/connect/filamap.h b/storage/connect/filamap.h index b9c8ad965fd..774eb8b91b3 100644 --- a/storage/connect/filamap.h +++ b/storage/connect/filamap.h @@ -41,7 +41,8 @@ class DllExport MAPFAM : public TXTFAM { virtual int SkipRecord(PGLOBAL g, bool header); virtual bool OpenTableFile(PGLOBAL g); virtual bool DeferReading(void) {return false;} - virtual int ReadBuffer(PGLOBAL g); + virtual int GetNext(PGLOBAL g) {return RC_EF;} + virtual int ReadBuffer(PGLOBAL g); virtual int WriteBuffer(PGLOBAL g); virtual int DeleteRecords(PGLOBAL g, int irc); virtual void CloseTableFile(PGLOBAL g, bool abort); diff --git a/storage/connect/filamgz.cpp b/storage/connect/filamgz.cpp new file mode 100644 index 00000000000..07242ea633c --- /dev/null +++ b/storage/connect/filamgz.cpp @@ -0,0 +1,1426 @@ +/************ File AM GZ C++ Program Source Code File (.CPP) ***********/ +/* PROGRAM NAME: FILAMGZ */ +/* ------------- */ +/* Version 1.5 */ +/* */ +/* COPYRIGHT: */ +/* ---------- */ +/* (C) Copyright to the author Olivier BERTRAND 2005-2016 */ +/* */ +/* WHAT THIS PROGRAM DOES: */ +/* ----------------------- */ +/* This program are the ZLIB compressed files classes. */ +/* */ +/***********************************************************************/ + +/***********************************************************************/ +/* Include relevant MariaDB header file. */ +/***********************************************************************/ +#include "my_global.h" +#if defined(__WIN__) +#include +#include +#if defined(__BORLANDC__) +#define __MFC_COMPAT__ // To define min/max as macro +#endif +//#include +#else // !__WIN__ +#if defined(UNIX) +#include +#else // !UNIX +#include +#endif +#include +#endif // !__WIN__ + +/***********************************************************************/ +/* Include application header files: */ +/* global.h is header containing all global declarations. */ +/* plgdbsem.h is header containing the DB application declarations. */ +/* tabdos.h is header containing the TABDOS class declarations. */ +/***********************************************************************/ +#include "global.h" +#include "plgdbsem.h" +//#include "catalog.h" +//#include "reldef.h" +//#include "xobject.h" +//#include "kindex.h" +#include "filamtxt.h" +#include "tabdos.h" +#if defined(UNIX) +#include "osutil.h" +#endif + +/***********************************************************************/ +/* This define prepares ZLIB function declarations. */ +/***********************************************************************/ +//#define ZLIB_DLL + +#include "filamgz.h" + +/***********************************************************************/ +/* DB static variables. */ +/***********************************************************************/ +extern int num_read, num_there, num_eq[]; // Statistics + +/* ------------------------------------------------------------------- */ + +/***********************************************************************/ +/* Implementation of the GZFAM class. */ +/***********************************************************************/ +GZFAM::GZFAM(PGZFAM txfp) : TXTFAM(txfp) + { + Zfile = txfp->Zfile; + Zpos = txfp->Zpos; + } // end of GZFAM copy constructor + +/***********************************************************************/ +/* Zerror: Error function for gz calls. */ +/* gzerror returns the error message for the last error which occurred*/ +/* on the given compressed file. errnum is set to zlib error number. */ +/* If an error occurred in the file system and not in the compression */ +/* library, errnum is set to Z_ERRNO and the application may consult */ +/* errno to get the exact error code. */ +/***********************************************************************/ +int GZFAM::Zerror(PGLOBAL g) + { + int errnum; + + strcpy(g->Message, gzerror(Zfile, &errnum)); + + if (errnum == Z_ERRNO) +#if defined(__WIN__) + sprintf(g->Message, MSG(READ_ERROR), To_File, strerror(NULL)); +#else // !__WIN__ + sprintf(g->Message, MSG(READ_ERROR), To_File, strerror(errno)); +#endif // !__WIN__ + + return (errnum == Z_STREAM_END) ? RC_EF : RC_FX; + } // end of Zerror + +/***********************************************************************/ +/* Reset: reset position values at the beginning of file. */ +/***********************************************************************/ +void GZFAM::Reset(void) + { + TXTFAM::Reset(); +//gzrewind(Zfile); // Useful ????? + Zpos = 0; + } // end of Reset + +/***********************************************************************/ +/* GZ GetFileLength: returns an estimate of what would be the */ +/* uncompressed file size in number of bytes. */ +/***********************************************************************/ +int GZFAM::GetFileLength(PGLOBAL g) + { + int len = TXTFAM::GetFileLength(g); + + if (len > 0) + // Estimate size reduction to a max of 6 + len *= 6; + + return len; + } // end of GetFileLength + +/***********************************************************************/ +/* GZ Access Method opening routine. */ +/***********************************************************************/ +bool GZFAM::OpenTableFile(PGLOBAL g) + { + char opmode[4], filename[_MAX_PATH]; + MODE mode = Tdbp->GetMode(); + + switch (mode) { + case MODE_READ: + strcpy(opmode, "r"); + break; + case MODE_UPDATE: + /*****************************************************************/ + /* Updating GZ files not implemented yet. */ + /*****************************************************************/ + strcpy(g->Message, MSG(UPD_ZIP_NOT_IMP)); + return true; + case MODE_DELETE: + if (!Tdbp->GetNext()) { + // Store the number of deleted lines + DelRows = Cardinality(g); + + // This will erase the entire file + strcpy(opmode, "w"); +// Block = 0; // For ZBKFAM +// Last = Nrec; // For ZBKFAM + Tdbp->ResetSize(); + } else { + sprintf(g->Message, MSG(NO_PART_DEL), "GZ"); + return true; + } // endif filter + + break; + case MODE_INSERT: + strcpy(opmode, "a+"); + break; + default: + sprintf(g->Message, MSG(BAD_OPEN_MODE), mode); + return true; + } // endswitch Mode + + /*********************************************************************/ + /* Open according to logical input/output mode required. */ + /* Use specific zlib functions. */ + /* Treat files as binary. */ + /*********************************************************************/ + strcat(opmode, "b"); + Zfile = gzopen(PlugSetPath(filename, To_File, Tdbp->GetPath()), opmode); + + if (Zfile == NULL) { + sprintf(g->Message, MSG(GZOPEN_ERROR), + opmode, (int)errno, filename); + strcat(strcat(g->Message, ": "), strerror(errno)); + return (mode == MODE_READ && errno == ENOENT) + ? PushWarning(g, Tdbp) : true; + } // endif Zfile + + /*********************************************************************/ + /* Something to be done here. >>>>>>>> NOT DONE <<<<<<<< */ + /*********************************************************************/ +//To_Fb = dbuserp->Openlist; // Keep track of File block + + /*********************************************************************/ + /* Allocate the line buffer. */ + /*********************************************************************/ + return AllocateBuffer(g); + } // end of OpenTableFile + +/***********************************************************************/ +/* Allocate the line buffer. For mode Delete a bigger buffer has to */ +/* be allocated because is it also used to move lines into the file. */ +/***********************************************************************/ +bool GZFAM::AllocateBuffer(PGLOBAL g) + { + MODE mode = Tdbp->GetMode(); + + Buflen = Lrecl + 2; // Lrecl does not include CRLF +//Buflen *= ((Mode == MODE_DELETE) ? DOS_BUFF_LEN : 1); NIY + + if (trace) + htrc("SubAllocating a buffer of %d bytes\n", Buflen); + + To_Buf = (char*)PlugSubAlloc(g, NULL, Buflen); + + if (mode == MODE_INSERT) { + /*******************************************************************/ + /* For Insert buffer must be prepared. */ + /*******************************************************************/ + memset(To_Buf, ' ', Buflen); + To_Buf[Buflen - 2] = '\n'; + To_Buf[Buflen - 1] = '\0'; + } // endif Insert + + return false; + } // end of AllocateBuffer + +/***********************************************************************/ +/* GetRowID: return the RowID of last read record. */ +/***********************************************************************/ +int GZFAM::GetRowID(void) + { + return Rows; + } // end of GetRowID + +/***********************************************************************/ +/* GetPos: return the position of last read record. */ +/***********************************************************************/ +int GZFAM::GetPos(void) + { + return (int)Zpos; + } // end of GetPos + +/***********************************************************************/ +/* GetNextPos: return the position of next record. */ +/***********************************************************************/ +int GZFAM::GetNextPos(void) + { + return gztell(Zfile); + } // end of GetNextPos + +/***********************************************************************/ +/* SetPos: Replace the table at the specified position. */ +/***********************************************************************/ +bool GZFAM::SetPos(PGLOBAL g, int pos __attribute__((unused))) + { + sprintf(g->Message, MSG(NO_SETPOS_YET), "GZ"); + return true; +#if 0 + Fpos = pos; + + if (fseek(Stream, Fpos, SEEK_SET)) { + sprintf(g->Message, MSG(FSETPOS_ERROR), Fpos); + return true; + } // endif + + Placed = true; + return false; +#endif // 0 + } // end of SetPos + +/***********************************************************************/ +/* Record file position in case of UPDATE or DELETE. */ +/***********************************************************************/ +bool GZFAM::RecordPos(PGLOBAL) + { + Zpos = gztell(Zfile); + return false; + } // end of RecordPos + +/***********************************************************************/ +/* Skip one record in file. */ +/***********************************************************************/ +int GZFAM::SkipRecord(PGLOBAL g, bool header) + { + // Skip this record + if (gzeof(Zfile)) + return RC_EF; + else if (gzgets(Zfile, To_Buf, Buflen) == Z_NULL) + return Zerror(g); + + if (header) + RecordPos(g); + + return RC_OK; + } // end of SkipRecord + +/***********************************************************************/ +/* ReadBuffer: Read one line from a compressed text file. */ +/***********************************************************************/ +int GZFAM::ReadBuffer(PGLOBAL g) + { + char *p; + int rc; + + if (!Zfile) + return RC_EF; + + if (!Placed) { + /*******************************************************************/ + /* Record file position in case of UPDATE or DELETE. */ + /*******************************************************************/ + next: + if (RecordPos(g)) + return RC_FX; + + CurBlk = Rows++; // Update RowID + + /*******************************************************************/ + /* Check whether optimization on ROWID */ + /* can be done, as well as for join as for local filtering. */ + /*******************************************************************/ + switch (Tdbp->TestBlock(g)) { + case RC_EF: + return RC_EF; + case RC_NF: + // Skip this record + if ((rc = SkipRecord(g, FALSE)) != RC_OK) + return rc; + + goto next; + } // endswitch rc + + } else + Placed = false; + + if (gzeof(Zfile)) { + rc = RC_EF; + } else if (gzgets(Zfile, To_Buf, Buflen) != Z_NULL) { + p = To_Buf + strlen(To_Buf) - 1; + + if (*p == '\n') + *p = '\0'; // Eliminate ending new-line character + + if (*(--p) == '\r') + *p = '\0'; // Eliminate eventuel carriage return + + strcpy(Tdbp->GetLine(), To_Buf); + IsRead = true; + rc = RC_OK; + num_read++; + } else + rc = Zerror(g); + + if (trace > 1) + htrc(" Read: '%s' rc=%d\n", To_Buf, rc); + + return rc; + } // end of ReadBuffer + +/***********************************************************************/ +/* WriteDB: Data Base write routine for ZDOS access method. */ +/* Update is not possible without using a temporary file (NIY). */ +/***********************************************************************/ +int GZFAM::WriteBuffer(PGLOBAL g) + { + /*********************************************************************/ + /* Prepare the write buffer. */ + /*********************************************************************/ + strcat(strcpy(To_Buf, Tdbp->GetLine()), CrLf); + + /*********************************************************************/ + /* Now start the writing process. */ + /*********************************************************************/ + if (gzputs(Zfile, To_Buf) < 0) + return Zerror(g); + + return RC_OK; + } // end of WriteBuffer + +/***********************************************************************/ +/* Data Base delete line routine for ZDOS access method. (NIY) */ +/***********************************************************************/ +int GZFAM::DeleteRecords(PGLOBAL g, int) + { + strcpy(g->Message, MSG(NO_ZIP_DELETE)); + return RC_FX; + } // end of DeleteRecords + +/***********************************************************************/ +/* Data Base close routine for DOS access method. */ +/***********************************************************************/ +void GZFAM::CloseTableFile(PGLOBAL, bool) + { + int rc = gzclose(Zfile); + + if (trace) + htrc("GZ CloseDB: closing %s rc=%d\n", To_File, rc); + + Zfile = NULL; // So we can know whether table is open +//To_Fb->Count = 0; // Avoid double closing by PlugCloseAll + } // end of CloseTableFile + +/***********************************************************************/ +/* Rewind routine for GZ access method. */ +/***********************************************************************/ +void GZFAM::Rewind(void) + { + gzrewind(Zfile); + } // end of Rewind + +/* ------------------------------------------------------------------- */ + +/***********************************************************************/ +/* Constructors. */ +/***********************************************************************/ +ZBKFAM::ZBKFAM(PDOSDEF tdp) : GZFAM(tdp) + { + Blocked = true; + Block = tdp->GetBlock(); + Last = tdp->GetLast(); + Nrec = tdp->GetElemt(); + CurLine = NULL; + NxtLine = NULL; + Closing = false; + BlkPos = tdp->GetTo_Pos(); + } // end of ZBKFAM standard constructor + +ZBKFAM::ZBKFAM(PZBKFAM txfp) : GZFAM(txfp) + { + CurLine = txfp->CurLine; + NxtLine = txfp->NxtLine; + Closing = txfp->Closing; + } // end of ZBKFAM copy constructor + +/***********************************************************************/ +/* Use BlockTest to reduce the table estimated size. */ +/***********************************************************************/ +int ZBKFAM::MaxBlkSize(PGLOBAL g, int) + { + int rc = RC_OK, savcur = CurBlk; + int size; + + // Roughly estimate the table size as the sum of blocks + // that can contain good rows + for (size = 0, CurBlk = 0; CurBlk < Block; CurBlk++) + if ((rc = Tdbp->TestBlock(g)) == RC_OK) + size += (CurBlk == Block - 1) ? Last : Nrec; + else if (rc == RC_EF) + break; + + CurBlk = savcur; + return size; + } // end of MaxBlkSize + +/***********************************************************************/ +/* ZBK Cardinality: returns table cardinality in number of rows. */ +/* This function can be called with a null argument to test the */ +/* availability of Cardinality implementation (1 yes, 0 no). */ +/***********************************************************************/ +int ZBKFAM::Cardinality(PGLOBAL g) + { + return (g) ? (int)((Block - 1) * Nrec + Last) : 1; + } // end of Cardinality + +/***********************************************************************/ +/* Allocate the line buffer. For mode Delete a bigger buffer has to */ +/* be allocated because is it also used to move lines into the file. */ +/***********************************************************************/ +bool ZBKFAM::AllocateBuffer(PGLOBAL g) + { + Buflen = Nrec * (Lrecl + 2); + CurLine = To_Buf = (char*)PlugSubAlloc(g, NULL, Buflen); + + if (Tdbp->GetMode() == MODE_INSERT) { + // Set values so Block and Last can be recalculated + if (Last == Nrec) { + CurBlk = Block; + Rbuf = Nrec; // To be used by WriteDB + } else { + // The last block must be completed + CurBlk = Block - 1; + Rbuf = Nrec - Last; // To be used by WriteDB + } // endif Last + + } // endif Insert + + return false; + } // end of AllocateBuffer + +/***********************************************************************/ +/* GetRowID: return the RowID of last read record. */ +/***********************************************************************/ +int ZBKFAM::GetRowID(void) + { + return CurNum + Nrec * CurBlk + 1; + } // end of GetRowID + +/***********************************************************************/ +/* GetPos: return the position of last read record. */ +/***********************************************************************/ +int ZBKFAM::GetPos(void) + { + return CurNum + Nrec * CurBlk; // Computed file index + } // end of GetPos + +/***********************************************************************/ +/* Record file position in case of UPDATE or DELETE. */ +/* Not used yet for fixed tables. */ +/***********************************************************************/ +bool ZBKFAM::RecordPos(PGLOBAL /*g*/) + { +//strcpy(g->Message, "RecordPos not implemented for gz blocked tables"); +//return true; + return RC_OK; + } // end of RecordPos + +/***********************************************************************/ +/* Skip one record in file. */ +/***********************************************************************/ +int ZBKFAM::SkipRecord(PGLOBAL /*g*/, bool) + { +//strcpy(g->Message, "SkipRecord not implemented for gz blocked tables"); +//return RC_FX; + return RC_OK; + } // end of SkipRecord + +/***********************************************************************/ +/* ReadBuffer: Read one line from a compressed text file. */ +/***********************************************************************/ +int ZBKFAM::ReadBuffer(PGLOBAL g) + { + int n, skip, rc = RC_OK; + + /*********************************************************************/ + /* Sequential reading when Placed is not true. */ + /*********************************************************************/ + if (++CurNum < Rbuf) { + CurLine = NxtLine; + + // Get the position of the next line in the buffer + while (*NxtLine++ != '\n') ; + + // Set caller line buffer + n = NxtLine - CurLine - Ending; + memcpy(Tdbp->GetLine(), CurLine, n); + Tdbp->GetLine()[n] = '\0'; + return RC_OK; + } else if (Rbuf < Nrec && CurBlk != -1) + return RC_EF; + + /*********************************************************************/ + /* New block. */ + /*********************************************************************/ + CurNum = 0; + skip = 0; + + next: + if (++CurBlk >= Block) + return RC_EF; + + /*********************************************************************/ + /* Before using the new block, check whether block optimization */ + /* can be done, as well as for join as for local filtering. */ + /*********************************************************************/ + switch (Tdbp->TestBlock(g)) { + case RC_EF: + return RC_EF; + case RC_NF: + skip++; + goto next; + } // endswitch rc + + if (skip) + // Skip blocks rejected by block optimization + for (int i = CurBlk - skip; i < CurBlk; i++) { + BlkLen = BlkPos[i + 1] - BlkPos[i]; + + if (gzseek(Zfile, (z_off_t)BlkLen, SEEK_CUR) < 0) + return Zerror(g); + + } // endfor i + + BlkLen = BlkPos[CurBlk + 1] - BlkPos[CurBlk]; + + if (!(n = gzread(Zfile, To_Buf, BlkLen))) { + rc = RC_EF; + } else if (n > 0) { + // Get the position of the current line + CurLine = To_Buf; + + // Now get the position of the next line + for (NxtLine = CurLine; *NxtLine++ != '\n';) ; + + // Set caller line buffer + n = NxtLine - CurLine - Ending; + memcpy(Tdbp->GetLine(), CurLine, n); + Tdbp->GetLine()[n] = '\0'; + Rbuf = (CurBlk == Block - 1) ? Last : Nrec; + IsRead = true; + rc = RC_OK; + num_read++; + } else + rc = Zerror(g); + + return rc; + } // end of ReadBuffer + +/***********************************************************************/ +/* WriteDB: Data Base write routine for ZDOS access method. */ +/* Update is not possible without using a temporary file (NIY). */ +/***********************************************************************/ +int ZBKFAM::WriteBuffer(PGLOBAL g) + { + /*********************************************************************/ + /* Prepare the write buffer. */ + /*********************************************************************/ + if (!Closing) + strcat(strcpy(CurLine, Tdbp->GetLine()), CrLf); + + /*********************************************************************/ + /* In Insert mode, blocs are added sequentialy to the file end. */ + /* Note: Update mode is not handled for gz files. */ + /*********************************************************************/ + if (++CurNum == Rbuf) { + /*******************************************************************/ + /* New block, start the writing process. */ + /*******************************************************************/ + BlkLen = CurLine + strlen(CurLine) - To_Buf; + + if (gzwrite(Zfile, To_Buf, BlkLen) != BlkLen || + gzflush(Zfile, Z_FULL_FLUSH)) { + Closing = true; + return Zerror(g); + } // endif gzwrite + + Rbuf = Nrec; + CurBlk++; + CurNum = 0; + CurLine = To_Buf; + } else + CurLine += strlen(CurLine); + + return RC_OK; + } // end of WriteBuffer + +/***********************************************************************/ +/* Data Base delete line routine for ZBK access method. */ +/* Implemented only for total deletion of the table, which is done */ +/* by opening the file in mode "wb". */ +/***********************************************************************/ +int ZBKFAM::DeleteRecords(PGLOBAL g, int irc) + { + if (irc == RC_EF) { + LPCSTR name = Tdbp->GetName(); + PDOSDEF defp = (PDOSDEF)Tdbp->GetDef(); + + defp->SetBlock(0); + defp->SetLast(Nrec); + + if (!defp->SetIntCatInfo("Blocks", 0) || + !defp->SetIntCatInfo("Last", 0)) { + sprintf(g->Message, MSG(UPDATE_ERROR), "Header"); + return RC_FX; + } else + return RC_OK; + + } else + return irc; + + } // end of DeleteRecords + +/***********************************************************************/ +/* Data Base close routine for ZBK access method. */ +/***********************************************************************/ +void ZBKFAM::CloseTableFile(PGLOBAL g, bool) + { + int rc = RC_OK; + + if (Tdbp->GetMode() == MODE_INSERT) { + LPCSTR name = Tdbp->GetName(); + PDOSDEF defp = (PDOSDEF)Tdbp->GetDef(); + + if (CurNum && !Closing) { + // Some more inserted lines remain to be written + Last = (Nrec - Rbuf) + CurNum; + Block = CurBlk + 1; + Rbuf = CurNum--; + Closing = true; + rc = WriteBuffer(g); + } else if (Rbuf == Nrec) { + Last = Nrec; + Block = CurBlk; + } // endif CurNum + + if (rc != RC_FX) { + defp->SetBlock(Block); + defp->SetLast(Last); + defp->SetIntCatInfo("Blocks", Block); + defp->SetIntCatInfo("Last", Last); + } // endif + + gzclose(Zfile); + } else if (Tdbp->GetMode() == MODE_DELETE) { + rc = DeleteRecords(g, RC_EF); + gzclose(Zfile); + } else + rc = gzclose(Zfile); + + if (trace) + htrc("GZ CloseDB: closing %s rc=%d\n", To_File, rc); + + Zfile = NULL; // So we can know whether table is open +//To_Fb->Count = 0; // Avoid double closing by PlugCloseAll + } // end of CloseTableFile + +/***********************************************************************/ +/* Rewind routine for ZBK access method. */ +/***********************************************************************/ +void ZBKFAM::Rewind(void) + { + gzrewind(Zfile); + CurBlk = -1; + CurNum = Rbuf; + } // end of Rewind + +/* ------------------------------------------------------------------- */ + +/***********************************************************************/ +/* Constructors. */ +/***********************************************************************/ +ZIXFAM::ZIXFAM(PDOSDEF tdp) : ZBKFAM(tdp) + { +//Block = tdp->GetBlock(); +//Last = tdp->GetLast(); + Nrec = (tdp->GetElemt()) ? tdp->GetElemt() : DOS_BUFF_LEN; + Blksize = Nrec * Lrecl; + } // end of ZIXFAM standard constructor + +/***********************************************************************/ +/* ZIX Cardinality: returns table cardinality in number of rows. */ +/* This function can be called with a null argument to test the */ +/* availability of Cardinality implementation (1 yes, 0 no). */ +/***********************************************************************/ +int ZIXFAM::Cardinality(PGLOBAL g) + { + if (Last) + return (g) ? (int)((Block - 1) * Nrec + Last) : 1; + else // Last and Block not defined, cannot do it yet + return 0; + + } // end of Cardinality + +/***********************************************************************/ +/* Allocate the line buffer. For mode Delete a bigger buffer has to */ +/* be allocated because is it also used to move lines into the file. */ +/***********************************************************************/ +bool ZIXFAM::AllocateBuffer(PGLOBAL g) + { + Buflen = Blksize; + To_Buf = (char*)PlugSubAlloc(g, NULL, Buflen); + + if (Tdbp->GetMode() == MODE_INSERT) { + /*******************************************************************/ + /* For Insert the buffer must be prepared. */ + /*******************************************************************/ + memset(To_Buf, ' ', Buflen); + + if (Tdbp->GetFtype() < 2) + // if not binary, the file is physically a text file + for (int len = Lrecl; len <= Buflen; len += Lrecl) { +#if defined(__WIN__) + To_Buf[len - 2] = '\r'; +#endif // __WIN__ + To_Buf[len - 1] = '\n'; + } // endfor len + + // Set values so Block and Last can be recalculated + if (Last == Nrec) { + CurBlk = Block; + Rbuf = Nrec; // To be used by WriteDB + } else { + // The last block must be completed + CurBlk = Block - 1; + Rbuf = Nrec - Last; // To be used by WriteDB + } // endif Last + + } // endif Insert + + return false; + } // end of AllocateBuffer + +/***********************************************************************/ +/* ReadBuffer: Read one line from a compressed text file. */ +/***********************************************************************/ +int ZIXFAM::ReadBuffer(PGLOBAL g) + { + int n, rc = RC_OK; + + /*********************************************************************/ + /* Sequential reading when Placed is not true. */ + /*********************************************************************/ + if (++CurNum < Rbuf) { + Tdbp->IncLine(Lrecl); // Used by DOSCOL functions + return RC_OK; + } else if (Rbuf < Nrec && CurBlk != -1) + return RC_EF; + + /*********************************************************************/ + /* New block. */ + /*********************************************************************/ + CurNum = 0; + Tdbp->SetLine(To_Buf); + + int skip = 0; + + next: + if (++CurBlk >= Block) + return RC_EF; + + /*********************************************************************/ + /* Before using the new block, check whether block optimization */ + /* can be done, as well as for join as for local filtering. */ + /*********************************************************************/ + switch (Tdbp->TestBlock(g)) { + case RC_EF: + return RC_EF; + case RC_NF: + skip++; + goto next; + } // endswitch rc + + if (skip) + // Skip blocks rejected by block optimization + for (int i = 0; i < skip; i++) { + if (gzseek(Zfile, (z_off_t)Buflen, SEEK_CUR) < 0) + return Zerror(g); + + } // endfor i + + if (!(n = gzread(Zfile, To_Buf, Buflen))) { + rc = RC_EF; + } else if (n > 0) { + Rbuf = n / Lrecl; + IsRead = true; + rc = RC_OK; + num_read++; + } else + rc = Zerror(g); + + return rc; + } // end of ReadBuffer + +/***********************************************************************/ +/* WriteDB: Data Base write routine for ZDOS access method. */ +/* Update is not possible without using a temporary file (NIY). */ +/***********************************************************************/ +int ZIXFAM::WriteBuffer(PGLOBAL g) + { + /*********************************************************************/ + /* In Insert mode, blocs are added sequentialy to the file end. */ + /* Note: Update mode is not handled for gz files. */ + /*********************************************************************/ + if (++CurNum == Rbuf) { + /*******************************************************************/ + /* New block, start the writing process. */ + /*******************************************************************/ + BlkLen = Rbuf * Lrecl; + + if (gzwrite(Zfile, To_Buf, BlkLen) != BlkLen || + gzflush(Zfile, Z_FULL_FLUSH)) { + Closing = true; + return Zerror(g); + } // endif gzwrite + + Rbuf = Nrec; + CurBlk++; + CurNum = 0; + Tdbp->SetLine(To_Buf); + } else + Tdbp->IncLine(Lrecl); // Used by FIXCOL functions + + return RC_OK; + } // end of WriteBuffer + +/* --------------------------- Class ZLBFAM -------------------------- */ + +/***********************************************************************/ +/* Constructors. */ +/***********************************************************************/ +ZLBFAM::ZLBFAM(PDOSDEF tdp) : BLKFAM(tdp) + { + Zstream = NULL; + Zbuffer = NULL; + Zlenp = NULL; + Optimized = tdp->IsOptimized(); + } // end of ZLBFAM standard constructor + +ZLBFAM::ZLBFAM(PZLBFAM txfp) : BLKFAM(txfp) + { + Zstream = txfp->Zstream; + Zbuffer = txfp->Zbuffer; + Zlenp = txfp->Zlenp; + Optimized = txfp->Optimized; + } // end of ZLBFAM (dummy?) copy constructor + +/***********************************************************************/ +/* ZLB GetFileLength: returns an estimate of what would be the */ +/* uncompressed file size in number of bytes. */ +/***********************************************************************/ +int ZLBFAM::GetFileLength(PGLOBAL g) + { + int len = (Optimized) ? BlkPos[Block] : BLKFAM::GetFileLength(g); + + if (len > 0) + // Estimate size reduction to a max of 5 + len *= 5; + + return len; + } // end of GetFileLength + +/***********************************************************************/ +/* Allocate the line buffer. For mode Delete a bigger buffer has to */ +/* be allocated because is it also used to move lines into the file. */ +/***********************************************************************/ +bool ZLBFAM::AllocateBuffer(PGLOBAL g) + { + char *msg; + int n, zrc; + +#if 0 + if (!Optimized && Tdbp->NeedIndexing(g)) { + strcpy(g->Message, MSG(NOP_ZLIB_INDEX)); + return TRUE; + } // endif indexing +#endif // 0 + +#if defined(NOLIB) + if (!zlib && LoadZlib()) { + sprintf(g->Message, MSG(DLL_LOAD_ERROR), GetLastError(), "zlib.dll"); + return TRUE; + } // endif zlib +#endif + + BLKFAM::AllocateBuffer(g); +//Buflen = Nrec * (Lrecl + 2); +//Rbuf = Nrec; + + // Allocate the compressed buffer + n = Buflen + 16; // ????????????????????????????????? + Zlenp = (int*)PlugSubAlloc(g, NULL, n); + Zbuffer = (Byte*)(Zlenp + 1); + + // Allocate and initialize the Z stream + Zstream = (z_streamp)PlugSubAlloc(g, NULL, sizeof(z_stream)); + Zstream->zalloc = (alloc_func)0; + Zstream->zfree = (free_func)0; + Zstream->opaque = (voidpf)0; + Zstream->next_in = NULL; + Zstream->avail_in = 0; + + if (Tdbp->GetMode() == MODE_READ) { + msg = "inflateInit"; + zrc = inflateInit(Zstream); + } else { + msg = "deflateInit"; + zrc = deflateInit(Zstream, Z_DEFAULT_COMPRESSION); + } // endif Mode + + if (zrc != Z_OK) { + if (Zstream->msg) + sprintf(g->Message, "%s error: %s", msg, Zstream->msg); + else + sprintf(g->Message, "%s error: %d", msg, zrc); + + return TRUE; + } // endif zrc + + if (Tdbp->GetMode() == MODE_INSERT) { + // Write the file header block + if (Last == Nrec) { + CurBlk = Block; + CurNum = 0; + + if (!GetFileLength(g)) { + // Write the zlib header as an extra block + strcpy(To_Buf, "PlugDB"); + BlkLen = strlen("PlugDB") + 1; + + if (WriteCompressedBuffer(g)) + return TRUE; + + } // endif void file + + } else { + // In mode insert, if Last != Nrec, last block must be updated + CurBlk = Block - 1; + CurNum = Last; + + strcpy(g->Message, MSG(NO_PAR_BLK_INS)); + return TRUE; + } // endif Last + + } else { // MODE_READ + // First thing to do is to read the header block + void *rdbuf; + + if (Optimized) { + BlkLen = BlkPos[0]; + rdbuf = Zlenp; + } else { + // Get the stored length from the file itself + if (fread(Zlenp, sizeof(int), 1, Stream) != 1) + return FALSE; // Empty file + + BlkLen = *Zlenp; + rdbuf = Zbuffer; + } // endif Optimized + + switch (ReadCompressedBuffer(g, rdbuf)) { + case RC_EF: + return FALSE; + case RC_FX: +#if defined(UNIX) + sprintf(g->Message, MSG(READ_ERROR), To_File, strerror(errno)); +#else + sprintf(g->Message, MSG(READ_ERROR), To_File, _strerror(NULL)); +#endif + case RC_NF: + return TRUE; + } // endswitch + + // Some old tables can have PlugDB in their header + if (strcmp(To_Buf, "PlugDB")) { + sprintf(g->Message, MSG(BAD_HEADER), Tdbp->GetFile(g)); + return TRUE; + } // endif strcmp + + } // endif Mode + + return FALSE; + } // end of AllocateBuffer + +/***********************************************************************/ +/* GetPos: return the position of last read record. */ +/***********************************************************************/ +int ZLBFAM::GetPos(void) + { + return (Optimized) ? (CurNum + Nrec * CurBlk) : Fpos; + } // end of GetPos + +/***********************************************************************/ +/* GetNextPos: should not be called for this class. */ +/***********************************************************************/ +int ZLBFAM::GetNextPos(void) + { + if (Optimized) { + assert(FALSE); + return 0; + } else + return ftell(Stream); + + } // end of GetNextPos + +/***********************************************************************/ +/* SetPos: Replace the table at the specified position. */ +/***********************************************************************/ +bool ZLBFAM::SetPos(PGLOBAL g, int pos __attribute__((unused))) + { + sprintf(g->Message, MSG(NO_SETPOS_YET), "GZ"); + return true; +#if 0 // All this must be checked + if (pos < 0) { + strcpy(g->Message, MSG(INV_REC_POS)); + return true; + } // endif recpos + + CurBlk = pos / Nrec; + CurNum = pos % Nrec; +#if defined(_DEBUG) + num_eq[(CurBlk == OldBlk) ? 1 : 0]++; +#endif + + // Indicate the table position was externally set + Placed = true; + return false; +#endif // 0 + } // end of SetPos + +/***********************************************************************/ +/* ReadBuffer: Read one line for a text file. */ +/***********************************************************************/ +int ZLBFAM::ReadBuffer(PGLOBAL g) + { + int n; + void *rdbuf; + + /*********************************************************************/ + /* Sequential reading when Placed is not true. */ + /*********************************************************************/ + if (Placed) { + Placed = FALSE; + } else if (++CurNum < Rbuf) { + CurLine = NxtLine; + + // Get the position of the next line in the buffer + if (Tdbp->GetFtype() == RECFM_VAR) + while (*NxtLine++ != '\n') ; + else + NxtLine += Lrecl; + + // Set caller line buffer + n = NxtLine - CurLine - ((Tdbp->GetFtype() == RECFM_BIN) ? 0 : Ending); + memcpy(Tdbp->GetLine(), CurLine, n); + Tdbp->GetLine()[n] = '\0'; + return RC_OK; + } else if (Rbuf < Nrec && CurBlk != -1) { + CurNum--; // To have a correct Last value when optimizing + return RC_EF; + } else { + /*******************************************************************/ + /* New block. */ + /*******************************************************************/ + CurNum = 0; + + next: + if (++CurBlk >= Block) + return RC_EF; + + /*******************************************************************/ + /* Before reading a new block, check whether block optimization */ + /* can be done, as well as for join as for local filtering. */ + /*******************************************************************/ + if (Optimized) switch (Tdbp->TestBlock(g)) { + case RC_EF: + return RC_EF; + case RC_NF: + goto next; + } // endswitch rc + + } // endif's + + if (OldBlk == CurBlk) + goto ok; // Block is already there + + if (Optimized) { + // Store the position of next block + Fpos = BlkPos[CurBlk]; + + // fseek is required only in non sequential reading + if (CurBlk != OldBlk + 1) + if (fseek(Stream, Fpos, SEEK_SET)) { + sprintf(g->Message, MSG(FSETPOS_ERROR), Fpos); + return RC_FX; + } // endif fseek + + // Calculate the length of block to read + BlkLen = BlkPos[CurBlk + 1] - Fpos; + rdbuf = Zlenp; + } else { // !Optimized + if (CurBlk != OldBlk + 1) { + strcpy(g->Message, MSG(INV_RAND_ACC)); + return RC_FX; + } else + Fpos = ftell(Stream); // Used when optimizing + + // Get the stored length from the file itself + if (fread(Zlenp, sizeof(int), 1, Stream) != 1) { + if (feof(Stream)) + return RC_EF; + + goto err; + } // endif fread + + BlkLen = *Zlenp; + rdbuf = Zbuffer; + } // endif Optimized + + // Read the next block + switch (ReadCompressedBuffer(g, rdbuf)) { + case RC_FX: goto err; + case RC_NF: return RC_FX; + case RC_EF: return RC_EF; + default: Rbuf = (CurBlk == Block - 1) ? Last : Nrec; + } // endswitch ReadCompressedBuffer + + ok: + if (Tdbp->GetFtype() == RECFM_VAR) { + int i; + + // Get the position of the current line + for (i = 0, CurLine = To_Buf; i < CurNum; i++) + while (*CurLine++ != '\n') ; // What about Unix ??? + + // Now get the position of the next line + for (NxtLine = CurLine; *NxtLine++ != '\n';) ; + + // Set caller line buffer + n = NxtLine - CurLine - Ending; + } else { + CurLine = To_Buf + CurNum * Lrecl; + NxtLine = CurLine + Lrecl; + n = Lrecl - ((Tdbp->GetFtype() == RECFM_BIN) ? 0 : Ending); + } // endif Ftype + + memcpy(Tdbp->GetLine(), CurLine, n); + Tdbp->GetLine()[n] = '\0'; + + OldBlk = CurBlk; // Last block actually read + IsRead = TRUE; // Is read indeed + return RC_OK; + + err: +#if defined(UNIX) + sprintf(g->Message, MSG(READ_ERROR), To_File, strerror(errno)); +#else + sprintf(g->Message, MSG(READ_ERROR), To_File, _strerror(NULL)); +#endif + return RC_FX; + } // end of ReadBuffer + +/***********************************************************************/ +/* Read and decompress a block from the stream. */ +/***********************************************************************/ +int ZLBFAM::ReadCompressedBuffer(PGLOBAL g, void *rdbuf) + { + if (fread(rdbuf, 1, (size_t)BlkLen, Stream) == (unsigned)BlkLen) { + int zrc; + + num_read++; + + if (Optimized && BlkLen != signed(*Zlenp + sizeof(int))) { + sprintf(g->Message, MSG(BAD_BLK_SIZE), CurBlk + 1); + return RC_NF; + } // endif BlkLen + + // HERE WE MUST INFLATE THE BLOCK + Zstream->next_in = Zbuffer; + Zstream->avail_in = (uInt)(*Zlenp); + Zstream->next_out = (Byte*)To_Buf; + Zstream->avail_out = Buflen; + zrc = inflate(Zstream, Z_SYNC_FLUSH); + + if (zrc != Z_OK) { + if (Zstream->msg) + sprintf(g->Message, MSG(FUNC_ERR_S), "inflate", Zstream->msg); + else + sprintf(g->Message, MSG(FUNCTION_ERROR), "inflate", (int)zrc); + + return RC_NF; + } // endif zrc + + } else if (feof(Stream)) { + return RC_EF; + } else + return RC_FX; + + return RC_OK; + } // end of ReadCompressedBuffer + +/***********************************************************************/ +/* WriteBuffer: File write routine for DOS access method. */ +/* Update is directly written back into the file, */ +/* with this (fast) method, record size cannot change. */ +/***********************************************************************/ +int ZLBFAM::WriteBuffer(PGLOBAL g) + { + assert (Tdbp->GetMode() == MODE_INSERT); + + /*********************************************************************/ + /* Prepare the write buffer. */ + /*********************************************************************/ + if (!Closing) { + if (Tdbp->GetFtype() == RECFM_BIN) + memcpy(CurLine, Tdbp->GetLine(), Lrecl); + else + strcat(strcpy(CurLine, Tdbp->GetLine()), CrLf); + +#if defined(_DEBUG) + if (Tdbp->GetFtype() == RECFM_FIX && + (signed)strlen(CurLine) != Lrecl + (signed)strlen(CrLf)) { + strcpy(g->Message, MSG(BAD_LINE_LEN)); + Closing = TRUE; + return RC_FX; + } // endif Lrecl +#endif // _DEBUG + } // endif Closing + + /*********************************************************************/ + /* In Insert mode, blocs are added sequentialy to the file end. */ + /*********************************************************************/ + if (++CurNum != Rbuf) { + if (Tdbp->GetFtype() == RECFM_VAR) + CurLine += strlen(CurLine); + else + CurLine += Lrecl; + + return RC_OK; // We write only full blocks + } // endif CurNum + + // HERE WE MUST DEFLATE THE BLOCK + if (Tdbp->GetFtype() == RECFM_VAR) + NxtLine = CurLine + strlen(CurLine); + else + NxtLine = CurLine + Lrecl; + + BlkLen = NxtLine - To_Buf; + + if (WriteCompressedBuffer(g)) { + Closing = TRUE; // To tell CloseDB about a Write error + return RC_FX; + } // endif WriteCompressedBuffer + + CurBlk++; + CurNum = 0; + CurLine = To_Buf; + return RC_OK; + } // end of WriteBuffer + +/***********************************************************************/ +/* Compress the buffer and write the deflated output to stream. */ +/***********************************************************************/ +bool ZLBFAM::WriteCompressedBuffer(PGLOBAL g) + { + int zrc; + + Zstream->next_in = (Byte*)To_Buf; + Zstream->avail_in = (uInt)BlkLen; + Zstream->next_out = Zbuffer; + Zstream->avail_out = Buflen + 16; + Zstream->total_out = 0; + zrc = deflate(Zstream, Z_FULL_FLUSH); + + if (zrc != Z_OK) { + if (Zstream->msg) + sprintf(g->Message, MSG(FUNC_ERR_S), "deflate", Zstream->msg); + else + sprintf(g->Message, MSG(FUNCTION_ERROR), "deflate", (int)zrc); + + return TRUE; + } else + *Zlenp = Zstream->total_out; + + // Now start the writing process. + BlkLen = *Zlenp + sizeof(int); + + if (fwrite(Zlenp, 1, BlkLen, Stream) != (size_t)BlkLen) { + sprintf(g->Message, MSG(FWRITE_ERROR), strerror(errno)); + return TRUE; + } // endif size + + return FALSE; + } // end of WriteCompressedBuffer + +/***********************************************************************/ +/* Table file close routine for DOS access method. */ +/***********************************************************************/ +void ZLBFAM::CloseTableFile(PGLOBAL g, bool) + { + int rc = RC_OK; + + if (Tdbp->GetMode() == MODE_INSERT) { + LPCSTR name = Tdbp->GetName(); + PDOSDEF defp = (PDOSDEF)Tdbp->GetDef(); + + // Closing is True if last Write was in error + if (CurNum && !Closing) { + // Some more inserted lines remain to be written + Last = (Nrec - Rbuf) + CurNum; + Block = CurBlk + 1; + Rbuf = CurNum--; + Closing = TRUE; + rc = WriteBuffer(g); + } else if (Rbuf == Nrec) { + Last = Nrec; + Block = CurBlk; + } // endif CurNum + + if (rc != RC_FX) { + defp->SetBlock(Block); + defp->SetLast(Last); + defp->SetIntCatInfo("Blocks", Block); + defp->SetIntCatInfo("Last", Last); + } // endif + + fclose(Stream); + } else + rc = fclose(Stream); + + if (trace) + htrc("ZLB CloseTableFile: closing %s mode=%d rc=%d\n", + To_File, Tdbp->GetMode(), rc); + + Stream = NULL; // So we can know whether table is open + To_Fb->Count = 0; // Avoid double closing by PlugCloseAll + + if (Tdbp->GetMode() == MODE_READ) + rc = inflateEnd(Zstream); + else + rc = deflateEnd(Zstream); + + } // end of CloseTableFile + +/***********************************************************************/ +/* Rewind routine for ZLIB access method. */ +/***********************************************************************/ +void ZLBFAM::Rewind(void) + { + // We must be positioned after the header block + if (CurBlk >= 0) { // Nothing to do if no block read yet + if (!Optimized) { // If optimized, fseek will be done in ReadBuffer + size_t st; + + rewind(Stream); + + if (!(st = fread(Zlenp, sizeof(int), 1, Stream)) && trace) + htrc("fread error %d in Rewind", errno); + + fseek(Stream, *Zlenp + sizeof(int), SEEK_SET); + OldBlk = -1; + } // endif Optimized + + CurBlk = -1; + CurNum = Rbuf; + } // endif CurBlk + +//OldBlk = -1; +//Rbuf = 0; commented out in case we reuse last read block + } // end of Rewind + +/* ------------------------ End of GzFam ---------------------------- */ diff --git a/storage/connect/filamgz.h b/storage/connect/filamgz.h new file mode 100644 index 00000000000..d667fdddcc2 --- /dev/null +++ b/storage/connect/filamgz.h @@ -0,0 +1,170 @@ +/*************** FilAmGz H Declares Source Code File (.H) **************/ +/* Name: FILAMGZ.H Version 1.3 */ +/* */ +/* (C) Copyright to the author Olivier BERTRAND 2005-2016 */ +/* */ +/* This file contains the GZIP access method classes declares. */ +/***********************************************************************/ +#ifndef __FILAMGZ_H +#define __FILAMGZ_H + +#include "zlib.h" + +typedef class GZFAM *PGZFAM; +typedef class ZBKFAM *PZBKFAM; +typedef class ZIXFAM *PZIXFAM; +typedef class ZLBFAM *PZLBFAM; + +/***********************************************************************/ +/* This is the access method class declaration for not optimized */ +/* variable record length files compressed using the gzip library */ +/* functions. File is accessed record by record (row). */ +/***********************************************************************/ +class DllExport GZFAM : public TXTFAM { +// friend class DOSCOL; + public: + // Constructor + GZFAM(PDOSDEF tdp) : TXTFAM(tdp) {Zfile = NULL; Zpos = 0;} + GZFAM(PGZFAM txfp); + + // Implementation + virtual AMT GetAmType(void) {return TYPE_AM_GZ;} + virtual int GetPos(void); + virtual int GetNextPos(void); + virtual PTXF Duplicate(PGLOBAL g) + {return (PTXF)new(g) GZFAM(this);} + + // Methods + virtual void Reset(void); + virtual int GetFileLength(PGLOBAL g); + virtual int Cardinality(PGLOBAL g) {return (g) ? -1 : 0;} + virtual int MaxBlkSize(PGLOBAL g, int s) {return s;} + virtual bool AllocateBuffer(PGLOBAL g); + virtual int GetRowID(void); + virtual bool RecordPos(PGLOBAL g); + virtual bool SetPos(PGLOBAL g, int recpos); + virtual int SkipRecord(PGLOBAL g, bool header); + virtual bool OpenTableFile(PGLOBAL g); + virtual int ReadBuffer(PGLOBAL g); + virtual int WriteBuffer(PGLOBAL g); + virtual int DeleteRecords(PGLOBAL g, int irc); + virtual void CloseTableFile(PGLOBAL g, bool abort); + virtual void Rewind(void); + + protected: + int Zerror(PGLOBAL g); // GZ error function + + // Members + gzFile Zfile; // Points to GZ file structure + z_off_t Zpos; // Uncompressed file position + }; // end of class GZFAM + +/***********************************************************************/ +/* This is the access method class declaration for optimized variable */ +/* record length files compressed using the gzip library functions. */ +/* The File is accessed by block (requires an opt file). */ +/***********************************************************************/ +class DllExport ZBKFAM : public GZFAM { + public: + // Constructor + ZBKFAM(PDOSDEF tdp); + ZBKFAM(PZBKFAM txfp); + + // Implementation + virtual int GetPos(void); + virtual int GetNextPos(void) {return 0;} + virtual PTXF Duplicate(PGLOBAL g) + {return (PTXF)new(g) ZBKFAM(this);} + + // Methods + virtual int Cardinality(PGLOBAL g); + virtual int MaxBlkSize(PGLOBAL g, int s); + virtual bool AllocateBuffer(PGLOBAL g); + virtual int GetRowID(void); + virtual bool RecordPos(PGLOBAL g); + virtual int SkipRecord(PGLOBAL g, bool header); + virtual int ReadBuffer(PGLOBAL g); + virtual int WriteBuffer(PGLOBAL g); + virtual int DeleteRecords(PGLOBAL g, int irc); + virtual void CloseTableFile(PGLOBAL g, bool abort); + virtual void Rewind(void); + + protected: + // Members + char *CurLine; // Position of current line in buffer + char *NxtLine; // Position of Next line in buffer + bool Closing; // True when closing on Insert + }; // end of class ZBKFAM + +/***********************************************************************/ +/* This is the access method class declaration for fixed record */ +/* length files compressed using the gzip library functions. */ +/* The file is always accessed by block. */ +/***********************************************************************/ +class DllExport ZIXFAM : public ZBKFAM { + public: + // Constructor + ZIXFAM(PDOSDEF tdp); + ZIXFAM(PZIXFAM txfp) : ZBKFAM(txfp) {} + + // Implementation + virtual int GetNextPos(void) {return 0;} + virtual PTXF Duplicate(PGLOBAL g) + {return (PTXF)new(g) ZIXFAM(this);} + + // Methods + virtual int Cardinality(PGLOBAL g); + virtual bool AllocateBuffer(PGLOBAL g); + virtual int ReadBuffer(PGLOBAL g); + virtual int WriteBuffer(PGLOBAL g); + + protected: + // No additional Members + }; // end of class ZIXFAM + +/***********************************************************************/ +/* This is the DOS/UNIX Access Method class declaration for PlugDB */ +/* fixed/variable files compressed using the zlib library functions. */ +/* Physically these are written and read using the same technique */ +/* than blocked variable files, only the contain of each block is */ +/* compressed using the deflate zlib function. The purpose of this */ +/* specific format is to have a fast mechanism for direct access of */ +/* records so blocked optimization is fast and direct access (joins) */ +/* is allowed. Note that the block length is written ahead of each */ +/* block to enable reading when optimization file is not available. */ +/***********************************************************************/ +class DllExport ZLBFAM : public BLKFAM { + public: + // Constructor + ZLBFAM(PDOSDEF tdp); + ZLBFAM(PZLBFAM txfp); + + // Implementation + virtual AMT GetAmType(void) {return TYPE_AM_ZLIB;} + virtual int GetPos(void); + virtual int GetNextPos(void); + virtual PTXF Duplicate(PGLOBAL g) + {return (PTXF)new(g) ZLBFAM(this);} + inline void SetOptimized(bool b) {Optimized = b;} + + // Methods + virtual int GetFileLength(PGLOBAL g); + virtual bool SetPos(PGLOBAL g, int recpos); + virtual bool AllocateBuffer(PGLOBAL g); + virtual int ReadBuffer(PGLOBAL g); + virtual int WriteBuffer(PGLOBAL g); + virtual void CloseTableFile(PGLOBAL g, bool abort); + virtual void Rewind(void); + + protected: + bool WriteCompressedBuffer(PGLOBAL g); + int ReadCompressedBuffer(PGLOBAL g, void *rdbuf); + + // Members + z_streamp Zstream; // Compression/decompression stream + Byte *Zbuffer; // Compressed block buffer + int *Zlenp; // Pointer to block length + bool Optimized; // true when opt file is available + }; // end of class ZLBFAM + +#endif // __FILAMGZ_H diff --git a/storage/connect/filamzip.cpp b/storage/connect/filamzip.cpp index d9834e56dcd..6aca4631f32 100644 --- a/storage/connect/filamzip.cpp +++ b/storage/connect/filamzip.cpp @@ -1,35 +1,29 @@ /*********** File AM Zip C++ Program Source Code File (.CPP) ***********/ /* PROGRAM NAME: FILAMZIP */ /* ------------- */ -/* Version 1.5 */ +/* Version 1.0 */ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */ +/* (C) Copyright to the author Olivier BERTRAND 2016 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ -/* This program are the ZLIB compressed files classes. */ +/* This program are the ZIP file access method classes. */ /* */ /***********************************************************************/ /***********************************************************************/ -/* Include relevant MariaDB header file. */ +/* Include relevant sections of the System header files. */ /***********************************************************************/ #include "my_global.h" -#if defined(__WIN__) -#include -#include -#if defined(__BORLANDC__) -#define __MFC_COMPAT__ // To define min/max as macro -#endif -//#include -#else // !__WIN__ +#if !defined(__WIN__) #if defined(UNIX) #include -#else // !UNIX +#include +#else // !UNIX #include -#endif +#endif // !UNIX #include #endif // !__WIN__ @@ -37,1390 +31,592 @@ /* Include application header files: */ /* global.h is header containing all global declarations. */ /* plgdbsem.h is header containing the DB application declarations. */ -/* tabdos.h is header containing the TABDOS class declarations. */ /***********************************************************************/ #include "global.h" #include "plgdbsem.h" -//#include "catalog.h" -//#include "reldef.h" -//#include "xobject.h" -//#include "kindex.h" -#include "filamtxt.h" -#include "tabdos.h" -#if defined(UNIX) #include "osutil.h" -#endif - -/***********************************************************************/ -/* This define prepares ZLIB function declarations. */ -/***********************************************************************/ -//#define ZLIB_DLL - +#include "filamtxt.h" +#include "tabfmt.h" +//#include "tabzip.h" #include "filamzip.h" -/***********************************************************************/ -/* DB static variables. */ -/***********************************************************************/ -extern int num_read, num_there, num_eq[]; // Statistics - -/* ------------------------------------------------------------------- */ +/* -------------------------- class ZIPUTIL -------------------------- */ /***********************************************************************/ -/* Implementation of the ZIPFAM class. */ +/* Constructors. */ /***********************************************************************/ -ZIPFAM::ZIPFAM(PZIPFAM txfp) : TXTFAM(txfp) - { - Zfile = txfp->Zfile; - Zpos = txfp->Zpos; - } // end of ZIPFAM copy constructor +ZIPUTIL::ZIPUTIL(PSZ tgt, bool mul) +{ + zipfile = NULL; + target = tgt; + fp = NULL; + memory = NULL; + size = 0; + entryopen = false; + multiple = mul; + memset(fn, 0, sizeof(fn)); -/***********************************************************************/ -/* Zerror: Error function for gz calls. */ -/* gzerror returns the error message for the last error which occurred*/ -/* on the given compressed file. errnum is set to zlib error number. */ -/* If an error occurred in the file system and not in the compression */ -/* library, errnum is set to Z_ERRNO and the application may consult */ -/* errno to get the exact error code. */ -/***********************************************************************/ -int ZIPFAM::Zerror(PGLOBAL g) - { - int errnum; - - strcpy(g->Message, gzerror(Zfile, &errnum)); - - if (errnum == Z_ERRNO) + // Init the case mapping table. #if defined(__WIN__) - sprintf(g->Message, MSG(READ_ERROR), To_File, strerror(NULL)); -#else // !__WIN__ - sprintf(g->Message, MSG(READ_ERROR), To_File, strerror(errno)); -#endif // !__WIN__ + for (int i = 0; i < 256; ++i) mapCaseTable[i] = toupper(i); +#else + for (int i = 0; i < 256; ++i) mapCaseTable[i] = i; +#endif +} // end of ZIPUTIL standard constructor - return (errnum == Z_STREAM_END) ? RC_EF : RC_FX; - } // end of Zerror +#if 0 +ZIPUTIL::ZIPUTIL(PZIPUTIL zutp) +{ + zipfile = zutp->zipfile; + target = zutp->target; + fp = zutp->fp; + finfo = zutp->finfo; + entryopen = zutp->entryopen; + multiple = zutp->multiple; + for (int i = 0; i < 256; ++i) mapCaseTable[i] = zutp->mapCaseTable[i]; +} // end of ZIPUTIL copy constructor +#endif // 0 /***********************************************************************/ -/* Reset: reset position values at the beginning of file. */ +/* This code is the copyright property of Alessandro Felice Cantatore. */ +/* http://xoomer.virgilio.it/acantato/dev/wildcard/wildmatch.html */ /***********************************************************************/ -void ZIPFAM::Reset(void) - { - TXTFAM::Reset(); -//gzrewind(Zfile); // Useful ????? - Zpos = 0; - } // end of Reset +bool ZIPUTIL::WildMatch(PSZ pat, PSZ str) { + PSZ s, p; + bool star = FALSE; + +loopStart: + for (s = str, p = pat; *s; ++s, ++p) { + switch (*p) { + case '?': + if (*s == '.') goto starCheck; + break; + case '*': + star = TRUE; + str = s, pat = p; + if (!*++pat) return TRUE; + goto loopStart; + default: + if (mapCaseTable[(uchar)*s] != mapCaseTable[(uchar)*p]) + goto starCheck; + break; + } /* endswitch */ + } /* endfor */ + if (*p == '*') ++p; + return (!*p); + +starCheck: + if (!star) return FALSE; + str++; + goto loopStart; +} // end of WildMatch /***********************************************************************/ -/* ZIP GetFileLength: returns an estimate of what would be the */ -/* uncompressed file size in number of bytes. */ +/* open a zip file. */ +/* param: filename path and the filename of the zip file to open. */ +/* return: true if open, false otherwise. */ +/***********************************************************************/ +bool ZIPUTIL::open(PGLOBAL g, char *filename) +{ + if (!zipfile && !(zipfile = unzOpen64(filename))) + sprintf(g->Message, "Zipfile open error on %s", filename); + + return (zipfile == NULL); +} // end of open + +/***********************************************************************/ +/* Close the zip file. */ +/***********************************************************************/ +void ZIPUTIL::close() +{ + if (zipfile) { + closeEntry(); + unzClose(zipfile); + zipfile = NULL; + } // endif zipfile + +} // end of close + +/***********************************************************************/ +/* Find next entry matching target pattern. */ +/***********************************************************************/ +int ZIPUTIL::findEntry(PGLOBAL g, bool next) +{ + int rc; + + do { + if (next) { + rc = unzGoToNextFile(zipfile); + + if (rc == UNZ_END_OF_LIST_OF_FILE) + return RC_EF; + else if (rc != UNZ_OK) { + sprintf(g->Message, "unzGoToNextFile rc = %d", rc); + return RC_FX; + } // endif rc + + } // endif next + + if (target && *target) { + rc = unzGetCurrentFileInfo(zipfile, NULL, fn, sizeof(fn), + NULL, 0, NULL, 0); + if (rc == UNZ_OK) { + if (WildMatch(target, fn)) + return RC_OK; + + } else { + sprintf(g->Message, "GetCurrentFileInfo rc = %d", rc); + return RC_FX; + } // endif rc + + } else + return RC_OK; + + next = true; + } while (true); + + strcpy(g->Message, "FindNext logical error"); + return RC_FX; +} // end of FindEntry + + +/***********************************************************************/ +/* Get the next used entry. */ +/***********************************************************************/ +int ZIPUTIL::nextEntry(PGLOBAL g) +{ + if (multiple) { + int rc; + + closeEntry(); + + if ((rc = findEntry(g, true)) != RC_OK) + return rc; + + if (openEntry(g)) + return RC_FX; + + return RC_OK; + } else + return RC_EF; + +} // end of nextEntry + + +/***********************************************************************/ +/* OpenTableFile: Open a DOS/UNIX table file from a ZIP file. */ +/***********************************************************************/ +bool ZIPUTIL::OpenTable(PGLOBAL g, MODE mode, char *fn) +{ + /*********************************************************************/ + /* The file will be decompressed into virtual memory. */ + /*********************************************************************/ + if (mode == MODE_READ || mode == MODE_ANY) { + bool b = open(g, fn); + + if (!b) { + int rc; + + if (target && *target) { + if (!multiple) { + rc = unzLocateFile(zipfile, target, 0); + + if (rc == UNZ_END_OF_LIST_OF_FILE) { + sprintf(g->Message, "Target file %s not in %s", target, fn); + return true; + } else if (rc != UNZ_OK) { + sprintf(g->Message, "unzLocateFile rc=%d", rc); + return true; + } // endif's rc + + } else { + if ((rc = findEntry(g, false)) == RC_FX) + return true; + else if (rc == RC_EF) { + sprintf(g->Message, "No match of %s in %s", target, fn); + return true; + } // endif rc + + } // endif multiple + + } // endif target + + if (openEntry(g)) + return true; + + if (size > 0) { + /*******************************************************************/ + /* Link a Fblock. This make possible to automatically close it */ + /* in case of error g->jump. */ + /*******************************************************************/ + PDBUSER dbuserp = (PDBUSER)g->Activityp->Aptr; + + fp = (PFBLOCK)PlugSubAlloc(g, NULL, sizeof(FBLOCK)); + fp->Type = TYPE_FB_ZIP; + fp->Fname = PlugDup(g, fn); + fp->Next = dbuserp->Openlist; + dbuserp->Openlist = fp; + fp->Count = 1; + fp->Length = size; + fp->Memory = memory; + fp->Mode = mode; + fp->File = this; + fp->Handle = 0; + } // endif fp + + } else + return true; + + } else { + strcpy(g->Message, "Only READ mode supported for ZIP files"); + return true; + } // endif mode + + return false; +} // end of OpenTableFile + +/***********************************************************************/ +/* Open target in zip file. */ +/***********************************************************************/ +bool ZIPUTIL::openEntry(PGLOBAL g) +{ + int rc; + + rc = unzGetCurrentFileInfo(zipfile, &finfo, fn, sizeof(fn), + NULL, 0, NULL, 0); + + if (rc != UNZ_OK) { + sprintf(g->Message, "unzGetCurrentFileInfo64 rc=%d", rc); + return true; + } else if ((rc = unzOpenCurrentFile(zipfile)) != UNZ_OK) { + sprintf(g->Message, "unzOpen fn=%s rc=%d", fn, rc); + return true; + } // endif rc + + size = finfo.uncompressed_size; + memory = new char[size + 1]; + + if ((rc = unzReadCurrentFile(zipfile, memory, size)) < 0) { + sprintf(g->Message, "unzReadCurrentFile rc = %d", rc); + unzCloseCurrentFile(zipfile); + free(memory); + memory = NULL; + entryopen = false; + } else { + memory[size] = 0; // Required by some table types (XML) + entryopen = true; + } // endif rc + + if (trace) + htrc("Openning entry%s %s\n", fn, (entryopen) ? "oked" : "failed"); + + return !entryopen; +} // end of openEntry + +/***********************************************************************/ +/* Close the zip file. */ +/***********************************************************************/ +void ZIPUTIL::closeEntry() +{ + if (entryopen) { + unzCloseCurrentFile(zipfile); + entryopen = false; + } // endif entryopen + + if (memory) { + free(memory); + memory = NULL; + } // endif memory + +} // end of closeEntry + +/* -------------------------- class ZIPFAM --------------------------- */ + +/***********************************************************************/ +/* Constructors. */ +/***********************************************************************/ +ZIPFAM::ZIPFAM(PDOSDEF tdp) : MAPFAM(tdp) +{ + zutp = NULL; + target = tdp->GetEntry(); + mul = tdp->GetMul(); +} // end of ZIPFAM standard constructor + +ZIPFAM::ZIPFAM(PZIPFAM txfp) : MAPFAM(txfp) +{ + zutp = txfp->zutp; + target = txfp->target; + mul = txfp->mul; +} // end of ZIPFAM copy constructor + +ZIPFAM::ZIPFAM(PDOSDEF tdp, PZPXFAM txfp) : MAPFAM(tdp) +{ + zutp = txfp->zutp; + target = txfp->target; + mul = txfp->mul; +} // end of ZIPFAM constructor used in ResetTableOpt + +/***********************************************************************/ +/* ZIP GetFileLength: returns file size in number of bytes. */ /***********************************************************************/ int ZIPFAM::GetFileLength(PGLOBAL g) - { - int len = TXTFAM::GetFileLength(g); +{ + int len = (zutp && zutp->entryopen) ? Top - Memory + : TXTFAM::GetFileLength(g) * 3; - if (len > 0) - // Estimate size reduction to a max of 6 - len *= 6; + if (trace) + htrc("Zipped file length=%d\n", len); - return len; - } // end of GetFileLength + return len; +} // end of GetFileLength /***********************************************************************/ -/* ZIP Access Method opening routine. */ +/* ZIP Cardinality: return the number of rows if possible. */ +/***********************************************************************/ +int ZIPFAM::Cardinality(PGLOBAL g) +{ + if (!g) + return 1; + + int card = -1; + int len = GetFileLength(g); + + card = (len / (int)Lrecl) * 2; // Estimated ??? + return card; +} // end of Cardinality + +/***********************************************************************/ +/* OpenTableFile: Open a DOS/UNIX table file from a ZIP file. */ /***********************************************************************/ bool ZIPFAM::OpenTableFile(PGLOBAL g) - { - char opmode[4], filename[_MAX_PATH]; - MODE mode = Tdbp->GetMode(); +{ + char filename[_MAX_PATH]; + MODE mode = Tdbp->GetMode(); - switch (mode) { - case MODE_READ: - strcpy(opmode, "r"); - break; - case MODE_UPDATE: - /*****************************************************************/ - /* Updating ZIP files not implemented yet. */ - /*****************************************************************/ - strcpy(g->Message, MSG(UPD_ZIP_NOT_IMP)); - return true; - case MODE_DELETE: - if (!Tdbp->GetNext()) { - // Store the number of deleted lines - DelRows = Cardinality(g); + /*********************************************************************/ + /* Allocate the ZIP utility class. */ + /*********************************************************************/ + zutp = new(g) ZIPUTIL(target, mul); - // This will erase the entire file - strcpy(opmode, "w"); -// Block = 0; // For ZBKFAM -// Last = Nrec; // For ZBKFAM - Tdbp->ResetSize(); - } else { - sprintf(g->Message, MSG(NO_PART_DEL), "ZIP"); - return true; - } // endif filter + // We used the file name relative to recorded datapath + PlugSetPath(filename, To_File, Tdbp->GetPath()); - break; - case MODE_INSERT: - strcpy(opmode, "a+"); - break; - default: - sprintf(g->Message, MSG(BAD_OPEN_MODE), mode); - return true; - } // endswitch Mode + if (!zutp->OpenTable(g, mode, filename)) { + // The pseudo "buffer" is here the entire real buffer + Fpos = Mempos = Memory = zutp->memory; + Top = Memory + zutp->size; + To_Fb = zutp->fp; // Useful when closing + } else + return true; - /*********************************************************************/ - /* Open according to logical input/output mode required. */ - /* Use specific zlib functions. */ - /* Treat files as binary. */ - /*********************************************************************/ - strcat(opmode, "b"); - Zfile = gzopen(PlugSetPath(filename, To_File, Tdbp->GetPath()), opmode); - - if (Zfile == NULL) { - sprintf(g->Message, MSG(GZOPEN_ERROR), - opmode, (int)errno, filename); - strcat(strcat(g->Message, ": "), strerror(errno)); - return (mode == MODE_READ && errno == ENOENT) - ? PushWarning(g, Tdbp) : true; - } // endif Zfile - - /*********************************************************************/ - /* Something to be done here. >>>>>>>> NOT DONE <<<<<<<< */ - /*********************************************************************/ -//To_Fb = dbuserp->Openlist; // Keep track of File block - - /*********************************************************************/ - /* Allocate the line buffer. */ - /*********************************************************************/ - return AllocateBuffer(g); - } // end of OpenTableFile + return false; + } // end of OpenTableFile /***********************************************************************/ -/* Allocate the line buffer. For mode Delete a bigger buffer has to */ -/* be allocated because is it also used to move lines into the file. */ +/* GetNext: go to next entry. */ /***********************************************************************/ -bool ZIPFAM::AllocateBuffer(PGLOBAL g) - { - MODE mode = Tdbp->GetMode(); +int ZIPFAM::GetNext(PGLOBAL g) +{ + int rc = zutp->nextEntry(g); - Buflen = Lrecl + 2; // Lrecl does not include CRLF -//Buflen *= ((Mode == MODE_DELETE) ? DOS_BUFF_LEN : 1); NIY + if (rc != RC_OK) + return rc; - if (trace) - htrc("SubAllocating a buffer of %d bytes\n", Buflen); + Mempos = Memory = zutp->memory; + Top = Memory + zutp->size; + return RC_OK; +} // end of GetNext - To_Buf = (char*)PlugSubAlloc(g, NULL, Buflen); - - if (mode == MODE_INSERT) { - /*******************************************************************/ - /* For Insert buffer must be prepared. */ - /*******************************************************************/ - memset(To_Buf, ' ', Buflen); - To_Buf[Buflen - 2] = '\n'; - To_Buf[Buflen - 1] = '\0'; - } // endif Insert - - return false; - } // end of AllocateBuffer - -/***********************************************************************/ -/* GetRowID: return the RowID of last read record. */ -/***********************************************************************/ -int ZIPFAM::GetRowID(void) - { - return Rows; - } // end of GetRowID - -/***********************************************************************/ -/* GetPos: return the position of last read record. */ -/***********************************************************************/ -int ZIPFAM::GetPos(void) - { - return (int)Zpos; - } // end of GetPos - -/***********************************************************************/ -/* GetNextPos: return the position of next record. */ -/***********************************************************************/ -int ZIPFAM::GetNextPos(void) - { - return gztell(Zfile); - } // end of GetNextPos - -/***********************************************************************/ -/* SetPos: Replace the table at the specified position. */ -/***********************************************************************/ -bool ZIPFAM::SetPos(PGLOBAL g, int pos __attribute__((unused))) - { - sprintf(g->Message, MSG(NO_SETPOS_YET), "ZIP"); - return true; #if 0 - Fpos = pos; - - if (fseek(Stream, Fpos, SEEK_SET)) { - sprintf(g->Message, MSG(FSETPOS_ERROR), Fpos); - return true; - } // endif - - Placed = true; - return false; -#endif // 0 - } // end of SetPos - /***********************************************************************/ -/* Record file position in case of UPDATE or DELETE. */ -/***********************************************************************/ -bool ZIPFAM::RecordPos(PGLOBAL) - { - Zpos = gztell(Zfile); - return false; - } // end of RecordPos - -/***********************************************************************/ -/* Skip one record in file. */ -/***********************************************************************/ -int ZIPFAM::SkipRecord(PGLOBAL g, bool header) - { - // Skip this record - if (gzeof(Zfile)) - return RC_EF; - else if (gzgets(Zfile, To_Buf, Buflen) == Z_NULL) - return Zerror(g); - - if (header) - RecordPos(g); - - return RC_OK; - } // end of SkipRecord - -/***********************************************************************/ -/* ReadBuffer: Read one line from a compressed text file. */ +/* ReadBuffer: Read one line for a ZIP file. */ /***********************************************************************/ int ZIPFAM::ReadBuffer(PGLOBAL g) - { - char *p; - int rc; +{ + int rc, len; - if (!Zfile) - return RC_EF; + // Are we at the end of the memory + if (Mempos >= Top) { + if ((rc = zutp->nextEntry(g)) != RC_OK) + return rc; - if (!Placed) { - /*******************************************************************/ - /* Record file position in case of UPDATE or DELETE. */ - /*******************************************************************/ - next: - if (RecordPos(g)) - return RC_FX; - - CurBlk = Rows++; // Update RowID - - /*******************************************************************/ - /* Check whether optimization on ROWID */ - /* can be done, as well as for join as for local filtering. */ - /*******************************************************************/ - switch (Tdbp->TestBlock(g)) { - case RC_EF: - return RC_EF; - case RC_NF: - // Skip this record - if ((rc = SkipRecord(g, FALSE)) != RC_OK) - return rc; - - goto next; - } // endswitch rc - - } else - Placed = false; - - if (gzeof(Zfile)) { - rc = RC_EF; - } else if (gzgets(Zfile, To_Buf, Buflen) != Z_NULL) { - p = To_Buf + strlen(To_Buf) - 1; - - if (*p == '\n') - *p = '\0'; // Eliminate ending new-line character - - if (*(--p) == '\r') - *p = '\0'; // Eliminate eventuel carriage return - - strcpy(Tdbp->GetLine(), To_Buf); - IsRead = true; - rc = RC_OK; - num_read++; - } else - rc = Zerror(g); - - if (trace > 1) - htrc(" Read: '%s' rc=%d\n", To_Buf, rc); - - return rc; - } // end of ReadBuffer - -/***********************************************************************/ -/* WriteDB: Data Base write routine for ZDOS access method. */ -/* Update is not possible without using a temporary file (NIY). */ -/***********************************************************************/ -int ZIPFAM::WriteBuffer(PGLOBAL g) - { - /*********************************************************************/ - /* Prepare the write buffer. */ - /*********************************************************************/ - strcat(strcpy(To_Buf, Tdbp->GetLine()), CrLf); - - /*********************************************************************/ - /* Now start the writing process. */ - /*********************************************************************/ - if (gzputs(Zfile, To_Buf) < 0) - return Zerror(g); - - return RC_OK; - } // end of WriteBuffer - -/***********************************************************************/ -/* Data Base delete line routine for ZDOS access method. (NIY) */ -/***********************************************************************/ -int ZIPFAM::DeleteRecords(PGLOBAL g, int) - { - strcpy(g->Message, MSG(NO_ZIP_DELETE)); - return RC_FX; - } // end of DeleteRecords - -/***********************************************************************/ -/* Data Base close routine for DOS access method. */ -/***********************************************************************/ -void ZIPFAM::CloseTableFile(PGLOBAL, bool) - { - int rc = gzclose(Zfile); - - if (trace) - htrc("ZIP CloseDB: closing %s rc=%d\n", To_File, rc); - - Zfile = NULL; // So we can know whether table is open -//To_Fb->Count = 0; // Avoid double closing by PlugCloseAll - } // end of CloseTableFile - -/***********************************************************************/ -/* Rewind routine for ZIP access method. */ -/***********************************************************************/ -void ZIPFAM::Rewind(void) - { - gzrewind(Zfile); - } // end of Rewind - -/* ------------------------------------------------------------------- */ - -/***********************************************************************/ -/* Constructors. */ -/***********************************************************************/ -ZBKFAM::ZBKFAM(PDOSDEF tdp) : ZIPFAM(tdp) - { - Blocked = true; - Block = tdp->GetBlock(); - Last = tdp->GetLast(); - Nrec = tdp->GetElemt(); - CurLine = NULL; - NxtLine = NULL; - Closing = false; - BlkPos = tdp->GetTo_Pos(); - } // end of ZBKFAM standard constructor - -ZBKFAM::ZBKFAM(PZBKFAM txfp) : ZIPFAM(txfp) - { - CurLine = txfp->CurLine; - NxtLine = txfp->NxtLine; - Closing = txfp->Closing; - } // end of ZBKFAM copy constructor - -/***********************************************************************/ -/* Use BlockTest to reduce the table estimated size. */ -/***********************************************************************/ -int ZBKFAM::MaxBlkSize(PGLOBAL g, int) - { - int rc = RC_OK, savcur = CurBlk; - int size; - - // Roughly estimate the table size as the sum of blocks - // that can contain good rows - for (size = 0, CurBlk = 0; CurBlk < Block; CurBlk++) - if ((rc = Tdbp->TestBlock(g)) == RC_OK) - size += (CurBlk == Block - 1) ? Last : Nrec; - else if (rc == RC_EF) - break; - - CurBlk = savcur; - return size; - } // end of MaxBlkSize - -/***********************************************************************/ -/* ZBK Cardinality: returns table cardinality in number of rows. */ -/* This function can be called with a null argument to test the */ -/* availability of Cardinality implementation (1 yes, 0 no). */ -/***********************************************************************/ -int ZBKFAM::Cardinality(PGLOBAL g) - { - return (g) ? (int)((Block - 1) * Nrec + Last) : 1; - } // end of Cardinality - -/***********************************************************************/ -/* Allocate the line buffer. For mode Delete a bigger buffer has to */ -/* be allocated because is it also used to move lines into the file. */ -/***********************************************************************/ -bool ZBKFAM::AllocateBuffer(PGLOBAL g) - { - Buflen = Nrec * (Lrecl + 2); - CurLine = To_Buf = (char*)PlugSubAlloc(g, NULL, Buflen); - - if (Tdbp->GetMode() == MODE_INSERT) { - // Set values so Block and Last can be recalculated - if (Last == Nrec) { - CurBlk = Block; - Rbuf = Nrec; // To be used by WriteDB - } else { - // The last block must be completed - CurBlk = Block - 1; - Rbuf = Nrec - Last; // To be used by WriteDB - } // endif Last - - } // endif Insert - - return false; - } // end of AllocateBuffer - -/***********************************************************************/ -/* GetRowID: return the RowID of last read record. */ -/***********************************************************************/ -int ZBKFAM::GetRowID(void) - { - return CurNum + Nrec * CurBlk + 1; - } // end of GetRowID - -/***********************************************************************/ -/* GetPos: return the position of last read record. */ -/***********************************************************************/ -int ZBKFAM::GetPos(void) - { - return CurNum + Nrec * CurBlk; // Computed file index - } // end of GetPos - -/***********************************************************************/ -/* Record file position in case of UPDATE or DELETE. */ -/* Not used yet for fixed tables. */ -/***********************************************************************/ -bool ZBKFAM::RecordPos(PGLOBAL /*g*/) - { -//strcpy(g->Message, "RecordPos not implemented for zip blocked tables"); -//return true; - return RC_OK; - } // end of RecordPos - -/***********************************************************************/ -/* Skip one record in file. */ -/***********************************************************************/ -int ZBKFAM::SkipRecord(PGLOBAL /*g*/, bool) - { -//strcpy(g->Message, "SkipRecord not implemented for zip blocked tables"); -//return RC_FX; - return RC_OK; - } // end of SkipRecord - -/***********************************************************************/ -/* ReadBuffer: Read one line from a compressed text file. */ -/***********************************************************************/ -int ZBKFAM::ReadBuffer(PGLOBAL g) - { - int n, skip, rc = RC_OK; - - /*********************************************************************/ - /* Sequential reading when Placed is not true. */ - /*********************************************************************/ - if (++CurNum < Rbuf) { - CurLine = NxtLine; - - // Get the position of the next line in the buffer - while (*NxtLine++ != '\n') ; - - // Set caller line buffer - n = NxtLine - CurLine - Ending; - memcpy(Tdbp->GetLine(), CurLine, n); - Tdbp->GetLine()[n] = '\0'; - return RC_OK; - } else if (Rbuf < Nrec && CurBlk != -1) - return RC_EF; - - /*********************************************************************/ - /* New block. */ - /*********************************************************************/ - CurNum = 0; - skip = 0; - - next: - if (++CurBlk >= Block) - return RC_EF; - - /*********************************************************************/ - /* Before using the new block, check whether block optimization */ - /* can be done, as well as for join as for local filtering. */ - /*********************************************************************/ - switch (Tdbp->TestBlock(g)) { - case RC_EF: - return RC_EF; - case RC_NF: - skip++; - goto next; - } // endswitch rc - - if (skip) - // Skip blocks rejected by block optimization - for (int i = CurBlk - skip; i < CurBlk; i++) { - BlkLen = BlkPos[i + 1] - BlkPos[i]; - - if (gzseek(Zfile, (z_off_t)BlkLen, SEEK_CUR) < 0) - return Zerror(g); - - } // endfor i - - BlkLen = BlkPos[CurBlk + 1] - BlkPos[CurBlk]; - - if (!(n = gzread(Zfile, To_Buf, BlkLen))) { - rc = RC_EF; - } else if (n > 0) { - // Get the position of the current line - CurLine = To_Buf; - - // Now get the position of the next line - for (NxtLine = CurLine; *NxtLine++ != '\n';) ; - - // Set caller line buffer - n = NxtLine - CurLine - Ending; - memcpy(Tdbp->GetLine(), CurLine, n); - Tdbp->GetLine()[n] = '\0'; - Rbuf = (CurBlk == Block - 1) ? Last : Nrec; - IsRead = true; - rc = RC_OK; - num_read++; - } else - rc = Zerror(g); - - return rc; - } // end of ReadBuffer - -/***********************************************************************/ -/* WriteDB: Data Base write routine for ZDOS access method. */ -/* Update is not possible without using a temporary file (NIY). */ -/***********************************************************************/ -int ZBKFAM::WriteBuffer(PGLOBAL g) - { - /*********************************************************************/ - /* Prepare the write buffer. */ - /*********************************************************************/ - if (!Closing) - strcat(strcpy(CurLine, Tdbp->GetLine()), CrLf); - - /*********************************************************************/ - /* In Insert mode, blocs are added sequentialy to the file end. */ - /* Note: Update mode is not handled for zip files. */ - /*********************************************************************/ - if (++CurNum == Rbuf) { - /*******************************************************************/ - /* New block, start the writing process. */ - /*******************************************************************/ - BlkLen = CurLine + strlen(CurLine) - To_Buf; - - if (gzwrite(Zfile, To_Buf, BlkLen) != BlkLen || - gzflush(Zfile, Z_FULL_FLUSH)) { - Closing = true; - return Zerror(g); - } // endif gzwrite - - Rbuf = Nrec; - CurBlk++; - CurNum = 0; - CurLine = To_Buf; - } else - CurLine += strlen(CurLine); - - return RC_OK; - } // end of WriteBuffer - -/***********************************************************************/ -/* Data Base delete line routine for ZBK access method. */ -/* Implemented only for total deletion of the table, which is done */ -/* by opening the file in mode "wb". */ -/***********************************************************************/ -int ZBKFAM::DeleteRecords(PGLOBAL g, int irc) - { - if (irc == RC_EF) { - LPCSTR name = Tdbp->GetName(); - PDOSDEF defp = (PDOSDEF)Tdbp->GetDef(); - - defp->SetBlock(0); - defp->SetLast(Nrec); - - if (!defp->SetIntCatInfo("Blocks", 0) || - !defp->SetIntCatInfo("Last", 0)) { - sprintf(g->Message, MSG(UPDATE_ERROR), "Header"); - return RC_FX; - } else - return RC_OK; - - } else - return irc; - - } // end of DeleteRecords - -/***********************************************************************/ -/* Data Base close routine for ZBK access method. */ -/***********************************************************************/ -void ZBKFAM::CloseTableFile(PGLOBAL g, bool) - { - int rc = RC_OK; - - if (Tdbp->GetMode() == MODE_INSERT) { - LPCSTR name = Tdbp->GetName(); - PDOSDEF defp = (PDOSDEF)Tdbp->GetDef(); - - if (CurNum && !Closing) { - // Some more inserted lines remain to be written - Last = (Nrec - Rbuf) + CurNum; - Block = CurBlk + 1; - Rbuf = CurNum--; - Closing = true; - rc = WriteBuffer(g); - } else if (Rbuf == Nrec) { - Last = Nrec; - Block = CurBlk; - } // endif CurNum - - if (rc != RC_FX) { - defp->SetBlock(Block); - defp->SetLast(Last); - defp->SetIntCatInfo("Blocks", Block); - defp->SetIntCatInfo("Last", Last); - } // endif - - gzclose(Zfile); - } else if (Tdbp->GetMode() == MODE_DELETE) { - rc = DeleteRecords(g, RC_EF); - gzclose(Zfile); - } else - rc = gzclose(Zfile); - - if (trace) - htrc("ZIP CloseDB: closing %s rc=%d\n", To_File, rc); - - Zfile = NULL; // So we can know whether table is open -//To_Fb->Count = 0; // Avoid double closing by PlugCloseAll - } // end of CloseTableFile - -/***********************************************************************/ -/* Rewind routine for ZBK access method. */ -/***********************************************************************/ -void ZBKFAM::Rewind(void) - { - gzrewind(Zfile); - CurBlk = -1; - CurNum = Rbuf; - } // end of Rewind - -/* ------------------------------------------------------------------- */ - -/***********************************************************************/ -/* Constructors. */ -/***********************************************************************/ -ZIXFAM::ZIXFAM(PDOSDEF tdp) : ZBKFAM(tdp) - { -//Block = tdp->GetBlock(); -//Last = tdp->GetLast(); - Nrec = (tdp->GetElemt()) ? tdp->GetElemt() : DOS_BUFF_LEN; - Blksize = Nrec * Lrecl; - } // end of ZIXFAM standard constructor - -/***********************************************************************/ -/* ZIX Cardinality: returns table cardinality in number of rows. */ -/* This function can be called with a null argument to test the */ -/* availability of Cardinality implementation (1 yes, 0 no). */ -/***********************************************************************/ -int ZIXFAM::Cardinality(PGLOBAL g) - { - if (Last) - return (g) ? (int)((Block - 1) * Nrec + Last) : 1; - else // Last and Block not defined, cannot do it yet - return 0; - - } // end of Cardinality - -/***********************************************************************/ -/* Allocate the line buffer. For mode Delete a bigger buffer has to */ -/* be allocated because is it also used to move lines into the file. */ -/***********************************************************************/ -bool ZIXFAM::AllocateBuffer(PGLOBAL g) - { - Buflen = Blksize; - To_Buf = (char*)PlugSubAlloc(g, NULL, Buflen); - - if (Tdbp->GetMode() == MODE_INSERT) { - /*******************************************************************/ - /* For Insert the buffer must be prepared. */ - /*******************************************************************/ - memset(To_Buf, ' ', Buflen); - - if (Tdbp->GetFtype() < 2) - // if not binary, the file is physically a text file - for (int len = Lrecl; len <= Buflen; len += Lrecl) { -#if defined(__WIN__) - To_Buf[len - 2] = '\r'; -#endif // __WIN__ - To_Buf[len - 1] = '\n'; - } // endfor len - - // Set values so Block and Last can be recalculated - if (Last == Nrec) { - CurBlk = Block; - Rbuf = Nrec; // To be used by WriteDB - } else { - // The last block must be completed - CurBlk = Block - 1; - Rbuf = Nrec - Last; // To be used by WriteDB - } // endif Last - - } // endif Insert - - return false; - } // end of AllocateBuffer - -/***********************************************************************/ -/* ReadBuffer: Read one line from a compressed text file. */ -/***********************************************************************/ -int ZIXFAM::ReadBuffer(PGLOBAL g) - { - int n, rc = RC_OK; - - /*********************************************************************/ - /* Sequential reading when Placed is not true. */ - /*********************************************************************/ - if (++CurNum < Rbuf) { - Tdbp->IncLine(Lrecl); // Used by DOSCOL functions - return RC_OK; - } else if (Rbuf < Nrec && CurBlk != -1) - return RC_EF; - - /*********************************************************************/ - /* New block. */ - /*********************************************************************/ - CurNum = 0; - Tdbp->SetLine(To_Buf); - - int skip = 0; - - next: - if (++CurBlk >= Block) - return RC_EF; - - /*********************************************************************/ - /* Before using the new block, check whether block optimization */ - /* can be done, as well as for join as for local filtering. */ - /*********************************************************************/ - switch (Tdbp->TestBlock(g)) { - case RC_EF: - return RC_EF; - case RC_NF: - skip++; - goto next; - } // endswitch rc - - if (skip) - // Skip blocks rejected by block optimization - for (int i = 0; i < skip; i++) { - if (gzseek(Zfile, (z_off_t)Buflen, SEEK_CUR) < 0) - return Zerror(g); - - } // endfor i - - if (!(n = gzread(Zfile, To_Buf, Buflen))) { - rc = RC_EF; - } else if (n > 0) { - Rbuf = n / Lrecl; - IsRead = true; - rc = RC_OK; - num_read++; - } else - rc = Zerror(g); - - return rc; - } // end of ReadBuffer - -/***********************************************************************/ -/* WriteDB: Data Base write routine for ZDOS access method. */ -/* Update is not possible without using a temporary file (NIY). */ -/***********************************************************************/ -int ZIXFAM::WriteBuffer(PGLOBAL g) - { - /*********************************************************************/ - /* In Insert mode, blocs are added sequentialy to the file end. */ - /* Note: Update mode is not handled for zip files. */ - /*********************************************************************/ - if (++CurNum == Rbuf) { - /*******************************************************************/ - /* New block, start the writing process. */ - /*******************************************************************/ - BlkLen = Rbuf * Lrecl; - - if (gzwrite(Zfile, To_Buf, BlkLen) != BlkLen || - gzflush(Zfile, Z_FULL_FLUSH)) { - Closing = true; - return Zerror(g); - } // endif gzwrite - - Rbuf = Nrec; - CurBlk++; - CurNum = 0; - Tdbp->SetLine(To_Buf); - } else - Tdbp->IncLine(Lrecl); // Used by FIXCOL functions - - return RC_OK; - } // end of WriteBuffer - -/* --------------------------- Class ZLBFAM -------------------------- */ - -/***********************************************************************/ -/* Constructors. */ -/***********************************************************************/ -ZLBFAM::ZLBFAM(PDOSDEF tdp) : BLKFAM(tdp) - { - Zstream = NULL; - Zbuffer = NULL; - Zlenp = NULL; - Optimized = tdp->IsOptimized(); - } // end of ZLBFAM standard constructor - -ZLBFAM::ZLBFAM(PZLBFAM txfp) : BLKFAM(txfp) - { - Zstream = txfp->Zstream; - Zbuffer = txfp->Zbuffer; - Zlenp = txfp->Zlenp; - Optimized = txfp->Optimized; - } // end of ZLBFAM (dummy?) copy constructor - -/***********************************************************************/ -/* ZLB GetFileLength: returns an estimate of what would be the */ -/* uncompressed file size in number of bytes. */ -/***********************************************************************/ -int ZLBFAM::GetFileLength(PGLOBAL g) - { - int len = (Optimized) ? BlkPos[Block] : BLKFAM::GetFileLength(g); - - if (len > 0) - // Estimate size reduction to a max of 5 - len *= 5; - - return len; - } // end of GetFileLength - -/***********************************************************************/ -/* Allocate the line buffer. For mode Delete a bigger buffer has to */ -/* be allocated because is it also used to move lines into the file. */ -/***********************************************************************/ -bool ZLBFAM::AllocateBuffer(PGLOBAL g) - { - char *msg; - int n, zrc; + Mempos = Memory = zutp->memory; + Top = Memory + zutp->size; + } // endif Mempos #if 0 - if (!Optimized && Tdbp->NeedIndexing(g)) { - strcpy(g->Message, MSG(NOP_ZLIB_INDEX)); - return TRUE; - } // endif indexing + if (!Placed) { + /*******************************************************************/ + /* Record file position in case of UPDATE or DELETE. */ + /*******************************************************************/ + int rc; + + next: + Fpos = Mempos; + CurBlk = (int)Rows++; + + /*******************************************************************/ + /* Check whether optimization on ROWID */ + /* can be done, as well as for join as for local filtering. */ + /*******************************************************************/ + switch (Tdbp->TestBlock(g)) { + case RC_EF: + return RC_EF; + case RC_NF: + // Skip this record + if ((rc = SkipRecord(g, false)) != RC_OK) + return rc; + + goto next; + } // endswitch rc + + } else + Placed = false; +#else + // Perhaps unuseful + Fpos = Mempos; + CurBlk = (int)Rows++; + Placed = false; +#endif + + // Immediately calculate next position (Used by DeleteDB) + while (*Mempos++ != '\n'); // What about Unix ??? + + // Set caller line buffer + len = (Mempos - Fpos) - 1; + + // Don't rely on ENDING setting + if (len > 0 && *(Mempos - 2) == '\r') + len--; // Line ends by CRLF + + memcpy(Tdbp->GetLine(), Fpos, len); + Tdbp->GetLine()[len] = '\0'; + return RC_OK; +} // end of ReadBuffer + +/***********************************************************************/ +/* Table file close routine for MAP access method. */ +/***********************************************************************/ +void ZIPFAM::CloseTableFile(PGLOBAL g, bool) +{ + close(); +} // end of CloseTableFile #endif // 0 -#if defined(NOLIB) - if (!zlib && LoadZlib()) { - sprintf(g->Message, MSG(DLL_LOAD_ERROR), GetLastError(), "zlib.dll"); - return TRUE; - } // endif zlib -#endif - - BLKFAM::AllocateBuffer(g); -//Buflen = Nrec * (Lrecl + 2); -//Rbuf = Nrec; - - // Allocate the compressed buffer - n = Buflen + 16; // ????????????????????????????????? - Zlenp = (int*)PlugSubAlloc(g, NULL, n); - Zbuffer = (Byte*)(Zlenp + 1); - - // Allocate and initialize the Z stream - Zstream = (z_streamp)PlugSubAlloc(g, NULL, sizeof(z_stream)); - Zstream->zalloc = (alloc_func)0; - Zstream->zfree = (free_func)0; - Zstream->opaque = (voidpf)0; - Zstream->next_in = NULL; - Zstream->avail_in = 0; - - if (Tdbp->GetMode() == MODE_READ) { - msg = "inflateInit"; - zrc = inflateInit(Zstream); - } else { - msg = "deflateInit"; - zrc = deflateInit(Zstream, Z_DEFAULT_COMPRESSION); - } // endif Mode - - if (zrc != Z_OK) { - if (Zstream->msg) - sprintf(g->Message, "%s error: %s", msg, Zstream->msg); - else - sprintf(g->Message, "%s error: %d", msg, zrc); - - return TRUE; - } // endif zrc - - if (Tdbp->GetMode() == MODE_INSERT) { - // Write the file header block - if (Last == Nrec) { - CurBlk = Block; - CurNum = 0; - - if (!GetFileLength(g)) { - // Write the zlib header as an extra block - strcpy(To_Buf, "PlugDB"); - BlkLen = strlen("PlugDB") + 1; - - if (WriteCompressedBuffer(g)) - return TRUE; - - } // endif void file - - } else { - // In mode insert, if Last != Nrec, last block must be updated - CurBlk = Block - 1; - CurNum = Last; - - strcpy(g->Message, MSG(NO_PAR_BLK_INS)); - return TRUE; - } // endif Last - - } else { // MODE_READ - // First thing to do is to read the header block - void *rdbuf; - - if (Optimized) { - BlkLen = BlkPos[0]; - rdbuf = Zlenp; - } else { - // Get the stored length from the file itself - if (fread(Zlenp, sizeof(int), 1, Stream) != 1) - return FALSE; // Empty file - - BlkLen = *Zlenp; - rdbuf = Zbuffer; - } // endif Optimized - - switch (ReadCompressedBuffer(g, rdbuf)) { - case RC_EF: - return FALSE; - case RC_FX: -#if defined(UNIX) - sprintf(g->Message, MSG(READ_ERROR), To_File, strerror(errno)); -#else - sprintf(g->Message, MSG(READ_ERROR), To_File, _strerror(NULL)); -#endif - case RC_NF: - return TRUE; - } // endswitch - - // Some old tables can have PlugDB in their header - if (strcmp(To_Buf, "PlugDB")) { - sprintf(g->Message, MSG(BAD_HEADER), Tdbp->GetFile(g)); - return TRUE; - } // endif strcmp - - } // endif Mode - - return FALSE; - } // end of AllocateBuffer +/* -------------------------- class ZPXFAM --------------------------- */ /***********************************************************************/ -/* GetPos: return the position of last read record. */ +/* Constructors. */ /***********************************************************************/ -int ZLBFAM::GetPos(void) - { - return (Optimized) ? (CurNum + Nrec * CurBlk) : Fpos; - } // end of GetPos +ZPXFAM::ZPXFAM(PDOSDEF tdp) : MPXFAM(tdp) +{ + zutp = NULL; + target = tdp->GetEntry(); + mul = tdp->GetMul(); + //Lrecl = tdp->GetLrecl(); +} // end of ZPXFAM standard constructor + +ZPXFAM::ZPXFAM(PZPXFAM txfp) : MPXFAM(txfp) +{ + zutp = txfp->zutp; + target = txfp->target; + mul = txfp->mul; +//Lrecl = txfp->Lrecl; +} // end of ZPXFAM copy constructor /***********************************************************************/ -/* GetNextPos: should not be called for this class. */ +/* ZIP GetFileLength: returns file size in number of bytes. */ /***********************************************************************/ -int ZLBFAM::GetNextPos(void) - { - if (Optimized) { - assert(FALSE); - return 0; - } else - return ftell(Stream); +int ZPXFAM::GetFileLength(PGLOBAL g) +{ + int len; - } // end of GetNextPos + if (!zutp && OpenTableFile(g)) + return 0; + + if (zutp->entryopen) + len = zutp->size; + else + len = 0; + + return len; +} // end of GetFileLength /***********************************************************************/ -/* SetPos: Replace the table at the specified position. */ +/* ZIP Cardinality: return the number of rows if possible. */ /***********************************************************************/ -bool ZLBFAM::SetPos(PGLOBAL g, int pos __attribute__((unused))) - { - sprintf(g->Message, MSG(NO_SETPOS_YET), "ZIP"); - return true; -#if 0 // All this must be checked - if (pos < 0) { - strcpy(g->Message, MSG(INV_REC_POS)); - return true; - } // endif recpos +int ZPXFAM::Cardinality(PGLOBAL g) +{ + if (!g) + return 1; - CurBlk = pos / Nrec; - CurNum = pos % Nrec; -#if defined(_DEBUG) - num_eq[(CurBlk == OldBlk) ? 1 : 0]++; -#endif + int card = -1; + int len = GetFileLength(g); - // Indicate the table position was externally set - Placed = true; - return false; -#endif // 0 - } // end of SetPos + if (!(len % Lrecl)) + card = len / (int)Lrecl; // Fixed length file + else + sprintf(g->Message, MSG(NOT_FIXED_LEN), zutp->fn, len, Lrecl); + + // Set number of blocks for later use + Block = (card > 0) ? (card + Nrec - 1) / Nrec : 0; + return card; +} // end of Cardinality /***********************************************************************/ -/* ReadBuffer: Read one line for a text file. */ +/* OpenTableFile: Open a DOS/UNIX table file from a ZIP file. */ /***********************************************************************/ -int ZLBFAM::ReadBuffer(PGLOBAL g) - { - int n; - void *rdbuf; +bool ZPXFAM::OpenTableFile(PGLOBAL g) +{ + // May have been already opened in GetFileLength + if (!zutp || !zutp->zipfile) { + char filename[_MAX_PATH]; + MODE mode = Tdbp->GetMode(); - /*********************************************************************/ - /* Sequential reading when Placed is not true. */ - /*********************************************************************/ - if (Placed) { - Placed = FALSE; - } else if (++CurNum < Rbuf) { - CurLine = NxtLine; + /*********************************************************************/ + /* Allocate the ZIP utility class. */ + /*********************************************************************/ + if (!zutp) + zutp = new(g)ZIPUTIL(target, mul); - // Get the position of the next line in the buffer - if (Tdbp->GetFtype() == RECFM_VAR) - while (*NxtLine++ != '\n') ; - else - NxtLine += Lrecl; + // We used the file name relative to recorded datapath + PlugSetPath(filename, To_File, Tdbp->GetPath()); - // Set caller line buffer - n = NxtLine - CurLine - ((Tdbp->GetFtype() == RECFM_BIN) ? 0 : Ending); - memcpy(Tdbp->GetLine(), CurLine, n); - Tdbp->GetLine()[n] = '\0'; - return RC_OK; - } else if (Rbuf < Nrec && CurBlk != -1) { - CurNum--; // To have a correct Last value when optimizing - return RC_EF; - } else { - /*******************************************************************/ - /* New block. */ - /*******************************************************************/ - CurNum = 0; + if (!zutp->OpenTable(g, mode, filename)) { + // The pseudo "buffer" is here the entire real buffer + Memory = zutp->memory; + Fpos = Mempos = Memory + Headlen; + Top = Memory + zutp->size; + To_Fb = zutp->fp; // Useful when closing + } else + return true; - next: - if (++CurBlk >= Block) - return RC_EF; + } else + Reset(); - /*******************************************************************/ - /* Before reading a new block, check whether block optimization */ - /* can be done, as well as for join as for local filtering. */ - /*******************************************************************/ - if (Optimized) switch (Tdbp->TestBlock(g)) { - case RC_EF: - return RC_EF; - case RC_NF: - goto next; - } // endswitch rc - - } // endif's - - if (OldBlk == CurBlk) - goto ok; // Block is already there - - if (Optimized) { - // Store the position of next block - Fpos = BlkPos[CurBlk]; - - // fseek is required only in non sequential reading - if (CurBlk != OldBlk + 1) - if (fseek(Stream, Fpos, SEEK_SET)) { - sprintf(g->Message, MSG(FSETPOS_ERROR), Fpos); - return RC_FX; - } // endif fseek - - // Calculate the length of block to read - BlkLen = BlkPos[CurBlk + 1] - Fpos; - rdbuf = Zlenp; - } else { // !Optimized - if (CurBlk != OldBlk + 1) { - strcpy(g->Message, MSG(INV_RAND_ACC)); - return RC_FX; - } else - Fpos = ftell(Stream); // Used when optimizing - - // Get the stored length from the file itself - if (fread(Zlenp, sizeof(int), 1, Stream) != 1) { - if (feof(Stream)) - return RC_EF; - - goto err; - } // endif fread - - BlkLen = *Zlenp; - rdbuf = Zbuffer; - } // endif Optimized - - // Read the next block - switch (ReadCompressedBuffer(g, rdbuf)) { - case RC_FX: goto err; - case RC_NF: return RC_FX; - case RC_EF: return RC_EF; - default: Rbuf = (CurBlk == Block - 1) ? Last : Nrec; - } // endswitch ReadCompressedBuffer - - ok: - if (Tdbp->GetFtype() == RECFM_VAR) { - int i; - - // Get the position of the current line - for (i = 0, CurLine = To_Buf; i < CurNum; i++) - while (*CurLine++ != '\n') ; // What about Unix ??? - - // Now get the position of the next line - for (NxtLine = CurLine; *NxtLine++ != '\n';) ; - - // Set caller line buffer - n = NxtLine - CurLine - Ending; - } else { - CurLine = To_Buf + CurNum * Lrecl; - NxtLine = CurLine + Lrecl; - n = Lrecl - ((Tdbp->GetFtype() == RECFM_BIN) ? 0 : Ending); - } // endif Ftype - - memcpy(Tdbp->GetLine(), CurLine, n); - Tdbp->GetLine()[n] = '\0'; - - OldBlk = CurBlk; // Last block actually read - IsRead = TRUE; // Is read indeed - return RC_OK; - - err: -#if defined(UNIX) - sprintf(g->Message, MSG(READ_ERROR), To_File, strerror(errno)); -#else - sprintf(g->Message, MSG(READ_ERROR), To_File, _strerror(NULL)); -#endif - return RC_FX; - } // end of ReadBuffer + return false; +} // end of OpenTableFile /***********************************************************************/ -/* Read and decompress a block from the stream. */ +/* GetNext: go to next entry. */ /***********************************************************************/ -int ZLBFAM::ReadCompressedBuffer(PGLOBAL g, void *rdbuf) - { - if (fread(rdbuf, 1, (size_t)BlkLen, Stream) == (unsigned)BlkLen) { - int zrc; +int ZPXFAM::GetNext(PGLOBAL g) +{ + int rc = zutp->nextEntry(g); - num_read++; + if (rc != RC_OK) + return rc; - if (Optimized && BlkLen != signed(*Zlenp + sizeof(int))) { - sprintf(g->Message, MSG(BAD_BLK_SIZE), CurBlk + 1); - return RC_NF; - } // endif BlkLen + int len = zutp->size; - // HERE WE MUST INFLATE THE BLOCK - Zstream->next_in = Zbuffer; - Zstream->avail_in = (uInt)(*Zlenp); - Zstream->next_out = (Byte*)To_Buf; - Zstream->avail_out = Buflen; - zrc = inflate(Zstream, Z_SYNC_FLUSH); + if (len % Lrecl) { + sprintf(g->Message, MSG(NOT_FIXED_LEN), zutp->fn, len, Lrecl); + return RC_FX; + } // endif size - if (zrc != Z_OK) { - if (Zstream->msg) - sprintf(g->Message, MSG(FUNC_ERR_S), "inflate", Zstream->msg); - else - sprintf(g->Message, MSG(FUNCTION_ERROR), "inflate", (int)zrc); + Memory = zutp->memory; + Top = Memory + len; + Rewind(); + return RC_OK; +} // end of GetNext - return RC_NF; - } // endif zrc - - } else if (feof(Stream)) { - return RC_EF; - } else - return RC_FX; - - return RC_OK; - } // end of ReadCompressedBuffer - -/***********************************************************************/ -/* WriteBuffer: File write routine for DOS access method. */ -/* Update is directly written back into the file, */ -/* with this (fast) method, record size cannot change. */ -/***********************************************************************/ -int ZLBFAM::WriteBuffer(PGLOBAL g) - { - assert (Tdbp->GetMode() == MODE_INSERT); - - /*********************************************************************/ - /* Prepare the write buffer. */ - /*********************************************************************/ - if (!Closing) { - if (Tdbp->GetFtype() == RECFM_BIN) - memcpy(CurLine, Tdbp->GetLine(), Lrecl); - else - strcat(strcpy(CurLine, Tdbp->GetLine()), CrLf); - -#if defined(_DEBUG) - if (Tdbp->GetFtype() == RECFM_FIX && - (signed)strlen(CurLine) != Lrecl + (signed)strlen(CrLf)) { - strcpy(g->Message, MSG(BAD_LINE_LEN)); - Closing = TRUE; - return RC_FX; - } // endif Lrecl -#endif // _DEBUG - } // endif Closing - - /*********************************************************************/ - /* In Insert mode, blocs are added sequentialy to the file end. */ - /*********************************************************************/ - if (++CurNum != Rbuf) { - if (Tdbp->GetFtype() == RECFM_VAR) - CurLine += strlen(CurLine); - else - CurLine += Lrecl; - - return RC_OK; // We write only full blocks - } // endif CurNum - - // HERE WE MUST DEFLATE THE BLOCK - if (Tdbp->GetFtype() == RECFM_VAR) - NxtLine = CurLine + strlen(CurLine); - else - NxtLine = CurLine + Lrecl; - - BlkLen = NxtLine - To_Buf; - - if (WriteCompressedBuffer(g)) { - Closing = TRUE; // To tell CloseDB about a Write error - return RC_FX; - } // endif WriteCompressedBuffer - - CurBlk++; - CurNum = 0; - CurLine = To_Buf; - return RC_OK; - } // end of WriteBuffer - -/***********************************************************************/ -/* Compress the buffer and write the deflated output to stream. */ -/***********************************************************************/ -bool ZLBFAM::WriteCompressedBuffer(PGLOBAL g) - { - int zrc; - - Zstream->next_in = (Byte*)To_Buf; - Zstream->avail_in = (uInt)BlkLen; - Zstream->next_out = Zbuffer; - Zstream->avail_out = Buflen + 16; - Zstream->total_out = 0; - zrc = deflate(Zstream, Z_FULL_FLUSH); - - if (zrc != Z_OK) { - if (Zstream->msg) - sprintf(g->Message, MSG(FUNC_ERR_S), "deflate", Zstream->msg); - else - sprintf(g->Message, MSG(FUNCTION_ERROR), "deflate", (int)zrc); - - return TRUE; - } else - *Zlenp = Zstream->total_out; - - // Now start the writing process. - BlkLen = *Zlenp + sizeof(int); - - if (fwrite(Zlenp, 1, BlkLen, Stream) != (size_t)BlkLen) { - sprintf(g->Message, MSG(FWRITE_ERROR), strerror(errno)); - return TRUE; - } // endif size - - return FALSE; - } // end of WriteCompressedBuffer - -/***********************************************************************/ -/* Table file close routine for DOS access method. */ -/***********************************************************************/ -void ZLBFAM::CloseTableFile(PGLOBAL g, bool) - { - int rc = RC_OK; - - if (Tdbp->GetMode() == MODE_INSERT) { - LPCSTR name = Tdbp->GetName(); - PDOSDEF defp = (PDOSDEF)Tdbp->GetDef(); - - // Closing is True if last Write was in error - if (CurNum && !Closing) { - // Some more inserted lines remain to be written - Last = (Nrec - Rbuf) + CurNum; - Block = CurBlk + 1; - Rbuf = CurNum--; - Closing = TRUE; - rc = WriteBuffer(g); - } else if (Rbuf == Nrec) { - Last = Nrec; - Block = CurBlk; - } // endif CurNum - - if (rc != RC_FX) { - defp->SetBlock(Block); - defp->SetLast(Last); - defp->SetIntCatInfo("Blocks", Block); - defp->SetIntCatInfo("Last", Last); - } // endif - - fclose(Stream); - } else - rc = fclose(Stream); - - if (trace) - htrc("ZLB CloseTableFile: closing %s mode=%d rc=%d\n", - To_File, Tdbp->GetMode(), rc); - - Stream = NULL; // So we can know whether table is open - To_Fb->Count = 0; // Avoid double closing by PlugCloseAll - - if (Tdbp->GetMode() == MODE_READ) - rc = inflateEnd(Zstream); - else - rc = deflateEnd(Zstream); - - } // end of CloseTableFile - -/***********************************************************************/ -/* Rewind routine for ZLIB access method. */ -/***********************************************************************/ -void ZLBFAM::Rewind(void) - { - // We must be positioned after the header block - if (CurBlk >= 0) { // Nothing to do if no block read yet - if (!Optimized) { // If optimized, fseek will be done in ReadBuffer - size_t st; - - rewind(Stream); - - if (!(st = fread(Zlenp, sizeof(int), 1, Stream)) && trace) - htrc("fread error %d in Rewind", errno); - - fseek(Stream, *Zlenp + sizeof(int), SEEK_SET); - OldBlk = -1; - } // endif Optimized - - CurBlk = -1; - CurNum = Rbuf; - } // endif CurBlk - -//OldBlk = -1; -//Rbuf = 0; commented out in case we reuse last read block - } // end of Rewind - -/* ------------------------ End of ZipFam ---------------------------- */ diff --git a/storage/connect/filamzip.h b/storage/connect/filamzip.h index edb8b5db323..9312fb2f70e 100644 --- a/storage/connect/filamzip.h +++ b/storage/connect/filamzip.h @@ -1,170 +1,117 @@ -/************** FilAmZip H Declares Source Code File (.H) **************/ -/* Name: FILAMZIP.H Version 1.2 */ +/************** filamzip H Declares Source Code File (.H) **************/ +/* Name: filamzip.h Version 1.0 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2016 */ /* */ -/* This file contains the GZIP access method classes declares. */ +/* This file contains the ZIP file access method classes declares. */ /***********************************************************************/ #ifndef __FILAMZIP_H #define __FILAMZIP_H -#include "zlib.h" +#include "block.h" +#include "filamap.h" +#include "unzip.h" + +#define DLLEXPORT extern "C" typedef class ZIPFAM *PZIPFAM; -typedef class ZBKFAM *PZBKFAM; -typedef class ZIXFAM *PZIXFAM; -typedef class ZLBFAM *PZLBFAM; +typedef class ZPXFAM *PZPXFAM; /***********************************************************************/ -/* This is the access method class declaration for not optimized */ -/* variable record length files compressed using the gzip library */ -/* functions. File is accessed record by record (row). */ +/* This is the ZIP utility fonctions class. */ /***********************************************************************/ -class DllExport ZIPFAM : public TXTFAM { -// friend class DOSCOL; - public: - // Constructor - ZIPFAM(PDOSDEF tdp) : TXTFAM(tdp) {Zfile = NULL; Zpos = 0;} - ZIPFAM(PZIPFAM txfp); +class DllExport ZIPUTIL : public BLOCK { +public: + // Constructor + ZIPUTIL(PSZ tgt, bool mul); +//ZIPUTIL(ZIPUTIL *zutp); - // Implementation - virtual AMT GetAmType(void) {return TYPE_AM_ZIP;} - virtual int GetPos(void); - virtual int GetNextPos(void); - virtual PTXF Duplicate(PGLOBAL g) - {return (PTXF)new(g) ZIPFAM(this);} + // Implementation +//PTXF Duplicate(PGLOBAL g) { return (PTXF) new(g)ZIPFAM(this); } - // Methods - virtual void Reset(void); - virtual int GetFileLength(PGLOBAL g); - virtual int Cardinality(PGLOBAL g) {return (g) ? -1 : 0;} - virtual int MaxBlkSize(PGLOBAL g, int s) {return s;} - virtual bool AllocateBuffer(PGLOBAL g); - virtual int GetRowID(void); - virtual bool RecordPos(PGLOBAL g); - virtual bool SetPos(PGLOBAL g, int recpos); - virtual int SkipRecord(PGLOBAL g, bool header); - virtual bool OpenTableFile(PGLOBAL g); - virtual int ReadBuffer(PGLOBAL g); - virtual int WriteBuffer(PGLOBAL g); - virtual int DeleteRecords(PGLOBAL g, int irc); - virtual void CloseTableFile(PGLOBAL g, bool abort); - virtual void Rewind(void); + // Methods + virtual bool OpenTable(PGLOBAL g, MODE mode, char *fn); + bool open(PGLOBAL g, char *fn); + bool openEntry(PGLOBAL g); + void close(void); + void closeEntry(void); + bool WildMatch(PSZ pat, PSZ str); + int findEntry(PGLOBAL g, bool next); + int nextEntry(PGLOBAL g); - protected: - int Zerror(PGLOBAL g); // GZ error function - - // Members - gzFile Zfile; // Points to GZ file structure - z_off_t Zpos; // Uncompressed file position - }; // end of class ZIPFAM + // Members + unzFile zipfile; // The ZIP container file + PSZ target; // The target file name + unz_file_info finfo; // The current file info + PFBLOCK fp; + char *memory; + uint size; + int multiple; // Multiple targets + bool entryopen; // True when open current entry + char fn[FILENAME_MAX]; // The current entry file name + char mapCaseTable[256]; +}; // end of ZIPFAM /***********************************************************************/ -/* This is the access method class declaration for optimized variable */ -/* record length files compressed using the gzip library functions. */ -/* The File is accessed by block (requires an opt file). */ +/* This is the ZIP file access method. */ /***********************************************************************/ -class DllExport ZBKFAM : public ZIPFAM { - public: - // Constructor - ZBKFAM(PDOSDEF tdp); - ZBKFAM(PZBKFAM txfp); +class DllExport ZIPFAM : public MAPFAM { + friend class ZPXFAM; +public: + // Constructors + ZIPFAM(PDOSDEF tdp); + ZIPFAM(PZIPFAM txfp); + ZIPFAM(PDOSDEF tdp, PZPXFAM txfp); - // Implementation - virtual int GetPos(void); - virtual int GetNextPos(void) {return 0;} - virtual PTXF Duplicate(PGLOBAL g) - {return (PTXF)new(g) ZBKFAM(this);} + // Implementation + virtual AMT GetAmType(void) { return TYPE_AM_ZIP; } + virtual PTXF Duplicate(PGLOBAL g) { return (PTXF) new(g)ZIPFAM(this); } - // Methods - virtual int Cardinality(PGLOBAL g); - virtual int MaxBlkSize(PGLOBAL g, int s); - virtual bool AllocateBuffer(PGLOBAL g); - virtual int GetRowID(void); - virtual bool RecordPos(PGLOBAL g); - virtual int SkipRecord(PGLOBAL g, bool header); - virtual int ReadBuffer(PGLOBAL g); - virtual int WriteBuffer(PGLOBAL g); - virtual int DeleteRecords(PGLOBAL g, int irc); - virtual void CloseTableFile(PGLOBAL g, bool abort); - virtual void Rewind(void); + // Methods + virtual int Cardinality(PGLOBAL g); + virtual int GetFileLength(PGLOBAL g); +//virtual int MaxBlkSize(PGLOBAL g, int s) {return s;} + virtual bool OpenTableFile(PGLOBAL g); + virtual bool DeferReading(void) { return false; } + virtual int GetNext(PGLOBAL g); +//virtual int ReadBuffer(PGLOBAL g); +//virtual int WriteBuffer(PGLOBAL g); +//virtual int DeleteRecords(PGLOBAL g, int irc); +//virtual void CloseTableFile(PGLOBAL g, bool abort); - protected: - // Members - char *CurLine; // Position of current line in buffer - char *NxtLine; // Position of Next line in buffer - bool Closing; // True when closing on Insert - }; // end of class ZBKFAM +protected: + // Members + ZIPUTIL *zutp; + PSZ target; + bool mul; +}; // end of ZIPFAM /***********************************************************************/ -/* This is the access method class declaration for fixed record */ -/* length files compressed using the gzip library functions. */ -/* The file is always accessed by block. */ +/* This is the fixed ZIP file access method. */ /***********************************************************************/ -class DllExport ZIXFAM : public ZBKFAM { - public: - // Constructor - ZIXFAM(PDOSDEF tdp); - ZIXFAM(PZIXFAM txfp) : ZBKFAM(txfp) {} +class DllExport ZPXFAM : public MPXFAM { + friend class ZIPFAM; +public: + // Constructors + ZPXFAM(PDOSDEF tdp); + ZPXFAM(PZPXFAM txfp); - // Implementation - virtual int GetNextPos(void) {return 0;} - virtual PTXF Duplicate(PGLOBAL g) - {return (PTXF)new(g) ZIXFAM(this);} + // Implementation + virtual AMT GetAmType(void) { return TYPE_AM_ZIP; } + virtual PTXF Duplicate(PGLOBAL g) { return (PTXF) new(g)ZPXFAM(this); } - // Methods - virtual int Cardinality(PGLOBAL g); - virtual bool AllocateBuffer(PGLOBAL g); - virtual int ReadBuffer(PGLOBAL g); - virtual int WriteBuffer(PGLOBAL g); + // Methods + virtual int GetFileLength(PGLOBAL g); + virtual int Cardinality(PGLOBAL g); + virtual bool OpenTableFile(PGLOBAL g); + virtual int GetNext(PGLOBAL g); +//virtual int ReadBuffer(PGLOBAL g); - protected: - // No additional Members - }; // end of class ZIXFAM - -/***********************************************************************/ -/* This is the DOS/UNIX Access Method class declaration for PlugDB */ -/* fixed/variable files compressed using the zlib library functions. */ -/* Physically these are written and read using the same technique */ -/* than blocked variable files, only the contain of each block is */ -/* compressed using the deflate zlib function. The purpose of this */ -/* specific format is to have a fast mechanism for direct access of */ -/* records so blocked optimization is fast and direct access (joins) */ -/* is allowed. Note that the block length is written ahead of each */ -/* block to enable reading when optimization file is not available. */ -/***********************************************************************/ -class DllExport ZLBFAM : public BLKFAM { - public: - // Constructor - ZLBFAM(PDOSDEF tdp); - ZLBFAM(PZLBFAM txfp); - - // Implementation - virtual AMT GetAmType(void) {return TYPE_AM_ZLIB;} - virtual int GetPos(void); - virtual int GetNextPos(void); - virtual PTXF Duplicate(PGLOBAL g) - {return (PTXF)new(g) ZLBFAM(this);} - inline void SetOptimized(bool b) {Optimized = b;} - - // Methods - virtual int GetFileLength(PGLOBAL g); - virtual bool SetPos(PGLOBAL g, int recpos); - virtual bool AllocateBuffer(PGLOBAL g); - virtual int ReadBuffer(PGLOBAL g); - virtual int WriteBuffer(PGLOBAL g); - virtual void CloseTableFile(PGLOBAL g, bool abort); - virtual void Rewind(void); - - protected: - bool WriteCompressedBuffer(PGLOBAL g); - int ReadCompressedBuffer(PGLOBAL g, void *rdbuf); - - // Members - z_streamp Zstream; // Compression/decompression stream - Byte *Zbuffer; // Compressed block buffer - int *Zlenp; // Pointer to block length - bool Optimized; // true when opt file is available - }; // end of class ZLBFAM +protected: + // Members + ZIPUTIL *zutp; + PSZ target; + bool mul; +}; // end of ZPXFAM #endif // __FILAMZIP_H diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 419a33ed74e..b542ca180c5 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -171,9 +171,9 @@ #define JSONMAX 10 // JSON Default max grp size extern "C" { - char version[]= "Version 1.04.0008 August 10, 2016"; + char version[]= "Version 1.05.0001 December 13, 2016"; #if defined(__WIN__) - char compver[]= "Version 1.04.0008 " __DATE__ " " __TIME__; + char compver[]= "Version 1.05.0001 " __DATE__ " " __TIME__; char slash= '\\'; #else // !__WIN__ char slash= '/'; @@ -512,13 +512,13 @@ ha_create_table_option connect_table_option_list[]= HA_TOPTION_NUMBER("QUOTED", quoted, (ulonglong) -1, 0, 3, 1), HA_TOPTION_NUMBER("ENDING", ending, (ulonglong) -1, 0, INT_MAX32, 1), HA_TOPTION_NUMBER("COMPRESS", compressed, 0, 0, 2, 1), -//HA_TOPTION_BOOL("COMPRESS", compressed, 0), HA_TOPTION_BOOL("MAPPED", mapped, 0), HA_TOPTION_BOOL("HUGE", huge, 0), HA_TOPTION_BOOL("SPLIT", split, 0), HA_TOPTION_BOOL("READONLY", readonly, 0), HA_TOPTION_BOOL("SEPINDEX", sepindex, 0), - HA_TOPTION_END + HA_TOPTION_BOOL("ZIPPED", zipped, 0), + HA_TOPTION_END }; @@ -532,7 +532,6 @@ ha_create_table_option connect_field_option_list[]= { HA_FOPTION_NUMBER("FLAG", offset, (ulonglong) -1, 0, INT_MAX32, 1), HA_FOPTION_NUMBER("MAX_DIST", freq, 0, 0, INT_MAX32, 1), // BLK_INDX -//HA_FOPTION_NUMBER("DISTRIB", opt, 0, 0, 2, 1), // used for BLK_INDX HA_FOPTION_NUMBER("FIELD_LENGTH", fldlen, 0, 0, INT_MAX32, 1), HA_FOPTION_STRING("DATE_FORMAT", dateformat), HA_FOPTION_STRING("FIELD_FORMAT", fieldformat), @@ -678,7 +677,6 @@ static int connect_init_func(void *p) connect_hton= (handlerton *)p; connect_hton->state= SHOW_OPTION_YES; connect_hton->create= connect_create_handler; -//connect_hton->flags= HTON_TEMPORARY_NOT_SUPPORTED | HTON_NO_PARTITION; connect_hton->flags= HTON_TEMPORARY_NOT_SUPPORTED; connect_hton->table_options= connect_table_option_list; connect_hton->field_options= connect_field_option_list; @@ -1135,7 +1133,9 @@ bool GetBooleanTableOption(PGLOBAL g, PTOS options, char *opname, bool bdef) opval= options->sepindex; else if (!stricmp(opname, "Header")) opval= (options->header != 0); // Is Boolean for some table types - else if (options->oplist) + else if (!stricmp(opname, "Zipped")) + opval = options->zipped; + else if (options->oplist) if ((pv= GetListOption(g, opname, options->oplist))) opval= (!*pv || *pv == 'y' || *pv == 'Y' || atoi(pv) != 0); @@ -1242,8 +1242,10 @@ char *ha_connect::GetStringOption(char *opname, char *sdef) if (opval && (!stricmp(opname, "connect") || !stricmp(opname, "tabname") - || !stricmp(opname, "filename"))) - opval = GetRealString(opval); + || !stricmp(opname, "filename") + || !stricmp(opname, "optname") + || !stricmp(opname, "entry"))) + opval = GetRealString(opval); if (!opval) { if (sdef && !strcmp(sdef, "*")) { @@ -4164,7 +4166,8 @@ bool ha_connect::check_privileges(THD *thd, PTOS options, char *dbn, bool quick) case TAB_DIR: case TAB_MAC: case TAB_WMI: - case TAB_OEM: + case TAB_ZIP: + case TAB_OEM: #ifdef NO_EMBEDDED_ACCESS_CHECKS return false; #endif @@ -5172,13 +5175,13 @@ static int connect_assisted_discovery(handlerton *, THD* thd, char v=0, spc= ',', qch= 0; const char *fncn= "?"; const char *user, *fn, *db, *host, *pwd, *sep, *tbl, *src; - const char *col, *ocl, *rnk, *pic, *fcl, *skc; + const char *col, *ocl, *rnk, *pic, *fcl, *skc, *zfn; char *tab, *dsn, *shm, *dpath; #if defined(__WIN__) char *nsp= NULL, *cls= NULL; #endif // __WIN__ - int port= 0, hdr= 0, mxr= 0, mxe= 0, rc= 0; - int cop __attribute__((unused))= 0, lrecl= 0; +//int hdr, mxe; + int port = 0, mxr = 0, rc = 0, mul = 0, lrecl = 0; #if defined(ODBC_SUPPORT) POPARM sop= NULL; char *ucnc= NULL; @@ -5189,7 +5192,8 @@ static int connect_assisted_discovery(handlerton *, THD* thd, PJPARM sjp= NULL; char *driver= NULL; char *url= NULL; - char *tabtyp = NULL; +//char *prop= NULL; + char *tabtyp= NULL; #endif // JDBC_SUPPORT uint tm, fnc= FNC_NO, supfnc= (FNC_NO | FNC_COL); bool bif, ok= false, dbf= false; @@ -5209,7 +5213,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, if (!g) return HA_ERR_INTERNAL_ERROR; - user= host= pwd= tbl= src= col= ocl= pic= fcl= skc= rnk= dsn= NULL; + user= host= pwd= tbl= src= col= ocl= pic= fcl= skc= rnk= zfn= dsn= NULL; // Get the useful create options ttp= GetTypeID(topt->type); @@ -5222,7 +5226,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, sep= topt->separator; spc= (!sep) ? ',' : *sep; qch= topt->qchar ? *topt->qchar : (signed)topt->quoted >= 0 ? '"' : 0; - hdr= (int)topt->header; + mul = (int)topt->multiple; tbl= topt->tablist; col= topt->colist; @@ -5255,13 +5259,16 @@ static int connect_assisted_discovery(handlerton *, THD* thd, #if defined(JDBC_SUPPORT) driver= GetListOption(g, "Driver", topt->oplist, NULL); // url= GetListOption(g, "URL", topt->oplist, NULL); +// prop = GetListOption(g, "Properties", topt->oplist, NULL); tabtyp = GetListOption(g, "Tabtype", topt->oplist, NULL); #endif // JDBC_SUPPORT - mxe= atoi(GetListOption(g,"maxerr", topt->oplist, "0")); #if defined(PROMPT_OK) cop= atoi(GetListOption(g, "checkdsn", topt->oplist, "0")); #endif // PROMPT_OK - } else { +#if defined(ZIP_SUPPORT) + zfn = GetListOption(g, "Zipfile", topt->oplist, NULL); +#endif // ZIP_SUPPORT + } else { host= "localhost"; user= (ttp == TAB_ODBC ? NULL : "root"); } // endif option_list @@ -5365,6 +5372,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, jdef->SetName(create_info->alias); sjp= (PJPARM)PlugSubAlloc(g, NULL, sizeof(JDBCPARM)); sjp->Driver= driver; +// sjp->Properties = prop; sjp->Fsize= 0; sjp->Scrollable= false; @@ -5467,7 +5475,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, case TAB_XML: #endif // LIBXML2_SUPPORT || DOMDOC_SUPPORT case TAB_JSON: - if (!fn) + if (!fn && !zfn && !mul) sprintf(g->Message, "Missing %s file name", topt->type); else ok= true; @@ -5581,7 +5589,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, NULL, port, fnc == FNC_COL); break; case TAB_CSV: - qrp= CSVColumns(g, dpath, fn, spc, qch, hdr, mxe, fnc == FNC_COL); + qrp = CSVColumns(g, dpath, topt, fnc == FNC_COL); break; #if defined(__WIN__) case TAB_WMI: @@ -6946,7 +6954,7 @@ maria_declare_plugin(connect) 0x0104, /* version number (1.04) */ NULL, /* status variables */ connect_system_variables, /* system variables */ - "1.04.0008", /* string version */ + "1.05.0001", /* string version */ MariaDB_PLUGIN_MATURITY_GAMMA /* maturity */ } maria_declare_plugin_end; diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h index 60194ac0e3c..3d9ff967618 100644 --- a/storage/connect/ha_connect.h +++ b/storage/connect/ha_connect.h @@ -83,42 +83,9 @@ extern handlerton *connect_hton; These can be specified in the CREATE TABLE: CREATE TABLE ( ... ) {...here...} -*/ -#if 0 // moved to mycat.h -typedef struct ha_table_option_struct TOS, *PTOS; -struct ha_table_option_struct { - const char *type; - const char *filename; - const char *optname; - const char *tabname; - const char *tablist; - const char *dbname; - const char *separator; -//const char *connect; - const char *qchar; - const char *module; - const char *subtype; - const char *catfunc; - const char *srcdef; - const char *colist; - const char *oplist; - const char *data_charset; - ulonglong lrecl; - ulonglong elements; -//ulonglong estimate; - ulonglong multiple; - ulonglong header; - ulonglong quoted; - ulonglong ending; - ulonglong compressed; - bool mapped; - bool huge; - bool split; - bool readonly; - bool sepindex; - }; -#endif // 0 + ------ Was moved to mycat.h ------ + */ /** structure for CREATE TABLE options (field options) diff --git a/storage/connect/ioapi.c b/storage/connect/ioapi.c new file mode 100644 index 00000000000..7f5c191b2af --- /dev/null +++ b/storage/connect/ioapi.c @@ -0,0 +1,247 @@ +/* ioapi.h -- IO base function header for compress/uncompress .zip + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + +*/ + +#if defined(_WIN32) && (!(defined(_CRT_SECURE_NO_WARNINGS))) + #define _CRT_SECURE_NO_WARNINGS +#endif + +#if defined(__APPLE__) || defined(IOAPI_NO_64) +// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions +#define FOPEN_FUNC(filename, mode) fopen(filename, mode) +#define FTELLO_FUNC(stream) ftello(stream) +#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) +#else +#define FOPEN_FUNC(filename, mode) fopen64(filename, mode) +#define FTELLO_FUNC(stream) ftello64(stream) +#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) +#endif + + +#include "ioapi.h" + +voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode) +{ + if (pfilefunc->zfile_func64.zopen64_file != NULL) + return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode); + else + { + return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode); + } +} + +long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin) +{ + if (pfilefunc->zfile_func64.zseek64_file != NULL) + return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin); + else + { + uLong offsetTruncated = (uLong)offset; + if (offsetTruncated != offset) + return -1; + else + return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin); + } +} + +ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream) +{ + if (pfilefunc->zfile_func64.zseek64_file != NULL) + return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream); + else + { + uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream); + if ((tell_uLong) == MAXU32) + return (ZPOS64_T)-1; + else + return tell_uLong; + } +} + +void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32) +{ + p_filefunc64_32->zfile_func64.zopen64_file = NULL; + p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file; + p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; + p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file; + p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file; + p_filefunc64_32->zfile_func64.ztell64_file = NULL; + p_filefunc64_32->zfile_func64.zseek64_file = NULL; + p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file; + p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; + p_filefunc64_32->zfile_func64.opaque = p_filefunc32->opaque; + p_filefunc64_32->zseek32_file = p_filefunc32->zseek_file; + p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file; +} + + + +static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode)); +static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size)); +static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size)); +static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream)); +static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); +static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream)); +static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream)); + +static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode) +{ + FILE* file = NULL; + const char* mode_fopen = NULL; + if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) + mode_fopen = "rb"; + else + if (mode & ZLIB_FILEFUNC_MODE_EXISTING) + mode_fopen = "r+b"; + else + if (mode & ZLIB_FILEFUNC_MODE_CREATE) + mode_fopen = "wb"; + + if ((filename!=NULL) && (mode_fopen != NULL)) + file = fopen(filename, mode_fopen); + return file; +} + +static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode) +{ + FILE* file = NULL; + const char* mode_fopen = NULL; + if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) + mode_fopen = "rb"; + else + if (mode & ZLIB_FILEFUNC_MODE_EXISTING) + mode_fopen = "r+b"; + else + if (mode & ZLIB_FILEFUNC_MODE_CREATE) + mode_fopen = "wb"; + + if ((filename!=NULL) && (mode_fopen != NULL)) + file = FOPEN_FUNC((const char*)filename, mode_fopen); + return file; +} + + +static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size) +{ + uLong ret; + ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); + return ret; +} + +static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size) +{ + uLong ret; + ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); + return ret; +} + +static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream) +{ + long ret; + ret = ftell((FILE *)stream); + return ret; +} + + +static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream) +{ + ZPOS64_T ret; + ret = FTELLO_FUNC((FILE *)stream); + return ret; +} + +static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin) +{ + int fseek_origin=0; + long ret; + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + fseek_origin = SEEK_CUR; + break; + case ZLIB_FILEFUNC_SEEK_END : + fseek_origin = SEEK_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + fseek_origin = SEEK_SET; + break; + default: return -1; + } + ret = 0; + if (fseek((FILE *)stream, offset, fseek_origin) != 0) + ret = -1; + return ret; +} + +static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) +{ + int fseek_origin=0; + long ret; + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + fseek_origin = SEEK_CUR; + break; + case ZLIB_FILEFUNC_SEEK_END : + fseek_origin = SEEK_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + fseek_origin = SEEK_SET; + break; + default: return -1; + } + ret = 0; + + if(FSEEKO_FUNC((FILE *)stream, offset, fseek_origin) != 0) + ret = -1; + + return ret; +} + + +static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream) +{ + int ret; + ret = fclose((FILE *)stream); + return ret; +} + +static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream) +{ + int ret; + ret = ferror((FILE *)stream); + return ret; +} + +void fill_fopen_filefunc (pzlib_filefunc_def) + zlib_filefunc_def* pzlib_filefunc_def; +{ + pzlib_filefunc_def->zopen_file = fopen_file_func; + pzlib_filefunc_def->zread_file = fread_file_func; + pzlib_filefunc_def->zwrite_file = fwrite_file_func; + pzlib_filefunc_def->ztell_file = ftell_file_func; + pzlib_filefunc_def->zseek_file = fseek_file_func; + pzlib_filefunc_def->zclose_file = fclose_file_func; + pzlib_filefunc_def->zerror_file = ferror_file_func; + pzlib_filefunc_def->opaque = NULL; +} + +void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def) +{ + pzlib_filefunc_def->zopen64_file = fopen64_file_func; + pzlib_filefunc_def->zread_file = fread_file_func; + pzlib_filefunc_def->zwrite_file = fwrite_file_func; + pzlib_filefunc_def->ztell64_file = ftell64_file_func; + pzlib_filefunc_def->zseek64_file = fseek64_file_func; + pzlib_filefunc_def->zclose_file = fclose_file_func; + pzlib_filefunc_def->zerror_file = ferror_file_func; + pzlib_filefunc_def->opaque = NULL; +} diff --git a/storage/connect/ioapi.h b/storage/connect/ioapi.h new file mode 100644 index 00000000000..4fa73002053 --- /dev/null +++ b/storage/connect/ioapi.h @@ -0,0 +1,209 @@ +/* ioapi.h -- IO base function header for compress/uncompress .zip + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + Changes + + Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this) + Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux. + More if/def section may be needed to support other platforms + Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows. + (but you should use iowin32.c for windows instead) + +*/ + +#ifndef _ZLIBIOAPI64_H +#define _ZLIBIOAPI64_H + +#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__)) + + // Linux needs this to support file operation on files larger then 4+GB + // But might need better if/def to select just the platforms that needs them. + + #ifndef __USE_FILE_OFFSET64 + #define __USE_FILE_OFFSET64 + #endif + #ifndef __USE_LARGEFILE64 + #define __USE_LARGEFILE64 + #endif + #ifndef _LARGEFILE64_SOURCE + #define _LARGEFILE64_SOURCE + #endif + #ifndef _FILE_OFFSET_BIT + #define _FILE_OFFSET_BIT 64 + #endif + +#endif + +#include +#include +#include "zlib.h" + +#if defined(USE_FILE32API) +#define fopen64 fopen +#define ftello64 ftell +#define fseeko64 fseek +#else +#ifdef __FreeBSD__ +#define fopen64 fopen +#define ftello64 ftello +#define fseeko64 fseeko +#endif +#ifdef _MSC_VER + #define fopen64 fopen + #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) + #define ftello64 _ftelli64 + #define fseeko64 _fseeki64 + #else // old MSC + #define ftello64 ftell + #define fseeko64 fseek + #endif +#endif +#endif + +/* +#ifndef ZPOS64_T + #ifdef _WIN32 + #define ZPOS64_T fpos_t + #else + #include + #define ZPOS64_T uint64_t + #endif +#endif +*/ + +#ifdef HAVE_MINIZIP64_CONF_H +#include "mz64conf.h" +#endif + +/* a type choosen by DEFINE */ +#ifdef HAVE_64BIT_INT_CUSTOM +typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T; +#else +#ifdef HAS_STDINT_H +#include "stdint.h" +typedef uint64_t ZPOS64_T; +#else + +/* Maximum unsigned 32-bit value used as placeholder for zip64 */ +#define MAXU32 0xffffffff + +#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef unsigned __int64 ZPOS64_T; +#else +typedef unsigned long long int ZPOS64_T; +#endif +#endif +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + + +#define ZLIB_FILEFUNC_SEEK_CUR (1) +#define ZLIB_FILEFUNC_SEEK_END (2) +#define ZLIB_FILEFUNC_SEEK_SET (0) + +#define ZLIB_FILEFUNC_MODE_READ (1) +#define ZLIB_FILEFUNC_MODE_WRITE (2) +#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) + +#define ZLIB_FILEFUNC_MODE_EXISTING (4) +#define ZLIB_FILEFUNC_MODE_CREATE (8) + + +#ifndef ZCALLBACK + #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) + #define ZCALLBACK CALLBACK + #else + #define ZCALLBACK + #endif +#endif + +#ifndef OF +#define OF(args) args +#endif + +typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); +typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); +typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); +typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); +typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); + +typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); +typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); + + +/* here is the "old" 32 bits structure structure */ +typedef struct zlib_filefunc_def_s +{ + open_file_func zopen_file; + read_file_func zread_file; + write_file_func zwrite_file; + tell_file_func ztell_file; + seek_file_func zseek_file; + close_file_func zclose_file; + testerror_file_func zerror_file; + voidpf opaque; +} zlib_filefunc_def; + +typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream)); +typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); +typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode)); + +typedef struct zlib_filefunc64_def_s +{ + open64_file_func zopen64_file; + read_file_func zread_file; + write_file_func zwrite_file; + tell64_file_func ztell64_file; + seek64_file_func zseek64_file; + close_file_func zclose_file; + testerror_file_func zerror_file; + voidpf opaque; +} zlib_filefunc64_def; + +void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def)); +void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); + +/* now internal definition, only for zip.c and unzip.h */ +typedef struct zlib_filefunc64_32_def_s +{ + zlib_filefunc64_def zfile_func64; + open_file_func zopen32_file; + tell_file_func ztell32_file; + seek_file_func zseek32_file; +} zlib_filefunc64_32_def; + + +#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) +#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) +//#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) +//#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode)) +#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) +#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream)) + +voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)); +long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)); +ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)); + +void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32); + +#define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode))) +#define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream))) +#define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode))) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/storage/connect/jdbccat.h b/storage/connect/jdbccat.h index 37f33d7063d..7108aa376ce 100644 --- a/storage/connect/jdbccat.h +++ b/storage/connect/jdbccat.h @@ -8,6 +8,7 @@ typedef struct jdbc_parms { char *Url; // Driver URL char *User; // User connect info char *Pwd; // Password connect info +//char *Properties; // Connection property list //int Cto; // Connect timeout //int Qto; // Query timeout int Fsize; // Fetch size diff --git a/storage/connect/jdbconn.cpp b/storage/connect/jdbconn.cpp index dca9bd0eac4..a69f84a94a1 100644 --- a/storage/connect/jdbconn.cpp +++ b/storage/connect/jdbconn.cpp @@ -55,9 +55,8 @@ #if defined(__WIN__) extern "C" HINSTANCE s_hModule; // Saved module handle -#else // !__WIN__ +#endif // __WIN__ #define nullptr 0 -#endif // !__WIN__ TYPCONV GetTypeConv(); int GetConvSize(); @@ -525,10 +524,10 @@ JDBConn::JDBConn(PGLOBAL g, TDBJDBC *tdbp) m_Wrap = strcat(strcpy(wn, "wrappers/"), m_Wrap); } // endif m_Wrap - m_Driver = NULL; - m_Url = NULL; - m_User = NULL; - m_Pwd = NULL; +//m_Driver = NULL; +//m_Url = NULL; +//m_User = NULL; +//m_Pwd = NULL; m_Ncol = 0; m_Aff = 0; m_Rows = 0; @@ -772,7 +771,7 @@ bool JDBConn::GetJVM(PGLOBAL g) /***********************************************************************/ int JDBConn::Open(PJPARM sop) { - + int irc = RC_FX; bool err = false; jboolean jt = (trace > 0); PGLOBAL& g = m_G; @@ -865,30 +864,37 @@ int JDBConn::Open(PJPARM sop) switch (rc) { case JNI_OK: strcpy(g->Message, "VM successfully created"); + irc = RC_OK; break; case JNI_ERR: strcpy(g->Message, "Initialising JVM failed: unknown error"); - return RC_FX; + break; case JNI_EDETACHED: strcpy(g->Message, "Thread detached from the VM"); - return RC_FX; + break; case JNI_EVERSION: strcpy(g->Message, "JNI version error"); - return RC_FX; + break; case JNI_ENOMEM: strcpy(g->Message, "Not enough memory"); - return RC_FX; + break; case JNI_EEXIST: strcpy(g->Message, "VM already created"); - return RC_FX; + break; case JNI_EINVAL: strcpy(g->Message, "Invalid arguments"); - return RC_FX; + break; default: - sprintf(g->Message, "Unknown return code %d", rc); - return RC_FX; + sprintf(g->Message, "Unknown return code %d", (int)rc); + break; } // endswitch rc + if (trace) + htrc("%s\n", g->Message); + + if (irc != RC_OK) + return irc; + //=============== Display JVM version =============== jint ver = env->GetVersion(); printf("JVM Version %d.%d\n", ((ver>>16)&0x0f), (ver&0x0f)); @@ -978,10 +984,10 @@ int JDBConn::Open(PJPARM sop) jobjectArray parms = env->NewObjectArray(4, // constructs java array of 4 env->FindClass("java/lang/String"), NULL); // Strings - m_Driver = sop->Driver; - m_Url = sop->Url; - m_User = sop->User; - m_Pwd = sop->Pwd; +//m_Driver = sop->Driver; +//m_Url = sop->Url; +//m_User = sop->User; +//m_Pwd = sop->Pwd; m_Scrollable = sop->Scrollable; m_RowsetSize = sop->Fsize; //m_LoginTimeout = sop->Cto; @@ -989,17 +995,20 @@ int JDBConn::Open(PJPARM sop) //m_UseCnc = sop->UseCnc; // change some elements - if (m_Driver) - env->SetObjectArrayElement(parms, 0, env->NewStringUTF(m_Driver)); + if (sop->Driver) + env->SetObjectArrayElement(parms, 0, env->NewStringUTF(sop->Driver)); - if (m_Url) - env->SetObjectArrayElement(parms, 1, env->NewStringUTF(m_Url)); + if (sop->Url) + env->SetObjectArrayElement(parms, 1, env->NewStringUTF(sop->Url)); - if (m_User) - env->SetObjectArrayElement(parms, 2, env->NewStringUTF(m_User)); + if (sop->User) + env->SetObjectArrayElement(parms, 2, env->NewStringUTF(sop->User)); - if (m_Pwd) - env->SetObjectArrayElement(parms, 3, env->NewStringUTF(m_Pwd)); + if (sop->Pwd) + env->SetObjectArrayElement(parms, 3, env->NewStringUTF(sop->Pwd)); + +//if (sop->Properties) +// env->SetObjectArrayElement(parms, 4, env->NewStringUTF(sop->Properties)); // call method rc = env->CallIntMethod(job, cid, parms, m_RowsetSize, m_Scrollable); @@ -1432,7 +1441,7 @@ bool JDBConn::SetParam(JDBCCOL *colp) PGLOBAL& g = m_G; bool rc = false; PVAL val = colp->GetValue(); - jint n, i = (jint)colp->GetRank(); + jint n, jrc = 0, i = (jint)colp->GetRank(); jshort s; jlong lg; //jfloat f; @@ -1442,69 +1451,74 @@ bool JDBConn::SetParam(JDBCCOL *colp) jstring jst = nullptr; jmethodID dtc, setid = nullptr; - switch (val->GetType()) { - case TYPE_STRING: - if (gmID(g, setid, "SetStringParm", "(ILjava/lang/String;)V")) + if (val->GetNullable() && val->IsNull()) { + if (gmID(g, setid, "SetNullParm", "(II)I")) return true; - jst = env->NewStringUTF(val->GetCharValue()); - env->CallVoidMethod(job, setid, i, jst); - break; - case TYPE_INT: - if (gmID(g, setid, "SetIntParm", "(II)V")) - return true; + jrc = env->CallIntMethod(job, setid, i, (jint)GetJDBCType(val->GetType())); + } else switch (val->GetType()) { + case TYPE_STRING: + if (gmID(g, setid, "SetStringParm", "(ILjava/lang/String;)V")) + return true; - n = (jint)val->GetIntValue(); - env->CallVoidMethod(job, setid, i, n); - break; - case TYPE_TINY: - case TYPE_SHORT: - if (gmID(g, setid, "SetShortParm", "(IS)V")) - return true; + jst = env->NewStringUTF(val->GetCharValue()); + env->CallVoidMethod(job, setid, i, jst); + break; + case TYPE_INT: + if (gmID(g, setid, "SetIntParm", "(II)V")) + return true; - s = (jshort)val->GetShortValue(); - env->CallVoidMethod(job, setid, i, s); - break; - case TYPE_BIGINT: - if (gmID(g, setid, "SetBigintParm", "(IJ)V")) - return true; + n = (jint)val->GetIntValue(); + env->CallVoidMethod(job, setid, i, n); + break; + case TYPE_TINY: + case TYPE_SHORT: + if (gmID(g, setid, "SetShortParm", "(IS)V")) + return true; - lg = (jlong)val->GetBigintValue(); - env->CallVoidMethod(job, setid, i, lg); - break; - case TYPE_DOUBLE: - case TYPE_DECIM: - if (gmID(g, setid, "SetDoubleParm", "(ID)V")) - return true; + s = (jshort)val->GetShortValue(); + env->CallVoidMethod(job, setid, i, s); + break; + case TYPE_BIGINT: + if (gmID(g, setid, "SetBigintParm", "(IJ)V")) + return true; - d = (jdouble)val->GetFloatValue(); - env->CallVoidMethod(job, setid, i, d); - break; - case TYPE_DATE: - if ((dat = env->FindClass("java/sql/Timestamp")) == nullptr) { - strcpy(g->Message, "Cannot find Timestamp class"); - return true; - } else if (!(dtc = env->GetMethodID(dat, "", "(J)V"))) { - strcpy(g->Message, "Cannot find Timestamp class constructor"); - return true; - } // endif's + lg = (jlong)val->GetBigintValue(); + env->CallVoidMethod(job, setid, i, lg); + break; + case TYPE_DOUBLE: + case TYPE_DECIM: + if (gmID(g, setid, "SetDoubleParm", "(ID)V")) + return true; - lg = (jlong)val->GetBigintValue() * 1000; + d = (jdouble)val->GetFloatValue(); + env->CallVoidMethod(job, setid, i, d); + break; + case TYPE_DATE: + if ((dat = env->FindClass("java/sql/Timestamp")) == nullptr) { + strcpy(g->Message, "Cannot find Timestamp class"); + return true; + } else if (!(dtc = env->GetMethodID(dat, "", "(J)V"))) { + strcpy(g->Message, "Cannot find Timestamp class constructor"); + return true; + } // endif's - if ((datobj = env->NewObject(dat, dtc, lg)) == nullptr) { - strcpy(g->Message, "Cannot make Timestamp object"); - return true; - } else if (gmID(g, setid, "SetTimestampParm", "(ILjava/sql/Timestamp;)V")) + lg = (jlong)val->GetBigintValue() * 1000; + + if ((datobj = env->NewObject(dat, dtc, lg)) == nullptr) { + strcpy(g->Message, "Cannot make Timestamp object"); + return true; + } else if (gmID(g, setid, "SetTimestampParm", "(ILjava/sql/Timestamp;)V")) + return true; + + env->CallVoidMethod(job, setid, i, datobj); + break; + default: + sprintf(g->Message, "Parm type %d not supported", val->GetType()); return true; + } // endswitch Type - env->CallVoidMethod(job, setid, i, datobj); - break; - default: - sprintf(g->Message, "Parm type %d not supported", val->GetType()); - return true; - } // endswitch Type - - if (Check()) { + if (Check(jrc)) { sprintf(g->Message, "SetParam: col=%s msg=%s", colp->GetName(), Msg); rc = true; } // endif msg diff --git a/storage/connect/jdbconn.h b/storage/connect/jdbconn.h index 0a1c52d4576..9d428142839 100644 --- a/storage/connect/jdbconn.h +++ b/storage/connect/jdbconn.h @@ -180,9 +180,9 @@ protected: char *Msg; char *m_Wrap; char m_IDQuoteChar[2]; - PSZ m_Driver; - PSZ m_Url; - PSZ m_User; +//PSZ m_Driver; +//PSZ m_Url; +//PSZ m_User; PSZ m_Pwd; int m_Ncol; int m_Aff; diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp index 88931ea6c13..bc7f231814d 100644 --- a/storage/connect/jsonudf.cpp +++ b/storage/connect/jsonudf.cpp @@ -5263,3 +5263,50 @@ char *envar(UDF_INIT *initid, UDF_ARGS *args, char *result, return str; } // end of envar +/*********************************************************************************/ +/* Returns the distinct number of B occurences in A. */ +/*********************************************************************************/ +my_bool countin_init(UDF_INIT *initid, UDF_ARGS *args, char *message) +{ + if (args->arg_count != 2) { + strcpy(message, "This function must have 2 arguments"); + return true; + } else if (args->arg_type[0] != STRING_RESULT) { + strcpy(message, "First argument must be string"); + return true; + } else if (args->arg_type[1] != STRING_RESULT) { + strcpy(message, "Second argument is not a string"); + return true; + } // endif args + + return false; +} // end of countin_init + +long long countin(UDF_INIT *initid, UDF_ARGS *args, char *result, + unsigned long *res_length, char *is_null, char *) +{ + PSZ str1, str2; + char *s; + long long n = 0; + size_t lg; + + lg = (size_t)args->lengths[0]; + s = str1 = (PSZ)malloc(lg + 1); + memcpy(str1, args->args[0], lg); + str1[lg] = 0; + + lg = (size_t)args->lengths[1]; + str2 = (PSZ)malloc(lg + 1); + memcpy(str2, args->args[1], lg); + str2[lg] = 0; + + while (s = strstr(s, str2)) { + n++; + s += lg; + } // endwhile + + free(str1); + free(str2); + return n; +} // end of countin + diff --git a/storage/connect/jsonudf.h b/storage/connect/jsonudf.h index 1406d9f2f2e..d2890421c62 100644 --- a/storage/connect/jsonudf.h +++ b/storage/connect/jsonudf.h @@ -221,6 +221,9 @@ extern "C" { DllExport my_bool envar_init(UDF_INIT*, UDF_ARGS*, char*); DllExport char *envar(UDF_EXEC_ARGS); + + DllExport my_bool countin_init(UDF_INIT*, UDF_ARGS*, char*); + DllExport long long countin(UDF_EXEC_ARGS); } // extern "C" diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp index c2882fc0d7c..2470d37c353 100644 --- a/storage/connect/libdoc.cpp +++ b/storage/connect/libdoc.cpp @@ -1,6 +1,6 @@ /******************************************************************/ /* Implementation of XML document processing using libxml2 */ -/* Author: Olivier Bertrand 2007-2015 */ +/* Author: Olivier Bertrand 2007-2016 */ /******************************************************************/ #include "my_global.h" #include @@ -68,8 +68,8 @@ class LIBXMLDOC : public XMLDOCUMENT { virtual void SetNofree(bool b) {Nofreelist = b;} // Methods - virtual bool Initialize(PGLOBAL g); - virtual bool ParseFile(char *fn); + virtual bool Initialize(PGLOBAL g, char *entry, bool zipped); + virtual bool ParseFile(PGLOBAL g, char *fn); virtual bool NewDoc(PGLOBAL g, char *ver); virtual void AddComment(PGLOBAL g, char *com); virtual PXNODE GetRoot(PGLOBAL g); @@ -373,22 +373,33 @@ LIBXMLDOC::LIBXMLDOC(char *nsl, char *nsdf, char *enc, PFBLOCK fp) /******************************************************************/ /* Initialize XML parser and check library compatibility. */ /******************************************************************/ -bool LIBXMLDOC::Initialize(PGLOBAL g) - { +bool LIBXMLDOC::Initialize(PGLOBAL g, char *entry, bool zipped) +{ + if (zipped && InitZip(g, entry)) + return true; + int n = xmlKeepBlanksDefault(1); return MakeNSlist(g); - } // end of Initialize +} // end of Initialize /******************************************************************/ /* Parse the XML file and construct node tree in memory. */ /******************************************************************/ -bool LIBXMLDOC::ParseFile(char *fn) +bool LIBXMLDOC::ParseFile(PGLOBAL g, char *fn) { if (trace) htrc("ParseFile\n"); - if ((Docp = xmlParseFile(fn))) { - if (Docp->encoding) + if (zip) { + // Parse an in memory document + char *xdoc = GetMemDoc(g, fn); + + Docp = (xdoc) ? xmlParseDoc((const xmlChar *)xdoc) : NULL; + } else + Docp = xmlParseFile(fn); + + if (Docp) { + if (Docp->encoding) Encoding = (char*)Docp->encoding; return false; @@ -609,6 +620,7 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp) } // endif xp CloseXML2File(g, xp, false); + CloseZip(); } // end of Close /******************************************************************/ diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc index b4b03e6ba4a..497fe5e1aa8 100644 --- a/storage/connect/mycat.cc +++ b/storage/connect/mycat.cc @@ -16,7 +16,7 @@ /*************** Mycat CC Program Source Code File (.CC) ***************/ /* PROGRAM NAME: MYCAT */ /* ------------- */ -/* Version 1.4 */ +/* Version 1.5 */ /* */ /* Author: Olivier Bertrand 2012 - 2016 */ /* */ @@ -64,7 +64,9 @@ #include "filamtxt.h" #include "tabdos.h" #include "tabfmt.h" +#if defined(VCT_SUPPORT) #include "tabvct.h" +#endif // VCT_SUPPORT #include "tabsys.h" #if defined(__WIN__) #include "tabmac.h" @@ -93,6 +95,9 @@ #if defined(XML_SUPPORT) #include "tabxml.h" #endif // XML_SUPPORT +#if defined(ZIP_SUPPORT) +#include "tabzip.h" +#endif // ZIP_SUPPORT #include "mycat.h" /***********************************************************************/ @@ -152,7 +157,10 @@ TABTYPE GetTypeID(const char *type) #endif : (!stricmp(type, "VIR")) ? TAB_VIR : (!stricmp(type, "JSON")) ? TAB_JSON - : (!stricmp(type, "OEM")) ? TAB_OEM : TAB_NIY; +#ifdef ZIP_SUPPORT + : (!stricmp(type, "ZIP")) ? TAB_ZIP +#endif + : (!stricmp(type, "OEM")) ? TAB_OEM : TAB_NIY; } // end of GetTypeID /***********************************************************************/ @@ -173,6 +181,7 @@ bool IsFileType(TABTYPE type) case TAB_INI: case TAB_VEC: case TAB_JSON: +// case TAB_ZIP: isfile= true; break; default: @@ -549,7 +558,9 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) #if defined(XML_SUPPORT) case TAB_XML: tdp= new(g) XMLDEF; break; #endif // XML_SUPPORT - case TAB_VEC: tdp= new(g) VCTDEF; break; +#if defined(VCT_SUPPORT) + case TAB_VEC: tdp = new(g)VCTDEF; break; +#endif // VCT_SUPPORT #if defined(ODBC_SUPPORT) case TAB_ODBC: tdp= new(g) ODBCDEF; break; #endif // ODBC_SUPPORT @@ -571,7 +582,10 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) #endif // PIVOT_SUPPORT case TAB_VIR: tdp= new(g) VIRDEF; break; case TAB_JSON: tdp= new(g) JSONDEF; break; - default: +#if defined(ZIP_SUPPORT) + case TAB_ZIP: tdp= new(g) ZIPDEF; break; +#endif // ZIP_SUPPORT + default: sprintf(g->Message, MSG(BAD_TABLE_TYPE), am, name); } // endswitch diff --git a/storage/connect/mycat.h b/storage/connect/mycat.h index 05163f08f1b..663b68fd4b9 100644 --- a/storage/connect/mycat.h +++ b/storage/connect/mycat.h @@ -62,6 +62,7 @@ struct ha_table_option_struct { bool split; bool readonly; bool sepindex; + bool zipped; }; // Possible value for catalog functions diff --git a/storage/connect/mysql-test/connect/disabled.def b/storage/connect/mysql-test/connect/disabled.def index 64d7ece3fe1..0e5a5fc64e3 100644 --- a/storage/connect/mysql-test/connect/disabled.def +++ b/storage/connect/mysql-test/connect/disabled.def @@ -9,8 +9,8 @@ # Do not use any TAB characters for whitespace. # ############################################################################## -jdbc : Variable settings depend on machine configuration -jdbc_new : Variable settings depend on machine configuration +#jdbc : Variable settings depend on machine configuration +#jdbc_new : Variable settings depend on machine configuration jdbc_oracle : Variable settings depend on machine configuration jdbc_postgresql : Variable settings depend on machine configuration json : TABLE_TYPE = JSON conflicts with the SQL syntax diff --git a/storage/connect/mysql-test/connect/r/dir.result b/storage/connect/mysql-test/connect/r/dir.result index 34a591fb26c..99556c9b72d 100644 --- a/storage/connect/mysql-test/connect/r/dir.result +++ b/storage/connect/mysql-test/connect/r/dir.result @@ -25,6 +25,7 @@ SELECT fname, ftype, size FROM t1 ORDER BY fname, ftype, size; fname ftype size boys .txt 282 boyswin .txt 288 +SET STATEMENT sql_mode = '' FOR INSERT INTO t1 VALUES ('','','',''); ERROR HY000: Got error 174 'COLBLK SetBuffer: undefined Access Method' from CONNECT DROP TABLE t1; diff --git a/storage/connect/mysql-test/connect/r/jdbc_new.result b/storage/connect/mysql-test/connect/r/jdbc_new.result index 14381b0b11f..5cc4826213d 100644 --- a/storage/connect/mysql-test/connect/r/jdbc_new.result +++ b/storage/connect/mysql-test/connect/r/jdbc_new.result @@ -56,7 +56,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='jdbc:mysql://127.0.0.1:SLAVE_PORT/test?user=root' `TABLE_TYPE`='JDBC' SELECT * FROM t1; a b -0 NULL +NULL NULL 0 test00 1 test01 2 test02 @@ -72,7 +72,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='jdbc:mysql://127.0.0.1:SLAVE_PORT/test?user=root' `TABLE_TYPE`=JDBC `TABNAME`='t1' SELECT * FROM t1; a b -0 NULL +NULL NULL 0 test00 1 test01 2 test02 @@ -104,7 +104,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='jdbc:mysql://127.0.0.1:SLAVE_PORT/test?user=root' `TABLE_TYPE`=JDBC SELECT * FROM t1; a b -0 NULL +NULL NULL 0 0 1 0 2 0 diff --git a/storage/connect/mysql-test/connect/r/mysql_exec.result b/storage/connect/mysql-test/connect/r/mysql_exec.result index b6606ab5978..1801456fd74 100644 --- a/storage/connect/mysql-test/connect/r/mysql_exec.result +++ b/storage/connect/mysql-test/connect/r/mysql_exec.result @@ -31,9 +31,8 @@ insert into t1(msg) values('One'),(NULL),('Three') 1 3 Affected rows Warning 0 1048 Column 'msg' cannot be null insert into t1 values(2,'Deux') on duplicate key update msg = 'Two' 0 2 Affected rows insert into t1(message) values('Four'),('Five'),('Six') 0 1054 Remote: Unknown column 'message' in 'field list' -insert into t1(id) values(NULL) 1 1 Affected rows -Warning 0 1364 Field 'msg' doesn't have a default value -update t1 set msg = 'Four' where id = 4 0 1 Affected rows +insert into t1(id) values(NULL) 0 1364 Remote: Field 'msg' doesn't have a default value +update t1 set msg = 'Four' where id = 4 0 0 Affected rows select * from t1 0 2 Result set columns # # Checking Using Procedure @@ -46,11 +45,10 @@ READS SQL DATA SELECT * FROM t1 WHERE command IN ('Warning','Note',cmd); CALL p1('insert into t1(id) values(NULL)'); command warnings number message -insert into t1(id) values(NULL) 1 1 Affected rows -Warning 0 1364 Field 'msg' doesn't have a default value +insert into t1(id) values(NULL) 0 1364 Remote: Field 'msg' doesn't have a default value CALL p1('update t1 set msg = "Five" where id = 5'); command warnings number message -update t1 set msg = "Five" where id = 5 0 1 Affected rows +update t1 set msg = "Five" where id = 5 0 0 Affected rows DROP PROCEDURE p1; DROP TABLE t1; connection slave; @@ -59,8 +57,6 @@ id msg 1 One 2 Two 3 Three -4 Four -5 Five DROP TABLE t1; connection master; DROP TABLE IF EXISTS connect.t1; diff --git a/storage/connect/mysql-test/connect/r/mysql_new.result b/storage/connect/mysql-test/connect/r/mysql_new.result index 9236ee691e5..69402ff7532 100644 --- a/storage/connect/mysql-test/connect/r/mysql_new.result +++ b/storage/connect/mysql-test/connect/r/mysql_new.result @@ -203,7 +203,7 @@ t1 CREATE TABLE `t1` ( `d` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `e` year(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES('2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23'); +INSERT IGNORE INTO t1 VALUES('2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23'); Warnings: Note 1265 Data truncated for column 'a' at row 1 Note 1265 Data truncated for column 'c' at row 1 diff --git a/storage/connect/mysql-test/connect/r/unsigned.result b/storage/connect/mysql-test/connect/r/unsigned.result index b993133a3c4..ca5a5ffe31e 100644 --- a/storage/connect/mysql-test/connect/r/unsigned.result +++ b/storage/connect/mysql-test/connect/r/unsigned.result @@ -27,13 +27,13 @@ UPDATE t1 SET e = d; SELECT * FROM t1; a b c d e 255 65535 4294967295 18446744073709551615 18446744073709551615 -UPDATE t1 SET c = d; +UPDATE IGNORE t1 SET c = d; Warnings: Warning 1264 Out of range value for column 'c' at row 1 SELECT * FROM t1; a b c d e 255 65535 4294967295 18446744073709551615 18446744073709551615 -UPDATE t1 SET c = e; +UPDATE IGNORE t1 SET c = e; Warnings: Warning 1264 Out of range value for column 'c' at row 1 SELECT * FROM t1; diff --git a/storage/connect/mysql-test/connect/r/upd.result b/storage/connect/mysql-test/connect/r/upd.result index fa519c4b688..8faf00896bb 100644 --- a/storage/connect/mysql-test/connect/r/upd.result +++ b/storage/connect/mysql-test/connect/r/upd.result @@ -1,3 +1,4 @@ +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE employee ( serialno CHAR(5) NOT NULL, @@ -1625,3 +1626,4 @@ serialno name sex title manager department secretary salary # DROP PROCEDURE test.tst_up; DROP TABLE employee; +SET sql_mode = DEFAULT; diff --git a/storage/connect/mysql-test/connect/std_data/JdbcMariaDB.jar b/storage/connect/mysql-test/connect/std_data/JdbcMariaDB.jar index 81f91e4465a..8525da74018 100644 Binary files a/storage/connect/mysql-test/connect/std_data/JdbcMariaDB.jar and b/storage/connect/mysql-test/connect/std_data/JdbcMariaDB.jar differ diff --git a/storage/connect/mysql-test/connect/t/dir.test b/storage/connect/mysql-test/connect/t/dir.test index fb69813d9f0..8a56d4f8829 100644 --- a/storage/connect/mysql-test/connect/t/dir.test +++ b/storage/connect/mysql-test/connect/t/dir.test @@ -26,6 +26,7 @@ SELECT fname, ftype, size FROM t1 ORDER BY fname, ftype, size; # TODO: add a better error message --error ER_GET_ERRMSG +SET STATEMENT sql_mode = '' FOR INSERT INTO t1 VALUES ('','','',''); DROP TABLE t1; diff --git a/storage/connect/mysql-test/connect/t/jdbc.test b/storage/connect/mysql-test/connect/t/jdbc.test index 41fd298776b..58a527a3e6b 100644 --- a/storage/connect/mysql-test/connect/t/jdbc.test +++ b/storage/connect/mysql-test/connect/t/jdbc.test @@ -1,3 +1,4 @@ +-- source windows.inc -- source jdbconn.inc SET GLOBAL time_zone='+1:00'; diff --git a/storage/connect/mysql-test/connect/t/jdbc_new.test b/storage/connect/mysql-test/connect/t/jdbc_new.test index d1ad5117b72..5586cf8c027 100644 --- a/storage/connect/mysql-test/connect/t/jdbc_new.test +++ b/storage/connect/mysql-test/connect/t/jdbc_new.test @@ -5,6 +5,7 @@ connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); connection master; +-- source windows.inc -- source jdbconn.inc connection slave; diff --git a/storage/connect/mysql-test/connect/t/mysql_new.test b/storage/connect/mysql-test/connect/t/mysql_new.test index de9cae7b87b..db9b1b704fc 100644 --- a/storage/connect/mysql-test/connect/t/mysql_new.test +++ b/storage/connect/mysql-test/connect/t/mysql_new.test @@ -306,7 +306,7 @@ DROP TABLE t1; CREATE TABLE t1 (a date, b datetime, c time, d timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, e year); SHOW CREATE TABLE t1; -INSERT INTO t1 VALUES('2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23'); +INSERT IGNORE INTO t1 VALUES('2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23'); SELECT * FROM t1; connection master; diff --git a/storage/connect/mysql-test/connect/t/unsigned.test b/storage/connect/mysql-test/connect/t/unsigned.test index 44eb832f8ae..48f6bdc835c 100644 --- a/storage/connect/mysql-test/connect/t/unsigned.test +++ b/storage/connect/mysql-test/connect/t/unsigned.test @@ -13,9 +13,9 @@ INSERT INTO t1(a,b,c,d) VALUES(255,65535,4294967295,18446744073709551615); SELECT * FROM t1; UPDATE t1 SET e = d; SELECT * FROM t1; -UPDATE t1 SET c = d; +UPDATE IGNORE t1 SET c = d; SELECT * FROM t1; -UPDATE t1 SET c = e; +UPDATE IGNORE t1 SET c = e; SELECT * FROM t1; UPDATE t1 SET d = e; SELECT * FROM t1; diff --git a/storage/connect/mysql-test/connect/t/upd.test b/storage/connect/mysql-test/connect/t/upd.test index a3716694c4a..28b566b5641 100644 --- a/storage/connect/mysql-test/connect/t/upd.test +++ b/storage/connect/mysql-test/connect/t/upd.test @@ -1,6 +1,8 @@ let $MYSQLD_DATADIR= `select @@datadir`; --copy_file $MTR_SUITE_DIR/std_data/employee.dat $MYSQLD_DATADIR/test/employee.dat +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; + CREATE TABLE employee ( serialno CHAR(5) NOT NULL, @@ -150,4 +152,6 @@ CALL test.tst_up(); DROP PROCEDURE test.tst_up; DROP TABLE employee; +SET sql_mode = DEFAULT; + --remove_file $MYSQLD_DATADIR/test/employee.dat diff --git a/storage/connect/mysql-test/connect/t/windows.inc b/storage/connect/mysql-test/connect/t/windows.inc new file mode 100644 index 00000000000..88553d8aa59 --- /dev/null +++ b/storage/connect/mysql-test/connect/t/windows.inc @@ -0,0 +1,5 @@ +if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`) +{ + skip Need windows; +} + diff --git a/storage/connect/plgdbsem.h b/storage/connect/plgdbsem.h index 910ce97f48a..cb408494319 100644 --- a/storage/connect/plgdbsem.h +++ b/storage/connect/plgdbsem.h @@ -1,9 +1,9 @@ /************** PlgDBSem H Declares Source Code File (.H) **************/ -/* Name: PLGDBSEM.H Version 3.6 */ +/* Name: PLGDBSEM.H Version 3.7 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */ +/* (C) Copyright to the author Olivier BERTRAND 1998-2016 */ /* */ -/* This file contains the PlugDB++ application type definitions. */ +/* This file contains the CONNECT storage engine definitions. */ /***********************************************************************/ /***********************************************************************/ @@ -49,7 +49,8 @@ enum BLKTYP {TYPE_TABLE = 50, /* Table Name/Srcdef/... Block */ TYPE_FB_MAP = 23, /* Mapped file block (storage) */ TYPE_FB_HANDLE = 24, /* File block (handle) */ TYPE_FB_XML = 21, /* DOM XML file block */ - TYPE_FB_XML2 = 27}; /* libxml2 XML file block */ + TYPE_FB_XML2 = 27, /* libxml2 XML file block */ + TYPE_FB_ZIP = 28}; /* ZIP file block */ enum TABTYPE {TAB_UNDEF = 0, /* Table of undefined type */ TAB_DOS = 1, /* Fixed column offset, variable LRECL */ @@ -78,7 +79,8 @@ enum TABTYPE {TAB_UNDEF = 0, /* Table of undefined type */ TAB_JCT = 24, /* Junction tables NIY */ TAB_DMY = 25, /* DMY Dummy tables NIY */ TAB_JDBC = 26, /* Table accessed via JDBC */ - TAB_NIY = 27}; /* Table not implemented yet */ + TAB_ZIP = 27, /* ZIP file info table */ + TAB_NIY = 28}; /* Table not implemented yet */ enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */ TYPE_AM_ROWID = 1, /* ROWID type (special column) */ @@ -123,7 +125,7 @@ enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */ TYPE_AM_PRX = 129, /* PROXY access method type no */ TYPE_AM_XTB = 130, /* SYS table access method type */ TYPE_AM_BLK = 131, /* BLK access method type no */ - TYPE_AM_ZIP = 132, /* ZIP access method type no */ + TYPE_AM_GZ = 132, /* GZ access method type no */ TYPE_AM_ZLIB = 133, /* ZLIB access method type no */ TYPE_AM_JSON = 134, /* JSON access method type no */ TYPE_AM_JSN = 135, /* JSN access method type no */ @@ -140,7 +142,8 @@ enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */ TYPE_AM_MYSQL = 192, /* MYSQL access method type no */ TYPE_AM_MYX = 193, /* MYSQL EXEC access method type */ TYPE_AM_CAT = 195, /* Catalog access method type no */ - TYPE_AM_OUT = 200}; /* Output relations (storage) */ + TYPE_AM_ZIP = 198, /* ZIP access method type no */ + TYPE_AM_OUT = 200}; /* Output relations (storage) */ enum RECFM {RECFM_NAF = -2, /* Not a file */ RECFM_OEM = -1, /* OEM file access method */ diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp index 13c0dfd1e18..83975c6d8fa 100644 --- a/storage/connect/plgdbutl.cpp +++ b/storage/connect/plgdbutl.cpp @@ -68,6 +68,9 @@ #include "tabcol.h" // header of XTAB and COLUMN classes #include "valblk.h" #include "rcmsg.h" +#ifdef ZIP_SUPPORT +#include "filamzip.h" +#endif // ZIP_SUPPORT /***********************************************************************/ /* DB static variables. */ @@ -934,7 +937,16 @@ int PlugCloseFile(PGLOBAL g __attribute__((unused)), PFBLOCK fp, bool all) CloseXML2File(g, fp, all); break; #endif // LIBXML2_SUPPORT - default: +#ifdef ZIP_SUPPORT + case TYPE_FB_ZIP: + ((ZIPUTIL*)fp->File)->close(); + fp->Memory = NULL; + fp->Mode = MODE_ANY; + fp->Count = 0; + fp->File = NULL; + break; +#endif // ZIP_SUPPORT + default: rc = RC_FX; } // endswitch Type diff --git a/storage/connect/plgxml.cpp b/storage/connect/plgxml.cpp index 3061a6d697e..71b72621b06 100644 --- a/storage/connect/plgxml.cpp +++ b/storage/connect/plgxml.cpp @@ -30,19 +30,51 @@ PXDOC GetLibxmlDoc(PGLOBAL g, char *nsl, char *nsdf, /* XMLDOCUMENT constructor. */ /******************************************************************/ XMLDOCUMENT::XMLDOCUMENT(char *nsl, char *nsdf, char *enc) - { - Namespaces = NULL; +{ +#if defined(ZIP_SUPPORT) + zip = NULL; +#else // !ZIP_SUPPORT + zip = false; +#endif // !ZIP_SUPPORT + Namespaces = NULL; Encoding = enc; Nslist = nsl; DefNs = nsdf; - } // end of XMLDOCUMENT constructor +} // end of XMLDOCUMENT constructor + +/******************************************************************/ +/* Initialize zipped file processing. */ +/******************************************************************/ +bool XMLDOCUMENT::InitZip(PGLOBAL g, char *entry) +{ +#if defined(ZIP_SUPPORT) + bool mul = (entry) ? strchr(entry, '*') || strchr(entry, '?') : false; + zip = new(g) ZIPUTIL(entry, mul); + return zip == NULL; +#else // !ZIP_SUPPORT + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "ZIP"); + return true; +#endif // !ZIP_SUPPORT +} // end of InitZip + +/******************************************************************/ +/* Make the namespace structure list. */ +/******************************************************************/ +char* XMLDOCUMENT::GetMemDoc(PGLOBAL g, char *fn) +{ +#if defined(ZIP_SUPPORT) + return (zip->OpenTable(g, MODE_ANY, fn)) ? NULL : zip->memory; +#else // !ZIP_SUPPORT + return NULL; +#endif // !ZIP_SUPPORT +} // end of GetMemDoc /******************************************************************/ /* Make the namespace structure list. */ /******************************************************************/ bool XMLDOCUMENT::MakeNSlist(PGLOBAL g) - { - char *prefix, *href, *next = Nslist; +{ + char *prefix, *href, *next = Nslist; PNS nsp, *ppns = &Namespaces; while (next) { @@ -83,6 +115,19 @@ bool XMLDOCUMENT::MakeNSlist(PGLOBAL g) return false; } // end of MakeNSlist +/******************************************************************/ +/* Close ZIP file. */ +/******************************************************************/ +void XMLDOCUMENT::CloseZip(void) +{ +#if defined(ZIP_SUPPORT) + if (zip) { + zip->close(); + zip = NULL; + } // endif zip +#endif // ZIP_SUPPORT +} // end of CloseZip + /******************************************************************/ /* XMLNODE constructor. */ /******************************************************************/ diff --git a/storage/connect/plgxml.h b/storage/connect/plgxml.h index b8e914e0bf1..db7dfa6bda5 100644 --- a/storage/connect/plgxml.h +++ b/storage/connect/plgxml.h @@ -1,3 +1,7 @@ +#if defined(ZIP_SUPPORT) +#include "filamzip.h" +#endif // ZIP_SUPPORT + /******************************************************************/ /* Dual XML implementation base classes defines. */ /******************************************************************/ @@ -72,8 +76,8 @@ class XMLDOCUMENT : public BLOCK { virtual void SetNofree(bool b) = 0; // Methods - virtual bool Initialize(PGLOBAL) = 0; - virtual bool ParseFile(char *) = 0; + virtual bool Initialize(PGLOBAL, char *, bool) = 0; + virtual bool ParseFile(PGLOBAL, char *) = 0; virtual bool NewDoc(PGLOBAL, char *) = 0; virtual void AddComment(PGLOBAL, char *) = 0; virtual PXNODE GetRoot(PGLOBAL) = 0; @@ -91,8 +95,16 @@ class XMLDOCUMENT : public BLOCK { // Utility bool MakeNSlist(PGLOBAL g); + bool InitZip(PGLOBAL g, char *entry); + char *GetMemDoc(PGLOBAL g, char *fn); + void CloseZip(void); // Members +#if defined(ZIP_SUPPORT) + ZIPUTIL *zip; /* Used for zipped file */ +#else // !ZIP_SUPPORT + bool zip; /* Always false */ +#endif // !ZIP_SUPPORT PNS Namespaces; /* To the namespaces */ char *Encoding; /* The document encoding */ char *Nslist; /* Namespace list */ diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp index 56a7ea8c512..ef91414a9ab 100644 --- a/storage/connect/reldef.cpp +++ b/storage/connect/reldef.cpp @@ -1,7 +1,7 @@ /************* RelDef CPP Program Source Code File (.CPP) **************/ /* PROGRAM NAME: RELDEF */ /* ------------- */ -/* Version 1.5 */ +/* Version 1.6 */ /* */ /* COPYRIGHT: */ /* ---------- */ @@ -40,10 +40,12 @@ #include "tabcol.h" #include "filamap.h" #include "filamfix.h" +#if defined(VCT_SUPPORT) #include "filamvct.h" -#if defined(ZIP_SUPPORT) -#include "filamzip.h" -#endif // ZIP_SUPPORT +#endif // VCT_SUPPORT +#if defined(GZ_SUPPORT) +#include "filamgz.h" +#endif // GZ_SUPPORT #include "tabdos.h" #include "valblk.h" #include "tabmul.h" @@ -663,15 +665,15 @@ PTDB OEMDEF::GetTable(PGLOBAL g, MODE mode) /*********************************************************************/ if (!((PTDBDOS)tdbp)->GetTxfp()) { if (cmpr) { -#if defined(ZIP_SUPPORT) +#if defined(GZ_SUPPORT) if (cmpr == 1) - txfp = new(g) ZIPFAM(defp); + txfp = new(g) GZFAM(defp); else txfp = new(g) ZLBFAM(defp); -#else // !ZIP_SUPPORT +#else // !GZ_SUPPORT strcpy(g->Message, "Compress not supported"); return NULL; -#endif // !ZIP_SUPPORT +#endif // !GZ_SUPPORT } else if (rfm == RECFM_VAR) { if (map) txfp = new(g) MAPFAM(defp); @@ -683,16 +685,19 @@ PTDB OEMDEF::GetTable(PGLOBAL g, MODE mode) txfp = new(g) MPXFAM(defp); else txfp = new(g) FIXFAM(defp); - } else if (rfm == RECFM_VCT) { - assert (Pxdef->GetDefType() == TYPE_AM_VCT); +#if defined(VCT_SUPPORT) + assert(Pxdef->GetDefType() == TYPE_AM_VCT); if (map) txfp = new(g) VCMFAM((PVCTDEF)defp); else txfp = new(g) VCTFAM((PVCTDEF)defp); - - } // endif's +#else // !VCT_SUPPORT + strcpy(g->Message, "VCT no more supported"); + return NULL; +#endif // !VCT_SUPPORT + } // endif's ((PTDBDOS)tdbp)->SetTxfp(txfp); } // endif Txfp diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp index 98633f49d23..16cc6c33b44 100644 --- a/storage/connect/tabdos.cpp +++ b/storage/connect/tabdos.cpp @@ -1,11 +1,11 @@ /************* TabDos C++ Program Source Code File (.CPP) **************/ /* PROGRAM NAME: TABDOS */ /* ------------- */ -/* Version 4.9 */ +/* Version 4.9.2 */ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */ +/* (C) Copyright to the author Olivier BERTRAND 1998-2016 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -51,6 +51,9 @@ #include "filamap.h" #include "filamfix.h" #include "filamdbf.h" +#if defined(GZ_SUPPORT) +#include "filamgz.h" +#endif // GZ_SUPPORT #if defined(ZIP_SUPPORT) #include "filamzip.h" #endif // ZIP_SUPPORT @@ -93,10 +96,13 @@ DOSDEF::DOSDEF(void) Pseudo = 3; Fn = NULL; Ofn = NULL; + Entry = NULL; To_Indx = NULL; Recfm = RECFM_VAR; Mapped = false; - Padded = false; + Zipped = false; + Mulentries = false; + Padded = false; Huge = false; Accept = false; Eof = false; @@ -126,6 +132,11 @@ bool DOSDEF::DefineAM(PGLOBAL g, LPCSTR am, int) : (am && (*am == 'B' || *am == 'b')) ? "B" : (am && !stricmp(am, "DBF")) ? "D" : "V"; + if ((Zipped = GetBoolCatInfo("Zipped", false))) + Mulentries = ((Entry = GetStringCatInfo(g, "Entry", NULL))) + ? strchr(Entry, '*') || strchr(Entry, '?') + : GetBoolCatInfo("Mulentries", false); + Desc = Fn = GetStringCatInfo(g, "Filename", NULL); Ofn = GetStringCatInfo(g, "Optname", Fn); GetCharCatInfo("Recfm", (PSZ)dfm, buf, sizeof(buf)); @@ -333,7 +344,21 @@ PTDB DOSDEF::GetTable(PGLOBAL g, MODE mode) /* Allocate table and file processing class of the proper type. */ /* Column blocks will be allocated only when needed. */ /*********************************************************************/ - if (Recfm == RECFM_DBF) { + if (Zipped) { +#if defined(ZIP_SUPPORT) + if (Recfm == RECFM_VAR) { + txfp = new(g)ZIPFAM(this); + tdbp = new(g)TDBDOS(this, txfp); + } else { + txfp = new(g)ZPXFAM(this); + tdbp = new(g)TDBFIX(this, txfp); + } // endif Recfm + +#else // !ZIP_SUPPORT + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "ZIP"); + return NULL; +#endif // !ZIP_SUPPORT + } else if (Recfm == RECFM_DBF) { if (Catfunc == FNC_NO) { if (map) txfp = new(g) DBMFAM(this); @@ -350,28 +375,28 @@ PTDB DOSDEF::GetTable(PGLOBAL g, MODE mode) else if (map) txfp = new(g) MPXFAM(this); else if (Compressed) { -#if defined(ZIP_SUPPORT) +#if defined(GZ_SUPPORT) txfp = new(g) ZIXFAM(this); -#else // !ZIP_SUPPORT - sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "ZIP"); +#else // !GZ_SUPPORT + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "GZ"); return NULL; -#endif // !ZIP_SUPPORT +#endif // !GZ_SUPPORT } else txfp = new(g) FIXFAM(this); tdbp = new(g) TDBFIX(this, txfp); } else { if (Compressed) { -#if defined(ZIP_SUPPORT) +#if defined(GZ_SUPPORT) if (Compressed == 1) - txfp = new(g) ZIPFAM(this); + txfp = new(g) GZFAM(this); else txfp = new(g) ZLBFAM(this); -#else // !ZIP_SUPPORT - sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "ZIP"); +#else // !GZ_SUPPORT + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "GZ"); return NULL; -#endif // !ZIP_SUPPORT +#endif // !GZ_SUPPORT } else if (map) txfp = new(g) MAPFAM(this); else @@ -396,7 +421,7 @@ PTDB DOSDEF::GetTable(PGLOBAL g, MODE mode) if (map) { txfp = new(g) MBKFAM(this); } else if (Compressed) { -#if defined(ZIP_SUPPORT) +#if defined(GZ_SUPPORT) if (Compressed == 1) txfp = new(g) ZBKFAM(this); else { @@ -404,7 +429,7 @@ PTDB DOSDEF::GetTable(PGLOBAL g, MODE mode) ((PZLBFAM)txfp)->SetOptimized(To_Pos != NULL); } // endelse #else - sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "ZIP"); + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "GZ"); return NULL; #endif } else @@ -531,14 +556,14 @@ int TDBDOS::ResetTableOpt(PGLOBAL g, bool dop, bool dox) // except for ZLIB access method. if (Txfp->GetAmType() == TYPE_AM_MAP) { Txfp = new(g) MAPFAM((PDOSDEF)To_Def); -#if defined(ZIP_SUPPORT) - } else if (Txfp->GetAmType() == TYPE_AM_ZIP) { - Txfp = new(g) ZIPFAM((PDOSDEF)To_Def); +#if defined(GZ_SUPPORT) + } else if (Txfp->GetAmType() == TYPE_AM_GZ) { + Txfp = new(g) GZFAM((PDOSDEF)To_Def); } else if (Txfp->GetAmType() == TYPE_AM_ZLIB) { Txfp->Reset(); ((PZLBFAM)Txfp)->SetOptimized(false); -#endif // ZIP_SUPPORT - } else if (Txfp->GetAmType() == TYPE_AM_BLK) +#endif // GZ_SUPPORT + } else if (Txfp->GetAmType() == TYPE_AM_BLK) Txfp = new(g) DOSFAM((PDOSDEF)To_Def); Txfp->SetTdbp(this); @@ -609,7 +634,12 @@ int TDBDOS::MakeBlockValues(PGLOBAL g) defp->SetOptimized(0); // Estimate the number of needed blocks - block = (int)((MaxSize + (int)nrec - 1) / (int)nrec); + if ((block = (int)((MaxSize + (int)nrec - 1) / (int)nrec)) < 2) { + // This may be wrong to do in some cases + defp->RemoveOptValues(g); + strcpy(g->Message, MSG(TABLE_NOT_OPT)); + return RC_INFO; // Not to be optimized + } // endif block // We have to use local variables because Txfp->CurBlk is set // to Rows+1 by unblocked variable length table access methods. @@ -952,13 +982,14 @@ bool TDBDOS::GetBlockValues(PGLOBAL g) PCOLDEF cdp; PDOSDEF defp = (PDOSDEF)To_Def; PCATLG cat = defp->GetCat(); + PDBUSER dup = PlgGetUser(g); #if 0 if (Mode == MODE_INSERT && Txfp->GetAmType() == TYPE_AM_DOS) return false; #endif // __WIN__ - if (defp->Optimized) + if (defp->Optimized || !(dup->Check & CHK_OPT)) return false; // Already done or to be redone if (Ftype == RECFM_VAR || defp->Compressed == 2) { @@ -2079,10 +2110,10 @@ bool TDBDOS::OpenDB(PGLOBAL g) /*******************************************************************/ if (Txfp->GetAmType() == TYPE_AM_MAP && Mode == MODE_DELETE) Txfp = new(g) MAPFAM((PDOSDEF)To_Def); -#if defined(ZIP_SUPPORT) - else if (Txfp->GetAmType() == TYPE_AM_ZIP) - Txfp = new(g) ZIPFAM((PDOSDEF)To_Def); -#endif // ZIP_SUPPORT +#if defined(GZ_SUPPORT) + else if (Txfp->GetAmType() == TYPE_AM_GZ) + Txfp = new(g) GZFAM((PDOSDEF)To_Def); +#endif // GZ_SUPPORT else // if (Txfp->GetAmType() != TYPE_AM_DOS) ??? Txfp = new(g) DOSFAM((PDOSDEF)To_Def); diff --git a/storage/connect/tabdos.h b/storage/connect/tabdos.h index c098886f14b..4c8eb438a26 100644 --- a/storage/connect/tabdos.h +++ b/storage/connect/tabdos.h @@ -28,6 +28,7 @@ class DllExport DOSDEF : public TABDEF { /* Logical table description */ friend class TDBFIX; friend class TXTFAM; friend class DBFBASE; + friend class ZIPUTIL; public: // Constructor DOSDEF(void); @@ -40,7 +41,9 @@ class DllExport DOSDEF : public TABDEF { /* Logical table description */ virtual bool IsHuge(void) {return Huge;} PSZ GetFn(void) {return Fn;} PSZ GetOfn(void) {return Ofn;} - void SetBlock(int block) {Block = block;} + PSZ GetEntry(void) {return Entry;} + bool GetMul(void) {return Mulentries;} + void SetBlock(int block) {Block = block;} int GetBlock(void) {return Block;} int GetLast(void) {return Last;} void SetLast(int last) {Last = last;} @@ -57,9 +60,9 @@ class DllExport DOSDEF : public TABDEF { /* Logical table description */ int *GetTo_Pos(void) {return To_Pos;} // Methods - virtual int Indexable(void) - {return (!Multiple && Compressed != 1) ? 1 : 0;} - virtual bool DeleteIndexFile(PGLOBAL g, PIXDEF pxdf); + virtual int Indexable(void) + {return (!Multiple && !Mulentries && Compressed != 1) ? 1 : 0;} + virtual bool DeleteIndexFile(PGLOBAL g, PIXDEF pxdf); virtual bool DefineAM(PGLOBAL g, LPCSTR am, int poff); virtual PTDB GetTable(PGLOBAL g, MODE mode); bool InvalidateIndex(PGLOBAL g); @@ -72,10 +75,13 @@ class DllExport DOSDEF : public TABDEF { /* Logical table description */ // Members PSZ Fn; /* Path/Name of corresponding file */ PSZ Ofn; /* Base Path/Name of matching index files*/ - PIXDEF To_Indx; /* To index definitions blocks */ + PSZ Entry; /* Zip entry name or pattern */ + PIXDEF To_Indx; /* To index definitions blocks */ RECFM Recfm; /* 0:VAR, 1:FIX, 2:BIN, 3:VCT, 6:DBF */ bool Mapped; /* 0: disk file, 1: memory mapped file */ - bool Padded; /* true for padded table file */ + bool Zipped; /* true for zipped table file */ + bool Mulentries; /* true for multiple entries */ + bool Padded; /* true for padded table file */ bool Huge; /* true for files larger than 2GB */ bool Accept; /* true if wrong lines are accepted */ bool Eof; /* true if an EOF (0xA) character exists */ @@ -91,7 +97,7 @@ class DllExport DOSDEF : public TABDEF { /* Logical table description */ int Maxerr; /* Maximum number of bad records (DBF) */ int ReadMode; /* Specific to DBF */ int Ending; /* Length of end of lines */ - int Teds; /* Binary table default endian setting */ + char Teds; /* Binary table default endian setting */ }; // end of DOSDEF /***********************************************************************/ diff --git a/storage/connect/tabfix.cpp b/storage/connect/tabfix.cpp index 55c254f41ea..d99f7800f26 100644 --- a/storage/connect/tabfix.cpp +++ b/storage/connect/tabfix.cpp @@ -1,11 +1,11 @@ /************* TabFix C++ Program Source Code File (.CPP) **************/ /* PROGRAM NAME: TABFIX */ /* ------------- */ -/* Version 4.9 */ +/* Version 4.9.1 */ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */ +/* (C) Copyright to the author Olivier BERTRAND 1998-2016 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -589,9 +589,10 @@ void BINCOL::WriteColumn(PGLOBAL g) switch (Fmt) { case 'X': // Standard not converted values - if (Eds && IsTypeChar(Buf_Type)) - *(longlong *)p = Value->GetBigintValue(); - else if (Value->GetBinValue(p, Long, Status)) { + if (Eds && IsTypeChar(Buf_Type)) { + if (Status) + Value->GetValueNonAligned(p, Value->GetBigintValue()); + } else if (Value->GetBinValue(p, Long, Status)) { sprintf(g->Message, MSG(BIN_F_TOO_LONG), Name, Value->GetSize(), Long); longjmp(g->jumper[g->jump_level], 31); @@ -605,7 +606,7 @@ void BINCOL::WriteColumn(PGLOBAL g) sprintf(g->Message, MSG(VALUE_TOO_BIG), n, Name); longjmp(g->jumper[g->jump_level], 31); } else if (Status) - *(short *)p = (short)n; + Value->GetValueNonAligned(p, (short)n); break; case 'T': // Tiny integer @@ -625,7 +626,7 @@ void BINCOL::WriteColumn(PGLOBAL g) sprintf(g->Message, MSG(VALUE_TOO_BIG), n, Name); longjmp(g->jumper[g->jump_level], 31); } else if (Status) - *(int *)p = Value->GetIntValue(); + Value->GetValueNonAligned(p, (int)n); break; case 'G': // Large (great) integer @@ -636,12 +637,12 @@ void BINCOL::WriteColumn(PGLOBAL g) case 'F': // Float case 'R': // Real if (Status) - *(float *)p = (float)Value->GetFloatValue(); + Value->GetValueNonAligned(p, (float)Value->GetFloatValue()); break; case 'D': // Double if (Status) - *(double *)p = Value->GetFloatValue(); + Value->GetValueNonAligned(p, Value->GetFloatValue()); break; case 'C': // Characters diff --git a/storage/connect/tabfmt.cpp b/storage/connect/tabfmt.cpp index b786fb64b56..183bb8f8d65 100644 --- a/storage/connect/tabfmt.cpp +++ b/storage/connect/tabfmt.cpp @@ -1,11 +1,11 @@ /************* TabFmt C++ Program Source Code File (.CPP) **************/ /* PROGRAM NAME: TABFMT */ /* ------------- */ -/* Version 3.9 */ +/* Version 3.9.2 */ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 2001 - 2015 */ +/* (C) Copyright to the author Olivier BERTRAND 2001 - 2016 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -51,6 +51,9 @@ #include "plgdbsem.h" #include "mycat.h" #include "filamap.h" +#if defined(GZ_SUPPORT) +#include "filamgz.h" +#endif // GZ_SUPPORT #if defined(ZIP_SUPPORT) #include "filamzip.h" #endif // ZIP_SUPPORT @@ -78,20 +81,24 @@ USETEMP UseTemp(void); /* of types (TYPE_STRING < TYPE_DOUBLE < TYPE_INT) (1 < 2 < 7). */ /* If these values are changed, this will have to be revisited. */ /***********************************************************************/ -PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep, - char q, int hdr, int mxr, bool info) +PQRYRES CSVColumns(PGLOBAL g, char *dp, PTOS topt, bool info) { static int buftyp[] = {TYPE_STRING, TYPE_SHORT, TYPE_STRING, TYPE_INT, TYPE_INT, TYPE_SHORT}; static XFLD fldtyp[] = {FLD_NAME, FLD_TYPE, FLD_TYPENAME, FLD_PREC, FLD_LENGTH, FLD_SCALE}; static unsigned int length[] = {6, 6, 8, 10, 10, 6}; - char *p, *colname[MAXCOL], dechar, filename[_MAX_PATH], buf[4096]; + const char *fn; + char sep, q; + int rc, mxr; + bool hdr; + char *p, *colname[MAXCOL], dechar, buf[8]; int i, imax, hmax, n, nerr, phase, blank, digit, dec, type; int ncol = sizeof(buftyp) / sizeof(int); int num_read = 0, num_max = 10000000; // Statistics int len[MAXCOL], typ[MAXCOL], prc[MAXCOL]; - FILE *infile; + PCSVDEF tdp; + PTDBCSV tdbp; PQRYRES qrp; PCOLRES crp; @@ -101,27 +108,13 @@ PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep, goto skipit; } // endif info + if (GetIntegerTableOption(g, topt, "Multiple", 0)) { + strcpy(g->Message, "Cannot find column definition for multiple table"); + return NULL; + } // endif Multiple + // num_max = atoi(p+1); // Max num of record to test -#if defined(__WIN__) - if (sep == ',' || strnicmp(setlocale(LC_NUMERIC, NULL), "French", 6)) - dechar = '.'; - else - dechar = ','; -#else // !__WIN__ - dechar = '.'; -#endif // !__WIN__ - - if (trace) - htrc("File %s sep=%c q=%c hdr=%d mxr=%d\n", - SVP(fn), sep, q, hdr, mxr); - - if (!fn) { - strcpy(g->Message, MSG(MISSING_FNAME)); - return NULL; - } // endif fn - imax = hmax = nerr = 0; - mxr = MY_MAX(0, mxr); for (i = 0; i < MAXCOL; i++) { colname[i] = NULL; @@ -131,12 +124,76 @@ PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep, } // endfor i /*********************************************************************/ - /* Open the input file. */ + /* Get the CSV table description block. */ /*********************************************************************/ - PlugSetPath(filename, fn, dp); + tdp = new(g) CSVDEF; +#if defined(ZIP_SUPPORT) + tdp->Entry = GetStringTableOption(g, topt, "Entry", NULL); + tdp->Zipped = GetBooleanTableOption(g, topt, "Zipped", false); +#endif // ZIP_SUPPORT + fn = tdp->Fn = GetStringTableOption(g, topt, "Filename", NULL); - if (!(infile= global_fopen(g, MSGID_CANNOT_OPEN, filename, "r"))) - return NULL; + if (!tdp->Fn) { + strcpy(g->Message, MSG(MISSING_FNAME)); + return NULL; + } // endif Fn + + if (!(tdp->Lrecl = GetIntegerTableOption(g, topt, "Lrecl", 0))) + tdp->Lrecl = 4096; + + p = GetStringTableOption(g, topt, "Separator", ","); + tdp->Sep = (strlen(p) == 2 && p[0] == '\\' && p[1] == 't') ? '\t' : *p; + +#if defined(__WIN__) + if (tdp->Sep == ',' || strnicmp(setlocale(LC_NUMERIC, NULL), "French", 6)) + dechar = '.'; + else + dechar = ','; +#else // !__WIN__ + dechar = '.'; +#endif // !__WIN__ + + sep = tdp->Sep; + tdp->Quoted = GetIntegerTableOption(g, topt, "Quoted", -1); + p = GetStringTableOption(g, topt, "Qchar", ""); + tdp->Qot = *p; + + if (tdp->Qot && tdp->Quoted < 0) + tdp->Quoted = 0; + else if (!tdp->Qot && tdp->Quoted >= 0) + tdp->Qot = '"'; + + q = tdp->Qot; + hdr = GetBooleanTableOption(g, topt, "Header", false); + tdp->Maxerr = GetIntegerTableOption(g, topt, "Maxerr", 0); + tdp->Accept = GetBooleanTableOption(g, topt, "Accept", false); + + if (tdp->Accept && tdp->Maxerr == 0) + tdp->Maxerr = INT_MAX32; // Accept all bad lines + + mxr = MY_MAX(0, tdp->Maxerr); + + if (trace) + htrc("File %s Sep=%c Qot=%c Header=%d maxerr=%d\n", + SVP(tdp->Fn), tdp->Sep, tdp->Qot, tdp->Header, tdp->Maxerr); + + if (tdp->Zipped) { +#if defined(ZIP_SUPPORT) + tdbp = new(g)TDBCSV(tdp, new(g)ZIPFAM(tdp)); +#else // !ZIP_SUPPORT + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "ZIP"); + return NULL; +#endif // !ZIP_SUPPORT + } else + tdbp = new(g) TDBCSV(tdp, new(g) DOSFAM(tdp)); + + tdbp->SetMode(MODE_READ); + + /*********************************************************************/ + /* Open the CSV file. */ + /*********************************************************************/ + if (tdbp->OpenDB(g)) + return NULL; if (hdr) { /*******************************************************************/ @@ -144,16 +201,8 @@ PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep, /*******************************************************************/ phase = 0; - if (fgets(buf, sizeof(buf), infile)) { - n = strlen(buf) + 1; - buf[n - 2] = '\0'; -#if !defined(__WIN__) - // The file can be imported from Windows - if (buf[n - 3] == '\r') - buf[n - 3] = 0; -#endif // UNIX - p = (char*)PlugSubAlloc(g, NULL, n); - memcpy(p, buf, n); + if ((rc = tdbp->ReadDB(g)) == RC_OK) { + p = PlgDBDup(g, tdbp->To_Line); //skip leading blanks for (; *p == ' '; p++) ; @@ -165,10 +214,11 @@ PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep, } // endif q colname[0] = p; - } else { + } else if (rc == RC_EF) { sprintf(g->Message, MSG(FILE_IS_EMPTY), fn); goto err; - } // endif's + } else + goto err; for (i = 1; *p; p++) if (phase == 1 && *p == q) { @@ -201,15 +251,8 @@ PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep, /*******************************************************************/ /* Now start the reading process. Read one line. */ /*******************************************************************/ - if (fgets(buf, sizeof(buf), infile)) { - n = strlen(buf); - buf[n - 1] = '\0'; -#if !defined(__WIN__) - // The file can be imported from Windows - if (buf[n - 2] == '\r') - buf[n - 2] = 0; -#endif // UNIX - } else if (feof(infile)) { + if ((rc = tdbp->ReadDB(g)) == RC_OK) { + } else if (rc == RC_EF) { sprintf(g->Message, MSG(EOF_AFTER_LINE), num_read -1); break; } else { @@ -222,7 +265,7 @@ PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep, /*******************************************************************/ i = n = phase = blank = digit = dec = 0; - for (p = buf; *p; p++) + for (p = tdbp->To_Line; *p; p++) if (*p == sep) { if (phase != 1) { if (i == MAXCOL - 1) { @@ -331,7 +374,7 @@ PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep, htrc("\n"); } // endif trace - fclose(infile); + tdbp->CloseDB(g); skipit: if (trace) @@ -381,7 +424,7 @@ PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep, return qrp; err: - fclose(infile); + tdbp->CloseDB(g); return NULL; } // end of CSVCColumns @@ -458,20 +501,27 @@ PTDB CSVDEF::GetTable(PGLOBAL g, MODE mode) /*******************************************************************/ /* Allocate a file processing class of the proper type. */ /*******************************************************************/ - if (map) { + if (Zipped) { +#if defined(ZIP_SUPPORT) + txfp = new(g) ZIPFAM(this); +#else // !ZIP_SUPPORT + strcpy(g->Message, "ZIP not supported"); + return NULL; +#endif // !ZIP_SUPPORT + } else if (map) { // Should be now compatible with UNIX txfp = new(g) MAPFAM(this); } else if (Compressed) { -#if defined(ZIP_SUPPORT) +#if defined(GZ_SUPPORT) if (Compressed == 1) - txfp = new(g) ZIPFAM(this); + txfp = new(g) GZFAM(this); else txfp = new(g) ZLBFAM(this); -#else // !ZIP_SUPPORT +#else // !GZ_SUPPORT strcpy(g->Message, "Compress not supported"); return NULL; -#endif // !ZIP_SUPPORT +#endif // !GZ_SUPPORT } else txfp = new(g) DOSFAM(this); @@ -498,7 +548,7 @@ PTDB CSVDEF::GetTable(PGLOBAL g, MODE mode) if (map) { txfp = new(g) MBKFAM(this); } else if (Compressed) { -#if defined(ZIP_SUPPORT) +#if defined(GZ_SUPPORT) if (Compressed == 1) txfp = new(g) ZBKFAM(this); else { @@ -506,7 +556,7 @@ PTDB CSVDEF::GetTable(PGLOBAL g, MODE mode) ((PZLBFAM)txfp)->SetOptimized(To_Pos != NULL); } // endelse #else - sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "ZIP"); + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "GZ"); return NULL; #endif } else @@ -830,8 +880,9 @@ bool TDBCSV::SkipHeader(PGLOBAL g) /***********************************************************************/ int TDBCSV::ReadBuffer(PGLOBAL g) { - char *p1, *p2, *p = NULL; - int i, n, len, rc = Txfp->ReadBuffer(g); + //char *p1, *p2, *p = NULL; + char *p2, *p = NULL; + int i, n, len, rc = Txfp->ReadBuffer(g); bool bad = false; if (trace > 1) @@ -846,14 +897,23 @@ int TDBCSV::ReadBuffer(PGLOBAL g) for (i = 0; i < Fields; i++) { if (!bad) { if (Qot && *p2 == Qot) { // Quoted field - for (n = 0, p1 = ++p2; (p = strchr(p1, Qot)); p1 = p + 2) - if (*(p + 1) == Qot) - n++; // Doubled internal quotes - else - break; // Final quote + //for (n = 0, p1 = ++p2; (p = strchr(p1, Qot)); p1 = p + 2) + // if (*(p + 1) == Qot) + // n++; // Doubled internal quotes + // else + // break; // Final quote + + for (n = 0, p = ++p2; p; p++) + if (*p == Qot || *p == '\\') { + if (*(++p) == Qot) + n++; // Escaped internal quotes + else if (*(p - 1) == Qot) + break; // Final quote + } // endif *p if (p) { - len = p++ - p2; + //len = p++ - p2; + len = p - p2 - 1;; // if (Sep != ' ') // for (; *p == ' '; p++) ; // Skip blanks @@ -873,10 +933,12 @@ int TDBCSV::ReadBuffer(PGLOBAL g) if (n) { int j, k; - // Suppress the double of internal quotes + // Suppress the escape of internal quotes for (j = k = 0; j < len; j++, k++) { - if (p2[j] == Qot) - j++; // skip first one + if (p2[j] == Qot || (p2[j] == '\\' && p2[j + 1] == Qot)) + j++; // skip escape char + else if (p2[j] == '\\') + p2[k++] = p2[j++]; // avoid \\Qot p2[k] = p2[j]; } // endfor i, j @@ -1464,21 +1526,16 @@ void CSVCOL::WriteColumn(PGLOBAL g) /* TDBCCL class constructor. */ /***********************************************************************/ TDBCCL::TDBCCL(PCSVDEF tdp) : TDBCAT(tdp) - { - Fn = tdp->GetFn(); - Hdr = tdp->Header; - Mxr = tdp->Maxerr; - Qtd = tdp->Quoted; - Sep = tdp->Sep; - } // end of TDBCCL constructor +{ + Topt = tdp->GetTopt(); +} // end of TDBCCL constructor /***********************************************************************/ /* GetResult: Get the list the CSV file columns. */ /***********************************************************************/ PQRYRES TDBCCL::GetResult(PGLOBAL g) { - return CSVColumns(g, ((PTABDEF)To_Def)->GetPath(), - Fn, Sep, Qtd, Hdr, Mxr, false); + return CSVColumns(g, ((PTABDEF)To_Def)->GetPath(), Topt, false); } // end of GetResult /* ------------------------ End of TabFmt ---------------------------- */ diff --git a/storage/connect/tabfmt.h b/storage/connect/tabfmt.h index ce80a276cdc..5ce8d399a64 100644 --- a/storage/connect/tabfmt.h +++ b/storage/connect/tabfmt.h @@ -1,7 +1,7 @@ /*************** TabFmt H Declares Source Code File (.H) ***************/ -/* Name: TABFMT.H Version 2.4 */ +/* Name: TABFMT.H Version 2.5 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2001-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2001-2016 */ /* */ /* This file contains the CSV and FMT classes declares. */ /***********************************************************************/ @@ -13,8 +13,7 @@ typedef class TDBFMT *PTDBFMT; /***********************************************************************/ /* Functions used externally. */ /***********************************************************************/ -PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep, - char q, int hdr, int mxr, bool info); +PQRYRES CSVColumns(PGLOBAL g, char *dp, PTOS topt, bool info); /***********************************************************************/ /* CSV table. */ @@ -22,7 +21,8 @@ PQRYRES CSVColumns(PGLOBAL g, char *dp, const char *fn, char sep, class DllExport CSVDEF : public DOSDEF { /* Logical table description */ friend class TDBCSV; friend class TDBCCL; - public: + friend PQRYRES CSVColumns(PGLOBAL, char *, PTOS, bool); +public: // Constructor CSVDEF(void); @@ -50,9 +50,10 @@ class DllExport CSVDEF : public DOSDEF { /* Logical table description */ /* This is the DOS/UNIX Access Method class declaration for files */ /* that are CSV files with columns separated by the Sep character. */ /***********************************************************************/ -class TDBCSV : public TDBDOS { +class DllExport TDBCSV : public TDBDOS { friend class CSVCOL; - public: + friend PQRYRES CSVColumns(PGLOBAL, char *, PTOS, bool); +public: // Constructor TDBCSV(PCSVDEF tdp, PTXF txfp); TDBCSV(PGLOBAL g, PTDBCSV tdbp); @@ -101,7 +102,7 @@ class TDBCSV : public TDBDOS { /* Class CSVCOL: CSV access method column descriptor. */ /* This A.M. is used for Comma Separated V(?) files. */ /***********************************************************************/ -class CSVCOL : public DOSCOL { +class DllExport CSVCOL : public DOSCOL { friend class TDBCSV; friend class TDBFMT; public: @@ -129,7 +130,7 @@ class CSVCOL : public DOSCOL { /* This is the DOS/UNIX Access Method class declaration for files */ /* whose record format is described by a Format keyword. */ /***********************************************************************/ -class TDBFMT : public TDBCSV { +class DllExport TDBFMT : public TDBCSV { friend class CSVCOL; //friend class FMTCOL; public: @@ -173,7 +174,7 @@ class TDBFMT : public TDBCSV { /***********************************************************************/ /* This is the class declaration for the CSV catalog table. */ /***********************************************************************/ -class TDBCCL : public TDBCAT { +class DllExport TDBCCL : public TDBCAT { public: // Constructor TDBCCL(PCSVDEF tdp); @@ -183,11 +184,7 @@ class TDBCCL : public TDBCAT { virtual PQRYRES GetResult(PGLOBAL g); // Members - char *Fn; // The CSV file (path) name - bool Hdr; // true if first line contains headers - int Mxr; // Maximum number of bad records - int Qtd; // Quoting level for quoted fields - char Sep; // Separator for standard CSV files - }; // end of class TDBCCL + PTOS Topt; +}; // end of class TDBCCL /* ------------------------- End of TabFmt.H ------------------------- */ diff --git a/storage/connect/tabjdbc.cpp b/storage/connect/tabjdbc.cpp index 93ba3ca264d..c36aa080956 100644 --- a/storage/connect/tabjdbc.cpp +++ b/storage/connect/tabjdbc.cpp @@ -110,6 +110,7 @@ bool JDBCDEF::SetParms(PJPARM sjp) sjp->Url= Url; sjp->User= Username; sjp->Pwd= Password; +//sjp->Properties = Prop; return true; } // end of SetParms @@ -234,6 +235,7 @@ bool JDBCDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) Read_Only = true; Wrapname = GetStringCatInfo(g, "Wrapper", NULL); +//Prop = GetStringCatInfo(g, "Properties", NULL); Tabcat = GetStringCatInfo(g, "Qualifier", NULL); Tabcat = GetStringCatInfo(g, "Catalog", Tabcat); Tabschema = GetStringCatInfo(g, "Dbname", NULL); @@ -337,6 +339,7 @@ TDBJDBC::TDBJDBC(PJDBCDEF tdp) : TDBASE(tdp) Schema = tdp->Tabschema; Ops.User = tdp->Username; Ops.Pwd = tdp->Password; +// Ops.Properties = tdp->Prop; Catalog = tdp->Tabcat; Srcdef = tdp->Srcdef; Qrystr = tdp->Qrystr; @@ -356,6 +359,7 @@ TDBJDBC::TDBJDBC(PJDBCDEF tdp) : TDBASE(tdp) Ops.Url = NULL; Ops.User = NULL; Ops.Pwd = NULL; +// Ops.Properties = NULL; Catalog = NULL; Srcdef = NULL; Qrystr = NULL; diff --git a/storage/connect/tabjdbc.h b/storage/connect/tabjdbc.h index 7244ebd3832..fee8223abaf 100644 --- a/storage/connect/tabjdbc.h +++ b/storage/connect/tabjdbc.h @@ -58,6 +58,7 @@ protected: PSZ Tabschema; /* External table schema */ PSZ Username; /* User connect name */ PSZ Password; /* Password connect info */ +//PSZ Prop; /* Connection Properties */ PSZ Tabcat; /* External table catalog */ PSZ Tabtype; /* External table type */ PSZ Colpat; /* Catalog column pattern */ diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 17260836371..1b9ce8b64c9 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -1,6 +1,6 @@ /************* tabjson C++ Program Source Code File (.CPP) *************/ -/* PROGRAM NAME: tabjson Version 1.1 */ -/* (C) Copyright to the author Olivier BERTRAND 2014 - 2015 */ +/* PROGRAM NAME: tabjson Version 1.3 */ +/* (C) Copyright to the author Olivier BERTRAND 2014 - 2016 */ /* This program are the JSON class DB execution routines. */ /***********************************************************************/ @@ -25,6 +25,9 @@ //#include "resource.h" // for IDS_COLUMNS #include "tabjson.h" #include "filamap.h" +#if defined(GZ_SUPPORT) +#include "filamgz.h" +#endif // GZ_SUPPORT #if defined(ZIP_SUPPORT) #include "filamzip.h" #endif // ZIP_SUPPORT @@ -67,7 +70,7 @@ PQRYRES JSONColumns(PGLOBAL g, char *db, PTOS topt, bool info) static XFLD fldtyp[] = {FLD_NAME, FLD_TYPE, FLD_TYPENAME, FLD_PREC, FLD_LENGTH, FLD_SCALE, FLD_NULL, FLD_FORMAT}; static unsigned int length[] = {0, 6, 8, 10, 10, 6, 6, 0}; - char *fn, colname[65], fmt[129]; + char colname[65], fmt[129]; int i, j, lvl, n = 0; int ncol = sizeof(buftyp) / sizeof(int); PVAL valp; @@ -91,19 +94,29 @@ PQRYRES JSONColumns(PGLOBAL g, char *db, PTOS topt, bool info) goto skipit; } // endif info - /*********************************************************************/ + if (GetIntegerTableOption(g, topt, "Multiple", 0)) { + strcpy(g->Message, "Cannot find column definition for multiple table"); + return NULL; + } // endif Multiple + + /*********************************************************************/ /* Open the input file. */ /*********************************************************************/ - if (!(fn = GetStringTableOption(g, topt, "Filename", NULL))) { - strcpy(g->Message, MSG(MISSING_FNAME)); - return NULL; - } else { - lvl = GetIntegerTableOption(g, topt, "Level", 0); - lvl = (lvl < 0) ? 0 : (lvl > 16) ? 16 : lvl; - } // endif fn + lvl = GetIntegerTableOption(g, topt, "Level", 0); + lvl = (lvl < 0) ? 0 : (lvl > 16) ? 16 : lvl; tdp = new(g) JSONDEF; - tdp->Fn = fn; +#if defined(ZIP_SUPPORT) + tdp->Entry = GetStringTableOption(g, topt, "Entry", NULL); + tdp->Zipped = GetBooleanTableOption(g, topt, "Zipped", false); +#endif // ZIP_SUPPORT + tdp->Fn = GetStringTableOption(g, topt, "Filename", NULL); + + if (!tdp->Fn) { + strcpy(g->Message, MSG(MISSING_FNAME)); + return NULL; + } // endif Fn + tdp->Database = SetPath(g, db); tdp->Objname = GetStringTableOption(g, topt, "Object", NULL); tdp->Base = GetIntegerTableOption(g, topt, "Base", 0) ? 1 : 0; @@ -114,7 +127,15 @@ PQRYRES JSONColumns(PGLOBAL g, char *db, PTOS topt, bool info) tdp->Fn, tdp->Objname, tdp->Pretty, lvl); if (tdp->Pretty == 2) { - tjsp = new(g) TDBJSON(tdp, new(g) MAPFAM(tdp)); + if (tdp->Zipped) { +#if defined(ZIP_SUPPORT) + tjsp = new(g) TDBJSON(tdp, new(g) ZIPFAM(tdp)); +#else // !ZIP_SUPPORT + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "ZIP"); + return NULL; +#endif // !ZIP_SUPPORT + } else + tjsp = new(g) TDBJSON(tdp, new(g) MAPFAM(tdp)); if (tjsp->MakeDocument(g)) return NULL; @@ -127,10 +148,33 @@ PQRYRES JSONColumns(PGLOBAL g, char *db, PTOS topt, bool info) } // endif lrecl tdp->Ending = GetIntegerTableOption(g, topt, "Ending", CRLF); - tjnp = new(g) TDBJSN(tdp, new(g) DOSFAM(tdp)); + + if (tdp->Zipped) { +#if defined(ZIP_SUPPORT) + tjnp = new(g)TDBJSN(tdp, new(g)ZIPFAM(tdp)); +#else // !ZIP_SUPPORT + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "ZIP"); + return NULL; +#endif // !ZIP_SUPPORT + } else + tjnp = new(g) TDBJSN(tdp, new(g) DOSFAM(tdp)); + tjnp->SetMode(MODE_READ); - if (tjnp->OpenDB(g)) +#if USE_G + // Allocate the parse work memory + PGLOBAL G = (PGLOBAL)PlugSubAlloc(g, NULL, sizeof(GLOBAL)); + memset(G, 0, sizeof(GLOBAL)); + G->Sarea_Size = tdp->Lrecl * 10; + G->Sarea = PlugSubAlloc(g, NULL, G->Sarea_Size); + PlugSubSet(G, G->Sarea, G->Sarea_Size); + G->jump_level = -1; + tjnp->SetG(G); +#else + tjnp->SetG(g); +#endif + + if (tjnp->OpenDB(g)) return NULL; switch (tjnp->ReadDB(g)) { @@ -395,16 +439,23 @@ PTDB JSONDEF::GetTable(PGLOBAL g, MODE m) !(tmp == TMP_FORCE && (m == MODE_UPDATE || m == MODE_DELETE)); - if (Compressed) { + if (Zipped) { #if defined(ZIP_SUPPORT) + txfp = new(g) ZIPFAM(this); +#else // !ZIP_SUPPORT + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "ZIP"); + return NULL; +#endif // !ZIP_SUPPORT + } else if (Compressed) { +#if defined(GZ_SUPPORT) if (Compressed == 1) - txfp = new(g) ZIPFAM(this); + txfp = new(g) GZFAM(this); else txfp = new(g) ZLBFAM(this); -#else // !ZIP_SUPPORT - sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "ZIP"); +#else // !GZ_SUPPORT + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "GZ"); return NULL; -#endif // !ZIP_SUPPORT +#endif // !GZ_SUPPORT } else if (map) txfp = new(g) MAPFAM(this); else @@ -426,7 +477,16 @@ PTDB JSONDEF::GetTable(PGLOBAL g, MODE m) ((TDBJSN*)tdbp)->G = g; #endif } else { - txfp = new(g) MAPFAM(this); + if (Zipped) { +#if defined(ZIP_SUPPORT) + txfp = new(g)ZIPFAM(this); +#else // !ZIP_SUPPORT + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "ZIP"); + return NULL; +#endif // !ZIP_SUPPORT + } else + txfp = new(g) MAPFAM(this); + tdbp = new(g) TDBJSON(this, txfp); ((TDBJSON*)tdbp)->G = g; } // endif Pretty diff --git a/storage/connect/tabjson.h b/storage/connect/tabjson.h index f7cb74c3c4d..c9d30d48f2a 100644 --- a/storage/connect/tabjson.h +++ b/storage/connect/tabjson.h @@ -78,7 +78,8 @@ public: virtual AMT GetAmType(void) {return TYPE_AM_JSN;} virtual bool SkipHeader(PGLOBAL g); virtual PTDB Duplicate(PGLOBAL g) {return (PTDB)new(g) TDBJSN(this);} - PJSON GetRow(void) {return Row;} + PJSON GetRow(void) {return Row;} + void SetG(PGLOBAL g) {G = g;} // Methods virtual PTDB CopyOne(PTABS t); diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 57d204a4286..3b8229fcf51 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -1,9 +1,9 @@ /************* Tabxml C++ Program Source Code File (.CPP) **************/ /* PROGRAM NAME: TABXML */ /* ------------- */ -/* Version 2.8 */ +/* Version 2.9 */ /* */ -/* Author Olivier BERTRAND 2007 - 2015 */ +/* Author Olivier BERTRAND 2007 - 2016 */ /* */ /* This program are the XML tables classes using MS-DOM or libxml2. */ /***********************************************************************/ @@ -136,7 +136,12 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info) goto skipit; } // endif info - /*********************************************************************/ + if (GetIntegerTableOption(g, topt, "Multiple", 0)) { + strcpy(g->Message, "Cannot find column definition for multiple table"); + return NULL; + } // endif Multiple + + /*********************************************************************/ /* Open the input file. */ /*********************************************************************/ if (!(fn = GetStringTableOption(g, topt, "Filename", NULL))) { @@ -154,6 +159,8 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info) tdp->Fn = fn; tdp->Database = SetPath(g, db); tdp->Tabname = tab; + tdp->Zipped = GetBooleanTableOption(g, topt, "Zipped", false); + tdp->Entry = GetStringTableOption(g, topt, "Entry", NULL); if (!(op = GetStringTableOption(g, topt, "Xmlsup", NULL))) #if defined(__WIN__) @@ -204,7 +211,8 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info) while (true) { if (!vp->atp && - !(node = (vp->nl) ? vp->nl->GetItem(g, vp->k++, node) : NULL)) + !(node = (vp->nl) ? vp->nl->GetItem(g, vp->k++, tdp->Usedom ? node : NULL) + : NULL)) if (j) { vp = lvlp[--j]; @@ -254,7 +262,8 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info) if (j < lvl && ok) { vp = lvlp[j+1]; vp->k = 0; - vp->atp = node->GetAttribute(g, NULL); + vp->pn = node; + vp->atp = node->GetAttribute(g, NULL); vp->nl = node->GetChildElements(g); if (tdp->Usedom && vp->nl->GetLength() == 1) { @@ -265,7 +274,7 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info) if (vp->atp || vp->b) { if (!vp->atp) - node = vp->nl->GetItem(g, vp->k++, node); + node = vp->nl->GetItem(g, vp->k++, tdp->Usedom ? node : NULL); strncat(fmt, colname, XLEN(fmt)); strncat(fmt, "/", XLEN(fmt)); @@ -424,11 +433,14 @@ XMLDEF::XMLDEF(void) DefNs = NULL; Attrib = NULL; Hdattr = NULL; + Entry = NULL; Coltype = 1; Limit = 0; Header = 0; Xpand = false; Usedom = false; + Zipped = false; + Mulentries = false; } // end of XMLDEF constructor /***********************************************************************/ @@ -507,7 +519,14 @@ bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) // Get eventual table node attribute Attrib = GetStringCatInfo(g, "Attribute", NULL); Hdattr = GetStringCatInfo(g, "HeadAttr", NULL); - return false; + + // Specific for zipped files + if ((Zipped = GetBoolCatInfo("Zipped", false))) + Mulentries = ((Entry = GetStringCatInfo(g, "Entry", NULL))) + ? strchr(Entry, '*') || strchr(Entry, '?') + : GetBoolCatInfo("Mulentries", false); + + return false; } // end of DefineAM /***********************************************************************/ @@ -547,6 +566,7 @@ TDBXML::TDBXML(PXMLDEF tdp) : TDBASE(tdp) Xfile = tdp->Fn; Enc = tdp->Encoding; Tabname = tdp->Tabname; +#if 0 // why all these? Rowname = (tdp->Rowname) ? tdp->Rowname : NULL; Colname = (tdp->Colname) ? tdp->Colname : NULL; Mulnode = (tdp->Mulnode) ? tdp->Mulnode : NULL; @@ -555,10 +575,22 @@ TDBXML::TDBXML(PXMLDEF tdp) : TDBASE(tdp) DefNs = (tdp->DefNs) ? tdp->DefNs : NULL; Attrib = (tdp->Attrib) ? tdp->Attrib : NULL; Hdattr = (tdp->Hdattr) ? tdp->Hdattr : NULL; - Coltype = tdp->Coltype; +#endif // 0 + Rowname = tdp->Rowname; + Colname = tdp->Colname; + Mulnode = tdp->Mulnode; + XmlDB = tdp->XmlDB; + Nslist = tdp->Nslist; + DefNs = tdp->DefNs; + Attrib = tdp->Attrib; + Hdattr = tdp->Hdattr; + Entry = tdp->Entry; + Coltype = tdp->Coltype; Limit = tdp->Limit; Xpand = tdp->Xpand; - Changed = false; + Zipped = tdp->Zipped; + Mulentries = tdp->Mulentries; + Changed = false; Checked = false; NextSame = false; NewRow = false; @@ -600,10 +632,13 @@ TDBXML::TDBXML(PTDBXML tdbp) : TDBASE(tdbp) DefNs = tdbp->DefNs; Attrib = tdbp->Attrib; Hdattr = tdbp->Hdattr; - Coltype = tdbp->Coltype; + Entry = tdbp->Entry; + Coltype = tdbp->Coltype; Limit = tdbp->Limit; Xpand = tdbp->Xpand; - Changed = tdbp->Changed; + Zipped = tdbp->Zipped; + Mulentries = tdbp->Mulentries; + Changed = tdbp->Changed; Checked = tdbp->Checked; NextSame = tdbp->NextSame; NewRow = tdbp->NewRow; @@ -681,7 +716,7 @@ int TDBXML::LoadTableFile(PGLOBAL g, char *filename) /*********************************************************************/ /* Firstly we check whether this file have been already loaded. */ /*********************************************************************/ - if (Mode == MODE_READ || Mode == MODE_ANY) + if ((Mode == MODE_READ || Mode == MODE_ANY) && !Zipped) for (fp = dup->Openlist; fp; fp = fp->Next) if (fp->Type == type && fp->Length && fp->Count) if (!stricmp(fp->Fname, filename)) @@ -703,7 +738,7 @@ int TDBXML::LoadTableFile(PGLOBAL g, char *filename) return RC_FX; // Initialize the implementation - if (Docp->Initialize(g)) { + if (Docp->Initialize(g, Entry, Zipped)) { sprintf(g->Message, MSG(INIT_FAILED), (Usedom) ? "DOM" : "libxml2"); return RC_FX; } // endif init @@ -712,7 +747,7 @@ int TDBXML::LoadTableFile(PGLOBAL g, char *filename) htrc("TDBXML: parsing %s rc=%d\n", filename, rc); // Parse the XML file - if (Docp->ParseFile(filename)) { + if (Docp->ParseFile(g, filename)) { // Does the file exist? int h= global_open(g, MSGID_NONE, filename, _O_RDONLY); diff --git a/storage/connect/tabxml.h b/storage/connect/tabxml.h index 7ba3166881d..6c586d79dec 100644 --- a/storage/connect/tabxml.h +++ b/storage/connect/tabxml.h @@ -1,7 +1,7 @@ /*************** Tabxml H Declares Source Code File (.H) ***************/ -/* Name: TABXML.H Version 1.6 */ +/* Name: TABXML.H Version 1.7 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2007-2015 */ +/* (C) Copyright to the author Olivier BERTRAND 2007-2016 */ /* */ /* This file contains the XML table classes declares. */ /***********************************************************************/ @@ -42,12 +42,15 @@ class DllExport XMLDEF : public TABDEF { /* Logical table description */ char *DefNs; /* Dummy name of default namespace */ char *Attrib; /* Table node attributes */ char *Hdattr; /* Header node attributes */ - int Coltype; /* Default column type */ + char *Entry; /* Zip entry name or pattern */ + int Coltype; /* Default column type */ int Limit; /* Limit of multiple values */ int Header; /* n first rows are header rows */ bool Xpand; /* Put multiple tags in several rows */ bool Usedom; /* True: DOM, False: libxml2 */ - }; // end of XMLDEF + bool Zipped; /* True: Zipped XML file(s) */ + bool Mulentries; /* True: multiple entries in zip file*/ +}; // end of XMLDEF #if defined(INCLUDE_TDBXML) /***********************************************************************/ @@ -122,7 +125,9 @@ class DllExport TDBXML : public TDBASE { bool Bufdone; // True when column buffers allocated bool Nodedone; // True when column nodes allocated bool Void; // True if the file does not exist - char *Xfile; // The XML file + bool Zipped; // True if Zipped XML file(s) + bool Mulentries; // True if multiple entries in zip file + char *Xfile; // The XML file char *Enc; // New XML table file encoding char *Tabname; // Name of Table node char *Rowname; // Name of first level nodes @@ -133,7 +138,8 @@ class DllExport TDBXML : public TDBASE { char *DefNs; // Dummy name of default namespace char *Attrib; // Table node attribut(s) char *Hdattr; // Header node attribut(s) - int Coltype; // Default column type + char *Entry; // Zip entry name or pattern + int Coltype; // Default column type int Limit; // Limit of multiple values int Header; // n first rows are header rows int Multiple; // If multiple files diff --git a/storage/connect/tabzip.cpp b/storage/connect/tabzip.cpp new file mode 100644 index 00000000000..11f414ee154 --- /dev/null +++ b/storage/connect/tabzip.cpp @@ -0,0 +1,230 @@ +/************* TabZip C++ Program Source Code File (.CPP) **************/ +/* PROGRAM NAME: TABZIP Version 1.0 */ +/* (C) Copyright to the author Olivier BERTRAND 2016 */ +/* This program are the TABZIP class DB execution routines. */ +/***********************************************************************/ + +/***********************************************************************/ +/* Include relevant sections of the MariaDB header file. */ +/***********************************************************************/ +#include + +/***********************************************************************/ +/* Include application header files: */ +/* global.h is header containing all global declarations. */ +/* plgdbsem.h is header containing the DB application declarations. */ +/* (x)table.h is header containing the TDBASE declarations. */ +/* tabzip.h is header containing the TABZIP classes declarations. */ +/***********************************************************************/ +#include "global.h" +#include "plgdbsem.h" +#include "xtable.h" +#include "filamtxt.h" +#include "filamzip.h" +#include "resource.h" // for IDS_COLUMNS +#include "tabdos.h" +#include "tabzip.h" + +/* -------------------------- Class ZIPDEF --------------------------- */ + +/************************************************************************/ +/* DefineAM: define specific AM block values. */ +/************************************************************************/ +bool ZIPDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) +{ +//target = GetStringCatInfo(g, "Target", NULL); + return DOSDEF::DefineAM(g, "ZIP", poff); +} // end of DefineAM + +/***********************************************************************/ +/* GetTable: makes a new Table Description Block. */ +/***********************************************************************/ +PTDB ZIPDEF::GetTable(PGLOBAL g, MODE m) +{ + return new(g) TDBZIP(this); +} // end of GetTable + +/* ------------------------------------------------------------------- */ + +/***********************************************************************/ +/* Implementation of the TDBZIP class. */ +/***********************************************************************/ +TDBZIP::TDBZIP(PZIPDEF tdp) : TDBASE(tdp) +{ + zipfile = NULL; + zfn = tdp->Fn; +//target = tdp->target; + nexterr = UNZ_OK; +} // end of TDBZIP standard constructor + +/***********************************************************************/ +/* Allocate ZIP column description block. */ +/***********************************************************************/ +PCOL TDBZIP::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n) +{ + return new(g) ZIPCOL(cdp, this, cprec, n); +} // end of MakeCol + +/***********************************************************************/ +/* open a zip file. */ +/* param: filename path and the filename of the zip file to open. */ +/* return: true if open, false otherwise. */ +/***********************************************************************/ +bool TDBZIP::open(PGLOBAL g, const char *filename) +{ + if (!zipfile && !(zipfile = unzOpen64(filename))) + sprintf(g->Message, "Zipfile open error"); + + return (zipfile == NULL); +} // end of open + +/***********************************************************************/ +/* Close the zip file. */ +/***********************************************************************/ +void TDBZIP::close() +{ + if (zipfile) { + unzClose(zipfile); + zipfile = NULL; + } // endif zipfile + +} // end of close + +/***********************************************************************/ +/* ZIP Cardinality: returns table size in number of rows. */ +/***********************************************************************/ +int TDBZIP::Cardinality(PGLOBAL g) +{ + if (!g) + return 1; + else if (Cardinal < 0) { + if (!open(g, zfn)) { + unz_global_info64 ginfo; + int err = unzGetGlobalInfo64(zipfile, &ginfo); + + Cardinal = (err == UNZ_OK) ? ginfo.number_entry : 0; + } else + Cardinal = 0; + + } // endif Cardinal + + return Cardinal; +} // end of Cardinality + +/***********************************************************************/ +/* ZIP GetMaxSize: returns file size estimate in number of lines. */ +/***********************************************************************/ +int TDBZIP::GetMaxSize(PGLOBAL g) +{ + if (MaxSize < 0) + MaxSize = Cardinality(g); + + return MaxSize; +} // end of GetMaxSize + +/***********************************************************************/ +/* ZIP Access Method opening routine. */ +/***********************************************************************/ +bool TDBZIP::OpenDB(PGLOBAL g) +{ + if (Use == USE_OPEN) + // Table already open + return false; + + Use = USE_OPEN; // To be clean + return open(g, zfn); +} // end of OpenDB + +/***********************************************************************/ +/* ReadDB: Data Base read routine for ZIP access method. */ +/***********************************************************************/ +int TDBZIP::ReadDB(PGLOBAL g) +{ + if (nexterr == UNZ_END_OF_LIST_OF_FILE) + return RC_EF; + else if (nexterr != UNZ_OK) { + sprintf(g->Message, "unzGoToNextFile error %d", nexterr); + return RC_FX; + } // endif nexterr + + int err = unzGetCurrentFileInfo64(zipfile, &finfo, fn, + sizeof(fn), NULL, 0, NULL, 0); + + if (err != UNZ_OK) { + sprintf(g->Message, "unzGetCurrentFileInfo64 error %d", err); + return RC_FX; + } // endif err + + nexterr = unzGoToNextFile(zipfile); + return RC_OK; +} // end of ReadDB + +/***********************************************************************/ +/* WriteDB: Data Base write routine for ZIP access method. */ +/***********************************************************************/ +int TDBZIP::WriteDB(PGLOBAL g) +{ + strcpy(g->Message, "ZIP tables are read only"); + return RC_FX; +} // end of WriteDB + +/***********************************************************************/ +/* Data Base delete line routine for ZIP access method. */ +/***********************************************************************/ +int TDBZIP::DeleteDB(PGLOBAL g, int irc) +{ + strcpy(g->Message, "Delete not enabled for ZIP tables"); + return RC_FX; +} // end of DeleteDB + +/***********************************************************************/ +/* Data Base close routine for ZIP access method. */ +/***********************************************************************/ +void TDBZIP::CloseDB(PGLOBAL g) +{ + close(); + Use = USE_READY; // Just to be clean +} // end of CloseDB + +/* ---------------------------- ZIPCOL ------------------------------- */ + +/***********************************************************************/ +/* ZIPCOL public constructor. */ +/***********************************************************************/ +ZIPCOL::ZIPCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am) + : COLBLK(cdp, tdbp, i) +{ + if (cprec) { + Next = cprec->GetNext(); + cprec->SetNext(this); + } else { + Next = tdbp->GetColumns(); + tdbp->SetColumns(this); + } // endif cprec + + Tdbz = (TDBZIP*)tdbp; + flag = cdp->GetOffset(); +} // end of ZIPCOL constructor + +/***********************************************************************/ +/* ReadColumn: */ +/***********************************************************************/ +void ZIPCOL::ReadColumn(PGLOBAL g) +{ + switch (flag) { + case 1: + Value->SetValue(Tdbz->finfo.compressed_size); + break; + case 2: + Value->SetValue(Tdbz->finfo.uncompressed_size); + break; + case 3: + Value->SetValue((int)Tdbz->finfo.compression_method); + break; + default: + Value->SetValue_psz((PSZ)Tdbz->fn); + } // endswitch flag + +} // end of ReadColumn + +/* -------------------------- End of tabzip -------------------------- */ diff --git a/storage/connect/tabzip.h b/storage/connect/tabzip.h new file mode 100644 index 00000000000..6f1735258e7 --- /dev/null +++ b/storage/connect/tabzip.h @@ -0,0 +1,100 @@ +/*************** tabzip H Declares Source Code File (.H) ***************/ +/* Name: tabzip.h Version 1.0 */ +/* */ +/* (C) Copyright to the author Olivier BERTRAND 2016 */ +/* */ +/* This file contains the ZIP classe declares. */ +/***********************************************************************/ +#include "osutil.h" +#include "block.h" +#include "colblk.h" +#include "xtable.h" +#include "unzip.h" + +typedef class ZIPDEF *PZIPDEF; +typedef class TDBZIP *PTDBZIP; +typedef class ZIPCOL *PZIPCOL; + +/***********************************************************************/ +/* ZIP table: display info about a ZIP file. */ +/***********************************************************************/ +class DllExport ZIPDEF : public DOSDEF { /* Table description */ + friend class TDBZIP; + friend class ZIPFAM; +public: + // Constructor + ZIPDEF(void) {} + + // Implementation + virtual const char *GetType(void) {return "ZIP";} + + // Methods + virtual bool DefineAM(PGLOBAL g, LPCSTR am, int poff); + virtual PTDB GetTable(PGLOBAL g, MODE m); + +protected: + // Members + PSZ target; // The inside file to query +}; // end of ZIPDEF + +/***********************************************************************/ +/* This is the ZIP Access Method class declaration. */ +/***********************************************************************/ +class DllExport TDBZIP : public TDBASE { + friend class ZIPCOL; +public: + // Constructor + TDBZIP(PZIPDEF tdp); + + // Implementation + virtual AMT GetAmType(void) {return TYPE_AM_ZIP;} + + // Methods + virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n); + virtual int Cardinality(PGLOBAL g); + virtual int GetMaxSize(PGLOBAL g); + virtual int GetRecpos(void) {return 0;} + + // Database routines + virtual bool OpenDB(PGLOBAL g); + virtual int ReadDB(PGLOBAL g); + virtual int WriteDB(PGLOBAL g); + virtual int DeleteDB(PGLOBAL g, int irc); + virtual void CloseDB(PGLOBAL g); + +protected: + bool open(PGLOBAL g, const char *filename); + void close(void); + + // Members + unzFile zipfile; // The ZIP container file + PSZ zfn; // The ZIP file name +//PSZ target; + unz_file_info64 finfo; // The current file info + char fn[FILENAME_MAX]; // The current file name + int nexterr; // Next file error +}; // end of class TDBZIP + +/***********************************************************************/ +/* Class ZIPCOL: ZIP access method column descriptor. */ +/***********************************************************************/ +class DllExport ZIPCOL : public COLBLK { + friend class TDBZIP; +public: + // Constructors + ZIPCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am = "ZIP"); + + // Implementation + virtual int GetAmType(void) { return TYPE_AM_ZIP; } + + // Methods + virtual void ReadColumn(PGLOBAL g); + +protected: + // Default constructor not to be used + ZIPCOL(void) {} + + // Members + TDBZIP *Tdbz; + int flag; +}; // end of class ZIPCOL diff --git a/storage/connect/unzip.c b/storage/connect/unzip.c new file mode 100644 index 00000000000..909350435a5 --- /dev/null +++ b/storage/connect/unzip.c @@ -0,0 +1,2125 @@ +/* unzip.c -- IO for uncompress .zip files using zlib + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications of Unzip for Zip64 + Copyright (C) 2007-2008 Even Rouault + + Modifications for Zip64 support on both zip and unzip + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + + ------------------------------------------------------------------------------------ + Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of + compatibility with older software. The following is from the original crypt.c. + Code woven in by Terry Thorsen 1/2003. + + Copyright (c) 1990-2000 Info-ZIP. All rights reserved. + + See the accompanying file LICENSE, version 2000-Apr-09 or later + (the contents of which are also included in zip.h) for terms of use. + If, for some reason, all these files are missing, the Info-ZIP license + also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html + + crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h] + + The encryption/decryption parts of this source code (as opposed to the + non-echoing password parts) were originally written in Europe. The + whole source package can be freely distributed, including from the USA. + (Prior to January 2000, re-export from the US was a violation of US law.) + + This encryption code is a direct transcription of the algorithm from + Roger Schlafly, described by Phil Katz in the file appnote.txt. This + file (appnote.txt) is distributed with the PKZIP program (even in the + version without encryption capabilities). + + ------------------------------------------------------------------------------------ + + Changes in unzip.c + + 2007-2008 - Even Rouault - Addition of cpl_unzGetCurrentFileZStreamPos + 2007-2008 - Even Rouault - Decoration of symbol names unz* -> cpl_unz* + 2007-2008 - Even Rouault - Remove old C style function prototypes + 2007-2008 - Even Rouault - Add unzip support for ZIP64 + + Copyright (C) 2007-2008 Even Rouault + + + Oct-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again). + Oct-2009 - Mathias Svensson - Fixed problem if uncompressed size was > 4G and compressed size was <4G + should only read the compressed/uncompressed size from the Zip64 format if + the size from normal header was 0xFFFFFFFF + Oct-2009 - Mathias Svensson - Applied some bug fixes from paches recived from Gilles Vollant + Oct-2009 - Mathias Svensson - Applied support to unzip files with compression mathod BZIP2 (bzip2 lib is required) + Patch created by Daniel Borca + + Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer + + Copyright (C) 1998 - 2010 Gilles Vollant, Even Rouault, Mathias Svensson + +*/ + + +#include +#include +#include + +#ifndef NOUNCRYPT + #define NOUNCRYPT +#endif + +#include "zlib.h" +#include "unzip.h" + +#ifdef STDC +# include +# include +# include +#endif +#ifdef NO_ERRNO_H + extern int errno; +#else +# include +#endif + + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + + +#ifndef CASESENSITIVITYDEFAULT_NO +# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) +# define CASESENSITIVITYDEFAULT_NO +# endif +#endif + + +#ifndef UNZ_BUFSIZE +#define UNZ_BUFSIZE (16384) +#endif + +#ifndef UNZ_MAXFILENAMEINZIP +#define UNZ_MAXFILENAMEINZIP (256) +#endif + +#ifndef ALLOC +# define ALLOC(size) (malloc(size)) +#endif +#ifndef TRYFREE +# define TRYFREE(p) {if (p) free(p);} +#endif + +#define SIZECENTRALDIRITEM (0x2e) +#define SIZEZIPLOCALHEADER (0x1e) + + +const char unz_copyright[] = + " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; + +/* unz_file_info_interntal contain internal info about a file in zipfile*/ +typedef struct unz_file_info64_internal_s +{ + ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */ +} unz_file_info64_internal; + + +/* file_in_zip_read_info_s contain internal information about a file in zipfile, + when reading and decompress it */ +typedef struct +{ + char *read_buffer; /* internal buffer for compressed data */ + z_stream stream; /* zLib stream structure for inflate */ + +#ifdef HAVE_BZIP2 + bz_stream bstream; /* bzLib stream structure for bziped */ +#endif + + ZPOS64_T pos_in_zipfile; /* position in byte on the zipfile, for fseek*/ + uLong stream_initialised; /* flag set if stream structure is initialised*/ + + ZPOS64_T offset_local_extrafield;/* offset of the local extra field */ + uInt size_local_extrafield;/* size of the local extra field */ + ZPOS64_T pos_local_extrafield; /* position in the local extra field in read*/ + ZPOS64_T total_out_64; + + uLong crc32; /* crc32 of all data uncompressed */ + uLong crc32_wait; /* crc32 we must obtain after decompress all */ + ZPOS64_T rest_read_compressed; /* number of byte to be decompressed */ + ZPOS64_T rest_read_uncompressed;/*number of byte to be obtained after decomp*/ + zlib_filefunc64_32_def z_filefunc; + voidpf filestream; /* io structore of the zipfile */ + uLong compression_method; /* compression method (0==store) */ + ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + int raw; +} file_in_zip64_read_info_s; + + +/* unz64_s contain internal information about the zipfile +*/ +typedef struct +{ + zlib_filefunc64_32_def z_filefunc; + int is64bitOpenFunction; + voidpf filestream; /* io structore of the zipfile */ + unz_global_info64 gi; /* public global information */ + ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + ZPOS64_T num_file; /* number of the current file in the zipfile*/ + ZPOS64_T pos_in_central_dir; /* pos of the current file in the central dir*/ + ZPOS64_T current_file_ok; /* flag about the usability of the current file*/ + ZPOS64_T central_pos; /* position of the beginning of the central dir*/ + + ZPOS64_T size_central_dir; /* size of the central directory */ + ZPOS64_T offset_central_dir; /* offset of start of central directory with + respect to the starting disk number */ + + unz_file_info64 cur_file_info; /* public info about the current file in zip*/ + unz_file_info64_internal cur_file_info_internal; /* private info about it*/ + file_in_zip64_read_info_s* pfile_in_zip_read; /* structure about the current + file if we are decompressing it */ + int encrypted; + + int isZip64; + +# ifndef NOUNCRYPT + unsigned long keys[3]; /* keys defining the pseudo-random sequence */ + const z_crc_t* pcrc_32_tab; +# endif +} unz64_s; + + +#ifndef NOUNCRYPT +#include "crypt.h" +#endif + +/* =========================================================================== + Read a byte from a gz_stream; update next_in and avail_in. Return EOF + for end of file. + IN assertion: the stream s has been sucessfully opened for reading. +*/ + + +local int unz64local_getByte OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + int *pi)); + +local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi) +{ + unsigned char c; + int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); + if (err==1) + { + *pi = (int)c; + return UNZ_OK; + } + else + { + if (ZERROR64(*pzlib_filefunc_def,filestream)) + return UNZ_ERRNO; + else + return UNZ_EOF; + } +} + + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets +*/ +local int unz64local_getShort OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX)); + +local int unz64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX) +{ + uLong x ; + int i = 0; + int err; + + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((uLong)i)<<8; + + if (err==UNZ_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int unz64local_getLong OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX)); + +local int unz64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX) +{ + uLong x ; + int i = 0; + int err; + + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((uLong)i)<<8; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((uLong)i)<<16; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<24; + + if (err==UNZ_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int unz64local_getLong64 OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + ZPOS64_T *pX)); + + +local int unz64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + ZPOS64_T *pX) +{ + ZPOS64_T x ; + int i = 0; + int err; + + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (ZPOS64_T)i; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<8; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<16; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<24; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<32; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<40; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<48; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<56; + + if (err==UNZ_OK) + *pX = x; + else + *pX = 0; + return err; +} + +/* My own strcmpi / strcasecmp */ +local int strcmpcasenosensitive_internal (const char* fileName1, const char* fileName2) +{ + for (;;) + { + char c1=*(fileName1++); + char c2=*(fileName2++); + if ((c1>='a') && (c1<='z')) + c1 -= 0x20; + if ((c2>='a') && (c2<='z')) + c2 -= 0x20; + if (c1=='\0') + return ((c2=='\0') ? 0 : -1); + if (c2=='\0') + return 1; + if (c1c2) + return 1; + } +} + + +#ifdef CASESENSITIVITYDEFAULT_NO +#define CASESENSITIVITYDEFAULTVALUE 2 +#else +#define CASESENSITIVITYDEFAULTVALUE 1 +#endif + +#ifndef STRCMPCASENOSENTIVEFUNCTION +#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal +#endif + +/* + Compare two filename (fileName1,fileName2). + If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) + If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + or strcasecmp) + If iCaseSenisivity = 0, case sensitivity is defaut of your operating system + (like 1 on Unix, 2 on Windows) + +*/ +extern int ZEXPORT unzStringFileNameCompare (const char* fileName1, + const char* fileName2, + int iCaseSensitivity) + +{ + if (iCaseSensitivity==0) + iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE; + + if (iCaseSensitivity==1) + return strcmp(fileName1,fileName2); + + return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2); +} + +#ifndef BUFREADCOMMENT +#define BUFREADCOMMENT (0x400) +#endif + +/* + Locate the Central directory of a zipfile (at the end, just before + the global comment) +*/ +local ZPOS64_T unz64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); +local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) +{ + unsigned char* buf; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; + + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + return uPosFound; +} + + +/* + Locate the Central directory 64 of a zipfile (at the end, just before + the global comment) +*/ +local ZPOS64_T unz64local_SearchCentralDir64 OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream)); + +local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream) +{ + unsigned char* buf; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; + uLong uL; + ZPOS64_T relativeOffset; + + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + if (uPosFound == 0) + return 0; + + /* Zip64 end of central directory locator */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature, already checked */ + if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) + return 0; + + /* number of the disk with the start of the zip64 end of central directory */ + if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) + return 0; + if (uL != 0) + return 0; + + /* relative offset of the zip64 end of central directory record */ + if (unz64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=UNZ_OK) + return 0; + + /* total number of disks */ + if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) + return 0; + if (uL != 1) + return 0; + + /* Goto end of central directory record */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature */ + if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) + return 0; + + if (uL != 0x06064b50) + return 0; + + return relativeOffset; +} + +/* + Open a Zip file. path contain the full pathname (by example, + on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer + "zlib/zlib114.zip". + If the zipfile cannot be opened (file doesn't exist or in not valid), the + return value is NULL. + Else, the return value is a unzFile Handle, usable with other function + of this unzip package. +*/ +local unzFile unzOpenInternal (const void *path, + zlib_filefunc64_32_def* pzlib_filefunc64_32_def, + int is64bitOpenFunction) +{ + unz64_s us; + unz64_s *s; + ZPOS64_T central_pos; + uLong uL; + + uLong number_disk; /* number of the current dist, used for + spaning ZIP, unsupported, always 0*/ + uLong number_disk_with_CD; /* number the the disk with central dir, used + for spaning ZIP, unsupported, always 0*/ + ZPOS64_T number_entry_CD; /* total number of entries in + the central dir + (same than number_entry on nospan) */ + + int err=UNZ_OK; + + if (unz_copyright[0]!=' ') + return NULL; + + us.z_filefunc.zseek32_file = NULL; + us.z_filefunc.ztell32_file = NULL; + if (pzlib_filefunc64_32_def==NULL) + fill_fopen64_filefunc(&us.z_filefunc.zfile_func64); + else + us.z_filefunc = *pzlib_filefunc64_32_def; + us.is64bitOpenFunction = is64bitOpenFunction; + + + + us.filestream = ZOPEN64(us.z_filefunc, + path, + ZLIB_FILEFUNC_MODE_READ | + ZLIB_FILEFUNC_MODE_EXISTING); + if (us.filestream==NULL) + return NULL; + + central_pos = unz64local_SearchCentralDir64(&us.z_filefunc,us.filestream); + if (central_pos) + { + uLong uS; + ZPOS64_T uL64; + + us.isZip64 = 1; + + if (ZSEEK64(us.z_filefunc, us.filestream, + central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=UNZ_ERRNO; + + /* the signature, already checked */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + + /* size of zip64 end of central directory record */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&uL64)!=UNZ_OK) + err=UNZ_ERRNO; + + /* version made by */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK) + err=UNZ_ERRNO; + + /* version needed to extract */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of this disk */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of the disk with the start of the central directory */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) + err=UNZ_ERRNO; + + /* total number of entries in the central directory on this disk */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK) + err=UNZ_ERRNO; + + /* total number of entries in the central directory */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK) + err=UNZ_ERRNO; + + if ((number_entry_CD!=us.gi.number_entry) || + (number_disk_with_CD!=0) || + (number_disk!=0)) + err=UNZ_BADZIPFILE; + + /* size of the central directory */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK) + err=UNZ_ERRNO; + + /* offset of start of central directory with respect to the + starting disk number */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK) + err=UNZ_ERRNO; + + us.gi.size_comment = 0; + } + else + { + central_pos = unz64local_SearchCentralDir(&us.z_filefunc,us.filestream); + if (central_pos==0) + err=UNZ_ERRNO; + + us.isZip64 = 0; + + if (ZSEEK64(us.z_filefunc, us.filestream, + central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=UNZ_ERRNO; + + /* the signature, already checked */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of this disk */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of the disk with the start of the central directory */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) + err=UNZ_ERRNO; + + /* total number of entries in the central dir on this disk */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + us.gi.number_entry = uL; + + /* total number of entries in the central dir */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + number_entry_CD = uL; + + if ((number_entry_CD!=us.gi.number_entry) || + (number_disk_with_CD!=0) || + (number_disk!=0)) + err=UNZ_BADZIPFILE; + + /* size of the central directory */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + us.size_central_dir = uL; + + /* offset of start of central directory with respect to the + starting disk number */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + us.offset_central_dir = uL; + + /* zipfile comment length */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK) + err=UNZ_ERRNO; + } + + if ((central_pospfile_in_zip_read!=NULL) + unzCloseCurrentFile(file); + + ZCLOSE64(s->z_filefunc, s->filestream); + TRYFREE(s); + return UNZ_OK; +} + + +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. */ +extern int ZEXPORT unzGetGlobalInfo64 (unzFile file, unz_global_info64* pglobal_info) +{ + unz64_s* s; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + *pglobal_info=s->gi; + return UNZ_OK; +} + +extern int ZEXPORT unzGetGlobalInfo (unzFile file, unz_global_info* pglobal_info32) +{ + unz64_s* s; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + /* to do : check if number_entry is not truncated */ + pglobal_info32->number_entry = (uLong)s->gi.number_entry; + pglobal_info32->size_comment = s->gi.size_comment; + return UNZ_OK; +} +/* + Translate date/time from Dos format to tm_unz (readable more easilty) +*/ +local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm) +{ + ZPOS64_T uDate; + uDate = (ZPOS64_T)(ulDosDate>>16); + ptm->tm_mday = (uInt)(uDate&0x1f) ; + ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; + ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; + + ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800); + ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ; + ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ; +} + +/* + Get Info about the current file in the zipfile, with internal only info +*/ +local int unz64local_GetCurrentFileInfoInternal OF((unzFile file, + unz_file_info64 *pfile_info, + unz_file_info64_internal + *pfile_info_internal, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize)); + +local int unz64local_GetCurrentFileInfoInternal (unzFile file, + unz_file_info64 *pfile_info, + unz_file_info64_internal + *pfile_info_internal, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize) +{ + unz64_s* s; + unz_file_info64 file_info; + unz_file_info64_internal file_info_internal; + int err=UNZ_OK; + uLong uMagic; + long lSeek=0; + uLong uL; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + if (ZSEEK64(s->z_filefunc, s->filestream, + s->pos_in_central_dir+s->byte_before_the_zipfile, + ZLIB_FILEFUNC_SEEK_SET)!=0) + err=UNZ_ERRNO; + + + /* we check the magic */ + if (err==UNZ_OK) + { + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) + err=UNZ_ERRNO; + else if (uMagic!=0x02014b50) + err=UNZ_BADZIPFILE; + } + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK) + err=UNZ_ERRNO; + + unz64local_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) + err=UNZ_ERRNO; + file_info.compressed_size = uL; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) + err=UNZ_ERRNO; + file_info.uncompressed_size = uL; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK) + err=UNZ_ERRNO; + + // relative offset of local header + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) + err=UNZ_ERRNO; + file_info_internal.offset_curfile = uL; + + lSeek+=file_info.size_filename; + if ((err==UNZ_OK) && (szFileName!=NULL)) + { + uLong uSizeRead ; + if (file_info.size_filename0) && (fileNameBufferSize>0)) + if (ZREAD64(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead) + err=UNZ_ERRNO; + lSeek -= uSizeRead; + } + + // Read extrafield + if ((err==UNZ_OK) && (extraField!=NULL)) + { + ZPOS64_T uSizeRead ; + if (file_info.size_file_extraz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + lSeek=0; + else + err=UNZ_ERRNO; + } + + if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) + if (ZREAD64(s->z_filefunc, s->filestream,extraField,(uLong)uSizeRead)!=uSizeRead) + err=UNZ_ERRNO; + + lSeek += file_info.size_file_extra - (uLong)uSizeRead; + } + else + lSeek += file_info.size_file_extra; + + + if ((err==UNZ_OK) && (file_info.size_file_extra != 0)) + { + uLong acc = 0; + + // since lSeek now points to after the extra field we need to move back + lSeek -= file_info.size_file_extra; + + if (lSeek!=0) + { + if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + lSeek=0; + else + err=UNZ_ERRNO; + } + + while(acc < file_info.size_file_extra) + { + uLong headerId; + uLong dataSize; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&headerId) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&dataSize) != UNZ_OK) + err=UNZ_ERRNO; + + /* ZIP64 extra fields */ + if (headerId == 0x0001) + { + uLong uL; + + if(file_info.uncompressed_size == MAXU32) + { + if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) + err=UNZ_ERRNO; + } + + if(file_info.compressed_size == MAXU32) + { + if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) + err=UNZ_ERRNO; + } + + if(file_info_internal.offset_curfile == MAXU32) + { + /* Relative Header offset */ + if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) + err=UNZ_ERRNO; + } + + if(file_info.disk_num_start == MAXU32) + { + /* Disk Start Number */ + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) + err=UNZ_ERRNO; + } + + } + else + { + if (ZSEEK64(s->z_filefunc, s->filestream,dataSize,ZLIB_FILEFUNC_SEEK_CUR)!=0) + err=UNZ_ERRNO; + } + + acc += 2 + 2 + dataSize; + } + } + + if ((err==UNZ_OK) && (szComment!=NULL)) + { + uLong uSizeRead ; + if (file_info.size_file_commentz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + lSeek=0; + else + err=UNZ_ERRNO; + } + + if ((file_info.size_file_comment>0) && (commentBufferSize>0)) + if (ZREAD64(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) + err=UNZ_ERRNO; + lSeek+=file_info.size_file_comment - uSizeRead; + } + else + lSeek+=file_info.size_file_comment; + + + if ((err==UNZ_OK) && (pfile_info!=NULL)) + *pfile_info=file_info; + + if ((err==UNZ_OK) && (pfile_info_internal!=NULL)) + *pfile_info_internal=file_info_internal; + + return err; +} + + + +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. +*/ +extern int ZEXPORT unzGetCurrentFileInfo64 (unzFile file, + unz_file_info64 * pfile_info, + char * szFileName, uLong fileNameBufferSize, + void *extraField, uLong extraFieldBufferSize, + char* szComment, uLong commentBufferSize) +{ + return unz64local_GetCurrentFileInfoInternal(file,pfile_info,NULL, + szFileName,fileNameBufferSize, + extraField,extraFieldBufferSize, + szComment,commentBufferSize); +} + +extern int ZEXPORT unzGetCurrentFileInfo (unzFile file, + unz_file_info * pfile_info, + char * szFileName, uLong fileNameBufferSize, + void *extraField, uLong extraFieldBufferSize, + char* szComment, uLong commentBufferSize) +{ + int err; + unz_file_info64 file_info64; + err = unz64local_GetCurrentFileInfoInternal(file,&file_info64,NULL, + szFileName,fileNameBufferSize, + extraField,extraFieldBufferSize, + szComment,commentBufferSize); + if ((err==UNZ_OK) && (pfile_info != NULL)) + { + pfile_info->version = file_info64.version; + pfile_info->version_needed = file_info64.version_needed; + pfile_info->flag = file_info64.flag; + pfile_info->compression_method = file_info64.compression_method; + pfile_info->dosDate = file_info64.dosDate; + pfile_info->crc = file_info64.crc; + + pfile_info->size_filename = file_info64.size_filename; + pfile_info->size_file_extra = file_info64.size_file_extra; + pfile_info->size_file_comment = file_info64.size_file_comment; + + pfile_info->disk_num_start = file_info64.disk_num_start; + pfile_info->internal_fa = file_info64.internal_fa; + pfile_info->external_fa = file_info64.external_fa; + + pfile_info->tmu_date = file_info64.tmu_date, + + + pfile_info->compressed_size = (uLong)file_info64.compressed_size; + pfile_info->uncompressed_size = (uLong)file_info64.uncompressed_size; + + } + return err; +} +/* + Set the current file of the zipfile to the first file. + return UNZ_OK if there is no problem +*/ +extern int ZEXPORT unzGoToFirstFile (unzFile file) +{ + int err=UNZ_OK; + unz64_s* s; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + s->pos_in_central_dir=s->offset_central_dir; + s->num_file=0; + err=unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + s->current_file_ok = (err == UNZ_OK); + return err; +} + +/* + Set the current file of the zipfile to the next file. + return UNZ_OK if there is no problem + return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. +*/ +extern int ZEXPORT unzGoToNextFile (unzFile file) +{ + unz64_s* s; + int err; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + if (!s->current_file_ok) + return UNZ_END_OF_LIST_OF_FILE; + if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */ + if (s->num_file+1==s->gi.number_entry) + return UNZ_END_OF_LIST_OF_FILE; + + s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + + s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; + s->num_file++; + err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + s->current_file_ok = (err == UNZ_OK); + return err; +} + + +/* + Try locate the file szFileName in the zipfile. + For the iCaseSensitivity signification, see unzStringFileNameCompare + + return value : + UNZ_OK if the file is found. It becomes the current file. + UNZ_END_OF_LIST_OF_FILE if the file is not found +*/ +extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity) +{ + unz64_s* s; + int err; + + /* We remember the 'current' position in the file so that we can jump + * back there if we fail. + */ + unz_file_info64 cur_file_infoSaved; + unz_file_info64_internal cur_file_info_internalSaved; + ZPOS64_T num_fileSaved; + ZPOS64_T pos_in_central_dirSaved; + + + if (file==NULL) + return UNZ_PARAMERROR; + + if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) + return UNZ_PARAMERROR; + + s=(unz64_s*)file; + if (!s->current_file_ok) + return UNZ_END_OF_LIST_OF_FILE; + + /* Save the current state */ + num_fileSaved = s->num_file; + pos_in_central_dirSaved = s->pos_in_central_dir; + cur_file_infoSaved = s->cur_file_info; + cur_file_info_internalSaved = s->cur_file_info_internal; + + err = unzGoToFirstFile(file); + + while (err == UNZ_OK) + { + char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; + err = unzGetCurrentFileInfo64(file,NULL, + szCurrentFileName,sizeof(szCurrentFileName)-1, + NULL,0,NULL,0); + if (err == UNZ_OK) + { + if (unzStringFileNameCompare(szCurrentFileName, + szFileName,iCaseSensitivity)==0) + return UNZ_OK; + err = unzGoToNextFile(file); + } + } + + /* We failed, so restore the state of the 'current file' to where we + * were. + */ + s->num_file = num_fileSaved ; + s->pos_in_central_dir = pos_in_central_dirSaved ; + s->cur_file_info = cur_file_infoSaved; + s->cur_file_info_internal = cur_file_info_internalSaved; + return err; +} + + +/* +/////////////////////////////////////////// +// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net) +// I need random access +// +// Further optimization could be realized by adding an ability +// to cache the directory in memory. The goal being a single +// comprehensive file read to put the file I need in a memory. +*/ + +/* +typedef struct unz_file_pos_s +{ + ZPOS64_T pos_in_zip_directory; // offset in file + ZPOS64_T num_of_file; // # of file +} unz_file_pos; +*/ + +extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_pos) +{ + unz64_s* s; + + if (file==NULL || file_pos==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + if (!s->current_file_ok) + return UNZ_END_OF_LIST_OF_FILE; + + file_pos->pos_in_zip_directory = s->pos_in_central_dir; + file_pos->num_of_file = s->num_file; + + return UNZ_OK; +} + +extern int ZEXPORT unzGetFilePos( + unzFile file, + unz_file_pos* file_pos) +{ + unz64_file_pos file_pos64; + int err = unzGetFilePos64(file,&file_pos64); + if (err==UNZ_OK) + { + file_pos->pos_in_zip_directory = (uLong)file_pos64.pos_in_zip_directory; + file_pos->num_of_file = (uLong)file_pos64.num_of_file; + } + return err; +} + +extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos) +{ + unz64_s* s; + int err; + + if (file==NULL || file_pos==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + + /* jump to the right spot */ + s->pos_in_central_dir = file_pos->pos_in_zip_directory; + s->num_file = file_pos->num_of_file; + + /* set the current file */ + err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + /* return results */ + s->current_file_ok = (err == UNZ_OK); + return err; +} + +extern int ZEXPORT unzGoToFilePos( + unzFile file, + unz_file_pos* file_pos) +{ + unz64_file_pos file_pos64; + if (file_pos == NULL) + return UNZ_PARAMERROR; + + file_pos64.pos_in_zip_directory = file_pos->pos_in_zip_directory; + file_pos64.num_of_file = file_pos->num_of_file; + return unzGoToFilePos64(file,&file_pos64); +} + +/* +// Unzip Helper Functions - should be here? +/////////////////////////////////////////// +*/ + +/* + Read the local header of the current zipfile + Check the coherency of the local header and info in the end of central + directory about this file + store in *piSizeVar the size of extra info in local header + (filename and size of extra field data) +*/ +local int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVar, + ZPOS64_T * poffset_local_extrafield, + uInt * psize_local_extrafield) +{ + uLong uMagic,uData,uFlags; + uLong size_filename; + uLong size_extra_field; + int err=UNZ_OK; + + *piSizeVar = 0; + *poffset_local_extrafield = 0; + *psize_local_extrafield = 0; + + if (ZSEEK64(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile + + s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + + + if (err==UNZ_OK) + { + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) + err=UNZ_ERRNO; + else if (uMagic!=0x04034b50) + err=UNZ_BADZIPFILE; + } + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) + err=UNZ_ERRNO; +/* + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion)) + err=UNZ_BADZIPFILE; +*/ + if (unz64local_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) + err=UNZ_BADZIPFILE; + + if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && +/* #ifdef HAVE_BZIP2 */ + (s->cur_file_info.compression_method!=Z_BZIP2ED) && +/* #endif */ + (s->cur_file_info.compression_method!=Z_DEFLATED)) + err=UNZ_BADZIPFILE; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */ + err=UNZ_ERRNO; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */ + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && ((uFlags & 8)==0)) + err=UNZ_BADZIPFILE; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */ + err=UNZ_ERRNO; + else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && ((uFlags & 8)==0)) + err=UNZ_BADZIPFILE; + + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */ + err=UNZ_ERRNO; + else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && ((uFlags & 8)==0)) + err=UNZ_BADZIPFILE; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK) + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename)) + err=UNZ_BADZIPFILE; + + *piSizeVar += (uInt)size_filename; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK) + err=UNZ_ERRNO; + *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile + + SIZEZIPLOCALHEADER + size_filename; + *psize_local_extrafield = (uInt)size_extra_field; + + *piSizeVar += (uInt)size_extra_field; + + return err; +} + +/* + Open for reading data the current file in the zipfile. + If there is no error and the file is opened, the return value is UNZ_OK. +*/ +extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method, + int* level, int raw, const char* password) +{ + int err=UNZ_OK; + uInt iSizeVar; + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + ZPOS64_T offset_local_extrafield; /* offset of the local extra field */ + uInt size_local_extrafield; /* size of the local extra field */ +# ifndef NOUNCRYPT + char source[12]; +# else + if (password != NULL) + return UNZ_PARAMERROR; +# endif + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + if (!s->current_file_ok) + return UNZ_PARAMERROR; + + if (s->pfile_in_zip_read != NULL) + unzCloseCurrentFile(file); + + if (unz64local_CheckCurrentFileCoherencyHeader(s,&iSizeVar, &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) + return UNZ_BADZIPFILE; + + pfile_in_zip_read_info = (file_in_zip64_read_info_s*)ALLOC(sizeof(file_in_zip64_read_info_s)); + if (pfile_in_zip_read_info==NULL) + return UNZ_INTERNALERROR; + + pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE); + pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield; + pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield; + pfile_in_zip_read_info->pos_local_extrafield=0; + pfile_in_zip_read_info->raw=raw; + + if (pfile_in_zip_read_info->read_buffer==NULL) + { + TRYFREE(pfile_in_zip_read_info); + return UNZ_INTERNALERROR; + } + + pfile_in_zip_read_info->stream_initialised=0; + + if (method!=NULL) + *method = (int)s->cur_file_info.compression_method; + + if (level!=NULL) + { + *level = 6; + switch (s->cur_file_info.flag & 0x06) + { + case 6 : *level = 1; break; + case 4 : *level = 2; break; + case 2 : *level = 9; break; + } + } + + if ((s->cur_file_info.compression_method!=0) && +/* #ifdef HAVE_BZIP2 */ + (s->cur_file_info.compression_method!=Z_BZIP2ED) && +/* #endif */ + (s->cur_file_info.compression_method!=Z_DEFLATED)) + + err=UNZ_BADZIPFILE; + + pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc; + pfile_in_zip_read_info->crc32=0; + pfile_in_zip_read_info->total_out_64=0; + pfile_in_zip_read_info->compression_method = s->cur_file_info.compression_method; + pfile_in_zip_read_info->filestream=s->filestream; + pfile_in_zip_read_info->z_filefunc=s->z_filefunc; + pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile; + + pfile_in_zip_read_info->stream.total_out = 0; + + if ((s->cur_file_info.compression_method==Z_BZIP2ED) && (!raw)) + { +#ifdef HAVE_BZIP2 + pfile_in_zip_read_info->bstream.bzalloc = (void *(*) (void *, int, int))0; + pfile_in_zip_read_info->bstream.bzfree = (free_func)0; + pfile_in_zip_read_info->bstream.opaque = (voidpf)0; + pfile_in_zip_read_info->bstream.state = (voidpf)0; + + pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; + pfile_in_zip_read_info->stream.zfree = (free_func)0; + pfile_in_zip_read_info->stream.opaque = (voidpf)0; + pfile_in_zip_read_info->stream.next_in = (voidpf)0; + pfile_in_zip_read_info->stream.avail_in = 0; + + err=BZ2_bzDecompressInit(&pfile_in_zip_read_info->bstream, 0, 0); + if (err == Z_OK) + pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED; + else + { + TRYFREE(pfile_in_zip_read_info); + return err; + } +#else + pfile_in_zip_read_info->raw=1; +#endif + } + else if ((s->cur_file_info.compression_method==Z_DEFLATED) && (!raw)) + { + pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; + pfile_in_zip_read_info->stream.zfree = (free_func)0; + pfile_in_zip_read_info->stream.opaque = (voidpf)0; + pfile_in_zip_read_info->stream.next_in = 0; + pfile_in_zip_read_info->stream.avail_in = 0; + + err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS); + if (err == Z_OK) + pfile_in_zip_read_info->stream_initialised=Z_DEFLATED; + else + { + TRYFREE(pfile_in_zip_read_info); + return err; + } + /* windowBits is passed < 0 to tell that there is no zlib header. + * Note that in this case inflate *requires* an extra "dummy" byte + * after the compressed stream in order to complete decompression and + * return Z_STREAM_END. + * In unzip, i don't wait absolutely Z_STREAM_END because I known the + * size of both compressed and uncompressed data + */ + } + pfile_in_zip_read_info->rest_read_compressed = + s->cur_file_info.compressed_size ; + pfile_in_zip_read_info->rest_read_uncompressed = + s->cur_file_info.uncompressed_size ; + + + pfile_in_zip_read_info->pos_in_zipfile = + s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + + iSizeVar; + + pfile_in_zip_read_info->stream.avail_in = (uInt)0; + + s->pfile_in_zip_read = pfile_in_zip_read_info; + s->encrypted = 0; + +# ifndef NOUNCRYPT + if (password != NULL) + { + int i; + s->pcrc_32_tab = get_crc_table(); + init_keys(password,s->keys,s->pcrc_32_tab); + if (ZSEEK64(s->z_filefunc, s->filestream, + s->pfile_in_zip_read->pos_in_zipfile + + s->pfile_in_zip_read->byte_before_the_zipfile, + SEEK_SET)!=0) + return UNZ_INTERNALERROR; + if(ZREAD64(s->z_filefunc, s->filestream,source, 12)<12) + return UNZ_INTERNALERROR; + + for (i = 0; i<12; i++) + zdecode(s->keys,s->pcrc_32_tab,source[i]); + + s->pfile_in_zip_read->pos_in_zipfile+=12; + s->encrypted=1; + } +# endif + + + return UNZ_OK; +} + +extern int ZEXPORT unzOpenCurrentFile (unzFile file) +{ + return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL); +} + +extern int ZEXPORT unzOpenCurrentFilePassword (unzFile file, const char* password) +{ + return unzOpenCurrentFile3(file, NULL, NULL, 0, password); +} + +extern int ZEXPORT unzOpenCurrentFile2 (unzFile file, int* method, int* level, int raw) +{ + return unzOpenCurrentFile3(file, method, level, raw, NULL); +} + +/** Addition for GDAL : START */ + +extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64( unzFile file) +{ + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + s=(unz64_s*)file; + if (file==NULL) + return 0; //UNZ_PARAMERROR; + pfile_in_zip_read_info=s->pfile_in_zip_read; + if (pfile_in_zip_read_info==NULL) + return 0; //UNZ_PARAMERROR; + return pfile_in_zip_read_info->pos_in_zipfile + + pfile_in_zip_read_info->byte_before_the_zipfile; +} + +/** Addition for GDAL : END */ + +/* + Read bytes from the current file. + buf contain buffer where data must be copied + len the size of buf. + + return the number of byte copied if somes bytes are copied + return 0 if the end of file was reached + return <0 with error code if there is an error + (UNZ_ERRNO for IO error, or zLib error for uncompress error) +*/ +extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) +{ + int err=UNZ_OK; + uInt iRead = 0; + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + + if (pfile_in_zip_read_info->read_buffer == NULL) + return UNZ_END_OF_LIST_OF_FILE; + if (len==0) + return 0; + + pfile_in_zip_read_info->stream.next_out = (Bytef*)buf; + + pfile_in_zip_read_info->stream.avail_out = (uInt)len; + + if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && + (!(pfile_in_zip_read_info->raw))) + pfile_in_zip_read_info->stream.avail_out = + (uInt)pfile_in_zip_read_info->rest_read_uncompressed; + + if ((len>pfile_in_zip_read_info->rest_read_compressed+ + pfile_in_zip_read_info->stream.avail_in) && + (pfile_in_zip_read_info->raw)) + pfile_in_zip_read_info->stream.avail_out = + (uInt)pfile_in_zip_read_info->rest_read_compressed+ + pfile_in_zip_read_info->stream.avail_in; + + while (pfile_in_zip_read_info->stream.avail_out>0) + { + if ((pfile_in_zip_read_info->stream.avail_in==0) && + (pfile_in_zip_read_info->rest_read_compressed>0)) + { + uInt uReadThis = UNZ_BUFSIZE; + if (pfile_in_zip_read_info->rest_read_compressedrest_read_compressed; + if (uReadThis == 0) + return UNZ_EOF; + if (ZSEEK64(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + pfile_in_zip_read_info->pos_in_zipfile + + pfile_in_zip_read_info->byte_before_the_zipfile, + ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + if (ZREAD64(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + pfile_in_zip_read_info->read_buffer, + uReadThis)!=uReadThis) + return UNZ_ERRNO; + + +# ifndef NOUNCRYPT + if(s->encrypted) + { + uInt i; + for(i=0;iread_buffer[i] = + zdecode(s->keys,s->pcrc_32_tab, + pfile_in_zip_read_info->read_buffer[i]); + } +# endif + + + pfile_in_zip_read_info->pos_in_zipfile += uReadThis; + + pfile_in_zip_read_info->rest_read_compressed-=uReadThis; + + pfile_in_zip_read_info->stream.next_in = + (Bytef*)pfile_in_zip_read_info->read_buffer; + pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis; + } + + if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw)) + { + uInt uDoCopy,i ; + + if ((pfile_in_zip_read_info->stream.avail_in == 0) && + (pfile_in_zip_read_info->rest_read_compressed == 0)) + return (iRead==0) ? UNZ_EOF : iRead; + + if (pfile_in_zip_read_info->stream.avail_out < + pfile_in_zip_read_info->stream.avail_in) + uDoCopy = pfile_in_zip_read_info->stream.avail_out ; + else + uDoCopy = pfile_in_zip_read_info->stream.avail_in ; + + for (i=0;istream.next_out+i) = + *(pfile_in_zip_read_info->stream.next_in+i); + + pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uDoCopy; + + pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32, + pfile_in_zip_read_info->stream.next_out, + uDoCopy); + pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy; + pfile_in_zip_read_info->stream.avail_in -= uDoCopy; + pfile_in_zip_read_info->stream.avail_out -= uDoCopy; + pfile_in_zip_read_info->stream.next_out += uDoCopy; + pfile_in_zip_read_info->stream.next_in += uDoCopy; + pfile_in_zip_read_info->stream.total_out += uDoCopy; + iRead += uDoCopy; + } + else if (pfile_in_zip_read_info->compression_method==Z_BZIP2ED) + { +#ifdef HAVE_BZIP2 + uLong uTotalOutBefore,uTotalOutAfter; + const Bytef *bufBefore; + uLong uOutThis; + + pfile_in_zip_read_info->bstream.next_in = (char*)pfile_in_zip_read_info->stream.next_in; + pfile_in_zip_read_info->bstream.avail_in = pfile_in_zip_read_info->stream.avail_in; + pfile_in_zip_read_info->bstream.total_in_lo32 = pfile_in_zip_read_info->stream.total_in; + pfile_in_zip_read_info->bstream.total_in_hi32 = 0; + pfile_in_zip_read_info->bstream.next_out = (char*)pfile_in_zip_read_info->stream.next_out; + pfile_in_zip_read_info->bstream.avail_out = pfile_in_zip_read_info->stream.avail_out; + pfile_in_zip_read_info->bstream.total_out_lo32 = pfile_in_zip_read_info->stream.total_out; + pfile_in_zip_read_info->bstream.total_out_hi32 = 0; + + uTotalOutBefore = pfile_in_zip_read_info->bstream.total_out_lo32; + bufBefore = (const Bytef *)pfile_in_zip_read_info->bstream.next_out; + + err=BZ2_bzDecompress(&pfile_in_zip_read_info->bstream); + + uTotalOutAfter = pfile_in_zip_read_info->bstream.total_out_lo32; + uOutThis = uTotalOutAfter-uTotalOutBefore; + + pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis; + + pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis)); + pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis; + iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); + + pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->bstream.next_in; + pfile_in_zip_read_info->stream.avail_in = pfile_in_zip_read_info->bstream.avail_in; + pfile_in_zip_read_info->stream.total_in = pfile_in_zip_read_info->bstream.total_in_lo32; + pfile_in_zip_read_info->stream.next_out = (Bytef*)pfile_in_zip_read_info->bstream.next_out; + pfile_in_zip_read_info->stream.avail_out = pfile_in_zip_read_info->bstream.avail_out; + pfile_in_zip_read_info->stream.total_out = pfile_in_zip_read_info->bstream.total_out_lo32; + + if (err==BZ_STREAM_END) + return (iRead==0) ? UNZ_EOF : iRead; + if (err!=BZ_OK) + break; +#endif + } // end Z_BZIP2ED + else + { + ZPOS64_T uTotalOutBefore,uTotalOutAfter; + const Bytef *bufBefore; + ZPOS64_T uOutThis; + int flush=Z_SYNC_FLUSH; + + uTotalOutBefore = pfile_in_zip_read_info->stream.total_out; + bufBefore = pfile_in_zip_read_info->stream.next_out; + + /* + if ((pfile_in_zip_read_info->rest_read_uncompressed == + pfile_in_zip_read_info->stream.avail_out) && + (pfile_in_zip_read_info->rest_read_compressed == 0)) + flush = Z_FINISH; + */ + err=inflate(&pfile_in_zip_read_info->stream,flush); + + if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL)) + err = Z_DATA_ERROR; + + uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; + uOutThis = uTotalOutAfter-uTotalOutBefore; + + pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis; + + pfile_in_zip_read_info->crc32 = + crc32(pfile_in_zip_read_info->crc32,bufBefore, + (uInt)(uOutThis)); + + pfile_in_zip_read_info->rest_read_uncompressed -= + uOutThis; + + iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); + + if (err==Z_STREAM_END) + return (iRead==0) ? UNZ_EOF : iRead; + if (err!=Z_OK) + break; + } + } + + if (err==Z_OK) + return iRead; + return err; +} + + +/* + Give the current position in uncompressed data +*/ +extern z_off_t ZEXPORT unztell (unzFile file) +{ + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + return (z_off_t)pfile_in_zip_read_info->stream.total_out; +} + +extern ZPOS64_T ZEXPORT unztell64 (unzFile file) +{ + + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return (ZPOS64_T)-1; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return (ZPOS64_T)-1; + + return pfile_in_zip_read_info->total_out_64; +} + + +/* + return 1 if the end of file was reached, 0 elsewhere +*/ +extern int ZEXPORT unzeof (unzFile file) +{ + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + if (pfile_in_zip_read_info->rest_read_uncompressed == 0) + return 1; + else + return 0; +} + + + +/* +Read extra field from the current file (opened by unzOpenCurrentFile) +This is the local-header version of the extra field (sometimes, there is +more info in the local-header version than in the central-header) + + if buf==NULL, it return the size of the local extra field that can be read + + if buf!=NULL, len is the size of the buffer, the extra header is copied in + buf. + the return value is the number of bytes copied in buf, or (if <0) + the error code +*/ +extern int ZEXPORT unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len) +{ + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + uInt read_now; + ZPOS64_T size_to_read; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + size_to_read = (pfile_in_zip_read_info->size_local_extrafield - + pfile_in_zip_read_info->pos_local_extrafield); + + if (buf==NULL) + return (int)size_to_read; + + if (len>size_to_read) + read_now = (uInt)size_to_read; + else + read_now = (uInt)len ; + + if (read_now==0) + return 0; + + if (ZSEEK64(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + pfile_in_zip_read_info->offset_local_extrafield + + pfile_in_zip_read_info->pos_local_extrafield, + ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + + if (ZREAD64(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + buf,read_now)!=read_now) + return UNZ_ERRNO; + + return (int)read_now; +} + +/* + Close the file in zip opened with unzOpenCurrentFile + Return UNZ_CRCERROR if all the file was read but the CRC is not good +*/ +extern int ZEXPORT unzCloseCurrentFile (unzFile file) +{ + int err=UNZ_OK; + + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + + if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) && + (!pfile_in_zip_read_info->raw)) + { + if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait) + err=UNZ_CRCERROR; + } + + + TRYFREE(pfile_in_zip_read_info->read_buffer); + pfile_in_zip_read_info->read_buffer = NULL; + if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED) + inflateEnd(&pfile_in_zip_read_info->stream); +#ifdef HAVE_BZIP2 + else if (pfile_in_zip_read_info->stream_initialised == Z_BZIP2ED) + BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream); +#endif + + + pfile_in_zip_read_info->stream_initialised = 0; + TRYFREE(pfile_in_zip_read_info); + + s->pfile_in_zip_read=NULL; + + return err; +} + + +/* + Get the global comment string of the ZipFile, in the szComment buffer. + uSizeBuf is the size of the szComment buffer. + return the number of byte copied or an error code <0 +*/ +extern int ZEXPORT unzGetGlobalComment (unzFile file, char * szComment, uLong uSizeBuf) +{ + unz64_s* s; + uLong uReadThis ; + if (file==NULL) + return (int)UNZ_PARAMERROR; + s=(unz64_s*)file; + + uReadThis = uSizeBuf; + if (uReadThis>s->gi.size_comment) + uReadThis = s->gi.size_comment; + + if (ZSEEK64(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + + if (uReadThis>0) + { + *szComment='\0'; + if (ZREAD64(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis) + return UNZ_ERRNO; + } + + if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment)) + *(szComment+s->gi.size_comment)='\0'; + return (int)uReadThis; +} + +/* Additions by RX '2004 */ +extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file) +{ + unz64_s* s; + + if (file==NULL) + return 0; //UNZ_PARAMERROR; + s=(unz64_s*)file; + if (!s->current_file_ok) + return 0; + if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff) + if (s->num_file==s->gi.number_entry) + return 0; + return s->pos_in_central_dir; +} + +extern uLong ZEXPORT unzGetOffset (unzFile file) +{ + ZPOS64_T offset64; + + if (file==NULL) + return 0; //UNZ_PARAMERROR; + offset64 = unzGetOffset64(file); + return (uLong)offset64; +} + +extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos) +{ + unz64_s* s; + int err; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + + s->pos_in_central_dir = pos; + s->num_file = s->gi.number_entry; /* hack */ + err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + s->current_file_ok = (err == UNZ_OK); + return err; +} + +extern int ZEXPORT unzSetOffset (unzFile file, uLong pos) +{ + return unzSetOffset64(file,pos); +} diff --git a/storage/connect/unzip.h b/storage/connect/unzip.h new file mode 100644 index 00000000000..2104e391507 --- /dev/null +++ b/storage/connect/unzip.h @@ -0,0 +1,437 @@ +/* unzip.h -- IO for uncompress .zip files using zlib + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications of Unzip for Zip64 + Copyright (C) 2007-2008 Even Rouault + + Modifications for Zip64 support on both zip and unzip + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + --------------------------------------------------------------------------------- + + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + --------------------------------------------------------------------------------- + + Changes + + See header of unzip64.c + +*/ + +#ifndef _unz64_H +#define _unz64_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#ifndef _ZLIBIOAPI_H +#include "ioapi.h" +#endif + +#ifdef HAVE_BZIP2 +#include "bzlib.h" +#endif + +#define Z_BZIP2ED 12 + +#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) +/* like the STRICT of WIN32, we define a pointer that cannot be converted + from (void*) without cast */ +typedef struct TagunzFile__ { int unused; } unzFile__; +typedef unzFile__ *unzFile; +#else +typedef voidp unzFile; +#endif + + +#define UNZ_OK (0) +#define UNZ_END_OF_LIST_OF_FILE (-100) +#define UNZ_ERRNO (Z_ERRNO) +#define UNZ_EOF (0) +#define UNZ_PARAMERROR (-102) +#define UNZ_BADZIPFILE (-103) +#define UNZ_INTERNALERROR (-104) +#define UNZ_CRCERROR (-105) + +/* tm_unz contain date/time info */ +typedef struct tm_unz_s +{ + uInt tm_sec; /* seconds after the minute - [0,59] */ + uInt tm_min; /* minutes after the hour - [0,59] */ + uInt tm_hour; /* hours since midnight - [0,23] */ + uInt tm_mday; /* day of the month - [1,31] */ + uInt tm_mon; /* months since January - [0,11] */ + uInt tm_year; /* years - [1980..2044] */ +} tm_unz; + +/* unz_global_info structure contain global data about the ZIPfile + These data comes from the end of central dir */ +typedef struct unz_global_info64_s +{ + ZPOS64_T number_entry; /* total number of entries in + the central dir on this disk */ + uLong size_comment; /* size of the global comment of the zipfile */ +} unz_global_info64; + +typedef struct unz_global_info_s +{ + uLong number_entry; /* total number of entries in + the central dir on this disk */ + uLong size_comment; /* size of the global comment of the zipfile */ +} unz_global_info; + +/* unz_file_info contain information about a file in the zipfile */ +typedef struct unz_file_info64_s +{ + uLong version; /* version made by 2 bytes */ + uLong version_needed; /* version needed to extract 2 bytes */ + uLong flag; /* general purpose bit flag 2 bytes */ + uLong compression_method; /* compression method 2 bytes */ + uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ + uLong crc; /* crc-32 4 bytes */ + ZPOS64_T compressed_size; /* compressed size 8 bytes */ + ZPOS64_T uncompressed_size; /* uncompressed size 8 bytes */ + uLong size_filename; /* filename length 2 bytes */ + uLong size_file_extra; /* extra field length 2 bytes */ + uLong size_file_comment; /* file comment length 2 bytes */ + + uLong disk_num_start; /* disk number start 2 bytes */ + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ + + tm_unz tmu_date; +} unz_file_info64; + +typedef struct unz_file_info_s +{ + uLong version; /* version made by 2 bytes */ + uLong version_needed; /* version needed to extract 2 bytes */ + uLong flag; /* general purpose bit flag 2 bytes */ + uLong compression_method; /* compression method 2 bytes */ + uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ + uLong crc; /* crc-32 4 bytes */ + uLong compressed_size; /* compressed size 4 bytes */ + uLong uncompressed_size; /* uncompressed size 4 bytes */ + uLong size_filename; /* filename length 2 bytes */ + uLong size_file_extra; /* extra field length 2 bytes */ + uLong size_file_comment; /* file comment length 2 bytes */ + + uLong disk_num_start; /* disk number start 2 bytes */ + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ + + tm_unz tmu_date; +} unz_file_info; + +extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, + const char* fileName2, + int iCaseSensitivity)); +/* + Compare two filename (fileName1,fileName2). + If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) + If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + or strcasecmp) + If iCaseSenisivity = 0, case sensitivity is defaut of your operating system + (like 1 on Unix, 2 on Windows) +*/ + + +extern unzFile ZEXPORT unzOpen OF((const char *path)); +extern unzFile ZEXPORT unzOpen64 OF((const void *path)); +/* + Open a Zip file. path contain the full pathname (by example, + on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer + "zlib/zlib113.zip". + If the zipfile cannot be opened (file don't exist or in not valid), the + return value is NULL. + Else, the return value is a unzFile Handle, usable with other function + of this unzip package. + the "64" function take a const void* pointer, because the path is just the + value passed to the open64_file_func callback. + Under Windows, if UNICODE is defined, using fill_fopen64_filefunc, the path + is a pointer to a wide unicode string (LPCTSTR is LPCWSTR), so const char* + does not describe the reality +*/ + + +extern unzFile ZEXPORT unzOpen2 OF((const char *path, + zlib_filefunc_def* pzlib_filefunc_def)); +/* + Open a Zip file, like unzOpen, but provide a set of file low level API + for read/write the zip file (see ioapi.h) +*/ + +extern unzFile ZEXPORT unzOpen2_64 OF((const void *path, + zlib_filefunc64_def* pzlib_filefunc_def)); +/* + Open a Zip file, like unz64Open, but provide a set of file low level API + for read/write the zip file (see ioapi.h) +*/ + +extern int ZEXPORT unzClose OF((unzFile file)); +/* + Close a ZipFile opened with unzOpen. + If there is files inside the .Zip opened with unzOpenCurrentFile (see later), + these files MUST be closed with unzCloseCurrentFile before call unzClose. + return UNZ_OK if there is no problem. */ + +extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, + unz_global_info *pglobal_info)); + +extern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file, + unz_global_info64 *pglobal_info)); +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. */ + + +extern int ZEXPORT unzGetGlobalComment OF((unzFile file, + char *szComment, + uLong uSizeBuf)); +/* + Get the global comment string of the ZipFile, in the szComment buffer. + uSizeBuf is the size of the szComment buffer. + return the number of byte copied or an error code <0 +*/ + + +/***************************************************************************/ +/* Unzip package allow you browse the directory of the zipfile */ + +extern int ZEXPORT unzGoToFirstFile OF((unzFile file)); +/* + Set the current file of the zipfile to the first file. + return UNZ_OK if there is no problem +*/ + +extern int ZEXPORT unzGoToNextFile OF((unzFile file)); +/* + Set the current file of the zipfile to the next file. + return UNZ_OK if there is no problem + return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. +*/ + +extern int ZEXPORT unzLocateFile OF((unzFile file, + const char *szFileName, + int iCaseSensitivity)); +/* + Try locate the file szFileName in the zipfile. + For the iCaseSensitivity signification, see unzStringFileNameCompare + + return value : + UNZ_OK if the file is found. It becomes the current file. + UNZ_END_OF_LIST_OF_FILE if the file is not found +*/ + + +/* ****************************************** */ +/* Ryan supplied functions */ +/* unz_file_info contain information about a file in the zipfile */ +typedef struct unz_file_pos_s +{ + uLong pos_in_zip_directory; /* offset in zip file directory */ + uLong num_of_file; /* # of file */ +} unz_file_pos; + +extern int ZEXPORT unzGetFilePos( + unzFile file, + unz_file_pos* file_pos); + +extern int ZEXPORT unzGoToFilePos( + unzFile file, + unz_file_pos* file_pos); + +typedef struct unz64_file_pos_s +{ + ZPOS64_T pos_in_zip_directory; /* offset in zip file directory */ + ZPOS64_T num_of_file; /* # of file */ +} unz64_file_pos; + +extern int ZEXPORT unzGetFilePos64( + unzFile file, + unz64_file_pos* file_pos); + +extern int ZEXPORT unzGoToFilePos64( + unzFile file, + const unz64_file_pos* file_pos); + +/* ****************************************** */ + +extern int ZEXPORT unzGetCurrentFileInfo64 OF((unzFile file, + unz_file_info64 *pfile_info, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize)); + +extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, + unz_file_info *pfile_info, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize)); +/* + Get Info about the current file + if pfile_info!=NULL, the *pfile_info structure will contain somes info about + the current file + if szFileName!=NULL, the filemane string will be copied in szFileName + (fileNameBufferSize is the size of the buffer) + if extraField!=NULL, the extra field information will be copied in extraField + (extraFieldBufferSize is the size of the buffer). + This is the Central-header version of the extra field + if szComment!=NULL, the comment string of the file will be copied in szComment + (commentBufferSize is the size of the buffer) +*/ + + +/** Addition for GDAL : START */ + +extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file)); + +/** Addition for GDAL : END */ + + +/***************************************************************************/ +/* for reading the content of the current zipfile, you can open it, read data + from it, and close it (you can close it before reading all the file) + */ + +extern int ZEXPORT unzOpenCurrentFile OF((unzFile file)); +/* + Open for reading data the current file in the zipfile. + If there is no error, the return value is UNZ_OK. +*/ + +extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file, + const char* password)); +/* + Open for reading data the current file in the zipfile. + password is a crypting password + If there is no error, the return value is UNZ_OK. +*/ + +extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file, + int* method, + int* level, + int raw)); +/* + Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) + if raw==1 + *method will receive method of compression, *level will receive level of + compression + note : you can set level parameter as NULL (if you did not want known level, + but you CANNOT set method parameter as NULL +*/ + +extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file, + int* method, + int* level, + int raw, + const char* password)); +/* + Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) + if raw==1 + *method will receive method of compression, *level will receive level of + compression + note : you can set level parameter as NULL (if you did not want known level, + but you CANNOT set method parameter as NULL +*/ + + +extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); +/* + Close the file in zip opened with unzOpenCurrentFile + Return UNZ_CRCERROR if all the file was read but the CRC is not good +*/ + +extern int ZEXPORT unzReadCurrentFile OF((unzFile file, + voidp buf, + unsigned len)); +/* + Read bytes from the current file (opened by unzOpenCurrentFile) + buf contain buffer where data must be copied + len the size of buf. + + return the number of byte copied if somes bytes are copied + return 0 if the end of file was reached + return <0 with error code if there is an error + (UNZ_ERRNO for IO error, or zLib error for uncompress error) +*/ + +extern z_off_t ZEXPORT unztell OF((unzFile file)); + +extern ZPOS64_T ZEXPORT unztell64 OF((unzFile file)); +/* + Give the current position in uncompressed data +*/ + +extern int ZEXPORT unzeof OF((unzFile file)); +/* + return 1 if the end of file was reached, 0 elsewhere +*/ + +extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, + voidp buf, + unsigned len)); +/* + Read extra field from the current file (opened by unzOpenCurrentFile) + This is the local-header version of the extra field (sometimes, there is + more info in the local-header version than in the central-header) + + if buf==NULL, it return the size of the local extra field + + if buf!=NULL, len is the size of the buffer, the extra header is copied in + buf. + the return value is the number of bytes copied in buf, or (if <0) + the error code +*/ + +/***************************************************************************/ + +/* Get the current file offset */ +extern ZPOS64_T ZEXPORT unzGetOffset64 (unzFile file); +extern uLong ZEXPORT unzGetOffset (unzFile file); + +/* Set the current file offset */ +extern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos); +extern int ZEXPORT unzSetOffset (unzFile file, uLong pos); + + + +#ifdef __cplusplus +} +#endif + +#endif /* _unz64_H */ diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp index 64d0e13e8c4..ced690e77c0 100644 --- a/storage/connect/value.cpp +++ b/storage/connect/value.cpp @@ -1,7 +1,7 @@ /************* Value C++ Functions Source Code File (.CPP) *************/ -/* Name: VALUE.CPP Version 2.5 */ +/* Name: VALUE.CPP Version 2.6 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2001-2015 */ +/* (C) Copyright to the author Olivier BERTRAND 2001-2016 */ /* */ /* This file contains the VALUE and derived classes family functions. */ /* These classes contain values of different types. They are used so */ @@ -792,19 +792,29 @@ uchar TYPVAL::GetTypedValue(PVBLK blk, int n) /***********************************************************************/ /* TYPVAL SetBinValue: with bytes extracted from a line. */ +/* Currently only used reading column of binary files. */ /***********************************************************************/ template void TYPVAL::SetBinValue(void *p) - { - Tval = *(TYPE *)p; - Null = false; - } // end of SetBinValue +{ +#if defined(UNALIGNED_OK) + // x86 can cast non-aligned memory directly + Tval = *(TYPE *)p; +#else + // Prevent unaligned memory access on MIPS and ArmHF platforms. + // Make use of memcpy instead of straight pointer dereferencing. + // Currently only used by WriteColumn of binary files. + // From original author: Vicentiu Ciorbaru + memcpy(&Tval, p, sizeof(TYPE)); +#endif + Null = false; +} // end of SetBinValue /***********************************************************************/ /* GetBinValue: fill a buffer with the internal binary value. */ /* This function checks whether the buffer length is enough and */ /* returns true if not. Actual filling occurs only if go is true. */ -/* Currently used by WriteColumn of binary files. */ +/* Currently only used writing column of binary files. */ /***********************************************************************/ template bool TYPVAL::GetBinValue(void *buf, int buflen, bool go) @@ -819,7 +829,16 @@ bool TYPVAL::GetBinValue(void *buf, int buflen, bool go) //#endif if (go) - *(TYPE *)buf = Tval; +#if defined(UNALIGNED_OK) + // x86 can cast non-aligned memory directly + *(TYPE *)buf = Tval; +#else + // Prevent unaligned memory access on MIPS and ArmHF platforms. + // Make use of memcpy instead of straight pointer dereferencing. + // Currently only used by WriteColumn of binary files. + // From original author: Vicentiu Ciorbaru + memcpy(buf, &Tval, sizeof(TYPE)); +#endif Null = false; return false; diff --git a/storage/connect/value.h b/storage/connect/value.h index c5a381e89da..a670ade4c28 100644 --- a/storage/connect/value.h +++ b/storage/connect/value.h @@ -1,7 +1,7 @@ /**************** Value H Declares Source Code File (.H) ***************/ -/* Name: VALUE.H Version 2.1 */ +/* Name: VALUE.H Version 2.2 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2001-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2001-2016 */ /* */ /* This file contains the VALUE and derived classes declares. */ /***********************************************************************/ @@ -16,6 +16,13 @@ #include "assert.h" #include "block.h" +/***********************************************************************/ +/* This should list the processors accepting unaligned numeral values.*/ +/***********************************************************************/ +#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_IA64) +#define UNALIGNED_OK +#endif + /***********************************************************************/ /* Types used in some class definitions. */ /***********************************************************************/ @@ -116,27 +123,46 @@ class DllExport VALUE : public BLOCK { virtual bool Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op); virtual bool FormatValue(PVAL vp, char *fmt) = 0; - /** - Set value from a non-aligned in-memory value in the machine byte order. - TYPE can be either of: - - int, short, longlong - - uint, ushort, ulonglong - - float, double - @param - a pointer to a non-aligned value of type TYPE. - */ - template - void SetValueNonAligned(const char *p) - { -#if defined(__i386__) || defined(__x86_64__) - SetValue(*((TYPE*) p)); // x86 can cast non-aligned memory directly + /** + Set value from a non-aligned in-memory value in the machine byte order. + TYPE can be either of: + - int, short, longlong + - uint, ushort, ulonglong + - float, double + @param - a pointer to a non-aligned value of type TYPE. + */ + template + void SetValueNonAligned(const char *p) + { +#if defined(UNALIGNED_OK) + SetValue(*((TYPE*)p)); // x86 can cast non-aligned memory directly #else - TYPE tmp; // a slower version for non-x86 platforms - memcpy(&tmp, p, sizeof(tmp)); - SetValue(tmp); + TYPE tmp; // a slower version for non-x86 platforms + memcpy(&tmp, p, sizeof(tmp)); + SetValue(tmp); #endif - } + } // end of SetValueNonAligned - protected: + /** + Get value from a non-aligned in-memory value in the machine byte order. + TYPE can be either of: + - int, short, longlong + - uint, ushort, ulonglong + - float, double + @params - a pointer to a non-aligned value of type TYPE, the TYPE value. + */ + template + void GetValueNonAligned(char *p, TYPE n) + { +#if defined(UNALIGNED_OK) + *(TYPE *)p = n; // x86 can cast non-aligned memory directly +#else + TYPE tmp = n; // a slower version for non-x86 platforms + memcpy(p, &tmp, sizeof(tmp)); +#endif + } // end of SetValueNonAligned + +protected: virtual bool SetConstFormat(PGLOBAL, FORMAT&) = 0; const char *GetXfmt(void); diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp index 56312630278..a2cf4e77b80 100755 --- a/storage/connect/xindex.cpp +++ b/storage/connect/xindex.cpp @@ -45,7 +45,9 @@ //nclude "array.h" #include "filamtxt.h" #include "tabdos.h" +#if defined(VCT_SUPPORT) #include "tabvct.h" +#endif // VCT_SUPPORT /***********************************************************************/ /* Macro or external routine definition */ @@ -293,9 +295,11 @@ bool XINDEX::AddColumns(void) return false; // Not applying to static index else if (IsMul()) return false; // Not done yet for multiple index - else if (Tbxp->GetAmType() == TYPE_AM_VCT && ((PTDBVCT)Tbxp)->IsSplit()) +#if defined(VCT_SUPPORT) + else if (Tbxp->GetAmType() == TYPE_AM_VCT && ((PTDBVCT)Tbxp)->IsSplit()) return false; // This would require to read additional files - else +#endif // VCT_SUPPORT + else return true; } // end of AddColumns diff --git a/storage/connect/zip.c b/storage/connect/zip.c new file mode 100644 index 00000000000..ea54853e858 --- /dev/null +++ b/storage/connect/zip.c @@ -0,0 +1,2007 @@ +/* zip.c -- IO on .zip files using zlib + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + Changes + Oct-2009 - Mathias Svensson - Remove old C style function prototypes + Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file archives + Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get better overview of some functions. + Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra field data from its ZIP64 data + It is used when recreting zip archive with RAW when deleting items from a zip. + ZIP64 data is automaticly added to items that needs it, and existing ZIP64 data need to be removed. + Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bzip2 lib is required) + Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer + +*/ + + +#include +#include +#include +#include +#include "zlib.h" +#include "zip.h" + +#ifdef STDC +# include +# include +# include +#endif +#ifdef NO_ERRNO_H + extern int errno; +#else +# include +#endif + + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + +#ifndef VERSIONMADEBY +# define VERSIONMADEBY (0x0) /* platform depedent */ +#endif + +#ifndef Z_BUFSIZE +#define Z_BUFSIZE (64*1024) //(16384) +#endif + +#ifndef Z_MAXFILENAMEINZIP +#define Z_MAXFILENAMEINZIP (256) +#endif + +#ifndef ALLOC +# define ALLOC(size) (malloc(size)) +#endif +#ifndef TRYFREE +# define TRYFREE(p) {if (p) free(p);} +#endif + +/* +#define SIZECENTRALDIRITEM (0x2e) +#define SIZEZIPLOCALHEADER (0x1e) +*/ + +/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ + + +// NOT sure that this work on ALL platform +#define MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32)) + +#ifndef SEEK_CUR +#define SEEK_CUR 1 +#endif + +#ifndef SEEK_END +#define SEEK_END 2 +#endif + +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif + +#ifndef DEF_MEM_LEVEL +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif +#endif +const char zip_copyright[] =" zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; + + +#define SIZEDATA_INDATABLOCK (4096-(4*4)) + +#define LOCALHEADERMAGIC (0x04034b50) +#define CENTRALHEADERMAGIC (0x02014b50) +#define ENDHEADERMAGIC (0x06054b50) +#define ZIP64ENDHEADERMAGIC (0x6064b50) +#define ZIP64ENDLOCHEADERMAGIC (0x7064b50) + +#define FLAG_LOCALHEADER_OFFSET (0x06) +#define CRC_LOCALHEADER_OFFSET (0x0e) + +#define SIZECENTRALHEADER (0x2e) /* 46 */ + +typedef struct linkedlist_datablock_internal_s +{ + struct linkedlist_datablock_internal_s* next_datablock; + uLong avail_in_this_block; + uLong filled_in_this_block; + uLong unused; /* for future use and alignement */ + unsigned char data[SIZEDATA_INDATABLOCK]; +} linkedlist_datablock_internal; + +typedef struct linkedlist_data_s +{ + linkedlist_datablock_internal* first_block; + linkedlist_datablock_internal* last_block; +} linkedlist_data; + + +typedef struct +{ + z_stream stream; /* zLib stream structure for inflate */ +#ifdef HAVE_BZIP2 + bz_stream bstream; /* bzLib stream structure for bziped */ +#endif + + int stream_initialised; /* 1 is stream is initialised */ + uInt pos_in_buffered_data; /* last written byte in buffered_data */ + + ZPOS64_T pos_local_header; /* offset of the local header of the file + currenty writing */ + char* central_header; /* central header data for the current file */ + uLong size_centralExtra; + uLong size_centralheader; /* size of the central header for cur file */ + uLong size_centralExtraFree; /* Extra bytes allocated to the centralheader but that are not used */ + uLong flag; /* flag of the file currently writing */ + + int method; /* compression method of file currenty wr.*/ + int raw; /* 1 for directly writing raw data */ + Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/ + uLong dosDate; + uLong crc32; + int encrypt; + int zip64; /* Add ZIP64 extened information in the extra field */ + ZPOS64_T pos_zip64extrainfo; + ZPOS64_T totalCompressedData; + ZPOS64_T totalUncompressedData; +#ifndef NOCRYPT + unsigned long keys[3]; /* keys defining the pseudo-random sequence */ + const z_crc_t* pcrc_32_tab; + int crypt_header_size; +#endif +} curfile64_info; + +typedef struct +{ + zlib_filefunc64_32_def z_filefunc; + voidpf filestream; /* io structore of the zipfile */ + linkedlist_data central_dir;/* datablock with central dir in construction*/ + int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/ + curfile64_info ci; /* info on the file curretly writing */ + + ZPOS64_T begin_pos; /* position of the beginning of the zipfile */ + ZPOS64_T add_position_when_writting_offset; + ZPOS64_T number_entry; + +#ifndef NO_ADDFILEINEXISTINGZIP + char *globalcomment; +#endif + +} zip64_internal; + + +#ifndef NOCRYPT +#define INCLUDECRYPTINGCODE_IFCRYPTALLOWED +#include "crypt.h" +#endif + +local linkedlist_datablock_internal* allocate_new_datablock() +{ + linkedlist_datablock_internal* ldi; + ldi = (linkedlist_datablock_internal*) + ALLOC(sizeof(linkedlist_datablock_internal)); + if (ldi!=NULL) + { + ldi->next_datablock = NULL ; + ldi->filled_in_this_block = 0 ; + ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ; + } + return ldi; +} + +local void free_datablock(linkedlist_datablock_internal* ldi) +{ + while (ldi!=NULL) + { + linkedlist_datablock_internal* ldinext = ldi->next_datablock; + TRYFREE(ldi); + ldi = ldinext; + } +} + +local void init_linkedlist(linkedlist_data* ll) +{ + ll->first_block = ll->last_block = NULL; +} + +local void free_linkedlist(linkedlist_data* ll) +{ + free_datablock(ll->first_block); + ll->first_block = ll->last_block = NULL; +} + + +local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len) +{ + linkedlist_datablock_internal* ldi; + const unsigned char* from_copy; + + if (ll==NULL) + return ZIP_INTERNALERROR; + + if (ll->last_block == NULL) + { + ll->first_block = ll->last_block = allocate_new_datablock(); + if (ll->first_block == NULL) + return ZIP_INTERNALERROR; + } + + ldi = ll->last_block; + from_copy = (unsigned char*)buf; + + while (len>0) + { + uInt copy_this; + uInt i; + unsigned char* to_copy; + + if (ldi->avail_in_this_block==0) + { + ldi->next_datablock = allocate_new_datablock(); + if (ldi->next_datablock == NULL) + return ZIP_INTERNALERROR; + ldi = ldi->next_datablock ; + ll->last_block = ldi; + } + + if (ldi->avail_in_this_block < len) + copy_this = (uInt)ldi->avail_in_this_block; + else + copy_this = (uInt)len; + + to_copy = &(ldi->data[ldi->filled_in_this_block]); + + for (i=0;ifilled_in_this_block += copy_this; + ldi->avail_in_this_block -= copy_this; + from_copy += copy_this ; + len -= copy_this; + } + return ZIP_OK; +} + + + +/****************************************************************************/ + +#ifndef NO_ADDFILEINEXISTINGZIP +/* =========================================================================== + Inputs a long in LSB order to the given file + nbByte == 1, 2 ,4 or 8 (byte, short or long, ZPOS64_T) +*/ + +local int zip64local_putValue OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte)); +local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte) +{ + unsigned char buf[8]; + int n; + for (n = 0; n < nbByte; n++) + { + buf[n] = (unsigned char)(x & 0xff); + x >>= 8; + } + if (x != 0) + { /* data overflow - hack for ZIP64 (X Roche) */ + for (n = 0; n < nbByte; n++) + { + buf[n] = 0xff; + } + } + + if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte) + return ZIP_ERRNO; + else + return ZIP_OK; +} + +local void zip64local_putValue_inmemory OF((void* dest, ZPOS64_T x, int nbByte)); +local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte) +{ + unsigned char* buf=(unsigned char*)dest; + int n; + for (n = 0; n < nbByte; n++) { + buf[n] = (unsigned char)(x & 0xff); + x >>= 8; + } + + if (x != 0) + { /* data overflow - hack for ZIP64 */ + for (n = 0; n < nbByte; n++) + { + buf[n] = 0xff; + } + } +} + +/****************************************************************************/ + + +local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm) +{ + uLong year = (uLong)ptm->tm_year; + if (year>=1980) + year-=1980; + else if (year>=80) + year-=80; + return + (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) | + ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour)); +} + + +/****************************************************************************/ + +local int zip64local_getByte OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi)); + +local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,voidpf filestream,int* pi) +{ + unsigned char c; + int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); + if (err==1) + { + *pi = (int)c; + return ZIP_OK; + } + else + { + if (ZERROR64(*pzlib_filefunc_def,filestream)) + return ZIP_ERRNO; + else + return ZIP_EOF; + } +} + + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets +*/ +local int zip64local_getShort OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); + +local int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) +{ + uLong x ; + int i = 0; + int err; + + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int zip64local_getLong OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); + +local int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) +{ + uLong x ; + int i = 0; + int err; + + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<16; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<24; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int zip64local_getLong64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)); + + +local int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX) +{ + ZPOS64_T x; + int i = 0; + int err; + + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (ZPOS64_T)i; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<8; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<16; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<24; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<32; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<40; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<48; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<56; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + + return err; +} + +#ifndef BUFREADCOMMENT +#define BUFREADCOMMENT (0x400) +#endif +/* + Locate the Central directory of a zipfile (at the end, just before + the global comment) +*/ +local ZPOS64_T zip64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); + +local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) +{ + unsigned char* buf; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; + + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + return uPosFound; +} + +/* +Locate the End of Zip64 Central directory locator and from there find the CD of a zipfile (at the end, just before +the global comment) +*/ +local ZPOS64_T zip64local_SearchCentralDir64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); + +local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) +{ + unsigned char* buf; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; + uLong uL; + ZPOS64_T relativeOffset; + + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + { + // Signature "0x07064b50" Zip64 end of central directory locater + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) + { + uPosFound = uReadPos+i; + break; + } + } + + if (uPosFound!=0) + break; + } + + TRYFREE(buf); + if (uPosFound == 0) + return 0; + + /* Zip64 end of central directory locator */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature, already checked */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + + /* number of the disk with the start of the zip64 end of central directory */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + if (uL != 0) + return 0; + + /* relative offset of the zip64 end of central directory record */ + if (zip64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=ZIP_OK) + return 0; + + /* total number of disks */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + if (uL != 1) + return 0; + + /* Goto Zip64 end of central directory record */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + + if (uL != 0x06064b50) // signature of 'Zip64 end of central directory' + return 0; + + return relativeOffset; +} + +int LoadCentralDirectoryRecord(zip64_internal* pziinit) +{ + int err=ZIP_OK; + ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + + ZPOS64_T size_central_dir; /* size of the central directory */ + ZPOS64_T offset_central_dir; /* offset of start of central directory */ + ZPOS64_T central_pos; + uLong uL; + + uLong number_disk; /* number of the current dist, used for + spaning ZIP, unsupported, always 0*/ + uLong number_disk_with_CD; /* number the the disk with central dir, used + for spaning ZIP, unsupported, always 0*/ + ZPOS64_T number_entry; + ZPOS64_T number_entry_CD; /* total number of entries in + the central dir + (same than number_entry on nospan) */ + uLong VersionMadeBy; + uLong VersionNeeded; + uLong size_comment; + + int hasZIP64Record = 0; + + // check first if we find a ZIP64 record + central_pos = zip64local_SearchCentralDir64(&pziinit->z_filefunc,pziinit->filestream); + if(central_pos > 0) + { + hasZIP64Record = 1; + } + else if(central_pos == 0) + { + central_pos = zip64local_SearchCentralDir(&pziinit->z_filefunc,pziinit->filestream); + } + +/* disable to allow appending to empty ZIP archive + if (central_pos==0) + err=ZIP_ERRNO; +*/ + + if(hasZIP64Record) + { + ZPOS64_T sizeEndOfCentralDirectory; + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + /* the signature, already checked */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK) + err=ZIP_ERRNO; + + /* size of zip64 end of central directory record */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &sizeEndOfCentralDirectory)!=ZIP_OK) + err=ZIP_ERRNO; + + /* version made by */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionMadeBy)!=ZIP_OK) + err=ZIP_ERRNO; + + /* version needed to extract */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionNeeded)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of this disk */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of the disk with the start of the central directory */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central directory on this disk */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &number_entry)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central directory */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&number_entry_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) + err=ZIP_BADZIPFILE; + + /* size of the central directory */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&size_central_dir)!=ZIP_OK) + err=ZIP_ERRNO; + + /* offset of start of central directory with respect to the + starting disk number */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&offset_central_dir)!=ZIP_OK) + err=ZIP_ERRNO; + + // TODO.. + // read the comment from the standard central header. + size_comment = 0; + } + else + { + // Read End of central Directory info + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=ZIP_ERRNO; + + /* the signature, already checked */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of this disk */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of the disk with the start of the central directory */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central dir on this disk */ + number_entry = 0; + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + number_entry = uL; + + /* total number of entries in the central dir */ + number_entry_CD = 0; + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + number_entry_CD = uL; + + if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) + err=ZIP_BADZIPFILE; + + /* size of the central directory */ + size_central_dir = 0; + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + size_central_dir = uL; + + /* offset of start of central directory with respect to the starting disk number */ + offset_central_dir = 0; + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + offset_central_dir = uL; + + + /* zipfile global comment length */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &size_comment)!=ZIP_OK) + err=ZIP_ERRNO; + } + + if ((central_posz_filefunc, pziinit->filestream); + return ZIP_ERRNO; + } + + if (size_comment>0) + { + pziinit->globalcomment = (char*)ALLOC(size_comment+1); + if (pziinit->globalcomment) + { + size_comment = ZREAD64(pziinit->z_filefunc, pziinit->filestream, pziinit->globalcomment,size_comment); + pziinit->globalcomment[size_comment]=0; + } + } + + byte_before_the_zipfile = central_pos - (offset_central_dir+size_central_dir); + pziinit->add_position_when_writting_offset = byte_before_the_zipfile; + + { + ZPOS64_T size_central_dir_to_read = size_central_dir; + size_t buf_size = SIZEDATA_INDATABLOCK; + void* buf_read = (void*)ALLOC(buf_size); + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir + byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + while ((size_central_dir_to_read>0) && (err==ZIP_OK)) + { + ZPOS64_T read_this = SIZEDATA_INDATABLOCK; + if (read_this > size_central_dir_to_read) + read_this = size_central_dir_to_read; + + if (ZREAD64(pziinit->z_filefunc, pziinit->filestream,buf_read,(uLong)read_this) != read_this) + err=ZIP_ERRNO; + + if (err==ZIP_OK) + err = add_data_in_datablock(&pziinit->central_dir,buf_read, (uLong)read_this); + + size_central_dir_to_read-=read_this; + } + TRYFREE(buf_read); + } + pziinit->begin_pos = byte_before_the_zipfile; + pziinit->number_entry = number_entry_CD; + + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + return err; +} + + +#endif /* !NO_ADDFILEINEXISTINGZIP*/ + + +/************************************************************/ +extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def) +{ + zip64_internal ziinit; + zip64_internal* zi; + int err=ZIP_OK; + + ziinit.z_filefunc.zseek32_file = NULL; + ziinit.z_filefunc.ztell32_file = NULL; + if (pzlib_filefunc64_32_def==NULL) + fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64); + else + ziinit.z_filefunc = *pzlib_filefunc64_32_def; + + ziinit.filestream = ZOPEN64(ziinit.z_filefunc, + pathname, + (append == APPEND_STATUS_CREATE) ? + (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) : + (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING)); + + if (ziinit.filestream == NULL) + return NULL; + + if (append == APPEND_STATUS_CREATEAFTER) + ZSEEK64(ziinit.z_filefunc,ziinit.filestream,0,SEEK_END); + + ziinit.begin_pos = ZTELL64(ziinit.z_filefunc,ziinit.filestream); + ziinit.in_opened_file_inzip = 0; + ziinit.ci.stream_initialised = 0; + ziinit.number_entry = 0; + ziinit.add_position_when_writting_offset = 0; + init_linkedlist(&(ziinit.central_dir)); + + + + zi = (zip64_internal*)ALLOC(sizeof(zip64_internal)); + if (zi==NULL) + { + ZCLOSE64(ziinit.z_filefunc,ziinit.filestream); + return NULL; + } + + /* now we add file in a zipfile */ +# ifndef NO_ADDFILEINEXISTINGZIP + ziinit.globalcomment = NULL; + if (append == APPEND_STATUS_ADDINZIP) + { + // Read and Cache Central Directory Records + err = LoadCentralDirectoryRecord(&ziinit); + } + + if (globalcomment) + { + *globalcomment = ziinit.globalcomment; + } +# endif /* !NO_ADDFILEINEXISTINGZIP*/ + + if (err != ZIP_OK) + { +# ifndef NO_ADDFILEINEXISTINGZIP + TRYFREE(ziinit.globalcomment); +# endif /* !NO_ADDFILEINEXISTINGZIP*/ + TRYFREE(zi); + return NULL; + } + else + { + *zi = ziinit; + return (zipFile)zi; + } +} + +extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def) +{ + if (pzlib_filefunc32_def != NULL) + { + zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; + fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def); + return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill); + } + else + return zipOpen3(pathname, append, globalcomment, NULL); +} + +extern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def) +{ + if (pzlib_filefunc_def != NULL) + { + zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; + zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def; + zlib_filefunc64_32_def_fill.ztell32_file = NULL; + zlib_filefunc64_32_def_fill.zseek32_file = NULL; + return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill); + } + else + return zipOpen3(pathname, append, globalcomment, NULL); +} + + + +extern zipFile ZEXPORT zipOpen (const char* pathname, int append) +{ + return zipOpen3((const void*)pathname,append,NULL,NULL); +} + +extern zipFile ZEXPORT zipOpen64 (const void* pathname, int append) +{ + return zipOpen3(pathname,append,NULL,NULL); +} + +int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local) +{ + /* write the local header */ + int err; + uInt size_filename = (uInt)strlen(filename); + uInt size_extrafield = size_extrafield_local; + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC, 4); + + if (err==ZIP_OK) + { + if(zi->ci.zip64) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);/* version needed to extract */ + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */ + } + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2); + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2); + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4); + + // CRC / Compressed size / Uncompressed size will be filled in later and rewritten later + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */ + if (err==ZIP_OK) + { + if(zi->ci.zip64) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* compressed size, unknown */ + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */ + } + if (err==ZIP_OK) + { + if(zi->ci.zip64) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* uncompressed size, unknown */ + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */ + } + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2); + + if(zi->ci.zip64) + { + size_extrafield += 20; + } + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield,2); + + if ((err==ZIP_OK) && (size_filename > 0)) + { + if (ZWRITE64(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename) + err = ZIP_ERRNO; + } + + if ((err==ZIP_OK) && (size_extrafield_local > 0)) + { + if (ZWRITE64(zi->z_filefunc, zi->filestream, extrafield_local, size_extrafield_local) != size_extrafield_local) + err = ZIP_ERRNO; + } + + + if ((err==ZIP_OK) && (zi->ci.zip64)) + { + // write the Zip64 extended info + short HeaderID = 1; + short DataSize = 16; + ZPOS64_T CompressedSize = 0; + ZPOS64_T UncompressedSize = 0; + + // Remember position of Zip64 extended info for the local file header. (needed when we update size after done with file) + zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream); + + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)HeaderID,2); + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2); + + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8); + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8); + } + + return err; +} + +/* + NOTE. + When writing RAW the ZIP64 extended information in extrafield_local and extrafield_global needs to be stripped + before calling this function it can be done with zipRemoveExtraInfoBlock + + It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize + unnecessary allocations. + */ +extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, + uLong versionMadeBy, uLong flagBase, int zip64) +{ + zip64_internal* zi; + uInt size_filename; + uInt size_comment; + uInt i; + int err = ZIP_OK; + +# ifdef NOCRYPT + (crcForCrypting); + if (password != NULL) + return ZIP_PARAMERROR; +# endif + + if (file == NULL) + return ZIP_PARAMERROR; + +#ifdef HAVE_BZIP2 + if ((method!=0) && (method!=Z_DEFLATED) && (method!=Z_BZIP2ED)) + return ZIP_PARAMERROR; +#else + if ((method!=0) && (method!=Z_DEFLATED)) + return ZIP_PARAMERROR; +#endif + + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 1) + { + err = zipCloseFileInZip (file); + if (err != ZIP_OK) + return err; + } + + if (filename==NULL) + filename="-"; + + if (comment==NULL) + size_comment = 0; + else + size_comment = (uInt)strlen(comment); + + size_filename = (uInt)strlen(filename); + + if (zipfi == NULL) + zi->ci.dosDate = 0; + else + { + if (zipfi->dosDate != 0) + zi->ci.dosDate = zipfi->dosDate; + else + zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date); + } + + zi->ci.flag = flagBase; + if ((level==8) || (level==9)) + zi->ci.flag |= 2; + if (level==2) + zi->ci.flag |= 4; + if (level==1) + zi->ci.flag |= 6; + if (password != NULL) + zi->ci.flag |= 1; + + zi->ci.crc32 = 0; + zi->ci.method = method; + zi->ci.encrypt = 0; + zi->ci.stream_initialised = 0; + zi->ci.pos_in_buffered_data = 0; + zi->ci.raw = raw; + zi->ci.pos_local_header = ZTELL64(zi->z_filefunc,zi->filestream); + + zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comment; + zi->ci.size_centralExtraFree = 32; // Extra space we have reserved in case we need to add ZIP64 extra info data + + zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader + zi->ci.size_centralExtraFree); + + zi->ci.size_centralExtra = size_extrafield_global; + zip64local_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); + /* version info */ + zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)versionMadeBy,2); + zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); + zip64local_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); + zip64local_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); + zip64local_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); + zip64local_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ + zip64local_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ + zip64local_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ + zip64local_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); + zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); + zip64local_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); + zip64local_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ + + if (zipfi==NULL) + zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); + else + zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); + + if (zipfi==NULL) + zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); + else + zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); + + if(zi->ci.pos_local_header >= 0xffffffff) + zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)0xffffffff,4); + else + zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header - zi->add_position_when_writting_offset,4); + + for (i=0;ici.central_header+SIZECENTRALHEADER+i) = *(filename+i); + + for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+i) = + *(((const char*)extrafield_global)+i); + + for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+ + size_extrafield_global+i) = *(comment+i); + if (zi->ci.central_header == NULL) + return ZIP_INTERNALERROR; + + zi->ci.zip64 = zip64; + zi->ci.totalCompressedData = 0; + zi->ci.totalUncompressedData = 0; + zi->ci.pos_zip64extrainfo = 0; + + err = Write_LocalFileHeader(zi, filename, size_extrafield_local, extrafield_local); + +#ifdef HAVE_BZIP2 + zi->ci.bstream.avail_in = (uInt)0; + zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; + zi->ci.bstream.total_in_hi32 = 0; + zi->ci.bstream.total_in_lo32 = 0; + zi->ci.bstream.total_out_hi32 = 0; + zi->ci.bstream.total_out_lo32 = 0; +#endif + + zi->ci.stream.avail_in = (uInt)0; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + zi->ci.stream.total_in = 0; + zi->ci.stream.total_out = 0; + zi->ci.stream.data_type = Z_BINARY; + +#ifdef HAVE_BZIP2 + if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED || zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) +#else + if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) +#endif + { + if(zi->ci.method == Z_DEFLATED) + { + zi->ci.stream.zalloc = (alloc_func)0; + zi->ci.stream.zfree = (free_func)0; + zi->ci.stream.opaque = (voidpf)0; + + if (windowBits>0) + windowBits = -windowBits; + + err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy); + + if (err==Z_OK) + zi->ci.stream_initialised = Z_DEFLATED; + } + else if(zi->ci.method == Z_BZIP2ED) + { +#ifdef HAVE_BZIP2 + // Init BZip stuff here + zi->ci.bstream.bzalloc = 0; + zi->ci.bstream.bzfree = 0; + zi->ci.bstream.opaque = (voidpf)0; + + err = BZ2_bzCompressInit(&zi->ci.bstream, level, 0,35); + if(err == BZ_OK) + zi->ci.stream_initialised = Z_BZIP2ED; +#endif + } + + } + +# ifndef NOCRYPT + zi->ci.crypt_header_size = 0; + if ((err==Z_OK) && (password != NULL)) + { + unsigned char bufHead[RAND_HEAD_LEN]; + unsigned int sizeHead; + zi->ci.encrypt = 1; + zi->ci.pcrc_32_tab = get_crc_table(); + /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/ + + sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); + zi->ci.crypt_header_size = sizeHead; + + if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) + err = ZIP_ERRNO; + } +# endif + + if (err==Z_OK) + zi->in_opened_file_inzip = 1; + return err; +} + +extern int ZEXPORT zipOpenNewFileInZip4 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, + uLong versionMadeBy, uLong flagBase) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, versionMadeBy, flagBase, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip3 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, VERSIONMADEBY, 0, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, int zip64) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, VERSIONMADEBY, 0, zip64); +} + +extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, int zip64) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, zip64); +} + +extern int ZEXPORT zipOpenNewFileInZip64 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void*extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int zip64) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, 0, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, zip64); +} + +extern int ZEXPORT zipOpenNewFileInZip (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void*extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, 0, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, 0); +} + +local int zip64FlushWriteBuffer(zip64_internal* zi) +{ + int err=ZIP_OK; + + if (zi->ci.encrypt != 0) + { +#ifndef NOCRYPT + uInt i; + int t; + for (i=0;ici.pos_in_buffered_data;i++) + zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t); +#endif + } + + if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi->ci.pos_in_buffered_data) + err = ZIP_ERRNO; + + zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data; + +#ifdef HAVE_BZIP2 + if(zi->ci.method == Z_BZIP2ED) + { + zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32; + zi->ci.bstream.total_in_lo32 = 0; + zi->ci.bstream.total_in_hi32 = 0; + } + else +#endif + { + zi->ci.totalUncompressedData += zi->ci.stream.total_in; + zi->ci.stream.total_in = 0; + } + + + zi->ci.pos_in_buffered_data = 0; + + return err; +} + +extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned int len) +{ + zip64_internal* zi; + int err=ZIP_OK; + + if (file == NULL) + return ZIP_PARAMERROR; + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 0) + return ZIP_PARAMERROR; + + zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len); + +#ifdef HAVE_BZIP2 + if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw)) + { + zi->ci.bstream.next_in = (void*)buf; + zi->ci.bstream.avail_in = len; + err = BZ_RUN_OK; + + while ((err==BZ_RUN_OK) && (zi->ci.bstream.avail_in>0)) + { + if (zi->ci.bstream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; + } + + + if(err != BZ_RUN_OK) + break; + + if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) + { + uLong uTotalOutBefore_lo = zi->ci.bstream.total_out_lo32; +// uLong uTotalOutBefore_hi = zi->ci.bstream.total_out_hi32; + err=BZ2_bzCompress(&zi->ci.bstream, BZ_RUN); + + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore_lo) ; + } + } + + if(err == BZ_RUN_OK) + err = ZIP_OK; + } + else +#endif + { + zi->ci.stream.next_in = (Bytef*)buf; + zi->ci.stream.avail_in = len; + + while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) + { + if (zi->ci.stream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + } + + + if(err != ZIP_OK) + break; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + uLong uTotalOutBefore = zi->ci.stream.total_out; + err=deflate(&zi->ci.stream, Z_NO_FLUSH); + if(uTotalOutBefore > zi->ci.stream.total_out) + { + int bBreak = 0; + bBreak++; + } + + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + } + else + { + uInt copy_this,i; + if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) + copy_this = zi->ci.stream.avail_in; + else + copy_this = zi->ci.stream.avail_out; + + for (i = 0; i < copy_this; i++) + *(((char*)zi->ci.stream.next_out)+i) = + *(((const char*)zi->ci.stream.next_in)+i); + { + zi->ci.stream.avail_in -= copy_this; + zi->ci.stream.avail_out-= copy_this; + zi->ci.stream.next_in+= copy_this; + zi->ci.stream.next_out+= copy_this; + zi->ci.stream.total_in+= copy_this; + zi->ci.stream.total_out+= copy_this; + zi->ci.pos_in_buffered_data += copy_this; + } + } + }// while(...) + } + + return err; +} + +extern int ZEXPORT zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32) +{ + return zipCloseFileInZipRaw64 (file, uncompressed_size, crc32); +} + +extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_size, uLong crc32) +{ + zip64_internal* zi; + ZPOS64_T compressed_size; + uLong invalidValue = 0xffffffff; + short datasize = 0; + int err=ZIP_OK; + + if (file == NULL) + return ZIP_PARAMERROR; + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 0) + return ZIP_PARAMERROR; + zi->ci.stream.avail_in = 0; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + while (err==ZIP_OK) + { + uLong uTotalOutBefore; + if (zi->ci.stream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + } + uTotalOutBefore = zi->ci.stream.total_out; + err=deflate(&zi->ci.stream, Z_FINISH); + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + } + } + else if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) + { +#ifdef HAVE_BZIP2 + err = BZ_FINISH_OK; + while (err==BZ_FINISH_OK) + { + uLong uTotalOutBefore; + if (zi->ci.bstream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; + } + uTotalOutBefore = zi->ci.bstream.total_out_lo32; + err=BZ2_bzCompress(&zi->ci.bstream, BZ_FINISH); + if(err == BZ_STREAM_END) + err = Z_STREAM_END; + + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore); + } + + if(err == BZ_FINISH_OK) + err = ZIP_OK; +#endif + } + + if (err==Z_STREAM_END) + err=ZIP_OK; /* this is normal */ + + if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK)) + { + if (zip64FlushWriteBuffer(zi)==ZIP_ERRNO) + err = ZIP_ERRNO; + } + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + int tmp_err = deflateEnd(&zi->ci.stream); + if (err == ZIP_OK) + err = tmp_err; + zi->ci.stream_initialised = 0; + } +#ifdef HAVE_BZIP2 + else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) + { + int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream); + if (err==ZIP_OK) + err = tmperr; + zi->ci.stream_initialised = 0; + } +#endif + + if (!zi->ci.raw) + { + crc32 = (uLong)zi->ci.crc32; + uncompressed_size = zi->ci.totalUncompressedData; + } + compressed_size = zi->ci.totalCompressedData; + +# ifndef NOCRYPT + compressed_size += zi->ci.crypt_header_size; +# endif + + // update Current Item crc and sizes, + if(compressed_size >= 0xffffffff || uncompressed_size >= 0xffffffff || zi->ci.pos_local_header >= 0xffffffff) + { + /*version Made by*/ + zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)45,2); + /*version needed*/ + zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)45,2); + + } + + zip64local_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ + + + if(compressed_size >= 0xffffffff) + zip64local_putValue_inmemory(zi->ci.central_header+20, invalidValue,4); /*compr size*/ + else + zip64local_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/ + + /// set internal file attributes field + if (zi->ci.stream.data_type == Z_ASCII) + zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); + + if(uncompressed_size >= 0xffffffff) + zip64local_putValue_inmemory(zi->ci.central_header+24, invalidValue,4); /*uncompr size*/ + else + zip64local_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/ + + // Add ZIP64 extra info field for uncompressed size + if(uncompressed_size >= 0xffffffff) + datasize += 8; + + // Add ZIP64 extra info field for compressed size + if(compressed_size >= 0xffffffff) + datasize += 8; + + // Add ZIP64 extra info field for relative offset to local file header of current file + if(zi->ci.pos_local_header >= 0xffffffff) + datasize += 8; + + if(datasize > 0) + { + char* p = NULL; + + if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree) + { + // we can not write more data to the buffer that we have room for. + return ZIP_BADZIPFILE; + } + + p = zi->ci.central_header + zi->ci.size_centralheader; + + // Add Extra Information Header for 'ZIP64 information' + zip64local_putValue_inmemory(p, 0x0001, 2); // HeaderID + p += 2; + zip64local_putValue_inmemory(p, datasize, 2); // DataSize + p += 2; + + if(uncompressed_size >= 0xffffffff) + { + zip64local_putValue_inmemory(p, uncompressed_size, 8); + p += 8; + } + + if(compressed_size >= 0xffffffff) + { + zip64local_putValue_inmemory(p, compressed_size, 8); + p += 8; + } + + if(zi->ci.pos_local_header >= 0xffffffff) + { + zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8); + p += 8; + } + + // Update how much extra free space we got in the memory buffer + // and increase the centralheader size so the new ZIP64 fields are included + // ( 4 below is the size of HeaderID and DataSize field ) + zi->ci.size_centralExtraFree -= datasize + 4; + zi->ci.size_centralheader += datasize + 4; + + // Update the extra info size field + zi->ci.size_centralExtra += datasize + 4; + zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2); + } + + if (err==ZIP_OK) + err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralheader); + + free(zi->ci.central_header); + + if (err==ZIP_OK) + { + // Update the LocalFileHeader with the new values. + + ZPOS64_T cur_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream); + + if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */ + + if(uncompressed_size >= 0xffffffff || compressed_size >= 0xffffffff ) + { + if(zi->ci.pos_zip64extrainfo > 0) + { + // Update the size in the ZIP64 extended field. + if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_zip64extrainfo + 4,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + + if (err==ZIP_OK) /* compressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, uncompressed_size, 8); + + if (err==ZIP_OK) /* uncompressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, compressed_size, 8); + } + else + err = ZIP_BADZIPFILE; // Caller passed zip64 = 0, so no room for zip64 info -> fatal + } + else + { + if (err==ZIP_OK) /* compressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4); + + if (err==ZIP_OK) /* uncompressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4); + } + + if (ZSEEK64(zi->z_filefunc,zi->filestream, cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + } + + zi->number_entry ++; + zi->in_opened_file_inzip = 0; + + return err; +} + +extern int ZEXPORT zipCloseFileInZip (zipFile file) +{ + return zipCloseFileInZipRaw (file,0,0); +} + +int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip) +{ + int err = ZIP_OK; + ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writting_offset; + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDLOCHEADERMAGIC,4); + + /*num disks*/ + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); + + /*relative offset*/ + if (err==ZIP_OK) /* Relative offset to the Zip64EndOfCentralDirectory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, pos,8); + + /*total disks*/ /* Do not support spawning of disk so always say 1 here*/ + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)1,4); + + return err; +} + +int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) +{ + int err = ZIP_OK; + + uLong Zip64DataSize = 44; + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDHEADERMAGIC,4); + + if (err==ZIP_OK) /* size of this 'zip64 end of central directory' */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)Zip64DataSize,8); // why ZPOS64_T of this ? + + if (err==ZIP_OK) /* version made by */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); + + if (err==ZIP_OK) /* version needed */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); + + if (err==ZIP_OK) /* number of this disk */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); + + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); + + if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); + + if (err==ZIP_OK) /* total number of entries in the central dir */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); + + if (err==ZIP_OK) /* size of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)size_centraldir,8); + + if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ + { + ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset; + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (ZPOS64_T)pos,8); + } + return err; +} +int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) +{ + int err = ZIP_OK; + + /*signature*/ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4); + + if (err==ZIP_OK) /* number of this disk */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); + + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); + + if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ + { + { + if(zi->number_entry >= 0xFFFF) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + } + } + + if (err==ZIP_OK) /* total number of entries in the central dir */ + { + if(zi->number_entry >= 0xFFFF) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + } + + if (err==ZIP_OK) /* size of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4); + + if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ + { + ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset; + if(pos >= 0xffffffff) + { + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)0xffffffff,4); + } + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4); + } + + return err; +} + +int Write_GlobalComment(zip64_internal* zi, const char* global_comment) +{ + int err = ZIP_OK; + uInt size_global_comment = 0; + + if(global_comment != NULL) + size_global_comment = (uInt)strlen(global_comment); + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2); + + if (err == ZIP_OK && size_global_comment > 0) + { + if (ZWRITE64(zi->z_filefunc,zi->filestream, global_comment, size_global_comment) != size_global_comment) + err = ZIP_ERRNO; + } + return err; +} + +extern int ZEXPORT zipClose (zipFile file, const char* global_comment) +{ + zip64_internal* zi; + int err = 0; + uLong size_centraldir = 0; + ZPOS64_T centraldir_pos_inzip; + ZPOS64_T pos; + + if (file == NULL) + return ZIP_PARAMERROR; + + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 1) + { + err = zipCloseFileInZip (file); + } + +#ifndef NO_ADDFILEINEXISTINGZIP + if (global_comment==NULL) + global_comment = zi->globalcomment; +#endif + + centraldir_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream); + + if (err==ZIP_OK) + { + linkedlist_datablock_internal* ldi = zi->central_dir.first_block; + while (ldi!=NULL) + { + if ((err==ZIP_OK) && (ldi->filled_in_this_block>0)) + { + if (ZWRITE64(zi->z_filefunc,zi->filestream, ldi->data, ldi->filled_in_this_block) != ldi->filled_in_this_block) + err = ZIP_ERRNO; + } + + size_centraldir += ldi->filled_in_this_block; + ldi = ldi->next_datablock; + } + } + free_linkedlist(&(zi->central_dir)); + + pos = centraldir_pos_inzip - zi->add_position_when_writting_offset; + if(pos >= 0xffffffff || zi->number_entry > 0xFFFF) + { + ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream); + Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); + + Write_Zip64EndOfCentralDirectoryLocator(zi, Zip64EOCDpos); + } + + if (err==ZIP_OK) + err = Write_EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); + + if(err == ZIP_OK) + err = Write_GlobalComment(zi, global_comment); + + if (ZCLOSE64(zi->z_filefunc,zi->filestream) != 0) + if (err == ZIP_OK) + err = ZIP_ERRNO; + +#ifndef NO_ADDFILEINEXISTINGZIP + TRYFREE(zi->globalcomment); +#endif + TRYFREE(zi); + + return err; +} + +extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHeader) +{ + char* p = pData; + int size = 0; + char* pNewHeader; + char* pTmp; + short header; + short dataSize; + + int retVal = ZIP_OK; + + if(pData == NULL || *dataLen < 4) + return ZIP_PARAMERROR; + + pNewHeader = (char*)ALLOC(*dataLen); + pTmp = pNewHeader; + + while(p < (pData + *dataLen)) + { + header = *(short*)p; + dataSize = *(((short*)p)+1); + + if( header == sHeader ) // Header found. + { + p += dataSize + 4; // skip it. do not copy to temp buffer + } + else + { + // Extra Info block should not be removed, So copy it to the temp buffer. + memcpy(pTmp, p, dataSize + 4); + p += dataSize + 4; + size += dataSize + 4; + } + + } + + if(size < *dataLen) + { + // clean old extra info block. + memset(pData,0, *dataLen); + + // copy the new extra info block over the old + if(size > 0) + memcpy(pData, pNewHeader, size); + + // set the new extra info size + *dataLen = size; + + retVal = ZIP_OK; + } + else + retVal = ZIP_ERRNO; + + TRYFREE(pNewHeader); + + return retVal; +} diff --git a/storage/connect/zip.h b/storage/connect/zip.h new file mode 100644 index 00000000000..8aaebb62343 --- /dev/null +++ b/storage/connect/zip.h @@ -0,0 +1,362 @@ +/* zip.h -- IO on .zip files using zlib + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + --------------------------------------------------------------------------- + + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + --------------------------------------------------------------------------- + + Changes + + See header of zip.h + +*/ + +#ifndef _zip12_H +#define _zip12_H + +#ifdef __cplusplus +extern "C" { +#endif + +//#define HAVE_BZIP2 + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#ifndef _ZLIBIOAPI_H +#include "ioapi.h" +#endif + +#ifdef HAVE_BZIP2 +#include "bzlib.h" +#endif + +#define Z_BZIP2ED 12 + +#if defined(STRICTZIP) || defined(STRICTZIPUNZIP) +/* like the STRICT of WIN32, we define a pointer that cannot be converted + from (void*) without cast */ +typedef struct TagzipFile__ { int unused; } zipFile__; +typedef zipFile__ *zipFile; +#else +typedef voidp zipFile; +#endif + +#define ZIP_OK (0) +#define ZIP_EOF (0) +#define ZIP_ERRNO (Z_ERRNO) +#define ZIP_PARAMERROR (-102) +#define ZIP_BADZIPFILE (-103) +#define ZIP_INTERNALERROR (-104) + +#ifndef DEF_MEM_LEVEL +# if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +# else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +# endif +#endif +/* default memLevel */ + +/* tm_zip contain date/time info */ +typedef struct tm_zip_s +{ + uInt tm_sec; /* seconds after the minute - [0,59] */ + uInt tm_min; /* minutes after the hour - [0,59] */ + uInt tm_hour; /* hours since midnight - [0,23] */ + uInt tm_mday; /* day of the month - [1,31] */ + uInt tm_mon; /* months since January - [0,11] */ + uInt tm_year; /* years - [1980..2044] */ +} tm_zip; + +typedef struct +{ + tm_zip tmz_date; /* date in understandable format */ + uLong dosDate; /* if dos_date == 0, tmu_date is used */ +/* uLong flag; */ /* general purpose bit flag 2 bytes */ + + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ +} zip_fileinfo; + +typedef const char* zipcharpc; + + +#define APPEND_STATUS_CREATE (0) +#define APPEND_STATUS_CREATEAFTER (1) +#define APPEND_STATUS_ADDINZIP (2) + +extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); +extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append)); +/* + Create a zipfile. + pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on + an Unix computer "zlib/zlib113.zip". + if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip + will be created at the end of the file. + (useful if the file contain a self extractor code) + if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will + add files in existing zip (be sure you don't add file that doesn't exist) + If the zipfile cannot be opened, the return value is NULL. + Else, the return value is a zipFile Handle, usable with other function + of this zip package. +*/ + +/* Note : there is no delete function into a zipfile. + If you want delete file into a zipfile, you must open a zipfile, and create another + Of couse, you can use RAW reading and writing to copy the file you did not want delte +*/ + +extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc_def* pzlib_filefunc_def)); + +extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc64_def* pzlib_filefunc_def)); + +extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level)); + +extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int zip64)); + +/* + Open a file in the ZIP for writing. + filename : the filename in zip (if NULL, '-' without quote will be used + *zipfi contain supplemental information + if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local + contains the extrafield data the the local header + if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global + contains the extrafield data the the local header + if comment != NULL, comment contain the comment string + method contain the compression method (0 for store, Z_DEFLATED for deflate) + level contain the level of compression (can be Z_DEFAULT_COMPRESSION) + zip64 is set to 1 if a zip64 extended information block should be added to the local file header. + this MUST be '1' if the uncompressed size is >= 0xffffffff. + +*/ + + +extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw)); + + +extern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int zip64)); +/* + Same than zipOpenNewFileInZip, except if raw=1, we write raw file + */ + +extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting)); + +extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + int zip64 + )); + +/* + Same than zipOpenNewFileInZip2, except + windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 + password : crypting password (NULL for no crypting) + crcForCrypting : crc of file to compress (needed for crypting) + */ + +extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + uLong versionMadeBy, + uLong flagBase + )); + + +extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + uLong versionMadeBy, + uLong flagBase, + int zip64 + )); +/* + Same than zipOpenNewFileInZip4, except + versionMadeBy : value for Version made by field + flag : value for flag field (compression level info will be added) + */ + + +extern int ZEXPORT zipWriteInFileInZip OF((zipFile file, + const void* buf, + unsigned len)); +/* + Write data in the zipfile +*/ + +extern int ZEXPORT zipCloseFileInZip OF((zipFile file)); +/* + Close the current file in the zipfile +*/ + +extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file, + uLong uncompressed_size, + uLong crc32)); + +extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file, + ZPOS64_T uncompressed_size, + uLong crc32)); + +/* + Close the current file in the zipfile, for file opened with + parameter raw=1 in zipOpenNewFileInZip2 + uncompressed_size and crc32 are value for the uncompressed size +*/ + +extern int ZEXPORT zipClose OF((zipFile file, + const char* global_comment)); +/* + Close the zipfile +*/ + + +extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader)); +/* + zipRemoveExtraInfoBlock - Added by Mathias Svensson + + Remove extra information block from a extra information data for the local file header or central directory header + + It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode. + + 0x0001 is the signature header for the ZIP64 extra information blocks + + usage. + Remove ZIP64 Extra information from a central director extra field data + zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001); + + Remove ZIP64 Extra information from a Local File Header extra field data + zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001); +*/ + +#ifdef __cplusplus +} +#endif + +#endif /* _zip64_H */ diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index 038415cc188..879a17782aa 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -1653,7 +1653,7 @@ public: public: bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) { return sql_errno >= ER_ABORTING_CONNECTION && diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc index a4da84ddaf3..e3506e1a4df 100644 --- a/storage/federatedx/ha_federatedx.cc +++ b/storage/federatedx/ha_federatedx.cc @@ -1786,7 +1786,7 @@ public: public: bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) { return sql_errno >= ER_ABORTING_CONNECTION && diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index 799200ae43f..64daf36ffd6 100644 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2014, 2016, MariaDB Corporation +# Copyright (c) 2014, 2017, MariaDB Corporation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -36,8 +36,6 @@ MYSQL_CHECK_NUMA() INCLUDE(innodb.cmake) SET(INNOBASE_SOURCES - api/api0api.cc - api/api0misc.cc btr/btr0btr.cc btr/btr0bulk.cc btr/btr0cur.cc diff --git a/storage/innobase/api/api0api.cc b/storage/innobase/api/api0api.cc deleted file mode 100644 index c6947b6f054..00000000000 --- a/storage/innobase/api/api0api.cc +++ /dev/null @@ -1,3438 +0,0 @@ -/***************************************************************************** - -Copyright (c) 2008, 2016, Oracle and/or its affiliates. All Rights Reserved. - -This 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 api/api0api.cc -InnoDB Native API - -2008-08-01 Created Sunny Bains -3/20/2011 Jimmy Yang extracted from Embedded InnoDB -*******************************************************/ - -#include "ha_prototypes.h" - -#include "api0api.h" -#include "api0misc.h" -#include "srv0start.h" -#include "dict0dict.h" -#include "btr0pcur.h" -#include "row0ins.h" -#include "row0upd.h" -#include "row0vers.h" -#include "trx0roll.h" -#include "dict0crea.h" -#include "row0merge.h" -#include "pars0pars.h" -#include "lock0types.h" -#include "row0sel.h" -#include "lock0lock.h" -#include "rem0cmp.h" -#include "dict0priv.h" -#include "trx0roll.h" -#include "row0trunc.h" - -/** configure variable for binlog option with InnoDB APIs */ -my_bool ib_binlog_enabled = FALSE; - -/** configure variable for MDL option with InnoDB APIs */ -my_bool ib_mdl_enabled = FALSE; - -/** configure variable for disable rowlock with InnoDB APIs */ -my_bool ib_disable_row_lock = FALSE; - -/** configure variable for Transaction isolation levels */ -ulong ib_trx_level_setting = IB_TRX_READ_UNCOMMITTED; - -/** configure variable for background commit interval in seconds */ -ulong ib_bk_commit_interval = 0; - -/** InnoDB tuple types. */ -enum ib_tuple_type_t{ - TPL_TYPE_ROW, /*!< Data row tuple */ - TPL_TYPE_KEY /*!< Index key tuple */ -}; - -/** Query types supported. */ -enum ib_qry_type_t{ - QRY_NON, /*!< None/Sentinel */ - QRY_INS, /*!< Insert operation */ - QRY_UPD, /*!< Update operation */ - QRY_SEL /*!< Select operation */ -}; - -/** Query graph types. */ -struct ib_qry_grph_t { - que_fork_t* ins; /*!< Innobase SQL query graph used - in inserts */ - que_fork_t* upd; /*!< Innobase SQL query graph used - in updates or deletes */ - que_fork_t* sel; /*!< dummy query graph used in - selects */ -}; - -/** Query node types. */ -struct ib_qry_node_t { - ins_node_t* ins; /*!< Innobase SQL insert node - used to perform inserts to the table */ - upd_node_t* upd; /*!< Innobase SQL update node - used to perform updates and deletes */ - sel_node_t* sel; /*!< Innobase SQL select node - used to perform selects on the table */ -}; - -/** Query processing fields. */ -struct ib_qry_proc_t { - - ib_qry_node_t node; /*!< Query node*/ - - ib_qry_grph_t grph; /*!< Query graph */ -}; - -/** Cursor instance for traversing tables/indexes. This will eventually -become row_prebuilt_t. */ -struct ib_cursor_t { - mem_heap_t* heap; /*!< Instance heap */ - - mem_heap_t* query_heap; /*!< Heap to use for query graphs */ - - ib_qry_proc_t q_proc; /*!< Query processing info */ - - ib_match_mode_t match_mode; /*!< ib_cursor_moveto match mode */ - - row_prebuilt_t* prebuilt; /*!< For reading rows */ - - bool valid_trx; /*!< Valid transaction attached */ -}; - -/** InnoDB table columns used during table and index schema creation. */ -struct ib_col_t { - const char* name; /*!< Name of column */ - - ib_col_type_t ib_col_type; /*!< Main type of the column */ - - ulint len; /*!< Length of the column */ - - ib_col_attr_t ib_col_attr; /*!< Column attributes */ - -}; - -/** InnoDB index columns used during index and index schema creation. */ -struct ib_key_col_t { - const char* name; /*!< Name of column */ - - ulint prefix_len; /*!< Column index prefix len or 0 */ -}; - -struct ib_table_def_t; - -/** InnoDB index schema used during index creation */ -struct ib_index_def_t { - mem_heap_t* heap; /*!< Heap used to build this and all - its columns in the list */ - - const char* name; /*!< Index name */ - - dict_table_t* table; /*!< Parent InnoDB table */ - - ib_table_def_t* schema; /*!< Parent table schema that owns - this instance */ - - ibool clustered; /*!< True if clustered index */ - - ibool unique; /*!< True if unique index */ - - ib_vector_t* cols; /*!< Vector of columns */ - - trx_t* usr_trx; /*!< User transacton covering the - DDL operations */ -}; - -/** InnoDB table schema used during table creation */ -struct ib_table_def_t { - mem_heap_t* heap; /*!< Heap used to build this and all - its columns in the list */ - const char* name; /*!< Table name */ - - ib_tbl_fmt_t ib_tbl_fmt; /*!< Row format */ - - ulint page_size; /*!< Page size */ - - ib_vector_t* cols; /*!< Vector of columns */ - - ib_vector_t* indexes; /*!< Vector of indexes */ - - dict_table_t* table; /* Table read from or NULL */ -}; - -/** InnoDB tuple used for key operations. */ -struct ib_tuple_t { - mem_heap_t* heap; /*!< Heap used to build - this and for copying - the column values. */ - - ib_tuple_type_t type; /*!< Tuple discriminitor. */ - - const dict_index_t* index; /*!< Index for tuple can be either - secondary or cluster index. */ - - dtuple_t* ptr; /*!< The internal tuple - instance */ -}; - -/** The following counter is used to convey information to InnoDB -about server activity: in case of normal DML ops it is not -sensible to call srv_active_wake_master_thread after each -operation, we only do it every INNOBASE_WAKE_INTERVAL'th step. */ - -#define INNOBASE_WAKE_INTERVAL 32 - -/*****************************************************************//** -Check whether the InnoDB persistent cursor is positioned. -@return IB_TRUE if positioned */ -UNIV_INLINE -ib_bool_t -ib_btr_cursor_is_positioned( -/*========================*/ - btr_pcur_t* pcur) /*!< in: InnoDB persistent cursor */ -{ - return(pcur->old_stored - && (pcur->pos_state == BTR_PCUR_IS_POSITIONED - || pcur->pos_state == BTR_PCUR_WAS_POSITIONED)); -} - - -/********************************************************************//** -Open a table using the table id, if found then increment table ref count. -@return table instance if found */ -static -dict_table_t* -ib_open_table_by_id( -/*================*/ - ib_id_u64_t tid, /*!< in: table id to lookup */ - ib_bool_t locked) /*!< in: TRUE if own dict mutex */ -{ - dict_table_t* table; - table_id_t table_id; - - table_id = tid; - - if (!locked) { - dict_mutex_enter_for_mysql(); - } - - table = dict_table_open_on_id(table_id, TRUE, DICT_TABLE_OP_NORMAL); - - if (table != NULL && table->ibd_file_missing) { - table = NULL; - } - - if (!locked) { - dict_mutex_exit_for_mysql(); - } - - return(table); -} - -/********************************************************************//** -Open a table using the table name, if found then increment table ref count. -@return table instance if found */ -static -dict_table_t* -ib_open_table_by_name( -/*==================*/ - const char* name) /*!< in: table name to lookup */ -{ - dict_table_t* table; - - table = dict_table_open_on_name(name, FALSE, FALSE, - DICT_ERR_IGNORE_NONE); - - if (table != NULL && table->ibd_file_missing) { - table = NULL; - } - - return(table); -} - -/********************************************************************//** -Find table using table name. -@return table instance if found */ -static -dict_table_t* -ib_lookup_table_by_name( -/*====================*/ - const char* name) /*!< in: table name to lookup */ -{ - dict_table_t* table; - - table = dict_table_get_low(name); - - if (table != NULL && table->ibd_file_missing) { - table = NULL; - } - - return(table); -} - -/********************************************************************//** -Increments innobase_active_counter and every INNOBASE_WAKE_INTERVALth -time calls srv_active_wake_master_thread. This function should be used -when a single database operation may introduce a small need for -server utility activity, like checkpointing. */ -UNIV_INLINE -void -ib_wake_master_thread(void) -/*=======================*/ -{ - static ulint ib_signal_counter = 0; - - ++ib_signal_counter; - - if ((ib_signal_counter % INNOBASE_WAKE_INTERVAL) == 0) { - srv_active_wake_master_thread(); - } -} - -/*****************************************************************//** -Read the columns from a rec into a tuple. */ -static -void -ib_read_tuple( -/*==========*/ - const rec_t* rec, /*!< in: Record to read */ - ib_bool_t page_format, /*!< in: IB_TRUE if compressed format */ - ib_tuple_t* tuple, /*!< in: tuple to read into */ - void** rec_buf, /*!< in/out: row buffer */ - ulint* len) /*!< in/out: buffer len */ -{ - ulint i; - void* ptr; - rec_t* copy; - ulint rec_meta_data; - ulint n_index_fields; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; - dtuple_t* dtuple = tuple->ptr; - const dict_index_t* index = tuple->index; - ulint offset_size; - - rec_offs_init(offsets_); - - offsets = rec_get_offsets( - rec, index, offsets, ULINT_UNDEFINED, &tuple->heap); - - rec_meta_data = rec_get_info_bits(rec, page_format); - dtuple_set_info_bits(dtuple, rec_meta_data); - - offset_size = rec_offs_size(offsets); - - if (rec_buf && *rec_buf) { - if (*len < offset_size) { - free(*rec_buf); - *rec_buf = malloc(offset_size); - *len = offset_size; - } - ptr = *rec_buf; - } else { - /* Make a copy of the rec. */ - ptr = mem_heap_alloc(tuple->heap, offset_size); - } - - copy = rec_copy(ptr, rec, offsets); - - n_index_fields = ut_min( - rec_offs_n_fields(offsets), dtuple_get_n_fields(dtuple)); - - for (i = 0; i < n_index_fields; ++i) { - ulint len; - const byte* data; - dfield_t* dfield; - - if (tuple->type == TPL_TYPE_ROW) { - const dict_col_t* col; - ulint col_no; - const dict_field_t* index_field; - - index_field = dict_index_get_nth_field(index, i); - col = dict_field_get_col(index_field); - col_no = dict_col_get_no(col); - - dfield = dtuple_get_nth_field(dtuple, col_no); - } else { - dfield = dtuple_get_nth_field(dtuple, i); - } - - data = rec_get_nth_field(copy, offsets, i, &len); - - /* Fetch and copy any externally stored column. */ - if (rec_offs_nth_extern(offsets, i)) { - - const page_size_t page_size( - dict_table_page_size(index->table)); - - data = btr_rec_copy_externally_stored_field( - copy, offsets, page_size, i, &len, - tuple->heap); - - ut_a(len != UNIV_SQL_NULL); - } - - dfield_set_data(dfield, data, len); - } -} - -/*****************************************************************//** -Create an InnoDB key tuple. -@return tuple instance created, or NULL */ -static -ib_tpl_t -ib_key_tuple_new_low( -/*=================*/ - const dict_index_t* index, /*!< in: index for which tuple - required */ - ulint n_cols, /*!< in: no. of user defined cols */ - mem_heap_t* heap) /*!< in: memory heap */ -{ - ib_tuple_t* tuple; - ulint i; - ulint n_cmp_cols; - - tuple = static_cast( - mem_heap_alloc(heap, sizeof(*tuple))); - - if (tuple == NULL) { - mem_heap_free(heap); - return(NULL); - } - - tuple->heap = heap; - tuple->index = index; - tuple->type = TPL_TYPE_KEY; - - /* Is it a generated clustered index ? */ - if (n_cols == 0) { - ++n_cols; - } - - tuple->ptr = dtuple_create(heap, n_cols); - - /* Copy types and set to SQL_NULL. */ - dict_index_copy_types(tuple->ptr, index, n_cols); - - for (i = 0; i < n_cols; i++) { - - dfield_t* dfield; - - dfield = dtuple_get_nth_field(tuple->ptr, i); - dfield_set_null(dfield); - } - - n_cmp_cols = dict_index_get_n_ordering_defined_by_user(index); - - dtuple_set_n_fields_cmp(tuple->ptr, n_cmp_cols); - - return((ib_tpl_t) tuple); -} - -/*****************************************************************//** -Create an InnoDB key tuple. -@return tuple instance created, or NULL */ -static -ib_tpl_t -ib_key_tuple_new( -/*=============*/ - const dict_index_t* index, /*!< in: index of tuple */ - ulint n_cols) /*!< in: no. of user defined cols */ -{ - mem_heap_t* heap; - - heap = mem_heap_create(64); - - if (heap == NULL) { - return(NULL); - } - - return(ib_key_tuple_new_low(index, n_cols, heap)); -} - -/*****************************************************************//** -Create an InnoDB row tuple. -@return tuple instance, or NULL */ -static -ib_tpl_t -ib_row_tuple_new_low( -/*=================*/ - const dict_index_t* index, /*!< in: index of tuple */ - ulint n_cols, /*!< in: no. of cols in tuple */ - mem_heap_t* heap) /*!< in: memory heap */ -{ - ib_tuple_t* tuple; - - tuple = static_cast(mem_heap_alloc(heap, sizeof(*tuple))); - - if (tuple == NULL) { - mem_heap_free(heap); - return(NULL); - } - - tuple->heap = heap; - tuple->index = index; - tuple->type = TPL_TYPE_ROW; - - tuple->ptr = dtuple_create(heap, n_cols); - - /* Copy types and set to SQL_NULL. */ - dict_table_copy_types(tuple->ptr, index->table); - - return((ib_tpl_t) tuple); -} - -/*****************************************************************//** -Create an InnoDB row tuple. -@return tuple instance, or NULL */ -static -ib_tpl_t -ib_row_tuple_new( -/*=============*/ - const dict_index_t* index, /*!< in: index of tuple */ - ulint n_cols) /*!< in: no. of cols in tuple */ -{ - mem_heap_t* heap; - - heap = mem_heap_create(64); - - if (heap == NULL) { - return(NULL); - } - - return(ib_row_tuple_new_low(index, n_cols, heap)); -} - -/*****************************************************************//** -Begin a transaction. -@return innobase txn handle */ -ib_err_t -ib_trx_start( -/*=========*/ - ib_trx_t ib_trx, /*!< in: transaction to restart */ - ib_trx_level_t ib_trx_level, /*!< in: trx isolation level */ - ib_bool_t read_write, /*!< in: true if read write - transaction */ - ib_bool_t auto_commit, /*!< in: auto commit after each - single DML */ - void* thd) /*!< in: THD */ -{ - ib_err_t err = DB_SUCCESS; - trx_t* trx = (trx_t*) ib_trx; - - ut_a(ib_trx_level <= IB_TRX_SERIALIZABLE); - - trx->api_trx = true; - trx->api_auto_commit = auto_commit; - trx->read_write = read_write; - - trx_start_if_not_started(trx, read_write); - - trx->isolation_level = ib_trx_level; - - /* FIXME: This is a place holder, we should add an arg that comes - from the client. */ - trx->mysql_thd = static_cast(thd); - - return(err); -} - -/*****************************************************************//** -Begin a transaction. This will allocate a new transaction handle. -put the transaction in the active state. -@return innobase txn handle */ -ib_trx_t -ib_trx_begin( -/*=========*/ - ib_trx_level_t ib_trx_level, /*!< in: trx isolation level */ - ib_bool_t read_write, /*!< in: true if read write - transaction */ - ib_bool_t auto_commit) /*!< in: auto commit after each - single DML */ -{ - trx_t* trx; - ib_bool_t started; - - trx = trx_allocate_for_mysql(); - - started = ib_trx_start(static_cast(trx), ib_trx_level, - read_write, auto_commit, NULL); - ut_a(started); - - return(static_cast(trx)); -} - -/*****************************************************************//** -Check if transaction is read_only -@return transaction read_only status */ -ib_u32_t -ib_trx_read_only( -/*=============*/ - ib_trx_t ib_trx) /*!< in: trx handle */ -{ - trx_t* trx = (trx_t*) ib_trx; - - return(trx->read_only); -} -/*****************************************************************//** -Get a trx start time. -@return trx start_time */ -ib_u64_t -ib_trx_get_start_time( -/*==================*/ - ib_trx_t ib_trx) /*!< in: transaction */ -{ - trx_t* trx = (trx_t*) ib_trx; - return(static_cast(trx->start_time)); -} -/*****************************************************************//** -Release the resources of the transaction. -@return DB_SUCCESS or err code */ -ib_err_t -ib_trx_release( -/*===========*/ - ib_trx_t ib_trx) /*!< in: trx handle */ -{ - trx_t* trx = (trx_t*) ib_trx; - - ut_ad(trx != NULL); - trx_free_for_mysql(trx); - - return(DB_SUCCESS); -} - -/*****************************************************************//** -Commit a transaction. This function will also release the schema -latches too. -@return DB_SUCCESS or err code */ -ib_err_t -ib_trx_commit( -/*==========*/ - ib_trx_t ib_trx) /*!< in: trx handle */ -{ - ib_err_t err = DB_SUCCESS; - trx_t* trx = reinterpret_cast(ib_trx); - - if (!trx_is_started(trx)) { - - return(err); - } - - trx_commit(trx); - - return(DB_SUCCESS); -} - -/*****************************************************************//** -Rollback a transaction. This function will also release the schema -latches too. -@return DB_SUCCESS or err code */ -ib_err_t -ib_trx_rollback( -/*============*/ - ib_trx_t ib_trx) /*!< in: trx handle */ -{ - ib_err_t err; - trx_t* trx = (trx_t*) ib_trx; - - err = static_cast(trx_rollback_for_mysql(trx)); - - /* It should always succeed */ - ut_a(err == DB_SUCCESS); - - return(err); -} - -#ifdef _WIN32 -/*****************************************************************//** -Convert a string to lower case. */ -static -void -ib_to_lower_case( -/*=============*/ - char* ptr) /*!< string to convert to lower case */ -{ - while (*ptr) { - *ptr = tolower(*ptr); - ++ptr; - } -} -#endif /* _WIN32 */ - -/*****************************************************************//** -Normalizes a table name string. A normalized name consists of the -database name catenated to '/' and table name. An example: -test/mytable. On Windows normalization puts both the database name and the -table name always to lower case. This function can be called for system -tables and they don't have a database component. For tables that don't have -a database component, we don't normalize them to lower case on Windows. -The assumption is that they are system tables that reside in the system -table space. */ -static -void -ib_normalize_table_name( -/*====================*/ - char* norm_name, /*!< out: normalized name as a - null-terminated string */ - const char* name) /*!< in: table name string */ -{ - const char* ptr = name; - - /* Scan name from the end */ - - ptr += ut_strlen(name) - 1; - - /* Find the start of the table name. */ - while (ptr >= name && *ptr != '\\' && *ptr != '/' && ptr > name) { - --ptr; - } - - - /* For system tables there is no '/' or dbname. */ - ut_a(ptr >= name); - - if (ptr > name) { - const char* db_name; - const char* table_name; - - table_name = ptr + 1; - - --ptr; - - while (ptr >= name && *ptr != '\\' && *ptr != '/') { - ptr--; - } - - db_name = ptr + 1; - - memcpy(norm_name, db_name, - ut_strlen(name) + 1 - (db_name - name)); - - norm_name[table_name - db_name - 1] = '/'; -#ifdef _WIN32 - ib_to_lower_case(norm_name); -#endif - } else { - ut_strcpy(norm_name, name); - } -} - -/*****************************************************************//** -Get a table id. The caller must have acquired the dictionary mutex. -@return DB_SUCCESS if found */ -static -ib_err_t -ib_table_get_id_low( -/*================*/ - const char* table_name, /*!< in: table to find */ - ib_id_u64_t* table_id) /*!< out: table id if found */ -{ - dict_table_t* table; - ib_err_t err = DB_TABLE_NOT_FOUND; - - *table_id = 0; - - table = ib_lookup_table_by_name(table_name); - - if (table != NULL) { - *table_id = (table->id); - - err = DB_SUCCESS; - } - - return(err); -} - -/*****************************************************************//** -Create an internal cursor instance. -@return DB_SUCCESS or err code */ -static -ib_err_t -ib_create_cursor( -/*=============*/ - ib_crsr_t* ib_crsr, /*!< out: InnoDB cursor */ - dict_table_t* table, /*!< in: table instance */ - dict_index_t* index, /*!< in: index to use */ - trx_t* trx) /*!< in: transaction */ -{ - mem_heap_t* heap; - ib_cursor_t* cursor; - ib_err_t err = DB_SUCCESS; - - heap = mem_heap_create(sizeof(*cursor) * 2); - - if (heap != NULL) { - row_prebuilt_t* prebuilt; - - cursor = static_cast( - mem_heap_zalloc(heap, sizeof(*cursor))); - - cursor->heap = heap; - - cursor->query_heap = mem_heap_create(64); - - if (cursor->query_heap == NULL) { - mem_heap_free(heap); - - return(DB_OUT_OF_MEMORY); - } - - cursor->prebuilt = row_create_prebuilt(table, 0); - - prebuilt = cursor->prebuilt; - - prebuilt->trx = trx; - - cursor->valid_trx = TRUE; - - prebuilt->table = table; - prebuilt->select_lock_type = LOCK_NONE; - prebuilt->innodb_api = TRUE; - - prebuilt->index = index; - - ut_a(prebuilt->index != NULL); - - if (prebuilt->trx != NULL) { - ++prebuilt->trx->n_mysql_tables_in_use; - - prebuilt->index_usable = - row_merge_is_index_usable( - prebuilt->trx, prebuilt->index); - - /* Assign a read view if the transaction does - not have it yet */ - - trx_assign_read_view(prebuilt->trx); - } - - *ib_crsr = (ib_crsr_t) cursor; - } else { - err = DB_OUT_OF_MEMORY; - } - - return(err); -} - -/*****************************************************************//** -Create an internal cursor instance, and set prebuilt->index to index -with supplied index_id. -@return DB_SUCCESS or err code */ -static -ib_err_t -ib_create_cursor_with_index_id( -/*===========================*/ - ib_crsr_t* ib_crsr, /*!< out: InnoDB cursor */ - dict_table_t* table, /*!< in: table instance */ - ib_id_u64_t index_id, /*!< in: index id or 0 */ - trx_t* trx) /*!< in: transaction */ -{ - dict_index_t* index; - - if (index_id != 0) { - mutex_enter(&dict_sys->mutex); - index = dict_index_find_on_id_low(index_id); - mutex_exit(&dict_sys->mutex); - } else { - index = dict_table_get_first_index(table); - } - - return(ib_create_cursor(ib_crsr, table, index, trx)); -} - -/*****************************************************************//** -Open an InnoDB table and return a cursor handle to it. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_open_table_using_id( -/*==========================*/ - ib_id_u64_t table_id, /*!< in: table id of table to open */ - ib_trx_t ib_trx, /*!< in: Current transaction handle - can be NULL */ - ib_crsr_t* ib_crsr) /*!< out,own: InnoDB cursor */ -{ - ib_err_t err; - dict_table_t* table; - const ib_bool_t locked - = ib_trx && ib_schema_lock_is_exclusive(ib_trx); - - table = ib_open_table_by_id(table_id, locked); - - if (table == NULL) { - - return(DB_TABLE_NOT_FOUND); - } - - err = ib_create_cursor_with_index_id(ib_crsr, table, 0, - (trx_t*) ib_trx); - - return(err); -} - -/*****************************************************************//** -Open an InnoDB secondary index cursor and return a cursor handle to it. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_open_index_using_name( -/*============================*/ - ib_crsr_t ib_open_crsr, /*!< in: open/active cursor */ - const char* index_name, /*!< in: secondary index name */ - ib_crsr_t* ib_crsr, /*!< out,own: InnoDB index cursor */ - int* idx_type, /*!< out: index is cluster index */ - ib_id_u64_t* idx_id) /*!< out: index id */ -{ - dict_table_t* table; - dict_index_t* index; - index_id_t index_id = 0; - ib_err_t err = DB_TABLE_NOT_FOUND; - ib_cursor_t* cursor = (ib_cursor_t*) ib_open_crsr; - - *idx_type = 0; - *idx_id = 0; - *ib_crsr = NULL; - - /* We want to increment the ref count, so we do a redundant search. */ - table = dict_table_open_on_id(cursor->prebuilt->table->id, - FALSE, DICT_TABLE_OP_NORMAL); - ut_a(table != NULL); - - /* The first index is always the cluster index. */ - index = dict_table_get_first_index(table); - - /* Traverse the user defined indexes. */ - while (index != NULL) { - if (innobase_strcasecmp(index->name, index_name) == 0) { - index_id = index->id; - *idx_type = index->type; - *idx_id = index_id; - break; - } - index = UT_LIST_GET_NEXT(indexes, index); - } - - if (!index_id) { - dict_table_close(table, FALSE, FALSE); - return(DB_ERROR); - } - - if (index_id > 0) { - ut_ad(index->id == index_id); - err = ib_create_cursor( - ib_crsr, table, index, cursor->prebuilt->trx); - } - - if (*ib_crsr != NULL) { - const ib_cursor_t* cursor; - - cursor = *(ib_cursor_t**) ib_crsr; - - if (cursor->prebuilt->index == NULL) { - err = ib_cursor_close(*ib_crsr); - ut_a(err == DB_SUCCESS); - *ib_crsr = NULL; - } - } - - return(err); -} - -/*****************************************************************//** -Open an InnoDB table and return a cursor handle to it. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_open_table( -/*=================*/ - const char* name, /*!< in: table name */ - ib_trx_t ib_trx, /*!< in: Current transaction handle - can be NULL */ - ib_crsr_t* ib_crsr) /*!< out,own: InnoDB cursor */ -{ - ib_err_t err; - dict_table_t* table; - char* normalized_name; - - normalized_name = static_cast(ut_malloc_nokey(ut_strlen(name) - + 1)); - ib_normalize_table_name(normalized_name, name); - - if (ib_trx != NULL) { - if (!ib_schema_lock_is_exclusive(ib_trx)) { - table = ib_open_table_by_name(normalized_name); - } else { - /* NOTE: We do not acquire MySQL metadata lock */ - table = ib_lookup_table_by_name(normalized_name); - } - } else { - table = ib_open_table_by_name(normalized_name); - } - - ut_free(normalized_name); - normalized_name = NULL; - - /* It can happen that another thread has created the table but - not the cluster index or it's a broken table definition. Refuse to - open if that's the case. */ - if (table != NULL && dict_table_get_first_index(table) == NULL) { - table = NULL; - } - - if (table != NULL) { - err = ib_create_cursor_with_index_id(ib_crsr, table, 0, - (trx_t*) ib_trx); - } else { - err = DB_TABLE_NOT_FOUND; - } - - return(err); -} - -/** Check the table whether it contains virtual columns. -@param[in] crsr InnoDB Cursor -@return true if table contains virtual column else false. */ -ib_bool_t -ib_is_virtual_table( - ib_crsr_t crsr) -{ - return(crsr->prebuilt->table->n_v_cols > 0); -} - -/********************************************************************//** -Free a context struct for a table handle. */ -static -void -ib_qry_proc_free( -/*=============*/ - ib_qry_proc_t* q_proc) /*!< in, own: qproc struct */ -{ - que_graph_free_recursive(q_proc->grph.ins); - que_graph_free_recursive(q_proc->grph.upd); - que_graph_free_recursive(q_proc->grph.sel); - - memset(q_proc, 0x0, sizeof(*q_proc)); -} - -/*****************************************************************//** -Reset the cursor. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_reset( -/*============*/ - ib_crsr_t ib_crsr) /*!< in/out: InnoDB cursor */ -{ - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - - if (cursor->valid_trx && prebuilt->trx != NULL - && prebuilt->trx->n_mysql_tables_in_use > 0) { - - --prebuilt->trx->n_mysql_tables_in_use; - } - - /* The fields in this data structure are allocated from - the query heap and so need to be reset too. */ - ib_qry_proc_free(&cursor->q_proc); - - mem_heap_empty(cursor->query_heap); - - return(DB_SUCCESS); -} - -/*****************************************************************//** -update the cursor with new transactions and also reset the cursor -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_new_trx( -/*==============*/ - ib_crsr_t ib_crsr, /*!< in/out: InnoDB cursor */ - ib_trx_t ib_trx) /*!< in: transaction */ -{ - ib_err_t err = DB_SUCCESS; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - trx_t* trx = (trx_t*) ib_trx; - - row_prebuilt_t* prebuilt = cursor->prebuilt; - - row_update_prebuilt_trx(prebuilt, trx); - - cursor->valid_trx = TRUE; - - trx_assign_read_view(prebuilt->trx); - - ib_qry_proc_free(&cursor->q_proc); - - mem_heap_empty(cursor->query_heap); - - return(err); -} - -/*****************************************************************//** -Commit the transaction in a cursor -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_commit_trx( -/*=================*/ - ib_crsr_t ib_crsr, /*!< in/out: InnoDB cursor */ - ib_trx_t ib_trx) /*!< in: transaction */ -{ - ib_err_t err = DB_SUCCESS; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; -#ifdef UNIV_DEBUG - row_prebuilt_t* prebuilt = cursor->prebuilt; - - ut_ad(prebuilt->trx == (trx_t*) ib_trx); -#endif /* UNIV_DEBUG */ - ib_trx_commit(ib_trx); - cursor->valid_trx = FALSE; - return(err); -} - -/*****************************************************************//** -Close an InnoDB table and free the cursor. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_close( -/*============*/ - ib_crsr_t ib_crsr) /*!< in,own: InnoDB cursor */ -{ - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt; - trx_t* trx; - - if (!cursor) { - return(DB_SUCCESS); - } - - prebuilt = cursor->prebuilt; - trx = prebuilt->trx; - - ib_qry_proc_free(&cursor->q_proc); - - /* The transaction could have been detached from the cursor. */ - if (cursor->valid_trx && trx != NULL - && trx->n_mysql_tables_in_use > 0) { - --trx->n_mysql_tables_in_use; - } - - row_prebuilt_free(prebuilt, FALSE); - cursor->prebuilt = NULL; - - mem_heap_free(cursor->query_heap); - mem_heap_free(cursor->heap); - cursor = NULL; - - return(DB_SUCCESS); -} - -/*****************************************************************//** -Close the table, decrement n_ref_count count. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_close_table( -/*==================*/ - ib_crsr_t ib_crsr) /*!< in,own: InnoDB cursor */ -{ - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - - if (prebuilt && prebuilt->table) { - dict_table_close(prebuilt->table, FALSE, FALSE); - } - - return(DB_SUCCESS); -} -/**********************************************************************//** -Run the insert query and do error handling. -@return DB_SUCCESS or error code */ -UNIV_INLINE -ib_err_t -ib_insert_row_with_lock_retry( -/*==========================*/ - que_thr_t* thr, /*!< in: insert query graph */ - ins_node_t* node, /*!< in: insert node for the query */ - trx_savept_t* savept) /*!< in: savepoint to rollback to - in case of an error */ -{ - trx_t* trx; - ib_err_t err; - ib_bool_t lock_wait; - - trx = thr_get_trx(thr); - - do { - thr->run_node = node; - thr->prev_node = node; - - row_ins_step(thr); - - err = trx->error_state; - - if (err != DB_SUCCESS) { - que_thr_stop_for_mysql(thr); - - thr->lock_state = QUE_THR_LOCK_ROW; - lock_wait = static_cast( - ib_handle_errors(&err, trx, thr, savept)); - thr->lock_state = QUE_THR_LOCK_NOLOCK; - } else { - lock_wait = FALSE; - } - } while (lock_wait); - - return(err); -} - -/*****************************************************************//** -Write a row. -@return DB_SUCCESS or err code */ -static -ib_err_t -ib_execute_insert_query_graph( -/*==========================*/ - dict_table_t* table, /*!< in: table where to insert */ - que_fork_t* ins_graph, /*!< in: query graph */ - ins_node_t* node) /*!< in: insert node */ -{ - trx_t* trx; - que_thr_t* thr; - trx_savept_t savept; - ib_err_t err = DB_SUCCESS; - - trx = ins_graph->trx; - - savept = trx_savept_take(trx); - - thr = que_fork_get_first_thr(ins_graph); - - que_thr_move_to_run_state_for_mysql(thr, trx); - - err = ib_insert_row_with_lock_retry(thr, node, &savept); - - if (err == DB_SUCCESS) { - que_thr_stop_for_mysql_no_error(thr, trx); - - dict_table_n_rows_inc(table); - - if (table->is_system_db) { - srv_stats.n_system_rows_inserted.inc(); - } else { - srv_stats.n_rows_inserted.inc(); - } - } - - trx->op_info = ""; - - return(err); -} - -/*****************************************************************//** -Create an insert query graph node. */ -static -void -ib_insert_query_graph_create( -/*==========================*/ - ib_cursor_t* cursor) /*!< in: Cursor instance */ -{ - ib_qry_proc_t* q_proc = &cursor->q_proc; - ib_qry_node_t* node = &q_proc->node; - trx_t* trx = cursor->prebuilt->trx; - - ut_a(trx_is_started(trx)); - - if (node->ins == NULL) { - dtuple_t* row; - ib_qry_grph_t* grph = &q_proc->grph; - mem_heap_t* heap = cursor->query_heap; - dict_table_t* table = cursor->prebuilt->table; - - node->ins = ins_node_create(INS_DIRECT, table, heap); - - node->ins->select = NULL; - node->ins->values_list = NULL; - - row = dtuple_create(heap, dict_table_get_n_cols(table)); - dict_table_copy_types(row, table); - - ut_ad(!dict_table_have_virtual_index(table)); - - ins_node_set_new_row(node->ins, row); - - grph->ins = static_cast( - que_node_get_parent( - pars_complete_graph_for_exec(node->ins, trx, - heap, NULL))); - - grph->ins->state = QUE_FORK_ACTIVE; - } -} - -/*****************************************************************//** -Insert a row to a table. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_insert_row( -/*=================*/ - ib_crsr_t ib_crsr, /*!< in/out: InnoDB cursor instance */ - const ib_tpl_t ib_tpl) /*!< in: tuple to insert */ -{ - ib_ulint_t i; - ib_qry_node_t* node; - ib_qry_proc_t* q_proc; - ulint n_fields; - dtuple_t* dst_dtuple; - ib_err_t err = DB_SUCCESS; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - const ib_tuple_t* src_tuple = (const ib_tuple_t*) ib_tpl; - - ib_insert_query_graph_create(cursor); - - ut_ad(src_tuple->type == TPL_TYPE_ROW); - - q_proc = &cursor->q_proc; - node = &q_proc->node; - - node->ins->state = INS_NODE_ALLOC_ROW_ID; - dst_dtuple = node->ins->row; - - n_fields = dtuple_get_n_fields(src_tuple->ptr); - ut_ad(n_fields == dtuple_get_n_fields(dst_dtuple)); - - /* Do a shallow copy of the data fields and check for NULL - constraints on columns. */ - for (i = 0; i < n_fields; i++) { - ulint mtype; - dfield_t* src_field; - dfield_t* dst_field; - - src_field = dtuple_get_nth_field(src_tuple->ptr, i); - - mtype = dtype_get_mtype(dfield_get_type(src_field)); - - /* Don't touch the system columns. */ - if (mtype != DATA_SYS) { - ulint prtype; - - prtype = dtype_get_prtype(dfield_get_type(src_field)); - - if ((prtype & DATA_NOT_NULL) - && dfield_is_null(src_field)) { - - err = DB_DATA_MISMATCH; - break; - } - - dst_field = dtuple_get_nth_field(dst_dtuple, i); - ut_ad(mtype - == dtype_get_mtype(dfield_get_type(dst_field))); - - /* Do a shallow copy. */ - dfield_set_data( - dst_field, src_field->data, src_field->len); - - if (dst_field->len != IB_SQL_NULL) { - UNIV_MEM_ASSERT_RW(dst_field->data, - dst_field->len); - } - } - } - - if (err == DB_SUCCESS) { - err = ib_execute_insert_query_graph( - src_tuple->index->table, q_proc->grph.ins, node->ins); - } - - ib_wake_master_thread(); - - return(err); -} - -/*********************************************************************//** -Gets pointer to a prebuilt update vector used in updates. -@return update vector */ -UNIV_INLINE -upd_t* -ib_update_vector_create( -/*====================*/ - ib_cursor_t* cursor) /*!< in: current cursor */ -{ - trx_t* trx = cursor->prebuilt->trx; - mem_heap_t* heap = cursor->query_heap; - dict_table_t* table = cursor->prebuilt->table; - ib_qry_proc_t* q_proc = &cursor->q_proc; - ib_qry_grph_t* grph = &q_proc->grph; - ib_qry_node_t* node = &q_proc->node; - - ut_a(trx_is_started(trx)); - - if (node->upd == NULL) { - node->upd = static_cast( - row_create_update_node_for_mysql(table, heap)); - } - - ut_ad(!dict_table_have_virtual_index(table)); - - grph->upd = static_cast( - que_node_get_parent( - pars_complete_graph_for_exec(node->upd, trx, - heap, NULL))); - - grph->upd->state = QUE_FORK_ACTIVE; - - return(node->upd->update); -} - -/**********************************************************************//** -Note that a column has changed. */ -static -void -ib_update_col( -/*==========*/ - - ib_cursor_t* cursor, /*!< in: current cursor */ - upd_field_t* upd_field, /*!< in/out: update field */ - ulint col_no, /*!< in: column number */ - dfield_t* dfield) /*!< in: updated dfield */ -{ - ulint data_len; - dict_table_t* table = cursor->prebuilt->table; - dict_index_t* index = dict_table_get_first_index(table); - - data_len = dfield_get_len(dfield); - - if (data_len == UNIV_SQL_NULL) { - dfield_set_null(&upd_field->new_val); - } else { - dfield_copy_data(&upd_field->new_val, dfield); - } - - upd_field->exp = NULL; - - upd_field->orig_len = 0; - - upd_field->field_no = dict_col_get_clust_pos( - &table->cols[col_no], index); -} - -/**********************************************************************//** -Checks which fields have changed in a row and stores the new data -to an update vector. -@return DB_SUCCESS or err code */ -static -ib_err_t -ib_calc_diff( -/*=========*/ - ib_cursor_t* cursor, /*!< in: current cursor */ - upd_t* upd, /*!< in/out: update vector */ - const ib_tuple_t*old_tuple, /*!< in: Old tuple in table */ - const ib_tuple_t*new_tuple) /*!< in: New tuple to update */ -{ - ulint i; - ulint n_changed = 0; - ib_err_t err = DB_SUCCESS; - ulint n_fields = dtuple_get_n_fields(new_tuple->ptr); - - ut_a(old_tuple->type == TPL_TYPE_ROW); - ut_a(new_tuple->type == TPL_TYPE_ROW); - ut_a(old_tuple->index->table == new_tuple->index->table); - - for (i = 0; i < n_fields; ++i) { - ulint mtype; - ulint prtype; - upd_field_t* upd_field; - dfield_t* new_dfield; - dfield_t* old_dfield; - - new_dfield = dtuple_get_nth_field(new_tuple->ptr, i); - old_dfield = dtuple_get_nth_field(old_tuple->ptr, i); - - mtype = dtype_get_mtype(dfield_get_type(old_dfield)); - prtype = dtype_get_prtype(dfield_get_type(old_dfield)); - - /* Skip the system columns */ - if (mtype == DATA_SYS) { - continue; - - } else if ((prtype & DATA_NOT_NULL) - && dfield_is_null(new_dfield)) { - - err = DB_DATA_MISMATCH; - break; - } - - if (dfield_get_len(new_dfield) != dfield_get_len(old_dfield) - || (!dfield_is_null(old_dfield) - && memcmp(dfield_get_data(new_dfield), - dfield_get_data(old_dfield), - dfield_get_len(old_dfield)) != 0)) { - - upd_field = &upd->fields[n_changed]; - - ib_update_col(cursor, upd_field, i, new_dfield); - - ++n_changed; - } - } - - if (err == DB_SUCCESS) { - upd->info_bits = 0; - upd->n_fields = n_changed; - } - - return(err); -} - -/**********************************************************************//** -Run the update query and do error handling. -@return DB_SUCCESS or error code */ -UNIV_INLINE -ib_err_t -ib_update_row_with_lock_retry( -/*==========================*/ - que_thr_t* thr, /*!< in: Update query graph */ - upd_node_t* node, /*!< in: Update node for the query */ - trx_savept_t* savept) /*!< in: savepoint to rollback to - in case of an error */ - -{ - trx_t* trx; - ib_err_t err; - ib_bool_t lock_wait; - - trx = thr_get_trx(thr); - - do { - thr->run_node = node; - thr->prev_node = node; - - row_upd_step(thr); - - err = trx->error_state; - - if (err != DB_SUCCESS) { - que_thr_stop_for_mysql(thr); - - if (err != DB_RECORD_NOT_FOUND) { - thr->lock_state = QUE_THR_LOCK_ROW; - - lock_wait = static_cast( - ib_handle_errors(&err, trx, thr, savept)); - - thr->lock_state = QUE_THR_LOCK_NOLOCK; - } else { - lock_wait = FALSE; - } - } else { - lock_wait = FALSE; - } - } while (lock_wait); - - return(err); -} - -/*********************************************************************//** -Does an update or delete of a row. -@return DB_SUCCESS or err code */ -UNIV_INLINE -ib_err_t -ib_execute_update_query_graph( -/*==========================*/ - ib_cursor_t* cursor, /*!< in: Cursor instance */ - btr_pcur_t* pcur) /*!< in: Btree persistent cursor */ -{ - ib_err_t err; - que_thr_t* thr; - upd_node_t* node; - trx_savept_t savept; - trx_t* trx = cursor->prebuilt->trx; - dict_table_t* table = cursor->prebuilt->table; - ib_qry_proc_t* q_proc = &cursor->q_proc; - - /* The transaction must be running. */ - ut_a(trx_is_started(trx)); - - node = q_proc->node.upd; - - ut_a(dict_index_is_clust(pcur->btr_cur.index)); - btr_pcur_copy_stored_position(node->pcur, pcur); - - ut_a(node->pcur->rel_pos == BTR_PCUR_ON); - - savept = trx_savept_take(trx); - - thr = que_fork_get_first_thr(q_proc->grph.upd); - - node->state = UPD_NODE_UPDATE_CLUSTERED; - - que_thr_move_to_run_state_for_mysql(thr, trx); - - err = ib_update_row_with_lock_retry(thr, node, &savept); - - if (err == DB_SUCCESS) { - - que_thr_stop_for_mysql_no_error(thr, trx); - - if (node->is_delete) { - - dict_table_n_rows_dec(table); - - if (table->is_system_db) { - srv_stats.n_system_rows_deleted.inc(); - } else { - srv_stats.n_rows_deleted.inc(); - } - } else { - if (table->is_system_db) { - srv_stats.n_system_rows_updated.inc(); - } else { - srv_stats.n_rows_updated.inc(); - } - } - - } else if (err == DB_RECORD_NOT_FOUND) { - trx->error_state = DB_SUCCESS; - } - - trx->op_info = ""; - - return(err); -} - -/*****************************************************************//** -Update a row in a table. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_update_row( -/*=================*/ - ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - const ib_tpl_t ib_old_tpl, /*!< in: Old tuple in table */ - const ib_tpl_t ib_new_tpl) /*!< in: New tuple to update */ -{ - upd_t* upd; - ib_err_t err; - btr_pcur_t* pcur; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - const ib_tuple_t*old_tuple = (const ib_tuple_t*) ib_old_tpl; - const ib_tuple_t*new_tuple = (const ib_tuple_t*) ib_new_tpl; - - if (dict_index_is_clust(prebuilt->index)) { - pcur = cursor->prebuilt->pcur; - } else if (prebuilt->need_to_access_clustered) { - pcur = cursor->prebuilt->clust_pcur; - } else { - return(DB_ERROR); - } - - ut_a(old_tuple->type == TPL_TYPE_ROW); - ut_a(new_tuple->type == TPL_TYPE_ROW); - - upd = ib_update_vector_create(cursor); - - err = ib_calc_diff(cursor, upd, old_tuple, new_tuple); - - if (err == DB_SUCCESS) { - /* Note that this is not a delete. */ - cursor->q_proc.node.upd->is_delete = FALSE; - - err = ib_execute_update_query_graph(cursor, pcur); - } - - ib_wake_master_thread(); - - return(err); -} - -/**********************************************************************//** -Build the update query graph to delete a row from an index. -@return DB_SUCCESS or err code */ -static -ib_err_t -ib_delete_row( -/*==========*/ - ib_cursor_t* cursor, /*!< in: current cursor */ - btr_pcur_t* pcur, /*!< in: Btree persistent cursor */ - const rec_t* rec) /*!< in: record to delete */ -{ - ulint i; - upd_t* upd; - ib_err_t err; - ib_tuple_t* tuple; - ib_tpl_t ib_tpl; - ulint n_cols; - upd_field_t* upd_field; - ib_bool_t page_format; - dict_table_t* table = cursor->prebuilt->table; - dict_index_t* index = dict_table_get_first_index(table); - - n_cols = dict_index_get_n_ordering_defined_by_user(index); - ib_tpl = ib_key_tuple_new(index, n_cols); - - if (!ib_tpl) { - return(DB_OUT_OF_MEMORY); - } - - tuple = (ib_tuple_t*) ib_tpl; - - upd = ib_update_vector_create(cursor); - - page_format = static_cast( - dict_table_is_comp(index->table)); - ib_read_tuple(rec, page_format, tuple, NULL, NULL); - - upd->n_fields = ib_tuple_get_n_cols(ib_tpl); - - for (i = 0; i < upd->n_fields; ++i) { - dfield_t* dfield; - - upd_field = &upd->fields[i]; - dfield = dtuple_get_nth_field(tuple->ptr, i); - - dfield_copy_data(&upd_field->new_val, dfield); - - upd_field->exp = NULL; - - upd_field->orig_len = 0; - - upd->info_bits = 0; - - upd_field->field_no = dict_col_get_clust_pos( - &table->cols[i], index); - } - - /* Note that this is a delete. */ - cursor->q_proc.node.upd->is_delete = TRUE; - - err = ib_execute_update_query_graph(cursor, pcur); - - ib_tuple_delete(ib_tpl); - - return(err); -} - -/*****************************************************************//** -Delete a row in a table. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_delete_row( -/*=================*/ - ib_crsr_t ib_crsr) /*!< in: InnoDB cursor instance */ -{ - ib_err_t err; - btr_pcur_t* pcur; - dict_index_t* index; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - - index = dict_table_get_first_index(prebuilt->index->table); - - /* Check whether this is a secondary index cursor */ - if (index != prebuilt->index) { - if (prebuilt->need_to_access_clustered) { - pcur = prebuilt->clust_pcur; - } else { - return(DB_ERROR); - } - } else { - pcur = prebuilt->pcur; - } - - if (ib_btr_cursor_is_positioned(pcur)) { - const rec_t* rec; - ib_bool_t page_format; - mtr_t mtr; - rec_t* copy = NULL; - byte ptr[UNIV_PAGE_SIZE_MAX]; - - page_format = static_cast( - dict_table_is_comp(index->table)); - - mtr_start(&mtr); - - if (btr_pcur_restore_position( - BTR_SEARCH_LEAF, pcur, &mtr)) { - mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; - - rec_offs_init(offsets_); - - rec = btr_pcur_get_rec(pcur); - - /* Since mtr will be commited, the rec - will not be protected. Make a copy of - the rec. */ - offsets = rec_get_offsets( - rec, index, offsets, ULINT_UNDEFINED, &heap); - ut_ad(rec_offs_size(offsets) < UNIV_PAGE_SIZE_MAX); - copy = rec_copy(ptr, rec, offsets); - } - - mtr_commit(&mtr); - - if (copy && !rec_get_deleted_flag(copy, page_format)) { - err = ib_delete_row(cursor, pcur, copy); - } else { - err = DB_RECORD_NOT_FOUND; - } - } else { - err = DB_RECORD_NOT_FOUND; - } - - ib_wake_master_thread(); - - return(err); -} - -/*****************************************************************//** -Read current row. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_read_row( -/*===============*/ - ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - ib_tpl_t ib_tpl, /*!< out: read cols into this tuple */ - void** row_buf, /*!< in/out: row buffer */ - ib_ulint_t* row_len) /*!< in/out: row buffer len */ -{ - ib_err_t err; - ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - - ut_a(trx_is_started(cursor->prebuilt->trx)); - - /* When searching with IB_EXACT_MATCH set, row_search_for_mysql() - will not position the persistent cursor but will copy the record - found into the row cache. It should be the only entry. */ - if (!ib_cursor_is_positioned(ib_crsr) ) { - err = DB_RECORD_NOT_FOUND; - } else { - mtr_t mtr; - btr_pcur_t* pcur; - row_prebuilt_t* prebuilt = cursor->prebuilt; - - if (prebuilt->need_to_access_clustered - && tuple->type == TPL_TYPE_ROW) { - pcur = prebuilt->clust_pcur; - } else { - pcur = prebuilt->pcur; - } - - if (pcur == NULL) { - return(DB_ERROR); - } - - mtr_start(&mtr); - - if (btr_pcur_restore_position(BTR_SEARCH_LEAF, pcur, &mtr)) { - const rec_t* rec; - ib_bool_t page_format; - - page_format = static_cast( - dict_table_is_comp(tuple->index->table)); - rec = btr_pcur_get_rec(pcur); - - if (prebuilt->innodb_api_rec && - prebuilt->innodb_api_rec != rec) { - rec = prebuilt->innodb_api_rec; - } - - if (!rec_get_deleted_flag(rec, page_format)) { - ib_read_tuple(rec, page_format, tuple, - row_buf, (ulint*) row_len); - err = DB_SUCCESS; - } else{ - err = DB_RECORD_NOT_FOUND; - } - - } else { - err = DB_RECORD_NOT_FOUND; - } - - mtr_commit(&mtr); - } - - return(err); -} - -/*****************************************************************//** -Move cursor to the first record in the table. -@return DB_SUCCESS or err code */ -UNIV_INLINE -ib_err_t -ib_cursor_position( -/*===============*/ - ib_cursor_t* cursor, /*!< in: InnoDB cursor instance */ - ib_srch_mode_t mode) /*!< in: Search mode */ -{ - ib_err_t err; - row_prebuilt_t* prebuilt = cursor->prebuilt; - unsigned char* buf; - - buf = static_cast(ut_malloc_nokey(UNIV_PAGE_SIZE)); - - /* We want to position at one of the ends, row_search_for_mysql() - uses the search_tuple fields to work out what to do. */ - dtuple_set_n_fields(prebuilt->search_tuple, 0); - - err = static_cast(row_search_for_mysql( - buf, static_cast(mode), prebuilt, 0, 0)); - - ut_free(buf); - - return(err); -} - -/*****************************************************************//** -Move cursor to the first record in the table. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_first( -/*============*/ - ib_crsr_t ib_crsr) /*!< in: InnoDB cursor instance */ -{ - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - - return(ib_cursor_position(cursor, IB_CUR_G)); -} - -/*****************************************************************//** -Move cursor to the next user record in the table. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_next( -/*===========*/ - ib_crsr_t ib_crsr) /*!< in: InnoDB cursor instance */ -{ - ib_err_t err; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - byte buf[UNIV_PAGE_SIZE_MAX]; - - /* We want to move to the next record */ - dtuple_set_n_fields(prebuilt->search_tuple, 0); - - err = static_cast(row_search_for_mysql( - buf, PAGE_CUR_G, prebuilt, 0, ROW_SEL_NEXT)); - - return(err); -} - -/*****************************************************************//** -Search for key. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_moveto( -/*=============*/ - ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - ib_tpl_t ib_tpl, /*!< in: Key to search for */ - ib_srch_mode_t ib_srch_mode) /*!< in: search mode */ -{ - ulint i; - ulint n_fields; - ib_err_t err = DB_SUCCESS; - ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - dtuple_t* search_tuple = prebuilt->search_tuple; - unsigned char* buf; - - ut_a(tuple->type == TPL_TYPE_KEY); - - n_fields = dict_index_get_n_ordering_defined_by_user(prebuilt->index); - - if (n_fields > dtuple_get_n_fields(tuple->ptr)) { - n_fields = dtuple_get_n_fields(tuple->ptr); - } - - dtuple_set_n_fields(search_tuple, n_fields); - dtuple_set_n_fields_cmp(search_tuple, n_fields); - - /* Do a shallow copy */ - for (i = 0; i < n_fields; ++i) { - dfield_copy(dtuple_get_nth_field(search_tuple, i), - dtuple_get_nth_field(tuple->ptr, i)); - } - - ut_a(prebuilt->select_lock_type <= LOCK_NUM); - - prebuilt->innodb_api_rec = NULL; - - buf = static_cast(ut_malloc_nokey(UNIV_PAGE_SIZE)); - - err = static_cast(row_search_for_mysql( - buf, static_cast(ib_srch_mode), prebuilt, - cursor->match_mode, 0)); - - ut_free(buf); - - return(err); -} - -/*****************************************************************//** -Set the cursor search mode. */ -void -ib_cursor_set_match_mode( -/*=====================*/ - ib_crsr_t ib_crsr, /*!< in: Cursor instance */ - ib_match_mode_t match_mode) /*!< in: ib_cursor_moveto match mode */ -{ - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - - cursor->match_mode = match_mode; -} - -/*****************************************************************//** -Get the dfield instance for the column in the tuple. -@return dfield instance in tuple */ -UNIV_INLINE -dfield_t* -ib_col_get_dfield( -/*==============*/ - ib_tuple_t* tuple, /*!< in: tuple instance */ - ulint col_no) /*!< in: col no. in tuple */ -{ - dfield_t* dfield; - - dfield = dtuple_get_nth_field(tuple->ptr, col_no); - - return(dfield); -} - -/*****************************************************************//** -Predicate to check whether a column type contains variable length data. -@return DB_SUCCESS or error code */ -UNIV_INLINE -ib_err_t -ib_col_is_capped( -/*==============*/ - const dtype_t* dtype) /*!< in: column type */ -{ - return(static_cast( - (dtype_get_mtype(dtype) == DATA_VARCHAR - || dtype_get_mtype(dtype) == DATA_CHAR - || dtype_get_mtype(dtype) == DATA_MYSQL - || dtype_get_mtype(dtype) == DATA_VARMYSQL - || dtype_get_mtype(dtype) == DATA_FIXBINARY - || dtype_get_mtype(dtype) == DATA_BINARY - || dtype_get_mtype(dtype) == DATA_POINT) - && dtype_get_len(dtype) > 0)); -} - -/*****************************************************************//** -Set a column of the tuple. Make a copy using the tuple's heap. -@return DB_SUCCESS or error code */ -ib_err_t -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_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); - - /* User wants to set the column to NULL. */ - if (len == IB_SQL_NULL) { - dfield_set_null(dfield); - return(DB_SUCCESS); - } - - dtype = dfield_get_type(dfield); - col_len = dtype_get_len(dtype); - - /* Not allowed to update system columns. */ - if (dtype_get_mtype(dtype) == DATA_SYS) { - return(DB_DATA_MISMATCH); - } - - dst = dfield_get_data(dfield); - - /* Since TEXT/CLOB also map to DATA_VARCHAR we need to make an - exception. Perhaps we need to set the precise type and check - for that. */ - if (ib_col_is_capped(dtype)) { - - len = ut_min(len, static_cast(col_len)); - - if (dst == NULL || len > dfield_get_len(dfield)) { - dst = mem_heap_alloc(tuple->heap, col_len); - ut_a(dst != NULL); - } - } else if (dst == NULL || len > dfield_get_len(dfield)) { - dst = mem_heap_alloc(tuple->heap, len); - } - - if (dst == NULL) { - return(DB_OUT_OF_MEMORY); - } - - switch (dtype_get_mtype(dtype)) { - case DATA_INT: { - - if (col_len == len) { - ibool usign; - - usign = dtype_get_prtype(dtype) & DATA_UNSIGNED; - mach_write_int_type(static_cast(dst), - static_cast(src), - len, usign); - - } else { - return(DB_DATA_MISMATCH); - } - break; - } - - case DATA_FLOAT: - if (len == sizeof(float)) { - mach_float_write(static_cast(dst), *(float*)src); - } else { - return(DB_DATA_MISMATCH); - } - break; - - case DATA_DOUBLE: - if (len == sizeof(double)) { - mach_double_write(static_cast(dst), - *(double*)src); - } else { - return(DB_DATA_MISMATCH); - } - break; - - case DATA_SYS: - ut_error; - break; - - case DATA_CHAR: - memcpy(dst, src, len); - memset((byte*) dst + len, 0x20, col_len - len); - len = col_len; - break; - - case DATA_POINT: - memcpy(dst, src, len); - break; - - case DATA_BLOB: - case DATA_VAR_POINT: - case DATA_GEOMETRY: - case DATA_BINARY: - case DATA_DECIMAL: - case DATA_VARCHAR: - case DATA_FIXBINARY: - if (need_cpy) { - memcpy(dst, src, len); - } else { - dfield_set_data(dfield, src, len); - dst = dfield_get_data(dfield); - } - break; - - case DATA_MYSQL: - case DATA_VARMYSQL: { - ulint cset; - CHARSET_INFO* cs; - int error = 0; - ulint true_len = len; - - /* For multi byte character sets we need to - calculate the true length of the data. */ - cset = dtype_get_charset_coll( - dtype_get_prtype(dtype)); - cs = all_charsets[cset]; - if (cs) { - uint pos = (uint)(col_len / cs->mbmaxlen); - - if (len > 0 && cs->mbmaxlen > 1) { - true_len = (ulint) - my_well_formed_length( - cs, - (const char*)src, - (const char*)src + len, - pos, - &error); - - if (true_len < len) { - len = static_cast(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 = static_cast(col_len); - } - break; - } - - default: - ut_error; - } - - if (dst != dfield_get_data(dfield)) { - dfield_set_data(dfield, dst, len); - } else { - dfield_set_len(dfield, len); - } - - return(DB_SUCCESS); -} - -/*****************************************************************//** -Get the size of the data available in a column of the tuple. -@return bytes avail or IB_SQL_NULL */ -ib_ulint_t -ib_col_get_len( -/*===========*/ - ib_tpl_t ib_tpl, /*!< in: tuple instance */ - ib_ulint_t i) /*!< in: column index in tuple */ -{ - const dfield_t* dfield; - ulint data_len; - ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; - - dfield = ib_col_get_dfield(tuple, i); - - data_len = dfield_get_len(dfield); - - return(static_cast( - data_len == UNIV_SQL_NULL ? IB_SQL_NULL : data_len)); -} - -/*****************************************************************//** -Copy a column value from the tuple. -@return bytes copied or IB_SQL_NULL */ -UNIV_INLINE -ib_ulint_t -ib_col_copy_value_low( -/*==================*/ - ib_tpl_t ib_tpl, /*!< in: tuple instance */ - ib_ulint_t i, /*!< in: column index in tuple */ - void* dst, /*!< out: copied data value */ - ib_ulint_t len) /*!< in: max data value len to copy */ -{ - const void* data; - const dfield_t* dfield; - ulint data_len; - ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; - - dfield = ib_col_get_dfield(tuple, i); - - data = dfield_get_data(dfield); - data_len = dfield_get_len(dfield); - - if (data_len != UNIV_SQL_NULL) { - - const dtype_t* dtype = dfield_get_type(dfield); - - switch (dtype_get_mtype(dfield_get_type(dfield))) { - case DATA_INT: { - ibool usign; - uintmax_t ret; - - ut_a(data_len == len); - - usign = dtype_get_prtype(dtype) & DATA_UNSIGNED; - ret = mach_read_int_type(static_cast(data), - data_len, usign); - - if (usign) { - 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; - } else { - *(ib_i64_t*)dst = (ib_i64_t)ret; - } - } else { - 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; - } else { - *(ib_u64_t*)dst = (ib_i64_t)ret; - } - } - - break; - } - case DATA_FLOAT: - if (len == data_len) { - float f; - - ut_a(data_len == sizeof(f)); - f = mach_float_read(static_cast( - data)); - memcpy(dst, &f, sizeof(f)); - } else { - data_len = 0; - } - break; - case DATA_DOUBLE: - if (len == data_len) { - double d; - - ut_a(data_len == sizeof(d)); - d = mach_double_read(static_cast( - data)); - memcpy(dst, &d, sizeof(d)); - } else { - data_len = 0; - } - break; - default: - data_len = ut_min(data_len, len); - memcpy(dst, data, data_len); - } - } else { - data_len = IB_SQL_NULL; - } - - return(static_cast(data_len)); -} - -/*****************************************************************//** -Copy a column value from the tuple. -@return bytes copied or IB_SQL_NULL */ -ib_ulint_t -ib_col_copy_value( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: tuple instance */ - ib_ulint_t i, /*!< in: column index in tuple */ - void* dst, /*!< out: copied data value */ - ib_ulint_t len) /*!< in: max data value len to copy */ -{ - return(ib_col_copy_value_low(ib_tpl, i, dst, len)); -} - -/*****************************************************************//** -Get the InnoDB column attribute from the internal column precise type. -@return precise type in api format */ -UNIV_INLINE -ib_col_attr_t -ib_col_get_attr( -/*============*/ - ulint prtype) /*!< in: column definition */ -{ - ib_col_attr_t attr = IB_COL_NONE; - - if (prtype & DATA_UNSIGNED) { - attr = static_cast(attr | IB_COL_UNSIGNED); - } - - if (prtype & DATA_NOT_NULL) { - attr = static_cast(attr | IB_COL_NOT_NULL); - } - - return(attr); -} - -/*****************************************************************//** -Get a column name from the tuple. -@return name of the column */ -const char* -ib_col_get_name( -/*============*/ - ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - ib_ulint_t i) /*!< in: column index in tuple */ -{ - const char* name; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - dict_table_t* table = cursor->prebuilt->table; - dict_col_t* col = dict_table_get_nth_col(table, i); - ulint col_no = dict_col_get_no(col); - - name = dict_table_get_col_name(table, col_no); - - return(name); -} - -/*****************************************************************//** -Get an index field name from the cursor. -@return name of the field */ -const char* -ib_get_idx_field_name( -/*==================*/ - ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - ib_ulint_t i) /*!< in: column index in tuple */ -{ - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - dict_index_t* index = cursor->prebuilt->index; - dict_field_t* field; - - if (index) { - field = dict_index_get_nth_field(cursor->prebuilt->index, i); - - if (field) { - return(field->name); - } - } - - return(NULL); -} - -/*****************************************************************//** -Get a column type, length and attributes from the tuple. -@return len of column data */ -UNIV_INLINE -ib_ulint_t -ib_col_get_meta_low( -/*================*/ - ib_tpl_t ib_tpl, /*!< in: tuple instance */ - ib_ulint_t i, /*!< in: column index in tuple */ - ib_col_meta_t* ib_col_meta) /*!< out: column meta data */ -{ - ib_u16_t prtype; - const dfield_t* dfield; - ulint data_len; - ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; - - dfield = ib_col_get_dfield(tuple, i); - - data_len = dfield_get_len(dfield); - - /* We assume 1-1 mapping between the ENUM and internal type codes. */ - ib_col_meta->type = static_cast( - dtype_get_mtype(dfield_get_type(dfield))); - - ib_col_meta->type_len = static_cast( - dtype_get_len(dfield_get_type(dfield))); - - prtype = (ib_u16_t) dtype_get_prtype(dfield_get_type(dfield)); - - ib_col_meta->attr = ib_col_get_attr(prtype); - ib_col_meta->client_type = prtype & DATA_MYSQL_TYPE_MASK; - - return(static_cast(data_len)); -} - -/*************************************************************//** -Read a signed int 8 bit column from an InnoDB tuple. */ -UNIV_INLINE -ib_err_t -ib_tuple_check_int( -/*===============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_bool_t usign, /*!< in: true if unsigned */ - ulint size) /*!< in: size of integer */ -{ - ib_col_meta_t ib_col_meta; - - ib_col_get_meta_low(ib_tpl, i, &ib_col_meta); - - if (ib_col_meta.type != IB_INT) { - return(DB_DATA_MISMATCH); - } else if (ib_col_meta.type_len == IB_SQL_NULL) { - return(DB_UNDERFLOW); - } else if (ib_col_meta.type_len != size) { - return(DB_DATA_MISMATCH); - } else if ((ib_col_meta.attr & IB_COL_UNSIGNED) && !usign) { - return(DB_DATA_MISMATCH); - } - - return(DB_SUCCESS); -} - -/*************************************************************//** -Read a signed int 8 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_i8( -/*=============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_i8_t* ival) /*!< out: integer value */ -{ - ib_err_t err; - - err = ib_tuple_check_int(ib_tpl, i, IB_FALSE, sizeof(*ival)); - - if (err == DB_SUCCESS) { - ib_col_copy_value_low(ib_tpl, i, ival, sizeof(*ival)); - } - - return(err); -} - -/*************************************************************//** -Read an unsigned int 8 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_u8( -/*=============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_u8_t* ival) /*!< out: integer value */ -{ - ib_err_t err; - - err = ib_tuple_check_int(ib_tpl, i, IB_TRUE, sizeof(*ival)); - - if (err == DB_SUCCESS) { - ib_col_copy_value_low(ib_tpl, i, ival, sizeof(*ival)); - } - - return(err); -} - -/*************************************************************//** -Read a signed int 16 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_i16( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_i16_t* ival) /*!< out: integer value */ -{ - ib_err_t err; - - err = ib_tuple_check_int(ib_tpl, i, FALSE, sizeof(*ival)); - - if (err == DB_SUCCESS) { - ib_col_copy_value_low(ib_tpl, i, ival, sizeof(*ival)); - } - - return(err); -} - -/*************************************************************//** -Read an unsigned int 16 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_u16( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_u16_t* ival) /*!< out: integer value */ -{ - ib_err_t err; - - err = ib_tuple_check_int(ib_tpl, i, IB_TRUE, sizeof(*ival)); - - if (err == DB_SUCCESS) { - ib_col_copy_value_low(ib_tpl, i, ival, sizeof(*ival)); - } - - return(err); -} - -/*************************************************************//** -Read a signed int 32 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_i32( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_i32_t* ival) /*!< out: integer value */ -{ - ib_err_t err; - - err = ib_tuple_check_int(ib_tpl, i, FALSE, sizeof(*ival)); - - if (err == DB_SUCCESS) { - ib_col_copy_value_low(ib_tpl, i, ival, sizeof(*ival)); - } - - return(err); -} - -/*************************************************************//** -Read an unsigned int 32 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_u32( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_u32_t* ival) /*!< out: integer value */ -{ - ib_err_t err; - - err = ib_tuple_check_int(ib_tpl, i, IB_TRUE, sizeof(*ival)); - - if (err == DB_SUCCESS) { - ib_col_copy_value_low(ib_tpl, i, ival, sizeof(*ival)); - } - - return(err); -} - -/*************************************************************//** -Read a signed int 64 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_i64( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_i64_t* ival) /*!< out: integer value */ -{ - ib_err_t err; - - err = ib_tuple_check_int(ib_tpl, i, FALSE, sizeof(*ival)); - - if (err == DB_SUCCESS) { - ib_col_copy_value_low(ib_tpl, i, ival, sizeof(*ival)); - } - - return(err); -} - -/*************************************************************//** -Read an unsigned int 64 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_u64( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_u64_t* ival) /*!< out: integer value */ -{ - ib_err_t err; - - err = ib_tuple_check_int(ib_tpl, i, IB_TRUE, sizeof(*ival)); - - if (err == DB_SUCCESS) { - ib_col_copy_value_low(ib_tpl, i, ival, sizeof(*ival)); - } - - return(err); -} - -/*****************************************************************//** -Get a column value pointer from the tuple. -@return NULL or pointer to buffer */ -const void* -ib_col_get_value( -/*=============*/ - ib_tpl_t ib_tpl, /*!< in: tuple instance */ - ib_ulint_t i) /*!< in: column index in tuple */ -{ - const void* data; - const dfield_t* dfield; - ulint data_len; - ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; - - dfield = ib_col_get_dfield(tuple, i); - - data = dfield_get_data(dfield); - data_len = dfield_get_len(dfield); - - return(data_len != UNIV_SQL_NULL ? data : NULL); -} - -/*****************************************************************//** -Get a column type, length and attributes from the tuple. -@return len of column data */ -ib_ulint_t -ib_col_get_meta( -/*============*/ - ib_tpl_t ib_tpl, /*!< in: tuple instance */ - ib_ulint_t i, /*!< in: column index in tuple */ - ib_col_meta_t* ib_col_meta) /*!< out: column meta data */ -{ - return(ib_col_get_meta_low(ib_tpl, i, ib_col_meta)); -} - -/*****************************************************************//** -"Clear" or reset an InnoDB tuple. We free the heap and recreate the tuple. -@return new tuple, or NULL */ -ib_tpl_t -ib_tuple_clear( -/*============*/ - ib_tpl_t ib_tpl) /*!< in,own: tuple (will be freed) */ -{ - const dict_index_t* index; - ulint n_cols; - ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; - ib_tuple_type_t type = tuple->type; - mem_heap_t* heap = tuple->heap; - - index = tuple->index; - n_cols = dtuple_get_n_fields(tuple->ptr); - - mem_heap_empty(heap); - - if (type == TPL_TYPE_ROW) { - return(ib_row_tuple_new_low(index, n_cols, heap)); - } else { - return(ib_key_tuple_new_low(index, n_cols, heap)); - } -} - -/*****************************************************************//** -Create a new cluster key search tuple and copy the contents of the -secondary index key tuple columns that refer to the cluster index record -to the cluster key. It does a deep copy of the column data. -@return DB_SUCCESS or error code */ -ib_err_t -ib_tuple_get_cluster_key( -/*=====================*/ - ib_crsr_t ib_crsr, /*!< in: secondary index cursor */ - ib_tpl_t* ib_dst_tpl, /*!< out,own: destination tuple */ - const ib_tpl_t ib_src_tpl) /*!< in: source tuple */ -{ - ulint i; - ulint n_fields; - ib_err_t err = DB_SUCCESS; - ib_tuple_t* dst_tuple = NULL; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - ib_tuple_t* src_tuple = (ib_tuple_t*) ib_src_tpl; - dict_index_t* clust_index; - - clust_index = dict_table_get_first_index(cursor->prebuilt->table); - - /* We need to ensure that the src tuple belongs to the same table - as the open cursor and that it's not a tuple for a cluster index. */ - if (src_tuple->type != TPL_TYPE_KEY) { - return(DB_ERROR); - } else if (src_tuple->index->table != cursor->prebuilt->table) { - return(DB_DATA_MISMATCH); - } else if (src_tuple->index == clust_index) { - return(DB_ERROR); - } - - /* Create the cluster index key search tuple. */ - *ib_dst_tpl = ib_clust_search_tuple_create(ib_crsr); - - if (!*ib_dst_tpl) { - return(DB_OUT_OF_MEMORY); - } - - dst_tuple = (ib_tuple_t*) *ib_dst_tpl; - ut_a(dst_tuple->index == clust_index); - - n_fields = dict_index_get_n_unique(dst_tuple->index); - - /* Do a deep copy of the data fields. */ - for (i = 0; i < n_fields; i++) { - ulint pos; - dfield_t* src_field; - dfield_t* dst_field; - - pos = dict_index_get_nth_field_pos( - src_tuple->index, dst_tuple->index, i); - - ut_a(pos != ULINT_UNDEFINED); - - src_field = dtuple_get_nth_field(src_tuple->ptr, pos); - dst_field = dtuple_get_nth_field(dst_tuple->ptr, i); - - if (!dfield_is_null(src_field)) { - UNIV_MEM_ASSERT_RW(src_field->data, src_field->len); - - dst_field->data = mem_heap_dup( - dst_tuple->heap, - src_field->data, - src_field->len); - - dst_field->len = src_field->len; - } else { - dfield_set_null(dst_field); - } - } - - return(err); -} - -/*****************************************************************//** -Create an InnoDB tuple used for index/table search. -@return own: Tuple for current index */ -ib_tpl_t -ib_sec_search_tuple_create( -/*=======================*/ - ib_crsr_t ib_crsr) /*!< in: Cursor instance */ -{ - ulint n_cols; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - dict_index_t* index = cursor->prebuilt->index; - - n_cols = dict_index_get_n_unique_in_tree(index); - return(ib_key_tuple_new(index, n_cols)); -} - -/*****************************************************************//** -Create an InnoDB tuple used for index/table search. -@return own: Tuple for current index */ -ib_tpl_t -ib_sec_read_tuple_create( -/*=====================*/ - ib_crsr_t ib_crsr) /*!< in: Cursor instance */ -{ - ulint n_cols; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - dict_index_t* index = cursor->prebuilt->index; - - n_cols = dict_index_get_n_fields(index); - return(ib_row_tuple_new(index, n_cols)); -} - -/*****************************************************************//** -Create an InnoDB tuple used for table key operations. -@return own: Tuple for current table */ -ib_tpl_t -ib_clust_search_tuple_create( -/*=========================*/ - ib_crsr_t ib_crsr) /*!< in: Cursor instance */ -{ - ulint n_cols; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - dict_index_t* index; - - index = dict_table_get_first_index(cursor->prebuilt->table); - - n_cols = dict_index_get_n_ordering_defined_by_user(index); - return(ib_key_tuple_new(index, n_cols)); -} - -/*****************************************************************//** -Create an InnoDB tuple for table row operations. -@return own: Tuple for current table */ -ib_tpl_t -ib_clust_read_tuple_create( -/*=======================*/ - ib_crsr_t ib_crsr) /*!< in: Cursor instance */ -{ - ulint n_cols; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - dict_index_t* index; - - index = dict_table_get_first_index(cursor->prebuilt->table); - - n_cols = dict_table_get_n_cols(cursor->prebuilt->table); - return(ib_row_tuple_new(index, n_cols)); -} - -/*****************************************************************//** -Return the number of user columns in the tuple definition. -@return number of user columns */ -ib_ulint_t -ib_tuple_get_n_user_cols( -/*=====================*/ - const ib_tpl_t ib_tpl) /*!< in: Tuple for current table */ -{ - const ib_tuple_t* tuple = (const ib_tuple_t*) ib_tpl; - - if (tuple->type == TPL_TYPE_ROW) { - return(static_cast( - dict_table_get_n_user_cols(tuple->index->table))); - } - - return(static_cast( - dict_index_get_n_ordering_defined_by_user(tuple->index))); -} - -/*****************************************************************//** -Return the number of columns in the tuple definition. -@return number of columns */ -ib_ulint_t -ib_tuple_get_n_cols( -/*================*/ - const ib_tpl_t ib_tpl) /*!< in: Tuple for table/index */ -{ - const ib_tuple_t* tuple = (const ib_tuple_t*) ib_tpl; - - return(static_cast(dtuple_get_n_fields(tuple->ptr))); -} - -/*****************************************************************//** -Destroy an InnoDB tuple. */ -void -ib_tuple_delete( -/*============*/ - ib_tpl_t ib_tpl) /*!< in,own: Tuple instance to delete */ -{ - ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; - - if (!ib_tpl) { - return; - } - - mem_heap_free(tuple->heap); -} - -/*****************************************************************//** -Get a table id. This function will acquire the dictionary mutex. -@return DB_SUCCESS if found */ -ib_err_t -ib_table_get_id( -/*============*/ - const char* table_name, /*!< in: table to find */ - ib_id_u64_t* table_id) /*!< out: table id if found */ -{ - ib_err_t err; - - dict_mutex_enter_for_mysql(); - - err = ib_table_get_id_low(table_name, table_id); - - dict_mutex_exit_for_mysql(); - - return(err); -} - -/*****************************************************************//** -Check if cursor is positioned. -@return IB_TRUE if positioned */ -ib_bool_t -ib_cursor_is_positioned( -/*====================*/ - const ib_crsr_t ib_crsr) /*!< in: InnoDB cursor instance */ -{ - const ib_cursor_t* cursor = (const ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - - return(ib_btr_cursor_is_positioned(prebuilt->pcur)); -} - - -/*****************************************************************//** -Checks if the data dictionary is latched in exclusive mode. -@return TRUE if exclusive latch */ -ib_bool_t -ib_schema_lock_is_exclusive( -/*========================*/ - const ib_trx_t ib_trx) /*!< in: transaction */ -{ - const trx_t* trx = (const trx_t*) ib_trx; - - return(trx->dict_operation_lock_mode == RW_X_LATCH); -} - -/*****************************************************************//** -Checks if the data dictionary is latched in shared mode. -@return TRUE if shared latch */ -ib_bool_t -ib_schema_lock_is_shared( -/*=====================*/ - const ib_trx_t ib_trx) /*!< in: transaction */ -{ - const trx_t* trx = (const trx_t*) ib_trx; - - return(trx->dict_operation_lock_mode == RW_S_LATCH); -} - -/*****************************************************************//** -Set the Lock an InnoDB cursor/table. -@return DB_SUCCESS or error code */ -ib_err_t -ib_cursor_lock( -/*===========*/ - ib_crsr_t ib_crsr, /*!< in/out: InnoDB cursor */ - ib_lck_mode_t ib_lck_mode) /*!< in: InnoDB lock mode */ -{ - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - trx_t* trx = prebuilt->trx; - dict_table_t* table = prebuilt->table; - - return(ib_trx_lock_table_with_retry( - trx, table, (enum lock_mode) ib_lck_mode)); -} - -/*****************************************************************//** -Set the Lock an InnoDB table using the table id. -@return DB_SUCCESS or error code */ -ib_err_t -ib_table_lock( -/*==========*/ - ib_trx_t ib_trx, /*!< in/out: transaction */ - ib_id_u64_t table_id, /*!< in: table id */ - ib_lck_mode_t ib_lck_mode) /*!< in: InnoDB lock mode */ -{ - ib_err_t err; - que_thr_t* thr; - mem_heap_t* heap; - dict_table_t* table; - ib_qry_proc_t q_proc; - trx_t* trx = (trx_t*) ib_trx; - - ut_ad(trx_is_started(trx)); - - table = ib_open_table_by_id(table_id, FALSE); - - if (table == NULL) { - return(DB_TABLE_NOT_FOUND); - } - - ut_a(ib_lck_mode <= static_cast(LOCK_NUM)); - ut_ad(!dict_table_have_virtual_index(table)); - - heap = mem_heap_create(128); - - q_proc.node.sel = sel_node_create(heap); - - thr = pars_complete_graph_for_exec(q_proc.node.sel, trx, heap, NULL); - - q_proc.grph.sel = static_cast(que_node_get_parent(thr)); - q_proc.grph.sel->state = QUE_FORK_ACTIVE; - - trx->op_info = "setting table lock"; - - ut_a(ib_lck_mode == IB_LOCK_IS || ib_lck_mode == IB_LOCK_IX); - err = static_cast( - lock_table(0, table, (enum lock_mode) ib_lck_mode, thr)); - - trx->error_state = err; - - mem_heap_free(heap); - - return(err); -} - -/*****************************************************************//** -Unlock an InnoDB table. -@return DB_SUCCESS or error code */ -ib_err_t -ib_cursor_unlock( -/*=============*/ - ib_crsr_t ib_crsr) /*!< in/out: InnoDB cursor */ -{ - ib_err_t err = DB_SUCCESS; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - - if (prebuilt->trx->mysql_n_tables_locked > 0) { - --prebuilt->trx->mysql_n_tables_locked; - } else { - err = DB_ERROR; - } - - return(err); -} - -/*****************************************************************//** -Set the Lock mode of the cursor. -@return DB_SUCCESS or error code */ -ib_err_t -ib_cursor_set_lock_mode( -/*====================*/ - ib_crsr_t ib_crsr, /*!< in/out: InnoDB cursor */ - ib_lck_mode_t ib_lck_mode) /*!< in: InnoDB lock mode */ -{ - ib_err_t err = DB_SUCCESS; - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - - ut_a(ib_lck_mode <= static_cast(LOCK_NUM)); - - if (ib_lck_mode == IB_LOCK_X) { - err = ib_cursor_lock(ib_crsr, IB_LOCK_IX); - } else if (ib_lck_mode == IB_LOCK_S) { - err = ib_cursor_lock(ib_crsr, IB_LOCK_IS); - } - - if (err == DB_SUCCESS) { - prebuilt->select_lock_type = (lock_mode) ib_lck_mode; - ut_a(trx_is_started(prebuilt->trx)); - } - - return(err); -} - -/*****************************************************************//** -Set need to access clustered index record. */ -void -ib_cursor_set_cluster_access( -/*=========================*/ - ib_crsr_t ib_crsr) /*!< in/out: InnoDB cursor */ -{ - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - - prebuilt->need_to_access_clustered = TRUE; -} - -/*****************************************************************//** -Inform the cursor that it's the start of an SQL statement. */ -void -ib_cursor_stmt_begin( -/*=================*/ - ib_crsr_t ib_crsr) /*!< in: cursor */ -{ - ib_cursor_t* cursor = (ib_cursor_t*) ib_crsr; - - cursor->prebuilt->sql_stat_start = TRUE; -} - -/*****************************************************************//** -Write a double value to a column. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_write_double( -/*==================*/ - ib_tpl_t ib_tpl, /*!< in/out: tuple to write to */ - int col_no, /*!< in: column number */ - double val) /*!< in: value to write */ -{ - const dfield_t* dfield; - ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; - - 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), true)); - } else { - return(DB_DATA_MISMATCH); - } -} - -/*************************************************************//** -Read a double column value from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_double( -/*=================*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t col_no, /*!< in: column number */ - double* dval) /*!< out: double value */ -{ - ib_err_t err; - const dfield_t* dfield; - ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; - - dfield = ib_col_get_dfield(tuple, col_no); - - if (dtype_get_mtype(dfield_get_type(dfield)) == DATA_DOUBLE) { - ib_col_copy_value_low(ib_tpl, col_no, dval, sizeof(*dval)); - err = DB_SUCCESS; - } else { - err = DB_DATA_MISMATCH; - } - - return(err); -} - -/*****************************************************************//** -Write a float value to a column. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_write_float( -/*=================*/ - ib_tpl_t ib_tpl, /*!< in/out: tuple to write to */ - int col_no, /*!< in: column number */ - float val) /*!< in: value to write */ -{ - const dfield_t* dfield; - ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; - - 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), true)); - } else { - return(DB_DATA_MISMATCH); - } -} - -/*************************************************************//** -Read a float value from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_float( -/*================*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t col_no, /*!< in: column number */ - float* fval) /*!< out: float value */ -{ - ib_err_t err; - const dfield_t* dfield; - ib_tuple_t* tuple = (ib_tuple_t*) ib_tpl; - - dfield = ib_col_get_dfield(tuple, col_no); - - if (dtype_get_mtype(dfield_get_type(dfield)) == DATA_FLOAT) { - ib_col_copy_value_low(ib_tpl, col_no, fval, sizeof(*fval)); - err = DB_SUCCESS; - } else { - err = DB_DATA_MISMATCH; - } - - return(err); -} - -/*****************************************************************//** -Truncate a table. The cursor handle will be closed and set to NULL -on success. -@return DB_SUCCESS or error code */ -ib_err_t -ib_cursor_truncate( -/*===============*/ - ib_crsr_t* ib_crsr, /*!< in/out: cursor for table - to truncate */ - ib_id_u64_t* table_id) /*!< out: new table id */ -{ - ib_err_t err; - ib_cursor_t* cursor = *(ib_cursor_t**) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - - *table_id = 0; - - err = ib_cursor_lock(*ib_crsr, IB_LOCK_X); - - if (err == DB_SUCCESS) { - trx_t* trx; - dict_table_t* table = prebuilt->table; - - /* We are going to free the cursor and the prebuilt. Store - the transaction handle locally. */ - trx = prebuilt->trx; - err = ib_cursor_close(*ib_crsr); - ut_a(err == DB_SUCCESS); - - *ib_crsr = NULL; - - /* A temp go around for assertion in trx_start_for_ddl_low - we already start the trx */ - if (trx->state == TRX_STATE_ACTIVE) { -#ifdef UNIV_DEBUG - trx->start_file = 0; -#endif /* UNIV_DEBUG */ - trx->dict_operation = TRX_DICT_OP_TABLE; - } - - /* This function currently commits the transaction - on success. */ - err = static_cast( - row_truncate_table_for_mysql(table, trx)); - - if (err == DB_SUCCESS) { - *table_id = (table->id); - } - } - - return(err); -} - -/*****************************************************************//** -Truncate a table. -@return DB_SUCCESS or error code */ -ib_err_t -ib_table_truncate( -/*==============*/ - const char* table_name, /*!< in: table name */ - ib_id_u64_t* table_id) /*!< out: new table id */ -{ - ib_err_t err; - dict_table_t* table; - ib_err_t trunc_err; - ib_trx_t ib_trx = NULL; - ib_crsr_t ib_crsr = NULL; - ib_ulint_t memcached_sync = 0; - - ib_trx = ib_trx_begin(IB_TRX_SERIALIZABLE, true, false); - - dict_mutex_enter_for_mysql(); - - table = dict_table_open_on_name(table_name, TRUE, FALSE, - DICT_ERR_IGNORE_NONE); - - if (table != NULL && dict_table_get_first_index(table)) { - err = ib_create_cursor_with_index_id(&ib_crsr, table, 0, - (trx_t*) ib_trx); - } else { - err = DB_TABLE_NOT_FOUND; - } - - /* Remember the memcached_sync_count and set it to 0, so the - truncate can be executed. */ - if (table != NULL && err == DB_SUCCESS) { - memcached_sync = static_cast( - table->memcached_sync_count); - table->memcached_sync_count = 0; - } - - dict_mutex_exit_for_mysql(); - - if (err == DB_SUCCESS) { - trunc_err = ib_cursor_truncate(&ib_crsr, table_id); - ut_a(err == DB_SUCCESS); - } else { - trunc_err = err; - } - - if (ib_crsr != NULL) { - err = ib_cursor_close(ib_crsr); - ut_a(err == DB_SUCCESS); - } - - if (trunc_err == DB_SUCCESS) { - ut_a(!trx_is_started(static_cast(ib_trx))); - } else { - err = ib_trx_rollback(ib_trx); - ut_a(err == DB_SUCCESS); - } - - err = ib_trx_release(ib_trx); - ut_a(err == DB_SUCCESS); - - /* Set the memcached_sync_count back. */ - if (table != NULL && memcached_sync != 0) { - dict_mutex_enter_for_mysql(); - - table->memcached_sync_count = memcached_sync; - - dict_mutex_exit_for_mysql(); - } - - return(trunc_err); -} - -/*****************************************************************//** -Return isolation configuration set by "innodb_api_trx_level" -@return trx isolation level*/ -ib_trx_level_t -ib_cfg_trx_level() -/*==============*/ -{ - return(static_cast(ib_trx_level_setting)); -} - -/*****************************************************************//** -Return configure value for background commit interval (in seconds) -@return background commit interval (in seconds) */ -ib_ulint_t -ib_cfg_bk_commit_interval() -/*=======================*/ -{ - return(static_cast(ib_bk_commit_interval)); -} - -/*****************************************************************//** -Get generic configure status -@return configure status*/ -int -ib_cfg_get_cfg() -/*============*/ -{ - int cfg_status; - - cfg_status = (ib_binlog_enabled) ? IB_CFG_BINLOG_ENABLED : 0; - - if (ib_mdl_enabled) { - cfg_status |= IB_CFG_MDL_ENABLED; - } - - if (ib_disable_row_lock) { - cfg_status |= IB_CFG_DISABLE_ROWLOCK; - } - - return(cfg_status); -} - -/*****************************************************************//** -Wrapper of ut_strerr() which converts an InnoDB error number to a -human readable text message. -@return string, describing the error */ -const char* -ib_ut_strerr( -/*=========*/ - ib_err_t num) /*!< in: error number */ -{ - return(ut_strerr(num)); -} - -/*****************************************************************//** -Increase/decrease the memcached sync count of table to sync memcached -DML with SQL DDLs. -@return DB_SUCCESS or error number */ -ib_err_t -ib_cursor_set_memcached_sync( -/*=========================*/ - ib_crsr_t ib_crsr, /*!< in: cursor */ - ib_bool_t flag) /*!< in: true for increase */ -{ - const ib_cursor_t* cursor = (const ib_cursor_t*) ib_crsr; - row_prebuilt_t* prebuilt = cursor->prebuilt; - dict_table_t* table = prebuilt->table; - ib_err_t err = DB_SUCCESS; - - if (table != NULL) { - /* If memcached_sync_count is -1, means table is - doing DDL, we just return error. */ - if (table->memcached_sync_count == DICT_TABLE_IN_DDL) { - return(DB_ERROR); - } - - if (flag) { - my_atomic_addlint(&table->memcached_sync_count, 1); - } else { - my_atomic_addlint(&table->memcached_sync_count, -1); - ut_a(table->memcached_sync_count >= 0); - } - } else { - err = DB_TABLE_NOT_FOUND; - } - - return(err); -} diff --git a/storage/innobase/api/api0misc.cc b/storage/innobase/api/api0misc.cc deleted file mode 100644 index b510f292a35..00000000000 --- a/storage/innobase/api/api0misc.cc +++ /dev/null @@ -1,132 +0,0 @@ -/***************************************************************************** - -Copyright (c) 2008, 2015, Oracle and/or its affiliates. All Rights Reserved. - -This 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 api/api0misc.cc -InnoDB Native API - -2008-08-01 Created by Sunny Bains -3/20/2011 Jimmy Yang extracted from Embedded InnoDB -*******************************************************/ - -#include "ha_prototypes.h" - -#include "api0misc.h" -#include "trx0roll.h" -#include "srv0srv.h" -#include "dict0mem.h" -#include "dict0dict.h" -#include "pars0pars.h" -#include "row0sel.h" -#include "lock0lock.h" - -/*********************************************************************//** -Sets a lock on a table. -@return error code or DB_SUCCESS */ -dberr_t -ib_trx_lock_table_with_retry( -/*=========================*/ - trx_t* trx, /*!< in/out: transaction */ - dict_table_t* table, /*!< in: table to lock */ - enum lock_mode mode) /*!< in: LOCK_X or LOCK_S */ -{ - trx->op_info = "setting table lock"; - - return(lock_table_for_trx(table, trx, mode)); -} -/****************************************************************//** -Handles user errors and lock waits detected by the database engine. -@return TRUE if it was a lock wait and we should continue running -the query thread */ -ibool -ib_handle_errors( -/*=============*/ - dberr_t* new_err,/*!< out: possible new error encountered in - lock wait, or if no new error, the value - of trx->error_state at the entry of this - function */ - trx_t* trx, /*!< in: transaction */ - que_thr_t* thr, /*!< in: query thread */ - trx_savept_t* savept) /*!< in: savepoint or NULL */ -{ - dberr_t err; -handle_new_error: - err = trx->error_state; - - ut_a(err != DB_SUCCESS); - - trx->error_state = DB_SUCCESS; - - switch (err) { - case DB_LOCK_WAIT_TIMEOUT: - trx_rollback_for_mysql(trx); - break; - /* fall through */ - case DB_DUPLICATE_KEY: - case DB_FOREIGN_DUPLICATE_KEY: - case DB_TOO_BIG_RECORD: - case DB_ROW_IS_REFERENCED: - case DB_NO_REFERENCED_ROW: - case DB_CANNOT_ADD_CONSTRAINT: - case DB_TOO_MANY_CONCURRENT_TRXS: - case DB_OUT_OF_FILE_SPACE: - if (savept) { - /* Roll back the latest, possibly incomplete - insertion or update */ - - trx_rollback_to_savepoint(trx, savept); - } - break; - case DB_LOCK_WAIT: - lock_wait_suspend_thread(thr); - - if (trx->error_state != DB_SUCCESS) { - que_thr_stop_for_mysql(thr); - - goto handle_new_error; - } - - *new_err = err; - - return(TRUE); /* Operation needs to be retried. */ - - case DB_DEADLOCK: - case DB_LOCK_TABLE_FULL: - /* Roll back the whole transaction; this resolution was added - to version 3.23.43 */ - - trx_rollback_for_mysql(trx); - break; - - case DB_CORRUPTION: - case DB_FOREIGN_EXCEED_MAX_CASCADE: - break; - default: - ut_error; - } - - if (trx->error_state != DB_SUCCESS) { - *new_err = trx->error_state; - } else { - *new_err = err; - } - - trx->error_state = DB_SUCCESS; - - return(FALSE); -} diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc index 8acb96f1910..49ac63cff6d 100644 --- a/storage/innobase/btr/btr0btr.cc +++ b/storage/innobase/btr/btr0btr.cc @@ -2,7 +2,7 @@ Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2014, 2016, MariaDB Corporation +Copyright (c) 2014, 2017, MariaDB Corporation. This 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 @@ -335,12 +335,9 @@ btr_root_adjust_on_import( } else { /* Check that the table flags and the tablespace flags match. */ - ulint flags = dict_tf_to_fsp_flags( - table->flags, - false, - dict_table_is_encrypted(table)); + ulint flags = dict_tf_to_fsp_flags(table->flags); ulint fsp_flags = fil_space_get_flags(table->space); - err = fsp_flags_are_equal(flags, fsp_flags) + err = flags == fsp_flags ? DB_SUCCESS : DB_CORRUPTION; } } else { @@ -728,7 +725,7 @@ btr_page_free_low( offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap); - uint size = rec_offs_data_size(offsets); + ulint size = rec_offs_data_size(offsets); memset(rec, 0, size); rec = page_rec_get_next(rec); cnt++; @@ -893,7 +890,7 @@ btr_page_get_father_node_ptr_func( ulint latch_mode,/*!< in: BTR_CONT_MODIFY_TREE or BTR_CONT_SEARCH_TREE */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mtr */ { dtuple_t* tuple; @@ -2399,7 +2396,7 @@ btr_insert_on_non_leaf_level_func( ulint level, /*!< in: level, must be > 0 */ dtuple_t* tuple, /*!< in: the record to be inserted */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mtr */ { big_rec_t* dummy_big_rec; diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index 87d88cea820..06b5b66c2aa 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -3,7 +3,7 @@ Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2015, 2016, MariaDB Corporation. +Copyright (c) 2015, 2017, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -105,22 +105,24 @@ throughput clearly from about 100000. */ #define BTR_CUR_FINE_HISTORY_LENGTH 100000 /** Number of searches down the B-tree in btr_cur_search_to_nth_level(). */ -ulint btr_cur_n_non_sea = 0; -/** Number of successful adaptive hash index lookups in -btr_cur_search_to_nth_level(). */ -ulint btr_cur_n_sea = 0; +ulint btr_cur_n_non_sea; /** Old value of btr_cur_n_non_sea. Copied by srv_refresh_innodb_monitor_stats(). Referenced by srv_printf_innodb_monitor(). */ -ulint btr_cur_n_non_sea_old = 0; +ulint btr_cur_n_non_sea_old; +#ifdef BTR_CUR_HASH_ADAPT +/** Number of successful adaptive hash index lookups in +btr_cur_search_to_nth_level(). */ +ulint btr_cur_n_sea; /** Old value of btr_cur_n_sea. Copied by srv_refresh_innodb_monitor_stats(). Referenced by srv_printf_innodb_monitor(). */ -ulint btr_cur_n_sea_old = 0; +ulint btr_cur_n_sea_old; +#endif /* BTR_CUR_HASH_ADAPT */ #ifdef UNIV_DEBUG /* Flag to limit optimistic insert records */ -uint btr_cur_limit_optimistic_insert_debug = 0; +uint btr_cur_limit_optimistic_insert_debug; #endif /* UNIV_DEBUG */ /** In the optimistic insert, if the insert does not fit, but this much space @@ -146,7 +148,7 @@ can be released by page reorganize, then it is reorganized */ @param not_empty table not empty @return estimated table wide stats from sampled value */ #define BTR_TABLE_STATS_FROM_SAMPLE(value, index, sample, ext_size, not_empty) \ - (((value) * static_cast(index->stat_n_leaf_pages) \ + (((value) * static_cast(index->stat_n_leaf_pages) \ + (sample) - 1 + (ext_size) + (not_empty)) / ((sample) + (ext_size))) /* @} */ @@ -412,7 +414,7 @@ btr_cur_optimistic_latch_leaves( ulint* latch_mode, btr_cur_t* cursor, const char* file, - ulint line, + unsigned line, mtr_t* mtr) { ulint mode; @@ -745,7 +747,7 @@ btr_cur_search_to_nth_level( caller currently has on search system: RW_S_LATCH, or 0 */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr, /*!< in: mtr */ ib_uint64_t autoinc)/*!< in: PAGE_ROOT_AUTO_INC to be written (0 if none) */ @@ -953,7 +955,7 @@ btr_cur_search_to_nth_level( if (has_search_latch) { /* Release possible search latch to obey latching order */ - rw_lock_s_unlock(btr_get_search_latch(index)); + btr_search_s_unlock(index); } /* Store the position of the tree latch we push to mtr so that we @@ -1477,6 +1479,7 @@ retry_page_get: cursor->low_match = DICT_INDEX_SPATIAL_NODEPTR_SIZE + 1; } +#ifdef BTR_CUR_HASH_ADAPT } else if (height == 0 && btr_search_enabled && !dict_index_is_spatial(index)) { /* The adaptive hash index is only used when searching @@ -1486,6 +1489,7 @@ retry_page_get: page_cur_search_with_match_bytes( block, index, tuple, page_mode, &up_match, &up_bytes, &low_match, &low_bytes, page_cursor); +#endif /* BTR_CUR_HASH_ADAPT */ } else { /* Search for complete index fields. */ up_bytes = low_bytes = 0; @@ -1966,7 +1970,7 @@ need_opposite_intention: index, autoinc, mtr, false); } -#ifdef BTR_CUR_ADAPT +#ifdef BTR_CUR_HASH_ADAPT /* We do a dirty read of btr_search_enabled here. We will properly check btr_search_enabled again in btr_search_build_page_hash_index() before building a @@ -1978,7 +1982,7 @@ need_opposite_intention: ) { btr_search_info_update(index, cursor); } -#endif +#endif /* BTR_CUR_HASH_ADAPT */ ut_ad(cursor->up_match != ULINT_UNDEFINED || mode != PAGE_CUR_GE); ut_ad(cursor->up_match != ULINT_UNDEFINED @@ -2014,8 +2018,7 @@ func_exit: } if (has_search_latch) { - - rw_lock_s_lock(btr_get_search_latch(index)); + btr_search_s_lock(index); } if (mbr_adj) { @@ -2039,7 +2042,7 @@ btr_cur_open_at_index_side_func( ulint level, /*!< in: level to search for (0=leaf). */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in/out: mini-transaction */ { page_cur_t* page_cursor; @@ -2411,7 +2414,7 @@ btr_cur_open_at_rnd_pos_func( ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ btr_cur_t* cursor, /*!< in/out: B-tree cursor */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mtr */ { page_cur_t* page_cursor; @@ -3012,18 +3015,10 @@ fail_err: page_cursor = btr_cur_get_page_cur(cursor); -#ifdef UNIV_DEBUG - { - rec_printer p(entry); - DBUG_PRINT("ib_cur", ("insert %s (" IB_ID_FMT ") by " IB_ID_FMT " %s", - index->name(), index->id, - thr != NULL - ? trx_get_id_for_print(thr_get_trx(thr)) - : 0, - p.str().c_str())); - } -#endif - + DBUG_LOG("ib_cur", + "insert " << index->name << " (" << index->id << ") by " + << ib::hex(thr ? trx_get_id_for_print(thr_get_trx(thr)) : 0) + << ' ' << rec_printer(entry).str()); DBUG_EXECUTE_IF("do_page_reorganize", btr_page_reorganize(page_cursor, index, mtr);); @@ -3048,12 +3043,12 @@ fail_err: if (*rec) { } else if (page_size.is_compressed()) { + ut_ad(!dict_table_is_temporary(index->table)); /* 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) - && !dict_table_is_temporary(index->table)) { + && !dict_index_is_clust(index)) { ibuf_reset_free_bits(block); } @@ -3279,12 +3274,12 @@ btr_cur_pessimistic_insert( } } -#ifdef BTR_CUR_ADAPT +#ifdef BTR_CUR_HASH_ADAPT # ifdef MYSQL_INDEX_DISABLE_AHI if (index->disable_ahi); else # endif btr_search_update_hash_on_insert(cursor); -#endif +#endif /* BTR_CUR_HASH_ADAPT */ if (inherit && !(flags & BTR_NO_LOCKING_FLAG)) { lock_update_insert(btr_cur_get_block(cursor), *rec); @@ -3617,7 +3612,6 @@ btr_cur_update_in_place( rec_t* rec; roll_ptr_t roll_ptr = 0; ulint was_delete_marked; - ibool is_hashed; rec = btr_cur_get_rec(cursor); index = cursor->index; @@ -3629,26 +3623,24 @@ btr_cur_update_in_place( ut_ad(dict_index_is_online_ddl(index) == !!(flags & BTR_CREATE_FLAG) || dict_index_is_clust(index)); ut_ad(thr_get_trx(thr)->id == trx_id - || (flags & ~(BTR_KEEP_POS_FLAG | BTR_KEEP_IBUF_BITMAP)) + || (flags & ulint(~(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_index_page_check(btr_cur_get_page(cursor))); ut_ad(btr_page_get_index_id(btr_cur_get_page(cursor)) == index->id); -#ifdef UNIV_DEBUG - { - rec_printer p(rec, offsets); - DBUG_PRINT("ib_cur", ("update-in-place %s (" IB_ID_FMT ") by "IB_ID_FMT ": %s", - index->name(), index->id, trx_id, - p.str().c_str())); - } -#endif + DBUG_LOG("ib_cur", + "update-in-place " << index->name << " (" << index->id + << ") by " << ib::hex(trx_id) << ": " + << rec_printer(rec, offsets).str()); block = btr_cur_get_block(cursor); page_zip = buf_block_get_page_zip(block); /* Check that enough space is available on the compressed page. */ if (page_zip) { + ut_ad(!dict_table_is_temporary(index->table)); + if (!btr_cur_update_alloc_zip( page_zip, btr_cur_get_page_cur(cursor), index, offsets, rec_offs_size(offsets), @@ -3678,9 +3670,8 @@ btr_cur_update_in_place( was_delete_marked = rec_get_deleted_flag( rec, page_is_comp(buf_block_get_frame(block))); - is_hashed = (block->index != NULL); - - if (is_hashed) { +#ifdef BTR_CUR_HASH_ADAPT + if (block->index) { /* TO DO: Can we skip this if none of the fields index->search_info->curr_n_fields are being updated? */ @@ -3697,14 +3688,17 @@ btr_cur_update_in_place( btr_search_update_hash_on_delete(cursor); } - rw_lock_x_lock(btr_get_search_latch(index)); + btr_search_x_lock(index); } +#endif /* BTR_CUR_HASH_ADAPT */ row_upd_rec_in_place(rec, index, offsets, update, page_zip); - if (is_hashed) { - rw_lock_x_unlock(btr_get_search_latch(index)); +#ifdef BTR_CUR_HASH_ADAPT + if (block->index) { + btr_search_x_unlock(index); } +#endif /* BTR_CUR_HASH_ADAPT */ btr_cur_update_in_place_log(flags, rec, index, update, trx_id, roll_ptr, mtr); @@ -3725,9 +3719,9 @@ func_exit: if (page_zip && !(flags & BTR_KEEP_IBUF_BITMAP) && !dict_index_is_clust(index) - && !dict_table_is_temporary(index->table) && page_is_leaf(buf_block_get_frame(block))) { /* Update the free bits in the insert buffer. */ + ut_ad(!dict_table_is_temporary(index->table)); ibuf_update_free_bits_zip(block, mtr); } @@ -3796,7 +3790,7 @@ btr_cur_optimistic_update( ut_ad(dict_index_is_online_ddl(index) == !!(flags & BTR_CREATE_FLAG) || dict_index_is_clust(index)); ut_ad(thr_get_trx(thr)->id == trx_id - || (flags & ~(BTR_KEEP_POS_FLAG | BTR_KEEP_IBUF_BITMAP)) + || (flags & ulint(~(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_index_page_check(page)); @@ -3840,14 +3834,10 @@ any_extern: } } -#ifdef UNIV_DEBUG - { - rec_printer p(rec, *offsets); - DBUG_PRINT("ib_cur", ("update %s (" IB_ID_FMT ") by " IB_ID_FMT ": %s", - index->name(), index->id, trx_id, - p.str().c_str())); - } -#endif + DBUG_LOG("ib_cur", + "update " << index->name << " (" << index->id << ") by " + << ib::hex(trx_id) << ": " + << rec_printer(rec, *offsets).str()); page_cursor = btr_cur_get_page_cur(cursor); @@ -3876,6 +3866,8 @@ any_extern: #endif /* UNIV_ZIP_DEBUG */ if (page_zip) { + ut_ad(!dict_table_is_temporary(index->table)); + if (page_zip_rec_needs_ext(new_rec_size, page_is_comp(page), dict_index_get_n_fields(index), dict_table_page_size(index->table))) { @@ -3994,12 +3986,12 @@ any_extern: func_exit: if (!(flags & BTR_KEEP_IBUF_BITMAP) - && !dict_index_is_clust(index) - && !dict_table_is_temporary(index->table)) { + && !dict_index_is_clust(index)) { /* Update the free bits in the insert buffer. */ if (page_zip) { + ut_ad(!dict_table_is_temporary(index->table)); ibuf_update_free_bits_zip(block, mtr); - } else { + } else if (!dict_table_is_temporary(index->table)) { ibuf_update_free_bits_low(block, max_ins_size, mtr); } } @@ -4123,6 +4115,7 @@ btr_cur_pessimistic_update( #ifdef UNIV_ZIP_DEBUG ut_a(!page_zip || page_zip_validate(page_zip, page, index)); #endif /* UNIV_ZIP_DEBUG */ + ut_ad(!page_zip || !dict_table_is_temporary(index->table)); /* The insert buffer tree should never be updated in place. */ ut_ad(!dict_index_is_ibuf(index)); ut_ad(trx_id > 0 @@ -4130,7 +4123,7 @@ btr_cur_pessimistic_update( ut_ad(dict_index_is_online_ddl(index) == !!(flags & BTR_CREATE_FLAG) || dict_index_is_clust(index)); ut_ad(thr_get_trx(thr)->id == trx_id - || (flags & ~BTR_KEEP_POS_FLAG) + || (flags & ulint(~BTR_KEEP_POS_FLAG)) == (BTR_NO_UNDO_LOG_FLAG | BTR_NO_LOCKING_FLAG | BTR_CREATE_FLAG | BTR_KEEP_SYS_FLAG)); @@ -4153,8 +4146,8 @@ btr_cur_pessimistic_update( if (page_zip && optim_err != DB_ZIP_OVERFLOW && !dict_index_is_clust(index) - && !dict_table_is_temporary(index->table) && page_is_leaf(page)) { + ut_ad(!dict_table_is_temporary(index->table)); ibuf_update_free_bits_zip(block, mtr); } @@ -4203,7 +4196,6 @@ btr_cur_pessimistic_update( ut_ad(thr_get_trx(thr)->in_rollback); DBUG_EXECUTE_IF("ib_blob_update_rollback", DBUG_SUICIDE();); - RECOVERY_CRASH(99); btr_rec_free_updated_extern_fields( index, rec, page_zip, *offsets, update, true, mtr); @@ -4327,14 +4319,14 @@ btr_cur_pessimistic_update( page_cursor->rec, index, *offsets); } } else if (!dict_index_is_clust(index) - && !dict_table_is_temporary(index->table) && 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. */ if (page_zip) { + ut_ad(!dict_table_is_temporary(index->table)); ibuf_update_free_bits_zip(block, mtr); - } else { + } else if (!dict_table_is_temporary(index->table)) { ibuf_update_free_bits_low(block, max_ins_size, mtr); } @@ -4665,15 +4657,11 @@ btr_cur_del_mark_set_clust_rec( ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE)); ut_ad(!trx->in_rollback); -#ifdef UNIV_DEBUG - { - rec_printer p(rec, offsets); - DBUG_PRINT("ib_cur", ("delete-mark clust %s (" IB_ID_FMT ") by " IB_ID_FMT ": %s", - index->table_name, index->id, - trx_get_id_for_print(trx), - p.str().c_str())); - } -#endif + DBUG_LOG("ib_cur", + "delete-mark clust " << index->table->name + << " (" << index->id << ") by " + << ib::hex(trx_get_id_for_print(trx)) << ": " + << rec_printer(rec, offsets).str()); if (dict_index_is_online_ddl(index)) { row_log_table_delete(rec, entry, index, offsets, NULL); @@ -6243,12 +6231,12 @@ btr_cur_set_ownership_of_extern_field( byte_val = mach_read_from_1(data + local_len + BTR_EXTERN_LEN); if (val) { - byte_val = byte_val & (~BTR_EXTERN_OWNER_FLAG); + byte_val &= ~BTR_EXTERN_OWNER_FLAG; } else { #if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG ut_a(!(byte_val & BTR_EXTERN_OWNER_FLAG)); #endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */ - byte_val = byte_val | BTR_EXTERN_OWNER_FLAG; + byte_val |= BTR_EXTERN_OWNER_FLAG; } if (page_zip) { diff --git a/storage/innobase/btr/btr0defragment.cc b/storage/innobase/btr/btr0defragment.cc index 7f06aed9ff0..8c4f27cc78a 100644 --- a/storage/innobase/btr/btr0defragment.cc +++ b/storage/innobase/btr/btr0defragment.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (C) 2013, 2014 Facebook, Inc. All Rights Reserved. -Copyright (C) 2014, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (C) 2014, 2017, MariaDB Corporation. This 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 @@ -696,8 +696,8 @@ btr_defragment_n_pages( (data_size_per_rec * srv_defragment_fill_factor_n_recs)); optimal_page_size -= reserved_space; - n_new_slots = (total_data_size + optimal_page_size - 1) - / optimal_page_size; + n_new_slots = uint((total_data_size + optimal_page_size - 1) + / optimal_page_size); if (n_new_slots >= n_pages) { /* Can't defragment. */ if (end_of_index) diff --git a/storage/innobase/btr/btr0pcur.cc b/storage/innobase/btr/btr0pcur.cc index 377a332bd9f..741f16e0df4 100644 --- a/storage/innobase/btr/btr0pcur.cc +++ b/storage/innobase/btr/btr0pcur.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. +Copyright (c) 2016, 2017, MariaDB Corporation. This 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 @@ -120,24 +120,17 @@ btr_pcur_store_position( page = page_align(rec); offs = page_offset(rec); -#ifdef UNIV_DEBUG - if (dict_index_is_spatial(index)) { - /* For spatial index, when we do positioning on parent - buffer if necessary, it might not hold latches, but the - tree must be locked to prevent change on the page */ - ut_ad((mtr_memo_contains_flagged( - mtr, dict_index_get_lock(index), - MTR_MEMO_X_LOCK | MTR_MEMO_SX_LOCK) - || mtr_memo_contains_flagged(mtr, block, - MTR_MEMO_PAGE_S_FIX - | MTR_MEMO_PAGE_X_FIX)) - && (block->page.buf_fix_count > 0)); - } else { - ut_ad(mtr_memo_contains_flagged(mtr, block, - MTR_MEMO_PAGE_S_FIX - | MTR_MEMO_PAGE_X_FIX)); - } -#endif /* UNIV_DEBUG */ + ut_ad(block->page.buf_fix_count); + /* For spatial index, when we do positioning on parent + buffer if necessary, it might not hold latches, but the + tree must be locked to prevent change on the page */ + ut_ad(mtr_memo_contains_flagged(mtr, block, + MTR_MEMO_PAGE_S_FIX + | MTR_MEMO_PAGE_X_FIX) + || (dict_index_is_spatial(index) + && mtr_memo_contains_flagged( + mtr, dict_index_get_lock(index), + MTR_MEMO_X_LOCK | MTR_MEMO_SX_LOCK))); if (page_is_empty(page)) { /* It must be an empty index tree; NOTE that in this case @@ -236,7 +229,7 @@ btr_pcur_restore_position_func( ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ btr_pcur_t* cursor, /*!< in: detached persistent cursor */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mtr */ { dict_index_t* index; @@ -593,7 +586,7 @@ btr_pcur_open_on_user_rec_func( btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mtr */ { btr_pcur_open_low(index, 0, tuple, mode, latch_mode, cursor, diff --git a/storage/innobase/btr/btr0scrub.cc b/storage/innobase/btr/btr0scrub.cc index f361a9d8b1e..e2670521cf3 100644 --- a/storage/innobase/btr/btr0scrub.cc +++ b/storage/innobase/btr/btr0scrub.cc @@ -121,8 +121,8 @@ bool btr_scrub_lock_dict_func(ulint space, bool lock_to_close_table, const char * file, uint line) { - uint start = time(0); - uint last = start; + time_t start = time(0); + time_t last = start; while (mutex_enter_nowait(&(dict_sys->mutex))) { /* if we lock to close a table, we wait forever @@ -136,10 +136,11 @@ btr_scrub_lock_dict_func(ulint space, bool lock_to_close_table, } os_thread_sleep(250000); - uint now = time(0); + time_t now = time(0); + if (now >= last + 30) { fprintf(stderr, - "WARNING: %s:%u waited %u seconds for" + "WARNING: %s:%u waited %lu seconds for" " dict_sys lock, space: %lu" " lock_to_close_table: %u\n", file, line, now - start, space, @@ -253,11 +254,10 @@ btr_page_needs_scrubbing( return BTR_SCRUB_SKIP_PAGE_AND_CLOSE_TABLE; } - page_t* page = buf_block_get_frame(block); - uint type = fil_page_get_type(page); + const page_t* page = buf_block_get_frame(block); if (allocated == BTR_SCRUB_PAGE_ALLOCATED) { - if (type != FIL_PAGE_INDEX) { + if (fil_page_get_type(page) != FIL_PAGE_INDEX) { /* this function is called from fil-crypt-threads. * these threads iterate all pages of all tablespaces * and don't know about fil_page_type. @@ -274,7 +274,7 @@ btr_page_needs_scrubbing( return BTR_SCRUB_SKIP_PAGE_AND_CLOSE_TABLE; } - if (page_has_garbage(page) == false) { + if (!page_has_garbage(page)) { /* no garbage (from deleted/shrunken records) */ return BTR_SCRUB_SKIP_PAGE_AND_CLOSE_TABLE; } @@ -282,11 +282,12 @@ btr_page_needs_scrubbing( } else if (allocated == BTR_SCRUB_PAGE_FREE || allocated == BTR_SCRUB_PAGE_ALLOCATION_UNKNOWN) { - if (! (type == FIL_PAGE_INDEX || - type == FIL_PAGE_TYPE_BLOB || - type == FIL_PAGE_TYPE_ZBLOB || - type == FIL_PAGE_TYPE_ZBLOB2)) { - + switch (fil_page_get_type(page)) { + case FIL_PAGE_INDEX: + case FIL_PAGE_TYPE_ZBLOB: + case FIL_PAGE_TYPE_ZBLOB2: + break; + default: /** * If this is a dropped page, we also need to scrub * BLOB pages @@ -298,7 +299,8 @@ btr_page_needs_scrubbing( } } - if (btr_page_get_index_id(page) == IBUF_INDEX_ID) { + if (block->page.id.space() == TRX_SYS_SPACE + && btr_page_get_index_id(page) == IBUF_INDEX_ID) { /* skip ibuf */ return BTR_SCRUB_SKIP_PAGE_AND_CLOSE_TABLE; } diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc index 0af2a8b637c..86827fabdd4 100644 --- a/storage/innobase/btr/btr0sea.cc +++ b/storage/innobase/btr/btr0sea.cc @@ -2,6 +2,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. +Copyright (c) 2017, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -31,6 +32,7 @@ Created 2/17/1996 Heikki Tuuri *************************************************************************/ #include "btr0sea.h" +#ifdef BTR_CUR_HASH_ADAPT #ifdef UNIV_NONINL #include "btr0sea.ic" #endif /* UNIV_NOINL */ @@ -375,43 +377,6 @@ btr_search_enable() btr_search_x_unlock_all(); } -/** Creates and initializes a search info struct. -@param[in] heap heap where created. -@return own: search info struct */ -btr_search_t* -btr_search_info_create(mem_heap_t* heap) -{ - btr_search_t* info; - - info = (btr_search_t*) mem_heap_alloc(heap, sizeof(btr_search_t)); - - ut_d(info->magic_n = BTR_SEARCH_MAGIC_N); - - info->ref_count = 0; - info->root_guess = NULL; - info->withdraw_clock = 0; - - info->hash_analysis = 0; - info->n_hash_potential = 0; - - info->last_hash_succ = FALSE; - -#ifdef UNIV_SEARCH_PERF_STAT - info->n_hash_succ = 0; - info->n_hash_fail = 0; - info->n_patt_succ = 0; - info->n_searches = 0; -#endif /* UNIV_SEARCH_PERF_STAT */ - - /* Set some sensible values */ - info->n_fields = 1; - info->n_bytes = 0; - - info->left_side = TRUE; - - return(info); -} - /** Returns the value of ref_count. The value is protected by latch. @param[in] info search info @param[in] index index identifier @@ -1583,9 +1548,9 @@ btr_search_build_page_hash_index( block->n_hash_helps = 0; - block->curr_n_fields = n_fields; - block->curr_n_bytes = n_bytes; - block->curr_left_side = left_side; + block->curr_n_fields = unsigned(n_fields); + block->curr_n_bytes = unsigned(n_bytes); + block->curr_left_side = unsigned(left_side); block->index = index; for (i = 0; i < n_cached; i++) { @@ -2177,3 +2142,4 @@ btr_search_validate() } #endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 935b7fadafa..a1827e7b3b5 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -2,7 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -35,6 +35,7 @@ Created 11/5/1995 Heikki Tuuri #include "page0size.h" #include "buf0buf.h" +#include "os0api.h" #ifdef UNIV_NONINL #include "buf0buf.ic" @@ -85,7 +86,7 @@ Created 11/5/1995 Heikki Tuuri #include "lzo/lzo1x.h" #endif -#if defined(HAVE_LIBNUMA) && defined(WITH_NUMA) +#ifdef HAVE_LIBNUMA #include #include struct set_numa_interleave_t @@ -126,12 +127,7 @@ struct set_numa_interleave_t #define NUMA_MEMPOLICY_INTERLEAVE_IN_SCOPE set_numa_interleave_t scoped_numa #else #define NUMA_MEMPOLICY_INTERLEAVE_IN_SCOPE -#endif /* HAVE_LIBNUMA && WITH_NUMA */ - -/* Enable this for checksum error messages. */ -//#ifdef UNIV_DEBUG -//#define UNIV_DEBUG_LEVEL2 1 -//#endif +#endif /* HAVE_LIBNUMA */ /* IMPLEMENTATION OF THE BUFFER POOL @@ -661,12 +657,10 @@ buf_page_is_checksum_valid_crc32( } invalid: -#ifdef UNIV_DEBUG_LEVEL2 - ib::info() << "Page checksum crc32 not valid" + DBUG_LOG("checksum", "Page checksum crc32 not valid" << " field1 " << checksum_field1 << " field2 " << checksum_field2 - << " crc32 " << crc32; -#endif + << " crc32 " << crc32); return(false); } @@ -738,13 +732,13 @@ buf_page_is_checksum_valid_innodb( if (checksum_field2 != mach_read_from_4(read_buf + FIL_PAGE_LSN) && checksum_field2 != old_checksum) { -#ifdef UNIV_DEBUG_LEVEL2 - ib::info() << "Page checksum crc32 not valid" - << " field1 " << checksum_field1 - << " field2 " << checksum_field2 - << " crc32 " << buf_calc_page_old_checksum(read_buf) - << " lsn " << mach_read_from_4(read_buf + FIL_PAGE_LSN); -#endif + DBUG_LOG("checksum", + "Page checksum crc32 not valid" + << " field1 " << checksum_field1 + << " field2 " << checksum_field2 + << " crc32 " << buf_calc_page_old_checksum(read_buf) + << " lsn " << mach_read_from_4( + read_buf + FIL_PAGE_LSN)); return(false); } @@ -754,13 +748,13 @@ buf_page_is_checksum_valid_innodb( (always equal to 0), to FIL_PAGE_SPACE_OR_CHKSUM */ if (checksum_field1 != 0 && checksum_field1 != new_checksum) { -#ifdef UNIV_DEBUG_LEVEL2 - ib::info() << "Page checksum crc32 not valid" - << " field1 " << checksum_field1 - << " field2 " << checksum_field2 - << " crc32 " << buf_calc_page_new_checksum(read_buf) - << " lsn " << mach_read_from_4(read_buf + FIL_PAGE_LSN); -#endif + DBUG_LOG("checksum", + "Page checksum crc32 not valid" + << " field1 " << checksum_field1 + << " field2 " << checksum_field2 + << " crc32 " << buf_calc_page_new_checksum(read_buf) + << " lsn " << mach_read_from_4( + read_buf + FIL_PAGE_LSN)); return(false); } @@ -790,13 +784,16 @@ buf_page_is_checksum_valid_none( #endif /* UNIV_INNOCHECKSUM */ ) { -#ifdef UNIV_DEBUG_LEVEL2 - if (!(checksum_field1 == checksum_field2 || checksum_field1 == BUF_NO_CHECKSUM_MAGIC)) { - ib::info() << "Page checksum crc32 not valid" - << " field1 " << checksum_field1 - << " field2 " << checksum_field2 - << " crc32 " << BUF_NO_CHECKSUM_MAGIC - << " lsn " << mach_read_from_4(read_buf + FIL_PAGE_LSN); +#ifndef DBUG_OFF + if (checksum_field1 != checksum_field2 + && checksum_field1 != BUF_NO_CHECKSUM_MAGIC) { + DBUG_LOG("checksum", + "Page checksum crc32 not valid" + << " field1 " << checksum_field1 + << " field2 " << checksum_field2 + << " crc32 " << BUF_NO_CHECKSUM_MAGIC + << " lsn " << mach_read_from_4(read_buf + + FIL_PAGE_LSN)); } #endif @@ -844,11 +841,15 @@ buf_page_is_corrupted( { ulint checksum_field1; ulint checksum_field2; - bool page_encrypted = false; + bool no_checksum = false; -#ifndef UNIV_INNOCHECKSUM // FIXME see also encryption.innochecksum test +#ifndef UNIV_INNOCHECKSUM ulint space_id = mach_read_from_4( read_buf + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); + ulint page_type = mach_read_from_4( + read_buf + FIL_PAGE_TYPE); + no_checksum = (page_type == FIL_PAGE_PAGE_COMPRESSED || + page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED); fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space_id); /* Page is encrypted if encryption information is found from @@ -857,13 +858,23 @@ buf_page_is_corrupted( if (crypt_data && crypt_data->type != CRYPT_SCHEME_UNENCRYPTED && fil_page_is_encrypted(read_buf)) { - page_encrypted = true; + no_checksum = true; } + + /* Return early if there is no checksum or END_LSN */ + if (no_checksum) { + return (FALSE); + } +#else + if (mach_read_from_4(read_buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION) != 0 + || mach_read_from_2(read_buf+FIL_PAGE_TYPE) == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED) { + no_checksum= true; + } + #endif + DBUG_EXECUTE_IF("buf_page_import_corrupt_failure", return(TRUE); ); - DBUG_EXECUTE_IF("buf_page_is_corrupt_failure", return(TRUE); ); - - if (!page_encrypted && !page_size.is_compressed() + if (!no_checksum && !page_size.is_compressed() && memcmp(read_buf + FIL_PAGE_LSN + 4, read_buf + page_size.logical() - FIL_PAGE_END_LSN_OLD_CHKSUM + 4, 4)) { @@ -931,9 +942,6 @@ buf_page_is_corrupted( page_size.physical())); #endif /* UNIV_INNOCHECKSUM */ } - if (page_encrypted) { - return (FALSE); - } checksum_field1 = mach_read_from_4( read_buf + FIL_PAGE_SPACE_OR_CHKSUM); @@ -993,7 +1001,6 @@ buf_page_is_corrupted( read_buf + FIL_PAGE_OFFSET)); #endif /* UNIV_INNOCHECKSUM */ - DBUG_EXECUTE_IF("buf_page_import_corrupt_failure", return(TRUE); ); const srv_checksum_algorithm_t curr_algo = static_cast(srv_checksum_algorithm); @@ -1529,7 +1536,9 @@ buf_block_init( ut_d(block->page.file_page_was_freed = FALSE); +#ifdef BTR_CUR_HASH_ADAPT block->index = NULL; +#endif /* BTR_CUR_HASH_ADAPT */ block->skip_flush_check = false; ut_d(block->page.in_page_hash = FALSE); @@ -1540,9 +1549,11 @@ buf_block_init( ut_d(block->in_unzip_LRU_list = FALSE); ut_d(block->in_withdraw_list = FALSE); -#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG block->n_pointers = 0; -#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ +# endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ page_zip_des_init(&block->page.zip); mutex_create(LATCH_ID_BUF_BLOCK_MUTEX, &block->mutex); @@ -1608,7 +1619,7 @@ buf_chunk_init( return(NULL); } -#if defined(HAVE_LIBNUMA) && defined(WITH_NUMA) +#ifdef HAVE_LIBNUMA if (srv_numa_interleave) { struct bitmask *numa_mems_allowed = numa_get_mems_allowed(); int st = mbind(chunk->mem, chunk->mem_size(), @@ -1622,7 +1633,7 @@ buf_chunk_init( " (error: " << strerror(errno) << ")."; } } -#endif /* HAVE_LIBNUMA && WITH_NUMA */ +#endif /* HAVE_LIBNUMA */ /* Allocate the block descriptors from @@ -1943,7 +1954,8 @@ buf_pool_init_instance( buf_pool->watch = (buf_page_t*) ut_zalloc_nokey( sizeof(*buf_pool->watch) * BUF_POOL_WATCH_SIZE); for (i = 0; i < BUF_POOL_WATCH_SIZE; i++) { - buf_pool->watch[i].buf_pool_index = buf_pool->instance_no; + buf_pool->watch[i].buf_pool_index + = unsigned(buf_pool->instance_no); } /* All fields are initialized by ut_zalloc_nokey(). */ @@ -1966,7 +1978,7 @@ buf_pool_init_instance( /* Initialize the temporal memory array and slots */ buf_pool->tmp_arr = (buf_tmp_array_t *)ut_malloc_nokey(sizeof(buf_tmp_array_t)); memset(buf_pool->tmp_arr, 0, sizeof(buf_tmp_array_t)); - ulint n_slots = srv_n_read_io_threads * srv_n_write_io_threads * (8 * OS_AIO_N_PENDING_IOS_PER_THREAD); + ulint n_slots = (srv_n_read_io_threads + srv_n_write_io_threads) * (8 * OS_AIO_N_PENDING_IOS_PER_THREAD); buf_pool->tmp_arr->n_slots = n_slots; buf_pool->tmp_arr->slots = (buf_tmp_buffer_t*)ut_malloc_nokey(sizeof(buf_tmp_buffer_t) * n_slots); memset(buf_pool->tmp_arr->slots, 0, (sizeof(buf_tmp_buffer_t) * n_slots)); @@ -1997,6 +2009,11 @@ buf_pool_free_instance( mutex_free(&buf_pool->zip_mutex); mutex_free(&buf_pool->flush_list_mutex); + if (buf_pool->flush_rbt) { + rbt_free(buf_pool->flush_rbt); + buf_pool->flush_rbt = NULL; + } + for (bpage = UT_LIST_GET_LAST(buf_pool->LRU); bpage != NULL; bpage = prev_bpage) { @@ -2248,11 +2265,13 @@ buf_page_realloc( /* set other flags of buf_block_t */ +#ifdef BTR_CUR_HASH_ADAPT ut_ad(!block->index); new_block->index = NULL; new_block->n_hash_helps = 0; new_block->n_fields = 1; new_block->left_side = TRUE; +#endif /* BTR_CUR_HASH_ADAPT */ new_block->lock_hash_val = block->lock_hash_val; ut_ad(new_block->lock_hash_val == lock_rec_hash( @@ -2714,7 +2733,7 @@ buf_pool_resize() buf_pool_mutex_exit(buf_pool); } - +#ifdef BTR_CUR_HASH_ADAPT /* disable AHI if needed */ bool btr_search_disabled = false; @@ -2733,6 +2752,7 @@ buf_pool_resize() if (btr_search_disabled) { ib::info() << "disabled adaptive hash index."; } +#endif /* BTR_CUR_HASH_ADAPT */ /* set withdraw target */ for (ulint i = 0; i < srv_buf_pool_instances; i++) { @@ -3104,7 +3124,10 @@ calc_buf_pool_size: dict_resize(); ib::info() << "Resized hash tables at lock_sys," - " adaptive hash index, dictionary."; +#ifdef BTR_CUR_HASH_ADAPT + " adaptive hash index," +#endif /* BTR_CUR_HASH_ADAPT */ + " dictionary."; } /* normalize ibuf->max_size */ @@ -3118,11 +3141,13 @@ calc_buf_pool_size: srv_buf_pool_old_size = srv_buf_pool_size; } +#ifdef BTR_CUR_HASH_ADAPT /* enable AHI if needed */ if (btr_search_disabled) { btr_search_enable(); ib::info() << "Re-enabled adaptive hash index."; } +#endif /* BTR_CUR_HASH_ADAPT */ char now[32]; @@ -3144,18 +3169,14 @@ calc_buf_pool_size: /** This is the thread for resizing buffer pool. It waits for an event and when waked up either performs a resizing and sleeps again. -@param[in] arg a dummy parameter required by os_thread_create. @return this function does not return, calls os_thread_exit() */ extern "C" os_thread_ret_t -DECLARE_THREAD(buf_resize_thread)( - void* arg MY_ATTRIBUTE((unused))) +DECLARE_THREAD(buf_resize_thread)(void*) { my_thread_init(); - srv_buf_resize_thread_active = true; - while (srv_shutdown_state == SRV_SHUTDOWN_NONE) { os_event_wait(srv_buf_resize_event); os_event_reset(srv_buf_resize_event); @@ -3188,11 +3209,10 @@ DECLARE_THREAD(buf_resize_thread)( OS_THREAD_DUMMY_RETURN; } -/********************************************************************//** -Clears the adaptive hash index on all pages in the buffer pool. */ +#ifdef BTR_CUR_HASH_ADAPT +/** Clear the adaptive hash index on all pages in the buffer pool. */ void -buf_pool_clear_hash_index(void) -/*===========================*/ +buf_pool_clear_hash_index() { ulint p; @@ -3229,6 +3249,7 @@ buf_pool_clear_hash_index(void) } } } +#endif /* BTR_CUR_HASH_ADAPT */ /********************************************************************//** Relocate a buffer control block. Relocates the block on the LRU list @@ -3465,12 +3486,6 @@ page_found: buf_pool->watch[]. However, it is not in the critical code path as this function will be called only by the purge thread. */ -/* Enable this for checksum error messages. Currently on by -default on UNIV_DEBUG for encryption bugs. */ -#ifdef UNIV_DEBUG -#define UNIV_DEBUG_LEVEL2 1 -#endif - /* To obey latching order first release the hash_lock. */ rw_lock_x_unlock(*hash_lock); @@ -3918,13 +3933,15 @@ buf_block_init_low( /*===============*/ buf_block_t* block) /*!< in: block to init */ { - block->index = NULL; block->skip_flush_check = false; +#ifdef BTR_CUR_HASH_ADAPT + block->index = NULL; block->n_hash_helps = 0; block->n_fields = 1; block->n_bytes = 0; block->left_side = TRUE; +#endif /* BTR_CUR_HASH_ADAPT */ } /********************************************************************//** @@ -3996,6 +4013,7 @@ buf_zip_decompress( return(FALSE); } +#ifdef BTR_CUR_HASH_ADAPT /** Get a buffer block from an adaptive hash index pointer. This function does not return if the block is not identified. @param[in] ptr pointer to within a page frame @@ -4038,6 +4056,7 @@ buf_block_from_ahi(const byte* ptr) ut_ad(state == BUF_BLOCK_FILE_PAGE || state == BUF_BLOCK_REMOVE_HASH); return(block); } +#endif /* BTR_CUR_HASH_ADAPT */ /********************************************************************//** Find out if a pointer belongs to a buf_block_t. It can be a pointer to @@ -4194,7 +4213,7 @@ buf_page_get_gen( buf_block_t* guess, ulint mode, const char* file, - ulint line, + unsigned line, mtr_t* mtr, dberr_t* err) { @@ -4864,7 +4883,7 @@ buf_page_optimistic_get( buf_block_t* block, /*!< in: guessed buffer block */ ib_uint64_t modify_clock,/*!< in: modify clock value */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mini-transaction */ { buf_pool_t* buf_pool; @@ -4984,7 +5003,7 @@ buf_page_get_known_nowait( buf_block_t* block, /*!< in: the known page */ ulint mode, /*!< in: BUF_MAKE_YOUNG or BUF_KEEP_OLD */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mini-transaction */ { buf_pool_t* buf_pool; @@ -5092,7 +5111,7 @@ buf_block_t* buf_page_try_get_func( const page_id_t& page_id, const char* file, - ulint line, + unsigned line, mtr_t* mtr) { buf_block_t* block; @@ -5951,7 +5970,6 @@ buf_page_io_complete( ulint read_page_no; ulint read_space_id; byte* frame = NULL; - bool compressed_page=false; ut_ad(bpage->zip.data != NULL || ((buf_block_t*)bpage)->frame != NULL); @@ -5965,8 +5983,6 @@ buf_page_io_complete( ib::info() << "Page " << bpage->id - << " in tablespace " - << bpage->space << " encryption error key_version " << bpage->key_version; @@ -5982,12 +5998,9 @@ buf_page_io_complete( FALSE)) { buf_pool->n_pend_unzip--; - compressed_page = false; ib::info() << "Page " << bpage->id - << " in tablespace " - << bpage->space << " zip_decompress failure."; goto database_corrupted; @@ -6013,13 +6026,13 @@ buf_page_io_complete( } else if (read_space_id == 0 && read_page_no == 0) { /* This is likely an uninitialized page. */ - } else if ((bpage->id.space() != 0 + } else if ((bpage->id.space() != TRX_SYS_SPACE && bpage->id.space() != read_space_id) || bpage->id.page_no() != read_page_no) { /* We did not compare space_id to read_space_id - if bpage->space == 0, because the field on the - page may contain garbage in MySQL < 4.1.1, - which only supported bpage->space == 0. */ + in the system tablespace, because the field + was written as garbage before MySQL 4.1.1, + which did not support innodb_file_per_table. */ ib::error() << "Space id and page no stored in " "the page, read in are " @@ -6027,64 +6040,31 @@ buf_page_io_complete( << ", should be " << bpage->id; } -#ifdef MYSQL_COMPRESSION - compressed_page = Compression::is_compressed_page(frame); - - /* If the decompress failed then the most likely case is - that we are reading in a page for which this instance doesn't - support the compression algorithm. */ - if (compressed_page) { - - Compression::meta_t meta; - - Compression::deserialize_header(frame, &meta); - - ib::error() - << "Page " << bpage->id << " " - << "compressed with " - << Compression::to_string(meta) << " " - << "that is not supported by this instance"; - } -#endif /* MYSQL_COMPRESSION */ - /* From version 3.23.38 up we store the page checksum to the 4 first bytes of the page end lsn field */ - if (compressed_page - || buf_page_is_corrupted( + if (buf_page_is_corrupted( true, frame, bpage->size, fsp_is_checksum_disabled(bpage->id.space()))) { /* Not a real corruption if it was triggered by error injection */ - DBUG_EXECUTE_IF("buf_page_is_corrupt_failure", - if (bpage->space > TRX_SYS_SPACE - && buf_mark_space_corrupt(bpage)) { - ib::info() << - "Simulated page corruption"; - return(true); - } - goto page_not_corrupt_1; - ;); - /* Not a real corruption if it was triggered by - error injection */ DBUG_EXECUTE_IF( "buf_page_import_corrupt_failure", - if (bpage->id.space() > TRX_SYS_SPACE - && !Tablespace::is_undo_tablespace( - bpage->id.space()) + if (bpage->id.space() + > srv_undo_tablespaces_open + && bpage->id.space() != SRV_TMP_SPACE_ID && buf_mark_space_corrupt(bpage)) { ib::info() << "Simulated IMPORT " "corruption"; return(true); } - goto page_not_corrupt; - ;); + goto page_not_corrupt;); database_corrupted: bool corrupted = buf_page_check_corrupt(bpage); /* Compressed and encrypted pages are basically gibberish avoid printing the contents. */ - if (corrupted && !compressed_page) { + if (corrupted) { ib::error() << "Database page corruption on disk" @@ -6132,11 +6112,11 @@ database_corrupted: } ib_push_warning((void *)NULL, DB_DECRYPTION_FAILED, - "Table in tablespace %lu encrypted." + "Table in tablespace %u encrypted." "However key management plugin or used key_id %u is not found or" " used encryption algorithm or method does not match." " Can't continue opening the table.", - (ulint)bpage->space, key_version); + bpage->id.space(), key_version); buf_page_print(frame, bpage->size, BUF_PAGE_PRINT_NO_CRASH); @@ -6146,10 +6126,7 @@ database_corrupted: } DBUG_EXECUTE_IF("buf_page_import_corrupt_failure", - page_not_corrupt: bpage = bpage; ); - - DBUG_EXECUTE_IF("buf_page_is_corrupt_failure", - page_not_corrupt_1: bpage = bpage; ); + page_not_corrupt: bpage = bpage; ); if (recv_recovery_is_on()) { /* Pages must be uncompressed for crash recovery. */ @@ -6160,23 +6137,21 @@ database_corrupted: /* If space is being truncated then avoid ibuf operation. During re-init we have already freed ibuf entries. */ if (uncompressed -#ifdef MYSQL_COMPRESSION - && !Compression::is_compressed_page(frame) -#endif /* MYSQL_COMPRESSION */ && !recv_no_ibuf_operations - && !Tablespace::is_undo_tablespace(bpage->id.space()) - && bpage->id.space() != SRV_TMP_SPACE_ID + && (bpage->id.space() == 0 + || (bpage->id.space() > srv_undo_tablespaces_open + && bpage->id.space() != SRV_TMP_SPACE_ID)) && !srv_is_tablespace_truncated(bpage->id.space()) && fil_page_get_type(frame) == FIL_PAGE_INDEX && page_is_leaf(frame)) { if (bpage && bpage->encrypted) { fprintf(stderr, - "InnoDB: Warning: Table in tablespace %lu encrypted." + "InnoDB: Warning: Table in tablespace %u encrypted." "However key management plugin or used key_id %u is not found or" " used encryption algorithm or method does not match." " Can't continue opening the table.\n", - (ulint)bpage->space, bpage->key_version); + bpage->id.space(), bpage->key_version); } else { ibuf_merge_or_delete_for_page( (buf_block_t*) bpage, bpage->id, @@ -7494,7 +7469,8 @@ buf_page_encrypt_before_write( page_size, dst_frame); - ulint key_version = mach_read_from_4(dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION); + uint32_t key_version = mach_read_from_4( + dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION); ut_ad(key_version == 0 || key_version >= bpage->key_version); bpage->key_version = key_version; bpage->real_size = page_size.physical(); @@ -7612,7 +7588,6 @@ buf_page_decrypt_after_read( bpage->key_version = key_version; bpage->page_encrypted = page_compressed_encrypted; bpage->page_compressed = page_compressed; - bpage->space = bpage->id.space(); if (page_compressed) { /* the page we read is unencrypted */ @@ -7698,4 +7673,30 @@ buf_page_decrypt_after_read( return (success); } + +/** +Should we punch hole to deallocate unused portion of the page. +@param[in] bpage Page control block +@return true if punch hole should be used, false if not */ +bool +buf_page_should_punch_hole( + const buf_page_t* bpage) +{ + return (bpage->real_size != bpage->size.physical()); +} + +/** +Calculate the length of trim (punch_hole) operation. +@param[in] bpage Page control block +@param[in] write_length Write length +@return length of the trim or zero. */ +ulint +buf_page_get_trim_length( + const buf_page_t* bpage, + ulint write_length) +{ + return (bpage->size.physical() - write_length); +} + + #endif /* !UNIV_INNOCHECKSUM */ diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index 5f46576ad7e..4f83921a553 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -380,8 +380,6 @@ buf_dblwr_init_or_load_pages( IORequest read_request(IORequest::READ); - read_request.disable_compression(); - err = os_file_read( read_request, file, read_buf, TRX_SYS_PAGE_NO * UNIV_PAGE_SIZE, @@ -496,11 +494,6 @@ buf_dblwr_init_or_load_pages( IORequest write_request(IORequest::WRITE); - /* Recovered data file pages are written out - as uncompressed. */ - - write_request.disable_compression(); - err = os_file_write( write_request, path, file, page, source_page_no * UNIV_PAGE_SIZE, @@ -516,8 +509,9 @@ buf_dblwr_init_or_load_pages( return(err); } - } else { - + } else if (memcmp(field_ref_zero, page + FIL_PAGE_LSN, 8)) { + /* Each valid page header must contain + a nonzero FIL_PAGE_LSN field. */ recv_dblwr.add(page); } @@ -551,11 +545,9 @@ buf_dblwr_process(void) for (recv_dblwr_t::list::iterator i = recv_dblwr.pages.begin(); i != recv_dblwr.pages.end(); ++i, ++page_no_dblwr) { - bool is_compressed = false; - - const byte* page = *i; - ulint page_no = page_get_page_no(page); - ulint space_id = page_get_space_id(page); + byte* page = *i; + ulint page_no = page_get_page_no(page); + ulint space_id = page_get_space_id(page); fil_space_t* space = fil_space_get(space_id); @@ -567,163 +559,130 @@ buf_dblwr_process(void) fil_space_open_if_needed(space); + const page_id_t page_id(space_id, page_no); + if (page_no >= space->size) { - /* Do not report the warning if the tablespace is - schedule for truncate or was truncated and we have live - MLOG_TRUNCATE record in redo. */ - bool skip_warning = - srv_is_tablespace_truncated(space_id) - || srv_was_tablespace_truncated(space); - - if (!skip_warning) { - ib::warn() << "Page " << page_no_dblwr - << " in the doublewrite buffer is" - " not within space bounds: page " - << page_id_t(space_id, page_no); + /* Do not report the warning if the tablespace + is scheduled for truncation or was truncated + and we have parsed an MLOG_TRUNCATE record. */ + if (!srv_is_tablespace_truncated(space_id) + && !srv_was_tablespace_truncated(space)) { + ib::warn() << "A copy of page " << page_id + << " in the doublewrite buffer slot " + << page_no_dblwr + << " is not within space bounds"; } + continue; + } + + const page_size_t page_size(space->flags); + ut_ad(!buf_page_is_zeroes(page, page_size)); + + /* We want to ensure that for partial reads the + unread portion of the page is NUL. */ + memset(read_buf, 0x0, page_size.physical()); + + IORequest request; + + request.dblwr_recover(); + + /* Read in the actual page from the file */ + dberr_t err = fil_io( + request, true, + page_id, page_size, + 0, page_size.physical(), read_buf, NULL); + + if (err != DB_SUCCESS) { + ib::warn() + << "Double write buffer recovery: " + << page_id << " read failed with " + << "error: " << ut_strerr(err); + } + + const bool is_all_zero = buf_page_is_zeroes( + read_buf, page_size); + + if (is_all_zero) { + /* We will check if the copy in the + doublewrite buffer is valid. If not, we will + ignore this page (there should be redo log + records to initialize it). */ } else { - const page_size_t page_size(space->flags); - const page_id_t page_id(space_id, page_no); - - /* We want to ensure that for partial reads the - unread portion of the page is NUL. */ - memset(read_buf, 0x0, page_size.physical()); - - IORequest request; - - request.dblwr_recover(); - - /* Read in the actual page from the file */ - dberr_t err = fil_io( - request, true, - page_id, page_size, - 0, page_size.physical(), read_buf, NULL, NULL); - - if (err != DB_SUCCESS) { - - ib::warn() - << "Double write buffer recovery: " - << page_id << " read failed with " - << "error: " << ut_strerr(err); + if (fil_page_is_compressed_encrypted(read_buf) || + fil_page_is_compressed(read_buf)) { + /* Decompress the page before + validating the checksum. */ + fil_decompress_page( + NULL, read_buf, UNIV_PAGE_SIZE, + NULL, true); } - /* Is page compressed ? */ - is_compressed = fil_page_is_compressed_encrypted(read_buf) | - fil_page_is_compressed(read_buf); - - /* If page was compressed, decompress it before we - check checksum. */ - if (is_compressed) { - fil_decompress_page(NULL, read_buf, UNIV_PAGE_SIZE, NULL, true); - } - if (err != DB_SUCCESS) { - - ib::warn() - << "Double write buffer recovery: " - << page_id << " read failed with " - << "error: " << ut_strerr(err); + if (fil_space_verify_crypt_checksum( + read_buf, page_size) + || !buf_page_is_corrupted( + true, read_buf, page_size, false)) { + /* The page is good; there is no need + to consult the doublewrite buffer. */ + continue; } - if (fil_space_verify_crypt_checksum(read_buf, page_size)) { - - /* page is encrypted and checksum is OK */ - } else if (buf_page_is_corrupted( - true, read_buf, page_size, - fsp_is_checksum_disabled(space_id))) { - - ib::warn() << "Database page corruption or" - << " a failed file read of page " - << page_id - << ". Trying to recover it from the" - << " doublewrite buffer."; - - /* Is page compressed ? */ - is_compressed = fil_page_is_compressed_encrypted(page) | - fil_page_is_compressed(page); - - /* If page was compressed, decompress it before we - check checksum. */ - if (is_compressed) { - fil_decompress_page(NULL, (byte*)page, UNIV_PAGE_SIZE, NULL, true); - } - - if (fil_space_verify_crypt_checksum(page, page_size)) { - /* the doublewrite buffer page is encrypted and OK */ - } else if (buf_page_is_corrupted( - true, page, page_size, - fsp_is_checksum_disabled(space_id))) { - - ib::error() << "Dump of the page:"; - - buf_page_print( - read_buf, page_size, - BUF_PAGE_PRINT_NO_CRASH); - ib::error() << "Dump of corresponding" - " page in doublewrite buffer:"; - - buf_page_print( - page, page_size, - BUF_PAGE_PRINT_NO_CRASH); - - ib::fatal() << "The page in the" - " doublewrite buffer is" - " corrupt. Cannot continue" - " operation. You can try to" - " recover the database with" - " innodb_force_recovery=6"; - } - } else if (buf_page_is_zeroes(read_buf, page_size) - && !buf_page_is_zeroes(page, page_size) - && !buf_page_is_corrupted( - true, page, page_size, - fsp_is_checksum_disabled(space_id))) { - - /* Database page contained only zeroes, while - a valid copy is available in dblwr buffer. */ - - } else { - - bool t1 = buf_page_is_zeroes( - read_buf, page_size); - - bool t2 = buf_page_is_zeroes(page, page_size); - - bool t3 = buf_page_is_corrupted( - true, page, page_size, - fsp_is_checksum_disabled(space_id)); - - if (t1 && !(t2 || t3)) { - - /* Database page contained only - zeroes, while a valid copy is - available in dblwr buffer. */ - - } else { - continue; - } - } - - /* Recovered data file pages are written out - as uncompressed. */ - - IORequest write_request(IORequest::WRITE); - - write_request.disable_compression(); - - /* Write the good page from the doublewrite - buffer to the intended position. */ - - fil_io(write_request, true, - page_id, page_size, - 0, page_size.physical(), - const_cast(page), NULL, NULL); - + /* We intentionally skip this message for + is_all_zero pages. */ ib::info() - << "Recovered page " - << page_id + << "Trying to recover page " << page_id << " from the doublewrite buffer."; } + + /* Next, validate the doublewrite page. */ + if (fil_page_is_compressed_encrypted(page) || + fil_page_is_compressed(page)) { + /* Decompress the page before + validating the checksum. */ + fil_decompress_page( + NULL, page, UNIV_PAGE_SIZE, NULL, true); + } + + if (!fil_space_verify_crypt_checksum(page, page_size) + && buf_page_is_corrupted(true, page, page_size, false)) { + if (!is_all_zero) { + ib::warn() << "A doublewrite copy of page " + << page_id << " is corrupted."; + } + /* Theoretically we could have another good + copy for this page in the doublewrite + buffer. If not, we will report a fatal error + for a corrupted page somewhere else if that + page was truly needed. */ + continue; + } + + if (page_no == 0) { + /* Check the FSP_SPACE_FLAGS. */ + ulint flags = fsp_header_get_flags(page); + if (!fsp_flags_is_valid(flags) + && fsp_flags_convert_from_101(flags) + == ULINT_UNDEFINED) { + ib::warn() << "Ignoring a doublewrite copy" + " of page " << page_id + << " due to invalid flags " + << ib::hex(flags); + continue; + } + /* The flags on the page should be converted later. */ + } + + /* Write the good page from the doublewrite buffer to + the intended position. */ + + IORequest write_request(IORequest::WRITE); + + fil_io(write_request, true, page_id, page_size, + 0, page_size.physical(), + const_cast(page), NULL); + + ib::info() << "Recovered page " << page_id + << " from the doublewrite buffer."; } recv_dblwr.pages.clear(); @@ -953,7 +912,7 @@ buf_dblwr_write_block_to_datafile( type |= IORequest::DO_NOT_WAKE; } - IORequest request(type); + IORequest request(type, const_cast(bpage)); /* We request frame here to get correct buffer in case of encryption and/or page compression */ @@ -965,7 +924,7 @@ buf_dblwr_write_block_to_datafile( fil_io(request, sync, bpage->id, bpage->size, 0, bpage->size.physical(), (void*) frame, - (void*) bpage, NULL); + (void*) bpage); } else { ut_ad(!bpage->size.is_compressed()); @@ -979,8 +938,8 @@ buf_dblwr_write_block_to_datafile( buf_dblwr_check_page_lsn(block->frame); fil_io(request, - sync, bpage->id, bpage->size, 0, bpage->size.physical(), - frame, block, (ulint *)&bpage->write_size); + sync, bpage->id, bpage->size, 0, bpage->real_size, + frame, block); } } @@ -1082,7 +1041,7 @@ try_again: fil_io(IORequestWrite, true, page_id_t(TRX_SYS_SPACE, buf_dblwr->block1), univ_page_size, - 0, len, (void*) write_buf, NULL, NULL); + 0, len, (void*) write_buf, NULL); if (buf_dblwr->first_free <= TRX_SYS_DOUBLEWRITE_BLOCK_SIZE) { /* No unwritten pages in the second block. */ @@ -1098,7 +1057,7 @@ try_again: fil_io(IORequestWrite, true, page_id_t(TRX_SYS_SPACE, buf_dblwr->block2), univ_page_size, - 0, len, (void*) write_buf, NULL, NULL); + 0, len, (void*) write_buf, NULL); flush: /* increment the doublewrite flushed pages counter */ @@ -1333,7 +1292,6 @@ retry: 0, univ_page_size.physical(), (void *)(buf_dblwr->write_buf + univ_page_size.physical() * i), - NULL, NULL); } else { /* It is a regular page. Write it directly to the @@ -1345,7 +1303,6 @@ retry: 0, univ_page_size.physical(), (void*) frame, - NULL, NULL); } diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc index 682be386f2b..873f4ea438a 100644 --- a/storage/innobase/buf/buf0dump.cc +++ b/storage/innobase/buf/buf0dump.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -53,8 +54,8 @@ enum status_severity { /* Flags that tell the buffer pool dump/load thread which action should it take after being waked up. */ -static ibool buf_dump_should_start = FALSE; -static ibool buf_load_should_start = FALSE; +static volatile bool buf_dump_should_start; +static volatile bool buf_load_should_start; static ibool buf_load_abort_flag = FALSE; @@ -78,7 +79,7 @@ void buf_dump_start() /*============*/ { - buf_dump_should_start = TRUE; + buf_dump_should_start = true; os_event_set(srv_buf_dump_event); } @@ -91,7 +92,7 @@ void buf_load_start() /*============*/ { - buf_load_should_start = TRUE; + buf_load_should_start = true; os_event_set(srv_buf_dump_event); } @@ -313,9 +314,24 @@ buf_dump( } if (srv_buf_pool_dump_pct != 100) { + ulint t_pages; + ut_ad(srv_buf_pool_dump_pct < 100); - n_pages = n_pages * srv_buf_pool_dump_pct / 100; + /* limit the number of total pages dumped to X% of the + * total number of pages */ + t_pages = buf_pool->curr_size + * srv_buf_pool_dump_pct / 100; + if (n_pages > t_pages) { + buf_dump_status(STATUS_INFO, + "Instance " ULINTPF + ", restricted to " ULINTPF + " pages due to " + "innodb_buf_pool_dump_pct=%lu", + i, t_pages, + srv_buf_pool_dump_pct); + n_pages = t_pages; + } if (n_pages == 0) { n_pages = 1; @@ -778,10 +794,7 @@ again. @return this function does not return, it calls os_thread_exit() */ extern "C" os_thread_ret_t -DECLARE_THREAD(buf_dump_thread)( -/*============================*/ - void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter - required by os_thread_create */ +DECLARE_THREAD(buf_dump_thread)(void*) { ut_ad(!srv_read_only_mode); /* JAN: TODO: MySQL 5.7 PSI @@ -789,8 +802,6 @@ DECLARE_THREAD(buf_dump_thread)( pfs_register_thread(buf_dump_thread_key); #endif */ /* UNIV_PFS_THREAD */ - srv_buf_dump_thread_active = TRUE; - buf_dump_status(STATUS_VERBOSE, "Dumping of buffer pool not started"); buf_load_status(STATUS_VERBOSE, "Loading of buffer pool not started"); @@ -803,15 +814,18 @@ DECLARE_THREAD(buf_dump_thread)( os_event_wait(srv_buf_dump_event); if (buf_dump_should_start) { - buf_dump_should_start = FALSE; + buf_dump_should_start = false; buf_dump(TRUE /* quit on shutdown */); } if (buf_load_should_start) { - buf_load_should_start = FALSE; + buf_load_should_start = false; buf_load(); } + if (buf_dump_should_start || buf_load_should_start) { + continue; + } os_event_reset(srv_buf_dump_event); } @@ -820,7 +834,7 @@ DECLARE_THREAD(buf_dump_thread)( keep going even if we are in a shutdown state */); } - srv_buf_dump_thread_active = FALSE; + srv_buf_dump_thread_active = false; /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit and not use return() to exit. */ diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index b82c4db18ad..ed975702fa3 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. Copyright (c) 2013, 2014, Fusion-io This program is free software; you can redistribute it and/or modify it under @@ -795,6 +795,8 @@ buf_flush_write_complete( flush_type = buf_page_get_flush_type(bpage); buf_pool->n_flush[flush_type]--; + ut_ad(buf_pool_mutex_own(buf_pool)); + if (buf_pool->n_flush[flush_type] == 0 && buf_pool->init_flush[flush_type] == FALSE) { @@ -1008,7 +1010,7 @@ buf_flush_write_block_low( { page_t* frame = NULL; ulint space_id = bpage->id.space(); - atomic_writes_t awrites = fil_space_get_atomic_writes(space_id); + bool atomic_writes = fil_space_get_atomic_writes(space_id); #ifdef UNIV_DEBUG buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); @@ -1086,18 +1088,18 @@ buf_flush_write_block_low( || buf_dblwr == NULL || srv_read_only_mode || fsp_is_system_temporary(bpage->id.space()) - || awrites == ATOMIC_WRITES_ON) { + || atomic_writes) { ut_ad(!srv_read_only_mode || fsp_is_system_temporary(bpage->id.space())); ulint type = IORequest::WRITE | IORequest::DO_NOT_WAKE; - IORequest request(type); + IORequest request(type, bpage); fil_io(request, sync, bpage->id, bpage->size, 0, bpage->size.physical(), - frame, bpage, NULL); + frame, bpage); } else { if (flush_type == BUF_FLUSH_SINGLE_PAGE) { buf_dblwr_write_single_page(bpage, sync); @@ -3761,9 +3763,7 @@ FlushObserver::FlushObserver( m_removed->at(i) = 0; } -#ifdef FLUSH_LIST_OBSERVER_DEBUG - ib::info() << "FlushObserver constructor: " << m_trx->id; -#endif /* FLUSH_LIST_OBSERVER_DEBUG */ + DBUG_LOG("flush", "FlushObserver(): trx->id=" << m_trx->id); } /** FlushObserver deconstructor */ @@ -3774,9 +3774,7 @@ FlushObserver::~FlushObserver() UT_DELETE(m_flushed); UT_DELETE(m_removed); -#ifdef FLUSH_LIST_OBSERVER_DEBUG - ib::info() << "FlushObserver deconstructor: " << m_trx->id; -#endif /* FLUSH_LIST_OBSERVER_DEBUG */ + DBUG_LOG("flush", "~FlushObserver(): trx->id=" << m_trx->id); } /** Check whether trx is interrupted @@ -3809,10 +3807,7 @@ FlushObserver::notify_flush( m_stage->inc(); } -#ifdef FLUSH_LIST_OBSERVER_DEBUG - ib::info() << "Flush <" << bpage->id.space() - << ", " << bpage->id.page_no() << ">"; -#endif /* FLUSH_LIST_OBSERVER_DEBUG */ + DBUG_LOG("flush", "Flush " << bpage->id); } /** Notify observer of a remove @@ -3827,10 +3822,7 @@ FlushObserver::notify_remove( m_removed->at(buf_pool->instance_no)++; -#ifdef FLUSH_LIST_OBSERVER_DEBUG - ib::info() << "Remove <" << bpage->id.space() - << ", " << bpage->id.page_no() << ">"; -#endif /* FLUSH_LIST_OBSERVER_DEBUG */ + DBUG_LOG("flush", "Remove " << bpage->id); } /** Flush dirty pages and wait. */ diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc index 6a57e6746ff..ef8c2177b2c 100644 --- a/storage/innobase/buf/buf0lru.cc +++ b/storage/innobase/buf/buf0lru.cc @@ -79,10 +79,6 @@ static const ulint BUF_LRU_DROP_SEARCH_SIZE = 1024; during LRU eviction. */ static const ulint BUF_LRU_SEARCH_SCAN_THRESHOLD = 100; -/** We scan these many blocks when looking for a clean page to evict -during LRU eviction. */ -#define BUF_LRU_SEARCH_SCAN_THRESHOLD 100 - /** If we switch on the InnoDB monitor because there are too few available frames in the buffer pool, we set this to TRUE */ static bool buf_lru_switched_on_innodb_mon = false; @@ -223,6 +219,7 @@ buf_LRU_evict_from_unzip_LRU( return(unzip_avg <= io_avg * BUF_LRU_IO_TO_UNZIP_FACTOR); } +#ifdef BTR_CUR_HASH_ADAPT /** Attempts to drop page hash index on a batch of pages belonging to a particular space id. @param[in] space_id space id @@ -368,6 +365,7 @@ next_page: buf_LRU_drop_page_hash_batch(id, page_size, page_arr, num_entries); ut_free(page_arr); } +#endif /* BTR_CUR_HASH_ADAPT */ /******************************************************************//** While flushing (or removing dirty) pages from a tablespace we don't @@ -792,7 +790,7 @@ scan_again: bpage->id.space(), bpage->id.page_no(), bpage->state)); - +#ifdef BTR_CUR_HASH_ADAPT if (buf_page_get_state(bpage) != BUF_BLOCK_FILE_PAGE) { /* Do nothing, because the adaptive hash index covers uncompressed pages only. */ @@ -814,6 +812,7 @@ scan_again: goto scan_again; } +#endif /* BTR_CUR_HASH_ADAPT */ if (bpage->oldest_modification != 0) { @@ -915,7 +914,7 @@ buf_LRU_flush_or_remove_pages( buf_pool_t* buf_pool; buf_pool = buf_pool_from_array(i); - +#ifdef BTR_CUR_HASH_ADAPT switch (buf_remove) { case BUF_REMOVE_ALL_NO_WRITE: buf_LRU_drop_page_hash_for_tablespace(buf_pool, id); @@ -931,7 +930,7 @@ buf_LRU_flush_or_remove_pages( table, there is no need to drop the AHI entries. */ break; } - +#endif /* BTR_CUR_HASH_ADAPT */ buf_LRU_remove_pages(buf_pool, id, buf_remove, trx); } } @@ -1210,15 +1209,15 @@ buf_LRU_check_size_of_non_data_objects( + UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->curr_size / 20) { ib::fatal() << "Over 95 percent of the buffer pool is" - " occupied by lock heaps or the adaptive hash index!" + " occupied by lock heaps" +#ifdef BTR_CUR_HASH_ADAPT + " or the adaptive hash index!" +#endif /* BTR_CUR_HASH_ADAPT */ " Check that your transactions do not set too many" - " row locks. Your buffer pool size is " - << (buf_pool->curr_size - / (1024 * 1024 / UNIV_PAGE_SIZE)) << " MB." - " Maybe you should make the buffer pool bigger?" - " We intentionally generate a seg fault to print" - " a stack trace on Linux!"; - + " row locks, or review if" + " innodb_buffer_pool_size=" + << (buf_pool->curr_size >> (20 - UNIV_PAGE_SIZE_SHIFT)) + << "M could be bigger."; } else if (!recv_recovery_is_on() && buf_pool->curr_size == buf_pool->old_size && (UT_LIST_GET_LEN(buf_pool->free) @@ -1232,16 +1231,17 @@ buf_LRU_check_size_of_non_data_objects( leak! */ ib::warn() << "Over 67 percent of the buffer pool is" - " occupied by lock heaps or the adaptive hash" - " index! Check that your transactions do not" - " set too many row locks. Your buffer pool" - " size is " - << (buf_pool->curr_size - / (1024 * 1024 / UNIV_PAGE_SIZE)) - << " MB. Maybe you should make the buffer pool" - " bigger?. Starting the InnoDB Monitor to print" - " diagnostics, including lock heap and hash" - " index sizes."; + " occupied by lock heaps" +#ifdef BTR_CUR_HASH_ADAPT + " or the adaptive hash index!" +#endif /* BTR_CUR_HASH_ADAPT */ + " Check that your transactions do not" + " set too many row locks." + " innodb_buffer_pool_size=" + << (buf_pool->curr_size >> + (20 - UNIV_PAGE_SIZE_SHIFT)) << "M." + " Starting the InnoDB Monitor to print" + " diagnostics."; buf_lru_switched_on_innodb_mon = true; srv_print_innodb_monitor = TRUE; @@ -2107,9 +2107,11 @@ buf_LRU_block_free_non_file_page( return; /* Continue */ } -#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG ut_a(block->n_pointers == 0); -#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ +# endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ ut_ad(!block->page.in_free_list); ut_ad(!block->page.in_flush_list); ut_ad(!block->page.in_LRU_list); diff --git a/storage/innobase/buf/buf0mtflu.cc b/storage/innobase/buf/buf0mtflu.cc index 117de5cc948..7c15b12950e 100644 --- a/storage/innobase/buf/buf0mtflu.cc +++ b/storage/innobase/buf/buf0mtflu.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (C) 2013, 2014, Fusion-io. All Rights Reserved. -Copyright (C) 2013, 2015, MariaDB Corporation. All Rights Reserved. +Copyright (C) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -118,15 +118,65 @@ typedef struct wrk_itm mem_heap_t *rheap; } wrk_t; -typedef struct thread_data +struct thread_data_t { os_thread_id_t wthread_id; /*!< Identifier */ wthr_status_t wt_status; /*!< Worker thread status */ -} thread_data_t; +}; -/* Thread syncronization data */ -typedef struct thread_sync +/** Flush dirty pages when multi-threaded flush is used. */ +extern "C" UNIV_INTERN +os_thread_ret_t +DECLARE_THREAD(mtflush_io_thread)(void* arg); + +/** Thread syncronization data */ +struct thread_sync_t { + /** Constructor */ + thread_sync_t(ulint n_threads, mem_heap_t* wheap, mem_heap_t* rheap) : + thread_global_mtx(), n_threads(n_threads), + wq(ib_wqueue_create()), + wr_cq(ib_wqueue_create()), + rd_cq(ib_wqueue_create()), + wheap(wheap), rheap(rheap), gwt_status(), + thread_data(static_cast( + mem_heap_zalloc(wheap, n_threads + * sizeof *thread_data))) + { + ut_a(wq); + ut_a(wr_cq); + ut_a(rd_cq); + ut_a(thread_data); + + mutex_create(LATCH_ID_MTFLUSH_THREAD_MUTEX, + &thread_global_mtx); + + /* Create threads for page-compression-flush */ + for(ulint i = 0; i < n_threads; i++) { + thread_data[i].wt_status = WTHR_INITIALIZED; + os_thread_create(mtflush_io_thread, this, + &thread_data[i].wthread_id); + } + } + + /** Destructor */ + ~thread_sync_t() + { + ut_a(ib_wqueue_is_empty(wq)); + ut_a(ib_wqueue_is_empty(wr_cq)); + ut_a(ib_wqueue_is_empty(rd_cq)); + + /* Free all queues */ + ib_wqueue_free(wq); + ib_wqueue_free(wr_cq); + ib_wqueue_free(rd_cq); + + mutex_free(&thread_global_mtx); + + mem_heap_free(rheap); + mem_heap_free(wheap); + } + /* Global variables used by all threads */ ib_mutex_t thread_global_mtx; /*!< Mutex used protecting below variables */ @@ -142,23 +192,11 @@ typedef struct thread_sync /* Variables used by only one thread at a time */ thread_data_t* thread_data; /*!< Thread specific data */ +}; -} thread_sync_t; - -static int mtflush_work_initialized = -1; -static thread_sync_t* mtflush_ctx=NULL; +static thread_sync_t* mtflush_ctx; static ib_mutex_t mtflush_mtx; -/******************************************************************//** -Set multi-threaded flush work initialized. */ -static inline -void -buf_mtflu_work_init(void) -/*=====================*/ -{ - mtflush_work_initialized = 1; -} - /******************************************************************//** Return true if multi-threaded flush is initialized @return true if initialized */ @@ -166,7 +204,7 @@ bool buf_mtflu_init_done(void) /*=====================*/ { - return(mtflush_work_initialized == 1); + return(mtflush_ctx != NULL); } /******************************************************************//** @@ -307,15 +345,10 @@ mtflush_service_io( } } -/******************************************************************//** -Thead used to flush dirty pages when multi-threaded flush is -used. -@return a dummy parameter*/ +/** Flush dirty pages when multi-threaded flush is used. */ extern "C" UNIV_INTERN os_thread_ret_t -DECLARE_THREAD(mtflush_io_thread)( -/*==============================*/ - void * arg) +DECLARE_THREAD(mtflush_io_thread)(void* arg) { thread_sync_t *mtflush_io = ((thread_sync_t *)arg); thread_data_t *this_thread_data = NULL; @@ -438,29 +471,10 @@ buf_mtflu_io_thread_exit(void) ib_wqueue_nowait(mtflush_io->wq); } - mutex_enter(&mtflush_mtx); + mtflush_ctx->~thread_sync_t(); + mtflush_ctx = NULL; - ut_a(ib_wqueue_is_empty(mtflush_io->wq)); - ut_a(ib_wqueue_is_empty(mtflush_io->wr_cq)); - ut_a(ib_wqueue_is_empty(mtflush_io->rd_cq)); - - /* Free all queues */ - ib_wqueue_free(mtflush_io->wq); - ib_wqueue_free(mtflush_io->wr_cq); - ib_wqueue_free(mtflush_io->rd_cq); - - mtflush_io->wq = NULL; - mtflush_io->wr_cq = NULL; - mtflush_io->rd_cq = NULL; - mtflush_work_initialized = 0; - - /* Free heap */ - mem_heap_free(mtflush_io->wheap); - mem_heap_free(mtflush_io->rheap); - - mutex_exit(&mtflush_mtx); mutex_free(&mtflush_mtx); - mutex_free(&mtflush_io->thread_global_mtx); } /******************************************************************//** @@ -472,7 +486,6 @@ buf_mtflu_handler_init( ulint n_threads, /*!< in: Number of threads to create */ ulint wrk_cnt) /*!< in: Number of work items */ { - ulint i; mem_heap_t* mtflush_heap; mem_heap_t* mtflush_heap2; @@ -484,43 +497,10 @@ buf_mtflu_handler_init( mtflush_heap2 = mem_heap_create(0); ut_a(mtflush_heap2 != NULL); - mtflush_ctx = (thread_sync_t *)mem_heap_alloc(mtflush_heap, - sizeof(thread_sync_t)); - memset(mtflush_ctx, 0, sizeof(thread_sync_t)); - ut_a(mtflush_ctx != NULL); - mtflush_ctx->thread_data = (thread_data_t*)mem_heap_alloc( - mtflush_heap, sizeof(thread_data_t) * n_threads); - ut_a(mtflush_ctx->thread_data); - memset(mtflush_ctx->thread_data, 0, sizeof(thread_data_t) * n_threads); - - mtflush_ctx->n_threads = n_threads; - mtflush_ctx->wq = ib_wqueue_create(); - ut_a(mtflush_ctx->wq); - mtflush_ctx->wr_cq = ib_wqueue_create(); - ut_a(mtflush_ctx->wr_cq); - mtflush_ctx->rd_cq = ib_wqueue_create(); - ut_a(mtflush_ctx->rd_cq); - mtflush_ctx->wheap = mtflush_heap; - mtflush_ctx->rheap = mtflush_heap2; - - mutex_create(LATCH_ID_MTFLUSH_THREAD_MUTEX, &mtflush_ctx->thread_global_mtx); mutex_create(LATCH_ID_MTFLUSH_MUTEX, &mtflush_mtx); - /* Create threads for page-compression-flush */ - for(i=0; i < n_threads; i++) { - os_thread_id_t new_thread_id; - - mtflush_ctx->thread_data[i].wt_status = WTHR_INITIALIZED; - - os_thread_create( - mtflush_io_thread, - ((void *) mtflush_ctx), - &new_thread_id); - - mtflush_ctx->thread_data[i].wthread_id = new_thread_id; - } - - buf_mtflu_work_init(); + mtflush_ctx = new (mem_heap_zalloc(mtflush_heap, sizeof *mtflush_ctx)) + thread_sync_t(n_threads, mtflush_heap, mtflush_heap2); return((void *)mtflush_ctx); } diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc index ea3c1ceccf9..4d68ad5ac51 100644 --- a/storage/innobase/buf/buf0rea.cc +++ b/storage/innobase/buf/buf0rea.cc @@ -182,7 +182,7 @@ buf_read_page_low( *err = fil_io( request, sync, page_id, page_size, 0, page_size.physical(), - dst, bpage, NULL); + dst, bpage); if (sync) { thd_wait_end(NULL); diff --git a/storage/innobase/data/data0data.cc b/storage/innobase/data/data0data.cc index 0ccf5868d14..c897564c1d4 100644 --- a/storage/innobase/data/data0data.cc +++ b/storage/innobase/data/data0data.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -728,7 +729,7 @@ skip_field: DEBUG_SYNC_C("ib_mv_nonupdated_column_offpage"); upd_field_t upd_field; - upd_field.field_no = longest_i; + upd_field.field_no = unsigned(longest_i); upd_field.orig_len = 0; upd_field.exp = NULL; upd_field.old_v_val = NULL; diff --git a/storage/innobase/data/data0type.cc b/storage/innobase/data/data0type.cc index cad165d1489..7da473f0a3e 100644 --- a/storage/innobase/data/data0type.cc +++ b/storage/innobase/data/data0type.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -139,23 +140,6 @@ dtype_is_non_binary_string_type( return(FALSE); } -/*********************************************************************//** -Forms a precise type from the < 4.1.2 format precise type plus the -charset-collation code. -@return precise type, including the charset-collation code */ -ulint -dtype_form_prtype( -/*==============*/ - ulint old_prtype, /*!< in: the MySQL type code and the flags - DATA_BINARY_TYPE etc. */ - ulint charset_coll) /*!< in: MySQL charset-collation code */ -{ - ut_a(old_prtype < 256 * 256); - ut_a(charset_coll <= MAX_CHAR_COLL_NUM); - - return(old_prtype + (charset_coll << 16)); -} - /*********************************************************************//** Validates a data type structure. @return TRUE if ok */ diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc index cfea64d51c2..084d39fc4a1 100644 --- a/storage/innobase/dict/dict0crea.cc +++ b/storage/innobase/dict/dict0crea.cc @@ -377,75 +377,6 @@ dict_build_table_def_step( return(err); } -/** Build a tablespace to store various objects. -@param[in,out] tablespace Tablespace object describing what to build. -@return DB_SUCCESS or error code. */ -dberr_t -dict_build_tablespace( - Tablespace* tablespace) -{ - dberr_t err = DB_SUCCESS; - mtr_t mtr; - ulint space = 0; - - ut_ad(mutex_own(&dict_sys->mutex)); - ut_ad(tablespace); - - DBUG_EXECUTE_IF("out_of_tablespace_disk", - return(DB_OUT_OF_FILE_SPACE);); - /* Get a new space id. */ - dict_hdr_get_new_id(NULL, NULL, &space, NULL, false); - if (space == ULINT_UNDEFINED) { - return(DB_ERROR); - } - tablespace->set_space_id(space); - - Datafile* datafile = tablespace->first_datafile(); - - /* We create a new generic empty tablespace. - We initially let it be 4 pages: - - page 0 is the fsp header and an extent descriptor page, - - page 1 is an ibuf bitmap page, - - page 2 is the first inode page, - - page 3 will contain the root of the clustered index of the - first table we create here. */ - - err = fil_ibd_create( - space, - tablespace->name(), - datafile->filepath(), - tablespace->flags(), - FIL_IBD_FILE_INITIAL_SIZE, - tablespace->encryption_mode(), - tablespace->key_id()); - - if (err != DB_SUCCESS) { - return(err); - } - - /* Update SYS_TABLESPACES and SYS_DATAFILES */ - err = dict_replace_tablespace_and_filepath( - tablespace->space_id(), tablespace->name(), - datafile->filepath(), tablespace->flags()); - if (err != DB_SUCCESS) { - os_file_delete(innodb_data_file_key, datafile->filepath()); - return(err); - } - - mtr_start(&mtr); - mtr.set_named_space(space); - - /* Once we allow temporary general tablespaces, we must do this; - mtr_set_log_mode(&mtr, MTR_LOG_NO_REDO); */ - ut_a(!FSP_FLAGS_GET_TEMPORARY(tablespace->flags())); - - fsp_header_init(space, FIL_IBD_FILE_INITIAL_SIZE, &mtr); - - mtr_commit(&mtr); - - return(err); -} - /** Builds a tablespace to contain a table, using file-per-table=1. @param[in,out] table Table to build in its own tablespace. @param[in] node Table create node @@ -473,6 +404,7 @@ dict_build_tablespace_for_table( DICT_TF2_FTS_AUX_HEX_NAME);); if (needs_file_per_table) { + ut_ad(!dict_table_is_temporary(table)); /* This table will need a new tablespace. */ ut_ad(dict_table_get_format(table) <= UNIV_FORMAT_MAX); @@ -493,23 +425,10 @@ dict_build_tablespace_for_table( table->space = static_cast(space); /* Determine the tablespace flags. */ - bool is_temp = dict_table_is_temporary(table); - bool is_encrypted = dict_table_is_encrypted(table); bool has_data_dir = DICT_TF_HAS_DATA_DIR(table->flags); - ulint fsp_flags = dict_tf_to_fsp_flags(table->flags, - is_temp, - is_encrypted); + ulint fsp_flags = dict_tf_to_fsp_flags(table->flags); - /* Determine the full filepath */ - if (is_temp) { - /* Temporary table filepath contains a full path - and a filename without the extension. */ - ut_ad(table->dir_path_of_temp_table); - filepath = fil_make_filepath( - table->dir_path_of_temp_table, - NULL, IBD, false); - - } else if (has_data_dir) { + if (has_data_dir) { ut_ad(table->data_dir_path); filepath = fil_make_filepath( table->data_dir_path, @@ -545,7 +464,6 @@ dict_build_tablespace_for_table( mtr_start(&mtr); mtr.set_named_space(table->space); - dict_disable_redo_if_temporary(table, &mtr); bool ret = fsp_header_init(table->space, FIL_IBD_FILE_INITIAL_SIZE, @@ -556,24 +474,11 @@ dict_build_tablespace_for_table( return(DB_ERROR); } } else { - /* We do not need to build a tablespace for this table. It - is already built. Just find the correct tablespace ID. */ - - if (DICT_TF_HAS_SHARED_SPACE(table->flags)) { - ut_ad(table->tablespace != NULL); - - ut_ad(table->space == fil_space_get_id_by_name( - table->tablespace())); - } else if (dict_table_is_temporary(table)) { - /* Use the shared temporary tablespace. - Note: The temp tablespace supports all non-Compressed - row formats whereas the system tablespace only - supports Redundant and Compact */ - ut_ad(dict_tf_get_rec_format(table->flags) - != REC_FORMAT_COMPRESSED); + ut_ad(dict_tf_get_rec_format(table->flags) + != REC_FORMAT_COMPRESSED); + if (dict_table_is_temporary(table)) { table->space = SRV_TMP_SPACE_ID; } else { - /* Create in the system tablespace. */ ut_ad(table->space == srv_sys_space.space_id()); } @@ -1769,6 +1674,11 @@ dict_create_or_check_foreign_constraint_tables(void) return(DB_SUCCESS); } + if (srv_read_only_mode + || srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO) { + return(DB_READ_ONLY); + } + trx = trx_allocate_for_mysql(); trx_set_dict_operation(trx, TRX_DICT_OP_TABLE); @@ -1898,11 +1808,9 @@ dict_create_or_check_sys_virtual() return(DB_SUCCESS); } - if (srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO - || srv_read_only_mode) { - ib::error() << "Cannot create sys_virtual system tables;" - " running in read-only mode."; - return(DB_ERROR); + if (srv_read_only_mode + || srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO) { + return(DB_READ_ONLY); } trx = trx_allocate_for_mysql(); @@ -2097,7 +2005,7 @@ dict_foreign_def_get( char* fk_def = (char *)mem_heap_alloc(foreign->heap, 4*1024); const char* tbname; char tablebuf[MAX_TABLE_NAME_LEN + 1] = ""; - int i; + unsigned i; char* bufend; tbname = dict_remove_db_name(foreign->id); @@ -2115,7 +2023,7 @@ dict_foreign_def_get( strlen(foreign->foreign_col_names[i]), trx->mysql_thd); strcat(fk_def, buf); - if (i < foreign->n_fields-1) { + if (i < static_cast(foreign->n_fields-1)) { strcat(fk_def, (char *)","); } } @@ -2139,7 +2047,7 @@ dict_foreign_def_get( trx->mysql_thd); buf[bufend - buf] = '\0'; strcat(fk_def, buf); - if (i < foreign->n_fields-1) { + if (i < (uint)foreign->n_fields-1) { strcat(fk_def, (char *)","); } } @@ -2555,9 +2463,15 @@ dict_create_or_check_sys_tablespace(void) if (sys_tablespaces_err == DB_SUCCESS && sys_datafiles_err == DB_SUCCESS) { + srv_sys_tablespaces_open = true; return(DB_SUCCESS); } + if (srv_read_only_mode + || srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO) { + return(DB_READ_ONLY); + } + trx = trx_allocate_for_mysql(); trx_set_dict_operation(trx, TRX_DICT_OP_TABLE); @@ -2630,6 +2544,7 @@ dict_create_or_check_sys_tablespace(void) if (err == DB_SUCCESS) { ib::info() << "Tablespace and datafile system tables created."; + srv_sys_tablespaces_open = true; } /* Note: The master thread has not been started at this point. */ diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index 37c6341a293..32c1a12ec1e 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -2,7 +2,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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 @@ -264,13 +264,11 @@ dict_get_db_name_len( return(s - name); } -/********************************************************************//** -Reserves the dictionary system mutex for MySQL. */ +/** Reserve the dictionary system mutex. */ void -dict_mutex_enter_for_mysql_func(const char * file, ulint line) -/*============================*/ +dict_mutex_enter_for_mysql_func(const char *file, unsigned line) { - mutex_enter(&dict_sys->mutex); + mutex_enter_loc(&dict_sys->mutex, file, line); } /********************************************************************//** @@ -1316,7 +1314,7 @@ void dict_table_add_to_cache( /*====================*/ dict_table_t* table, /*!< in: table */ - ibool can_be_evicted, /*!< in: TRUE if can be evicted */ + bool can_be_evicted, /*!< in: whether can be evicted */ mem_heap_t* heap) /*!< in: temporary heap */ { ulint fold; @@ -1407,8 +1405,6 @@ dict_table_can_be_evicted( ut_a(table->referenced_set.empty()); if (table->get_ref_count() == 0) { - dict_index_t* index; - /* The transaction commit and rollback are called from outside the handler interface. This means that there is a window where the table->n_ref_count can be zero but @@ -1418,7 +1414,8 @@ dict_table_can_be_evicted( return(FALSE); } - for (index = dict_table_get_first_index(table); +#ifdef BTR_CUR_HASH_ADAPT + for (dict_index_t* index = dict_table_get_first_index(table); index != NULL; index = dict_table_get_next_index(index)) { @@ -1440,6 +1437,7 @@ dict_table_can_be_evicted( return(FALSE); } } +#endif /* BTR_CUR_HASH_ADAPT */ return(TRUE); } @@ -1696,25 +1694,17 @@ dict_table_rename_in_cache( ib::info() << "Delete of " << filepath << " failed."; } - ut_free(filepath); } else if (dict_table_is_file_per_table(table)) { - if (table->dir_path_of_temp_table != NULL) { - ib::error() << "Trying to rename a TEMPORARY TABLE " - << old_name - << " ( " << table->dir_path_of_temp_table - << " )"; - return(DB_ERROR); - } - char* new_path = NULL; char* old_path = fil_space_get_first_path(table->space); + ut_ad(!dict_table_is_temporary(table)); + if (DICT_TF_HAS_DATA_DIR(table->flags)) { new_path = os_file_make_new_pathname( old_path, new_name); - err = RemoteDatafile::create_link_file( new_name, new_path); @@ -2619,9 +2609,11 @@ dict_index_add_to_cache_w_vcol( UT_LIST_ADD_LAST(table->indexes, new_index); new_index->table = table; new_index->table_name = table->name.m_name; +#ifdef BTR_CUR_ADAPT new_index->search_info = btr_search_info_create(new_index->heap); +#endif /* BTR_CUR_ADAPT */ - new_index->page = page_no; + new_index->page = unsigned(page_no); rw_lock_create(index_tree_rw_lock_key, &new_index->lock, SYNC_INDEX_TREE); @@ -2644,8 +2636,6 @@ dict_index_remove_from_cache_low( to make room in the table LRU list */ { lint size; - ulint retries = 0; - btr_search_t* info; ut_ad(table && index); ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); @@ -2660,9 +2650,11 @@ dict_index_remove_from_cache_low( row_log_free(index->online_log); } +#ifdef BTR_CUR_HASH_ADAPT /* We always create search info whether or not adaptive hash index is enabled or not. */ - info = btr_search_get_info(index); + btr_search_t* info = btr_search_get_info(index); + ulint retries = 0; ut_ad(info); /* We are not allowed to free the in-memory index struct @@ -2696,10 +2688,9 @@ dict_index_remove_from_cache_low( /* To avoid a hang here we commit suicide if the ref_count doesn't drop to zero in 600 seconds. */ - if (retries >= 60000) { - ut_error; - } + ut_a(retries < 60000); } while (srv_shutdown_state == SRV_SHUTDOWN_NONE || !lru_evict); +#endif /* BTR_CUR_HASH_ADAPT */ rw_lock_free(&index->lock); @@ -3186,7 +3177,7 @@ dict_index_build_internal_clust( can theoretically occur. Check for it. */ fixed_size += new_index->trx_id_offset; - new_index->trx_id_offset = fixed_size; + new_index->trx_id_offset = unsigned(fixed_size); if (new_index->trx_id_offset != fixed_size) { /* Overflow. Pretend that this is a @@ -3526,7 +3517,6 @@ dict_foreign_find_index( if (types_idx != index && !(index->type & DICT_FTS) && !dict_index_is_spatial(index) - && !dict_index_has_virtual(index) && !index->to_be_dropped && dict_foreign_qualify_index( table, col_names, columns, n_cols, @@ -4034,6 +4024,23 @@ dict_scan_col( break; } } + + for (i = 0; i < dict_table_get_n_v_cols(table); i++) { + + const char* col_name = dict_table_get_v_col_name( + table, i); + + if (0 == innobase_strcasecmp(col_name, *name)) { + /* Found */ + dict_v_col_t * vcol; + *success = TRUE; + vcol = dict_table_get_nth_v_col(table, i); + *column = &vcol->m_col; + strcpy((char*) *name, col_name); + + break; + } + } } return(ptr); @@ -5018,9 +5025,7 @@ col_loop1: for (i = 0; i < foreign->n_fields; i++) { foreign->foreign_col_names[i] = mem_heap_strdup( - foreign->heap, - dict_table_get_col_name(table, - dict_col_get_no(columns[i]))); + foreign->heap, column_names[i]); } ptr = dict_scan_table_name(cs, ptr, &referenced_table, name, @@ -5338,6 +5343,7 @@ try_find_index: ref_column_names, i, foreign->foreign_index, TRUE, FALSE, &index_error, &err_col, &err_index); + if (!index) { mutex_enter(&dict_foreign_err_mutex); dict_foreign_error_report_low(ef, create_name); @@ -6335,11 +6341,9 @@ dict_set_merge_threshold_all_debug( #endif /* UNIV_DEBUG */ -/**********************************************************************//** -Inits dict_ind_redundant. */ +/** Initialize dict_ind_redundant. */ void -dict_ind_init(void) -/*===============*/ +dict_ind_init() { dict_table_t* table; @@ -6357,16 +6361,11 @@ dict_ind_init(void) dict_ind_redundant->cached = TRUE; } -/**********************************************************************//** -Frees dict_ind_redundant. */ -static +/** Free dict_ind_redundant. */ void -dict_ind_free(void) -/*===============*/ +dict_ind_free() { - dict_table_t* table; - - table = dict_ind_redundant->table; + dict_table_t* table = dict_ind_redundant->table; dict_mem_index_free(dict_ind_redundant); dict_ind_redundant = NULL; dict_mem_table_free(table); @@ -6889,8 +6888,6 @@ dict_close(void) therefore we don't delete the individual elements. */ hash_table_free(dict_sys->table_id_hash); - dict_ind_free(); - mutex_free(&dict_sys->mutex); rw_lock_free(dict_operation_lock); @@ -7040,8 +7037,6 @@ dict_foreign_qualify_index( field = dict_index_get_nth_field(index, i); col_no = dict_col_get_no(field->col); - ut_ad(!dict_col_is_virtual(field->col)); - if (field->prefix_len != 0) { /* We do not accept column prefix indexes here */ @@ -7067,6 +7062,15 @@ dict_foreign_qualify_index( ? col_names[col_no] : dict_table_get_col_name(table, col_no); + if (dict_col_is_virtual(field->col)) { + for (ulint j = 0; j < table->n_v_def; j++) { + col_name = dict_table_get_v_col_name(table, j); + if (innobase_strcasecmp(field->name,col_name) == 0) { + break; + } + } + } + if (0 != innobase_strcasecmp(columns[i], col_name)) { return(false); } @@ -7244,78 +7248,6 @@ dict_index_zip_pad_optimal_page_size( return(ut_max(sz, min_sz)); } -/** Convert a 32 bit integer table flags to the 32 bit FSP Flags. -Fsp Flags are written into the tablespace header at the offset -FSP_SPACE_FLAGS and are also stored in the fil_space_t::flags field. -The following chart shows the translation of the low order bit. -Other bits are the same. - Low order bit - | REDUNDANT | COMPACT | COMPRESSED | DYNAMIC -dict_table_t::flags | 0 | 1 | 1 | 1 -fil_space_t::flags | 0 | 0 | 1 | 1 -@param[in] table_flags dict_table_t::flags -@param[in] is_temp whether the tablespace is temporary -@param[in] is_encrypted whether the tablespace is encrypted -@return tablespace flags (fil_space_t::flags) */ -ulint -dict_tf_to_fsp_flags( - ulint table_flags, - bool is_temp, - bool is_encrypted) -{ - DBUG_EXECUTE_IF("dict_tf_to_fsp_flags_failure", - return(ULINT_UNDEFINED);); - - bool has_atomic_blobs = - DICT_TF_HAS_ATOMIC_BLOBS(table_flags); - page_size_t page_size = dict_tf_get_page_size(table_flags); - bool has_data_dir = DICT_TF_HAS_DATA_DIR(table_flags); - bool is_shared = DICT_TF_HAS_SHARED_SPACE(table_flags); - bool page_compression = DICT_TF_GET_PAGE_COMPRESSION(table_flags); - ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(table_flags); - ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(table_flags); - - ut_ad(!page_size.is_compressed() || has_atomic_blobs); - - /* General tablespaces that are not compressed do not get the - flags for dynamic row format (POST_ANTELOPE & ATOMIC_BLOBS) */ - if (is_shared && !page_size.is_compressed()) { - has_atomic_blobs = false; - } - - ulint fsp_flags = fsp_flags_init(page_size, - has_atomic_blobs, - has_data_dir, - is_shared, - is_temp, - 0, - 0, - 0, - is_encrypted); - - /* In addition, tablespace flags also contain if the page - compression is used for this table. */ - if (page_compression) { - fsp_flags |= FSP_FLAGS_SET_PAGE_COMPRESSION(fsp_flags, page_compression); - } - - /* In addition, tablespace flags also contain page compression level - if page compression is used for this table. */ - if (page_compression && page_compression_level) { - fsp_flags |= FSP_FLAGS_SET_PAGE_COMPRESSION_LEVEL(fsp_flags, page_compression_level); - } - - /* In addition, tablespace flags also contain flag if atomic writes - is used for this table */ - if (atomic_writes) { - fsp_flags |= FSP_FLAGS_SET_ATOMIC_WRITES(fsp_flags, atomic_writes); - } - - ut_ad(fsp_flags_is_valid(fsp_flags)); - - return(fsp_flags); -} - /*************************************************************//** Convert table flag to row format string. @return row format name. */ diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc index b40d659e362..203185d55a5 100644 --- a/storage/innobase/dict/dict0load.cc +++ b/storage/innobase/dict/dict0load.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. +Copyright (c) 2016, 2017, MariaDB Corporation. This 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 @@ -811,102 +811,6 @@ dict_get_first_path( return(filepath); } -/** Gets the space name from SYS_TABLESPACES for a given space ID. -@param[in] space_id Tablespace ID -@param[in] callers_heap A heap to allocate from, may be NULL -@return Tablespace name (caller is responsible to free it) -@retval NULL if no dictionary entry was found. */ -static -char* -dict_space_get_name( - ulint space_id, - mem_heap_t* callers_heap) -{ - mtr_t mtr; - dict_table_t* sys_tablespaces; - dict_index_t* sys_index; - dtuple_t* tuple; - dfield_t* dfield; - byte* buf; - btr_pcur_t pcur; - const rec_t* rec; - const byte* field; - ulint len; - char* space_name = NULL; - mem_heap_t* heap = mem_heap_create(1024); - - ut_ad(mutex_own(&dict_sys->mutex)); - - sys_tablespaces = dict_table_get_low("SYS_TABLESPACES"); - if (sys_tablespaces == NULL) { - ut_a(!srv_sys_tablespaces_open); - return(NULL); - } - - sys_index = UT_LIST_GET_FIRST(sys_tablespaces->indexes); - - ut_ad(!dict_table_is_comp(sys_tablespaces)); - ut_ad(name_of_col_is(sys_tablespaces, sys_index, - DICT_FLD__SYS_TABLESPACES__SPACE, "SPACE")); - ut_ad(name_of_col_is(sys_tablespaces, sys_index, - DICT_FLD__SYS_TABLESPACES__NAME, "NAME")); - - tuple = dtuple_create(heap, 1); - dfield = dtuple_get_nth_field(tuple, DICT_FLD__SYS_TABLESPACES__SPACE); - - buf = static_cast(mem_heap_alloc(heap, 4)); - mach_write_to_4(buf, space_id); - - dfield_set_data(dfield, buf, 4); - dict_index_copy_types(tuple, sys_index, 1); - - mtr_start(&mtr); - - btr_pcur_open_on_user_rec(sys_index, tuple, PAGE_CUR_GE, - BTR_SEARCH_LEAF, &pcur, &mtr); - - rec = btr_pcur_get_rec(&pcur); - - /* Get the tablespace name from this SYS_TABLESPACES record. */ - if (btr_pcur_is_on_user_rec(&pcur)) { - field = rec_get_nth_field_old( - rec, DICT_FLD__SYS_TABLESPACES__SPACE, &len); - ut_a(len == 4); - - if (space_id == mach_read_from_4(field)) { - /* A record for this space ID was found. */ - field = rec_get_nth_field_old( - rec, DICT_FLD__SYS_TABLESPACES__NAME, &len); - - ut_ad(len > 0); - ut_ad(len < OS_FILE_MAX_PATH); - - if (len > 0 && len != UNIV_SQL_NULL) { - /* Found a tablespace name. */ - if (callers_heap == NULL) { - space_name = mem_strdupl( - reinterpret_cast< - const char*>(field), - len); - } else { - space_name = mem_heap_strdupl( - callers_heap, - reinterpret_cast< - const char*>(field), - len); - } - ut_ad(space_name); - } - } - } - - btr_pcur_close(&pcur); - mtr_commit(&mtr); - mem_heap_free(heap); - - return(space_name); -} - /** Update the record for space_id in SYS_TABLESPACES to this filepath. @param[in] space_id Tablespace ID @param[in] filepath Tablespace filepath @@ -1144,106 +1048,6 @@ dict_sys_tablespaces_rec_read( return(true); } -/** Load and check each general tablespace mentioned in the SYS_TABLESPACES. -Ignore system and file-per-table tablespaces. -If it is valid, add it to the file_system list. -@param[in] validate true when the previous shutdown was not clean -@return the highest space ID found. */ -UNIV_INLINE -ulint -dict_check_sys_tablespaces( - bool validate) -{ - ulint max_space_id = 0; - btr_pcur_t pcur; - const rec_t* rec; - mtr_t mtr; - - DBUG_ENTER("dict_check_sys_tablespaces"); - - ut_ad(rw_lock_own(dict_operation_lock, RW_LOCK_X)); - ut_ad(mutex_own(&dict_sys->mutex)); - - /* Before traversing it, let's make sure we have - SYS_TABLESPACES and SYS_DATAFILES loaded. */ - dict_table_get_low("SYS_TABLESPACES"); - dict_table_get_low("SYS_DATAFILES"); - - mtr_start(&mtr); - - for (rec = dict_startscan_system(&pcur, &mtr, SYS_TABLESPACES); - rec != NULL; - rec = dict_getnext_system(&pcur, &mtr)) - { - char space_name[NAME_LEN]; - ulint space_id = 0; - ulint fsp_flags; - - if (!dict_sys_tablespaces_rec_read(rec, &space_id, - space_name, &fsp_flags)) { - continue; - } - - /* Ignore system and file-per-table tablespaces. */ - if (is_system_tablespace(space_id) - || !fsp_is_shared_tablespace(fsp_flags)) { - continue; - } - - /* Ignore tablespaces that already are in the tablespace - cache. */ - if (fil_space_for_table_exists_in_mem( - space_id, space_name, false, true, NULL, 0, NULL)) { - /* Recovery can open a datafile that does not - match SYS_DATAFILES. If they don't match, update - SYS_DATAFILES. */ - char *dict_path = dict_get_first_path(space_id); - char *fil_path = fil_space_get_first_path(space_id); - if (dict_path && fil_path - && strcmp(dict_path, fil_path)) { - dict_update_filepath(space_id, fil_path); - } - ut_free(dict_path); - ut_free(fil_path); - continue; - } - - /* Set the expected filepath from the data dictionary. - If the file is found elsewhere (from an ISL or the default - location) or this path is the same file but looks different, - fil_ibd_open() will update the dictionary with what is - opened. */ - char* filepath = dict_get_first_path(space_id); - - validate = true; /* Encryption */ - - /* Check that the .ibd file exists. */ - dberr_t err = fil_ibd_open( - validate, - !srv_read_only_mode && srv_log_file_size != 0, - FIL_TYPE_TABLESPACE, - space_id, - fsp_flags, - space_name, - filepath, - NULL); - - if (err != DB_SUCCESS) { - ib::warn() << "Ignoring tablespace " - << id_name_t(space_name) - << " because it could not be opened."; - } - - max_space_id = ut_max(max_space_id, space_id); - - ut_free(filepath); - } - - mtr_commit(&mtr); - - DBUG_RETURN(max_space_id); -} - /** Read and return 5 integer fields from a SYS_TABLES record. @param[in] rec A record of SYS_TABLES @param[in] name Table Name, the same as SYS_TABLES.NAME @@ -1363,7 +1167,6 @@ dict_check_sys_tables( rec = dict_getnext_system(&pcur, &mtr)) { const byte* field; ulint len; - char* space_name; table_name_t table_name; table_id_t table_id; ulint space_id; @@ -1395,39 +1198,24 @@ dict_check_sys_tables( } if (flags2 & DICT_TF2_DISCARDED) { - ib::info() << "Ignoring tablespace " << table_name + ib::info() << "Ignoring tablespace for " << table_name << " because the DISCARD flag is set ."; ut_free(table_name.m_name); continue; } /* If the table is not a predefined tablespace then it must - be in a file-per-table or shared tablespace. + be in a file-per-table tablespace. Note that flags2 is not available for REDUNDANT tables, so don't check those. */ - ut_ad(DICT_TF_HAS_SHARED_SPACE(flags) - || !DICT_TF_GET_COMPACT(flags) + ut_ad(!DICT_TF_GET_COMPACT(flags) || flags2 & DICT_TF2_USE_FILE_PER_TABLE); - /* Look up the tablespace name in the data dictionary if this - is a shared tablespace. For file-per-table, the table_name - and the tablespace_name are the same. - Some hidden tables like FTS AUX tables may not be found in - the dictionary since they can always be found in the default - location. If so, then dict_space_get_name() will return NULL, - the space name must be the table_name, and the filepath can be - discovered in the default location.*/ - char* shared_space_name = dict_space_get_name(space_id, NULL); - space_name = shared_space_name == NULL - ? table_name.m_name - : shared_space_name; - /* Now that we have the proper name for this tablespace, - whether it is a shared tablespace or a single table - tablespace, look to see if it is already in the tablespace - cache. */ + look to see if it is already in the tablespace cache. */ if (fil_space_for_table_exists_in_mem( - space_id, space_name, false, true, NULL, 0, NULL)) { + space_id, table_name.m_name, + false, true, NULL, 0, NULL, flags)) { /* Recovery can open a datafile that does not match SYS_DATAFILES. If they don't match, update SYS_DATAFILES. */ @@ -1440,7 +1228,6 @@ dict_check_sys_tables( ut_free(dict_path); ut_free(fil_path); ut_free(table_name.m_name); - ut_free(shared_space_name); continue; } @@ -1452,33 +1239,26 @@ dict_check_sys_tables( char* filepath = dict_get_first_path(space_id); /* Check that the .ibd file exists. */ - bool is_temp = flags2 & DICT_TF2_TEMPORARY; - bool is_encrypted = flags2 & DICT_TF2_ENCRYPTION; - ulint fsp_flags = dict_tf_to_fsp_flags(flags, - is_temp, - is_encrypted); validate = true; /* Encryption */ dberr_t err = fil_ibd_open( validate, !srv_read_only_mode && srv_log_file_size != 0, FIL_TYPE_TABLESPACE, - space_id, - fsp_flags, - space_name, + space_id, dict_tf_to_fsp_flags(flags), + table_name.m_name, filepath, NULL); if (err != DB_SUCCESS) { - ib::warn() << "Ignoring tablespace " - << id_name_t(space_name) + ib::warn() << "Ignoring tablespace for " + << table_name << " because it could not be opened."; } max_space_id = ut_max(max_space_id, space_id); ut_free(table_name.m_name); - ut_free(shared_space_name); ut_free(filepath); } @@ -1488,7 +1268,6 @@ dict_check_sys_tables( } /** Check each tablespace found in the data dictionary. -Look at each general tablespace found in SYS_TABLESPACES. Then look at each table defined in SYS_TABLES that has a space_id > 0 to find all the file-per-table tablespaces. @@ -1521,16 +1300,10 @@ dict_check_tablespaces_and_store_max_id( fil_set_max_space_id_if_bigger(max_space_id); - /* Open all general tablespaces found in SYS_TABLESPACES. */ - ulint max1 = dict_check_sys_tablespaces(validate); - /* Open all tablespaces referenced in SYS_TABLES. This will update SYS_TABLESPACES and SYS_DATAFILES if it finds any file-per-table tablespaces not already there. */ - ulint max2 = dict_check_sys_tables(validate); - - /* Store the max space_id found */ - max_space_id = ut_max(max1, max2); + max_space_id = dict_check_sys_tables(validate); fil_set_max_space_id_if_bigger(max_space_id); mutex_exit(&dict_sys->mutex); @@ -2049,8 +1822,8 @@ dict_load_field_low( { const byte* field; ulint len; - ulint pos_and_prefix_len; - ulint prefix_len; + unsigned pos_and_prefix_len; + unsigned prefix_len; ibool first_field; ulint position; @@ -2254,7 +2027,7 @@ dict_load_index_low( ulint n_fields; ulint type; ulint space; - ulint merge_threshold; + unsigned merge_threshold; if (allocate) { /* If allocate=TRUE, no dict_index_t will @@ -2737,9 +2510,9 @@ dict_get_and_save_data_dir_path( dict_table_t* table, bool dict_mutex_own) { - bool is_temp = DICT_TF2_FLAG_IS_SET(table, DICT_TF2_TEMPORARY); + ut_ad(!dict_table_is_temporary(table)); - if (!is_temp && !table->data_dir_path && table->space) { + if (!table->data_dir_path && table->space) { char* path = fil_space_get_first_path(table->space); if (!dict_mutex_own) { @@ -2770,72 +2543,6 @@ dict_get_and_save_data_dir_path( } } -/** Make sure the tablespace name is saved in dict_table_t if the table -uses a general tablespace. -Try to read it from the fil_system_t first, then from SYS_TABLESPACES. -@param[in] table Table object -@param[in] dict_mutex_own) true if dict_sys->mutex is owned already */ -void -dict_get_and_save_space_name( - dict_table_t* table, - bool dict_mutex_own) -{ - /* Do this only for general tablespaces. */ - if (!DICT_TF_HAS_SHARED_SPACE(table->flags)) { - return; - } - - bool use_cache = true; - if (table->tablespace != NULL) { - - if (srv_sys_tablespaces_open - && dict_table_has_temp_general_tablespace_name( - table->tablespace)) { - /* We previous saved the temporary name, - get the real one now. */ - use_cache = false; - } else { - /* Keep and use this name */ - return; - } - } - - if (use_cache) { - fil_space_t* space = fil_space_acquire_silent(table->space); - - if (space != NULL) { - /* Use this name unless it is a temporary general - tablespace name and we can now replace it. */ - if (!srv_sys_tablespaces_open - || !dict_table_has_temp_general_tablespace_name( - space->name)) { - - /* Use this tablespace name */ - table->tablespace = mem_heap_strdup( - table->heap, space->name); - - fil_space_release(space); - return; - } - fil_space_release(space); - } - } - - /* Read it from the dictionary. */ - if (srv_sys_tablespaces_open) { - if (!dict_mutex_own) { - dict_mutex_enter_for_mysql(); - } - - table->tablespace = dict_space_get_name( - table->space, table->heap); - - if (!dict_mutex_own) { - dict_mutex_exit_for_mysql(); - } - } -} - /** Loads a table definition and also all its index definitions, and also the cluster definition if the table is a member in a cluster. Also loads all foreign key constraints where the foreign key is in the table or where @@ -2900,6 +2607,8 @@ dict_load_tablespace( mem_heap_t* heap, dict_err_ignore_t ignore_err) { + ut_ad(!dict_table_is_temporary(table)); + /* The system tablespace is always available. */ if (is_system_tablespace(table->space)) { return; @@ -2912,43 +2621,12 @@ dict_load_tablespace( return; } - if (dict_table_is_temporary(table)) { - /* Do not bother to retry opening temporary tables. */ - table->ibd_file_missing = TRUE; - return; - } - - /* A file-per-table table name is also the tablespace name. - A general tablespace name is not the same as the table name. - Use the general tablespace name if it can be read from the - dictionary, if not use 'innodb_general_##. */ - char* shared_space_name = NULL; - char* space_name; - if (DICT_TF_HAS_SHARED_SPACE(table->flags)) { - if (srv_sys_tablespaces_open) { - shared_space_name = - dict_space_get_name(table->space, NULL); - - } else { - /* Make the temporary tablespace name. */ - shared_space_name = static_cast( - ut_malloc_nokey( - strlen(general_space_name) + 20)); - - sprintf(shared_space_name, "%s_" ULINTPF, - general_space_name, - static_cast(table->space)); - } - space_name = shared_space_name; - } else { - space_name = table->name.m_name; - } + char* space_name = table->name.m_name; /* The tablespace may already be open. */ if (fil_space_for_table_exists_in_mem( table->space, space_name, false, - true, heap, table->id, table)) { - ut_free(shared_space_name); + true, heap, table->id, table, table->flags)) { return; } @@ -2973,37 +2651,20 @@ dict_load_tablespace( table->data_dir_path, table->name.m_name, IBD, true); } - - } else if (DICT_TF_HAS_SHARED_SPACE(table->flags)) { - /* Set table->tablespace from either - fil_system or SYS_TABLESPACES */ - dict_get_and_save_space_name(table, true); - - /* Set the filepath from either - fil_system or SYS_DATAFILES. */ - filepath = dict_get_first_path(table->space); - if (filepath == NULL) { - ib::warn() << "Could not find the filepath" - " for table " << table->name << - ", space ID " << table->space; - } } /* Try to open the tablespace. We set the 2nd param (fix_dict) to false because we do not have an x-lock on dict_operation_lock */ - ulint fsp_flags = dict_tf_to_fsp_flags(table->flags, - false, - dict_table_is_encrypted(table)); dberr_t err = fil_ibd_open( true, false, FIL_TYPE_TABLESPACE, table->space, - fsp_flags, space_name, filepath, table); + dict_tf_to_fsp_flags(table->flags), + space_name, filepath, table); if (err != DB_SUCCESS) { /* We failed to find a sensible tablespace file */ table->ibd_file_missing = TRUE; } - ut_free(shared_space_name); ut_free(filepath); } diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc index f4726ecd329..f4dbbf026aa 100644 --- a/storage/innobase/dict/dict0mem.cc +++ b/storage/innobase/dict/dict0mem.cc @@ -2,6 +2,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -163,10 +164,6 @@ dict_mem_table_create( table->fts = NULL; } - if (DICT_TF_HAS_SHARED_SPACE(table->flags)) { - dict_get_and_save_space_name(table, true); - } - new(&table->foreign_set) dict_foreign_set(); new(&table->referenced_set) dict_foreign_set(); @@ -1118,12 +1115,12 @@ dict_mem_table_is_system( /* table has the following format: database/table and some system table are of the form SYS_* */ if (strchr(name, '/')) { - int table_len = strlen(name); + size_t table_len = strlen(name); const char *system_db; int i = 0; while ((system_db = innobase_system_databases[i++]) && (system_db != NullS)) { - int len = strlen(system_db); + size_t len = strlen(system_db); if (table_len > len && !strncmp(name, system_db, len)) { return true; } diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc index 87502ef130c..b4d668ebbcb 100644 --- a/storage/innobase/dict/dict0stats.cc +++ b/storage/innobase/dict/dict0stats.cc @@ -1083,7 +1083,7 @@ dict_stats_analyze_index_level( on the desired level. */ btr_pcur_open_at_index_side( - true, index, BTR_SEARCH_TREE | BTR_ALREADY_S_LATCHED, + true, index, BTR_SEARCH_TREE_ALREADY_S_LATCHED, &pcur, true, level, mtr); btr_pcur_move_to_next_on_page(&pcur); @@ -1700,7 +1700,7 @@ dict_stats_analyze_index_for_n_prefix( on the desired level. */ btr_pcur_open_at_index_side( - true, index, BTR_SEARCH_TREE | BTR_ALREADY_S_LATCHED, + true, index, BTR_SEARCH_TREE_ALREADY_S_LATCHED, &pcur, true, n_diff_data->level, mtr); btr_pcur_move_to_next_on_page(&pcur); diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc index 9d04cee4165..974ec9b5c41 100644 --- a/storage/innobase/dict/dict0stats_bg.cc +++ b/storage/innobase/dict/dict0stats_bg.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This 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,8 +43,9 @@ Created Apr 25, 2012 Vasil Dimov #define SHUTTING_DOWN() (srv_shutdown_state != SRV_SHUTDOWN_NONE) -/** Event to wake up the stats thread */ -os_event_t dict_stats_event = NULL; +/** Event to wake up dict_stats_thread on dict_stats_recalc_pool_add() +or shutdown. Not protected by any mutex. */ +os_event_t dict_stats_event; /** Variable to initiate shutdown the dict stats thread. Note we don't use 'srv_shutdown_state' because we want to shutdown dict stats thread @@ -399,10 +401,7 @@ statistics. @return this function does not return, it calls os_thread_exit() */ extern "C" os_thread_ret_t -DECLARE_THREAD(dict_stats_thread)( -/*==============================*/ - void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter - required by os_thread_create */ +DECLARE_THREAD(dict_stats_thread)(void*) { ut_a(!srv_read_only_mode); @@ -412,8 +411,6 @@ DECLARE_THREAD(dict_stats_thread)( */ #endif /* UNIV_PFS_THREAD */ - srv_dict_stats_thread_active = TRUE; - while (!dict_stats_start_shutdown) { /* Wake up periodically even if not signaled. This is @@ -445,7 +442,7 @@ DECLARE_THREAD(dict_stats_thread)( os_event_reset(dict_stats_event); } - srv_dict_stats_thread_active = FALSE; + srv_dict_stats_thread_active = false; os_event_set(dict_stats_shutdown_event); my_thread_end(); diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc index fd1cc24c92a..ccec6191ed4 100644 --- a/storage/innobase/fil/fil0crypt.cc +++ b/storage/innobase/fil/fil0crypt.cc @@ -1,6 +1,6 @@ /***************************************************************************** Copyright (C) 2013, 2015, Google Inc. All Rights Reserved. -Copyright (C) 2014, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2014, 2017, MariaDB Corporation. All Rights Reserved. This 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,14 +24,16 @@ Modified Jan Lindström jan.lindstrom@mariadb.com *******************************************************/ #include "fil0fil.h" +#include "mach0data.h" +#include "page0size.h" +#include "page0zip.h" +#ifndef UNIV_INNOCHECKSUM #include "fil0crypt.h" #include "srv0srv.h" #include "srv0start.h" -#include "mach0data.h" #include "log0recv.h" #include "mtr0mtr.h" #include "mtr0log.h" -#include "page0zip.h" #include "ut0ut.h" #include "btr0scrub.h" #include "fsp0fsp.h" @@ -52,7 +54,7 @@ UNIV_INTERN ulong srv_encrypt_tables = 0; UNIV_INTERN uint srv_n_fil_crypt_threads = 0; /** No of key rotation threads started */ -static uint srv_n_fil_crypt_threads_started = 0; +UNIV_INTERN uint srv_n_fil_crypt_threads_started = 0; /** At this age or older a space/page will be rotated */ UNIV_INTERN uint srv_fil_crypt_rotate_key_age = 1; @@ -61,7 +63,7 @@ UNIV_INTERN uint srv_fil_crypt_rotate_key_age = 1; static os_event_t fil_crypt_event; /** Event to signal TO the key rotation threads. */ -static os_event_t fil_crypt_threads_event; +UNIV_INTERN os_event_t fil_crypt_threads_event; /** Event for waking up threads throttle */ static os_event_t fil_crypt_throttle_sleep_event; @@ -627,10 +629,11 @@ fil_space_encrypt( ulint orig_page_type = mach_read_from_2(src_frame+FIL_PAGE_TYPE); - if (orig_page_type==FIL_PAGE_TYPE_FSP_HDR - || orig_page_type==FIL_PAGE_TYPE_XDES) { - /* File space header or extent descriptor do not need to be - encrypted. */ + if (orig_page_type == FIL_PAGE_TYPE_FSP_HDR || + orig_page_type == FIL_PAGE_TYPE_XDES || + orig_page_type == FIL_PAGE_RTREE) { + /* File space header, extent descriptor or spatial index + are not encrypted. */ return src_frame; } @@ -910,81 +913,6 @@ fil_crypt_calculate_checksum( return checksum; } -/********************************************************************* -Verify checksum for a page (iff it's encrypted) -NOTE: currently this function can only be run in single threaded mode -as it modifies srv_checksum_algorithm (temporarily) -@return true if page is encrypted AND OK, false otherwise */ -UNIV_INTERN -bool -fil_space_verify_crypt_checksum( -/*============================*/ - const byte* src_frame, /*!< in: page the verify */ - const page_size_t& page_size) /*!< in: page size */ -{ - // key version - uint key_version = mach_read_from_4( - src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION); - - if (key_version == 0) { - return false; // unencrypted page - } - - /* "trick" the normal checksum routines by storing the post-encryption - * checksum into the normal checksum field allowing for reuse of - * the normal routines */ - - // post encryption checksum - ib_uint32_t stored_post_encryption = mach_read_from_4( - src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION + 4); - - // save pre encryption checksum for restore in end of this function - ib_uint32_t stored_pre_encryption = mach_read_from_4( - src_frame + FIL_PAGE_SPACE_OR_CHKSUM); - - ib_uint32_t checksum_field2 = mach_read_from_4( - src_frame + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM); - - /** prepare frame for usage of normal checksum routines */ - mach_write_to_4(const_cast(src_frame) + FIL_PAGE_SPACE_OR_CHKSUM, - stored_post_encryption); - - /* NOTE: this function is (currently) only run when restoring - * dblwr-buffer, server is single threaded so it's safe to modify - * srv_checksum_algorithm */ - srv_checksum_algorithm_t save_checksum_algorithm = - (srv_checksum_algorithm_t)srv_checksum_algorithm; - - if (!page_size.is_compressed() && - (save_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_INNODB || - save_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_INNODB)) { - /* handle ALGORITHM_INNODB specially, - * "downgrade" to ALGORITHM_INNODB and store BUF_NO_CHECKSUM_MAGIC - * checksum_field2 is sort of pointless anyway... - */ - srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_INNODB; - mach_write_to_4(const_cast(src_frame) + - UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, - BUF_NO_CHECKSUM_MAGIC); - } - - /* verify checksums */ - ibool corrupted = buf_page_is_corrupted(false, src_frame, page_size, false); - - /** restore frame & algorithm */ - srv_checksum_algorithm = save_checksum_algorithm; - - mach_write_to_4(const_cast(src_frame) + - FIL_PAGE_SPACE_OR_CHKSUM, - stored_pre_encryption); - - mach_write_to_4(const_cast(src_frame) + - UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, - checksum_field2); - - return (!corrupted); -} - /***********************************************************************/ /** A copy of global key state */ @@ -1273,17 +1201,28 @@ struct rotate_thread_t { uint estimated_max_iops; /*!< estimation of max iops */ uint allocated_iops; /*!< allocated iops */ uint cnt_waited; /*!< #times waited during this slot */ - uint sum_waited_us; /*!< wait time during this slot */ + uintmax_t sum_waited_us; /*!< wait time during this slot */ fil_crypt_stat_t crypt_stat; // statistics btr_scrub_t scrub_data; /* thread local data used by btr_scrub-functions * when iterating pages of tablespace */ - /* check if this thread should shutdown */ + /** @return whether this thread should terminate */ bool should_shutdown() const { - return ! (srv_shutdown_state == SRV_SHUTDOWN_NONE && - thread_no < srv_n_fil_crypt_threads); + switch (srv_shutdown_state) { + case SRV_SHUTDOWN_NONE: + case SRV_SHUTDOWN_CLEANUP: + return thread_no >= srv_n_fil_crypt_threads; + case SRV_SHUTDOWN_EXIT_THREADS: + /* srv_init_abort() must have been invoked */ + case SRV_SHUTDOWN_FLUSH_PHASE: + return true; + case SRV_SHUTDOWN_LAST_PHASE: + break; + } + ut_ad(0); + return true; } }; @@ -1788,7 +1727,7 @@ fil_crypt_get_page_throttle_func( mtr_t* mtr, /*!< in/out: minitransaction */ ulint* sleeptime_ms, /*!< out: sleep time */ const char* file, /*!< in: file name */ - ulint line) /*!< in: file line */ + unsigned line) /*!< in: file line */ { const page_id_t& page_id = page_id_t(space, offset); dberr_t err = DB_SUCCESS; @@ -2451,17 +2390,6 @@ fil_crypt_threads_init() } } -/********************************************************************* -End threads for key rotation */ -UNIV_INTERN -void -fil_crypt_threads_end() -/*===================*/ -{ - /* stop threads */ - fil_crypt_set_thread_cnt(0); -} - /********************************************************************* Clean up key rotation threads resources */ UNIV_INTERN @@ -2469,6 +2397,10 @@ void fil_crypt_threads_cleanup() /*=======================*/ { + if (!fil_crypt_threads_inited) { + return; + } + ut_a(!srv_n_fil_crypt_threads_started); os_event_destroy(fil_crypt_event); os_event_destroy(fil_crypt_threads_event); mutex_free(&fil_crypt_threads_mutex); @@ -2526,8 +2458,8 @@ fil_space_crypt_close_tablespace( return; } - uint start = time(0); - uint last = start; + time_t start = time(0); + time_t last = start; mutex_enter(&crypt_data->mutex); mutex_exit(&fil_crypt_threads_mutex); @@ -2549,7 +2481,7 @@ fil_space_crypt_close_tablespace( cnt = crypt_data->rotate_state.active_threads; flushing = crypt_data->rotate_state.flushing; - uint now = time(0); + time_t now = time(0); if (now >= last + 30) { ib::warn() << "Waited " @@ -2670,3 +2602,93 @@ fil_space_get_scrub_status( return crypt_data == NULL ? 1 : 0; } +#endif /* UNIV_INNOCHECKSUM */ + +/********************************************************************* +Verify checksum for a page (iff it's encrypted) +NOTE: currently this function can only be run in single threaded mode +as it modifies srv_checksum_algorithm (temporarily) +@param[in] src_fame page to verify +@param[in] page_size page_size +@param[in] page_no page number of given read_buf +@param[in] strict_check true if strict-check option is enabled +@return true if page is encrypted AND OK, false otherwise */ +UNIV_INTERN +bool +fil_space_verify_crypt_checksum( +/*============================*/ + const byte* src_frame, /*!< in: page the verify */ + const page_size_t& page_size /*!< in: page size */ +#ifdef UNIV_INNOCHECKSUM + ,uintmax_t page_no, + bool strict_check +#endif /* UNIV_INNOCHECKSUM */ +) +{ + // key version + uint key_version = mach_read_from_4( + src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION); + + if (key_version == 0) { + return false; // unencrypted page + } + + /* "trick" the normal checksum routines by storing the post-encryption + * checksum into the normal checksum field allowing for reuse of + * the normal routines */ + + // post encryption checksum + ib_uint32_t stored_post_encryption = mach_read_from_4( + src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION + 4); + + // save pre encryption checksum for restore in end of this function + ib_uint32_t stored_pre_encryption = mach_read_from_4( + src_frame + FIL_PAGE_SPACE_OR_CHKSUM); + + ib_uint32_t checksum_field2 = mach_read_from_4( + src_frame + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM); + + /** prepare frame for usage of normal checksum routines */ + mach_write_to_4(const_cast(src_frame) + FIL_PAGE_SPACE_OR_CHKSUM, + stored_post_encryption); + + /* NOTE: this function is (currently) only run when restoring + * dblwr-buffer, server is single threaded so it's safe to modify + * srv_checksum_algorithm */ + srv_checksum_algorithm_t save_checksum_algorithm = + (srv_checksum_algorithm_t)srv_checksum_algorithm; + + if (!page_size.is_compressed() && + (save_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_INNODB || + save_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_INNODB)) { + /* handle ALGORITHM_INNODB specially, + * "downgrade" to ALGORITHM_INNODB and store BUF_NO_CHECKSUM_MAGIC + * checksum_field2 is sort of pointless anyway... + */ + srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_INNODB; + mach_write_to_4(const_cast(src_frame) + + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, + BUF_NO_CHECKSUM_MAGIC); + } + + /* verify checksums */ + bool corrupted = buf_page_is_corrupted(false, src_frame, + page_size, false +#ifdef UNIV_INNOCHECKSUM + ,page_no, strict_check, false, NULL +#endif /* UNIV_INNOCHECKSUM */ + ); + + /** restore frame & algorithm */ + srv_checksum_algorithm = save_checksum_algorithm; + + mach_write_to_4(const_cast(src_frame) + + FIL_PAGE_SPACE_OR_CHKSUM, + stored_pre_encryption); + + mach_write_to_4(const_cast(src_frame) + + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, + checksum_field2); + + return (!corrupted); +} diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 60ed4e01422..9413a2b3cba 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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,7 @@ Created 10/25/1995 Heikki Tuuri #include "srv0start.h" #include "trx0purge.h" #include "ut0new.h" +#include "os0api.h" /** Tries to close a file in the LRU list. The caller must hold the fil_sys mutex. @@ -128,18 +129,13 @@ out of the LRU-list and keep a count of pending operations. When an operation completes, we decrement the count and return the file node to the LRU-list if the count drops to zero. */ -/** This tablespace name is used internally during recovery to open a -general tablespace before the data dictionary are recovered and available. */ -const char general_space_name[] = "innodb_general"; - /** Reference to the server data directory. Usually it is the current working directory ".", but in the MySQL Embedded Server Library it is an absolute path. */ const char* fil_path_to_mysql_datadir; -Folder folder_mysql_datadir; /** Common InnoDB file extentions */ -const char* dot_ext[] = { "", ".ibd", ".isl", ".cfg", ".cfp" }; +const char* dot_ext[] = { "", ".ibd", ".isl", ".cfg" }; /** The number of fsyncs done to the log */ ulint fil_n_log_flushes = 0; @@ -160,14 +156,10 @@ initialized. */ fil_system_t* fil_system = NULL; /** Determine if user has explicitly disabled fsync(). */ -#ifndef _WIN32 # define fil_buffering_disabled(s) \ ((s)->purpose == FIL_TYPE_TABLESPACE \ - && srv_unix_file_flush_method \ - == SRV_UNIX_O_DIRECT_NO_FSYNC) -#else /* _WIN32 */ -# define fil_buffering_disabled(s) (0) -#endif /* __WIN32 */ + && srv_file_flush_method \ + == SRV_O_DIRECT_NO_FSYNC) /** Determine if the space id is a user tablespace id or not. @param[in] space_id Space ID to check @@ -220,12 +212,13 @@ fil_space_belongs_in_lru( const fil_space_t* space) /*!< in: file space */ { switch (space->purpose) { + case FIL_TYPE_TEMPORARY: case FIL_TYPE_LOG: return(false); case FIL_TYPE_TABLESPACE: - case FIL_TYPE_TEMPORARY: - case FIL_TYPE_IMPORT: return(fil_is_user_tablespace_id(space->id)); + case FIL_TYPE_IMPORT: + return(true); } ut_ad(0); @@ -284,7 +277,7 @@ fil_read( void* buf) { return(fil_io(IORequestRead, true, page_id, page_size, - byte_offset, len, buf, NULL, NULL)); + byte_offset, len, buf, NULL)); } /** Writes data to a space from a buffer. Remember that the possible incomplete @@ -312,7 +305,7 @@ fil_write( ut_ad(!srv_read_only_mode); return(fil_io(IORequestWrite, true, page_id, page_size, - byte_offset, len, buf, NULL, NULL)); + byte_offset, len, buf, NULL)); } /*******************************************************************//** @@ -475,42 +468,13 @@ fil_space_is_flushed( return(true); } -#ifdef UNIV_LINUX - -#include -/** FusionIO atomic write control info */ -#define DFS_IOCTL_ATOMIC_WRITE_SET _IOW(0x95, 2, uint) - -/** -Try and enable FusionIO atomic writes. -@param[in] file OS file handle -@return true if successful */ -bool -fil_fusionio_enable_atomic_write(os_file_t file) -{ - if (srv_unix_file_flush_method == SRV_UNIX_O_DIRECT) { - - uint atomic = 1; - - ut_a(file != -1); - - if (ioctl(file, DFS_IOCTL_ATOMIC_WRITE_SET, &atomic) != -1) { - - return(true); - } - } - - return(false); -} -#endif /* UNIV_LINUX */ /** Append a file to the chain of files of a space. @param[in] name file name of a file that is not open @param[in] size file size in entire database blocks @param[in,out] space tablespace from fil_space_create() @param[in] is_raw whether this is a raw device or partition -@param[in] punch_hole true if supported for this node -@param[in] atomic_write true if the file has atomic write enabled +@param[in] atomic_write true if the file could use atomic write @param[in] max_pages maximum number of pages in file, ULINT_MAX means the file size is unlimited. @return pointer to the file name @@ -522,7 +486,6 @@ fil_node_create_low( ulint size, fil_space_t* space, bool is_raw, - bool punch_hole, bool atomic_write, ulint max_pages = ULINT_MAX) { @@ -537,6 +500,8 @@ fil_node_create_low( node = reinterpret_cast(ut_zalloc_nokey(sizeof(*node))); + node->handle = OS_FILE_CLOSED; + node->name = mem_strdup(name); ut_a(!is_raw || srv_start_raw_disk_in_use); @@ -558,40 +523,6 @@ fil_node_create_low( node->space = space; - os_file_stat_t stat_info; - -#ifdef UNIV_DEBUG - dberr_t err = -#endif /* UNIV_DEBUG */ - - os_file_get_status( - node->name, &stat_info, false, - fsp_is_system_temporary(space->id) ? true : srv_read_only_mode); - - ut_ad(err == DB_SUCCESS); - - node->block_size = stat_info.block_size; - - /* In this debugging mode, we can overcome the limitation of some - OSes like Windows that support Punch Hole but have a hole size - effectively too large. By setting the block size to be half the - page size, we can bypass one of the checks that would normally - turn Page Compression off. This execution mode allows compression - to be tested even when full punch hole support is not available. */ - DBUG_EXECUTE_IF("ignore_punch_hole", - node->block_size = ut_min(stat_info.block_size, - static_cast(UNIV_PAGE_SIZE / 2)); - ); - - if (!IORequest::is_punch_hole_supported() - || !punch_hole - || node->block_size >= srv_page_size) { - - fil_no_punch_hole(node); - } else { - node->punch_hole = punch_hole; - } - node->atomic_write = atomic_write; UT_LIST_ADD_LAST(space->chain, node); @@ -606,7 +537,7 @@ fil_node_create_low( an integer @param[in,out] space space where to append @param[in] is_raw true if a raw device or a raw disk partition -@param[in] atomic_write true if the file has atomic write enabled +@param[in] atomic_write true if the file could use atomic write @param[in] max_pages maximum number of pages in file, ULINT_MAX means the file size is unlimited. @return pointer to the file name @@ -623,8 +554,7 @@ fil_node_create( fil_node_t* node; node = fil_node_create_low( - name, size, space, is_raw, IORequest::is_punch_hole_supported(), - atomic_write, max_pages); + name, size, space, is_raw, atomic_write, max_pages); return(node == NULL ? NULL : node->name); } @@ -640,22 +570,19 @@ fil_node_open_file( { os_offset_t size_bytes; bool success; - byte* buf2; - byte* page; - ulint flags; - ulint min_size; - ulint space_id; bool read_only_mode; fil_space_t* space = node->space; ut_ad(mutex_own(&fil_system->mutex)); ut_a(node->n_pending == 0); - ut_a(!node->is_open); + ut_a(!node->is_open()); read_only_mode = !fsp_is_system_temporary(space->id) && srv_read_only_mode; - if (node->size == 0 + const bool first_time_open = node->size == 0; + + if (first_time_open || (space->purpose == FIL_TYPE_TABLESPACE && node == UT_LIST_GET_FIRST(space->chain) && !undo::Truncate::was_tablespace_truncated(space->id) @@ -690,110 +617,80 @@ retry: ut_a(size_bytes != (os_offset_t) -1); ut_a(space->purpose != FIL_TYPE_LOG); + const page_size_t page_size(space->flags); + const ulint psize = page_size.physical(); + const ulint min_size = FIL_IBD_FILE_INITIAL_SIZE + * psize; + + if (size_bytes < min_size) { + ib::error() << "The size of the file " << node->name + << " is only " << size_bytes + << " bytes, should be at least " << min_size; + os_file_close(node->handle); + return(false); + } /* Read the first page of the tablespace */ - buf2 = static_cast(ut_malloc_nokey(2 * UNIV_PAGE_SIZE)); + byte* buf2 = static_cast(ut_malloc_nokey(2 * psize)); /* Align the memory for file i/o if we might have O_DIRECT set */ - page = static_cast(ut_align(buf2, UNIV_PAGE_SIZE)); - ut_ad(page == page_align(page)); + byte* page = static_cast(ut_align(buf2, psize)); IORequest request(IORequest::READ); success = os_file_read( request, - node->handle, page, 0, UNIV_PAGE_SIZE); + node->handle, page, 0, psize); srv_stats.page0_read.add(1); - space_id = fsp_header_get_space_id(page); - flags = fsp_header_get_flags(page); - - /* Close the file now that we have read the space id from it */ - + const ulint space_id + = fsp_header_get_space_id(page); + ulint flags = fsp_header_get_flags(page); + const ulint size = fsp_header_get_field( + page, FSP_SIZE); + const ulint free_limit = fsp_header_get_field( + page, FSP_FREE_LIMIT); + const ulint free_len = flst_get_len( + FSP_HEADER_OFFSET + FSP_FREE + page); + ut_free(buf2); os_file_close(node->handle); - const page_size_t page_size(flags); - - min_size = FIL_IBD_FILE_INITIAL_SIZE * page_size.physical(); - - if (size_bytes < min_size) { - - ib::error() << "The size of tablespace " << space_id << " file " - << node->name << " is only " << size_bytes - << ", should be at least " << min_size << "!"; - - ut_error; - } - - if (space->flags != flags) { - ulint sflags = (space->flags & ~FSP_FLAGS_MASK_DATA_DIR); - ulint fflags = (flags & ~FSP_FLAGS_MASK_DATA_DIR_ORACLE); - - /* DATA_DIR option is on different place on MariaDB - compared to MySQL. If this is the difference. Fix - it. */ - - if (sflags == fflags) { - ib::warn() - << "Tablespace " << space_id - << " flags " << space->flags - << " in the data dictionary but in file " << node->name - << " are " << flags - << ". Temporally corrected because DATA_DIR option to " - << space->flags; - - flags = space->flags; - } else { - ib::fatal() - << "Table flags are " - << ib::hex(space->flags) << " in the data" - " dictionary but the flags in file " - << node->name << " are " << ib::hex(flags) - << "!"; - } - } - - - { - ulint size = fsp_header_get_field( - page, FSP_SIZE); - ulint free_limit = fsp_header_get_field( - page, FSP_FREE_LIMIT); - ulint free_len = flst_get_len( - FSP_HEADER_OFFSET + FSP_FREE + page); - - ut_ad(space->free_limit == 0 - || space->free_limit == free_limit); - ut_ad(space->free_len == 0 - || space->free_len == free_len); - space->size_in_header = size; - space->free_limit = free_limit; - space->free_len = free_len; - } - - ut_free(buf2); - -#ifdef MYSQL_ENCRYPTION - /* For encrypted tablespace, we need to check the - encrytion key and iv(initial vector) is readed. */ - if (FSP_FLAGS_GET_ENCRYPTION(flags) - && !recv_recovery_is_on()) { - if (space->encryption_type != Encryption::AES) { + if (!fsp_flags_is_valid(flags)) { + ulint cflags = fsp_flags_convert_from_101(flags); + if (cflags == ULINT_UNDEFINED) { ib::error() - << "Can't read encryption" - << " key from file " - << node->name << "!"; + << "Expected tablespace flags " + << ib::hex(flags) + << " but found " << ib::hex(flags) + << " in the file " << node->name; return(false); } - } -#endif - if (node->size == 0) { + flags = cflags; + } + + if (UNIV_UNLIKELY(space_id != space->id)) { + ib::error() + << "Expected tablespace id " << space->id + << " but found " << space_id + << "in the file" << node->name; + return(false); + } + + ut_ad(space->free_limit == 0 + || space->free_limit == free_limit); + ut_ad(space->free_len == 0 + || space->free_len == free_len); + space->size_in_header = size; + space->free_limit = free_limit; + space->free_len = free_len; + + if (first_time_open) { ulint extent_size; - extent_size = page_size.physical() * FSP_EXTENT_SIZE; + extent_size = psize * FSP_EXTENT_SIZE; /* After apply-incremental, tablespaces are not extended to a whole megabyte. Do not cut off valid data. */ @@ -804,9 +701,7 @@ retry: extent_size); } - node->size = (ulint) - (size_bytes / page_size.physical()); - + node->size = static_cast(size_bytes / psize); space->size += node->size; } } @@ -829,11 +724,27 @@ retry: node->handle = os_file_create( innodb_data_file_key, node->name, OS_FILE_OPEN, OS_FILE_AIO, OS_DATA_FILE, read_only_mode, &success); - } + + if (first_time_open) { + /* + Atomic writes is supported if the file can be used + with atomic_writes (not log file), O_DIRECT is + used (tested in ha_innodb.cc) and the file is + device and file system that supports atomic writes + for the given block size + */ + space->atomic_write_supported + = srv_use_atomic_writes + && node->atomic_write + && my_test_if_atomic_write( + node->handle, + int(page_size_t(space->flags) + .physical())); + } + } ut_a(success); - - node->is_open = true; + ut_a(node->is_open()); fil_system->n_open++; fil_n_file_opened++; @@ -857,20 +768,22 @@ fil_node_close_file( bool ret; ut_ad(mutex_own(&(fil_system->mutex))); - ut_a(node->is_open); + ut_a(node->is_open()); ut_a(node->n_pending == 0); ut_a(node->n_pending_flushes == 0); ut_a(!node->being_extended); ut_a(node->modification_counter == node->flush_counter || node->space->purpose == FIL_TYPE_TEMPORARY - || srv_fast_shutdown == 2); + || srv_fast_shutdown == 2 + || !srv_was_started); ret = os_file_close(node->handle); ut_a(ret); /* printf("Closing file %s\n", node->name); */ - node->is_open = false; + node->handle = OS_FILE_CLOSED; + ut_ad(!node->is_open()); ut_a(fil_system->n_open > 0); fil_system->n_open--; fil_n_file_opened--; @@ -992,7 +905,7 @@ fil_flush_low(fil_space_t* space) continue; } - ut_a(node->is_open); + ut_a(node->is_open()); switch (space->purpose) { case FIL_TYPE_TEMPORARY: @@ -1035,7 +948,7 @@ retry: goto retry; } - ut_a(node->is_open); + ut_a(node->is_open()); node->n_pending_flushes++; mutex_exit(&fil_system->mutex); @@ -1115,7 +1028,7 @@ fil_write_zeros( err = os_aio( request, OS_AIO_SYNC, node->name, node->handle, buf, offset, n_bytes, read_only_mode, - NULL, NULL, NULL); + NULL, NULL); if (err != DB_SUCCESS) { break; @@ -1134,6 +1047,7 @@ fil_write_zeros( return(err); } + /** Try to extend a tablespace. @param[in,out] space tablespace to be extended @param[in,out] node last file of the tablespace @@ -1218,10 +1132,9 @@ fil_space_extend_must_retry( " Operating system error number " << ret << ". Check" " that the disk is not full or a disk quota" - " exceeded. Make sure the file system supports" - " this function. Some operating system error" + " exceeded. Some operating system error" " numbers are described at " REFMAN - " operating-system-error-codes.html"; + "operating-system-error-codes.html"; } else #endif if (DB_SUCCESS != fil_write_zeros( @@ -1268,9 +1181,8 @@ fil_space_extend_must_retry( fil_flush_low(space); return(false); default: - // TODO: reject CREATE TEMPORARY TABLE...ROW_FORMAT=COMPRESSED ut_ad(space->purpose == FIL_TYPE_TABLESPACE - || space->purpose == FIL_TYPE_TEMPORARY); + || space->purpose == FIL_TYPE_IMPORT); if (space->purpose == FIL_TYPE_TABLESPACE) { fil_flush_low(space); } @@ -1354,7 +1266,7 @@ fil_mutex_enter_and_prepare_for_io( the insert buffer. The insert buffer is in tablespace 0, and we cannot end up waiting in this function. */ - } else if (!node || node->is_open) { + } else if (!node || node->is_open()) { /* If the file is already open, no need to do anything; if the space does not exist, we handle the situation in the function which called this @@ -1385,7 +1297,7 @@ fil_mutex_enter_and_prepare_for_io( } } - if (ulint size = UNIV_UNLIKELY(space->recv_size)) { + if (ulint size = ulint(UNIV_UNLIKELY(space->recv_size))) { ut_ad(node); bool success; if (fil_space_extend_must_retry(space, node, size, @@ -1459,7 +1371,7 @@ fil_node_close_to_free( ut_a(node->n_pending == 0); ut_a(!node->being_extended); - if (node->is_open) { + if (node->is_open()) { /* We fool the assertion in fil_node_close_file() to think there are no unflushed modifications in the file */ @@ -1533,7 +1445,8 @@ fil_space_free_low( fil_space_t* space) { /* The tablespace must not be in fil_system->named_spaces. */ - ut_ad(srv_fast_shutdown == 2 || space->max_lsn == 0); + ut_ad(srv_fast_shutdown == 2 || !srv_was_started + || space->max_lsn == 0); for (fil_node_t* node = UT_LIST_GET_FIRST(space->chain); node != NULL; ) { @@ -1625,8 +1538,9 @@ fil_space_create( fil_space_t* space; ut_ad(fil_system); - ut_ad(fsp_flags_is_valid(flags)); - ut_ad(srv_page_size == UNIV_PAGE_SIZE_ORIG || flags != 0); + ut_ad(fsp_flags_is_valid(flags & ~FSP_FLAGS_MEM_MASK)); + ut_ad(purpose == FIL_TYPE_LOG + || srv_page_size == UNIV_PAGE_SIZE_ORIG || flags != 0); DBUG_EXECUTE_IF("fil_space_create_failure", return(NULL);); @@ -1691,14 +1605,17 @@ fil_space_create( space->page_0_crypt_read = true; } -#ifdef UNIV_DEBUG - ib::info() << "Created tablespace for space " << space->id - << " name " << space->name - << " key_id " << (space->crypt_data ? space->crypt_data->key_id : 0) - << " encryption " << (space->crypt_data ? space->crypt_data->encryption : 0); -#endif - - space->encryption_type = Encryption::NONE; + DBUG_LOG("tablespace", + "Tablespace for space " << id << " name " << name + << (create_table ? " created" : " opened")); + if (crypt_data) { + DBUG_LOG("crypt", + "Tablespace " << id << " name " << name + << " encryption " << crypt_data->encryption + << " key id " << crypt_data->key_id + << ":" << fil_crypt_get_mode(crypt_data) + << " " << fil_crypt_get_type(crypt_data)); + } rw_lock_create(fil_space_latch_key, &space->latch, SYNC_FSP); @@ -1718,14 +1635,6 @@ fil_space_create( fil_system->max_assigned_id = id; } - if (crypt_data) { - space->read_page0 = true; - /* If table could be encrypted print info */ - ib::info() << "Tablespace ID " << id << " name " << space->name - << ":" << fil_crypt_get_mode(crypt_data) - << " " << fil_crypt_get_type(crypt_data); - } - mutex_exit(&fil_system->mutex); return(space); @@ -1958,20 +1867,6 @@ fil_space_get_flags( return(flags); } -/** Check if table is mark for truncate. -@param[in] id space id -@return true if tablespace is marked for truncate. */ -bool -fil_space_is_being_truncated( - ulint id) -{ - bool mark_for_truncate; - mutex_enter(&fil_system->mutex); - mark_for_truncate = fil_space_get_by_id(id)->is_being_truncated; - mutex_exit(&fil_system->mutex); - return(mark_for_truncate); -} - /** Open each fil_node_t of a named fil_space_t if not already open. @param[in] name Tablespace name @return true if all nodes are open */ @@ -1990,7 +1885,7 @@ fil_space_open( node != NULL; node = UT_LIST_GET_NEXT(chain, node)) { - if (!node->is_open + if (!node->is_open() && !fil_node_open_file(node)) { mutex_exit(&fil_system->mutex); return(false); @@ -2024,7 +1919,7 @@ fil_space_close( node != NULL; node = UT_LIST_GET_NEXT(chain, node)) { - if (node->is_open) { + if (node->is_open()) { fil_node_close_file(node); } } @@ -2115,7 +2010,7 @@ fil_open_log_and_system_tablespace_files(void) node != NULL; node = UT_LIST_GET_NEXT(chain, node)) { - if (!node->is_open) { + if (!node->is_open()) { if (!fil_node_open_file(node)) { /* This func is called during server's startup. If some file of log or system @@ -2160,6 +2055,7 @@ fil_close_all_files(void) /* At shutdown, we should not have any files in this list. */ ut_ad(srv_fast_shutdown == 2 + || !srv_was_started || UT_LIST_GET_LEN(fil_system->named_spaces) == 0); mutex_enter(&fil_system->mutex); @@ -2173,7 +2069,7 @@ fil_close_all_files(void) node != NULL; node = UT_LIST_GET_NEXT(chain, node)) { - if (node->is_open) { + if (node->is_open()) { fil_node_close_file(node); } } @@ -2186,6 +2082,7 @@ fil_close_all_files(void) mutex_exit(&fil_system->mutex); ut_ad(srv_fast_shutdown == 2 + || !srv_was_started || UT_LIST_GET_LEN(fil_system->named_spaces) == 0); } @@ -2219,7 +2116,7 @@ fil_close_log_files( node != NULL; node = UT_LIST_GET_NEXT(chain, node)) { - if (node->is_open) { + if (node->is_open()) { fil_node_close_file(node); } } @@ -2413,6 +2310,7 @@ fil_op_write_log( ulint len; ut_ad(first_page_no == 0); + ut_ad(fsp_flags_is_valid(flags)); /* fil_name_parse() requires that there be at least one path separator and that the file path end with ".ibd". */ @@ -2633,7 +2531,7 @@ fil_recreate_tablespace( /* Align the memory for file i/o */ page = static_cast(ut_align(buf, UNIV_PAGE_SIZE)); - flags = fsp_flags_set_page_size(flags, univ_page_size); + flags |= FSP_FLAGS_PAGE_SSIZE(); fsp_header_init_fields(page, space_id, flags); @@ -2709,13 +2607,11 @@ fil_recreate_tablespace( byte* page = buf_block_get_frame(block); - if (!fsp_flags_is_compressed(flags)) { - + if (!FSP_FLAGS_GET_ZIP_SSIZE(flags)) { ut_ad(!page_size.is_compressed()); buf_flush_init_for_writing( - block, page, NULL, recv_lsn, - fsp_is_checksum_disabled(space_id)); + block, page, NULL, recv_lsn, false); err = fil_write(cur_page_id, page_size, 0, page_size.physical(), page); @@ -3157,13 +3053,7 @@ fil_delete_tablespace( /* Delete the link file pointing to the ibd file we are deleting. */ if (FSP_FLAGS_HAS_DATA_DIR(space->flags)) { - RemoteDatafile::delete_link_file(space->name); - - } else if (FSP_FLAGS_GET_SHARED(space->flags)) { - - RemoteDatafile::delete_link_file(base_name(path)); - } mutex_enter(&fil_system->mutex); @@ -3240,7 +3130,7 @@ fil_truncate_tablespace( fil_node_t* node = UT_LIST_GET_FIRST(space->chain); - ut_ad(node->is_open); + ut_ad(node->is_open()); space->size = node->size = size_in_pages; @@ -3373,30 +3263,6 @@ fil_space_dec_redo_skipped_count( mutex_exit(&fil_system->mutex); } - -/** -Check whether a single-table tablespace is redo skipped. -@param[in] id space id -@return true if redo skipped */ -bool -fil_space_is_redo_skipped( - ulint id) -{ - fil_space_t* space; - bool is_redo_skipped; - - mutex_enter(&fil_system->mutex); - - space = fil_space_get_by_id(id); - - ut_a(space != NULL); - - is_redo_skipped = space->redo_skipped_count > 0; - - mutex_exit(&fil_system->mutex); - - return(is_redo_skipped); -} #endif /* UNIV_DEBUG */ /*******************************************************************//** @@ -3678,7 +3544,7 @@ func_exit: } else if (node->modification_counter > node->flush_counter) { /* Flush the space */ sleep = flush = true; - } else if (node->is_open) { + } else if (node->is_open()) { /* Close the file */ fil_node_close_file(node); @@ -3773,10 +3639,9 @@ func_exit: return(success); } -/** Create a new General or Single-Table tablespace +/** Create a tablespace file. @param[in] space_id Tablespace ID @param[in] name Tablespace name in dbname/tablename format. -For general tablespaces, the 'dbname/' part may be missing. @param[in] path Path and filename of the datafile to create. @param[in] flags Tablespace flags @param[in] size Initial size of the tablespace file in @@ -3799,9 +3664,7 @@ fil_ibd_create( byte* buf2; byte* page; bool success; - bool is_temp = FSP_FLAGS_GET_TEMPORARY(flags); - bool has_data_dir = FSP_FLAGS_HAS_DATA_DIR(flags); - bool has_shared_space = FSP_FLAGS_GET_SHARED(flags); + bool has_data_dir = FSP_FLAGS_HAS_DATA_DIR(flags) != 0; fil_space_t* space = NULL; fil_space_crypt_t *crypt_data = NULL; @@ -3809,15 +3672,13 @@ fil_ibd_create( ut_ad(!srv_read_only_mode); ut_a(space_id < SRV_LOG_SPACE_FIRST_ID); ut_a(size >= FIL_IBD_FILE_INITIAL_SIZE); - ut_a(fsp_flags_is_valid(flags)); + ut_a(fsp_flags_is_valid(flags & ~FSP_FLAGS_MEM_MASK)); /* Create the subdirectories in the path, if they are not there already. */ - if (!has_shared_space) { - err = os_file_create_subdirs_if_needed(path); - if (err != DB_SUCCESS) { - return(err); - } + err = os_file_create_subdirs_if_needed(path); + if (err != DB_SUCCESS) { + return(err); } file = os_file_create( @@ -3858,45 +3719,35 @@ fil_ibd_create( return(DB_ERROR); } -#ifdef UNIV_LINUX - const bool atomic_write = fil_fusionio_enable_atomic_write(file); + success= false; +#ifdef HAVE_POSIX_FALLOCATE + /* + Extend the file using posix_fallocate(). This is required by + FusionIO HW/Firmware but should also be the prefered way to extend + a file. + */ + int ret = posix_fallocate(file, 0, size * UNIV_PAGE_SIZE); - if (atomic_write) { - /* This is required by FusionIO HW/Firmware */ - int ret = posix_fallocate(file, 0, size * UNIV_PAGE_SIZE); - - if (ret != 0) { - - ib::error() << - "posix_fallocate(): Failed to preallocate" - " data for file " << path - << ", desired size " - << size * UNIV_PAGE_SIZE - << " Operating system error number " << ret - << ". Check" - " that the disk is not full or a disk quota" - " exceeded. Make sure the file system supports" - " this function. Some operating system error" - " numbers are described at " REFMAN - " operating-system-error-codes.html"; - - success = false; - } else { - success = true; - } - } else -#else - const bool atomic_write = false; -#endif /* UNIV_LINUX */ - { - success = os_file_set_size( - path, file, size * UNIV_PAGE_SIZE, srv_read_only_mode); + if (ret == 0) { + success = true; + } else if (ret != EINVAL) { + ib::error() << + "posix_fallocate(): Failed to preallocate" + " data for file " << path + << ", desired size " + << size * UNIV_PAGE_SIZE + << " Operating system error number " << ret + << ". Check" + " that the disk is not full or a disk quota" + " exceeded. Some operating system error" + " numbers are described at " REFMAN + "operating-system-error-codes.html"; } +#endif /* HAVE_POSIX_FALLOCATE */ if (!success) { - os_file_close(file); - os_file_delete(innodb_data_file_key, path); - return(DB_OUT_OF_FILE_SPACE); + success = os_file_set_size( + path, file, size * UNIV_PAGE_SIZE, srv_read_only_mode); } /* Note: We are actually punching a hole, previous contents will @@ -3916,6 +3767,14 @@ fil_ibd_create( } } + ulint block_size = os_file_get_block_size(file, path); + + if (!success) { + os_file_close(file); + os_file_delete(innodb_data_file_key, path); + return(DB_OUT_OF_FILE_SPACE); + } + /* printf("Creating tablespace %s id %lu\n", path, space_id); */ /* We have to write the space id to the file immediately and flush the @@ -3933,10 +3792,7 @@ fil_ibd_create( memset(page, '\0', UNIV_PAGE_SIZE); - /* Add the UNIV_PAGE_SIZE to the table flags and write them to the - tablespace header. */ - flags = fsp_flags_set_page_size(flags, univ_page_size); - + flags |= FSP_FLAGS_PAGE_SSIZE(); fsp_header_init_fields(page, space_id, flags); mach_write_to_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, space_id); @@ -3951,9 +3807,6 @@ fil_ibd_create( err = os_file_write( request, path, file, page, 0, page_size.physical()); - - ut_ad(err != DB_IO_NO_PUNCH_HOLE); - } else { page_zip_des_t page_zip; page_zip_set_size(&page_zip, page_size.physical()); @@ -3971,10 +3824,6 @@ fil_ibd_create( err = os_file_write( request, path, file, page_zip.data, 0, page_size.physical()); - - ut_a(err != DB_IO_NO_PUNCH_HOLE); - - punch_hole = false; } ut_free(buf2); @@ -4001,11 +3850,10 @@ fil_ibd_create( return(DB_ERROR); } - if (has_data_dir || has_shared_space) { + if (has_data_dir) { /* Make the ISL file if the IBD file is not in the default location. */ - err = RemoteDatafile::create_link_file(name, path, - has_shared_space); + err = RemoteDatafile::create_link_file(name, path); if (err != DB_SUCCESS) { os_file_close(file); os_file_delete(innodb_data_file_key, path); @@ -4020,56 +3868,45 @@ fil_ibd_create( crypt_data = fil_space_create_crypt_data(mode, key_id); } - space = fil_space_create(name, space_id, flags, is_temp - ? FIL_TYPE_TEMPORARY : FIL_TYPE_TABLESPACE, - crypt_data, true); + space = fil_space_create(name, space_id, flags, FIL_TYPE_TABLESPACE, + crypt_data, true); - if (!fil_node_create_low( - path, size, space, false, punch_hole, atomic_write)) { + fil_node_t* node = NULL; + if (space) { + node = fil_node_create_low(path, size, space, false, true); + } + + if (!space || !node) { if (crypt_data) { free(crypt_data); } err = DB_ERROR; - goto error_exit_1; - } - -#ifdef MYSQL_ENCRYPTION - /* For encryption tablespace, initial encryption information. */ - if (FSP_FLAGS_GET_ENCRYPTION(space->flags)) { - err = fil_set_encryption(space->id, - Encryption::AES, - NULL, - NULL); - ut_ad(err == DB_SUCCESS); - } -#endif /* MYSQL_ENCRYPTION */ - - if (!is_temp) { + } else { mtr_t mtr; const fil_node_t* file = UT_LIST_GET_FIRST(space->chain); - mtr_start(&mtr); + mtr.start(); fil_op_write_log( MLOG_FILE_CREATE2, space_id, 0, file->name, - NULL, space->flags, &mtr); + NULL, space->flags & ~FSP_FLAGS_MEM_MASK, &mtr); fil_name_write(space, 0, file, &mtr); - mtr_commit(&mtr); - } + mtr.commit(); - err = DB_SUCCESS; + node->block_size = block_size; + space->punch_hole = punch_hole; - /* Error code is set. Cleanup the various variables used. - These labels reflect the order in which variables are assigned or - actions are done. */ -error_exit_1: - if (err != DB_SUCCESS && (has_data_dir || has_shared_space)) { - RemoteDatafile::delete_link_file(name); + err = DB_SUCCESS; } os_file_close(file); + if (err != DB_SUCCESS) { + if (has_data_dir) { + RemoteDatafile::delete_link_file(name); + } + os_file_delete(innodb_data_file_key, path); } @@ -4100,7 +3937,7 @@ statement to update the dictionary tables if they are incorrect. @param[in] fix_dict true if the dictionary is available to be fixed @param[in] purpose FIL_TYPE_TABLESPACE or FIL_TYPE_TEMPORARY @param[in] id tablespace ID -@param[in] flags tablespace flags +@param[in] flags expected FSP_SPACE_FLAGS @param[in] space_name tablespace name of the datafile If file-per-table, it is the table name in the databasename/tablename format @param[in] path_in expected filepath, usually read from dictionary @@ -4120,14 +3957,11 @@ fil_ibd_open( bool dict_filepath_same_as_default = false; bool link_file_found = false; bool link_file_is_bad = false; - bool is_shared = FSP_FLAGS_GET_SHARED(flags); - bool is_encrypted = FSP_FLAGS_GET_ENCRYPTION(flags); Datafile df_default; /* default location */ Datafile df_dict; /* dictionary location */ RemoteDatafile df_remote; /* remote location */ ulint tablespaces_found = 0; ulint valid_tablespaces_found = 0; - bool for_import = (purpose == FIL_TYPE_IMPORT); ut_ad(!fix_dict || rw_lock_own(dict_operation_lock, RW_LOCK_X)); @@ -4136,10 +3970,13 @@ fil_ibd_open( ut_ad(!fix_dict || srv_log_file_size != 0); ut_ad(fil_type_is_data(purpose)); - if (!fsp_flags_is_valid(flags)) { + /* Table flags can be ULINT_UNDEFINED if + dict_tf_to_fsp_flags_failure is set. */ + if (flags == ULINT_UNDEFINED) { return(DB_CORRUPTION); } + ut_ad(fsp_flags_is_valid(flags & ~FSP_FLAGS_MEM_MASK)); df_default.init(space_name, flags); df_dict.init(space_name, flags); df_remote.init(space_name, flags); @@ -4147,25 +3984,8 @@ fil_ibd_open( /* Discover the correct file by looking in three possible locations while avoiding unecessary effort. */ - if (is_shared) { - /* Shared tablespaces will have a path_in since the filename - is not generated from the tablespace name. Use the basename - from this path_in with the default datadir as a filepath to - the default location */ - ut_a(path_in); - const char* sep = strrchr(path_in, OS_PATH_SEPARATOR); - const char* basename = (sep == NULL) ? path_in : &sep[1]; - df_default.make_filepath(NULL, basename, IBD); - - /* Always validate shared tablespaces. */ - validate = true; - - /* Set the ISL filepath in the default location. */ - df_remote.set_link_filepath(path_in); - } else { - /* We will always look for an ibd in the default location. */ - df_default.make_filepath(NULL, space_name, IBD); - } + /* We will always look for an ibd in the default location. */ + df_default.make_filepath(NULL, space_name, IBD); /* Look for a filepath embedded in an ISL where the default file would be. */ @@ -4237,55 +4057,36 @@ fil_ibd_open( df_dict.close(); } -#ifdef UNIV_LINUX - const bool atomic_write = !srv_use_doublewrite_buf && df_default.is_open() - && fil_fusionio_enable_atomic_write(df_default.handle()); -#else - const bool atomic_write = false; -#endif /* UNIV_LINUX */ - /* We have now checked all possible tablespace locations and have a count of how many unique files we found. If things are normal, we only found 1. */ /* For encrypted tablespace, we need to check the encryption in header of first page. */ - if (!validate && tablespaces_found == 1 && !is_encrypted) { + if (!validate && tablespaces_found == 1) { goto skip_validate; } /* Read and validate the first page of these three tablespace locations, if found. */ valid_tablespaces_found += - (df_remote.validate_to_dd(id, flags, for_import) - == DB_SUCCESS) ? 1 : 0; + (df_remote.validate_to_dd(id, flags) == DB_SUCCESS); valid_tablespaces_found += - (df_default.validate_to_dd(id, flags, for_import) - == DB_SUCCESS) ? 1 : 0; + (df_default.validate_to_dd(id, flags) == DB_SUCCESS); valid_tablespaces_found += - (df_dict.validate_to_dd(id, flags, for_import) - == DB_SUCCESS) ? 1 : 0; + (df_dict.validate_to_dd(id, flags) == DB_SUCCESS); /* Make sense of these three possible locations. First, bail out if no tablespace files were found. */ if (valid_tablespaces_found == 0) { - if (!is_encrypted) { - /* The following call prints an error message. - For encrypted tablespace we skip print, since it should - be keyring plugin issues. */ - os_file_get_last_error(true); - ib::error() << "Could not find a valid tablespace file for `" - << space_name << "`. " << TROUBLESHOOT_DATADICT_MSG; - } - + os_file_get_last_error(true); + ib::error() << "Could not find a valid tablespace file for `" + << space_name << "`. " << TROUBLESHOOT_DATADICT_MSG; return(DB_CORRUPTION); } - if (!validate && !is_encrypted) { - return(DB_SUCCESS); - } - if (validate && is_encrypted && fil_space_get(id)) { - return(DB_SUCCESS); + if (!validate) { + goto skip_validate; } /* Do not open any tablespaces if more than one tablespace with @@ -4391,8 +4192,7 @@ fil_ibd_open( RemoteDatafile::delete_link_file(space_name); } - } else if (!is_shared - && (!link_file_found || link_file_is_bad)) { + } else if (!link_file_found || link_file_is_bad) { ut_ad(df_dict.is_open()); /* Fix the link file if we got our filepath from the dictionary but a link file did not @@ -4422,9 +4222,7 @@ fil_ibd_open( path_in is not suppled for file-per-table, we must assume that it matched the ISL. */ if ((path_in != NULL && !dict_filepath_same_as_default) - || (path_in == NULL - && (DICT_TF_HAS_DATA_DIR(flags) - || DICT_TF_HAS_SHARED_SPACE(flags))) + || (path_in == NULL && DICT_TF_HAS_DATA_DIR(flags)) || df_remote.filepath() != NULL) { dict_replace_tablespace_and_filepath( id, space_name, df_default.filepath(), flags); @@ -4446,28 +4244,16 @@ skip_validate: df_remote.is_open() ? df_remote.filepath() : df_dict.is_open() ? df_dict.filepath() : df_default.filepath(), 0, space, false, - true, atomic_write) == NULL) { + true) == NULL) { err = DB_ERROR; } -#ifdef MYSQL_ENCRYPTION - /* For encryption tablespace, initialize encryption - information.*/ - if (err == DB_SUCCESS && is_encrypted && !for_import) { - Datafile& df_current = df_remote.is_open() ? - df_remote: df_dict.is_open() ? - df_dict : df_default; - - byte* key = df_current.m_encryption_key; - byte* iv = df_current.m_encryption_iv; - ut_ad(key && iv); - - err = fil_set_encryption(space->id, Encryption::AES, - key, iv); - ut_ad(err == DB_SUCCESS); + if (purpose != FIL_TYPE_IMPORT && !srv_read_only_mode) { + df_remote.close(); + df_dict.close(); + df_default.close(); + fsp_flags_try_adjust(id, flags & ~FSP_FLAGS_MEM_MASK); } -#endif /* MYSQL_ENCRYPTION */ - } return(err); @@ -4575,24 +4361,12 @@ fil_ibd_discover( ulint space_id, Datafile& df) { - Datafile df_def_gen; /* default general datafile */ Datafile df_def_per; /* default file-per-table datafile */ - RemoteDatafile df_rem_gen; /* remote general datafile*/ RemoteDatafile df_rem_per; /* remote file-per-table datafile */ - /* Look for the datafile in the default location. If it is - a general tablespace, it will be in the datadir. */ + /* Look for the datafile in the default location. */ const char* filename = df.filepath(); const char* basename = base_name(filename); - df_def_gen.init(basename, 0); - df_def_gen.make_filepath(NULL, basename, IBD); - if (df_def_gen.open_read_only(false) == DB_SUCCESS - && df_def_gen.validate_for_recovery() == DB_SUCCESS - && df_def_gen.space_id() == space_id) { - df.set_filepath(df_def_gen.filepath()); - df.open_read_only(false); - return(true); - } /* If this datafile is file-per-table it will have a schema dir. */ ulint sep_found = 0; @@ -4613,44 +4387,9 @@ fil_ibd_discover( df.open_read_only(false); return(true); } - } - /* Did not find a general or file-per-table datafile in the - default location. Look for a remote general tablespace. */ - df_rem_gen.set_name(basename); - if (df_rem_gen.open_link_file() == DB_SUCCESS) { + /* Look for a remote file-per-table tablespace. */ - /* An ISL file was found with contents. */ - if (df_rem_gen.open_read_only(false) != DB_SUCCESS - || df_rem_gen.validate_for_recovery() != DB_SUCCESS) { - - /* Assume that this ISL file is intended to be used. - Do not continue looking for another if this file - cannot be opened or is not a valid IBD file. */ - ib::error() << "ISL file '" - << df_rem_gen.link_filepath() - << "' was found but the linked file '" - << df_rem_gen.filepath() - << "' could not be opened or is not correct."; - return(false); - } - - /* Use this file if it has the space_id from the MLOG - record. */ - if (df_rem_gen.space_id() == space_id) { - df.set_filepath(df_rem_gen.filepath()); - df.open_read_only(false); - return(true); - } - - /* Since old MLOG records can use the same basename in - multiple CREATE/DROP sequences, this ISL file could be - pointing to a later version of this basename.ibd file - which has a different space_id. Keep looking. */ - } - - /* Look for a remote file-per-table tablespace. */ - if (sep_found == 2) { df_rem_per.set_name(db); if (df_rem_per.open_link_file() == DB_SUCCESS) { @@ -4742,14 +4481,9 @@ fil_ibd_load( return(FIL_LOAD_OK); } - /* If the filepath in the redo log is a default location in or - under the datadir, then just try to open it there. */ Datafile file; file.set_filepath(filename); - Folder folder(filename, dirname_length(filename)); - if (folder_mysql_datadir >= folder) { - file.open_read_only(false); - } + file.open_read_only(false); if (!file.is_open()) { /* The file has been moved or it is a remote datafile. */ @@ -4811,10 +4545,16 @@ fil_ibd_load( ut_ad(space == NULL); - bool is_temp = FSP_FLAGS_GET_TEMPORARY(file.flags()); + /* Adjust the memory-based flags that would normally be set by + dict_tf_to_fsp_flags(). In recovery, we have no data dictionary. */ + ulint flags = file.flags(); + if (FSP_FLAGS_HAS_PAGE_COMPRESSION(flags)) { + flags |= page_zip_level + << FSP_FLAGS_MEM_COMPRESSION_LEVEL; + } + space = fil_space_create( - file.name(), space_id, file.flags(), - is_temp ? FIL_TYPE_TEMPORARY : FIL_TYPE_TABLESPACE, + file.name(), space_id, flags, FIL_TYPE_TABLESPACE, file.get_crypt_info(), false); if (space == NULL) { @@ -4828,26 +4568,10 @@ fil_ibd_load( the rounding formula for extents and pages is somewhat complex; we let fil_node_open() do that task. */ - if (!fil_node_create_low(file.filepath(), 0, space, - false, true, false)) { + if (!fil_node_create_low(file.filepath(), 0, space, false, false)) { ut_error; } -#ifdef MYSQL_ENCRYPTION - /* For encryption tablespace, initial encryption information. */ - if (FSP_FLAGS_GET_ENCRYPTION(space->flags) - && file.m_encryption_key != NULL) { - dberr_t err = fil_set_encryption(space->id, - Encryption::AES, - file.m_encryption_key, - file.m_encryption_iv); - if (err != DB_SUCCESS) { - ib::error() << "Can't set encryption information for" - " tablespace " << space->name << "!"; - } - } -#endif /* MYSQL_ENCRYPTION */ - return(FIL_LOAD_OK); } @@ -4899,13 +4623,44 @@ fil_report_missing_tablespace( << " in the InnoDB data dictionary has tablespace id " << space_id << "," " but tablespace with that id or name does not exist. Have" - " you deleted or moved .ibd files? This may also be a table" - " created with CREATE TEMPORARY TABLE whose .ibd and .frm" - " files MySQL automatically removed, but the table still" - " exists in the InnoDB internal data dictionary."; + " you deleted or moved .ibd files?"; } -/** Returns true if a matching tablespace exists in the InnoDB tablespace +/** Try to adjust FSP_SPACE_FLAGS if they differ from the expectations. +(Typically when upgrading from MariaDB 10.1.0..10.1.20.) +@param[in] space_id tablespace ID +@param[in] flags desired tablespace flags */ +UNIV_INTERN +void +fsp_flags_try_adjust(ulint space_id, ulint flags) +{ + ut_ad(!srv_read_only_mode); + ut_ad(fsp_flags_is_valid(flags)); + + mtr_t mtr; + mtr_start(&mtr); + if (buf_block_t* b = buf_page_get( + page_id_t(space_id, 0), page_size_t(flags), + RW_X_LATCH, &mtr)) { + ulint f = fsp_header_get_flags(b->frame); + /* Suppress the message if only the DATA_DIR flag to differs. */ + if ((f ^ flags) & ~(1U << FSP_FLAGS_POS_RESERVED)) { + ib::warn() + << "adjusting FSP_SPACE_FLAGS of tablespace " + << space_id + << " from " << ib::hex(f) + << " to " << ib::hex(flags); + } + if (f != flags) { + mlog_write_ulint(FSP_HEADER_OFFSET + + FSP_SPACE_FLAGS + b->frame, + flags, MLOG_4BYTES, &mtr); + } + } + mtr_commit(&mtr); +} + +/** Determine if a matching tablespace exists in the InnoDB tablespace memory cache. Note that if we have not done a crash recovery at the database startup, there may be many tablespaces which are not yet in the memory cache. @param[in] id Tablespace ID @@ -4917,6 +4672,7 @@ error log if a matching tablespace is not found from memory. @param[in] heap Heap memory @param[in] table_id table id @param[in] table table +@param[in] table_flags table flags @return true if a matching tablespace exists in the memory cache */ bool fil_space_for_table_exists_in_mem( @@ -4926,12 +4682,13 @@ fil_space_for_table_exists_in_mem( bool adjust_space, mem_heap_t* heap, table_id_t table_id, - dict_table_t* table) + dict_table_t* table, + ulint table_flags) { - fil_space_t* fnamespace = NULL; + fil_space_t* fnamespace; fil_space_t* space; - ut_ad(fil_system); + const ulint expected_flags = dict_tf_to_fsp_flags(table_flags); mutex_enter(&fil_system->mutex); @@ -4939,80 +4696,41 @@ fil_space_for_table_exists_in_mem( space = fil_space_get_by_id(id); - /* If tablespace contains encryption information - copy it also to table. */ - if (space && space->crypt_data && - table && !table->crypt_data) { + /* Look if there is a space with the same name; the name is the + directory path from the datadir to the file */ + + fnamespace = fil_space_get_by_name(name); + bool valid = space && !((space->flags ^ expected_flags) + & ~FSP_FLAGS_MEM_MASK); + + if (valid && table && !table->crypt_data) { table->crypt_data = space->crypt_data; } - if (space != NULL - && FSP_FLAGS_GET_SHARED(space->flags) - && adjust_space - && srv_sys_tablespaces_open - && 0 == strncmp(space->name, general_space_name, - strlen(general_space_name))) { - /* This name was assigned during recovery in fil_ibd_load(). - This general tablespace was opened from an MLOG_FILE_NAME log - entry where the tablespace name does not exist. Replace the - temporary name with this name and return this space. */ - HASH_DELETE(fil_space_t, name_hash, fil_system->name_hash, - ut_fold_string(space->name), space); - ut_free(space->name); - space->name = mem_strdup(name); - HASH_INSERT(fil_space_t, name_hash, fil_system->name_hash, - ut_fold_string(space->name), space); - - mutex_exit(&fil_system->mutex); - - return(true); - } - - if (space != NULL) { - if (FSP_FLAGS_GET_SHARED(space->flags) - && !srv_sys_tablespaces_open) { - - /* No need to check the name */ - mutex_exit(&fil_system->mutex); - return(true); - } - - /* If this space has the expected name, use it. */ - fnamespace = fil_space_get_by_name(name); - if (space == fnamespace) { - /* Found */ - - mutex_exit(&fil_system->mutex); - return(true); - } - } - - /* Info from "fnamespace" comes from the ibd file itself, it can - be different from data obtained from System tables since file - operations are not transactional. If adjust_space is set, and the - mismatching space are between a user table and its temp table, we - shall adjust the ibd file name according to system table info */ - if (adjust_space - && space != NULL - && row_is_mysql_tmp_table_name(space->name) - && !row_is_mysql_tmp_table_name(name)) { - + if (!space) { + } else if (!valid || space == fnamespace) { + /* Found with the same file name, or got a flag mismatch. */ + goto func_exit; + } else if (adjust_space + && row_is_mysql_tmp_table_name(space->name) + && !row_is_mysql_tmp_table_name(name)) { + /* Info from fnamespace comes from the ibd file + itself, it can be different from data obtained from + System tables since renaming files is not + transactional. We shall adjust the ibd file name + according to system table info. */ mutex_exit(&fil_system->mutex); DBUG_EXECUTE_IF("ib_crash_before_adjust_fil_space", DBUG_SUICIDE();); - if (fnamespace) { - const char* tmp_name; + const char* tmp_name = dict_mem_create_temporary_tablename( + heap, name, table_id); - tmp_name = dict_mem_create_temporary_tablename( - heap, name, table_id); - - fil_rename_tablespace( - fnamespace->id, - UT_LIST_GET_FIRST(fnamespace->chain)->name, - tmp_name, NULL); - } + fil_rename_tablespace( + fnamespace->id, + UT_LIST_GET_FIRST(fnamespace->chain)->name, + tmp_name, NULL); DBUG_EXECUTE_IF("ib_crash_after_adjust_one_fil_space", DBUG_SUICIDE();); @@ -5027,16 +4745,12 @@ fil_space_for_table_exists_in_mem( mutex_enter(&fil_system->mutex); fnamespace = fil_space_get_by_name(name); ut_ad(space == fnamespace); - mutex_exit(&fil_system->mutex); - - return(true); + goto func_exit; } if (!print_error_if_does_not_exist) { - - mutex_exit(&fil_system->mutex); - - return(false); + valid = false; + goto func_exit; } if (space == NULL) { @@ -5055,10 +4769,8 @@ fil_space_for_table_exists_in_mem( } error_exit: ib::warn() << TROUBLESHOOT_DATADICT_MSG; - - mutex_exit(&fil_system->mutex); - - return(false); + valid = false; + goto func_exit; } if (0 != strcmp(space->name, name)) { @@ -5077,9 +4789,19 @@ error_exit: goto error_exit; } +func_exit: + if (valid) { + /* Adjust the flags that are in FSP_FLAGS_MEM_MASK. + FSP_SPACE_FLAGS will not be written back here. */ + space->flags = expected_flags; + } mutex_exit(&fil_system->mutex); - return(false); + if (valid && !srv_read_only_mode) { + fsp_flags_try_adjust(id, expected_flags & ~FSP_FLAGS_MEM_MASK); + } + + return(valid); } /** Return the space ID based on the tablespace name. @@ -5213,7 +4935,7 @@ fil_node_prepare_for_io( << " exceeds the limit " << system->max_n_open; } - if (!node->is_open) { + if (!node->is_open()) { /* File is closed: open it */ ut_a(node->n_pending == 0); @@ -5317,33 +5039,6 @@ fil_report_invalid_page_access( _exit(1); } -#ifdef MYSQL_ENCRYPTION -/** Set encryption information for IORequest. -@param[in,out] req_type IO request -@param[in] page_id page id -@param[in] space table space */ -inline -void -fil_io_set_encryption( - IORequest& req_type, - const page_id_t& page_id, - fil_space_t* space) -{ - /* Don't encrypt the log, page 0 of all tablespaces, all pages - from the system tablespace. */ - if (!req_type.is_log() && page_id.page_no() > 0 - && space->encryption_type != Encryption::NONE) - { - req_type.encryption_key(space->encryption_key, - space->encryption_klen, - space->encryption_iv); - req_type.encryption_algorithm(Encryption::AES); - } else { - req_type.clear_encrypted(); - } -} -#endif /* MYSQL_ENCRYPTION */ - /** Reads or writes data. This operation could be asynchronous (aio). @param[in,out] type IO context @@ -5360,8 +5055,6 @@ fil_io_set_encryption( aligned @param[in] message message for aio handler if non-sync aio used, else ignored -@param[in] write_size actual payload size when written - to avoid extra punch holes in compression @return DB_SUCCESS, DB_TABLESPACE_DELETED or DB_TABLESPACE_TRUNCATED if we are trying to do i/o on a tablespace which does not exist */ dberr_t @@ -5373,8 +5066,7 @@ fil_io( ulint byte_offset, ulint len, void* buf, - void* message, - ulint* write_size) + void* message) { os_offset_t offset; IORequest req_type(type); @@ -5607,35 +5299,7 @@ fil_io( const char* name = node->name == NULL ? space->name : node->name; -#ifdef MYSQL_COMPRESSION - /* Don't compress the log, page 0 of all tablespaces, tables - compresssed with the old scheme and all pages from the system - tablespace. */ - - if (req_type.is_write() - && !req_type.is_log() - && !page_size.is_compressed() - && page_id.page_no() > 0 - && IORequest::is_punch_hole_supported() - && node->punch_hole) { - - ut_ad(!req_type.is_log()); - - req_type.set_punch_hole(); - - req_type.compression_algorithm(space->compression_type); - - } else { - req_type.clear_compressed(); - } -#endif /* MYSQL_COMPRESSION */ - -#ifdef MYSQL_ENCRYPTION - /* Set encryption information. */ - fil_io_set_encryption(req_type, page_id, space); -#endif /* MYSQL_ENCRYPTION */ - - req_type.block_size(node->block_size); + req_type.set_fil_node(node); /* Queue the aio request */ dberr_t err = os_aio( @@ -5643,21 +5307,7 @@ fil_io( mode, name, node->handle, buf, offset, len, space->purpose != FIL_TYPE_TEMPORARY && srv_read_only_mode, - node, message, write_size); - - if (err == DB_IO_NO_PUNCH_HOLE) { - - err = DB_SUCCESS; - - if (node->punch_hole) { - - ib::warn() - << "Punch hole failed for '" - << name << "'"; - } - - fil_no_punch_hole(node); - } + node, message); /* We an try to recover the page from the double write buffer if the decompression fails or the page is corrupt. */ @@ -5834,8 +5484,8 @@ struct Check { @param[in] elem file node to visit */ void operator()(const fil_node_t* elem) { - ut_a(elem->is_open || !elem->n_pending); - n_open += elem->is_open; + ut_a(elem->is_open() || !elem->n_pending); + n_open += elem->is_open(); size += elem->size; } @@ -5889,7 +5539,7 @@ fil_validate(void) ut_a(fil_node->n_pending == 0); ut_a(!fil_node->being_extended); - ut_a(fil_node->is_open); + ut_a(fil_node->is_open()); ut_a(fil_space_belongs_in_lru(fil_node->space)); } @@ -6021,9 +5671,9 @@ struct fil_iterator_t { for IO */ byte* io_buffer; /*!< Buffer to use for IO */ fil_space_crypt_t *crypt_data; /*!< MariaDB Crypt data (if encrypted) */ - byte* crypt_io_buffer; /*!< MariaDB IO buffer when encrypted */ - byte* encryption_key; /*!< Encryption key */ - byte* encryption_iv; /*!< Encryption iv */ + byte* crypt_io_buffer; /*!< MariaDB IO buffer when + encrypted */ + dict_table_t* table; /*!< Imported table */ }; /********************************************************************//** @@ -6101,16 +5751,6 @@ fil_iterate( dberr_t err = DB_SUCCESS; IORequest read_request(read_type); -#ifdef MYSQL_ENCRYPTION - /* For encrypted table, set encryption information. */ - if (iter.encryption_key != NULL && offset != 0) { - read_request.encryption_key(iter.encryption_key, - ENCRYPTION_KEY_LEN, - iter.encryption_iv); - read_request.encryption_algorithm(Encryption::AES); - } -#endif /* MYSQL_ENCRYPTION */ - byte* readptr = io_buffer; byte* writeptr = io_buffer; bool encrypted = false; @@ -6241,16 +5881,21 @@ fil_iterate( if (page_compressed) { ulint len = 0; - fil_compress_page(space_id, + + byte * res = fil_compress_page(space_id, src, NULL, size, - fil_space_get_page_compression_level(space_id), + dict_table_page_compression_level(iter.table), fil_space_get_block_size(space_id, offset, size), encrypted, &len, NULL); + if (len != size) { + memset(res+len, 0, size-len); + } + updated = true; } @@ -6287,16 +5932,6 @@ fil_iterate( IORequest write_request(write_type); -#ifdef MYSQL_ENCRYPTION - /* For encrypted table, set encryption information. */ - if (iter.encryption_key != NULL && offset != 0) { - write_request.encryption_key(iter.encryption_key, - ENCRYPTION_KEY_LEN, - iter.encryption_iv); - write_request.encryption_algorithm(Encryption::AES); - } -#endif /* MYSQL_ENCRYPTION */ - /* A page was updated in the set, write back to disk. Note: We don't have the compression algorithm, we write out the imported file as uncompressed. */ @@ -6307,18 +5942,12 @@ fil_iterate( iter.filepath, iter.file, writeptr, offset, (ulint) n_bytes)) != DB_SUCCESS) { - /* This is not a hard error */ - if (err == DB_IO_NO_PUNCH_HOLE) { - - err = DB_SUCCESS; - write_type &= ~IORequest::PUNCH_HOLE; - - } else { - ib::error() << "os_file_write() failed"; - - return(err); - } + ib::error() << "os_file_write() failed"; + return(err); } + + /* Clean up the temporal buffer. */ + memset(writeptr, 0, n_bytes); } return(DB_SUCCESS); @@ -6437,6 +6066,7 @@ fil_tablespace_iterate( iter.file_size = file_size; iter.n_io_buffers = n_io_buffers; iter.page_size = callback.get_page_size().physical(); + iter.table = table; /* read (optional) crypt data */ iter.crypt_data = fil_space_read_crypt_data( @@ -6444,26 +6074,6 @@ fil_tablespace_iterate( + fsp_header_get_encryption_offset( callback.get_page_size())); -#ifdef MYSQL_ENCRYPTION - /* Set encryption info. */ - iter.encryption_key = table->encryption_key; - iter.encryption_iv = table->encryption_iv; - - /* Check encryption is matched or not. */ - ulint space_flags = callback.get_space_flags(); - if (FSP_FLAGS_GET_ENCRYPTION(space_flags)) { - ut_ad(table->encryption_key != NULL); - - if (!dict_table_is_encrypted(table)) { - ib::error() << "Table is not in an encrypted" - " tablespace, but the data file which" - " trying to import is an encrypted" - " tablespace"; - err = DB_IO_NO_ENCRYPT_TABLESPACE; - } - } -#endif /* MYSQL_ENCRYPTION */ - if (err == DB_SUCCESS) { /* Compressed pages can't be optimised for block IO @@ -6528,15 +6138,6 @@ fil_tablespace_iterate( return(err); } -/** Set the tablespace table size. -@param[in] page a page belonging to the tablespace */ -void -PageCallback::set_page_size( - const buf_frame_t* page) UNIV_NOTHROW -{ - m_page_size.copy_from(fsp_header_get_page_size(page)); -} - /********************************************************************//** Delete the tablespace file and any related files like .cfg. This should not be called for temporary tables. @@ -6621,12 +6222,10 @@ fil_mtr_rename_log( dberr_t err; bool old_is_file_per_table = - !is_system_tablespace(old_table->space) - && !DICT_TF_HAS_SHARED_SPACE(old_table->flags); + !is_system_tablespace(old_table->space); bool new_is_file_per_table = - !is_system_tablespace(new_table->space) - && !DICT_TF_HAS_SHARED_SPACE(new_table->flags); + !is_system_tablespace(new_table->space); /* If neither table is file-per-table, there will be no renaming of files. */ @@ -6871,15 +6470,12 @@ truncate_t::truncate( { dberr_t err = DB_SUCCESS; char* path; - bool has_data_dir = FSP_FLAGS_HAS_DATA_DIR(flags); ut_a(!is_system_tablespace(space_id)); - if (has_data_dir) { + if (FSP_FLAGS_HAS_DATA_DIR(flags)) { ut_ad(dir_path != NULL); - path = fil_make_filepath(dir_path, tablename, IBD, true); - } else { path = fil_make_filepath(NULL, tablename, IBD, false); } @@ -6902,7 +6498,7 @@ truncate_t::truncate( space->size = node->size = FIL_IBD_FILE_INITIAL_SIZE; } - const bool already_open = node->is_open; + const bool already_open = node->is_open(); if (!already_open) { @@ -6923,7 +6519,7 @@ truncate_t::truncate( return(DB_ERROR); } - node->is_open = true; + ut_a(node->is_open()); } os_offset_t trunc_size = trunc_to_default @@ -6953,7 +6549,7 @@ truncate_t::truncate( err = DB_ERROR; } else { - node->is_open = false; + node->handle = OS_FILE_CLOSED; } } @@ -6964,339 +6560,6 @@ truncate_t::truncate( return(err); } -/** -Note that the file system where the file resides doesn't support PUNCH HOLE. -Called from AIO handlers when IO returns DB_IO_NO_PUNCH_HOLE -@param[in,out] node Node to set */ -void -fil_no_punch_hole(fil_node_t* node) -{ - node->punch_hole = false; -} - -#ifdef MYSQL_COMPRESSION - -/** Set the compression type for the tablespace of a table -@param[in] table The table that should be compressed -@param[in] algorithm Text representation of the algorithm -@return DB_SUCCESS or error code */ -dberr_t -fil_set_compression( - dict_table_t* table, - const char* algorithm) -{ - ut_ad(table != NULL); - - /* We don't support Page Compression for the system tablespace, - the temporary tablespace, or any general tablespace because - COMPRESSION is set by TABLE DDL, not TABLESPACE DDL. There is - no other technical reason. Also, do not use it for missing - tables or tables with compressed row_format. */ - if (table->ibd_file_missing - || !DICT_TF2_FLAG_IS_SET(table, DICT_TF2_USE_FILE_PER_TABLE) - || DICT_TF2_FLAG_IS_SET(table, DICT_TF2_TEMPORARY) - || page_size_t(table->flags).is_compressed()) { - - return(DB_IO_NO_PUNCH_HOLE_TABLESPACE); - } - - dberr_t err; - Compression compression; - - if (algorithm == NULL || strlen(algorithm) == 0) { - -#ifndef UNIV_DEBUG - compression.m_type = Compression::NONE; -#else - /* This is a Debug tool for setting compression on all - compressible tables not otherwise specified. */ - switch (srv_debug_compress) { - case Compression::LZ4: - case Compression::ZLIB: - case Compression::NONE: - - compression.m_type = - static_cast( - srv_debug_compress); - break; - - default: - compression.m_type = Compression::NONE; - } - -#endif /* UNIV_DEBUG */ - - err = DB_SUCCESS; - - } else { - - err = Compression::check(algorithm, &compression); - } - - fil_space_t* space = fil_space_get(table->space); - - if (space == NULL) { - return(DB_NOT_FOUND); - } - - space->compression_type = compression.m_type; - - if (space->compression_type != Compression::NONE) { - - const fil_node_t* node; - - node = UT_LIST_GET_FIRST(space->chain); - - if (!node->punch_hole) { - - return(DB_IO_NO_PUNCH_HOLE_FS); - } - } - - return(err); -} - -/** Get the compression algorithm for a tablespace. -@param[in] space_id Space ID to check -@return the compression algorithm */ -Compression::Type -fil_get_compression( - ulint space_id) -{ - fil_space_t* space = fil_space_get(space_id); - - return(space == NULL ? Compression::NONE : space->compression_type); -} - -/** Set the encryption type for the tablespace -@param[in] space_id Space ID of tablespace for which to set -@param[in] algorithm Encryption algorithm -@param[in] key Encryption key -@param[in] iv Encryption iv -@return DB_SUCCESS or error code */ -dberr_t -fil_set_encryption( - ulint space_id, - Encryption::Type algorithm, - byte* key, - byte* iv) -{ - ut_ad(!is_system_or_undo_tablespace(space_id)); - - if (is_system_tablespace(space_id)) { - return(DB_IO_NO_ENCRYPT_TABLESPACE); - } - - mutex_enter(&fil_system->mutex); - - fil_space_t* space = fil_space_get_by_id(space_id); - - if (space == NULL) { - mutex_exit(&fil_system->mutex); - return(DB_NOT_FOUND); - } - - ut_ad(algorithm != Encryption::NONE); - space->encryption_type = algorithm; - if (key == NULL) { - Encryption::random_value(space->encryption_key); - } else { - memcpy(space->encryption_key, - key, ENCRYPTION_KEY_LEN); - } - - space->encryption_klen = ENCRYPTION_KEY_LEN; - if (iv == NULL) { - Encryption::random_value(space->encryption_iv); - } else { - memcpy(space->encryption_iv, - iv, ENCRYPTION_KEY_LEN); - } - - mutex_exit(&fil_system->mutex); - - return(DB_SUCCESS); -} - -/** Rotate the tablespace keys by new master key. -@return true if the re-encrypt suceeds */ -bool -fil_encryption_rotate() -{ - fil_space_t* space; - mtr_t mtr; - byte encrypt_info[ENCRYPTION_INFO_SIZE_V2]; - - for (space = UT_LIST_GET_FIRST(fil_system->space_list); - space != NULL; ) { - /* Skip unencypted tablespaces. */ - if (is_system_or_undo_tablespace(space->id) - || fsp_is_system_temporary(space->id) - || space->purpose == FIL_TYPE_LOG) { - space = UT_LIST_GET_NEXT(space_list, space); - continue; - } - - if (space->encryption_type != Encryption::NONE) { - mtr_start(&mtr); - mtr.set_named_space(space->id); - - space = mtr_x_lock_space(space->id, &mtr); - - memset(encrypt_info, 0, ENCRYPTION_INFO_SIZE_V2); - - if (!fsp_header_rotate_encryption(space, - encrypt_info, - &mtr)) { - mtr_commit(&mtr); - return(false); - } - - mtr_commit(&mtr); - } - - space = UT_LIST_GET_NEXT(space_list, space); - DBUG_EXECUTE_IF("ib_crash_during_rotation_for_encryption", - DBUG_SUICIDE();); - } - - return(true); -} -#endif /* MYSQL_COMPRESSION */ - -/** Build the basic folder name from the path and length provided -@param[in] path pathname (may also include the file basename) -@param[in] len length of the path, in bytes */ -void -Folder::make_path(const char* path, size_t len) -{ - if (is_absolute_path(path)) { - m_folder = mem_strdupl(path, len); - m_folder_len = len; - } - else { - size_t n = 2 + len + strlen(fil_path_to_mysql_datadir); - m_folder = static_cast(ut_malloc_nokey(n)); - m_folder_len = 0; - - if (path != fil_path_to_mysql_datadir) { - /* Put the mysqld datadir into m_folder first. */ - ut_ad(fil_path_to_mysql_datadir[0] != '\0'); - m_folder_len = strlen(fil_path_to_mysql_datadir); - memcpy(m_folder, fil_path_to_mysql_datadir, - m_folder_len); - if (m_folder[m_folder_len - 1] != OS_PATH_SEPARATOR) { - m_folder[m_folder_len++] = OS_PATH_SEPARATOR; - } - } - - /* Append the path. */ - memcpy(m_folder + m_folder_len, path, len); - m_folder_len += len; - m_folder[m_folder_len] = '\0'; - } - - os_normalize_path(m_folder); -} - -/** Resolve a relative path in m_folder to an absolute path -in m_abs_path setting m_abs_len. */ -void -Folder::make_abs_path() -{ - my_realpath(m_abs_path, m_folder, MYF(0)); - m_abs_len = strlen(m_abs_path); - - ut_ad(m_abs_len + 1 < sizeof(m_abs_path)); - - /* Folder::related_to() needs a trailing separator. */ - if (m_abs_path[m_abs_len - 1] != OS_PATH_SEPARATOR) { - m_abs_path[m_abs_len] = OS_PATH_SEPARATOR; - m_abs_path[++m_abs_len] = '\0'; - } -} - -/** Constructor -@param[in] path pathname (may also include the file basename) -@param[in] len length of the path, in bytes */ -Folder::Folder(const char* path, size_t len) -{ - make_path(path, len); - make_abs_path(); -} - -/** Assignment operator -@param[in] folder folder string provided */ -class Folder& -Folder::operator=(const char* path) -{ - ut_free(m_folder); - make_path(path, strlen(path)); - make_abs_path(); - - return(*this); -} - -/** Determine if two folders are equal -@param[in] other folder to compare to -@return whether the folders are equal */ -bool Folder::operator==(const Folder& other) const -{ - return(m_abs_len == other.m_abs_len - && !memcmp(m_abs_path, other.m_abs_path, m_abs_len)); -} - -/** Determine if the left folder is the same or an ancestor of -(contains) the right folder. -@param[in] other folder to compare to -@return whether this is the same or an ancestor of the other folder. */ -bool Folder::operator>=(const Folder& other) const -{ - return(m_abs_len <= other.m_abs_len - && (!memcmp(other.m_abs_path, m_abs_path, m_abs_len))); -} - -/** Determine if the left folder is an ancestor of (contains) -the right folder. -@param[in] other folder to compare to -@return whether this is an ancestor of the other folder */ -bool Folder::operator>(const Folder& other) const -{ - return(m_abs_len < other.m_abs_len - && (!memcmp(other.m_abs_path, m_abs_path, m_abs_len))); -} - -/** Determine if the directory referenced by m_folder exists. -@return whether the directory exists */ -bool -Folder::exists() -{ - bool exists; - os_file_type_t type; - -#ifdef _WIN32 - /* Temporarily strip the trailing_separator since it will cause - _stat64() to fail on Windows unless the path is the root of some - drive; like "c:\". _stat64() will fail if it is "c:". */ - size_t len = strlen(m_abs_path); - if (m_abs_path[m_abs_len - 1] == OS_PATH_SEPARATOR - && m_abs_path[m_abs_len - 2] != ':') { - m_abs_path[m_abs_len - 1] = '\0'; - } -#endif /* WIN32 */ - - bool ret = os_file_status(m_abs_path, &exists, &type); - -#ifdef _WIN32 - /* Put the separator back on. */ - if (m_abs_path[m_abs_len - 1] == '\0') { - m_abs_path[m_abs_len - 1] = OS_PATH_SEPARATOR; - } -#endif /* WIN32 */ - - return(ret && exists && type == OS_FILE_TYPE_DIR); -} - /* Unit Tests */ #ifdef UNIV_ENABLE_UNIT_TEST_MAKE_FILEPATH #define MF fil_make_filepath @@ -7321,7 +6584,6 @@ test_make_filepath() path = MF("/this/is/a/path/with/a/filename", NULL, IBD, false); DISPLAY; path = MF("/this/is/a/path/with/a/filename", NULL, ISL, false); DISPLAY; path = MF("/this/is/a/path/with/a/filename", NULL, CFG, false); DISPLAY; - path = MF("/this/is/a/path/with/a/filename", NULL, CFP, false); DISPLAY; path = MF("/this/is/a/path/with/a/filename.ibd", NULL, IBD, false); DISPLAY; path = MF("/this/is/a/path/with/a/filename.ibd", NULL, IBD, false); DISPLAY; path = MF("/this/is/a/path/with/a/filename.dat", NULL, IBD, false); DISPLAY; @@ -7331,7 +6593,6 @@ test_make_filepath() path = MF(NULL, "dbname/tablespacename", IBD, false); DISPLAY; path = MF(NULL, "dbname/tablespacename", ISL, false); DISPLAY; path = MF(NULL, "dbname/tablespacename", CFG, false); DISPLAY; - path = MF(NULL, "dbname/tablespacename", CFP, false); DISPLAY; path = MF(NULL, "dbname\\tablespacename", NO_EXT, false); DISPLAY; path = MF(NULL, "dbname\\tablespacename", IBD, false); DISPLAY; path = MF("/this/is/a/path", "dbname/tablespacename", IBD, false); DISPLAY; @@ -7390,21 +6651,23 @@ fil_space_get_crypt_data( byte *page = static_cast(ut_align(buf, UNIV_PAGE_SIZE)); fil_read(page_id_t(space_id, 0), univ_page_size, 0, univ_page_size.physical(), page); - ulint flags = fsp_header_get_flags(page); ulint offset = FSP_HEADER_OFFSET + fsp_header_get_encryption_offset( - page_size_t(flags)); + page_size_t(space->flags)); space->crypt_data = fil_space_read_crypt_data(space_id, page, offset); ut_free(buf); -#ifdef UNIV_DEBUG - ib::info() << "Read page 0 from tablespace for" - << "space " << space_id - << " name " << space->name - << " key_id " << (space->crypt_data ? space->crypt_data->key_id : 0) - << " encryption " << (space->crypt_data ? space->crypt_data->encryption : 0) - << " handle " << node->handle; -#endif + DBUG_LOG("crypt", + "Read page 0 from" + << " tablespace " << space_id + << " name " << space->name + << " key_id " << (space->crypt_data + ? space->crypt_data->key_id + : 0) + << " encryption " + << (space->crypt_data + ? space->crypt_data->encryption : 0) + << " handle " << node->handle); ut_a(space->id == space_id); @@ -7626,7 +6889,7 @@ fil_node_t* fil_space_get_node( fil_space_t* space, /*!< in: file spage */ ulint space_id, /*!< in: space id */ - ulint* block_offset, /*!< in/out: offset in number of blocks */ + os_offset_t* block_offset, /*!< in/out: offset in number of blocks */ ulint byte_offset, /*!< in: remainder of offset in bytes; in aio this must be divisible by the OS block size */ @@ -7662,14 +6925,16 @@ fil_space_get_node( /********************************************************************//** Return block size of node in file space +@param[in] space_id space id +@param[in] block_offset page offset +@param[in] len page len @return file block size */ UNIV_INTERN ulint fil_space_get_block_size( -/*=====================*/ - ulint space_id, - ulint block_offset, - ulint len) + ulint space_id, + os_offset_t block_offset, + ulint len) { ulint block_size = 512; ut_ad(!mutex_own(&fil_system->mutex)); @@ -7735,3 +7000,26 @@ fil_system_exit(void) ut_ad(mutex_own(&fil_system->mutex)); mutex_exit(&fil_system->mutex); } + +/** +Get should we punch hole to tablespace. +@param[in] node File node +@return true, if punch hole should be tried, false if not. */ +bool +fil_node_should_punch_hole( + const fil_node_t* node) +{ + return (node->space->punch_hole); +} + +/** +Set punch hole to tablespace to given value. +@param[in] node File node +@param[in] val value to be set. */ +void +fil_space_set_punch_hole( + fil_node_t* node, + bool val) +{ + node->space->punch_hole = val; +} diff --git a/storage/innobase/fil/fil0pagecompress.cc b/storage/innobase/fil/fil0pagecompress.cc index 98d732a9f9d..1eb9ec37f5d 100644 --- a/storage/innobase/fil/fil0pagecompress.cc +++ b/storage/innobase/fil/fil0pagecompress.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (C) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (C) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -99,7 +99,7 @@ fil_compress_page( byte* lzo_mem) /*!< in: temporal memory used by LZO */ { int err = Z_OK; - int comp_level = level; + int comp_level = int(level); ulint header_len = FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE; ulint write_size=0; /* Cache to avoid change during function execution */ @@ -162,8 +162,14 @@ fil_compress_page( switch(comp_method) { #ifdef HAVE_LZ4 case PAGE_LZ4_ALGORITHM: + +#ifdef HAVE_LZ4_COMPRESS_DEFAULT + err = LZ4_compress_default((const char *)buf, + (char *)out_buf+header_len, len, write_size); +#else err = LZ4_compress_limitedOutput((const char *)buf, (char *)out_buf+header_len, len, write_size); +#endif /* HAVE_LZ4_COMPRESS_DEFAULT */ write_size = err; if (err == 0) { @@ -355,6 +361,7 @@ fil_compress_page( if (allocated) { /* TODO: reduce number of memcpy's */ memcpy(buf, out_buf, len); + goto exit_free; } else { return(out_buf); } @@ -380,6 +387,7 @@ err_exit: srv_stats.pages_page_compression_error.inc(); *out_len = len; +exit_free: if (allocated) { ut_free(out_buf); #ifdef HAVE_LZO @@ -412,24 +420,26 @@ fil_decompress_page( { int err = 0; ulint actual_size = 0; - ulint compression_alg = 0; + ib_uint64_t compression_alg = 0; byte *in_buf; ulint ptype; - ulint header_len = FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE; + ulint header_len; ut_ad(buf); ut_ad(len); ptype = mach_read_from_2(buf+FIL_PAGE_TYPE); - if (ptype == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED) { - header_len += FIL_PAGE_COMPRESSION_METHOD_SIZE; - } - - /* Do not try to uncompressed pages that are not compressed */ - if (ptype != FIL_PAGE_PAGE_COMPRESSED && - ptype != FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED && - ptype != FIL_PAGE_COMPRESSED) { + switch (ptype) { + case FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED: + header_len = FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE + + FIL_PAGE_COMPRESSION_METHOD_SIZE; + break; + case FIL_PAGE_PAGE_COMPRESSED: + header_len = FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE; + break; + default: + /* The page is not in our format. */ return; } @@ -443,9 +453,7 @@ fil_decompress_page( /* Before actual decompress, make sure that page type is correct */ - if (mach_read_from_4(buf+FIL_PAGE_SPACE_OR_CHKSUM) != BUF_NO_CHECKSUM_MAGIC || - (ptype != FIL_PAGE_PAGE_COMPRESSED && - ptype != FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED)) { + if (mach_read_from_4(buf+FIL_PAGE_SPACE_OR_CHKSUM) != BUF_NO_CHECKSUM_MAGIC) { ib::error() << "Corruption: We try to uncompress corrupted page:" << " CRC " << mach_read_from_4(buf+FIL_PAGE_SPACE_OR_CHKSUM) @@ -461,7 +469,7 @@ fil_decompress_page( /* Get compression algorithm */ if (ptype == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED) { - compression_alg = mach_read_from_2(buf+FIL_PAGE_DATA+FIL_PAGE_COMPRESSED_SIZE); + compression_alg = static_cast(mach_read_from_2(buf+FIL_PAGE_DATA+FIL_PAGE_COMPRESSED_SIZE)); } else { compression_alg = mach_read_from_8(buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION); } @@ -487,10 +495,8 @@ fil_decompress_page( *write_size = actual_size; } -#ifdef UNIV_PAGECOMPRESS_DEBUG - ib::info() << "Preparing for decompress for len " - << actual_size << "."; -#endif /* UNIV_PAGECOMPRESS_DEBUG */ + DBUG_LOG("compress", "Preparing for decompress for len " + << actual_size << "."); switch(compression_alg) { case PAGE_ZLIB_ALGORITHM: diff --git a/storage/innobase/fsp/fsp0file.cc b/storage/innobase/fsp/fsp0file.cc index 0e1d2f3233b..74c153a65d5 100644 --- a/storage/innobase/fsp/fsp0file.cc +++ b/storage/innobase/fsp/fsp0file.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2013, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -47,8 +48,6 @@ Datafile::init( m_name = mem_strdup(name); m_flags = flags; - m_encryption_key = NULL; - m_encryption_iv = NULL; } /** Release the resources. */ @@ -60,16 +59,10 @@ Datafile::shutdown() ut_free(m_name); m_name = NULL; - ut_free(m_encryption_key); - m_encryption_key = NULL; - /* The fil_space_t::crypt_data was freed in fil_space_free_low(). Invalidate our redundant pointer. */ m_crypt_info = NULL; - ut_free(m_encryption_iv); - m_encryption_iv = NULL; - free_filepath(); free_first_page(); } @@ -276,9 +269,8 @@ Datafile::same_as( } /** Allocate and set the datafile or tablespace name in m_name. -If a name is provided, use it; else if the datafile is file-per-table, -extract a file-per-table tablespace name from m_filepath; else it is a -general tablespace, so just call it that for now. The value of m_name +If a name is provided, use it; else extract a file-per-table +tablespace name from m_filepath. The value of m_name will be freed in the destructor. @param[in] name tablespace name if known, NULL if not */ void @@ -288,14 +280,8 @@ Datafile::set_name(const char* name) if (name != NULL) { m_name = mem_strdup(name); - } else if (fsp_is_file_per_table(m_space_id, m_flags)) { - m_name = fil_path_to_space_name(m_filepath); } else { - /* Give this general tablespace a temporary name. */ - m_name = static_cast( - ut_malloc_nokey(strlen(general_space_name) + 20)); - - sprintf(m_name, "%s_" ULINTPF, general_space_name, m_space_id); + m_name = fil_path_to_space_name(m_filepath); } } @@ -358,17 +344,37 @@ Datafile::read_first_page(bool read_only_mode) } } - if (err == DB_SUCCESS && m_order == 0) { - - m_flags = fsp_header_get_flags(m_first_page); + if (err != DB_SUCCESS) { + return(err); + } + if (m_order == 0) { m_space_id = fsp_header_get_space_id(m_first_page); + m_flags = fsp_header_get_flags(m_first_page); + if (!fsp_flags_is_valid(m_flags)) { + ulint cflags = fsp_flags_convert_from_101(m_flags); + if (cflags == ULINT_UNDEFINED) { + ib::error() + << "Invalid flags " << ib::hex(m_flags) + << " in " << m_filepath; + return(DB_CORRUPTION); + } else { + m_flags = cflags; + } + } + } + + const page_size_t ps(m_flags); + if (ps.physical() > page_size) { + ib::error() << "File " << m_filepath + << " should be longer than " + << page_size << " bytes"; + return(DB_CORRUPTION); } m_crypt_info = fil_space_read_crypt_data( m_space_id, m_first_page, - FSP_HEADER_OFFSET + fsp_header_get_encryption_offset( - fsp_header_get_page_size(m_first_page))); + FSP_HEADER_OFFSET + fsp_header_get_encryption_offset(ps)); return(err); } @@ -389,14 +395,10 @@ space ID and flags. The file should exist and be successfully opened in order for this function to validate it. @param[in] space_id The expected tablespace ID. @param[in] flags The expected tablespace flags. -@param[in] for_import if it is for importing @retval DB_SUCCESS if tablespace is valid, DB_ERROR if not. m_is_valid is also set true on success, else false. */ dberr_t -Datafile::validate_to_dd( - ulint space_id, - ulint flags, - bool for_import) +Datafile::validate_to_dd(ulint space_id, ulint flags) { dberr_t err; @@ -407,18 +409,17 @@ Datafile::validate_to_dd( /* Validate this single-table-tablespace with the data dictionary, but do not compare the DATA_DIR flag, in case the tablespace was remotely located. */ - err = validate_first_page(0, for_import); + err = validate_first_page(0); if (err != DB_SUCCESS) { return(err); } + flags &= ~FSP_FLAGS_MEM_MASK; + /* Make sure the datafile we found matched the space ID. If the datafile is a file-per-table tablespace then also match the row format and zip page size. */ - if (m_space_id == space_id - && (m_flags & FSP_FLAGS_MASK_SHARED - || (m_flags & ~FSP_FLAGS_MASK_DATA_DIR) - == (flags & ~FSP_FLAGS_MASK_DATA_DIR))) { + if (m_space_id == space_id && m_flags == flags) { /* Datafile matches the tablespace expected. */ return(DB_SUCCESS); } @@ -427,9 +428,10 @@ Datafile::validate_to_dd( m_is_valid = false; ib::error() << "In file '" << m_filepath << "', tablespace id and" - " flags are " << m_space_id << " and " << m_flags << ", but in" - " the InnoDB data dictionary they are " << space_id << " and " - << flags << ". Have you moved InnoDB .ibd files around without" + " flags are " << m_space_id << " and " << ib::hex(m_flags) + << ", but in the InnoDB data dictionary they are " + << space_id << " and " << ib::hex(flags) + << ". Have you moved InnoDB .ibd files around without" " using the commands DISCARD TABLESPACE and IMPORT TABLESPACE?" " " << TROUBLESHOOT_DATADICT_MSG; @@ -451,7 +453,7 @@ Datafile::validate_for_recovery() ut_ad(is_open()); ut_ad(!srv_read_only_mode); - err = validate_first_page(0, false); + err = validate_first_page(0); switch (err) { case DB_SUCCESS: @@ -459,22 +461,14 @@ Datafile::validate_for_recovery() break; default: - /* For encryption tablespace, we skip the retry step, - since it is only because the keyring is not ready. */ - if (FSP_FLAGS_GET_ENCRYPTION(m_flags)) { - return(err); - } /* Re-open the file in read-write mode Attempt to restore page 0 from doublewrite and read the space ID from a survey of the first few pages. */ close(); err = open_read_write(srv_read_only_mode); if (err != DB_SUCCESS) { - ib::error() << "Datafile '" << m_filepath << "' could not" - " be opened in read-write mode so that the" - " doublewrite pages could be restored."; return(err); - }; + } err = find_space_id(); if (err != DB_SUCCESS || m_space_id == 0) { @@ -484,14 +478,13 @@ Datafile::validate_for_recovery() return(err); } - err = restore_from_doublewrite(0); - if (err != DB_SUCCESS) { - return(err); + if (restore_from_doublewrite()) { + return(DB_CORRUPTION); } /* Free the previously read first page and then re-validate. */ free_first_page(); - err = validate_first_page(0, false); + err = validate_first_page(0); } if (err == DB_SUCCESS) { @@ -506,14 +499,11 @@ tablespace is opened. This occurs before the fil_space_t is created so the Space ID found here must not already be open. m_is_valid is set true on success, else false. @param[out] flush_lsn contents of FIL_PAGE_FILE_FLUSH_LSN -@param[in] for_import if it is for importing -(only valid for the first file of the system tablespace) @retval DB_SUCCESS on if the datafile is valid @retval DB_CORRUPTION if the datafile is not readable @retval DB_TABLESPACE_EXISTS if there is a duplicate space_id */ dberr_t -Datafile::validate_first_page(lsn_t* flush_lsn, - bool for_import) +Datafile::validate_first_page(lsn_t* flush_lsn) { char* prev_name; char* prev_filepath; @@ -571,7 +561,9 @@ Datafile::validate_first_page(lsn_t* flush_lsn, free_first_page(); return(DB_ERROR); - + } else if (!fsp_flags_is_valid(m_flags)) { + /* Tablespace flags must be valid. */ + error_txt = "Tablespace flags are invalid"; } else if (page_get_page_no(m_first_page) != 0) { /* First page must be number 0 */ @@ -602,51 +594,6 @@ Datafile::validate_first_page(lsn_t* flush_lsn, } -#ifdef MYSQL_ENCRYPTION - /* For encrypted tablespace, check the encryption info in the - first page can be decrypt by master key, otherwise, this table - can't be open. And for importing, we skip checking it. */ - if (FSP_FLAGS_GET_ENCRYPTION(m_flags) && !for_import) { - m_encryption_key = static_cast( - ut_zalloc_nokey(ENCRYPTION_KEY_LEN)); - m_encryption_iv = static_cast( - ut_zalloc_nokey(ENCRYPTION_KEY_LEN)); -#ifdef UNIV_ENCRYPT_DEBUG - fprintf(stderr, "Got from file %lu:", m_space_id); -#endif - if (!fsp_header_get_encryption_key(m_flags, - m_encryption_key, - m_encryption_iv, - m_first_page)) { - ib::error() - << "Encryption information in" - << " datafile: " << m_filepath - << " can't be decrypted" - << " , please confirm the keyfile" - << " is match and keyring plugin" - << " is loaded."; - - m_is_valid = false; - free_first_page(); - ut_free(m_encryption_key); - ut_free(m_encryption_iv); - m_encryption_key = NULL; - m_encryption_iv = NULL; - return(DB_CORRUPTION); - } - - if (recv_recovery_is_on() - && memcmp(m_encryption_key, - m_encryption_iv, - ENCRYPTION_KEY_LEN) == 0) { - ut_free(m_encryption_key); - ut_free(m_encryption_iv); - m_encryption_key = NULL; - m_encryption_iv = NULL; - } - } -#endif /* MYSQL_ENCRYPTION */ - if (fil_space_read_name_and_filepath( m_space_id, &prev_name, &prev_filepath)) { @@ -740,30 +687,7 @@ Datafile::find_space_id() err = os_file_read( request, m_handle, page, n_bytes, page_size); - if (err == DB_IO_DECOMPRESS_FAIL) { - - /* If the page was compressed on the fly then - try and decompress the page */ - - n_bytes = os_file_compressed_page_size(page); - - if (n_bytes != ULINT_UNDEFINED) { - - err = os_file_read( - request, - m_handle, page, page_size, - UNIV_PAGE_SIZE_MAX); - - if (err != DB_SUCCESS) { - - ib::info() - << "READ FAIL: " - << "page_no:" << j; - continue; - } - } - - } else if (err != DB_SUCCESS) { + if (err != DB_SUCCESS) { ib::info() << "READ FAIL: page_no:" << j; @@ -854,17 +778,15 @@ Datafile::find_space_id() } -/** Finds a given page of the given space id from the double write buffer -and copies it to the corresponding .ibd file. -@param[in] page_no Page number to restore -@return DB_SUCCESS if page was restored from doublewrite, else DB_ERROR */ -dberr_t -Datafile::restore_from_doublewrite( - ulint restore_page_no) +/** Restore the first page of the tablespace from +the double write buffer. +@return whether the operation failed */ +bool +Datafile::restore_from_doublewrite() { /* Find if double write buffer contains page_no of given space id. */ - const byte* page = recv_sys->dblwr.find_page( - m_space_id, restore_page_no); + const byte* page = recv_sys->dblwr.find_page(m_space_id, 0); + const page_id_t page_id(m_space_id, 0); if (page == NULL) { /* If the first page of the given user tablespace is not there @@ -872,23 +794,34 @@ Datafile::restore_from_doublewrite( now. Hence this is treated as an error. */ ib::error() - << "Corrupted page " - << page_id_t(m_space_id, restore_page_no) + << "Corrupted page " << page_id << " of datafile '" << m_filepath << "' could not be found in the doublewrite buffer."; - return(DB_CORRUPTION); + return(true); } - const ulint flags = mach_read_from_4( + ulint flags = mach_read_from_4( FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + page); + if (!fsp_flags_is_valid(flags)) { + ulint cflags = fsp_flags_convert_from_101(flags); + if (cflags == ULINT_UNDEFINED) { + ib::warn() + << "Ignoring a doublewrite copy of page " + << page_id + << " due to invalid flags " << ib::hex(flags); + return(true); + } + flags = cflags; + /* The flags on the page should be converted later. */ + } + const page_size_t page_size(flags); - ut_a(page_get_page_no(page) == restore_page_no); + ut_a(page_get_page_no(page) == page_id.page_no()); - ib::info() << "Restoring page " - << page_id_t(m_space_id, restore_page_no) + ib::info() << "Restoring page " << page_id << " of datafile '" << m_filepath << "' from the doublewrite buffer. Writing " << page_size.physical() << " bytes into file '" @@ -896,14 +829,10 @@ Datafile::restore_from_doublewrite( IORequest request(IORequest::WRITE); - /* Note: The pages are written out as uncompressed because we don't - have the compression algorithm information at this point. */ - - request.disable_compression(); - return(os_file_write( request, - m_filepath, m_handle, page, 0, page_size.physical())); + m_filepath, m_handle, page, 0, page_size.physical()) + != DB_SUCCESS); } /** Create a link filename based on the contents of m_name, @@ -986,19 +915,7 @@ the path provided without its suffix, plus DOT_ISL. void RemoteDatafile::set_link_filepath(const char* path) { - if (m_link_filepath != NULL) { - return; - } - - if (path != NULL && FSP_FLAGS_GET_SHARED(flags())) { - /* Make the link_filepath based on the basename. */ - ut_ad(strcmp(&path[strlen(path) - strlen(DOT_IBD)], - DOT_IBD) == 0); - - m_link_filepath = fil_make_filepath(NULL, base_name(path), - ISL, false); - } else { - /* Make the link_filepath based on the m_name. */ + if (m_link_filepath == NULL) { m_link_filepath = fil_make_filepath(NULL, name(), ISL, false); } } @@ -1008,14 +925,11 @@ under the 'datadir' of MySQL. The datadir is the directory of a running mysqld program. We can refer to it by simply using the path ".". @param[in] name tablespace name @param[in] filepath remote filepath of tablespace datafile -@param[in] is_shared true for general tablespace, - false for file-per-table @return DB_SUCCESS or error code */ dberr_t RemoteDatafile::create_link_file( const char* name, - const char* filepath, - bool is_shared) + const char* filepath) { bool success; dberr_t err = DB_SUCCESS; @@ -1025,31 +939,8 @@ RemoteDatafile::create_link_file( ut_ad(!srv_read_only_mode); ut_ad(0 == strcmp(&filepath[strlen(filepath) - 4], DOT_IBD)); - if (is_shared) { - /* The default location for a shared tablespace is the - datadir. We previously made sure that this filepath is - not under the datadir. If it is in the datadir there - is no need for a link file. */ + link_filepath = fil_make_filepath(NULL, name, ISL, false); - size_t len = dirname_length(filepath); - if (len == 0) { - /* File is in the datadir. */ - return(DB_SUCCESS); - } - - Folder folder(filepath, len); - - if (folder_mysql_datadir == folder) { - /* File is in the datadir. */ - return(DB_SUCCESS); - } - - /* Use the file basename to build the ISL filepath. */ - link_filepath = fil_make_filepath(NULL, base_name(filepath), - ISL, false); - } else { - link_filepath = fil_make_filepath(NULL, name, ISL, false); - } if (link_filepath == NULL) { return(DB_ERROR); } @@ -1156,8 +1047,6 @@ RemoteDatafile::delete_link_file( It is always created under the datadir of MySQL. For file-per-table tablespaces, the isl file is expected to be in a 'database' directory and called 'tablename.isl'. -For general tablespaces, there will be no 'database' directory. -The 'basename.isl' will be in the datadir. The caller must free the memory returned if it is not null. @param[in] link_filepath filepath of the ISL file @return Filepath of the IBD file read from the ISL file */ @@ -1165,16 +1054,12 @@ char* RemoteDatafile::read_link_file( const char* link_filepath) { - char* filepath = NULL; - FILE* file = NULL; - - file = fopen(link_filepath, "r+b"); + FILE* file = fopen(link_filepath, "r+b"); if (file == NULL) { return(NULL); } - filepath = static_cast( - ut_malloc_nokey(OS_FILE_MAX_PATH)); + char* filepath = static_cast(ut_malloc_nokey(OS_FILE_MAX_PATH)); os_file_read_string(file, filepath, OS_FILE_MAX_PATH); fclose(file); diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc index fe272accd5a..80a2aa211db 100644 --- a/storage/innobase/fsp/fsp0fsp.cc +++ b/storage/innobase/fsp/fsp0fsp.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,14 +53,19 @@ Created 11/29/1995 Heikki Tuuri // JAN: MySQL 5.7 Encryption // #include -/** Returns an extent to the free list of a space. -@param[in] page_id page id in the extent +typedef ulint page_no_t; + +/** Return an extent to the free list of a space. +@param[in,out] space tablespace +@param[in] offset page number in the extent @param[in] page_size page size @param[in,out] mtr mini-transaction */ +MY_ATTRIBUTE((nonnull)) static void fsp_free_extent( - const page_id_t& page_id, + fil_space_t* space, + page_no_t offset, const page_size_t& page_size, mtr_t* mtr); @@ -71,7 +77,7 @@ void fseg_mark_page_used( /*================*/ fseg_inode_t* seg_inode,/*!< in: segment inode */ - ulint page, /*!< in: page offset */ + page_no_t page, /*!< in: page offset */ xdes_t* descr, /*!< in: extent descriptor */ mtr_t* mtr); /*!< in/out: mini-transaction */ @@ -79,15 +85,16 @@ fseg_mark_page_used( We think of the extent lists of the segment catenated in the order FSEG_FULL -> FSEG_NOT_FULL -> FSEG_FREE. @param[in] inode segment inode -@param[in] space_id space id +@param[in] space tablespace @param[in] page_size page size @param[in,out] mtr mini-transaction @return the first extent descriptor, or NULL if none */ +MY_ATTRIBUTE((nonnull, warn_unused_result)) static xdes_t* fseg_get_first_extent( fseg_inode_t* inode, - ulint space_id, + const fil_space_t* space, const page_size_t& page_size, mtr_t* mtr); @@ -147,193 +154,33 @@ fseg_alloc_free_page_low( MY_ATTRIBUTE((warn_unused_result)); /** Gets a pointer to the space header and x-locks its page. -@param[in] id space id +@param[in] space tablespace @param[in] page_size page size @param[in,out] mtr mini-transaction @return pointer to the space header, page x-locked */ UNIV_INLINE fsp_header_t* fsp_get_space_header( - ulint id, + const fil_space_t* space, const page_size_t& page_size, mtr_t* mtr) { buf_block_t* block; fsp_header_t* header; - ut_ad(id != 0 || !page_size.is_compressed()); + ut_ad(space->purpose != FIL_TYPE_LOG); + ut_ad(!FSP_FLAGS_GET_ZIP_SSIZE(space->flags) + == !page_size.is_compressed()); - block = buf_page_get(page_id_t(id, 0), page_size, RW_SX_LATCH, mtr); + block = buf_page_get(page_id_t(space->id, 0), page_size, + RW_SX_LATCH, mtr); header = FSP_HEADER_OFFSET + buf_block_get_frame(block); buf_block_dbg_add_level(block, SYNC_FSP_PAGE); - ut_ad(id == mach_read_from_4(FSP_SPACE_ID + header)); -#ifdef UNIV_DEBUG - const ulint flags = mach_read_from_4(FSP_SPACE_FLAGS + header); - ut_ad(page_size_t(flags).equals_to(page_size)); -#endif /* UNIV_DEBUG */ + ut_ad(space->id == mach_read_from_4(FSP_SPACE_ID + header)); return(header); } -/** Convert a 32 bit integer tablespace flags to the 32 bit table flags. -This can only be done for a tablespace that was built as a file-per-table -tablespace. Note that the fsp_flags cannot show the difference between a -Compact and Redundant table, so an extra Compact boolean must be supplied. - Low order bit - | REDUNDANT | COMPACT | COMPRESSED | DYNAMIC -fil_space_t::flags | 0 | 0 | 1 | 1 -dict_table_t::flags | 0 | 1 | 1 | 1 -@param[in] fsp_flags fil_space_t::flags -@param[in] compact true if not Redundant row format -@return tablespace flags (fil_space_t::flags) */ -ulint -fsp_flags_to_dict_tf( - ulint fsp_flags, - bool compact) -{ - /* If the table in this file-per-table tablespace is Compact - row format, the low order bit will not indicate Compact. */ - bool post_antelope = FSP_FLAGS_GET_POST_ANTELOPE(fsp_flags); - ulint zip_ssize = FSP_FLAGS_GET_ZIP_SSIZE(fsp_flags); - bool atomic_blobs = FSP_FLAGS_HAS_ATOMIC_BLOBS(fsp_flags); - bool data_dir = FSP_FLAGS_HAS_DATA_DIR(fsp_flags); - bool shared_space = FSP_FLAGS_GET_SHARED(fsp_flags); - bool page_compressed = FSP_FLAGS_GET_PAGE_COMPRESSION(fsp_flags); - ulint comp_level = FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL(fsp_flags); - bool atomic_writes = FSP_FLAGS_GET_ATOMIC_WRITES(fsp_flags); - - /* FSP_FLAGS_GET_TEMPORARY(fsp_flags) does not have an equivalent - flag position in the table flags. But it would go into flags2 if - any code is created where that is needed. */ - - ulint flags = dict_tf_init(post_antelope | compact, zip_ssize, - atomic_blobs, data_dir, shared_space, - page_compressed, comp_level, atomic_writes); - - return(flags); -} - -/** Validate the tablespace flags. -These flags are stored in the tablespace header at offset FSP_SPACE_FLAGS. -They should be 0 for ROW_FORMAT=COMPACT and ROW_FORMAT=REDUNDANT. -The newer row formats, COMPRESSED and DYNAMIC, use a file format > Antelope -so they should have a file format number plus the DICT_TF_COMPACT bit set. -@param[in] flags Tablespace flags -@return true if valid, false if not */ -bool -fsp_flags_is_valid( - ulint flags) -{ - bool post_antelope = FSP_FLAGS_GET_POST_ANTELOPE(flags); - ulint zip_ssize = FSP_FLAGS_GET_ZIP_SSIZE(flags); - bool atomic_blobs = FSP_FLAGS_HAS_ATOMIC_BLOBS(flags); - ulint page_ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags); - bool has_data_dir = FSP_FLAGS_HAS_DATA_DIR(flags); - bool is_shared = FSP_FLAGS_GET_SHARED(flags); - bool is_temp = FSP_FLAGS_GET_TEMPORARY(flags); - bool is_encryption = FSP_FLAGS_GET_ENCRYPTION(flags); - ulint unused = FSP_FLAGS_GET_UNUSED(flags); - bool page_compression = FSP_FLAGS_GET_PAGE_COMPRESSION(flags); - ulint page_compression_level = FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL(flags); - ulint atomic_writes = FSP_FLAGS_GET_ATOMIC_WRITES(flags); - - const char *file; - ulint line; - -#define GOTO_ERROR file = __FILE__; line = __LINE__; goto err_exit; - - DBUG_EXECUTE_IF("fsp_flags_is_valid_failure", return(false);); - - /* The Antelope row formats REDUNDANT and COMPACT did - not use tablespace flags, so the entire 4-byte field - is zero for Antelope row formats. */ - if (flags == 0) { - return(true); - } - - /* Barracuda row formats COMPRESSED and DYNAMIC use a feature called - ATOMIC_BLOBS which builds on the page structure introduced for the - COMPACT row format by allowing long fields to be broken into prefix - and externally stored parts. So if it is Post_antelope, it uses - Atomic BLOBs. */ - if (post_antelope != atomic_blobs) { - GOTO_ERROR; - return(false); - } - - /* Make sure there are no bits that we do not know about. */ - if (unused != 0) { - GOTO_ERROR; - } - - /* The zip ssize can be zero if it is other than compressed row format, - or it could be from 1 to the max. */ - if (zip_ssize > PAGE_ZIP_SSIZE_MAX) { - GOTO_ERROR; - } - - /* The actual page size must be within 4k and 16K (3 =< ssize =< 5). */ - if (page_ssize != 0 - && (page_ssize < UNIV_PAGE_SSIZE_MIN - || page_ssize > UNIV_PAGE_SSIZE_MAX)) { - GOTO_ERROR; - } - - /* Only single-table tablespaces use the DATA DIRECTORY clause. - It is not compatible with the TABLESPACE clause. Nor is it - compatible with the TEMPORARY clause. */ - if (has_data_dir && (is_shared || is_temp)) { - GOTO_ERROR; - return(false); - } - - /* Only single-table and not temp tablespaces use the encryption - clause. */ - if (is_encryption && (is_shared || is_temp)) { - GOTO_ERROR; - } - - /* Page compression level requires page compression and atomic blobs - to be set */ - if (page_compression_level || page_compression) { - if (!page_compression || !atomic_blobs) { - GOTO_ERROR; - } - } - - if (atomic_writes > ATOMIC_WRITES_OFF) { - GOTO_ERROR; - return (false); - } - -#if UNIV_FORMAT_MAX != UNIV_FORMAT_B -# error UNIV_FORMAT_MAX != UNIV_FORMAT_B, Add more validations. -#endif -#if FSP_FLAGS_POS_UNUSED != 13 - //# error You have added a new FSP_FLAG without adding a validation check. -#endif - - return(true); - -err_exit: - ib::error() << "Tablespace flags: " << flags << " corrupted " - << " in file: " << file << " line: " << line - << " post_antelope: " << post_antelope - << " atomic_blobs: " << atomic_blobs - << " unused: " << unused - << " zip_ssize: " << zip_ssize << " max: " << PAGE_ZIP_SSIZE_MAX - << " page_ssize: " << page_ssize - << " " << UNIV_PAGE_SSIZE_MIN << ":" << UNIV_PAGE_SSIZE_MAX - << " has_data_dir: " << has_data_dir - << " is_shared: " << is_shared - << " is_temp: " << is_temp - << " is_encryption: " << is_encryption - << " page_compressed: " << page_compression - << " page_compression_level: " << page_compression_level - << " atomic_writes: " << atomic_writes; - return (false); -} - /** Check if checksum is disabled for the given space. @param[in] space_id tablespace ID @return true if checksum is disabled for given space. */ @@ -344,19 +191,6 @@ fsp_is_checksum_disabled( return(fsp_is_system_temporary(space_id)); } -/** Check if tablespace is file-per-table. -@param[in] space_id tablespace ID -@param[in] fsp_flags tablespace flags -@return true if tablespace is file-per-table. */ -bool -fsp_is_file_per_table( - ulint space_id, - ulint fsp_flags) -{ - return(!is_system_tablespace(space_id) - && !fsp_is_shared_tablespace(fsp_flags)); -} - #ifdef UNIV_DEBUG /** Skip some of the sanity checks that are time consuming even in debug mode and can affect frequent verification runs that are done to ensure stability of @@ -584,7 +418,7 @@ xdes_init( /** Get pointer to a the extent descriptor of a page. @param[in,out] sp_header tablespace header page, x-latched -@param[in] space tablespace identifier +@param[in] space tablespace @param[in] offset page offset @param[in,out] mtr mini-transaction @param[in] init_space whether the tablespace is being initialized @@ -595,43 +429,36 @@ exist in the space or if the offset exceeds free limit */ UNIV_INLINE MY_ATTRIBUTE((warn_unused_result)) xdes_t* xdes_get_descriptor_with_space_hdr( - fsp_header_t* sp_header, - ulint space, - ulint offset, - mtr_t* mtr, - bool init_space = false, - buf_block_t** desc_block = NULL) + fsp_header_t* sp_header, + const fil_space_t* space, + page_no_t offset, + mtr_t* mtr, + bool init_space = false, + buf_block_t** desc_block = NULL) { ulint limit; ulint size; ulint descr_page_no; - ulint flags; page_t* descr_page; -#ifdef UNIV_DEBUG - const fil_space_t* fspace = fil_space_get(space); - ut_ad(fspace != NULL); -#endif /* UNIV_DEBUG */ - ut_ad(mtr_memo_contains(mtr, &fspace->latch, MTR_MEMO_X_LOCK)); + ut_ad(mtr_memo_contains(mtr, &space->latch, MTR_MEMO_X_LOCK)); ut_ad(mtr_memo_contains_page(mtr, sp_header, MTR_MEMO_PAGE_SX_FIX)); ut_ad(page_offset(sp_header) == FSP_HEADER_OFFSET); /* Read free limit and space size */ limit = mach_read_from_4(sp_header + FSP_FREE_LIMIT); size = mach_read_from_4(sp_header + FSP_SIZE); - flags = mach_read_from_4(sp_header + FSP_SPACE_FLAGS); - ut_ad(limit == fspace->free_limit - || (fspace->free_limit == 0 + ut_ad(limit == space->free_limit + || (space->free_limit == 0 && (init_space - || fspace->purpose == FIL_TYPE_TEMPORARY + || space->purpose == FIL_TYPE_TEMPORARY || (srv_startup_is_before_trx_rollback_phase - && fspace->id <= srv_undo_tablespaces)))); - ut_ad(size == fspace->size_in_header); - ut_ad(flags == fspace->flags); + && space->id <= srv_undo_tablespaces)))); + ut_ad(size == space->size_in_header); if ((offset >= size) || (offset >= limit)) { return(NULL); } - const page_size_t page_size(flags); + const page_size_t page_size(space->flags); descr_page_no = xdes_calc_descriptor_page(page_size, offset); @@ -644,7 +471,7 @@ xdes_get_descriptor_with_space_hdr( block = NULL; } else { block = buf_page_get( - page_id_t(space, descr_page_no), page_size, + page_id_t(space->id, descr_page_no), page_size, RW_SX_LATCH, mtr); buf_block_dbg_add_level(block, SYNC_FSP_PAGE); @@ -660,63 +487,60 @@ xdes_get_descriptor_with_space_hdr( + XDES_SIZE * xdes_calc_descriptor_index(page_size, offset)); } -/** Gets pointer to a the extent descriptor of a page. -The page where the extent descriptor resides is x-locked. If the page offset -is equal to the free limit of the space, adds new extents from above the free -limit to the space free list, if not free limit == space size. This adding -is necessary to make the descriptor defined, as they are uninitialized -above the free limit. -@param[in] space_id space id +/** Get the extent descriptor of a page. +The page where the extent descriptor resides is x-locked. If the page +offset is equal to the free limit of the space, we will add new +extents from above the free limit to the space free list, if not free +limit == space size. This adding is necessary to make the descriptor +defined, as they are uninitialized above the free limit. +@param[in] space tablespace @param[in] offset page offset; if equal to the free limit, we try to add new extents to the space free list @param[in] page_size page size @param[in,out] mtr mini-transaction -@return pointer to the extent descriptor, NULL if the page does not -exist in the space or if the offset exceeds the free limit */ +@return the extent descriptor */ +static xdes_t* xdes_get_descriptor( - ulint space_id, - ulint offset, + const fil_space_t* space, + page_no_t offset, const page_size_t& page_size, mtr_t* mtr) { buf_block_t* block; fsp_header_t* sp_header; - block = buf_page_get(page_id_t(space_id, 0), page_size, + block = buf_page_get(page_id_t(space->id, 0), page_size, RW_SX_LATCH, mtr); buf_block_dbg_add_level(block, SYNC_FSP_PAGE); sp_header = FSP_HEADER_OFFSET + buf_block_get_frame(block); - return(xdes_get_descriptor_with_space_hdr(sp_header, space_id, offset, - mtr)); + return(xdes_get_descriptor_with_space_hdr( + sp_header, space, offset, mtr)); } -/********************************************************************//** -Gets pointer to a the extent descriptor if the file address -of the descriptor list node is known. The page where the +/** Get a pointer to the extent descriptor. The page where the extent descriptor resides is x-locked. +@param[in] space tablespace +@param[in] page_size page size +@param[in] lst_node file address of the list node + contained in the descriptor +@param[in,out] mtr mini-transaction @return pointer to the extent descriptor */ +MY_ATTRIBUTE((nonnull, warn_unused_result)) UNIV_INLINE xdes_t* xdes_lst_get_descriptor( -/*====================*/ - ulint space, /*!< in: space id */ + const fil_space_t* space, const page_size_t& page_size, - fil_addr_t lst_node,/*!< in: file address of the list node - contained in the descriptor */ - mtr_t* mtr) /*!< in/out: mini-transaction */ + fil_addr_t lst_node, + mtr_t* mtr) { - xdes_t* descr; - - ut_ad(mtr); - ut_ad(mtr_memo_contains(mtr, fil_space_get_latch(space, NULL), - MTR_MEMO_X_LOCK)); - descr = fut_get_ptr(space, page_size, lst_node, RW_SX_LATCH, mtr) - - XDES_FLST_NODE; - - return(descr); + ut_ad(mtr_memo_contains(mtr, &space->latch, MTR_MEMO_X_LOCK)); + ut_ad(page_size.equals_to(page_size_t(space->flags))); + return(fut_get_ptr(space->id, page_size, lst_node, RW_SX_LATCH, mtr) + - XDES_FLST_NODE); } /********************************************************************//** @@ -771,30 +595,28 @@ updating an allocation bitmap page. static void fsp_space_modify_check( - ulint id, - const mtr_t* mtr) + const fil_space_t* space, + const mtr_t* mtr) { switch (mtr->get_log_mode()) { case MTR_LOG_SHORT_INSERTS: case MTR_LOG_NONE: /* These modes are only allowed within a non-bitmap page when there is a higher-level redo log record written. */ + ut_ad(space->purpose == FIL_TYPE_TABLESPACE + || space->purpose == FIL_TYPE_TEMPORARY); break; case MTR_LOG_NO_REDO: - { - const fil_type_t type = fil_space_get_type(id); - ut_a(srv_is_tablespace_truncated(id) - || fil_space_is_being_truncated(id) - || fil_space_get_flags(id) == ULINT_UNDEFINED - || type == FIL_TYPE_TEMPORARY - || type == FIL_TYPE_IMPORT - || fil_space_is_redo_skipped(id)); - } + ut_ad(space->purpose == FIL_TYPE_TEMPORARY + || space->purpose == FIL_TYPE_IMPORT + || space->redo_skipped_count + || space->is_being_truncated + || srv_is_tablespace_truncated(space->id)); return; case MTR_LOG_ALL: /* We may only write redo log for a persistent tablespace. */ - ut_ad(fil_space_get_type(id) == FIL_TYPE_TABLESPACE); - ut_ad(mtr->is_named_space(id)); + ut_ad(space->purpose == FIL_TYPE_TABLESPACE); + ut_ad(mtr->is_named_space(space->id)); return; } @@ -803,17 +625,21 @@ fsp_space_modify_check( #endif /* UNIV_DEBUG */ /** Initialize a file page. +@param[in] space tablespace @param[in,out] block file page @param[in,out] mtr mini-transaction */ +MY_ATTRIBUTE((nonnull)) static void fsp_init_file_page( - buf_block_t* block, - mtr_t* mtr) + const fil_space_t* space MY_ATTRIBUTE((unused)), + buf_block_t* block, + mtr_t* mtr) { + ut_d(fsp_space_modify_check(space, mtr)); + ut_ad(space->id == block->page.id.space()); fsp_init_file_page_low(block); - ut_d(fsp_space_modify_check(block->page.id.space(), mtr)); mlog_write_initial_log_record(buf_block_get_frame(block), MLOG_INIT_FILE_PAGE2, mtr); } @@ -869,6 +695,7 @@ fsp_header_init_fields( ulint space_id, /*!< in: space id */ ulint flags) /*!< in: tablespace flags (FSP_SPACE_FLAGS) */ { + flags &= ~FSP_FLAGS_MEM_MASK; ut_a(fsp_flags_is_valid(flags)); mach_write_to_4(FSP_HEADER_OFFSET + FSP_SPACE_ID + page, @@ -877,178 +704,6 @@ fsp_header_init_fields( flags); } -#if 0 /* MySQL 5.7 Encryption */ -/** Fill the encryption info. -@param[in] space tablespace -@param[in,out] encrypt_info buffer for encrypt key. -@return true if success. */ -bool -fsp_header_fill_encryption_info( - fil_space_t* space, - byte* encrypt_info) -{ - byte* ptr; - lint elen; - ulint master_key_id; - byte* master_key; - byte key_info[ENCRYPTION_KEY_LEN * 2]; - ulint crc; - Encryption::Version version; -#ifdef UNIV_ENCRYPT_DEBUG - const byte* data; - ulint i; -#endif - - /* Get master key from key ring */ - Encryption::get_master_key(&master_key_id, &master_key, &version); - if (master_key == NULL) { - return(false); - } - - memset(encrypt_info, 0, ENCRYPTION_INFO_SIZE_V2); - memset(key_info, 0, ENCRYPTION_KEY_LEN * 2); - - /* Use the new master key to encrypt the tablespace - key. */ - ut_ad(encrypt_info != NULL); - ptr = encrypt_info; - - /* Write magic header. */ - if (version == Encryption::ENCRYPTION_VERSION_1) { - memcpy(ptr, ENCRYPTION_KEY_MAGIC_V1, ENCRYPTION_MAGIC_SIZE); - } else { - memcpy(ptr, ENCRYPTION_KEY_MAGIC_V2, ENCRYPTION_MAGIC_SIZE); - } - ptr += ENCRYPTION_MAGIC_SIZE; - - /* Write master key id. */ - mach_write_to_4(ptr, master_key_id); - ptr += sizeof(ulint); - - /* Write server uuid. */ - if (version == Encryption::ENCRYPTION_VERSION_2) { - memcpy(ptr, Encryption::uuid, ENCRYPTION_SERVER_UUID_LEN); - ptr += ENCRYPTION_SERVER_UUID_LEN; - } - - /* Write tablespace key to temp space. */ - memcpy(key_info, - space->encryption_key, - ENCRYPTION_KEY_LEN); - - /* Write tablespace iv to temp space. */ - memcpy(key_info + ENCRYPTION_KEY_LEN, - space->encryption_iv, - ENCRYPTION_KEY_LEN); - -#ifdef UNIV_ENCRYPT_DEBUG - fprintf(stderr, "Set %lu:%lu ",space->id, - Encryption::master_key_id); - for (data = (const byte*) master_key, i = 0; - i < ENCRYPTION_KEY_LEN; i++) - fprintf(stderr, "%02lx", (ulong)*data++); - fprintf(stderr, " "); - for (data = (const byte*) space->encryption_key, - i = 0; i < ENCRYPTION_KEY_LEN; i++) - fprintf(stderr, "%02lx", (ulong)*data++); - fprintf(stderr, " "); - for (data = (const byte*) space->encryption_iv, - i = 0; i < ENCRYPTION_KEY_LEN; i++) - fprintf(stderr, "%02lx", (ulong)*data++); - fprintf(stderr, "\n"); -#endif - /* Encrypt tablespace key and iv. */ - elen = my_aes_encrypt( - key_info, - ENCRYPTION_KEY_LEN * 2, - ptr, - master_key, - ENCRYPTION_KEY_LEN, - my_aes_256_ecb, - NULL, false); - - if (elen == MY_AES_BAD_DATA) { - my_free(master_key); - return(false); - } - - ptr += ENCRYPTION_KEY_LEN * 2; - - /* Write checksum bytes. */ - crc = ut_crc32(key_info, ENCRYPTION_KEY_LEN * 2); - mach_write_to_4(ptr, crc); - - my_free(master_key); - return(true); -} -#endif /* ! */ - -/** Rotate the encryption info in the space header. -@param[in] space tablespace -@param[in] encrypt_info buffer for re-encrypt key. -@param[in,out] mtr mini-transaction -@return true if success. */ -bool -fsp_header_rotate_encryption( - fil_space_t* space, - byte* encrypt_info, - mtr_t* mtr) -{ - buf_block_t* block; - ulint offset; - - ut_ad(mtr); - - const page_size_t page_size(space->flags); - -#if MYSQL_ENCRYPTION - page_t* page; - ulint master_key_id; - ut_ad(space->encryption_type != Encryption::NONE); - /* Fill encryption info. */ - if (!fsp_header_fill_encryption_info(space, - encrypt_info)) { - return(false); - } -#endif - - /* Save the encryption info to the page 0. */ - block = buf_page_get(page_id_t(space->id, 0), - page_size, - RW_SX_LATCH, mtr); - buf_block_dbg_add_level(block, SYNC_FSP_PAGE); - ut_ad(space->id == page_get_space_id(buf_block_get_frame(block))); - - offset = fsp_header_get_encryption_offset(page_size); - ut_ad(offset != 0 && offset < UNIV_PAGE_SIZE); - - -#if MYSQL_ENCRYPTION - page = buf_block_get_frame(block); - /* If is in recovering, skip all master key id is rotated - tablespaces. */ - master_key_id = mach_read_from_4( - page + offset + ENCRYPTION_MAGIC_SIZE); - if (recv_recovery_is_on() - && master_key_id == Encryption::master_key_id) { - ut_ad(memcmp(page + offset, - ENCRYPTION_KEY_MAGIC_V1, - ENCRYPTION_MAGIC_SIZE) == 0 - || memcmp(page + offset, - ENCRYPTION_KEY_MAGIC_V2, - ENCRYPTION_MAGIC_SIZE) == 0); - return(true); - } - - mlog_write_string(page + offset, - encrypt_info, - ENCRYPTION_INFO_SIZE_V2, - mtr); -#endif /* MYSQL_ENCRYPTION */ - - return(true); -} - /** Initializes the space header of a new created space and creates also the insert buffer tree root if space == 0. @param[in] space_id space id @@ -1082,7 +737,7 @@ fsp_header_init( /* The prior contents of the file page should be ignored */ - fsp_init_file_page(block, mtr); + fsp_init_file_page(space, block, mtr); page = buf_block_get_frame(block); mlog_write_ulint(page + FIL_PAGE_TYPE, FIL_PAGE_TYPE_FSP_HDR, @@ -1095,7 +750,8 @@ fsp_header_init( mlog_write_ulint(header + FSP_SIZE, size, MLOG_4BYTES, mtr); mlog_write_ulint(header + FSP_FREE_LIMIT, 0, MLOG_4BYTES, mtr); - mlog_write_ulint(header + FSP_SPACE_FLAGS, space->flags, + mlog_write_ulint(header + FSP_SPACE_FLAGS, + space->flags & ~FSP_FLAGS_MEM_MASK, MLOG_4BYTES, mtr); mlog_write_ulint(header + FSP_FRAG_N_USED, 0, MLOG_4BYTES, mtr); @@ -1110,31 +766,6 @@ fsp_header_init( fsp_fill_free_list(!is_system_tablespace(space_id), space, header, mtr); -#if 0 /* MySQL 5.7 Encryption */ - /* For encryption tablespace, we need to save the encryption - info to the page 0. */ - if (FSP_FLAGS_GET_ENCRYPTION(space->flags)) { - ulint offset = fsp_header_get_encryption_offset(page_size); - byte encryption_info[ENCRYPTION_INFO_SIZE_V2]; - - if (offset == 0) - return(false); - - if (!fsp_header_fill_encryption_info(space, - encryption_info)) { - space->encryption_type = Encryption::NONE; - memset(space->encryption_key, 0, ENCRYPTION_KEY_LEN); - memset(space->encryption_iv, 0, ENCRYPTION_KEY_LEN); - return(false); - } - - mlog_write_string(page + offset, - encryption_info, - ENCRYPTION_INFO_SIZE_V2, - mtr); - } -#endif /* ! */ - if (space_id == srv_sys_space.space_id()) { if (btr_create(DICT_CLUSTERED | DICT_UNIVERSAL | DICT_IBUF, 0, univ_page_size, DICT_IBUF_ID_MIN + space_id, @@ -1179,174 +810,6 @@ fsp_header_get_space_id( return(id); } -/** Reads the page size from the first page of a tablespace. -@param[in] page first page of a tablespace -@return page size */ -page_size_t -fsp_header_get_page_size( - const page_t* page) -{ - return(page_size_t(fsp_header_get_flags(page))); -} - -#if 0 /* MySQL 5.7 Encryption */ -/** Decoding the encryption info -from the first page of a tablespace. -@param[in/out] key key -@param[in/out] iv iv -@param[in] encryption_info encrytion info. -@return true if success */ -bool -fsp_header_decode_encryption_info( - byte* key, - byte* iv, - byte* encryption_info) -{ - byte* ptr; - ulint master_key_id; - byte* master_key = NULL; - lint elen; - byte key_info[ENCRYPTION_KEY_LEN * 2]; - ulint crc1; - ulint crc2; - char srv_uuid[ENCRYPTION_SERVER_UUID_LEN + 1]; - Encryption::Version version; -#ifdef UNIV_ENCRYPT_DEBUG - const byte* data; - ulint i; -#endif - - ptr = encryption_info; - - /* For compatibility with 5.7.11, we need to handle the - encryption information which created in this old version. */ - if (memcmp(ptr, ENCRYPTION_KEY_MAGIC_V1, - ENCRYPTION_MAGIC_SIZE) == 0) { - version = Encryption::ENCRYPTION_VERSION_1; - } else { - version = Encryption::ENCRYPTION_VERSION_2; - } - /* Check magic. */ - if (version == Encryption::ENCRYPTION_VERSION_2 - && memcmp(ptr, ENCRYPTION_KEY_MAGIC_V2, ENCRYPTION_MAGIC_SIZE) != 0) { - /* We ignore report error for recovery, - since the encryption info maybe hasn't writen - into datafile when the table is newly created. */ - if (!recv_recovery_is_on()) { - return(false); - } else { - return(true); - } - } - ptr += ENCRYPTION_MAGIC_SIZE; - - /* Get master key id. */ - master_key_id = mach_read_from_4(ptr); - ptr += sizeof(ulint); - - /* Get server uuid. */ - if (version == Encryption::ENCRYPTION_VERSION_2) { - memset(srv_uuid, 0, ENCRYPTION_SERVER_UUID_LEN + 1); - memcpy(srv_uuid, ptr, ENCRYPTION_SERVER_UUID_LEN); - ptr += ENCRYPTION_SERVER_UUID_LEN; - } - - /* Get master key by key id. */ - memset(key_info, 0, ENCRYPTION_KEY_LEN * 2); - if (version == Encryption::ENCRYPTION_VERSION_1) { - Encryption::get_master_key(master_key_id, NULL, &master_key); - } else { - Encryption::get_master_key(master_key_id, srv_uuid, &master_key); - } - if (master_key == NULL) { - return(false); - } - -#ifdef UNIV_ENCRYPT_DEBUG - fprintf(stderr, "%lu ", master_key_id); - for (data = (const byte*) master_key, i = 0; - i < ENCRYPTION_KEY_LEN; i++) - fprintf(stderr, "%02lx", (ulong)*data++); -#endif - - /* Decrypt tablespace key and iv. */ - elen = my_aes_decrypt( - ptr, - ENCRYPTION_KEY_LEN * 2, - key_info, - master_key, - ENCRYPTION_KEY_LEN, - my_aes_256_ecb, NULL, false); - - if (elen == MY_AES_BAD_DATA) { - my_free(master_key); - return(NULL); - } - - /* Check checksum bytes. */ - ptr += ENCRYPTION_KEY_LEN * 2; - - crc1 = mach_read_from_4(ptr); - crc2 = ut_crc32(key_info, ENCRYPTION_KEY_LEN * 2); - if (crc1 != crc2) { - ib::error() << "Failed to decrpt encryption information," - << " please check key file is not changed!"; - return(false); - } - - /* Get tablespace key */ - memcpy(key, key_info, ENCRYPTION_KEY_LEN); - - /* Get tablespace iv */ - memcpy(iv, key_info + ENCRYPTION_KEY_LEN, - ENCRYPTION_KEY_LEN); - -#ifdef UNIV_ENCRYPT_DEBUG - fprintf(stderr, " "); - for (data = (const byte*) key, - i = 0; i < ENCRYPTION_KEY_LEN; i++) - fprintf(stderr, "%02lx", (ulong)*data++); - fprintf(stderr, " "); - for (data = (const byte*) iv, - i = 0; i < ENCRYPTION_KEY_LEN; i++) - fprintf(stderr, "%02lx", (ulong)*data++); - fprintf(stderr, "\n"); -#endif - - my_free(master_key); - - if (Encryption::master_key_id < master_key_id) { - Encryption::master_key_id = master_key_id; - memcpy(Encryption::uuid, srv_uuid, ENCRYPTION_SERVER_UUID_LEN); - } - - return(true); -} - -/** Reads the encryption key from the first page of a tablespace. -@param[in] fsp_flags tablespace flags -@param[in/out] key tablespace key -@param[in/out] iv tablespace iv -@param[in] page first page of a tablespace -@return true if success */ -bool -fsp_header_get_encryption_key( - ulint fsp_flags, - byte* key, - byte* iv, - page_t* page) -{ - ulint offset; - const page_size_t page_size(fsp_flags); - offset = fsp_header_get_encryption_offset(page_size); - if (offset == 0) { - return(false); - } - - return(fsp_header_decode_encryption_info(key, iv, page + offset)); -} -#endif /* ! */ - /**********************************************************************//** Increases the space size field of a space. */ void @@ -1362,10 +825,10 @@ fsp_header_inc_size( ut_ad(mtr); fil_space_t* space = mtr_x_lock_space(space_id, mtr); - ut_d(fsp_space_modify_check(space_id, mtr)); + ut_d(fsp_space_modify_check(space, mtr)); header = fsp_get_space_header( - space_id, page_size_t(space->flags), mtr); + space, page_size_t(space->flags), mtr); size = mach_read_from_4(header + FSP_SIZE); ut_ad(size == space->size_in_header); @@ -1392,12 +855,9 @@ fsp_header_get_tablespace_size(void) mtr_start(&mtr); -#ifdef UNIV_DEBUG - fil_space_t* space = -#endif /* UNIV_DEBUG */ - mtr_x_lock_space(TRX_SYS_SPACE, &mtr); + fil_space_t* space = mtr_x_lock_space(TRX_SYS_SPACE, &mtr); - header = fsp_get_space_header(TRX_SYS_SPACE, univ_page_size, &mtr); + header = fsp_get_space_header(space, univ_page_size, &mtr); size = mach_read_from_4(header + FSP_SIZE); ut_ad(space->size_in_header == size); @@ -1426,7 +886,7 @@ fsp_try_extend_data_file_with_pages( ulint size; ut_a(!is_system_tablespace(space->id)); - ut_d(fsp_space_modify_check(space->id, mtr)); + ut_d(fsp_space_modify_check(space, mtr)); size = mach_read_from_4(header + FSP_SIZE); ut_ad(size == space->size_in_header); @@ -1460,7 +920,7 @@ fsp_try_extend_data_file( "ran out of space. Please add another file or use" " 'autoextend' for the last file in setting"; - ut_d(fsp_space_modify_check(space->id, mtr)); + ut_d(fsp_space_modify_check(space, mtr)); if (space->id == srv_sys_space.space_id() && !srv_sys_space.can_auto_extend_last_file()) { @@ -1470,8 +930,8 @@ fsp_try_extend_data_file( to reset the flag to false as dealing with this error requires server restart. */ if (!srv_sys_space.get_tablespace_full_status()) { - ib::error() << "Tablespace " << srv_sys_space.name() - << " " << OUT_OF_SPACE_MSG + ib::error() << "The InnoDB system tablespace " + << OUT_OF_SPACE_MSG << " innodb_data_file_path."; srv_sys_space.set_tablespace_full_status(true); } @@ -1484,8 +944,8 @@ fsp_try_extend_data_file( to reset the flag to false as dealing with this error requires server restart. */ if (!srv_tmp_space.get_tablespace_full_status()) { - ib::error() << "Tablespace " << srv_tmp_space.name() - << " " << OUT_OF_SPACE_MSG + ib::error() << "The InnoDB temporary tablespace " + << OUT_OF_SPACE_MSG << " innodb_temp_data_file_path."; srv_tmp_space.set_tablespace_full_status(true); } @@ -1545,7 +1005,7 @@ fsp_try_extend_data_file( } /** Calculate the number of pages to extend a datafile. -We extend single-table and general tablespaces first one extent at a time, +We extend single-table tablespaces first one extent at a time, but 4 at a time for bigger tablespaces. It is not enough to extend always by one extent, because we need to add at least one extent to FSP_FREE. A single extent descriptor page will track many extents. And the extent @@ -1604,7 +1064,6 @@ fsp_fill_free_list( { ulint limit; ulint size; - ulint flags; xdes_t* descr; ulint count = 0; ulint frag_n_used; @@ -1613,18 +1072,16 @@ fsp_fill_free_list( ut_ad(header != NULL); ut_ad(mtr != NULL); ut_ad(page_offset(header) == FSP_HEADER_OFFSET); - ut_d(fsp_space_modify_check(space->id, mtr)); + ut_d(fsp_space_modify_check(space, mtr)); /* Check if we can fill free list from above the free list limit */ size = mach_read_from_4(header + FSP_SIZE); limit = mach_read_from_4(header + FSP_FREE_LIMIT); - flags = mach_read_from_4(header + FSP_SPACE_FLAGS); ut_ad(size == space->size_in_header); ut_ad(limit == space->free_limit); - ut_ad(flags == space->flags); - const page_size_t page_size(flags); + const page_size_t page_size(space->flags); if (size < limit + FSP_EXTENT_SIZE * FSP_FREE_ADD) { bool skip_resize = init_space; @@ -1675,7 +1132,7 @@ fsp_fill_free_list( buf_block_dbg_add_level(block, SYNC_FSP_PAGE); - fsp_init_file_page(block, mtr); + fsp_init_file_page(space, block, mtr); mlog_write_ulint(buf_block_get_frame(block) + FIL_PAGE_TYPE, FIL_PAGE_TYPE_XDES, @@ -1713,7 +1170,7 @@ fsp_fill_free_list( buf_block_dbg_add_level(block, SYNC_FSP_PAGE); - fsp_init_file_page(block, &ibuf_mtr); + fsp_init_file_page(space, block, &ibuf_mtr); ibuf_bitmap_page_init(block, &ibuf_mtr); @@ -1723,7 +1180,7 @@ fsp_fill_free_list( buf_block_t* desc_block = NULL; descr = xdes_get_descriptor_with_space_hdr( - header, space->id, i, mtr, init_space, &desc_block); + header, space, i, mtr, init_space, &desc_block); if (desc_block != NULL) { fil_block_check_type( desc_block, FIL_PAGE_TYPE_XDES, mtr); @@ -1760,7 +1217,7 @@ fsp_fill_free_list( } /** Allocates a new free extent. -@param[in] space_id tablespace identifier +@param[in,out] space tablespace @param[in] page_size page size @param[in] hint hint of which extent would be desirable: any page offset in the extent goes; the hint must not be > FSP_FREE_LIMIT @@ -1769,7 +1226,7 @@ page offset in the extent goes; the hint must not be > FSP_FREE_LIMIT static xdes_t* fsp_alloc_free_extent( - ulint space_id, + fil_space_t* space, const page_size_t& page_size, ulint hint, mtr_t* mtr) @@ -1779,13 +1236,10 @@ fsp_alloc_free_extent( xdes_t* descr; buf_block_t* desc_block = NULL; - header = fsp_get_space_header(space_id, page_size, mtr); + header = fsp_get_space_header(space, page_size, mtr); descr = xdes_get_descriptor_with_space_hdr( - header, space_id, hint, mtr, false, &desc_block); - - fil_space_t* space = fil_space_get(space_id); - ut_a(space != NULL); + header, space, hint, mtr, false, &desc_block); if (desc_block != NULL) { fil_block_check_type(desc_block, FIL_PAGE_TYPE_XDES, mtr); @@ -1809,7 +1263,7 @@ fsp_alloc_free_extent( } descr = xdes_lst_get_descriptor( - space_id, page_size, first, mtr); + space, page_size, first, mtr); } flst_remove(header + FSP_FREE, descr + XDES_FLST_NODE, mtr); @@ -1858,7 +1312,8 @@ fsp_alloc_from_free_frag( NOTE: If init_mtr != mtr, the block will only be initialized if it was not previously x-latched. It is assumed that the block has been x-latched only by mtr, and freed in mtr in that case. -@param[in] page_id page id of the allocated page +@param[in,out] space tablespace +@param[in] offset page number of the allocated page @param[in] page_size page size of the allocated page @param[in] rw_latch RW_SX_LATCH, RW_X_LATCH @param[in,out] mtr mini-transaction of the allocation @@ -1868,19 +1323,21 @@ or rw_lock_x_lock_count(&block->lock) == 1 */ static buf_block_t* fsp_page_create( - const page_id_t& page_id, + fil_space_t* space, + page_no_t offset, const page_size_t& page_size, rw_lock_type_t rw_latch, mtr_t* mtr, mtr_t* init_mtr) { - buf_block_t* block = buf_page_create(page_id, page_size, init_mtr); + ut_ad(page_size.equals_to(page_size_t(space->flags))); - ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX) - == rw_lock_own(&block->lock, RW_LOCK_X)); + buf_block_t* block = buf_page_create(page_id_t(space->id, offset), + page_size, init_mtr); - ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_SX_FIX) - == rw_lock_own(&block->lock, RW_LOCK_SX)); + ut_d(bool latched = mtr_memo_contains_flagged(mtr, block, + MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_SX_FIX)); ut_ad(rw_latch == RW_X_LATCH || rw_latch == RW_SX_LATCH); @@ -1906,12 +1363,8 @@ fsp_page_create( /* Initialize the page, unless it was already SX-latched in mtr. (In this case, we would want to allocate another page that has not been freed in mtr.) */ - ut_ad(init_mtr == mtr - || !mtr_memo_contains_flagged(mtr, block, - MTR_MEMO_PAGE_X_FIX - | MTR_MEMO_PAGE_SX_FIX)); - - fsp_init_file_page(block, init_mtr); + ut_ad(init_mtr == mtr || !latched); + fsp_init_file_page(space, block, init_mtr); } return(block); @@ -1919,7 +1372,7 @@ fsp_page_create( /** Allocates a single free page from a space. The page is marked as used. -@param[in] space space id +@param[in,out] space tablespace @param[in] page_size page size @param[in] hint hint of which page would be desirable @param[in] rw_latch RW_SX_LATCH, RW_X_LATCH @@ -1933,7 +1386,7 @@ initialized (may be the same as mtr) static MY_ATTRIBUTE((warn_unused_result)) buf_block_t* fsp_alloc_free_page( - ulint space, + fil_space_t* space, const page_size_t& page_size, ulint hint, rw_lock_type_t rw_latch, @@ -1944,8 +1397,7 @@ fsp_alloc_free_page( fil_addr_t first; xdes_t* descr; ulint free; - ulint page_no; - ulint space_size; + const ulint space_id = space->id; ut_ad(mtr); ut_ad(init_mtr); @@ -2004,18 +1456,18 @@ fsp_alloc_free_page( ut_error; } - page_no = xdes_get_offset(descr) + free; + page_no_t page_no = xdes_get_offset(descr) + free; - space_size = mach_read_from_4(header + FSP_SIZE); - ut_ad(space_size == fil_space_get(space)->size_in_header - || (space == TRX_SYS_SPACE + page_no_t space_size = mach_read_from_4(header + FSP_SIZE); + ut_ad(space_size == space->size_in_header + || (space_id == TRX_SYS_SPACE && srv_startup_is_before_trx_rollback_phase)); if (space_size <= page_no) { /* It must be that we are extending a single-table tablespace whose size is still < 64 pages */ - ut_a(!is_system_tablespace(space)); + ut_a(!is_system_tablespace(space_id)); if (page_no >= FSP_EXTENT_SIZE) { ib::error() << "Trying to extend a single-table" " tablespace " << space << " , by single" @@ -2024,9 +1476,7 @@ fsp_alloc_free_page( return(NULL); } - fil_space_t* fspace = fil_space_get(space); - - if (!fsp_try_extend_data_file_with_pages(fspace, page_no, + if (!fsp_try_extend_data_file_with_pages(space, page_no, header, mtr)) { /* No disk space left */ return(NULL); @@ -2034,19 +1484,21 @@ fsp_alloc_free_page( } fsp_alloc_from_free_frag(header, descr, free, mtr); - return(fsp_page_create(page_id_t(space, page_no), page_size, - rw_latch, mtr, init_mtr)); + return(fsp_page_create(space, page_no, page_size, rw_latch, + mtr, init_mtr)); } /** Frees a single page of a space. The page is marked as free and clean. +@param[in,out] space tablespace @param[in] page_id page id @param[in] page_size page size @param[in,out] mtr mini-transaction */ static void fsp_free_page( - const page_id_t& page_id, + fil_space_t* space, + ulint offset, const page_size_t& page_size, mtr_t* mtr) { @@ -2056,24 +1508,22 @@ fsp_free_page( ulint frag_n_used; ut_ad(mtr); - ut_d(fsp_space_modify_check(page_id.space(), mtr)); + ut_d(fsp_space_modify_check(space, mtr)); /* fprintf(stderr, "Freeing page %lu in space %lu\n", page, space); */ - header = fsp_get_space_header( - page_id.space(), page_size, mtr); + header = fsp_get_space_header(space, page_size, mtr); descr = xdes_get_descriptor_with_space_hdr( - header, page_id.space(), page_id.page_no(), mtr); + header, space, offset, mtr); state = xdes_get_state(descr, mtr); - if (state != XDES_FREE_FRAG && state != XDES_FULL_FRAG) { + if (UNIV_UNLIKELY(state != XDES_FREE_FRAG + && state != XDES_FULL_FRAG)) { ib::error() << "File space extent descriptor of page " - << page_id << " has state " << state; - fputs("InnoDB: Dump of descriptor: ", stderr); - ut_print_buf(stderr, ((byte*) descr) - 50, 200); - putc('\n', stderr); + << page_id_t(space->id, offset) + << " has state " << state; /* Crash in debug version, so that we get a core dump of this corruption. */ ut_ad(0); @@ -2089,12 +1539,11 @@ fsp_free_page( } if (xdes_mtr_get_bit(descr, XDES_FREE_BIT, - page_id.page_no() % FSP_EXTENT_SIZE, mtr)) { + offset % FSP_EXTENT_SIZE, mtr)) { ib::error() << "File space extent descriptor of page " - << page_id << " says it is free. Dump of descriptor: "; - ut_print_buf(stderr, ((byte*) descr) - 50, 200); - putc('\n', stderr); + << page_id_t(space->id, offset) + << " says it is free."; /* Crash in debug version, so that we get a core dump of this corruption. */ ut_ad(0); @@ -2105,7 +1554,7 @@ fsp_free_page( return; } - const ulint bit = page_id.page_no() % FSP_EXTENT_SIZE; + const ulint bit = offset % FSP_EXTENT_SIZE; xdes_set_bit(descr, XDES_FREE_BIT, bit, TRUE, mtr); xdes_set_bit(descr, XDES_CLEAN_BIT, bit, TRUE, mtr); @@ -2132,37 +1581,39 @@ fsp_free_page( /* The extent has become free: move it to another list */ flst_remove(header + FSP_FREE_FRAG, descr + XDES_FLST_NODE, mtr); - fsp_free_extent(page_id, page_size, mtr); + fsp_free_extent(space, offset, page_size, mtr); } } -/** Returns an extent to the free list of a space. -@param[in] page_id page id in the extent +/** Return an extent to the free list of a space. +@param[in,out] space tablespace +@param[in] offset page number in the extent @param[in] page_size page size @param[in,out] mtr mini-transaction */ static void fsp_free_extent( - const page_id_t& page_id, + fil_space_t* space, + page_no_t offset, const page_size_t& page_size, mtr_t* mtr) { fsp_header_t* header; xdes_t* descr; - ut_ad(mtr); + ut_ad(mtr_memo_contains(mtr, &space->latch, MTR_MEMO_X_LOCK)); - header = fsp_get_space_header(page_id.space(), page_size, mtr); + header = fsp_get_space_header(space, page_size, mtr); descr = xdes_get_descriptor_with_space_hdr( - header, page_id.space(), page_id.page_no(), mtr); + header, space, offset, mtr); ut_a(xdes_get_state(descr, mtr) != XDES_FREE); xdes_init(descr, mtr); flst_add_last(header + FSP_FREE, descr + XDES_FLST_NODE, mtr); - fil_space_get(page_id.space())->free_len++; + space->free_len++; } /** Returns the nth inode slot on an inode page. @@ -2250,33 +1701,34 @@ fsp_seg_inode_page_find_free( return(ULINT_UNDEFINED); } -/**********************************************************************//** -Allocates a new file segment inode page. -@return TRUE if could be allocated */ +/** Allocate a file segment inode page. +@param[in,out] space tablespace +@param[in,out] space_header tablespace header +@param[in,out] mtr mini-transaction +@return whether the allocation succeeded */ +MY_ATTRIBUTE((nonnull, warn_unused_result)) static -ibool +bool fsp_alloc_seg_inode_page( -/*=====================*/ - fsp_header_t* space_header, /*!< in: space header */ - mtr_t* mtr) /*!< in/out: mini-transaction */ + fil_space_t* space, + fsp_header_t* space_header, + mtr_t* mtr) { fseg_inode_t* inode; buf_block_t* block; page_t* page; - ulint space; ut_ad(page_offset(space_header) == FSP_HEADER_OFFSET); + ut_ad(page_get_space_id(page_align(space_header)) == space->id); - space = page_get_space_id(page_align(space_header)); + const page_size_t page_size(space->flags); - const page_size_t page_size(mach_read_from_4(FSP_SPACE_FLAGS - + space_header)); - - block = fsp_alloc_free_page(space, page_size, 0, RW_SX_LATCH, mtr, mtr); + block = fsp_alloc_free_page( + space, page_size, 0, RW_SX_LATCH, mtr, mtr); if (block == NULL) { - return(FALSE); + return(false); } buf_block_dbg_add_level(block, SYNC_FSP_PAGE); @@ -2299,18 +1751,22 @@ fsp_alloc_seg_inode_page( space_header + FSP_SEG_INODES_FREE, page + FSEG_INODE_PAGE_NODE, mtr); - return(TRUE); + return(true); } -/**********************************************************************//** -Allocates a new file segment inode. -@return segment inode, or NULL if not enough space */ +/** Allocate a file segment inode. +@param[in,out] space tablespace +@param[in,out] space_header tablespace header +@param[in,out] mtr mini-transaction +@return segment inode +@retval NULL if not enough space */ +MY_ATTRIBUTE((nonnull, warn_unused_result)) static fseg_inode_t* fsp_alloc_seg_inode( -/*================*/ - fsp_header_t* space_header, /*!< in: space header */ - mtr_t* mtr) /*!< in/out: mini-transaction */ + fil_space_t* space, + fsp_header_t* space_header, + mtr_t* mtr) { buf_block_t* block; page_t* page; @@ -2321,14 +1777,12 @@ fsp_alloc_seg_inode( /* Allocate a new segment inode page if needed. */ if (flst_get_len(space_header + FSP_SEG_INODES_FREE) == 0 - && !fsp_alloc_seg_inode_page(space_header, mtr)) { + && !fsp_alloc_seg_inode_page(space, space_header, mtr)) { return(NULL); } - const page_size_t page_size( - mach_read_from_4(FSP_SPACE_FLAGS + space_header)); - + const page_size_t page_size(space->flags); const page_id_t page_id( - page_get_space_id(page_align(space_header)), + space->id, flst_get_first(space_header + FSP_SEG_INODES_FREE, mtr).page); block = buf_page_get(page_id, page_size, RW_SX_LATCH, mtr); @@ -2361,14 +1815,14 @@ fsp_alloc_seg_inode( } /** Frees a file segment inode. -@param[in] space space id +@param[in,out] space tablespace @param[in] page_size page size @param[in,out] inode segment inode @param[in,out] mtr mini-transaction */ static void fsp_free_seg_inode( - ulint space, + fil_space_t* space, const page_size_t& page_size, fseg_inode_t* inode, mtr_t* mtr) @@ -2407,8 +1861,7 @@ fsp_free_seg_inode( flst_remove(space_header + FSP_SEG_INODES_FREE, page + FSEG_INODE_PAGE_NODE, mtr); - fsp_free_page(page_id_t(space, page_get_page_no(page)), - page_size, mtr); + fsp_free_page(space, page_get_page_no(page), page_size, mtr); } } @@ -2625,10 +2078,10 @@ fseg_create_general( ut_ad(mtr); ut_ad(byte_offset + FSEG_HEADER_SIZE <= UNIV_PAGE_SIZE - FIL_PAGE_DATA_END); - ut_d(fsp_space_modify_check(space_id, mtr)); fil_space_t* space = mtr_x_lock_space(space_id, mtr); const page_size_t page_size(space->flags); + ut_d(fsp_space_modify_check(space, mtr)); if (page != 0) { block = buf_page_get(page_id_t(space_id, page), page_size, @@ -2659,9 +2112,9 @@ fseg_create_general( DBUG_RETURN(NULL); } - space_header = fsp_get_space_header(space_id, page_size, mtr); + space_header = fsp_get_space_header(space, page_size, mtr); - inode = fsp_alloc_seg_inode(space_header, mtr); + inode = fsp_alloc_seg_inode(space, space_header, mtr); if (inode == NULL) { @@ -2703,7 +2156,7 @@ fseg_create_general( if (block == NULL) { - fsp_free_seg_inode(space_id, page_size, inode, mtr); + fsp_free_seg_inode(space, page_size, inode, mtr); goto funct_exit; } @@ -2815,7 +2268,7 @@ This happens if the segment is big enough to allow extents in the free list, the free list is empty, and the extents can be allocated consecutively from the hint onward. @param[in] inode segment inode -@param[in] space space id +@param[in] space tablespace @param[in] page_size page size @param[in] hint hint which extent would be good as the first extent @@ -2824,7 +2277,7 @@ static void fseg_fill_free_list( fseg_inode_t* inode, - ulint space, + fil_space_t* space, const page_size_t& page_size, ulint hint, mtr_t* mtr) @@ -2884,7 +2337,7 @@ the segment, then tries to allocate from the space free list. NOTE that the extent returned still resides in the segment free list, it is not yet taken off it! @param[in] inode segment inode -@param[in] space space id +@param[in,out] space tablespace @param[in] page_size page size @param[in,out] mtr mini-transaction @retval NULL if no page could be allocated @@ -2895,7 +2348,7 @@ static xdes_t* fseg_alloc_free_extent( fseg_inode_t* inode, - ulint space, + fil_space_t* space, const page_size_t& page_size, mtr_t* mtr) { @@ -2995,21 +2448,21 @@ fseg_alloc_free_page_low( seg_id = mach_read_from_8(seg_inode + FSEG_ID); ut_ad(seg_id); - ut_d(fsp_space_modify_check(space_id, mtr)); + ut_d(fsp_space_modify_check(space, mtr)); ut_ad(fil_page_get_type(page_align(seg_inode)) == FIL_PAGE_INODE); reserved = fseg_n_reserved_pages_low(seg_inode, &used, mtr); - space_header = fsp_get_space_header(space_id, page_size, mtr); + space_header = fsp_get_space_header(space, page_size, mtr); - descr = xdes_get_descriptor_with_space_hdr(space_header, space_id, + descr = xdes_get_descriptor_with_space_hdr(space_header, space, hint, mtr); if (descr == NULL) { /* Hint outside space or too high above free limit: reset hint */ /* The file space header page is always allocated. */ hint = 0; - descr = xdes_get_descriptor(space_id, hint, page_size, mtr); + descr = xdes_get_descriptor(space, hint, page_size, mtr); } /* In the big if-else below we look for ret_page and ret_descr */ @@ -3036,8 +2489,7 @@ take_hinted_page: ========================================================= the hinted page ===============*/ - ret_descr = fsp_alloc_free_extent( - space_id, page_size, hint, mtr); + ret_descr = fsp_alloc_free_extent(space, page_size, hint, mtr); ut_a(ret_descr == descr); @@ -3047,7 +2499,7 @@ take_hinted_page: ret_descr + XDES_FLST_NODE, mtr); /* Try to fill the segment free list */ - fseg_fill_free_list(seg_inode, space_id, page_size, + fseg_fill_free_list(seg_inode, space, page_size, hint + FSP_EXTENT_SIZE, mtr); goto take_hinted_page; /*-----------------------------------------------------------*/ @@ -3056,7 +2508,7 @@ take_hinted_page: && (used >= FSEG_FRAG_LIMIT) && (!!(ret_descr = fseg_alloc_free_extent( - seg_inode, space_id, page_size, mtr)))) { + seg_inode, space, page_size, mtr)))) { /* 3. We take any free extent (which was already assigned above =============================================================== @@ -3102,7 +2554,7 @@ take_hinted_page: return(NULL); } - ret_descr = xdes_lst_get_descriptor(space_id, page_size, + ret_descr = xdes_lst_get_descriptor(space, page_size, first, mtr); ret_page = xdes_get_offset(ret_descr) + xdes_find_bit(ret_descr, XDES_FREE_BIT, TRUE, @@ -3113,7 +2565,7 @@ take_hinted_page: /* 6. We allocate an individual page from the space ===================================================*/ buf_block_t* block = fsp_alloc_free_page( - space_id, page_size, hint, rw_latch, mtr, init_mtr); + space, page_size, hint, rw_latch, mtr, init_mtr); ut_ad(!has_done_reservation || block != NULL); @@ -3136,7 +2588,7 @@ take_hinted_page: /* 7. We allocate a new extent and take its first page ======================================================*/ ret_descr = fseg_alloc_free_extent(seg_inode, - space_id, page_size, mtr); + space, page_size, mtr); if (ret_descr == NULL) { ret_page = FIL_NULL; @@ -3184,7 +2636,7 @@ got_hinted_page: The extent is still in the appropriate list (FSEG_NOT_FULL or FSEG_FREE), and the page is not yet marked as used. */ - ut_ad(xdes_get_descriptor(space_id, ret_page, page_size, mtr) + ut_ad(xdes_get_descriptor(space, ret_page, page_size, mtr) == ret_descr); ut_ad(xdes_mtr_get_bit( @@ -3194,10 +2646,8 @@ got_hinted_page: fseg_mark_page_used(seg_inode, ret_page, ret_descr, mtr); } - ut_ad(space->flags - == mach_read_from_4(FSP_SPACE_FLAGS + space_header)); - return(fsp_page_create(page_id_t(space_id, ret_page), page_size, - rw_latch, mtr, init_mtr)); + return(fsp_page_create(space, ret_page, page_size, rw_latch, + mtr, init_mtr)); } /**********************************************************************//** @@ -3307,7 +2757,7 @@ fsp_reserve_free_pages( ut_a(size < FSP_EXTENT_SIZE); descr = xdes_get_descriptor_with_space_hdr( - space_header, space->id, 0, mtr); + space_header, space, 0, mtr); n_used = xdes_get_n_used(descr, mtr); ut_a(n_used <= size); @@ -3381,7 +2831,7 @@ fsp_reserve_free_extents( fil_space_t* space = mtr_x_lock_space(space_id, mtr); const page_size_t page_size(space->flags); - space_header = fsp_get_space_header(space_id, page_size, mtr); + space_header = fsp_get_space_header(space, page_size, mtr); try_again: size = mach_read_from_4(space_header + FSP_SIZE); ut_ad(size == space->size_in_header); @@ -3597,7 +3047,8 @@ fseg_mark_page_used( /** Frees a single page of a segment. @param[in] seg_inode segment inode -@param[in] page_id page id +@param[in,out] space tablespace +@param[in] offset page number @param[in] page_size page size @param[in] ahi whether we may need to drop the adaptive hash index @@ -3606,9 +3057,12 @@ static void fseg_free_page_low( fseg_inode_t* seg_inode, - const page_id_t& page_id, + fil_space_t* space, + page_no_t offset, const page_size_t& page_size, +#ifdef BTR_CUR_HASH_ADAPT bool ahi, +#endif /* BTR_CUR_HASH_ADAPT */ mtr_t* mtr) { xdes_t* descr; @@ -3623,30 +3077,28 @@ fseg_free_page_low( ut_ad(mach_read_from_4(seg_inode + FSEG_MAGIC_N) == FSEG_MAGIC_N_VALUE); ut_ad(!((page_offset(seg_inode) - FSEG_ARR_OFFSET) % FSEG_INODE_SIZE)); - ut_d(fsp_space_modify_check(page_id.space(), mtr)); - + ut_d(fsp_space_modify_check(space, mtr)); +#ifdef BTR_CUR_HASH_ADAPT /* Drop search system page hash index if the page is found in the pool and is hashed */ if (ahi) { - btr_search_drop_page_hash_when_freed(page_id, page_size); + btr_search_drop_page_hash_when_freed( + page_id_t(space->id, offset), page_size); } +#endif /* BTR_CUR_HASH_ADAPT */ - descr = xdes_get_descriptor(page_id.space(), page_id.page_no(), - page_size, mtr); + descr = xdes_get_descriptor(space, offset, page_size, mtr); if (xdes_mtr_get_bit(descr, XDES_FREE_BIT, - page_id.page_no() % FSP_EXTENT_SIZE, mtr)) { - fputs("InnoDB: Dump of the tablespace extent descriptor: ", - stderr); - ut_print_buf(stderr, descr, 40); - ib::error() << "InnoDB is trying to free page " << page_id + offset % FSP_EXTENT_SIZE, mtr)) { + ib::fatal() << "InnoDB is trying to free page " + << page_id_t(space->id, offset) << " though it is already marked as free in the" " tablespace! The tablespace free space info is" " corrupt. You may need to dump your tables and" - " recreate the whole database!"; -crash: - ib::fatal() << FORCE_RECOVERY_MSG; + " recreate the whole database!" + << FORCE_RECOVERY_MSG; } state = xdes_get_state(descr, mtr); @@ -3656,7 +3108,7 @@ crash: for (i = 0;; i++) { if (fseg_get_nth_frag_page_no(seg_inode, i, mtr) - == page_id.page_no()) { + == offset) { fseg_set_nth_frag_page_no(seg_inode, i, FIL_NULL, mtr); @@ -3664,7 +3116,7 @@ crash: } } - fsp_free_page(page_id, page_size, mtr); + fsp_free_page(space, offset, page_size, mtr); return; } @@ -3682,10 +3134,11 @@ crash: ut_print_buf(stderr, seg_inode, 40); putc('\n', stderr); - ib::error() << "InnoDB is trying to free page " << page_id + ib::fatal() << "InnoDB is trying to free page " + << page_id_t(space->id, offset) << ", which does not belong to segment " << descr_id - << " but belongs to segment " << seg_id << "."; - goto crash; + << " but belongs to segment " << seg_id << "." + << FORCE_RECOVERY_MSG; } not_full_n_used = mtr_read_ulint(seg_inode + FSEG_NOT_FULL_N_USED, @@ -3705,7 +3158,7 @@ crash: not_full_n_used - 1, MLOG_4BYTES, mtr); } - const ulint bit = page_id.page_no() % FSP_EXTENT_SIZE; + const ulint bit = offset % FSP_EXTENT_SIZE; xdes_set_bit(descr, XDES_FREE_BIT, bit, TRUE, mtr); xdes_set_bit(descr, XDES_CLEAN_BIT, bit, TRUE, mtr); @@ -3714,36 +3167,46 @@ crash: /* The extent has become free: free it to space */ flst_remove(seg_inode + FSEG_NOT_FULL, descr + XDES_FLST_NODE, mtr); - fsp_free_extent(page_id, page_size, mtr); + fsp_free_extent(space, offset, page_size, mtr); } } +#ifndef BTR_CUR_HASH_ADAPT +# define fseg_free_page_low(inode, space, offset, page_size, ahi, mtr) \ + fseg_free_page_low(inode, space, offset, page_size, mtr) +#endif /* !BTR_CUR_HASH_ADAPT */ + /**********************************************************************//** Frees a single page of a segment. */ void -fseg_free_page( -/*===========*/ +fseg_free_page_func( fseg_header_t* seg_header, /*!< in: segment header */ ulint space_id,/*!< in: space id */ ulint page, /*!< in: page offset */ +#ifdef BTR_CUR_HASH_ADAPT bool ahi, /*!< in: whether we may need to drop the adaptive hash index */ +#endif /* BTR_CUR_HASH_ADAPT */ mtr_t* mtr) /*!< in/out: mini-transaction */ { + DBUG_ENTER("fseg_free_page"); fseg_inode_t* seg_inode; buf_block_t* iblock; - const fil_space_t* space = mtr_x_lock_space(space_id, mtr); + fil_space_t* space = mtr_x_lock_space(space_id, mtr); const page_size_t page_size(space->flags); + DBUG_LOG("fseg_free_page", "space_id: " << space_id + << ", page_no: " << page); + seg_inode = fseg_inode_get(seg_header, space_id, page_size, mtr, &iblock); fil_block_check_type(iblock, FIL_PAGE_INODE, mtr); - const page_id_t page_id(space_id, page); + fseg_free_page_low(seg_inode, space, page, page_size, ahi, mtr); - fseg_free_page_low(seg_inode, page_id, page_size, ahi, mtr); + ut_d(buf_page_set_file_page_was_freed(page_id_t(space_id, page))); - ut_d(buf_page_set_file_page_was_freed(page_id)); + DBUG_VOID_RETURN; } /**********************************************************************//** @@ -3772,7 +3235,7 @@ fseg_page_is_free( == FSEG_MAGIC_N_VALUE); ut_ad(!((page_offset(seg_inode) - FSEG_ARR_OFFSET) % FSEG_INODE_SIZE)); - descr = xdes_get_descriptor(space_id, page, page_size, &mtr); + descr = xdes_get_descriptor(space, page, page_size, &mtr); ut_a(descr); is_free = xdes_mtr_get_bit( @@ -3783,19 +3246,26 @@ fseg_page_is_free( return(is_free); } -/**********************************************************************//** -Frees an extent of a segment to the space free list. */ -static MY_ATTRIBUTE((nonnull)) +/** Free an extent of a segment to the space free list. +@param[in,out] seg_inode segment inode +@param[in,out] space tablespace +@param[in] page_size page size +@param[in] page page number in the extent +@param[in] ahi whether we may need to drop + the adaptive hash index +@param[in,out] mtr mini-transaction */ +MY_ATTRIBUTE((nonnull)) +static void fseg_free_extent( -/*=============*/ - fseg_inode_t* seg_inode, /*!< in: segment inode */ - ulint space, /*!< in: space id */ + fseg_inode_t* seg_inode, + fil_space_t* space, const page_size_t& page_size, - ulint page, /*!< in: a page in the extent */ - bool ahi, /*!< in: whether we may need to drop - the adaptive hash index */ - mtr_t* mtr) /*!< in/out: mini-transaction */ + ulint page, +#ifdef BTR_CUR_HASH_ADAPT + bool ahi, +#endif /* BTR_CUR_HASH_ADAPT */ + mtr_t* mtr) { ulint first_page_in_extent; xdes_t* descr; @@ -3803,7 +3273,6 @@ fseg_free_extent( ulint descr_n_used; ulint i; - ut_ad(seg_inode != NULL); ut_ad(mtr != NULL); descr = xdes_get_descriptor(space, page, page_size, mtr); @@ -3816,6 +3285,7 @@ fseg_free_extent( first_page_in_extent = page - (page % FSP_EXTENT_SIZE); +#ifdef BTR_CUR_HASH_ADAPT if (ahi) { for (i = 0; i < FSP_EXTENT_SIZE; i++) { if (!xdes_mtr_get_bit(descr, XDES_FREE_BIT, i, mtr)) { @@ -3825,12 +3295,13 @@ fseg_free_extent( is hashed */ btr_search_drop_page_hash_when_freed( - page_id_t(space, + page_id_t(space->id, first_page_in_extent + i), page_size); } } } +#endif /* BTR_CUR_HASH_ADAPT */ if (xdes_is_full(descr, mtr)) { flst_remove(seg_inode + FSEG_FULL, @@ -3852,17 +3323,22 @@ fseg_free_extent( MLOG_4BYTES, mtr); } - fsp_free_extent(page_id_t(space, page), page_size, mtr); + fsp_free_extent(space, page, page_size, mtr); #ifdef UNIV_DEBUG for (i = 0; i < FSP_EXTENT_SIZE; i++) { buf_page_set_file_page_was_freed( - page_id_t(space, first_page_in_extent + i)); + page_id_t(space->id, first_page_in_extent + i)); } #endif /* UNIV_DEBUG */ } +#ifndef BTR_CUR_HASH_ADAPT +# define fseg_free_extent(inode, space, page_size, page, ahi, mtr) \ + fseg_free_extent(inode, space, page_size, page, mtr) +#endif /* !BTR_CUR_HASH_ADAPT */ + /**********************************************************************//** Frees part of a segment. This function can be used to free a segment by repeatedly calling this function in different mini-transactions. Doing @@ -3870,14 +3346,15 @@ the freeing in a single mini-transaction might result in too big a mini-transaction. @return TRUE if freeing completed */ ibool -fseg_free_step( -/*===========*/ +fseg_free_step_func( fseg_header_t* header, /*!< in, own: segment header; NOTE: if the header resides on the first page of the frag list of the segment, this pointer becomes obsolete after the last freeing step */ +#ifdef BTR_CUR_HASH_ADAPT bool ahi, /*!< in: whether we may need to drop the adaptive hash index */ +#endif /* BTR_CUR_HASH_ADAPT */ mtr_t* mtr) /*!< in/out: mini-transaction */ { ulint n; @@ -3892,10 +3369,10 @@ fseg_free_step( space_id = page_get_space_id(page_align(header)); header_page = page_get_page_no(page_align(header)); - const fil_space_t* space = mtr_x_lock_space(space_id, mtr); + fil_space_t* space = mtr_x_lock_space(space_id, mtr); const page_size_t page_size(space->flags); - descr = xdes_get_descriptor(space_id, header_page, page_size, mtr); + descr = xdes_get_descriptor(space, header_page, page_size, mtr); /* Check that the header resides on a page which has not been freed yet */ @@ -3913,13 +3390,13 @@ fseg_free_step( } fil_block_check_type(iblock, FIL_PAGE_INODE, mtr); - descr = fseg_get_first_extent(inode, space_id, page_size, mtr); + descr = fseg_get_first_extent(inode, space, page_size, mtr); if (descr != NULL) { /* Free the extent held by the segment */ page = xdes_get_offset(descr); - fseg_free_extent(inode, space_id, page_size, page, ahi, mtr); + fseg_free_extent(inode, space, page_size, page, ahi, mtr); DBUG_RETURN(FALSE); } @@ -3929,21 +3406,21 @@ fseg_free_step( if (n == ULINT_UNDEFINED) { /* Freeing completed: free the segment inode */ - fsp_free_seg_inode(space_id, page_size, inode, mtr); + fsp_free_seg_inode(space, page_size, inode, mtr); DBUG_RETURN(TRUE); } fseg_free_page_low( - inode, - page_id_t(space_id, fseg_get_nth_frag_page_no(inode, n, mtr)), + inode, space, + fseg_get_nth_frag_page_no(inode, n, mtr), page_size, ahi, mtr); n = fseg_find_last_used_frag_page_slot(inode, mtr); if (n == ULINT_UNDEFINED) { /* Freeing completed: free the segment inode */ - fsp_free_seg_inode(space_id, page_size, inode, mtr); + fsp_free_seg_inode(space, page_size, inode, mtr); DBUG_RETURN(TRUE); } @@ -3956,12 +3433,13 @@ Frees part of a segment. Differs from fseg_free_step because this function leaves the header page unfreed. @return TRUE if freeing completed, except the header page */ ibool -fseg_free_step_not_header( -/*======================*/ +fseg_free_step_not_header_func( fseg_header_t* header, /*!< in: segment header which must reside on the first fragment page of the segment */ +#ifdef BTR_CUR_HASH_ADAPT bool ahi, /*!< in: whether we may need to drop the adaptive hash index */ +#endif /* BTR_CUR_HASH_ADAPT */ mtr_t* mtr) /*!< in/out: mini-transaction */ { ulint n; @@ -3974,20 +3452,20 @@ fseg_free_step_not_header( space_id = page_get_space_id(page_align(header)); ut_ad(mtr->is_named_space(space_id)); - const fil_space_t* space = mtr_x_lock_space(space_id, mtr); + fil_space_t* space = mtr_x_lock_space(space_id, mtr); const page_size_t page_size(space->flags); buf_block_t* iblock; inode = fseg_inode_get(header, space_id, page_size, mtr, &iblock); fil_block_check_type(iblock, FIL_PAGE_INODE, mtr); - descr = fseg_get_first_extent(inode, space_id, page_size, mtr); + descr = fseg_get_first_extent(inode, space, page_size, mtr); if (descr != NULL) { /* Free the extent held by the segment */ page = xdes_get_offset(descr); - fseg_free_extent(inode, space_id, page_size, page, ahi, mtr); + fseg_free_extent(inode, space, page_size, page, ahi, mtr); return(FALSE); } @@ -4007,8 +3485,7 @@ fseg_free_step_not_header( return(TRUE); } - fseg_free_page_low(inode, page_id_t(space_id, page_no), page_size, ahi, - mtr); + fseg_free_page_low(inode, space, page_no, page_size, ahi, mtr); return(FALSE); } @@ -4017,28 +3494,24 @@ fseg_free_step_not_header( We think of the extent lists of the segment catenated in the order FSEG_FULL -> FSEG_NOT_FULL -> FSEG_FREE. @param[in] inode segment inode -@param[in] space_id space id +@param[in] space tablespace @param[in] page_size page size @param[in,out] mtr mini-transaction @return the first extent descriptor, or NULL if none */ +MY_ATTRIBUTE((nonnull, warn_unused_result)) static xdes_t* fseg_get_first_extent( fseg_inode_t* inode, - ulint space_id, + const fil_space_t* space, const page_size_t& page_size, mtr_t* mtr) { fil_addr_t first; - xdes_t* descr; - ut_ad(inode && mtr); - - ut_ad(space_id == page_get_space_id(page_align(inode))); + ut_ad(space->id == page_get_space_id(page_align(inode))); ut_ad(mach_read_from_4(inode + FSEG_MAGIC_N) == FSEG_MAGIC_N_VALUE); - first = fil_addr_null; - if (flst_get_len(inode + FSEG_FULL) > 0) { first = flst_get_first(inode + FSEG_FULL, mtr); @@ -4050,15 +3523,14 @@ fseg_get_first_extent( } else if (flst_get_len(inode + FSEG_FREE) > 0) { first = flst_get_first(inode + FSEG_FREE, mtr); - } - - if (first.page == FIL_NULL) { - + } else { return(NULL); } - descr = xdes_lst_get_descriptor(space_id, page_size, first, mtr); - return(descr); + ut_ad(first.page != FIL_NULL); + + return(first.page == FIL_NULL ? NULL + : xdes_lst_get_descriptor(space, page_size, first, mtr)); } #ifdef UNIV_DEBUG @@ -4075,7 +3547,6 @@ fseg_validate_low( ulint space_id; ib_id_t seg_id; mtr_t mtr; - xdes_t* descr; fil_addr_t node_addr; ulint n_used = 0; ulint n_used2 = 0; @@ -4099,11 +3570,8 @@ fseg_validate_low( mtr_start(&mtr); const fil_space_t* space = mtr_x_lock_space( space_id, &mtr); - - const page_size_t page_size(space->flags); - - descr = xdes_lst_get_descriptor(space_id, page_size, - node_addr, &mtr); + const xdes_t* descr = xdes_lst_get_descriptor( + space, page_size_t(space->flags), node_addr, &mtr); ut_a(xdes_get_n_used(descr, &mtr) == 0); ut_a(xdes_get_state(descr, &mtr) == XDES_FSEG); @@ -4121,10 +3589,8 @@ fseg_validate_low( mtr_start(&mtr); const fil_space_t* space = mtr_x_lock_space( space_id, &mtr); - const page_size_t page_size(space->flags); - - descr = xdes_lst_get_descriptor(space_id, page_size, - node_addr, &mtr); + const xdes_t* descr = xdes_lst_get_descriptor( + space, page_size_t(space->flags), node_addr, &mtr); ut_a(xdes_get_n_used(descr, &mtr) > 0); ut_a(xdes_get_n_used(descr, &mtr) < FSP_EXTENT_SIZE); @@ -4145,10 +3611,8 @@ fseg_validate_low( mtr_start(&mtr); const fil_space_t* space = mtr_x_lock_space( space_id, &mtr); - const page_size_t page_size(space->flags); - - descr = xdes_lst_get_descriptor(space_id, page_size, - node_addr, &mtr); + const xdes_t* descr = xdes_lst_get_descriptor( + space, page_size_t(space->flags), node_addr, &mtr); ut_a(xdes_get_n_used(descr, &mtr) == FSP_EXTENT_SIZE); ut_a(xdes_get_state(descr, &mtr) == XDES_FSEG); @@ -4291,14 +3755,14 @@ fsp_page_is_free_func( ulint page_no, /*!< in: page offset */ mtr_t* mtr, /*!< in/out: mini-transaction */ const char *file, - ulint line) + unsigned line) { ut_ad(mtr); - const fil_space_t* space = mtr_x_lock_space(space_id, mtr); + fil_space_t* space = mtr_x_lock_space(space_id, mtr); const page_size_t page_size(space->flags); - xdes_t* descr = xdes_get_descriptor(space_id, page_no, page_size, mtr); + xdes_t* descr = xdes_get_descriptor(space, page_no, page_size, mtr); ut_a(descr); return xdes_mtr_get_bit( diff --git a/storage/innobase/fsp/fsp0space.cc b/storage/innobase/fsp/fsp0space.cc index 45942f58dd3..76269a749f9 100644 --- a/storage/innobase/fsp/fsp0space.cc +++ b/storage/innobase/fsp/fsp0space.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -18,7 +19,7 @@ this program; if not, write to the Free Software Foundation, Inc., /**************************************************//** @file fsp/fsp0space.cc -General shared tablespace implementation. +Shared tablespace implementation. Created 2012-11-16 by Sunny Bains as srv/srv0space.cc *******************************************************/ @@ -118,13 +119,6 @@ Tablespace::open_or_create(bool is_temp) break; } -#ifdef UNIV_LINUX - const bool atomic_write = fil_fusionio_enable_atomic_write( - it->m_handle); -#else - const bool atomic_write = false; -#endif - /* We can close the handle now and open the tablespace the proper way. */ it->close(); @@ -132,15 +126,13 @@ Tablespace::open_or_create(bool is_temp) if (it == begin) { /* First data file. */ - ulint flags; - - flags = fsp_flags_set_page_size(0, univ_page_size); - /* Create the tablespace entry for the multi-file tablespace in the tablespace manager. */ space = fil_space_create( - m_name, m_space_id, flags, is_temp - ? FIL_TYPE_TEMPORARY : FIL_TYPE_TABLESPACE, it->m_crypt_info, + m_name, m_space_id, FSP_FLAGS_PAGE_SSIZE(), + is_temp + ? FIL_TYPE_TEMPORARY : FIL_TYPE_TABLESPACE, + it->m_crypt_info, false); } @@ -149,7 +141,7 @@ Tablespace::open_or_create(bool is_temp) /* Create the tablespace node entry for this data file. */ if (!fil_node_create( it->m_filepath, it->m_size, space, false, - atomic_write)) { + TRUE)) { err = DB_ERROR; break; diff --git a/storage/innobase/fsp/fsp0sysspace.cc b/storage/innobase/fsp/fsp0sysspace.cc index fa6a46890db..6f7d09b6faa 100644 --- a/storage/innobase/fsp/fsp0sysspace.cc +++ b/storage/innobase/fsp/fsp0sysspace.cc @@ -577,11 +577,11 @@ SysTablespace::read_lsn_and_check_flags(lsn_t* flushed_lsn) first datafile. */ for (int retry = 0; retry < 2; ++retry) { - err = it->validate_first_page(flushed_lsn, false); + err = it->validate_first_page(flushed_lsn); if (err != DB_SUCCESS && (retry == 1 - || it->restore_from_doublewrite(0) != DB_SUCCESS)) { + || it->restore_from_doublewrite())) { it->close(); @@ -906,24 +906,6 @@ SysTablespace::open_or_create( return(err); } -#ifdef UNIV_LINUX - /* Note: This should really be per node and not per - tablespace because a tablespace can contain multiple - files (nodes). The implication is that all files of - the tablespace should be on the same medium. */ - - it->m_atomic_write - = fil_fusionio_enable_atomic_write(it->m_handle); - - if (it->m_atomic_write && srv_use_doublewrite_buf) { - ib::info() << "FusionIO atomic IO enabled," - " disabling the double write buffer"; - - srv_use_doublewrite_buf = false; - } -#else - it->m_atomic_write = false; -#endif } if (!create_new_db && flush_lsn) { @@ -975,7 +957,7 @@ SysTablespace::open_or_create( if (!fil_node_create( it->m_filepath, it->m_size, space, it->m_type != SRV_NOT_RAW, - it->m_atomic_write, max_size)) { + TRUE, max_size)) { err = DB_ERROR; break; diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index d74f8cfa5bf..f05ad4421f6 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -1780,13 +1780,6 @@ fts_create_in_mem_aux_table( aux_table_name, table->space, n_cols, 0, table->flags, fts_get_table_flags2_for_aux_tables(table->flags2)); - if (DICT_TF_HAS_SHARED_SPACE(table->flags)) { - ut_ad(table->space == fil_space_get_id_by_name( - table->tablespace())); - new_table->tablespace = mem_heap_strdup( - new_table->heap, table->tablespace); - } - if (DICT_TF_HAS_DATA_DIR(table->flags)) { ut_ad(table->data_dir_path != NULL); new_table->data_dir_path = mem_heap_strdup( @@ -1838,7 +1831,7 @@ fts_create_one_common_table( FTS_CONFIG_TABLE_VALUE_COL_LEN); } - error = row_create_table_for_mysql(new_table, NULL, trx, false, + error = row_create_table_for_mysql(new_table, trx, false, FIL_SPACE_ENCRYPTION_DEFAULT, FIL_DEFAULT_ENCRYPTION_KEY); if (error == DB_SUCCESS) { @@ -2055,7 +2048,7 @@ fts_create_one_index_table( (DATA_MTYPE_MAX << 16) | DATA_UNSIGNED | DATA_NOT_NULL, FTS_INDEX_ILIST_LEN); - error = row_create_table_for_mysql(new_table, NULL, trx, false, + error = row_create_table_for_mysql(new_table, trx, false, FIL_SPACE_ENCRYPTION_DEFAULT, FIL_DEFAULT_ENCRYPTION_KEY); if (error == DB_SUCCESS) { diff --git a/storage/innobase/fut/fut0lst.cc b/storage/innobase/fut/fut0lst.cc index 8b39a4de1fb..2300d189407 100644 --- a/storage/innobase/fut/fut0lst.cc +++ b/storage/innobase/fut/fut0lst.cc @@ -384,115 +384,6 @@ flst_remove( mlog_write_ulint(base + FLST_LEN, len - 1, MLOG_4BYTES, mtr); } -/********************************************************************//** -Cuts off the tail of the list, including the node given. The number of -nodes which will be removed must be provided by the caller, as this function -does not measure the length of the tail. */ -void -flst_cut_end( -/*=========*/ - flst_base_node_t* base, /*!< in: pointer to base node of list */ - flst_node_t* node2, /*!< in: first node to remove */ - ulint n_nodes,/*!< in: number of nodes to remove, - must be >= 1 */ - mtr_t* mtr) /*!< in: mini-transaction handle */ -{ - ulint space; - flst_node_t* node1; - fil_addr_t node1_addr; - fil_addr_t node2_addr; - ulint len; - - ut_ad(mtr && node2 && base); - ut_ad(mtr_memo_contains_page_flagged(mtr, base, - MTR_MEMO_PAGE_X_FIX - | MTR_MEMO_PAGE_SX_FIX)); - ut_ad(mtr_memo_contains_page_flagged(mtr, node2, - MTR_MEMO_PAGE_X_FIX - | MTR_MEMO_PAGE_SX_FIX)); - ut_ad(n_nodes > 0); - - buf_ptr_get_fsp_addr(node2, &space, &node2_addr); - - node1_addr = flst_get_prev_addr(node2, mtr); - - if (!fil_addr_is_null(node1_addr)) { - - /* Update next field of node1 */ - - if (node1_addr.page == node2_addr.page) { - - node1 = page_align(node2) + node1_addr.boffset; - } else { - bool found; - const page_size_t& page_size - = fil_space_get_page_size(space, &found); - - ut_ad(found); - - node1 = fut_get_ptr(space, page_size, - node1_addr, RW_SX_LATCH, mtr); - } - - flst_write_addr(node1 + FLST_NEXT, fil_addr_null, mtr); - } else { - /* node2 was first in list: update the field in base */ - flst_write_addr(base + FLST_FIRST, fil_addr_null, mtr); - } - - flst_write_addr(base + FLST_LAST, node1_addr, mtr); - - /* Update len of base node */ - len = flst_get_len(base); - ut_ad(len >= n_nodes); - - mlog_write_ulint(base + FLST_LEN, len - n_nodes, MLOG_4BYTES, mtr); -} - -/********************************************************************//** -Cuts off the tail of the list, not including the given node. The number of -nodes which will be removed must be provided by the caller, as this function -does not measure the length of the tail. */ -void -flst_truncate_end( -/*==============*/ - flst_base_node_t* base, /*!< in: pointer to base node of list */ - flst_node_t* node2, /*!< in: first node not to remove */ - ulint n_nodes,/*!< in: number of nodes to remove */ - mtr_t* mtr) /*!< in: mini-transaction handle */ -{ - fil_addr_t node2_addr; - ulint len; - ulint space; - - ut_ad(mtr && node2 && base); - ut_ad(mtr_memo_contains_page_flagged(mtr, base, - MTR_MEMO_PAGE_X_FIX - | MTR_MEMO_PAGE_SX_FIX)); - ut_ad(mtr_memo_contains_page_flagged(mtr, node2, - MTR_MEMO_PAGE_X_FIX - | MTR_MEMO_PAGE_SX_FIX)); - if (n_nodes == 0) { - - ut_ad(fil_addr_is_null(flst_get_next_addr(node2, mtr))); - - return; - } - - buf_ptr_get_fsp_addr(node2, &space, &node2_addr); - - /* Update next field of node2 */ - flst_write_addr(node2 + FLST_NEXT, fil_addr_null, mtr); - - flst_write_addr(base + FLST_LAST, node2_addr, mtr); - - /* Update len of base node */ - len = flst_get_len(base); - ut_ad(len >= n_nodes); - - mlog_write_ulint(base + FLST_LEN, len - n_nodes, MLOG_4BYTES, mtr); -} - /********************************************************************//** Validates a file-based list. @return TRUE if ok */ diff --git a/storage/innobase/gis/gis0sea.cc b/storage/innobase/gis/gis0sea.cc index 99543ef8c9c..f23065ae3c7 100644 --- a/storage/innobase/gis/gis0sea.cc +++ b/storage/innobase/gis/gis0sea.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -129,12 +130,10 @@ rtr_pcur_getnext_from_path( || latch_mode & BTR_MODIFY_LEAF); mtr_s_lock(dict_index_get_lock(index), mtr); } else { - ut_ad(mtr_memo_contains(mtr, dict_index_get_lock(index), - MTR_MEMO_SX_LOCK) - || mtr_memo_contains(mtr, dict_index_get_lock(index), - MTR_MEMO_S_LOCK) - || mtr_memo_contains(mtr, dict_index_get_lock(index), - MTR_MEMO_X_LOCK)); + ut_ad(mtr_memo_contains_flagged(mtr, &index->lock, + MTR_MEMO_SX_LOCK + | MTR_MEMO_S_LOCK + | MTR_MEMO_X_LOCK)); } const page_size_t& page_size = dict_table_page_size(index->table); @@ -543,7 +542,7 @@ rtr_pcur_open_low( ulint latch_mode,/*!< in: BTR_SEARCH_LEAF, ... */ btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mtr */ { btr_cur_t* btr_cursor; @@ -601,10 +600,9 @@ rtr_pcur_open_low( } if (latch_mode & BTR_MODIFY_TREE) { - ut_ad(mtr_memo_contains(mtr, dict_index_get_lock(index), - MTR_MEMO_X_LOCK) - || mtr_memo_contains(mtr, dict_index_get_lock(index), - MTR_MEMO_SX_LOCK)); + ut_ad(mtr_memo_contains_flagged(mtr, &index->lock, + MTR_MEMO_X_LOCK + | MTR_MEMO_SX_LOCK)); tree_latched = true; } @@ -720,7 +718,7 @@ rtr_page_get_father_node_ptr_func( out: cursor on node pointer record, its page x-latched */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mtr */ { dtuple_t* tuple; @@ -1264,7 +1262,7 @@ rtr_cur_restore_position_func( btr_cur_t* btr_cur, /*!< in: detached persistent cursor */ ulint level, /*!< in: index level */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mtr */ { dict_index_t* index; @@ -1555,6 +1553,7 @@ rtr_copy_buf( /* Skip buf_block_t::lock */ matches->block.lock_hash_val = block->lock_hash_val; matches->block.modify_clock = block->modify_clock; +#ifdef BTR_CUR_HASH_ADAPT matches->block.n_hash_helps = block->n_hash_helps; matches->block.n_fields = block->n_fields; matches->block.left_side = block->left_side; @@ -1564,7 +1563,7 @@ rtr_copy_buf( matches->block.curr_n_fields = block->curr_n_fields; matches->block.curr_left_side = block->curr_left_side; matches->block.index = block->index; - +#endif /* BTR_CUR_HASH_ADAPT */ ut_d(matches->block.debug_latch = block->debug_latch); } diff --git a/storage/innobase/ha/ha0ha.cc b/storage/innobase/ha/ha0ha.cc index cf92f22ac15..1f90738c75f 100644 --- a/storage/innobase/ha/ha0ha.cc +++ b/storage/innobase/ha/ha0ha.cc @@ -146,7 +146,9 @@ ha_clear( hash_table_t* table) /*!< in, own: hash table */ { ut_ad(table->magic_n == HASH_TABLE_MAGIC_N); +#ifdef BTR_CUR_HASH_ADAPT ut_ad(!table->adaptive || btr_search_own_all(RW_LOCK_X)); +#endif /* BTR_CUR_HASH_ADAPT */ for (ulint i = 0; i < table->n_sync_obj; i++) { mem_heap_free(table->heaps[i]); @@ -189,6 +191,7 @@ ha_clear( } } +#ifdef BTR_CUR_HASH_ADAPT /*************************************************************//** Inserts an entry into a hash table. If an entry with the same fold number is found, its node is updated to point to the new data, and no new node @@ -536,3 +539,4 @@ builds, see http://bugs.mysql.com/36941 */ (ulong) n_bufs); } } +#endif /* BTR_CUR_HASH_ADAPT */ diff --git a/storage/innobase/ha/hash0hash.cc b/storage/innobase/ha/hash0hash.cc index 7c5798ae254..ef1339ff47b 100644 --- a/storage/innobase/ha/hash0hash.cc +++ b/storage/innobase/ha/hash0hash.cc @@ -273,9 +273,11 @@ hash_create( table->type = HASH_TABLE_SYNC_NONE; table->array = array; table->n_cells = prime; -#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG table->adaptive = FALSE; -#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ +# endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ table->n_sync_obj = 0; table->sync_obj.mutexes = NULL; table->heaps = NULL; diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 6a6a049d5a6..8f1e7657d1d 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -1,10 +1,10 @@ /***************************************************************************** Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -65,8 +65,6 @@ this program; if not, write to the Free Software Foundation, Inc., #include /* Include necessary InnoDB headers */ -#include "api0api.h" -#include "api0misc.h" #include "btr0btr.h" #include "btr0cur.h" #include "btr0bulk.h" @@ -91,7 +89,7 @@ this program; if not, write to the Free Software Foundation, Inc., #include "fts0types.h" #include "ibuf0ibuf.h" #include "lock0lock.h" -#include "log0log.h" +#include "log0crypt.h" #include "mem0mem.h" #include "mtr0mtr.h" #include "os0file.h" @@ -190,7 +188,6 @@ static ulong commit_threads = 0; static mysql_cond_t commit_cond; static mysql_mutex_t commit_cond_m; static mysql_mutex_t pending_checkpoint_mutex; -static bool innodb_inited = 0; #define INSIDE_HA_INNOBASE_CC @@ -247,9 +244,8 @@ static char* innobase_server_stopword_table = NULL; /* Below we have boolean-valued start-up parameters, and their default values */ -static ulong innobase_fast_shutdown = 1; static my_bool innobase_file_format_check = TRUE; -static my_bool innobase_use_atomic_writes = FALSE; +static my_bool innobase_use_atomic_writes = TRUE; static my_bool innobase_use_fallocate; static my_bool innobase_use_doublewrite = TRUE; static my_bool innobase_use_checksums = TRUE; @@ -262,7 +258,6 @@ static my_bool innodb_optimize_fulltext_only = FALSE; static char* innodb_version_str = (char*) INNODB_VERSION_STR; -extern uint srv_n_fil_crypt_threads; extern uint srv_fil_crypt_rotate_key_age; extern uint srv_n_fil_crypt_iops; @@ -308,39 +303,42 @@ is_partition( #endif /* _WIN32 */ } +/** Signal to shut down InnoDB (NULL if shutdown was signaled, or if +running in innodb_read_only mode, srv_read_only_mode) */ +volatile st_my_thread_var *srv_running; /** Service thread that waits for the server shutdown and stops purge threads. Purge workers have THDs that are needed to calculate virtual columns. This THDs must be destroyed rather early in the server shutdown sequence. This service thread creates a THD and idly waits for it to get a signal to die. Then it notifies all purge workers to shutdown. */ -st_my_thread_var *thd_destructor_myvar= NULL; -mysql_cond_t thd_destructor_cond; -pthread_t thd_destructor_thread; +static pthread_t thd_destructor_thread; pthread_handler_t thd_destructor_proxy(void *) { mysql_mutex_t thd_destructor_mutex; + mysql_cond_t thd_destructor_cond; my_thread_init(); mysql_mutex_init(PSI_NOT_INSTRUMENTED, &thd_destructor_mutex, 0); mysql_cond_init(PSI_NOT_INSTRUMENTED, &thd_destructor_cond, 0); - thd_destructor_myvar = _my_thread_var(); + st_my_thread_var *myvar= _my_thread_var(); THD *thd= create_thd(); thd_proc_info(thd, "InnoDB background thread"); + myvar->current_mutex = &thd_destructor_mutex; + myvar->current_cond = &thd_destructor_cond; + mysql_mutex_lock(&thd_destructor_mutex); - thd_destructor_myvar->current_mutex = &thd_destructor_mutex; - thd_destructor_myvar->current_cond = &thd_destructor_cond; + srv_running = myvar; /* wait until the server wakes the THD to abort and die */ - while (!thd_destructor_myvar->abort) + while (!srv_running->abort) mysql_cond_wait(&thd_destructor_cond, &thd_destructor_mutex); mysql_mutex_unlock(&thd_destructor_mutex); - thd_destructor_myvar = NULL; + srv_running = NULL; - srv_fast_shutdown = (ulint) innobase_fast_shutdown; if (srv_fast_shutdown == 0) { while (trx_sys_any_active_transactions()) { os_thread_sleep(1000); @@ -383,25 +381,6 @@ get_row_format( static ulong innodb_default_row_format = DEFAULT_ROW_FORMAT_DYNAMIC; -#ifdef UNIV_DEBUG -/** Values for --innodb-debug-compress names. */ -static const char* innodb_debug_compress_names[] = { - "none", - "zlib", - "lz4", - "lz4hc", - NullS -}; - -/** Enumeration of --innodb-debug-compress */ -static TYPELIB innodb_debug_compress_typelib = { - array_elements(innodb_debug_compress_names) - 1, - "innodb_debug_compress_typelib", - innodb_debug_compress_names, - NULL -}; -#endif /* UNIV_DEBUG */ - /** Possible values for system variable "innodb_stats_method". The values are defined the same as its corresponding MyISAM system variable "myisam_stats_method"(see "myisam_stats_method_names"), for better usability */ @@ -494,20 +473,6 @@ static const char* innobase_change_buffering_values[IBUF_USE_COUNT] = { "all" /* IBUF_USE_ALL */ }; - -/* This tablespace name is reserved by InnoDB in order to explicitly -create a file_per_table tablespace for the table. */ -const char reserved_file_per_table_space_name[] = "innodb_file_per_table"; - -/* This tablespace name is reserved by InnoDB for the system tablespace -which uses space_id 0 and stores extra types of system pages like UNDO -and doublewrite. */ -const char reserved_system_space_name[] = "innodb_system"; - -/* This tablespace name is reserved by InnoDB for the predefined temporary -tablespace. */ -const char reserved_temporary_space_name[] = "innodb_temporary"; - /* Call back function array defined by MySQL and used to retrieve FTS results. */ const struct _ft_vft ft_vft_result = {NULL, @@ -609,8 +574,7 @@ static PSI_mutex_info all_innodb_mutexes[] = { PSI_KEY(rtr_path_mutex), PSI_KEY(rtr_ssn_mutex), PSI_KEY(trx_sys_mutex), - PSI_KEY(zip_pad_mutex), - PSI_KEY(master_key_id_mutex), + PSI_KEY(zip_pad_mutex) }; # endif /* UNIV_PFS_MUTEX */ @@ -676,93 +640,6 @@ static PSI_file_info all_innodb_files[] = { # endif /* UNIV_PFS_IO */ #endif /* HAVE_PSI_INTERFACE */ -/** Set up InnoDB API callback function array */ -ib_cb_t innodb_api_cb[] = { - (ib_cb_t) ib_cursor_open_table, - (ib_cb_t) ib_cursor_read_row, - (ib_cb_t) ib_cursor_insert_row, - (ib_cb_t) ib_cursor_delete_row, - (ib_cb_t) ib_cursor_update_row, - (ib_cb_t) ib_cursor_moveto, - (ib_cb_t) ib_cursor_first, - (ib_cb_t) ib_cursor_next, - (ib_cb_t) ib_cursor_set_match_mode, - (ib_cb_t) ib_sec_search_tuple_create, - (ib_cb_t) ib_clust_read_tuple_create, - (ib_cb_t) ib_tuple_delete, - (ib_cb_t) ib_tuple_read_u8, - (ib_cb_t) ib_tuple_read_u16, - (ib_cb_t) ib_tuple_read_u32, - (ib_cb_t) ib_tuple_read_u64, - (ib_cb_t) ib_tuple_read_i8, - (ib_cb_t) ib_tuple_read_i16, - (ib_cb_t) ib_tuple_read_i32, - (ib_cb_t) ib_tuple_read_i64, - (ib_cb_t) ib_tuple_get_n_cols, - (ib_cb_t) ib_col_set_value, - (ib_cb_t) ib_col_get_value, - (ib_cb_t) ib_col_get_meta, - (ib_cb_t) ib_trx_begin, - (ib_cb_t) ib_trx_commit, - (ib_cb_t) ib_trx_rollback, - (ib_cb_t) ib_trx_start, - (ib_cb_t) ib_trx_release, - (ib_cb_t) ib_cursor_lock, - (ib_cb_t) ib_cursor_close, - (ib_cb_t) ib_cursor_new_trx, - (ib_cb_t) ib_cursor_reset, - (ib_cb_t) ib_col_get_name, - (ib_cb_t) ib_table_truncate, - (ib_cb_t) ib_cursor_open_index_using_name, - (ib_cb_t) ib_cfg_get_cfg, - (ib_cb_t) ib_cursor_set_memcached_sync, - (ib_cb_t) ib_cursor_set_cluster_access, - (ib_cb_t) ib_cursor_commit_trx, - (ib_cb_t) ib_cfg_trx_level, - (ib_cb_t) ib_tuple_get_n_user_cols, - (ib_cb_t) ib_cursor_set_lock_mode, - (ib_cb_t) ib_get_idx_field_name, - (ib_cb_t) ib_trx_get_start_time, - (ib_cb_t) ib_cfg_bk_commit_interval, - (ib_cb_t) ib_ut_strerr, - (ib_cb_t) ib_cursor_stmt_begin, - (ib_cb_t) ib_trx_read_only, - (ib_cb_t) ib_is_virtual_table -}; - -/******************************************************************//** -Function used to loop a thread (for debugging/instrumentation -purpose). */ -void -srv_debug_loop(void) -/*================*/ -{ - ibool set = TRUE; - - while (set) { - os_thread_yield(); - } -} - -/******************************************************************//** -Debug function used to read a MBR data */ - -#ifdef UNIV_DEBUG -void -srv_mbr_debug(const byte* data) -{ - double a, b, c , d; - a = mach_double_read(data); - data += sizeof(double); - b = mach_double_read(data); - data += sizeof(double); - c = mach_double_read(data); - data += sizeof(double); - d = mach_double_read(data); - ut_ad(a && b && c &&d); -} -#endif - static void innodb_remember_check_sysvar_funcs(); mysql_var_check_func check_sysvar_enum; @@ -792,8 +669,6 @@ ha_create_table_option innodb_table_option_list[]= /* With this option user can set zip compression level for page compression for this table*/ HA_TOPTION_NUMBER("PAGE_COMPRESSION_LEVEL", page_compression_level, 0, 1, 9, 1), - /* With this option user can enable atomic writes feature for this table */ - HA_TOPTION_ENUM("ATOMIC_WRITES", atomic_writes, "DEFAULT,ON,OFF", 0), /* With this option the user can enable encryption for the table */ HA_TOPTION_ENUM("ENCRYPTED", encryption, "DEFAULT,YES,NO", 0), /* With this option the user defines the key identifier using for the encryption */ @@ -964,6 +839,7 @@ static ibool innodb_have_lz4=IF_LZ4(1, 0); static ibool innodb_have_lzma=IF_LZMA(1, 0); static ibool innodb_have_bzip2=IF_BZIP2(1, 0); static ibool innodb_have_snappy=IF_SNAPPY(1, 0); +static ibool innodb_have_punch_hole=IF_PUNCH_HOLE(1, 0); static int @@ -1171,20 +1047,6 @@ static SHOW_VAR innodb_status_variables[]= { /* Status variables for page compression */ {"page_compression_saved", (char*) &export_vars.innodb_page_compression_saved, SHOW_LONGLONG}, - {"page_compression_trim_sect512", - (char*) &export_vars.innodb_page_compression_trim_sect512, SHOW_LONGLONG}, - {"page_compression_trim_sect1024", - (char*) &export_vars.innodb_page_compression_trim_sect1024, SHOW_LONGLONG}, - {"page_compression_trim_sect2048", - (char*) &export_vars.innodb_page_compression_trim_sect2048, SHOW_LONGLONG}, - {"page_compression_trim_sect4096", - (char*) &export_vars.innodb_page_compression_trim_sect4096, SHOW_LONGLONG}, - {"page_compression_trim_sect8192", - (char*) &export_vars.innodb_page_compression_trim_sect8192, SHOW_LONGLONG}, - {"page_compression_trim_sect16384", - (char*) &export_vars.innodb_page_compression_trim_sect16384, SHOW_LONGLONG}, - {"page_compression_trim_sect32768", - (char*) &export_vars.innodb_page_compression_trim_sect32768, SHOW_LONGLONG}, {"num_index_pages_written", (char*) &export_vars.innodb_index_pages_written, SHOW_LONGLONG}, {"num_non_index_pages_written", @@ -1193,8 +1055,6 @@ static SHOW_VAR innodb_status_variables[]= { (char*) &export_vars.innodb_pages_page_compressed, SHOW_LONGLONG}, {"num_page_compressed_trim_op", (char*) &export_vars.innodb_page_compressed_trim_op, SHOW_LONGLONG}, - {"num_page_compressed_trim_op_saved", - (char*) &export_vars.innodb_page_compressed_trim_op_saved, SHOW_LONGLONG}, {"num_pages_page_decompressed", (char*) &export_vars.innodb_pages_page_decompressed, SHOW_LONGLONG}, {"num_pages_page_compression_error", @@ -1213,6 +1073,8 @@ static SHOW_VAR innodb_status_variables[]= { (char*) &innodb_have_bzip2, SHOW_BOOL}, {"have_snappy", (char*) &innodb_have_snappy, SHOW_BOOL}, + {"have_punch_hole", + (char*) &innodb_have_punch_hole, SHOW_BOOL}, /* Defragmentation */ {"defragment_compression_failures", @@ -1273,6 +1135,9 @@ static SHOW_VAR innodb_status_variables[]= { {"scrub_background_page_split_failures_unknown", (char*) &export_vars.innodb_scrub_page_split_failures_unknown, SHOW_LONG}, + {"scrub_log", + (char*) &export_vars.innodb_scrub_log, + SHOW_LONGLONG}, {"encryption_num_key_requests", (char*) &export_vars.innodb_encryption_key_requests, SHOW_LONGLONG}, @@ -1498,20 +1363,6 @@ innobase_rollback_by_xid( XID* xid); /*!< in: X/Open XA transaction identification */ -#ifdef MYSQL_TABLESPACES -/** This API handles CREATE, ALTER & DROP commands for InnoDB tablespaces. -@param[in] hton Handlerton of InnoDB -@param[in] thd Connection -@param[in] alter_info Describies the command and how to do it. -@return MySQL error code*/ -static -int -innobase_alter_tablespace( - handlerton* hton, - THD* thd, - st_alter_tablespace* alter_info); -#endif /* MYSQL_TABLESPACES */ - /** Remove all tables in the named database inside InnoDB. @param[in] hton handlerton from InnoDB @param[in] path Database path; Inside InnoDB the name of the last @@ -1969,11 +1820,13 @@ innobase_srv_conc_exit_innodb( #endif /* WITH_WSREP */ trx_t* trx = prebuilt->trx; -#ifdef UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# ifdef UNIV_DEBUG btrsea_sync_check check(trx->has_search_latch); ut_ad(!sync_check_iterate(check)); -#endif /* UNIV_DEBUG */ +# endif /* UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ /* This is to avoid making an unnecessary function call. */ if (trx->declared_to_be_inside_innodb @@ -1991,11 +1844,13 @@ innobase_srv_conc_force_exit_innodb( /*================================*/ trx_t* trx) /*!< in: transaction handle */ { -#ifdef UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# ifdef UNIV_DEBUG btrsea_sync_check check(trx->has_search_latch); ut_ad(!sync_check_iterate(check)); -#endif /* UNIV_DEBUG */ +# endif /* UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ /* This is to avoid making an unnecessary function call. */ if (trx->declared_to_be_inside_innodb) { @@ -2073,12 +1928,13 @@ const char* thd_innodb_tmpdir( THD* thd) { - -#ifdef UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# ifdef UNIV_DEBUG trx_t* trx = thd_to_trx(thd); btrsea_sync_check check(trx->has_search_latch); ut_ad(!sync_check_iterate(check)); -#endif /* UNIV_DEBUG */ +# endif /* UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ const char* tmp_dir = THDVAR(thd, tmpdir); @@ -2127,15 +1983,9 @@ innobase_release_temporary_latches( { DBUG_ASSERT(hton == innodb_hton_ptr); - if (!innodb_inited) { - - return(0); - } - - trx_t* trx = thd_to_trx(thd); - - if (trx != NULL) { - trx_search_latch_release_if_reserved(trx); + if (!srv_was_started) { + } else if (trx_t* trx = thd_to_trx(thd)) { + trx_assert_no_search_latch(trx); } return(0); @@ -2355,8 +2205,6 @@ convert_error_code_to_mysql( return(HA_ERR_TABLE_CORRUPT); case DB_FTS_TOO_MANY_WORDS_IN_PHRASE: return(HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE); - case DB_WRONG_FILE_NAME: - return(HA_ERR_GENERIC); // when can this happen? case DB_COMPUTE_VALUE_FAILED: return(HA_ERR_GENERIC); // impossible } @@ -2603,8 +2451,8 @@ innobase_get_stmt_safe( stmt = thd ? thd_query_string(thd) : NULL; if (stmt && stmt->str) { - length = stmt->length > buflen ? buflen : stmt->length; - memcpy(buf, stmt->str, length-1); + length = stmt->length >= buflen ? buflen - 1 : stmt->length; + memcpy(buf, stmt->str, length); buf[length]='\0'; } else { buf[0]='\0'; @@ -2829,118 +2677,6 @@ innobase_raw_format( return(ut_str_sql_format(buf_tmp, buf_tmp_used, buf, buf_size)); } -#ifdef MYSQL_COMPRESSION -/** Check if the string is "empty" or "none". -@param[in] algorithm Compression algorithm to check -@return true if no algorithm requested */ -bool -Compression::is_none(const char* algorithm) -{ - /* NULL is the same as NONE */ - if (algorithm == NULL - || *algorithm == 0 - || innobase_strcasecmp(algorithm, "none") == 0) { - return(true); - } - - return(false); -} - -/** Check for supported COMPRESS := (ZLIB | LZ4 | NONE) supported values -@param[in] name Name of the compression algorithm -@param[out] compression The compression algorithm -@return DB_SUCCESS or DB_UNSUPPORTED */ -dberr_t -Compression::check( - const char* algorithm, - Compression* compression) -{ - if (is_none(algorithm)) { - - compression->m_type = NONE; - - } else if (innobase_strcasecmp(algorithm, "zlib") == 0) { - - compression->m_type = ZLIB; - - } else if (innobase_strcasecmp(algorithm, "lz4") == 0) { - - compression->m_type = LZ4; - - } else { - return(DB_UNSUPPORTED); - } - - return(DB_SUCCESS); -} - -/** Check for supported COMPRESS := (ZLIB | LZ4 | NONE) supported values -@param[in] name Name of the compression algorithm -@param[out] compression The compression algorithm -@return DB_SUCCESS or DB_UNSUPPORTED */ -dberr_t -Compression::validate(const char* algorithm) -{ - Compression compression; - - return(check(algorithm, &compression)); -} -#endif /* MYSQL_COMPRESSION */ - -#ifdef MYSQL_ENCRYPTION -/** Check if the string is "" or "n". -@param[in] algorithm Encryption algorithm to check -@return true if no algorithm requested */ -bool -Encryption::is_none(const char* algorithm) -{ - /* NULL is the same as NONE */ - if (algorithm == NULL - || innobase_strcasecmp(algorithm, "n") == 0 - || innobase_strcasecmp(algorithm, "") == 0) { - return(true); - } - - return(false); -} - -/** Check the encryption option and set it -@param[in] option encryption option -@param[in/out] encryption The encryption algorithm -@return DB_SUCCESS or DB_UNSUPPORTED */ -dberr_t -Encryption::set_algorithm( - const char* option, - Encryption* encryption) -{ - if (is_none(option)) { - - encryption->m_type = NONE; - - } else if (innobase_strcasecmp(option, "y") == 0) { - - encryption->m_type = AES; - - } else { - return(DB_UNSUPPORTED); - } - - return(DB_SUCCESS); -} - -/** Check for supported ENCRYPT := (Y | N) supported values -@param[in] option Encryption option -@param[out] encryption The encryption algorithm -@return DB_SUCCESS or DB_UNSUPPORTED */ -dberr_t -Encryption::validate(const char* option) -{ - Encryption encryption; - - return(encryption.set_algorithm(option, &encryption)); -} -#endif /* MYSQL_ENCRYPTION */ - /*********************************************************************//** Compute the next autoinc value. @@ -3574,7 +3310,6 @@ innobase_query_caching_of_table_permitted( to the table */ ulonglong *unused) /*!< unused for this engine */ { - bool is_autocommit; char norm_name[1000]; trx_t* trx = check_trx_exists(thd); @@ -3584,29 +3319,14 @@ innobase_query_caching_of_table_permitted( /* In the SERIALIZABLE mode we add LOCK IN SHARE MODE to every plain SELECT if AUTOCOMMIT is not on. */ - return(static_cast(false)); + return(false); } - if (trx->has_search_latch) { - sql_print_error("The calling thread is holding the adaptive" - " search, latch though calling" - " innobase_query_caching_of_table_permitted."); - trx_print(stderr, trx, 1024); - } - - trx_search_latch_release_if_reserved(trx); - + trx_assert_no_search_latch(trx); innobase_srv_conc_force_exit_innodb(trx); - if (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) { - - is_autocommit = true; - } else { - is_autocommit = false; - - } - - if (is_autocommit && trx->n_mysql_tables_in_use == 0) { + if (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN) + && trx->n_mysql_tables_in_use == 0) { /* We are going to retrieve the query result from the query cache. This cannot be a store operation to the query cache because then MySQL would have locks on tables already. @@ -3625,7 +3345,7 @@ innobase_query_caching_of_table_permitted( then trx2 would have already invalidated the cache. Thus we can trust the result in the cache is ok for this query. */ - return((my_bool)TRUE); + return(true); } /* Normalize the table name to InnoDB format */ @@ -3633,12 +3353,7 @@ innobase_query_caching_of_table_permitted( innobase_register_trx(innodb_hton_ptr, thd, trx); - if (row_search_check_if_query_cache_permitted(trx, norm_name)) { - - return(static_cast(true)); - } - - return(static_cast(false)); + return(row_search_check_if_query_cache_permitted(trx, norm_name)); } /*****************************************************************//** @@ -3667,7 +3382,7 @@ innobase_invalidate_query_cache( TRUE); } -/** Quote a standard SQL identifier like tablespace, index or column name. +/** Quote a standard SQL identifier like index or column name. @param[in] file output stream @param[in] trx InnoDB transaction, or NULL @param[in] id identifier to quote */ @@ -3890,7 +3605,7 @@ ha_innobase::init_table_handle_for_HANDLER(void) /* Initialize the m_prebuilt struct much like it would be inited in external_lock */ - trx_search_latch_release_if_reserved(m_prebuilt->trx); + trx_assert_no_search_latch(m_prebuilt->trx); innobase_srv_conc_force_exit_innodb(m_prebuilt->trx); @@ -3945,6 +3660,13 @@ innobase_space_shutdown() } srv_tmp_space.shutdown(); +#ifdef WITH_INNODB_DISALLOW_WRITES + if (srv_allow_writes_event) { + os_event_destroy(srv_allow_writes_event); + srv_allow_writes_event = NULL; + } +#endif /* WITH_INNODB_DISALLOW_WRITES */ + DBUG_VOID_RETURN; } @@ -3961,67 +3683,6 @@ innobase_init_abort() DBUG_RETURN(1); } - -#ifdef MYSQL_ENCRYPTION -/* mutex protecting the master_key_id */ -ib_mutex_t master_key_id_mutex; - -/** Rotate the encrypted tablespace keys according to master key -rotation. -@return false on success, true on failure */ -bool -innobase_encryption_key_rotation() -{ - byte* master_key = NULL; - bool ret = FALSE; - - /* Require the mutex to block other rotate request. */ - mutex_enter(&master_key_id_mutex); - - /* Check if keyring loaded and the currently master key - can be fetched. */ - if (Encryption::master_key_id != 0) { - ulint master_key_id; - Encryption::Version version; - - Encryption::get_master_key(&master_key_id, - &master_key, - &version); - if (master_key == NULL) { - mutex_exit(&master_key_id_mutex); - my_error(ER_CANNOT_FIND_KEY_IN_KEYRING, MYF(0)); - return(true); - } - my_free(master_key); - } - - master_key = NULL; - - /* Generate the new master key. */ - Encryption::create_master_key(&master_key); - - if (master_key == NULL) { - my_error(ER_CANNOT_FIND_KEY_IN_KEYRING, MYF(0)); - mutex_exit(&master_key_id_mutex); - return(true); - } - - ret = !fil_encryption_rotate(); - - my_free(master_key); - - /* If rotation failure, return error */ - if (ret) { - my_error(ER_CANNOT_FIND_KEY_IN_KEYRING, MYF(0)); - } - - /* Release the mutex. */ - mutex_exit(&master_key_id_mutex); - - return(ret); -} -#endif /* MYSQL_ENCRYPTION */ - /** Return partitioning flags. */ static uint innobase_partition_flags() { @@ -4053,16 +3714,56 @@ static const char* deprecated_file_format_check static const char* deprecated_file_format_max = DEPRECATED_FORMAT_PARAMETER("innodb_file_format_max"); +/** Deprecation message about innodb_use_trim */ +static const char* deprecated_use_trim + = "Using innodb_use_trim is deprecated" + " and the parameter will be removed in MariaDB 10.3."; + +/** Deprecation message about innodb_instrument_semaphores */ +static const char* deprecated_instrument_semaphores + = "Using innodb_instrument_semaphores is deprecated" + " and the parameter will be removed in MariaDB 10.3."; + +static my_bool innodb_instrument_semaphores; + /** Update log_checksum_algorithm_ptr with a pointer to the function corresponding to whether checksums are enabled. -@param[in] check whether redo log block checksums are enabled */ -static -void -innodb_log_checksums_func_update(bool check) +@param[in,out] thd client session, or NULL if at startup +@param[in] check whether redo log block checksums are enabled +@return whether redo log block checksums are enabled */ +static inline +bool +innodb_log_checksums_func_update(THD* thd, bool check) { - log_checksum_algorithm_ptr = check - ? log_block_calc_checksum_crc32 - : log_block_calc_checksum_none; + static const char msg[] = "innodb_encrypt_log implies" + " innodb_log_checksums"; + + ut_ad(!thd == !srv_was_started); + + if (!check) { + check = srv_encrypt_log; + if (!check) { + } else if (thd) { + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, + HA_ERR_UNSUPPORTED, msg); + } else { + sql_print_warning(msg); + } + } + + if (thd) { + log_mutex_enter(); + log_checksum_algorithm_ptr = check + ? log_block_calc_checksum_crc32 + : log_block_calc_checksum_none; + log_mutex_exit(); + } else { + log_checksum_algorithm_ptr = check + ? log_block_calc_checksum_crc32 + : log_block_calc_checksum_none; + } + + return(check); } /****************************************************************//** @@ -4088,7 +3789,6 @@ innobase_init( uint format_id; ulong num_pll_degree; ulint srv_buf_pool_size_org = 0; - ulint fsp_flags =0; DBUG_ENTER("innobase_init"); handlerton* innobase_hton= (handlerton*) p; @@ -4117,9 +3817,6 @@ innobase_init( innobase_hton->commit_checkpoint_request=innobase_checkpoint_request; innobase_hton->create = innobase_create_handler; -#ifdef MYSQL_TABLESPACES - innobase_hton->alter_tablespace = innobase_alter_tablespace; -#endif innobase_hton->drop_database = innobase_drop_database; innobase_hton->panic = innobase_end; innobase_hton->partition_flags= innobase_partition_flags; @@ -4151,20 +3848,10 @@ innobase_init( innobase_hton->tablefile_extensions = ha_innobase_exts; } -#ifdef MYSQL_INNODB_API_CB - /* JAN: TODO: MySQL 5.7 */ - innobase_hton->data = &innodb_api_cb; -#endif - innobase_hton->table_options = innodb_table_option_list; innodb_remember_check_sysvar_funcs(); -#ifdef MYSQL_ENCRYPTION - innobase_hton->rotate_encryption_master_key = - innobase_encryption_key_rotation; -#endif - ut_a(DATA_MYSQL_TRUE_VARCHAR == (ulint)MYSQL_TYPE_VARCHAR); #ifndef DBUG_OFF @@ -4204,21 +3891,15 @@ innobase_init( any functions that could possibly allocate memory. */ ut_new_boot(); - if (UNIV_PAGE_SIZE != UNIV_PAGE_SIZE_DEF) { - ib::info() << "innodb_page_size has been " - << "changed from default value " - << UNIV_PAGE_SIZE_DEF << " to " << UNIV_PAGE_SIZE; - - /* There is hang on buffer pool when trying to get a new - page if buffer pool size is too small for large page sizes */ - if (UNIV_PAGE_SIZE > UNIV_PAGE_SIZE_DEF - && innobase_buffer_pool_size < (24 * 1024 * 1024)) { - ib::info() << "innodb_page_size=" - << UNIV_PAGE_SIZE << " requires " - << "innodb_buffer_pool_size > 24M current " - << innobase_buffer_pool_size; - goto error; - } + /* The buffer pool needs to be able to accommodate enough many + pages, even for larger pages */ + if (UNIV_PAGE_SIZE > UNIV_PAGE_SIZE_DEF + && innobase_buffer_pool_size < (24 * 1024 * 1024)) { + ib::info() << "innodb_page_size=" + << UNIV_PAGE_SIZE << " requires " + << "innodb_buffer_pool_size > 24M current " + << innobase_buffer_pool_size; + goto error; } #ifndef HAVE_LZ4 @@ -4293,7 +3974,6 @@ innobase_init( ut_a(default_path); fil_path_to_mysql_datadir = default_path; - folder_mysql_datadir = fil_path_to_mysql_datadir; /* Set InnoDB initialization parameters according to the values read from MySQL .cnf file */ @@ -4327,13 +4007,8 @@ innobase_init( page_size_t(srv_page_size, srv_page_size, false)); srv_sys_space.set_space_id(TRX_SYS_SPACE); - - /* Create the filespace flags. */ - fsp_flags = fsp_flags_init( - univ_page_size, false, false, false, false, false, 0, ATOMIC_WRITES_DEFAULT); - srv_sys_space.set_flags(fsp_flags); - - srv_sys_space.set_name(reserved_system_space_name); + srv_sys_space.set_flags(FSP_FLAGS_PAGE_SSIZE()); + srv_sys_space.set_name("innodb_system"); srv_sys_space.set_path(srv_data_home); /* Supports raw devices */ @@ -4351,13 +4026,9 @@ innobase_init( /* We set the temporary tablspace id later, after recovery. The temp tablespace doesn't support raw devices. Set the name and path. */ - srv_tmp_space.set_name(reserved_temporary_space_name); + srv_tmp_space.set_name("innodb_temporary"); srv_tmp_space.set_path(srv_data_home); - - /* Create the filespace flags with the temp flag set. */ - fsp_flags = fsp_flags_init( - univ_page_size, false, false, false, true, false, 0, ATOMIC_WRITES_DEFAULT); - srv_tmp_space.set_flags(fsp_flags); + srv_tmp_space.set_flags(FSP_FLAGS_PAGE_SSIZE()); if (!srv_tmp_space.parse_params(innobase_temp_data_file_path, false)) { DBUG_RETURN(innobase_init_abort()); @@ -4410,6 +4081,10 @@ innobase_init( ib::warn() << deprecated_file_format; } + if (innodb_instrument_semaphores) { + ib::warn() << deprecated_instrument_semaphores; + } + /* Validate the file format by animal name */ if (innobase_file_format_name != NULL) { @@ -4545,9 +4220,7 @@ innobase_change_buffering_inited_ok: srv_log_file_size = (ib_uint64_t) innobase_log_file_size; if (UNIV_PAGE_SIZE_DEF != srv_page_size) { - ib::warn() << "innodb-page-size has been changed from the" - " default value " << UNIV_PAGE_SIZE_DEF << " to " - << srv_page_size << "."; + ib::info() << "innodb_page_size=" << srv_page_size; } if (srv_log_write_ahead_size > srv_page_size) { @@ -4583,7 +4256,8 @@ innobase_change_buffering_inited_ok: srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_NONE; } - innodb_log_checksums_func_update(innodb_log_checksums); + innodb_log_checksums = innodb_log_checksums_func_update( + NULL, innodb_log_checksums); #ifdef HAVE_LINUX_LARGE_PAGES if ((os_use_large_pages = my_use_large_pages)) { @@ -4645,17 +4319,20 @@ innobase_change_buffering_inited_ok: " It will be removed in MariaDB 10.3."; } - srv_use_atomic_writes = (ibool) innobase_use_atomic_writes; - if (innobase_use_atomic_writes) { - fprintf(stderr, "InnoDB: using atomic writes.\n"); - /* Force doublewrite buffer off, atomic writes replace it. */ - if (srv_use_doublewrite_buf) { - fprintf(stderr, "InnoDB: Switching off doublewrite buffer " - "because of atomic writes.\n"); - innobase_use_doublewrite = srv_use_doublewrite_buf = FALSE; - } + srv_use_atomic_writes + = innobase_use_atomic_writes && my_may_have_atomic_write; + if (srv_use_atomic_writes && !srv_file_per_table) + { + fprintf(stderr, "InnoDB: Disabling atomic_writes as file_per_table is not used.\n"); + srv_use_atomic_writes= 0; + } - /* Force O_DIRECT on Unixes (on Windows writes are always unbuffered)*/ + if (srv_use_atomic_writes) { + fprintf(stderr, "InnoDB: using atomic writes.\n"); + /* + Force O_DIRECT on Unixes (on Windows writes are always + unbuffered) + */ #ifndef _WIN32 if (!innobase_file_flush_method || !strstr(innobase_file_flush_method, "O_DIRECT")) { @@ -4710,12 +4387,6 @@ innobase_change_buffering_inited_ok: } */ - if (!srv_read_only_mode) { - mysql_thread_create(thd_destructor_thread_key, - &thd_destructor_thread, - NULL, thd_destructor_proxy, NULL); - } - /* Since we in this module access directly the fields of a trx struct, and due to different headers and flags it might happen that ib_mutex_t has a different size in this module and in InnoDB @@ -4736,14 +4407,17 @@ innobase_change_buffering_inited_ok: } if (err != DB_SUCCESS) { + innodb_shutdown(); DBUG_RETURN(innobase_init_abort()); + } else if (!srv_read_only_mode) { + mysql_thread_create(thd_destructor_thread_key, + &thd_destructor_thread, + NULL, thd_destructor_proxy, NULL); + while (!srv_running) + os_thread_sleep(20); } -#ifdef MYSQL_ENCRYPTION - /* Create mutex to protect encryption master_key_id. */ - mutex_create(LATCH_ID_MASTER_KEY_ID_MUTEX, &master_key_id_mutex); -#endif - + srv_was_started = TRUE; /* Adjust the innodb_undo_logs config object */ innobase_undo_logs_init_default_max(); @@ -4762,7 +4436,6 @@ innobase_change_buffering_inited_ok: mysql_mutex_init(pending_checkpoint_mutex_key, &pending_checkpoint_mutex, MY_MUTEX_INIT_FAST); - innodb_inited= 1; #ifdef MYSQL_DYNAMIC_PLUGIN if (innobase_hton != p) { innobase_hton = reinterpret_cast(p); @@ -4831,8 +4504,7 @@ innobase_end( DBUG_ENTER("innobase_end"); DBUG_ASSERT(hton == innodb_hton_ptr); - if (innodb_inited) { - + if (srv_was_started) { THD *thd= current_thd; if (thd) { // may be UNINSTALL PLUGIN statement trx_t* trx = thd_to_trx(thd); @@ -4841,26 +4513,20 @@ innobase_end( } } - srv_fast_shutdown = (ulint) innobase_fast_shutdown; - - innodb_inited = 0; hash_table_free(innobase_open_tables); innobase_open_tables = NULL; -#ifdef MYSQL_ENCRYPTION - mutex_free(&master_key_id_mutex); -#endif - - if (!abort_loop && thd_destructor_myvar) { + if (!abort_loop && srv_running) { // may be UNINSTALL PLUGIN statement - thd_destructor_myvar->abort = 1; - mysql_cond_broadcast(thd_destructor_myvar->current_cond); + srv_running->abort = 1; + mysql_cond_broadcast(srv_running->current_cond); } - if (innobase_shutdown_for_mysql() != DB_SUCCESS) { - err = 1; + if (!srv_read_only_mode) { + pthread_join(thd_destructor_thread, NULL); } + innodb_shutdown(); innobase_space_shutdown(); mysql_mutex_destroy(&innobase_share_mutex); @@ -4882,7 +4548,7 @@ innobase_commit_low( #ifdef WITH_WSREP THD* thd = (THD*)trx->mysql_thd; const char* tmp = 0; - if (wsrep_on(thd)) { + if (thd && wsrep_on(thd)) { #ifdef WSREP_PROC_INFO char info[64]; info[sizeof(info) - 1] = '\0'; @@ -5071,7 +4737,7 @@ innobase_commit_ordered( search system latch, or we will disobey the latching order. But we already released it in innobase_xa_prepare() (if not before), so just have an assert here.*/ - ut_ad(!trx->has_search_latch); + trx_assert_no_search_latch(trx); if (!trx_is_registered_for_2pc(trx) && trx_is_started(trx)) { /* We cannot throw error here; instead we will catch this error @@ -5252,13 +4918,13 @@ innobase_rollback( error = trx_rollback_for_mysql(trx); if (trx->state == TRX_STATE_FORCED_ROLLBACK) { -#ifdef UNIV_DEBUG +#ifndef DBUG_OFF char buffer[1024]; - ib::info() << "Forced rollback : " - << thd_get_error_context_description(thd, - buffer, sizeof(buffer), 512); -#endif /* UNIV_DEBUG */ + DBUG_LOG("trx", "Forced rollback: " + << thd_get_error_context_description( + thd, buffer, sizeof buffer, 512)); +#endif /* !DBUG_OFF */ trx->state = TRX_STATE_NOT_STARTED; } @@ -5290,7 +4956,7 @@ innobase_rollback_trx( reserve the trx_sys->mutex, we have to release the search system latch first to obey the latching order. */ - trx_search_latch_release_if_reserved(trx); + trx_assert_no_search_latch(trx); innobase_srv_conc_force_exit_innodb(trx); @@ -5756,14 +5422,8 @@ innobase_kill_query( trx_mutex_taken = true; } -#ifdef UNIV_DEBUG - dberr_t err = -#endif lock_trx_handle_wait(trx, true, true); - ut_ad(err == DB_SUCCESS || err == DB_LOCK_WAIT - || err == DB_DEADLOCK); - if (lock_mutex_taken) { lock_mutex_exit(); } @@ -6884,28 +6544,6 @@ ha_innobase::open( is_part = NULL; } -#ifdef MYSQL_ENCRYPTION - /* For encrypted table, check if the encryption info in data - file can't be retrieved properly, mark it as corrupted. */ - if (ib_table != NULL - && dict_table_is_encrypted(ib_table) - && ib_table->ibd_file_missing - && !dict_table_is_discarded(ib_table)) { - - /* Mark this table as corrupted, so the drop table - or force recovery can still use it, but not others. */ - - dict_table_close(ib_table, FALSE, FALSE); - ib_table = NULL; - is_part = NULL; - - free_share(m_share); - my_error(ER_CANNOT_FIND_KEY_IN_KEYRING, MYF(0)); - - DBUG_RETURN(HA_ERR_TABLE_CORRUPT); - } -#endif - if (NULL == ib_table) { if (is_part) { @@ -7191,34 +6829,6 @@ ha_innobase::open( } info(HA_STATUS_NO_LOCK | HA_STATUS_VARIABLE | HA_STATUS_CONST); - -#ifdef MYSQL_COMPRESSION - dberr_t err = fil_set_compression(m_prebuilt->table, - table->s->compress.str); - - switch (err) { - case DB_NOT_FOUND: - case DB_UNSUPPORTED: - /* We will do another check before the create - table and push the error to the client there. */ - break; - - case DB_IO_NO_PUNCH_HOLE_TABLESPACE: - /* We did the check in the 'if' above. */ - - case DB_IO_NO_PUNCH_HOLE_FS: - /* During open we can't check whether the FS supports - punch hole or not, at least on Linux. */ - break; - - default: - ut_error; - - case DB_SUCCESS: - break; - } -#endif - DBUG_RETURN(0); } @@ -8494,7 +8104,10 @@ ha_innobase::build_template( index_contains = dict_index_contains_col_or_prefix( index, num_v, true); if (index_contains) + { + m_prebuilt->n_template = 0; goto no_icp; + } } else { index_contains = dict_index_contains_col_or_prefix( index, i - num_v, false); @@ -10437,7 +10050,7 @@ ha_innobase::innobase_get_index( << " InnoDB name " << index->name() << " for table " << m_prebuilt->table->name.m_name; - for(ulint i=0; i < table->s->keys; i++) { + for(uint i=0; i < table->s->keys; i++) { index = innobase_index_lookup(m_share, i); key = table->key_info + keynr; @@ -12024,11 +11637,6 @@ create_table_info_t::create_table_def() /* For single-table tablespaces, we pass 0 as the space id, and then determine the actual space id when the tablespace is created. */ - if (DICT_TF_HAS_SHARED_SPACE(m_flags)) { - ut_ad(m_tablespace != NULL && m_tablespace[0] != '\0'); - - space_id = fil_space_get_id_by_name(m_tablespace); - } /* Adjust the number of columns for the FTS hidden field */ actual_n_cols = n_cols; @@ -12045,11 +11653,6 @@ create_table_info_t::create_table_def() ? doc_id_col : n_cols - num_v; } - if (strlen(m_temp_path) != 0) { - table->dir_path_of_temp_table = - mem_heap_strdup(table->heap, m_temp_path); - } - if (DICT_TF_HAS_DATA_DIR(m_flags)) { ut_a(strlen(m_remote_path)); @@ -12060,13 +11663,6 @@ create_table_info_t::create_table_def() table->data_dir_path = NULL; } - if (DICT_TF_HAS_SHARED_SPACE(m_flags)) { - ut_ad(strlen(m_tablespace)); - table->tablespace = mem_heap_strdup(table->heap, m_tablespace); - } else { - table->tablespace = NULL; - } - heap = mem_heap_create(1000); for (i = 0; i < n_cols; i++) { @@ -12245,136 +11841,34 @@ err_col: on re-start we don't need to restore temp-table and so no entry is needed in SYSTEM tables. */ if (dict_table_is_temporary(table)) { -#ifdef MYSQL_COMPRESSION - if (m_create_info->compress.length > 0) { - push_warning_printf( - m_thd, - Sql_condition::WARN_LEVEL_WARN, - HA_ERR_UNSUPPORTED, - "InnoDB: Compression not supported for " - "temporary tables"); + /* Get a new table ID */ + dict_table_assign_new_id(table, m_trx); - err = DB_UNSUPPORTED; - - dict_mem_table_free(table); - } else if (m_create_info->encrypt_type.length > 0 - && !Encryption::is_none( - m_create_info->encrypt_type.str)) { - - my_error(ER_TABLESPACE_CANNOT_ENCRYPT, MYF(0)); - err = DB_UNSUPPORTED; - dict_mem_table_free(table); - } else { -#endif /* MYSQL_COMPRESSION */ - /* Get a new table ID */ - dict_table_assign_new_id(table, m_trx); - - /* Create temp tablespace if configured. */ - err = dict_build_tablespace_for_table(table, NULL); - - if (err == DB_SUCCESS) { - /* Temp-table are maintained in memory and so - can_be_evicted is FALSE. */ - mem_heap_t* temp_table_heap; - - temp_table_heap = mem_heap_create(256); - - dict_table_add_to_cache( - table, FALSE, temp_table_heap); - - DBUG_EXECUTE_IF("ib_ddl_crash_during_create2", - DBUG_SUICIDE();); - - mem_heap_free(temp_table_heap); - } -#ifdef MYSQL_COMPRESSION - } -#endif - - } else { - const char* algorithm = NULL; - -#if MYSQL_COMPRESSION - const char* algorithm = m_create_info->compress.str; - - if (!(m_flags2 & DICT_TF2_USE_FILE_PER_TABLE) - && m_create_info->compress.length > 0 - && !Compression::is_none(algorithm)) { - - push_warning_printf( - m_thd, - Sql_condition::WARN_LEVEL_WARN, - HA_ERR_UNSUPPORTED, - "InnoDB: Compression not supported for " - "shared tablespaces"); - - algorithm = NULL; - - err = DB_UNSUPPORTED; - dict_mem_table_free(table); - - } else if (Compression::validate(algorithm) != DB_SUCCESS - || m_form->s->row_type == ROW_TYPE_COMPRESSED - || m_create_info->key_block_size > 0) { - - algorithm = NULL; - } - - const char* encrypt = m_create_info->encrypt_type.str; - - if (!(m_flags2 & DICT_TF2_USE_FILE_PER_TABLE) - && m_create_info->encrypt_type.length > 0 - && !Encryption::is_none(encrypt)) { - - my_error(ER_TABLESPACE_CANNOT_ENCRYPT, MYF(0)); - err = DB_UNSUPPORTED; - dict_mem_table_free(table); - - } else if (!Encryption::is_none(encrypt)) { - /* Set the encryption flag. */ - byte* master_key = NULL; - ulint master_key_id; - Encryption::Version version; - - /* Check if keyring is ready. */ - Encryption::get_master_key(&master_key_id, - &master_key, - &version); - - if (master_key == NULL) { - my_error(ER_CANNOT_FIND_KEY_IN_KEYRING, - MYF(0)); - err = DB_UNSUPPORTED; - dict_mem_table_free(table); - } else { - my_free(master_key); - DICT_TF2_FLAG_SET(table, - DICT_TF2_ENCRYPTION); - } - } -#endif /* MYSQL_COMPRESSION */ + /* Create temp tablespace if configured. */ + err = dict_build_tablespace_for_table(table, NULL); if (err == DB_SUCCESS) { - err = row_create_table_for_mysql( - table, algorithm, m_trx, false, - (fil_encryption_t)options->encryption, - options->encryption_key_id); + /* Temp-table are maintained in memory and so + can_be_evicted is FALSE. */ + mem_heap_t* temp_table_heap; + temp_table_heap = mem_heap_create(256); + + dict_table_add_to_cache( + table, FALSE, temp_table_heap); + + DBUG_EXECUTE_IF("ib_ddl_crash_during_create2", + DBUG_SUICIDE();); + + mem_heap_free(temp_table_heap); } + } else { + if (err == DB_SUCCESS) { + err = row_create_table_for_mysql( + table, m_trx, false, + (fil_encryption_t)options->encryption, + (ulint)options->encryption_key_id); - if (err == DB_IO_NO_PUNCH_HOLE_FS) { - - ut_ad(!dict_table_in_shared_tablespace(table)); - - push_warning_printf( - m_thd, - Sql_condition::WARN_LEVEL_WARN, - HA_ERR_UNSUPPORTED, - "InnoDB: Punch hole not supported by the " - "file system or the tablespace page size " - "is not large enough. Compression disabled"); - - err = DB_SUCCESS; } DBUG_EXECUTE_IF("ib_crash_during_create_for_encryption", @@ -12631,7 +12125,7 @@ create_table_info_t::create_option_data_directory_is_valid() && m_create_info->data_file_name[0] != '\0'); /* Use DATA DIRECTORY only with file-per-table. */ - if (!m_use_shared_space && !m_allow_file_per_table) { + if (!m_allow_file_per_table) { push_warning( m_thd, Sql_condition::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, @@ -12656,274 +12150,8 @@ create_table_info_t::create_option_data_directory_is_valid() return(is_valid); } - -#ifdef MYSQL_TABLESPACES -#define IDENT_NAME_OK 0 -static int check_tablespace_name(const char *name) -{ - CHARSET_INFO *cs= system_charset_info; - return cs->cset->numchars(cs, name, name + strlen(name)) > NAME_CHAR_LEN; -} - - -/** Validate the tablespace name provided for a tablespace DDL -@param[in] name A proposed tablespace name -@param[in] for_table Caller is putting a table here -@return MySQL handler error code like HA_... */ -static -int -validate_tablespace_name( - const char* name, - bool for_table) -{ - int err = 0; - - /* This prefix is reserved by InnoDB for use in internal tablespace names. */ - const char reserved_space_name_prefix[] = "innodb_"; - - if (check_tablespace_name(name) != IDENT_NAME_OK) { - err = HA_WRONG_CREATE_OPTION; - } - - /* The tablespace name cannot start with `innodb_`. */ - if (strlen(name) >= sizeof(reserved_space_name_prefix) - 1 - && 0 == memcmp(name, reserved_space_name_prefix, - sizeof(reserved_space_name_prefix) - 1)) { - - /* Use a different message for reserved names */ - if (0 == strcmp(name, reserved_file_per_table_space_name) - || 0 == strcmp(name, reserved_system_space_name) - || 0 == strcmp(name, reserved_temporary_space_name)) { - /* Allow these names if the caller is putting a - table into one of these by CREATE/ALTER TABLE */ - if (!for_table) { - my_printf_error( - ER_WRONG_TABLESPACE_NAME, - "InnoDB: `%s` is a reserved" - " tablespace name.", - MYF(0), name); - err = HA_WRONG_CREATE_OPTION; - } - } else { - my_printf_error(ER_WRONG_TABLESPACE_NAME, - "InnoDB: A general tablespace" - " name cannot start with `%s`.", - MYF(0), reserved_space_name_prefix); - err = HA_WRONG_CREATE_OPTION; - } - } - - /* The tablespace name cannot contain a '/'. */ - if (memchr(name, '/', strlen(name)) != NULL) { - my_printf_error(ER_WRONG_TABLESPACE_NAME, - "InnoDB: A general tablespace name cannot" - " contain '/'.", MYF(0)); - err = HA_WRONG_CREATE_OPTION; - } - - return(err); -} - -/** Validate TABLESPACE option. -@return true if valid, false if not. */ -bool -create_table_info_t::create_option_tablespace_is_valid() -{ - if (!m_use_shared_space) { - return(true); - } - - if (0 != validate_tablespace_name(m_create_info->tablespace, true)) { - return(false); - } - - /* Look up the tablespace name in the fil_system. */ - ulint space_id = fil_space_get_id_by_name( - m_create_info->tablespace); - - if (space_id == ULINT_UNDEFINED) { - my_printf_error(ER_TABLESPACE_MISSING, - "InnoDB: A general tablespace named" - " `%s` cannot be found.", MYF(0), - m_create_info->tablespace); - return(false); - } - - /* Cannot add a second table to a file-per-table tablespace. */ - ulint fsp_flags = fil_space_get_flags(space_id); - if (fsp_is_file_per_table(space_id, fsp_flags)) { - my_printf_error(ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: Tablespace `%s` is file-per-table so no" - " other table can be added to it.", MYF(0), - m_create_info->tablespace); - return(false); - } - - /* If TABLESPACE=innodb_file_per_table this function is not called - since tablespace_is_shared_space() will return false. Any other - tablespace is incompatible with the DATA DIRECTORY phrase. - On any ALTER TABLE that contains a DATA DIRECTORY, MySQL will issue - a warning like " option ignored." The check below is - needed for CREATE TABLE only. ALTER TABLE may be moving remote - file-per-table table to a general tablespace, in which case the - create_info->data_file_name is not null. */ - bool is_create_table = (thd_sql_command(m_thd) == SQLCOM_CREATE_TABLE); - if (is_create_table - && m_create_info->data_file_name != NULL - && m_create_info->data_file_name[0] != '\0') { - my_printf_error(ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: DATA DIRECTORY cannot be used" - " with a TABLESPACE assignment.", MYF(0)); - return(false); - } - - /* Temp tables only belong in temp tablespaces. */ - if (m_create_info->options & HA_LEX_CREATE_TMP_TABLE) { - if (!FSP_FLAGS_GET_TEMPORARY(fsp_flags)) { - my_printf_error(ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: Tablespace `%s` cannot contain" - " TEMPORARY tables.", MYF(0), - m_create_info->tablespace); - return(false); - } - - /* Restrict Compressed Temporary General tablespaces. */ - if (m_create_info->key_block_size - || m_create_info->row_type == ROW_TYPE_COMPRESSED) { - my_printf_error(ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: Temporary tablespace `%s` cannot" - " contain COMPRESSED tables.", MYF(0), - m_create_info->tablespace); - return(false); - } - } else if (FSP_FLAGS_GET_TEMPORARY(fsp_flags)) { - my_printf_error(ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: Tablespace `%s` can only contain" - " TEMPORARY tables.", MYF(0), - m_create_info->tablespace); - return(false); - } - - /* Make sure the physical page size of the table matches the - file block size of the tablespace. */ - ulint block_size_needed; - bool table_is_compressed; - if (m_create_info->key_block_size) { - block_size_needed = m_create_info->key_block_size * 1024; - table_is_compressed = true; - } else if (m_create_info->row_type == ROW_TYPE_COMPRESSED) { - block_size_needed = ut_min( - UNIV_PAGE_SIZE / 2, - static_cast(UNIV_ZIP_SIZE_MAX)); - table_is_compressed = true; - } else { - block_size_needed = UNIV_PAGE_SIZE; - table_is_compressed = false; - } - - const page_size_t page_size(fsp_flags); - - /* The compression code needs some work in order for a general - tablespace to contain both compressed and non-compressed tables - together in the same tablespace. The problem seems to be that - each page is either compressed or not based on the fsp flags, - which is shared by all tables in that general tablespace. */ - if (table_is_compressed && page_size.physical() == UNIV_PAGE_SIZE) { - my_printf_error(ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: Tablespace `%s` cannot contain a" - " COMPRESSED table", MYF(0), - m_create_info->tablespace); - return(false); - } - - if (block_size_needed != page_size.physical()) { - my_printf_error(ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: Tablespace `%s` uses block size " ULINTPF - " and cannot contain a table with physical" - " page size " ULINTPF, MYF(0), - m_create_info->tablespace, - page_size.physical(), - block_size_needed); - return(false); - } - - return(true); -} -#endif - -#ifdef MYSQL_COMPRESSION -/** Validate the COPMRESSION option. -@return true if valid, false if not. */ -bool -create_table_info_t::create_option_compression_is_valid() -{ - dberr_t err; - Compression compression; - - if (m_create_info->compress.length == 0) { - return(true); - } - - err = Compression::check(m_create_info->compress.str, &compression); - - if (err == DB_UNSUPPORTED) { - push_warning_printf( - m_thd, - Sql_condition::WARN_LEVEL_WARN, - ER_UNSUPPORTED_EXTENSION, - "InnoDB: Unsupported compression algorithm '%s'", - m_create_info->compress.str); - return(false); - } - - /* Allow Compression=NONE on any tablespace or row format. */ - if (compression.m_type == Compression::NONE) { - return(true); - } - - static char intro[] = "InnoDB: Page Compression is not supported"; - - if (m_create_info->key_block_size != 0 - || m_create_info->row_type == ROW_TYPE_COMPRESSED) { - push_warning_printf( - m_thd, Sql_condition::WARN_LEVEL_WARN, - ER_UNSUPPORTED_EXTENSION, - "%s with row_format=compressed or" - " key_block_size > 0", intro); - return(false); - } - - if (m_create_info->options & HA_LEX_CREATE_TMP_TABLE) { - push_warning_printf( - m_thd, Sql_condition::WARN_LEVEL_WARN, - HA_ERR_UNSUPPORTED, - "%s for temporary tables", intro); - return(false); - } - - if (tablespace_is_general_space(m_create_info)) { - push_warning_printf( - m_thd, Sql_condition::WARN_LEVEL_WARN, - HA_ERR_UNSUPPORTED, - "%s for shared general tablespaces", intro); - return(false); - } - - /* The only non-file-per-table tablespace left is the system space. */ - if (!m_use_file_per_table) { - push_warning_printf( - m_thd, Sql_condition::WARN_LEVEL_WARN, - HA_ERR_UNSUPPORTED, - "%s for the system tablespace", intro); - return(false); - } - - return(true); -} -#endif /* MYSQL_COMPRESSION */ - /** Validate the create options. Check that the options KEY_BLOCK_SIZE, -ROW_FORMAT, DATA DIRECTORY, TEMPORARY & TABLESPACE are compatible with +ROW_FORMAT, DATA DIRECTORY, TEMPORARY are compatible with each other and other settings. These CREATE OPTIONS are not validated here unless innodb_strict_mode is on. With strict mode, this function will report each problem it finds using a custom message with error @@ -12936,29 +12164,24 @@ create_table_info_t::create_options_are_invalid() const char* ret = NULL; enum row_type row_format = m_create_info->row_type; + const bool is_temp + = m_create_info->options & HA_LEX_CREATE_TMP_TABLE; ut_ad(m_thd != NULL); - ut_ad(m_create_info != NULL); -#ifdef MYSQL_TABLESPACES - /* The TABLESPACE designation on a CREATE TABLE is not subject to - non-strict-mode. If it is incorrect or is incompatible with other - options, then we will return an error. Make sure the tablespace exists - and is compatible with this table */ - if (!create_option_tablespace_is_valid()) { - return("TABLESPACE"); - } -#endif - - /* If innodb_strict_mode is not set don't do any more validation. - Also, if this table is being put into a shared general tablespace - we ALWAYS act like strict mode is ON. */ - if (!m_use_shared_space && !(THDVAR(m_thd, strict_mode))) { + /* If innodb_strict_mode is not set don't do any more validation. */ + if (!THDVAR(m_thd, strict_mode)) { return(NULL); } /* Check if a non-zero KEY_BLOCK_SIZE was specified. */ if (has_key_block_size) { + if (is_temp) { + my_error(ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE, + MYF(0)); + return("KEY_BLOCK_SIZE"); + } + switch (m_create_info->key_block_size) { ulint kbs_max; case 1: @@ -12984,11 +12207,6 @@ create_table_info_t::create_options_are_invalid() ret = "KEY_BLOCK_SIZE"; } - /* The following checks do not appy to shared tablespaces */ - if (m_use_shared_space) { - break; - } - /* Valid KEY_BLOCK_SIZE, check its dependencies. */ if (!m_allow_file_per_table) { push_warning( @@ -13023,47 +12241,39 @@ create_table_info_t::create_options_are_invalid() other incompatibilities. */ switch (row_format) { case ROW_TYPE_COMPRESSED: - if (!m_use_shared_space) { - if (!m_allow_file_per_table) { - push_warning_printf( - m_thd, Sql_condition::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: ROW_FORMAT=%s requires" - " innodb_file_per_table.", - get_row_format_name(row_format)); - ret = "ROW_FORMAT"; - } - if (srv_file_format < UNIV_FORMAT_B) { - push_warning_printf( - m_thd, Sql_condition::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: ROW_FORMAT=%s requires" - " innodb_file_format > Antelope.", - get_row_format_name(row_format)); - ret = "ROW_FORMAT"; - } + if (is_temp) { + my_error(ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE, + MYF(0)); + return("ROW_FORMAT"); + } + if (!m_allow_file_per_table) { + push_warning_printf( + m_thd, Sql_condition::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: ROW_FORMAT=%s requires" + " innodb_file_per_table.", + get_row_format_name(row_format)); + ret = "ROW_FORMAT"; + } + if (srv_file_format < UNIV_FORMAT_B) { + push_warning_printf( + m_thd, Sql_condition::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: ROW_FORMAT=%s requires" + " innodb_file_format > Antelope.", + get_row_format_name(row_format)); + ret = "ROW_FORMAT"; } break; case ROW_TYPE_DYNAMIC: - if (!m_use_shared_space) { - if (!m_allow_file_per_table) { - push_warning_printf( - m_thd, Sql_condition::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: ROW_FORMAT=%s requires" - " innodb_file_per_table.", - get_row_format_name(row_format)); - ret = "ROW_FORMAT"; - } - if (srv_file_format < UNIV_FORMAT_B) { - push_warning_printf( - m_thd, Sql_condition::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: ROW_FORMAT=%s requires" - " innodb_file_format > Antelope.", - get_row_format_name(row_format)); - ret = "ROW_FORMAT"; - } + if (!is_temp && srv_file_format < UNIV_FORMAT_B) { + push_warning_printf( + m_thd, Sql_condition::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: ROW_FORMAT=%s requires" + " innodb_file_format > Antelope.", + get_row_format_name(row_format)); + ret = "ROW_FORMAT"; } /* FALLTRHOUGH */ case ROW_TYPE_COMPACT: @@ -13121,25 +12331,6 @@ create_table_info_t::create_options_are_invalid() } } -#ifdef MYSQL_COMPRESSION - /* Validate the page compression parameter. */ - if (!create_option_compression_is_valid()) { - return("COMPRESSION"); - } - - /* Check the encryption option. */ - if (ret == NULL && m_create_info->encrypt_type.length > 0) { - dberr_t err; - - err = Encryption::validate(m_create_info->encrypt_type.str); - - if (err == DB_UNSUPPORTED) { - my_error(ER_INVALID_ENCRYPTION_OPTION, MYF(0)); - ret = "ENCRYPTION"; - } - } -#endif - return(ret); } @@ -13151,8 +12342,22 @@ create_table_info_t::check_table_options() { enum row_type row_format = m_form->s->row_type; ha_table_option_struct *options= m_form->s->option_struct; - atomic_writes_t awrites = (atomic_writes_t)options->atomic_writes; fil_encryption_t encrypt = (fil_encryption_t)options->encryption; + bool should_encrypt = (encrypt == FIL_SPACE_ENCRYPTION_ON); + + /* Currently we do not support encryption for + spatial indexes thus do not allow creating table with forced + encryption */ + for(ulint i = 0; i < m_form->s->keys; i++) { + const KEY* key = m_form->key_info + i; + if (key->flags & HA_SPATIAL && should_encrypt) { + push_warning_printf(m_thd, Sql_condition::WARN_LEVEL_WARN, + HA_ERR_UNSUPPORTED, + "InnoDB: ENCRYPTED=ON not supported for table because " + "it contains spatial index."); + return "ENCRYPTED"; + } + } if (encrypt != FIL_SPACE_ENCRYPTION_DEFAULT && !m_allow_file_per_table) { push_warning( @@ -13285,19 +12490,6 @@ create_table_info_t::check_table_options() } } - /* Check atomic writes requirements */ - if (awrites == ATOMIC_WRITES_ON || - (awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes)) { - if (!m_allow_file_per_table) { - push_warning( - m_thd, Sql_condition::WARN_LEVEL_WARN, - HA_WRONG_CREATE_OPTION, - "InnoDB: ATOMIC_WRITES requires" - " innodb_file_per_table."); - return "ATOMIC_WRITES"; - } - } - return NULL; } @@ -13314,24 +12506,16 @@ ha_innobase::update_create_info( create_info->auto_increment_value = stats.auto_increment_value; } + if (dict_table_is_temporary(m_prebuilt->table)) { + return; + } + /* Update the DATA DIRECTORY name from SYS_DATAFILES. */ dict_get_and_save_data_dir_path(m_prebuilt->table, false); if (m_prebuilt->table->data_dir_path) { create_info->data_file_name = m_prebuilt->table->data_dir_path; } - - /* Update the TABLESPACE name from the Data Dictionary. */ - dict_get_and_save_space_name(m_prebuilt->table, false); - - /* Put this tablespace name into the create_info structure so that - SHOW CREATE TABLE will display TABLESPACE=name. This also affects - an ALTER TABLE which must know the current TABLESPACE so that the - table will stay there. */ - if (m_prebuilt->table->tablespace != NULL - && create_info->tablespace == NULL) { - create_info->tablespace = m_prebuilt->table->tablespace; - } } /*****************************************************************//** @@ -13350,8 +12534,7 @@ innobase_fts_load_stopword( THDVAR(thd, ft_enable_stopword), FALSE)); } -/** Parse the table name into normal name and either temp path or remote path -if needed. +/** Parse the table name into normal name and remote path if needed. @param[in] name Table name (db/table or full path). @return 0 if successful, otherwise, error number */ int @@ -13384,18 +12567,7 @@ create_table_info_t::parse_table_name( } #endif - m_temp_path[0] = '\0'; m_remote_path[0] = '\0'; - m_tablespace[0] = '\0'; - - /* A full path is provided by the server for TEMPORARY tables not - targeted for a tablespace or when DATA DIRECTORY is given. - So these two are not compatible. Likewise, DATA DIRECTORY is not - compatible with a TABLESPACE assignment. */ - if ((m_create_info->options & HA_LEX_CREATE_TMP_TABLE) - && !m_use_shared_space) { - strncpy(m_temp_path, name, FN_REFLEN - 1); - } /* Make sure DATA DIRECTORY is compatible with other options and set the remote path. In the case of either; @@ -13424,21 +12596,11 @@ create_table_info_t::parse_table_name( "INDEX DIRECTORY"); } - /* The TABLESPACE designation has already been validated by - create_option_tablespace_is_valid() irregardless of strict-mode. - So it only needs to be copied now. */ - if (m_use_shared_space) { - strncpy(m_tablespace, m_create_info->tablespace, - NAME_LEN - 1); - } - DBUG_RETURN(0); } /** Determine InnoDB table flags. If strict_mode=OFF, this will adjust the flags to what should be assumed. -However, if an existing general tablespace is being targeted, we will NOT -assume anything or adjust these flags. @retval true if successful, false if error */ bool create_table_info_t::innobase_table_flags() @@ -13446,11 +12608,14 @@ create_table_info_t::innobase_table_flags() DBUG_ENTER("innobase_table_flags"); const char* fts_doc_id_index_bad = NULL; - bool zip_allowed = true; ulint zip_ssize = 0; enum row_type row_type; rec_format_t innodb_row_format = get_row_format(innodb_default_row_format); + const bool is_temp + = m_create_info->options & HA_LEX_CREATE_TMP_TABLE; + bool zip_allowed + = !is_temp; const ulint zip_ssize_max = ut_min(static_cast(UNIV_PAGE_SSIZE_MAX), @@ -13469,40 +12634,6 @@ create_table_info_t::innobase_table_flags() m_flags = 0; m_flags2 = 0; -#ifdef MYSQL_COMPRESSION - /* Validate the page compression parameter. */ - if (!create_option_compression_is_valid()) { - /* No need to do anything. Warnings were issued. - The compresion setting will be ignored later. - If inodb_strict_mode=ON, this is called twice unless - there was a problem before. - If inodb_strict_mode=OFF, this is the only call. */ - } -#endif - -#ifdef MYSQL_ENCRYPTION - /* Validate the page encryption parameter. */ - if (m_create_info->encrypt_type.length > 0) { - - const char* encryption = m_create_info->encrypt_type.str; - - if (Encryption::validate(encryption) != DB_SUCCESS) { - /* Incorrect encryption option */ - my_error(ER_INVALID_ENCRYPTION_OPTION, MYF(0)); - DBUG_RETURN(false); - } - - if (m_use_shared_space - || (m_create_info->options & HA_LEX_CREATE_TMP_TABLE)) { - if (!Encryption::is_none(encryption)) { - /* Can't encrypt shared tablespace */ - my_error(ER_TABLESPACE_CANNOT_ENCRYPT, MYF(0)); - DBUG_RETURN(false); - } - } - } -#endif /* MYSQL_ENCRYPTION */ - /* Check if there are any FTS indexes defined on this table. */ for (uint i = 0; i < m_form->s->keys; i++) { const KEY* key = &m_form->key_info[i]; @@ -13512,8 +12643,7 @@ create_table_info_t::innobase_table_flags() /* We don't support FTS indexes in temporary tables. */ - if (m_create_info->options & HA_LEX_CREATE_TMP_TABLE) { - + if (is_temp) { my_error(ER_INNODB_NO_FT_TEMP_TABLE, MYF(0)); DBUG_RETURN(false); } @@ -13521,12 +12651,6 @@ create_table_info_t::innobase_table_flags() if (fts_doc_id_index_bad) { goto index_bad; } - } else if (key->flags & HA_SPATIAL) { - if (m_create_info->options & HA_LEX_CREATE_TMP_TABLE - && !m_use_file_per_table) { - my_error(ER_TABLE_CANT_HANDLE_SPKEYS, MYF(0)); - DBUG_RETURN(false); - } } if (innobase_strcasecmp(key->name, FTS_DOC_ID_INDEX_NAME)) { @@ -13566,7 +12690,14 @@ index_bad: } /* Make sure compressed row format is allowed. */ - if (!m_allow_file_per_table && !m_use_shared_space) { + if (is_temp) { + push_warning( + m_thd, Sql_condition::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: KEY_BLOCK_SIZE is ignored" + " for TEMPORARY TABLE."); + zip_allowed = false; + } else if (!m_allow_file_per_table) { push_warning( m_thd, Sql_condition::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, @@ -13575,8 +12706,7 @@ index_bad: zip_allowed = false; } - if (file_format_allowed < UNIV_FORMAT_B - && !m_use_shared_space) { + if (file_format_allowed < UNIV_FORMAT_B) { push_warning( m_thd, Sql_condition::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, @@ -13637,37 +12767,29 @@ index_bad: innodb_row_format = REC_FORMAT_COMPACT; break; case ROW_TYPE_COMPRESSED: - /* ROW_FORMAT=COMPRESSED requires file_per_table and - file_format=Barracuda unless there is a target tablespace. */ - if (!m_allow_file_per_table - && !m_use_shared_space) { + if (is_temp) { + push_warning_printf( + m_thd, Sql_condition::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: ROW_FORMAT=%s is ignored for" + " TEMPORARY TABLE.", + get_row_format_name(row_type)); + } else if (!m_allow_file_per_table) { push_warning_printf( m_thd, Sql_condition::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, "InnoDB: ROW_FORMAT=COMPRESSED requires" " innodb_file_per_table."); - } else if (file_format_allowed == UNIV_FORMAT_A - && !m_use_shared_space) { + } else if (file_format_allowed == UNIV_FORMAT_A) { push_warning_printf( m_thd, Sql_condition::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, "InnoDB: ROW_FORMAT=COMPRESSED requires" " innodb_file_format > Antelope."); - } else { - switch(row_type) { - case ROW_TYPE_COMPRESSED: - innodb_row_format = REC_FORMAT_COMPRESSED; - break; - case ROW_TYPE_DYNAMIC: - innodb_row_format = REC_FORMAT_DYNAMIC; - break; - default: - /* Not possible, avoid compiler warning */ - break; - } - break; /* Correct row_format */ + innodb_row_format = REC_FORMAT_COMPRESSED; + break; } zip_allowed = false; /* fall through to set row_type = DYNAMIC */ @@ -13695,27 +12817,27 @@ index_bad: zip_allowed = false; } + ut_ad(!is_temp || !zip_allowed); + ut_ad(!is_temp || innodb_row_format != REC_FORMAT_COMPRESSED); + /* Set the table flags */ if (!zip_allowed) { zip_ssize = 0; } - if (m_create_info->options & HA_LEX_CREATE_TMP_TABLE) { + if (is_temp) { m_flags2 |= DICT_TF2_TEMPORARY; + } else if (m_use_file_per_table) { + m_flags2 |= DICT_TF2_USE_FILE_PER_TABLE; } /* Set the table flags */ dict_tf_set(&m_flags, innodb_row_format, zip_ssize, - m_use_data_dir, m_use_shared_space, + m_use_data_dir, options->page_compressed, options->page_compression_level == 0 ? - default_compression_level : options->page_compression_level, - options->atomic_writes); - - if (m_use_file_per_table) { - ut_ad(!m_use_shared_space); - m_flags2 |= DICT_TF2_USE_FILE_PER_TABLE; - } + default_compression_level : static_cast(options->page_compression_level), + 0); /* Set the flags2 when create table or alter tables */ m_flags2 |= DICT_TF2_FTS_AUX_HEX_NAME; @@ -13899,42 +13021,25 @@ void create_table_info_t::set_tablespace_type( bool table_being_altered_is_file_per_table) { - /* Note whether this table will be created using a shared, - general or system tablespace. */ - m_use_shared_space = tablespace_is_shared_space(m_create_info); - /** Allow file_per_table for this table either because: 1) the setting innodb_file_per_table=on, - 2) the table being altered is currently file_per_table - 3) explicitly requested by tablespace=innodb_file_per_table. */ + 2) the table being altered is currently file_per_table */ m_allow_file_per_table = m_innodb_file_per_table - || table_being_altered_is_file_per_table - || tablespace_is_file_per_table(m_create_info); - - /* All noncompresed temporary tables will be put into the - system temporary tablespace. */ - bool is_noncompressed_temporary = - m_create_info->options & HA_LEX_CREATE_TMP_TABLE - && !(m_create_info->row_type == ROW_TYPE_COMPRESSED - || m_create_info->key_block_size > 0); + || table_being_altered_is_file_per_table; /* Ignore the current innodb-file-per-table setting if we are - creating a temporary, non-compressed table or if the - TABLESPACE= phrase is using an existing shared tablespace. */ + creating a temporary table. */ m_use_file_per_table = m_allow_file_per_table - && !is_noncompressed_temporary - && !m_use_shared_space; + && !(m_create_info->options & HA_LEX_CREATE_TMP_TABLE); /* DATA DIRECTORY must have m_use_file_per_table but cannot be used with TEMPORARY tables. */ m_use_data_dir = m_use_file_per_table - && !(m_create_info->options & HA_LEX_CREATE_TMP_TABLE) && (m_create_info->data_file_name != NULL) && (m_create_info->data_file_name[0] != '\0'); - ut_ad(!(m_use_shared_space && m_use_data_dir)); } /** Initialize the create_table_info_t object. @@ -13970,7 +13075,7 @@ create_table_info_t::initialize() /* In case MySQL calls this in the middle of a SELECT query, release possible adaptive hash latch to avoid deadlocks of threads */ - trx_search_latch_release_if_reserved(parent_trx); + trx_assert_no_search_latch(parent_trx); DBUG_RETURN(0); } @@ -14360,9 +13465,7 @@ ha_innobase::create( { int error; char norm_name[FN_REFLEN]; /* {database}/{tablename} */ - char temp_path[FN_REFLEN]; /* Absolute path of temp frm */ char remote_path[FN_REFLEN]; /* Absolute path of table */ - char tablespace[NAME_LEN]; /* Tablespace name identifier */ trx_t* trx; DBUG_ENTER("ha_innobase::create"); @@ -14370,9 +13473,7 @@ ha_innobase::create( form, create_info, norm_name, - temp_path, - remote_path, - tablespace); + remote_path); /* Initialize the object. */ if ((error = info.initialize())) { @@ -14465,16 +13566,6 @@ ha_innobase::discard_or_import_tablespace( DBUG_RETURN(HA_ERR_TABLE_NEEDS_UPGRADE); } - if (DICT_TF_HAS_SHARED_SPACE(dict_table->flags)) { - my_printf_error(ER_NOT_ALLOWED_COMMAND, - "InnoDB: Cannot %s table `%s` because it is in" - " a general tablespace. It must be file-per-table.", - MYF(0), discard ? "discard" : "import", - dict_table->name.m_name); - - DBUG_RETURN(HA_ERR_NOT_ALLOWED_COMMAND); - } - TrxInInnoDB trx_in_innodb(m_prebuilt->trx); if (trx_in_innodb.is_aborted()) { @@ -14807,410 +13898,6 @@ ha_innobase::delete_table( DBUG_RETURN(convert_error_code_to_mysql(err, 0, NULL)); } -#ifdef MYSQL_TABLESPACES -/** Validate the parameters in st_alter_tablespace -before using them in InnoDB tablespace functions. -@param[in] thd Connection -@param[in] alter_info How to do the command. -@return MySQL handler error code like HA_... */ -static -int -validate_create_tablespace_info( - THD* thd, - st_alter_tablespace* alter_info) -{ - ulint space_id; - - /* The parser ensures that these fields are provided. */ - ut_a(alter_info->tablespace_name); - ut_a(alter_info->data_file_name); - - if (high_level_read_only) { - return(HA_ERR_INNODB_READ_ONLY); - } - - /* From this point forward, push a warning for each problem found - instead of returning immediately*/ - int error = validate_tablespace_name( - alter_info->tablespace_name, false); - - /* Make sure the tablespace is not already open. */ - space_id = fil_space_get_id_by_name(alter_info->tablespace_name); - if (space_id != ULINT_UNDEFINED) { - my_printf_error(ER_TABLESPACE_EXISTS, - "InnoDB: A tablespace named `%s`" - " already exists.", MYF(0), - alter_info->tablespace_name); - error = HA_ERR_TABLESPACE_EXISTS; - } - if (alter_info->file_block_size) { - /* Check for a bad file block size. */ - if (!ut_is_2pow(alter_info->file_block_size) - || alter_info->file_block_size < UNIV_ZIP_SIZE_MIN - || alter_info->file_block_size > UNIV_PAGE_SIZE_MAX) { - my_printf_error(ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB does not support" - " FILE_BLOCK_SIZE=%llu", MYF(0), - alter_info->file_block_size); - error = HA_WRONG_CREATE_OPTION; - - /* Don't allow a file block size larger than UNIV_PAGE_SIZE. */ - } else if (alter_info->file_block_size > UNIV_PAGE_SIZE) { - my_printf_error(ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: Cannot create a tablespace" - " with FILE_BLOCK_SIZE=%llu because" - " INNODB_PAGE_SIZE=%lu.", MYF(0), - alter_info->file_block_size, - UNIV_PAGE_SIZE); - error = HA_WRONG_CREATE_OPTION; - - /* Don't allow a compressed tablespace when page size > 16k. */ - } else if (UNIV_PAGE_SIZE > UNIV_PAGE_SIZE_DEF - && alter_info->file_block_size != UNIV_PAGE_SIZE) { - my_printf_error(ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: Cannot create a COMPRESSED" - " tablespace when innodb_page_size >" - " 16k.", MYF(0)); - error = HA_WRONG_CREATE_OPTION; - } - } - - /* Validate the ADD DATAFILE name. */ - char* filepath = mem_strdup(alter_info->data_file_name); - os_normalize_path(filepath); - - /* It must end with '.ibd' and contain a basename of at least - 1 character before the.ibd extension. */ - ulint dirname_len = dirname_length(filepath); - const char* basename = filepath + dirname_len; - ulint basename_len = strlen(basename); - if (basename_len < 5) { - my_error(ER_WRONG_FILE_NAME, MYF(0), - alter_info->data_file_name); - ut_free(filepath); - return(HA_WRONG_CREATE_OPTION); - } - - if (memcmp(&basename[basename_len - 4], DOT_IBD, 5)) { - my_error(ER_WRONG_FILE_NAME, MYF(0), - alter_info->data_file_name); - my_printf_error(ER_WRONG_FILE_NAME, - "An IBD filepath must end with `.ibd`.", - MYF(0)); - ut_free(filepath); - return(HA_WRONG_CREATE_OPTION); - } - - /* Do not allow an invalid colon in the file name. */ - const char* colon = strchr(filepath, ':'); - if (colon != NULL) { -#ifdef _WIN32 - /* Do not allow names like "C:name.ibd" because it - specifies the "C:" drive but allows a relative location. - It should be like "c:\". If a single colon is used it must - be the second byte the the third byte must be a separator. */ - if (colon != &filepath[1] - || (colon[1] != OS_PATH_SEPARATOR) - || NULL != strchr(&colon[1], ':')) { -#endif /* _WIN32 */ - my_error(ER_WRONG_FILE_NAME, MYF(0), - alter_info->data_file_name); - my_printf_error(ER_WRONG_FILE_NAME, - "Invalid use of ':'.", MYF(0)); - ut_free(filepath); - return(HA_WRONG_CREATE_OPTION); -#ifdef _WIN32 - } -#endif /* _WIN32 */ - } - -#ifndef _WIN32 - /* On Non-Windows platforms, '\\' is a valid file name character. - But for InnoDB datafiles, we always assume it is a directory - separator and convert these to '/' */ - if (strchr(alter_info->data_file_name, '\\') != NULL) { - ib::warn() << "Converting backslash to forward slash in" - " ADD DATAFILE " << alter_info->data_file_name; - } -#endif /* _WIN32 */ - - /* The directory path must be pre-existing. */ - Folder folder(filepath, dirname_len); - ut_free(filepath); - if (!folder.exists()) { - my_error(ER_WRONG_FILE_NAME, MYF(0), - alter_info->data_file_name); - my_printf_error(ER_WRONG_FILE_NAME, - "The directory does not exist.", MYF(0)); - return(HA_WRONG_CREATE_OPTION); - } - - /* CREATE TABLESPACE...ADD DATAFILE can be inside but not under - the datadir.*/ - if (folder_mysql_datadir > folder) { - my_error(ER_WRONG_FILE_NAME, MYF(0), - alter_info->data_file_name); - my_printf_error(ER_WRONG_FILE_NAME, - "CREATE TABLESPACE data file" - " cannot be under the datadir.", MYF(0)); - error = HA_WRONG_CREATE_OPTION; - } - - return(error); -} - -/** CREATE a tablespace. -@param[in] hton Handlerton of InnoDB -@param[in] thd Connection -@param[in] alter_info How to do the command -@return MySQL error code*/ -static -int -innobase_create_tablespace( - handlerton* hton, - THD* thd, - st_alter_tablespace* alter_info) -{ - trx_t* trx; - int error=0; - Tablespace tablespace; - - DBUG_ENTER("innobase_create_tablespace"); - DBUG_ASSERT(hton == innodb_hton_ptr); - - /* Be sure the input parameters are valid before continuing. */ - error = validate_create_tablespace_info(thd, alter_info); - if (error) { - DBUG_RETURN(error); - } - - /* Create the tablespace object. */ - tablespace.set_name(alter_info->tablespace_name); - - dberr_t err = tablespace.add_datafile(alter_info->data_file_name); - if (err != DB_SUCCESS) { - DBUG_RETURN(convert_error_code_to_mysql(err, 0, NULL)); - } - - /* Get the transaction associated with the current thd and make - sure it will not block this DDL. */ - trx_t* parent_trx = check_trx_exists(thd); - - /* In case MySQL calls this in the middle of a SELECT - query, release possible adaptive hash latch to avoid - deadlocks of threads */ - trx_search_latch_release_if_reserved(parent_trx); - - /* Allocate a new transaction for this DDL */ - trx = innobase_trx_allocate(thd); - ++trx->will_lock; - - trx_start_if_not_started(trx, true); - row_mysql_lock_data_dictionary(trx); - - /* In FSP_FLAGS, a zip_ssize of zero means that the tablespace - holds non-compresssed tables. A non-zero zip_ssize means that - the general tablespace can ONLY contain compressed tables. */ - ulint zip_size = static_cast(alter_info->file_block_size); - ut_ad(zip_size <= UNIV_PAGE_SIZE_MAX); - if (zip_size == 0) { - zip_size = UNIV_PAGE_SIZE; - } - - bool zipped = (zip_size != UNIV_PAGE_SIZE); - page_size_t page_size(zip_size, UNIV_PAGE_SIZE, zipped); - bool atomic_blobs = page_size.is_compressed(); - - /* Create the filespace flags */ - ulint fsp_flags = fsp_flags_init( - page_size, /* page sizes and a flag if compressed */ - atomic_blobs, /* needed only for compressed tables */ - false, /* This is not a file-per-table tablespace */ - true, /* This is a general shared tablespace */ - false, /* Temporary General Tablespaces not allowed */ - false, /* Page compression is not used. */ - 0, /* Page compression level 0 */ - ATOMIC_WRITES_DEFAULT); /* No atomic writes yet */ - - tablespace.set_flags(fsp_flags); - - err = dict_build_tablespace(&tablespace); - if (err != DB_SUCCESS) { - error = convert_error_code_to_mysql(err, 0, NULL); - trx_rollback_for_mysql(trx); - goto cleanup; - } - - innobase_commit_low(trx); - -cleanup: - row_mysql_unlock_data_dictionary(trx); - trx_free_for_mysql(trx); - - DBUG_RETURN(error); -} - -/** DROP a tablespace. -@param[in] hton Handlerton of InnoDB -@param[in] thd Connection -@param[in] alter_info How to do the command -@return MySQL error code*/ -static -int -innobase_drop_tablespace( - handlerton* hton, - THD* thd, - st_alter_tablespace* alter_info) -{ - trx_t* trx; - dberr_t err; - int error = 0; - ulint space_id; - - DBUG_ENTER("innobase_drop_tablespace"); - DBUG_ASSERT(hton == innodb_hton_ptr); - - if (srv_read_only_mode) { - DBUG_RETURN(HA_ERR_INNODB_READ_ONLY); - } - - error = validate_tablespace_name(alter_info->tablespace_name, false); - if (error != 0) { - DBUG_RETURN(error); - } - - /* Be sure that this tablespace is known and valid. */ - space_id = fil_space_get_id_by_name(alter_info->tablespace_name); - if (space_id == ULINT_UNDEFINED) { - - space_id = dict_space_get_id(alter_info->tablespace_name); - if (space_id == ULINT_UNDEFINED) { - DBUG_RETURN(HA_ERR_NO_SUCH_TABLE); - // DBUG_RETURN(HA_ERR_TABLESPACE_MISSING); - } - - /* The datafile is not open but the tablespace is in - sys_tablespaces, so we can try to drop the metadata. */ - } - - /* The tablespace can only be dropped if it is empty. */ - if (!dict_space_is_empty(space_id)) { - DBUG_RETURN(HA_ERR_TABLE_READONLY); - //DBUG_RETURN(HA_ERR_TABLESPACE_IS_NOT_EMPTY); - } - - /* Get the transaction associated with the current thd and make sure - it will not block this DDL. */ - trx_t* parent_trx = check_trx_exists(thd); - - /* In case MySQL calls this in the middle of a SELECT - query, release possible adaptive hash latch to avoid - deadlocks of threads */ - trx_search_latch_release_if_reserved(parent_trx); - - /* Allocate a new transaction for this DDL */ - trx = innobase_trx_allocate(thd); - ++trx->will_lock; - - trx_start_if_not_started(trx, true); - row_mysql_lock_data_dictionary(trx); - - /* Update SYS_TABLESPACES and SYS_DATAFILES */ - err = dict_delete_tablespace_and_datafiles(space_id, trx); - if (err != DB_SUCCESS) { - ib::error() << "Unable to delete the dictionary entries" - " for tablespace `" << alter_info->tablespace_name - << "`, Space ID " << space_id; - goto have_error; - } - - /* Delete the physical files, fil_space_t & fil_node_t entries. */ - err = fil_delete_tablespace(space_id, BUF_REMOVE_FLUSH_NO_WRITE); - switch (err) { - case DB_TABLESPACE_NOT_FOUND: - /* OK if the physical file is mising. - We deleted the metadata. */ - case DB_SUCCESS: - innobase_commit_low(trx); - break; - default: - ib::error() << "Unable to delete the tablespace `" - << alter_info->tablespace_name - << "`, Space ID " << space_id; -have_error: - error = convert_error_code_to_mysql(err, 0, NULL); - trx_rollback_for_mysql(trx); - } - - row_mysql_unlock_data_dictionary(trx); - trx_free_for_mysql(trx); - - DBUG_RETURN(error); -} - -/** This API handles CREATE, ALTER & DROP commands for InnoDB tablespaces. -@param[in] hton Handlerton of InnoDB -@param[in] thd Connection -@param[in] alter_info How to do the command -@return MySQL error code*/ -static -int -innobase_alter_tablespace( - handlerton* hton, - THD* thd, - st_alter_tablespace* alter_info) -{ - int error; /* return zero for success */ - DBUG_ENTER("innobase_alter_tablespace"); - - switch (alter_info->ts_cmd_type) { - case CREATE_TABLESPACE: - error = innobase_create_tablespace(hton, thd, alter_info); - break; - - case DROP_TABLESPACE: - error = innobase_drop_tablespace(hton, thd, alter_info); - break; - - default: - error = HA_ADMIN_NOT_IMPLEMENTED; - } - - if (error) { - /* These are the most common message params */ - const char* object_type = "TABLESPACE"; - const char* object = alter_info->tablespace_name; - - /* Modify those params as needed. */ - switch (alter_info->ts_cmd_type) { - case DROP_TABLESPACE: - ib_errf(thd, IB_LOG_LEVEL_ERROR, - ER_DROP_FILEGROUP_FAILED, - "%s %s", object_type, object); - break; - case CREATE_TABLESPACE: - ib_errf(thd, IB_LOG_LEVEL_ERROR, - ER_CREATE_FILEGROUP_FAILED, - "%s %s", object_type, object); - break; - case CREATE_LOGFILE_GROUP: - my_error(ER_ILLEGAL_HA_CREATE_OPTION, MYF(0), - innobase_hton_name, "LOGFILE GROUP"); - break; - case ALTER_TABLESPACE: - case ALTER_ACCESS_MODE_TABLESPACE: - case DROP_LOGFILE_GROUP: - case ALTER_LOGFILE_GROUP: - case CHANGE_FILE_TABLESPACE: - case TS_CMD_NOT_DEFINED: - break; - } - } - - DBUG_RETURN(error); -} -#endif /* MYSQL_TABLESPACES */ - /** Remove all tables in the named database inside InnoDB. @param[in] hton handlerton from InnoDB @param[in] path Database path; Inside InnoDB the name of the last @@ -15236,16 +13923,11 @@ innobase_drop_database( THD* thd = current_thd; - /* In the Windows plugin, thd = current_thd is always NULL */ - if (thd != NULL) { - trx_t* parent_trx = check_trx_exists(thd); + /* In case MySQL calls this in the middle of a SELECT + query, release possible adaptive hash latch to avoid + deadlocks of threads */ - /* In case MySQL calls this in the middle of a SELECT - query, release possible adaptive hash latch to avoid - deadlocks of threads */ - - trx_search_latch_release_if_reserved(parent_trx); - } + trx_assert_no_search_latch(check_trx_exists(thd)); ulint len = 0; char* ptr = strend(path) - 2; @@ -16095,7 +14777,7 @@ ha_innobase::info_low( m_prebuilt->trx->op_info = (char*)"returning various info to MariaDB"; - trx_search_latch_release_if_reserved(m_prebuilt->trx); + trx_assert_no_search_latch(m_prebuilt->trx); ib_table = m_prebuilt->table; DBUG_ASSERT(ib_table->n_ref_count > 0); @@ -16880,7 +15562,8 @@ ha_innobase::check( /* Restore the original isolation level */ m_prebuilt->trx->isolation_level = old_isolation_level; -#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# 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. */ @@ -16890,7 +15573,8 @@ ha_innobase::check( "InnoDB: The adaptive hash index is corrupted."); is_ok = false; } -#endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */ +# endif /* defined UNIV_AHI_DEBUG || defined UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ m_prebuilt->trx->op_info = ""; DBUG_RETURN(is_ok ? HA_ADMIN_OK : HA_ADMIN_CORRUPT); @@ -16927,7 +15611,7 @@ ha_innobase::update_table_comment( /* In case MySQL calls this in the middle of a SELECT query, release possible adaptive hash latch to avoid deadlocks of threads */ - trx_search_latch_release_if_reserved(m_prebuilt->trx); + trx_assert_no_search_latch(m_prebuilt->trx); #define SSTR( x ) reinterpret_cast< std::ostringstream & >( \ ( std::ostringstream() << std::dec << x ) ).str() @@ -16989,7 +15673,7 @@ ha_innobase::get_foreign_key_create_info(void) release possible adaptive hash latch to avoid deadlocks of threads */ - trx_search_latch_release_if_reserved(m_prebuilt->trx); + trx_assert_no_search_latch(m_prebuilt->trx); @@ -17953,7 +16637,7 @@ void innodb_export_status() /*==================*/ { - if (innodb_inited) { + if (srv_was_started) { srv_export_innodb_status(); } } @@ -17988,7 +16672,7 @@ innodb_show_status( trx_t* trx = check_trx_exists(thd); - trx_search_latch_release_if_reserved(trx); + trx_assert_no_search_latch(trx); innobase_srv_conc_force_exit_innodb(trx); @@ -19280,7 +17964,7 @@ innobase_xa_prepare( reserve the trx_sys->mutex, we have to release the search system latch first to obey the latching order. */ - trx_search_latch_release_if_reserved(trx); + trx_assert_no_search_latch(trx); innobase_srv_conc_force_exit_innodb(trx); @@ -19480,8 +18164,8 @@ ha_innobase::check_if_incompatible_data( /* Changes on engine specific table options requests a rebuild of the table. */ if (param_new->page_compressed != param_old->page_compressed || - param_new->page_compression_level != param_old->page_compression_level || - param_new->atomic_writes != param_old->atomic_writes) { + param_new->page_compression_level != param_old->page_compression_level) + { return(COMPATIBLE_DATA_NO); } @@ -20023,6 +18707,7 @@ innodb_internal_table_validate( return(ret); } +#ifdef BTR_CUR_HASH_ADAPT /****************************************************************//** Update the system variable innodb_adaptive_hash_index using the "saved" value. This function is registered as a callback with MySQL. */ @@ -20044,6 +18729,7 @@ innodb_adaptive_hash_index_update( btr_search_disable(true); } } +#endif /* BTR_CUR_HASH_ADAPT */ /****************************************************************//** Update the system variable innodb_cmp_per_index using the "saved" @@ -21555,13 +20241,8 @@ innodb_log_checksums_update( void* var_ptr, const void* save) { - my_bool check = *static_cast(var_ptr) - = *static_cast(save); - - /* Make sure we are the only log user */ - mutex_enter(&log_sys->mutex); - innodb_log_checksums_func_update(check); - mutex_exit(&log_sys->mutex); + *static_cast(var_ptr) = innodb_log_checksums_func_update( + thd, *static_cast(save)); } static SHOW_VAR innodb_status_variables_export[]= { @@ -21896,6 +20577,44 @@ wsrep_fake_trx_id( #endif /* WITH_WSREP */ +/** Update the innodb_use_trim parameter. +@param[in] thd thread handle +@param[in] var system variable +@param[out] var_ptr current value +@param[in] save immediate result from check function */ +static +void +innodb_use_trim_update( + THD* thd, + struct st_mysql_sys_var* var, + void* var_ptr, + const void* save) +{ + srv_use_trim = *static_cast(save); + + push_warning(thd, Sql_condition::WARN_LEVEL_WARN, + HA_ERR_WRONG_COMMAND, deprecated_use_trim); +} + +/** Update the innodb_instrument_sempahores parameter. +@param[in] thd thread handle +@param[in] var system variable +@param[out] var_ptr current value +@param[in] save immediate result from check function */ +static +void +innodb_instrument_semaphores_update( + THD* thd, + struct st_mysql_sys_var* var, + void* var_ptr, + const void* save) +{ + innodb_instrument_semaphores = *static_cast(save); + + push_warning(thd, Sql_condition::WARN_LEVEL_WARN, + HA_ERR_WRONG_COMMAND, deprecated_instrument_semaphores); +} + /* plugin options */ static MYSQL_SYSVAR_ENUM(checksum_algorithm, srv_checksum_algorithm, @@ -21948,12 +20667,13 @@ static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite, static MYSQL_SYSVAR_BOOL(use_atomic_writes, innobase_use_atomic_writes, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, - "Prevent partial page writes, via atomic writes." - "The option is used to prevent partial writes in case of a crash/poweroff, " - "as faster alternative to doublewrite buffer." - "Currently this option works only " - "on Linux only with FusionIO device, and directFS filesystem.", - NULL, NULL, FALSE); + "Enable atomic writes, instead of using the doublewrite buffer, for files " + "on devices that supports atomic writes. " + "To use this option one must use " + "file_per_table=1, flush_method=O_DIRECT and use_fallocate=1. " + "This option only works on Linux with either FusionIO cards using " + "the directFS filesystem or with Shannon cards using any file system.", + NULL, NULL, TRUE); static MYSQL_SYSVAR_BOOL(use_fallocate, innobase_use_fallocate, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, @@ -22039,7 +20759,7 @@ static MYSQL_SYSVAR_ULONG(sync_array_size, srv_sync_array_size, 1, /* Minimum value */ 1024, 0); /* Maximum value */ -static MYSQL_SYSVAR_ULONG(fast_shutdown, innobase_fast_shutdown, +static MYSQL_SYSVAR_UINT(fast_shutdown, srv_fast_shutdown, PLUGIN_VAR_OPCMDARG, "Speeds up the shutdown process of the InnoDB storage engine. Possible" " values are 0, 1 (faster) or 2 (fastest - crash-like).", @@ -22238,6 +20958,7 @@ static MYSQL_SYSVAR_BOOL(stats_traditional, srv_stats_sample_traditional, "Enable traditional statistic calculation based on number of configured pages (default true)", NULL, NULL, TRUE); +#ifdef BTR_CUR_HASH_ADAPT static MYSQL_SYSVAR_BOOL(adaptive_hash_index, btr_search_enabled, PLUGIN_VAR_OPCMDARG, "Enable InnoDB adaptive hash index (enabled by default). " @@ -22249,8 +20970,9 @@ Each partition is protected by its own latch and so we have parts number of latches protecting complete search system. */ static MYSQL_SYSVAR_ULONG(adaptive_hash_index_parts, btr_ahi_parts, PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, - "Number of InnoDB Adapative Hash Index Partitions. (default = 8). ", + "Number of InnoDB Adaptive Hash Index Partitions (default 8)", NULL, NULL, 8, 1, 512, 0); +#endif /* BTR_CUR_HASH_ADAPT */ static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay, PLUGIN_VAR_RQCMDARG, @@ -22271,7 +20993,7 @@ static MYSQL_SYSVAR_BOOL(log_compressed_pages, page_zip_log_pages, " the zlib compression algorithm changes." " When turned OFF, InnoDB will assume that the zlib" " compression algorithm doesn't change.", - NULL, NULL, FALSE); + NULL, NULL, TRUE); static MYSQL_SYSVAR_ULONG(autoextend_increment, sys_tablespace_auto_extend_increment, @@ -22552,13 +21274,6 @@ static MYSQL_SYSVAR_ULONG(force_recovery, srv_force_recovery, "Helps to save your data in case the disk image of the database becomes corrupt.", NULL, NULL, 0, 0, 6, 0); -#ifndef DBUG_OFF -static MYSQL_SYSVAR_ULONG(force_recovery_crash, srv_force_recovery_crash, - PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, - "Kills the server during crash recovery.", - NULL, NULL, 0, 0, 100, 0); -#endif /* !DBUG_OFF */ - static MYSQL_SYSVAR_ULONG(page_size, srv_page_size, PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, "Page size to use for all InnoDB tablespaces.", @@ -22578,7 +21293,7 @@ static MYSQL_SYSVAR_LONGLONG(log_file_size, innobase_log_file_size, static MYSQL_SYSVAR_ULONG(log_files_in_group, srv_n_log_files, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "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); + NULL, NULL, 2, 1, SRV_N_LOG_FILES_MAX, 0); static MYSQL_SYSVAR_ULONG(log_write_ahead_size, srv_log_write_ahead_size, PLUGIN_VAR_RQCMDARG, @@ -22609,10 +21324,10 @@ static MYSQL_SYSVAR_ULONG(sync_spin_loops, srv_n_spin_wait_rounds, "Count of spin-loop rounds in InnoDB mutexes (30 by default)", NULL, NULL, 30L, 0L, ~0UL, 0); -static MYSQL_SYSVAR_ULONG(spin_wait_delay, srv_spin_wait_delay, +static MYSQL_SYSVAR_UINT(spin_wait_delay, srv_spin_wait_delay, PLUGIN_VAR_OPCMDARG, "Maximum delay between polling for a spin lock (6 by default)", - NULL, NULL, 6L, 0L, ~0UL, 0); + NULL, NULL, 6, 0, 6000, 0); static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency, PLUGIN_VAR_RQCMDARG, @@ -22724,43 +21439,12 @@ static MYSQL_SYSVAR_BOOL(use_native_aio, srv_use_native_aio, "Use native AIO if supported on this platform.", NULL, NULL, TRUE); -#if defined(HAVE_LIBNUMA) && defined(WITH_NUMA) +#ifdef HAVE_LIBNUMA static MYSQL_SYSVAR_BOOL(numa_interleave, srv_numa_interleave, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, "Use NUMA interleave memory policy to allocate InnoDB buffer pool.", NULL, NULL, FALSE); -#endif /* HAVE_LIBNUMA && WITH_NUMA */ - -static MYSQL_SYSVAR_BOOL(api_enable_binlog, ib_binlog_enabled, - PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, - "Enable binlog for applications direct access InnoDB through InnoDB APIs", - NULL, NULL, FALSE); - -static MYSQL_SYSVAR_BOOL(api_enable_mdl, ib_mdl_enabled, - PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, - "Enable MDL for applications direct access InnoDB through InnoDB APIs", - NULL, NULL, FALSE); - -static MYSQL_SYSVAR_BOOL(api_disable_rowlock, ib_disable_row_lock, - PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, - "Disable row lock when direct access InnoDB through InnoDB APIs", - NULL, NULL, FALSE); - -static MYSQL_SYSVAR_ULONG(api_trx_level, ib_trx_level_setting, - PLUGIN_VAR_OPCMDARG, - "InnoDB API transaction isolation level", - NULL, NULL, - 0, /* Default setting */ - 0, /* Minimum value */ - 3, 0); /* Maximum value */ - -static MYSQL_SYSVAR_ULONG(api_bk_commit_interval, ib_bk_commit_interval, - PLUGIN_VAR_OPCMDARG, - "Background commit interval in seconds", - NULL, NULL, - 5, /* Default setting */ - 1, /* Minimum value */ - 1024 * 1024 * 1024, 0); /* Maximum value */ +#endif /* HAVE_LIBNUMA */ static MYSQL_SYSVAR_STR(change_buffering, innobase_change_buffering, PLUGIN_VAR_RQCMDARG, @@ -22795,11 +21479,6 @@ static MYSQL_SYSVAR_BOOL(disable_background_merge, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_RQCMDARG, "Disable change buffering merges by the master thread", NULL, NULL, FALSE); - -static MYSQL_SYSVAR_ENUM(compress_debug, srv_debug_compress, - PLUGIN_VAR_RQCMDARG, - "Compress all tables, without specifying the COMPRESS table attribute", - NULL, NULL, Compression::NONE, &innodb_debug_compress_typelib); #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ static MYSQL_SYSVAR_ULONG(buf_dump_status_frequency, srv_buf_dump_status_frequency, @@ -22833,10 +21512,11 @@ innobase_disallow_writes_update( { *(my_bool*)var_ptr = *(my_bool*)save; ut_a(srv_allow_writes_event); - if (*(my_bool*)var_ptr) + if (*(my_bool*)var_ptr) { os_event_reset(srv_allow_writes_event); - else + } else { os_event_set(srv_allow_writes_event); + } } static MYSQL_SYSVAR_BOOL(disallow_writes, innobase_disallow_writes, @@ -22844,6 +21524,7 @@ static MYSQL_SYSVAR_BOOL(disallow_writes, innobase_disallow_writes, "Tell InnoDB to stop any writes to disk", NULL, innobase_disallow_writes_update, FALSE); #endif /* WITH_INNODB_DISALLOW_WRITES */ + static MYSQL_SYSVAR_BOOL(random_read_ahead, srv_random_read_ahead, PLUGIN_VAR_NOCMDARG, "Whether to use read ahead for random access within an extent.", @@ -22943,7 +21624,7 @@ static MYSQL_SYSVAR_BOOL(trx_purge_view_update_only_debug, " but the each purges were not done yet.", NULL, NULL, FALSE); -static MYSQL_SYSVAR_ULONG(data_file_size_debug, +static MYSQL_SYSVAR_UINT(data_file_size_debug, srv_sys_space_size_debug, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "InnoDB system tablespace size to be set in recovery.", @@ -23001,8 +21682,8 @@ static MYSQL_SYSVAR_BOOL(force_primary_key, static MYSQL_SYSVAR_BOOL(use_trim, srv_use_trim, PLUGIN_VAR_OPCMDARG, - "Use trim. Default FALSE.", - NULL, NULL, FALSE); + "Deallocate (punch_hole|trim) unused portions of the page compressed page (on by default)", + NULL, innodb_use_trim_update, TRUE); static const char *page_compression_algorithms[]= { "none", "zlib", "lz4", "lzo", "lzma", "bzip2", "snappy", 0 }; static TYPELIB page_compression_algorithms_typelib= @@ -23017,7 +21698,7 @@ static MYSQL_SYSVAR_ENUM(compression_algorithm, innodb_compression_algorithm, /* We use here the largest number of supported compression method to enable all those methods that are available. Availability of compression method is verified on innodb_compression_algorithm_validate function. */ - PAGE_UNCOMPRESSED, + PAGE_ZLIB_ALGORITHM, &page_compression_algorithms_typelib); static MYSQL_SYSVAR_LONG(mtflush_threads, srv_mtflush_threads, @@ -23149,15 +21830,12 @@ static MYSQL_SYSVAR_BOOL(debug_force_scrubbing, NULL, NULL, FALSE); #endif /* UNIV_DEBUG */ -static MYSQL_SYSVAR_BOOL(instrument_semaphores, srv_instrument_semaphores, +static MYSQL_SYSVAR_BOOL(instrument_semaphores, innodb_instrument_semaphores, PLUGIN_VAR_OPCMDARG, - "Enable semaphore request instrumentation. This could have some effect on performance but allows better" - " information on long semaphore wait problems. (Default: not enabled)", - 0, 0, FALSE); + "DEPRECATED. This setting has no effect.", + NULL, innodb_instrument_semaphores_update, FALSE); static struct st_mysql_sys_var* innobase_system_variables[]= { - MYSQL_SYSVAR(api_trx_level), - MYSQL_SYSVAR(api_bk_commit_interval), MYSQL_SYSVAR(autoextend_increment), MYSQL_SYSVAR(buffer_pool_size), MYSQL_SYSVAR(buffer_pool_chunk_size), @@ -23192,9 +21870,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(doublewrite), MYSQL_SYSVAR(use_atomic_writes), MYSQL_SYSVAR(use_fallocate), - MYSQL_SYSVAR(api_enable_binlog), - MYSQL_SYSVAR(api_enable_mdl), - MYSQL_SYSVAR(api_disable_rowlock), MYSQL_SYSVAR(fast_shutdown), MYSQL_SYSVAR(read_io_threads), MYSQL_SYSVAR(write_io_threads), @@ -23206,9 +21881,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(flush_log_at_trx_commit), MYSQL_SYSVAR(flush_method), MYSQL_SYSVAR(force_recovery), -#ifndef DBUG_OFF - MYSQL_SYSVAR(force_recovery_crash), -#endif /* !DBUG_OFF */ MYSQL_SYSVAR(fill_factor), MYSQL_SYSVAR(ft_cache_size), MYSQL_SYSVAR(ft_total_cache_size), @@ -23256,8 +21928,10 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(stats_auto_recalc), MYSQL_SYSVAR(stats_modified_counter), MYSQL_SYSVAR(stats_traditional), +#ifdef BTR_CUR_HASH_ADAPT MYSQL_SYSVAR(adaptive_hash_index), MYSQL_SYSVAR(adaptive_hash_index_parts), +#endif /* BTR_CUR_HASH_ADAPT */ MYSQL_SYSVAR(stats_method), MYSQL_SYSVAR(replication_delay), MYSQL_SYSVAR(status_file), @@ -23276,9 +21950,9 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(autoinc_lock_mode), MYSQL_SYSVAR(version), MYSQL_SYSVAR(use_native_aio), -#if defined(HAVE_LIBNUMA) && defined(WITH_NUMA) +#ifdef HAVE_LIBNUMA MYSQL_SYSVAR(numa_interleave), -#endif /* HAVE_LIBNUMA && WITH_NUMA */ +#endif /* HAVE_LIBNUMA */ MYSQL_SYSVAR(change_buffering), MYSQL_SYSVAR(change_buffer_max_size), #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG @@ -23336,7 +22010,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(data_file_size_debug), MYSQL_SYSVAR(fil_make_page_dirty_debug), MYSQL_SYSVAR(saved_page_number_debug), - MYSQL_SYSVAR(compress_debug), MYSQL_SYSVAR(disable_resize_buffer_pool_debug), MYSQL_SYSVAR(page_cleaner_disabled_debug), MYSQL_SYSVAR(dict_stats_disabled_debug), @@ -23403,7 +22076,6 @@ i_s_innodb_cmp_per_index_reset, i_s_innodb_buffer_page, i_s_innodb_buffer_page_lru, i_s_innodb_buffer_stats, -i_s_innodb_temp_table_info, i_s_innodb_metrics, i_s_innodb_ft_default_stopword, i_s_innodb_ft_deleted, @@ -23900,6 +22572,12 @@ ha_innobase::idx_cond_push( DBUG_ASSERT(keyno != MAX_KEY); DBUG_ASSERT(idx_cond != NULL); + /* We can only evaluate the condition if all columns are stored.*/ + dict_index_t* idx = innobase_get_index(keyno); + if (idx && dict_index_has_virtual(idx)) { + DBUG_RETURN(idx_cond); + } + pushed_idx_cond = idx_cond; pushed_idx_cond_keyno = keyno; in_range_check_pushed_down = TRUE; diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index cef39e594b9..d11d5913f34 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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,19 +23,6 @@ this program; if not, write to the Free Software Foundation, Inc., system clustered index when there is no primary key. */ extern const char innobase_index_reserve_name[]; -/* "innodb_file_per_table" tablespace name is reserved by InnoDB in order -to explicitly create a file_per_table tablespace for the table. */ -extern const char reserved_file_per_table_space_name[]; - -/* "innodb_system" tablespace name is reserved by InnoDB for the -system tablespace which uses space_id 0 and stores extra types of -system pages like UNDO and doublewrite. */ -extern const char reserved_system_space_name[]; - -/* "innodb_temporary" tablespace name is reserved by InnoDB for the -predefined shared temporary tablespace. */ -extern const char reserved_temporary_space_name[]; - /* Structure defines translation table between mysql index and InnoDB index structures */ struct innodb_idx_translate_t { @@ -677,52 +664,6 @@ extern const char reserved_file_per_table_space_name[]; //extern "C" int wsrep_trx_is_aborting(void *thd_ptr); #endif -/** Check if the explicit tablespace targeted is file_per_table. -@param[in] create_info Metadata for the table to create. -@return true if the table is intended to use a file_per_table tablespace. */ -UNIV_INLINE -bool -tablespace_is_file_per_table( - const HA_CREATE_INFO* create_info) -{ - return(create_info->tablespace != NULL - && (0 == strcmp(create_info->tablespace, - reserved_file_per_table_space_name))); -} - -/** Check if table will be explicitly put in an existing shared general -or system tablespace. -@param[in] create_info Metadata for the table to create. -@return true if the table will use a shared general or system tablespace. */ -UNIV_INLINE -bool -tablespace_is_shared_space( -const HA_CREATE_INFO* create_info) -{ - return(create_info->tablespace != NULL - && create_info->tablespace[0] != '\0' - && (0 != strcmp(create_info->tablespace, - reserved_file_per_table_space_name))); -} - -/** Check if table will be explicitly put in a general tablespace. -@param[in] create_info Metadata for the table to create. -@return true if the table will use a general tablespace. */ -UNIV_INLINE -bool -tablespace_is_general_space( - const HA_CREATE_INFO* create_info) -{ - return(create_info->tablespace != NULL - && create_info->tablespace[0] != '\0' - && (0 != strcmp(create_info->tablespace, - reserved_file_per_table_space_name)) - && (0 != strcmp(create_info->tablespace, - reserved_temporary_space_name)) - && (0 != strcmp(create_info->tablespace, - reserved_system_space_name))); -} - /** Parse hint for table and its indexes, and update the information in dictionary. @param[in] thd Connection thread @@ -747,16 +688,12 @@ public: TABLE* form, HA_CREATE_INFO* create_info, char* table_name, - char* temp_path, - char* remote_path, - char* tablespace) + char* remote_path) :m_thd(thd), m_form(form), m_create_info(create_info), m_table_name(table_name), - m_temp_path(temp_path), m_remote_path(remote_path), - m_tablespace(tablespace), m_innodb_file_per_table(srv_file_per_table) {} @@ -795,9 +732,6 @@ public: /** Validate TABLESPACE option. */ bool create_option_tablespace_is_valid(); - /** Validate COMPRESSION option. */ - bool create_option_compression_is_valid(); - /** Prepare to create a table. */ int prepare_create_table(const char* name); @@ -868,19 +802,10 @@ private: /** Table name */ char* m_table_name; - /** If this is a table explicitly created by the user with the - TEMPORARY keyword, then this parameter is the dir path where the - table should be placed if we create an .ibd file for it - (no .ibd extension in the path, though). - Otherwise this is a zero length-string */ - char* m_temp_path; /** Remote path (DATA DIRECTORY) or zero length-string */ char* m_remote_path; - /** Tablespace name or zero length-string. */ - char* m_tablespace; - /** Local copy of srv_file_per_table. */ bool m_innodb_file_per_table; @@ -897,9 +822,6 @@ private: /** Using DATA DIRECTORY */ bool m_use_data_dir; - /** Using a Shared General Tablespace */ - bool m_use_shared_space; - /** Table flags */ ulint m_flags; diff --git a/storage/innobase/handler/ha_innopart.cc b/storage/innobase/handler/ha_innopart.cc index 09a60be1577..806a4079326 100644 --- a/storage/innobase/handler/ha_innopart.cc +++ b/storage/innobase/handler/ha_innopart.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. -Copyright (c) 2016, MariaDB Corporation. +Copyright (c) 2016, 2017, MariaDB Corporation. This 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 @@ -2464,35 +2464,6 @@ ha_innopart::update_part_elem( } part_elem->index_file_name = NULL; - dict_get_and_save_space_name(ib_table, false); - if (ib_table->tablespace != NULL) { - ut_ad(part_elem->tablespace_name == NULL - || 0 == strcmp(part_elem->tablespace_name, - ib_table->tablespace)); - if (part_elem->tablespace_name == NULL - || strcmp(ib_table->tablespace, - part_elem->tablespace_name) != 0) { - - /* Play safe and allocate memory from TABLE and copy - instead of expose the internal data dictionary. */ - part_elem->tablespace_name = - strdup_root(&table->mem_root, - ib_table->tablespace); - } - } - else { - ut_ad(part_elem->tablespace_name == NULL - || 0 == strcmp(part_elem->tablespace_name, - "innodb_file_per_table")); - if (part_elem->tablespace_name != NULL - && 0 != strcmp(part_elem->tablespace_name, - "innodb_file_per_table")) { - - /* Update part_elem tablespace to NULL same as in - innodb data dictionary ib_table. */ - part_elem->tablespace_name = NULL; - } - } } /** Update create_info. @@ -2558,7 +2529,7 @@ ha_innopart::update_create_info( DBUG_VOID_RETURN; } - /* part_elem->data_file_name and tablespace_name should be correct from + /* part_elem->data_file_name should be correct from the .frm, but may have been changed, so update from SYS_DATAFILES. index_file_name is ignored, so remove it. */ @@ -2592,17 +2563,11 @@ set_create_info_dir( if (part_elem->data_file_name != NULL && part_elem->data_file_name[0] != '\0') { info->data_file_name = part_elem->data_file_name; - /* Also implies non-default tablespace. */ - info->tablespace = NULL; } if (part_elem->index_file_name != NULL && part_elem->index_file_name[0] != '\0') { info->index_file_name = part_elem->index_file_name; } - if (part_elem->tablespace_name != NULL - && part_elem->tablespace_name[0] != '\0') { - info->tablespace = part_elem->tablespace_name; - } } /** Set flags and append '/' to remote path if necessary. */ @@ -2642,17 +2607,13 @@ ha_innopart::create( int error; /** {database}/{tablename} */ char table_name[FN_REFLEN]; - /** absolute path of temp frm */ - char temp_path[FN_REFLEN]; /** absolute path of table */ char remote_path[FN_REFLEN]; char partition_name[FN_REFLEN]; - char tablespace_name[NAME_LEN + 1]; char* table_name_end; size_t table_name_len; char* partition_name_start; char table_data_file_name[FN_REFLEN]; - char table_level_tablespace_name[NAME_LEN + 1]; const char* index_file_name; size_t len; @@ -2660,9 +2621,7 @@ ha_innopart::create( form, create_info, table_name, - temp_path, - remote_path, - tablespace_name); + remote_path); DBUG_ENTER("ha_innopart::create"); ut_ad(create_info != NULL); @@ -2687,7 +2646,6 @@ ha_innopart::create( if (error != 0) { DBUG_RETURN(error); } - ut_ad(temp_path[0] == '\0'); strcpy(partition_name, table_name); partition_name_start = partition_name + strlen(partition_name); table_name_len = strlen(table_name); @@ -2708,11 +2666,6 @@ ha_innopart::create( table_data_file_name[0] = '\0'; } index_file_name = create_info->index_file_name; - if (create_info->tablespace != NULL) { - strcpy(table_level_tablespace_name, create_info->tablespace); - } else { - table_level_tablespace_name[0] = '\0'; - } info.allocate_trx(); @@ -2798,15 +2751,12 @@ ha_innopart::create( table_data_file_name; create_info->index_file_name = index_file_name; - create_info->tablespace = - table_level_tablespace_name; set_create_info_dir(part_elem, create_info); } } /* Reset table level DATA/INDEX DIRECTORY. */ create_info->data_file_name = table_data_file_name; create_info->index_file_name = index_file_name; - create_info->tablespace = table_level_tablespace_name; } innobase_commit_low(info.trx()); @@ -3120,7 +3070,7 @@ ha_innopart::records_in_range( /* In case MySQL calls this in the middle of a SELECT query, release possible adaptive hash latch to avoid deadlocks of threads. */ - trx_search_latch_release_if_reserved(m_prebuilt->trx); + trx_assert_no_search_latch(m_prebuilt->trx); active_index = keynr; @@ -3259,7 +3209,7 @@ ha_innopart::estimate_rows_upper_bound() /* In case MySQL calls this in the middle of a SELECT query, release possible adaptive hash latch to avoid deadlocks of threads. */ - trx_search_latch_release_if_reserved(m_prebuilt->trx); + trx_assert_no_search_latch(m_prebuilt->trx); for (uint i = m_part_info->get_first_used_partition(); i < m_tot_parts; @@ -3377,7 +3327,7 @@ ha_innopart::info_low( m_prebuilt->trx->op_info = (char*)"returning various info to MySQL"; - trx_search_latch_release_if_reserved(m_prebuilt->trx); + trx_assert_no_search_latch(m_prebuilt->trx); ut_ad(m_part_share->get_table_part(0)->n_ref_count > 0); @@ -4238,27 +4188,13 @@ ha_innopart::create_new_partition( { int error; char norm_name[FN_REFLEN]; - const char* tablespace_name_backup = create_info->tablespace; const char* data_file_name_backup = create_info->data_file_name; DBUG_ENTER("ha_innopart::create_new_partition"); /* Delete by ddl_log on failure. */ normalize_table_name(norm_name, part_name); set_create_info_dir(part_elem, create_info); - /* The below check is the same as for CREATE TABLE, but since we are - doing an alter here it will not trigger the check in - create_option_tablespace_is_valid(). */ - if (tablespace_is_shared_space(create_info) - && create_info->data_file_name != NULL - && create_info->data_file_name[0] != '\0') { - my_printf_error(ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: DATA DIRECTORY cannot be used" - " with a TABLESPACE assignment.", MYF(0)); - DBUG_RETURN(HA_WRONG_CREATE_OPTION); - } - error = ha_innobase::create(norm_name, table, create_info); - create_info->tablespace = tablespace_name_backup; create_info->data_file_name = data_file_name_backup; if (error == HA_ERR_FOUND_DUPP_KEY) { DBUG_RETURN(HA_ERR_TABLE_EXIST); diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index e09ed99937a..82fa4b724f4 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -588,23 +588,8 @@ ha_innobase::check_if_supported_inplace_alter( DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); } -#ifdef MYSQL_ENCRYPTION - /* We don't support change encryption attribute with - inplace algorithm. */ - char* old_encryption = this->table->s->encrypt_type.str; - char* new_encryption = altered_table->s->encrypt_type.str; - - if (Encryption::is_none(old_encryption) - != Encryption::is_none(new_encryption)) { - ha_alter_info->unsupported_reason = - innobase_get_err_msg( - ER_UNSUPPORTED_ALTER_ENCRYPTION_INPLACE); - DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); - } -#endif /* MYSQL_ENCRYPTION */ - update_thd(); - trx_search_latch_release_if_reserved(m_prebuilt->trx); + trx_assert_no_search_latch(m_prebuilt->trx); /* Change on engine specific table options require rebuild of the table */ @@ -614,8 +599,7 @@ ha_innobase::check_if_supported_inplace_alter( ha_table_option_struct *old_options= table->s->option_struct; if (new_options->page_compressed != old_options->page_compressed || - new_options->page_compression_level != old_options->page_compression_level || - new_options->atomic_writes != old_options->atomic_writes) { + new_options->page_compression_level != old_options->page_compression_level) { ha_alter_info->unsupported_reason = innobase_get_err_msg( ER_ALTER_OPERATION_NOT_SUPPORTED_REASON); DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); @@ -1914,7 +1898,7 @@ innobase_row_to_mysql( } if (table->vfield) { my_bitmap_map* old_vcol_set = tmp_use_all_columns(table, table->vcol_set); - table->update_virtual_fields(VCOL_UPDATE_FOR_READ_WRITE); + table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_READ); tmp_restore_column_map(table->vcol_set, old_vcol_set); } } @@ -4374,7 +4358,6 @@ prepare_inplace_alter_table_dict( dict_index_t* fts_index = NULL; ulint new_clustered = 0; dberr_t error; - const char* punch_hole_warning = NULL; ulint num_fts_index; dict_add_v_col_t* add_v = NULL; ha_innobase_inplace_ctx*ctx; @@ -4550,7 +4533,6 @@ prepare_inplace_alter_table_dict( ulint z = 0; ulint key_id = FIL_DEFAULT_ENCRYPTION_KEY; fil_encryption_t mode = FIL_SPACE_ENCRYPTION_DEFAULT; - const char* compression=NULL; crypt_data = fil_space_get_crypt_data(ctx->prebuilt->table->space); @@ -4597,20 +4579,6 @@ prepare_inplace_alter_table_dict( goto new_clustered_failed; } - /* Use the old tablespace unless the tablespace - is changing. */ - if (DICT_TF_HAS_SHARED_SPACE(user_table->flags) - && (ha_alter_info->create_info->tablespace == NULL - || (0 == strcmp(ha_alter_info->create_info->tablespace, - user_table->tablespace)))) { - space_id = user_table->space; - } else if (tablespace_is_shared_space( - ha_alter_info->create_info)) { - space_id = fil_space_get_id_by_name( - ha_alter_info->create_info->tablespace); - ut_a(space_id != ULINT_UNDEFINED); - } - /* The initial space id 0 may be overridden later if this table is going to be a file_per_table tablespace. */ ctx->new_table = dict_mem_table_create( @@ -4748,39 +4716,11 @@ prepare_inplace_alter_table_dict( ctx->new_table->fts->doc_col = fts_doc_id_col; } -#ifdef MYSQL_COMPRESSION - compression = ha_alter_info->create_info->compress.str; - - if (Compression::validate(compression) != DB_SUCCESS) { - - compression = NULL; - } -#endif /* MYSQL_COMPRESSION */ - error = row_create_table_for_mysql( - ctx->new_table, compression, ctx->trx, false, mode, key_id); - - punch_hole_warning = - (error == DB_IO_NO_PUNCH_HOLE_FS) - ? "Punch hole is not supported by the file system" - : "Page Compression is not supported for this" - " tablespace"; + ctx->new_table, ctx->trx, false, mode, key_id); switch (error) { dict_table_t* temp_table; - case DB_IO_NO_PUNCH_HOLE_FS: - case DB_IO_NO_PUNCH_HOLE_TABLESPACE: - push_warning_printf( - ctx->prebuilt->trx->mysql_thd, - Sql_condition::WARN_LEVEL_WARN, - HA_ERR_UNSUPPORTED, - "%s. Compression disabled for '%s'", - punch_hole_warning, - ctx->new_table->name.m_name); - - error = DB_SUCCESS; - - case DB_SUCCESS: /* We need to bump up the table ref count and before we can use it we need to open the @@ -5079,7 +5019,7 @@ op_ok: ctx->prebuilt->trx->mysql_thd) ? DB_SUCCESS : DB_ERROR; ctx->new_table->fts->fts_status - &= ~TABLE_DICT_LOCKED; + &= ulint(~TABLE_DICT_LOCKED); if (error != DB_SUCCESS) { goto error_handling; @@ -5226,9 +5166,6 @@ innobase_check_foreign_key_index( ulint n_drop_fk) /*!< in: Number of foreign keys to drop */ { - ut_ad(index != NULL); - ut_ad(indexed_table != NULL); - const dict_foreign_set* fks = &indexed_table->referenced_set; /* Check for all FK references from other tables to the index. */ @@ -5642,37 +5579,15 @@ ha_innobase::prepare_inplace_alter_table( /* ALTER TABLE will not implicitly move a table from a single-table tablespace to the system tablespace when innodb_file_per_table=OFF. But it will implicitly move a table from the system tablespace to a - single-table tablespace if innodb_file_per_table = ON. - Tables found in a general tablespace will stay there unless ALTER - TABLE contains another TABLESPACE=name. If that is found it will - explicitly move a table to the named tablespace. - So if you specify TABLESPACE=`innodb_system` a table can be moved - into the system tablespace from either a general or file-per-table - tablespace. But from then on, it is labeled as using a shared space - (the create options have tablespace=='innodb_system' and the - SHARED_SPACE flag is set in the table flags) so it can no longer be - implicitly moved to a file-per-table tablespace. */ - bool in_system_space = is_system_tablespace(indexed_table->space); - bool is_file_per_table = !in_system_space - && !DICT_TF_HAS_SHARED_SPACE(indexed_table->flags); -#ifdef UNIV_DEBUG - bool in_general_space = !in_system_space - && DICT_TF_HAS_SHARED_SPACE(indexed_table->flags); - - /* The table being altered can only be in a system tablespace, - or its own file-per-table tablespace, or a general tablespace. */ - ut_ad(1 == in_system_space + is_file_per_table + in_general_space); -#endif /* UNIV_DEBUG */ + single-table tablespace if innodb_file_per_table = ON. */ create_table_info_t info(m_user_thd, altered_table, ha_alter_info->create_info, NULL, - NULL, - NULL, NULL); - info.set_tablespace_type(is_file_per_table); + info.set_tablespace_type(indexed_table->space != TRX_SYS_SPACE); if (ha_alter_info->handler_flags & Alter_inplace_info::ADD_INDEX) { if (info.gcols_in_fulltext_or_spatial()) { @@ -6067,7 +5982,7 @@ check_if_can_drop_indexes: if (!index->to_be_dropped && dict_index_is_corrupted(index)) { my_error(ER_INDEX_CORRUPT, MYF(0), index->name()); - DBUG_RETURN(true); + goto err_exit; } } } @@ -6654,9 +6569,10 @@ innobase_online_rebuild_log_free( /** For each user column, which is part of an index which is not going to be dropped, it checks if the column number of the column is same as col_no argument passed. -@param[in] table table object -@param[in] col_no column number of the column which is to be checked -@param[in] is_v if this is a virtual column +@param[in] table table +@param[in] col_no column number +@param[in] is_v if this is a virtual column +@param[in] only_committed whether to consider only committed indexes @retval true column exists @retval false column does not exist, true if column is system column or it is in the index. */ @@ -6665,17 +6581,21 @@ bool check_col_exists_in_indexes( const dict_table_t* table, ulint col_no, - bool is_v) + bool is_v, + bool only_committed = false) { /* This function does not check system columns */ if (!is_v && dict_table_get_nth_col(table, col_no)->mtype == DATA_SYS) { return(true); } - for (dict_index_t* index = dict_table_get_first_index(table); index; + for (const dict_index_t* index = dict_table_get_first_index(table); + index; index = dict_table_get_next_index(index)) { - if (index->to_be_dropped) { + if (only_committed + ? !index->is_committed() + : index->to_be_dropped) { continue; } @@ -6854,14 +6774,24 @@ func_exit: we do this by checking every existing column, if any current index would index them */ for (ulint i = 0; i < dict_table_get_n_cols(prebuilt->table); i++) { - if (!check_col_exists_in_indexes(prebuilt->table, i, false)) { - prebuilt->table->cols[i].ord_part = 0; + dict_col_t& col = prebuilt->table->cols[i]; + if (!col.ord_part) { + continue; + } + if (!check_col_exists_in_indexes(prebuilt->table, i, false, + true)) { + col.ord_part = 0; } } for (ulint i = 0; i < dict_table_get_n_v_cols(prebuilt->table); i++) { - if (!check_col_exists_in_indexes(prebuilt->table, i, true)) { - prebuilt->table->v_cols[i].m_col.ord_part = 0; + dict_col_t& col = prebuilt->table->v_cols[i].m_col; + if (!col.ord_part) { + continue; + } + if (!check_col_exists_in_indexes(prebuilt->table, i, true, + true)) { + col.ord_part = 0; } } @@ -7339,7 +7269,7 @@ innobase_enlarge_columns_try( == IS_EQUAL_PACK_LENGTH && innobase_enlarge_column_try( user_table, trx, table_name, - idx, cf->length, is_v)) { + idx, static_cast(cf->length), is_v)) { return(true); } @@ -7861,26 +7791,11 @@ commit_try_rebuild( user_table, rebuilt_table, ctx->tmp_name, trx); /* We must be still holding a table handle. */ - DBUG_ASSERT(user_table->get_ref_count() >= 1); + DBUG_ASSERT(user_table->get_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->get_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. */ - my_printf_error(ER_ILLEGAL_HA, "Cannot complete the operation " - "because table is referenced by another connection.", MYF(0)); - DBUG_RETURN(true); - } - switch (error) { case DB_SUCCESS: DBUG_RETURN(false); @@ -8884,22 +8799,15 @@ foreign_fail: } if (ctx0->num_to_drop_vcol || ctx0->num_to_add_vcol) { - - if (ctx0->old_table->get_ref_count() > 1) { - - row_mysql_unlock_data_dictionary(trx); - trx_free_for_mysql(trx); - my_printf_error(ER_ILLEGAL_HA, "Cannot complete the operation " - "because table is referenced by another connection.", MYF(0)); - DBUG_RETURN(true); - } + DBUG_ASSERT(ctx0->old_table->get_ref_count() == 1); trx_commit_for_mysql(m_prebuilt->trx); - +#ifdef BTR_CUR_HASH_ADAPT if (btr_search_enabled) { btr_search_disable(false); btr_search_enable(); } +#endif /* BTR_CUR_HASH_ADAPT */ char tb_name[FN_REFLEN]; ut_strcpy(tb_name, m_prebuilt->table->name.m_name); @@ -9094,10 +9002,6 @@ foreign_fail: } } - /* We don't support compression for the system tablespace nor - the temporary tablespace. Only because they are shared tablespaces. - There is no other technical reason. */ - innobase_parse_hint_from_comment( m_user_thd, m_prebuilt->table, altered_table->s); diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc index 4a13faa480f..dd43a52ae66 100644 --- a/storage/innobase/handler/i_s.cc +++ b/storage/innobase/handler/i_s.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2007, 2016, Oracle and/or its affiliates. -Copyrigth (c) 2014, 2016, MariaDB Corporation +Copyrigth (c) 2014, 2017, MariaDB Corporation This 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 @@ -129,8 +129,10 @@ struct buf_page_info_t{ unsigned io_fix:2; /*!< type of pending I/O operation */ unsigned fix_count:19; /*!< Count of how manyfold this block is bufferfixed */ +#ifdef BTR_CUR_HASH_ADAPT unsigned hashed:1; /*!< Whether hash index has been built on this page */ +#endif /* BTR_CUR_HASH_ADAPT */ unsigned is_old:1; /*!< TRUE if the block is in the old blocks in buf_pool->LRU_old */ unsigned freed_page_clock:31; /*!< the value of @@ -339,6 +341,12 @@ field_store_ulint( return(ret); } +#ifdef BTR_CUR_HASH_ADAPT +# define I_S_AHI 1 /* Include the IS_HASHED column */ +#else +# define I_S_AHI 0 /* Omit the IS_HASHED column */ +#endif + /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_trx */ static ST_FIELD_INFO innodb_trx_fields_info[] = { @@ -522,6 +530,7 @@ static ST_FIELD_INFO innodb_trx_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, +#ifdef BTR_CUR_HASH_ADAPT #define IDX_TRX_ADAPTIVE_HASH_LATCHED 20 {STRUCT_FLD(field_name, "trx_adaptive_hash_latched"), STRUCT_FLD(field_length, 1), @@ -530,17 +539,9 @@ static ST_FIELD_INFO innodb_trx_fields_info[] = STRUCT_FLD(field_flags, 0), STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, +#endif /* BTR_CUR_HASH_ADAPT */ -#define IDX_TRX_ADAPTIVE_HASH_TIMEOUT 21 - {STRUCT_FLD(field_name, "trx_adaptive_hash_timeout"), - STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), - STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, MY_I_S_UNSIGNED), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, - -#define IDX_TRX_READ_ONLY 22 +#define IDX_TRX_READ_ONLY 20 + I_S_AHI {STRUCT_FLD(field_name, "trx_is_read_only"), STRUCT_FLD(field_length, 1), STRUCT_FLD(field_type, MYSQL_TYPE_LONG), @@ -549,7 +550,7 @@ static ST_FIELD_INFO innodb_trx_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_TRX_AUTOCOMMIT_NON_LOCKING 23 +#define IDX_TRX_AUTOCOMMIT_NON_LOCKING 21 + I_S_AHI {STRUCT_FLD(field_name, "trx_autocommit_non_locking"), STRUCT_FLD(field_length, 1), STRUCT_FLD(field_type, MYSQL_TYPE_LONG), @@ -696,9 +697,11 @@ fill_innodb_trx_from_cache( OK(field_store_string(fields[IDX_TRX_LAST_FOREIGN_KEY_ERROR], row->trx_foreign_key_error)); +#ifdef BTR_CUR_HASH_ADAPT /* trx_adaptive_hash_latched */ OK(fields[IDX_TRX_ADAPTIVE_HASH_LATCHED]->store( row->trx_has_search_latch, true)); +#endif /* BTR_CUR_HASH_ADAPT */ /* trx_is_read_only*/ OK(fields[IDX_TRX_READ_ONLY]->store( @@ -947,8 +950,7 @@ fill_innodb_locks_from_cache( strlen(row->lock_table), thd); OK(fields[IDX_LOCK_TABLE]->store( - buf, static_cast(bufend - buf), - system_charset_info)); + buf, uint(bufend - buf), system_charset_info)); /* lock_index */ if (row->lock_index != NULL) { @@ -2591,7 +2593,7 @@ i_s_metrics_fill( } else if (!(monitor_info->monitor_type & MONITOR_NO_AVERAGE) && !(monitor_info->monitor_type & MONITOR_DISPLAY_CURRENT)) { - if (time_diff) { + if (time_diff != 0) { OK(fields[METRIC_AVG_VALUE_START]->store( (double) MONITOR_VALUE_SINCE_START( count) / time_diff)); @@ -2616,7 +2618,7 @@ i_s_metrics_fill( time_diff = 0; } - if (time_diff) { + if (time_diff != 0) { OK(fields[METRIC_AVG_VALUE_RESET]->store( static_cast( MONITOR_VALUE(count) / time_diff))); @@ -4097,287 +4099,6 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_ft_config = STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE), }; -/* Fields of the dynamic table INNODB_TEMP_TABLE_INFO. */ -static ST_FIELD_INFO i_s_innodb_temp_table_info_fields_info[] = -{ -#define IDX_TEMP_TABLE_ID 0 - {STRUCT_FLD(field_name, "TABLE_ID"), - STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), - STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, MY_I_S_UNSIGNED), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, - -#define IDX_TEMP_TABLE_NAME 1 - {STRUCT_FLD(field_name, "NAME"), - STRUCT_FLD(field_length, MAX_TABLE_UTF8_LEN), - STRUCT_FLD(field_type, MYSQL_TYPE_STRING), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, MY_I_S_MAYBE_NULL), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, - -#define IDX_TEMP_TABLE_N_COLS 2 - {STRUCT_FLD(field_name, "N_COLS"), - STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS), - STRUCT_FLD(field_type, MYSQL_TYPE_LONG), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, MY_I_S_UNSIGNED), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, - -#define IDX_TEMP_TABLE_SPACE_ID 3 - {STRUCT_FLD(field_name, "SPACE"), - STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS), - STRUCT_FLD(field_type, MYSQL_TYPE_LONG), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, MY_I_S_UNSIGNED), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, - -#define IDX_TEMP_TABLE_PTT 4 - {STRUCT_FLD(field_name, "PER_TABLE_TABLESPACE"), - STRUCT_FLD(field_length, 64), - STRUCT_FLD(field_type, MYSQL_TYPE_STRING), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, MY_I_S_MAYBE_NULL), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, - -#define IDX_TEMP_TABLE_IS_COMPRESSED 5 - {STRUCT_FLD(field_name, "IS_COMPRESSED"), - STRUCT_FLD(field_length, 64), - STRUCT_FLD(field_type, MYSQL_TYPE_STRING), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, MY_I_S_MAYBE_NULL), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, - END_OF_ST_FIELD_INFO -}; - -struct temp_table_info_t{ - table_id_t m_table_id; - char m_table_name[MAX_TABLE_UTF8_LEN]; - unsigned m_n_cols; - unsigned m_space_id; - char m_per_table_tablespace[64]; - char m_is_compressed[64]; -}; - -typedef std::vector > - temp_table_info_cache_t; - -/*******************************************************************//** -Fill Information Schema table INNODB_TEMP_TABLE_INFO for a particular -temp-table -@return 0 on success, 1 on failure */ -static -int -i_s_innodb_temp_table_info_fill( -/*=============================*/ - THD* thd, /*!< in: thread */ - TABLE_LIST* tables, /*!< in/out: tables - to fill */ - const temp_table_info_t* info) /*!< in: temp-table - information */ -{ - TABLE* table; - Field** fields; - - DBUG_ENTER("i_s_innodb_temp_table_info_fill"); - - table = tables->table; - - fields = table->field; - - OK(fields[IDX_TEMP_TABLE_ID]->store(info->m_table_id, true)); - - OK(field_store_string( - fields[IDX_TEMP_TABLE_NAME], info->m_table_name)); - - OK(fields[IDX_TEMP_TABLE_N_COLS]->store(info->m_n_cols)); - - OK(fields[IDX_TEMP_TABLE_SPACE_ID]->store(info->m_space_id)); - - OK(field_store_string( - fields[IDX_TEMP_TABLE_PTT], info->m_per_table_tablespace)); - - OK(field_store_string( - fields[IDX_TEMP_TABLE_IS_COMPRESSED], info->m_is_compressed)); - - DBUG_RETURN(schema_table_store_record(thd, table)); -} - -/*******************************************************************//** -Populate current table information to cache */ -static -void -innodb_temp_table_populate_cache( -/*=============================*/ - const dict_table_t* table, /*! in: table */ - temp_table_info_t* cache) /*! in/out: populate data in this - cache */ -{ - cache->m_table_id = table->id; - - char db_utf8[MAX_DB_UTF8_LEN]; - char table_utf8[MAX_TABLE_UTF8_LEN]; - - dict_fs2utf8(table->name.m_name, - db_utf8, sizeof(db_utf8), - table_utf8, sizeof(table_utf8)); - strcpy(cache->m_table_name, table_utf8); - - cache->m_n_cols = table->n_cols; - - cache->m_space_id = table->space; - - if (fsp_is_system_temporary(table->space)) { - strcpy(cache->m_per_table_tablespace, "FALSE"); - } else { - strcpy(cache->m_per_table_tablespace, "TRUE"); - } - - if (dict_table_page_size(table).is_compressed()) { - strcpy(cache->m_is_compressed, "TRUE"); - } else { - strcpy(cache->m_is_compressed, "FALSE"); - } -} - -/*******************************************************************//** -This function will iterate over all available table and will fill -stats for temp-tables to INNODB_TEMP_TABLE_INFO. -@return 0 on success, 1 on failure */ -static -int -i_s_innodb_temp_table_info_fill_table( -/*===================================*/ - THD* thd, /*!< in: thread */ - TABLE_LIST* tables, /*!< in/out: tables to fill */ - Item* ) /*!< in: condition (ignored) */ -{ - int status = 0; - dict_table_t* table = NULL; - - DBUG_ENTER("i_s_innodb_temp_table_info_fill_table"); - - /* Only allow the PROCESS privilege holder to access the stats */ - if (check_global_access(thd, PROCESS_ACL)) { - DBUG_RETURN(0); - } - - /* First populate all temp-table info by acquiring dict_sys->mutex. - Note: Scan is being done on NON-LRU list which mainly has system - table entries and temp-table entries. This means 2 things: list - is smaller so processing would be faster and most of the data - is relevant */ - temp_table_info_cache_t all_temp_info_cache; - all_temp_info_cache.reserve(UT_LIST_GET_LEN(dict_sys->table_non_LRU)); - - mutex_enter(&dict_sys->mutex); - for (table = UT_LIST_GET_FIRST(dict_sys->table_non_LRU); - table != NULL; - table = UT_LIST_GET_NEXT(table_LRU, table)) { - - if (!dict_table_is_temporary(table)) { - continue; - } - - temp_table_info_t current_temp_table_info; - - innodb_temp_table_populate_cache( - table, ¤t_temp_table_info); - - all_temp_info_cache.push_back(current_temp_table_info); - } - mutex_exit(&dict_sys->mutex); - - /* Now populate the info to MySQL table */ - temp_table_info_cache_t::const_iterator end = all_temp_info_cache.end(); - for (temp_table_info_cache_t::const_iterator it - = all_temp_info_cache.begin(); - it != end; - it++) { - status = i_s_innodb_temp_table_info_fill(thd, tables, &(*it)); - if (status) { - break; - } - } - - DBUG_RETURN(status); -} - -/*******************************************************************//** -Bind the dynamic table INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO. -@return 0 on success, 1 on failure */ -static -int -i_s_innodb_temp_table_info_init( -/*=============================*/ - void* p) /*!< in/out: table schema object */ -{ - ST_SCHEMA_TABLE* schema; - - DBUG_ENTER("i_s_innodb_temp_table_info_init"); - - schema = reinterpret_cast(p); - - schema->fields_info = i_s_innodb_temp_table_info_fields_info; - schema->fill_table = i_s_innodb_temp_table_info_fill_table; - - DBUG_RETURN(0); -} - -struct st_maria_plugin i_s_innodb_temp_table_info = -{ - /* 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_TEMP_TABLE_INFO"), - - /* plugin author (for SHOW PLUGINS) */ - /* const char* */ - STRUCT_FLD(author, plugin_author), - - /* general descriptive text (for SHOW PLUGINS) */ - /* const char* */ - STRUCT_FLD(descr, "InnoDB Temp Table Stats"), - - /* 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_innodb_temp_table_info_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), - - STRUCT_FLD(version_info, INNODB_VERSION_STR), - STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA) -}; - /* Fields of the dynamic table INNODB_BUFFER_POOL_STATS. */ static ST_FIELD_INFO i_s_innodb_buffer_stats_fields_info[] = { @@ -4991,6 +4712,7 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, +#ifdef BTR_CUR_HASH_ADAPT #define IDX_BUFFER_PAGE_HASHED 7 {STRUCT_FLD(field_name, "IS_HASHED"), STRUCT_FLD(field_length, 3), @@ -4999,8 +4721,9 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(field_flags, MY_I_S_MAYBE_NULL), STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, +#endif /* BTR_CUR_HASH_ADAPT */ -#define IDX_BUFFER_PAGE_NEWEST_MOD 8 +#define IDX_BUFFER_PAGE_NEWEST_MOD 7 + I_S_AHI {STRUCT_FLD(field_name, "NEWEST_MODIFICATION"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5009,7 +4732,7 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUFFER_PAGE_OLDEST_MOD 9 +#define IDX_BUFFER_PAGE_OLDEST_MOD 8 + I_S_AHI {STRUCT_FLD(field_name, "OLDEST_MODIFICATION"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5018,7 +4741,7 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUFFER_PAGE_ACCESS_TIME 10 +#define IDX_BUFFER_PAGE_ACCESS_TIME 9 + I_S_AHI {STRUCT_FLD(field_name, "ACCESS_TIME"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5027,7 +4750,7 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUFFER_PAGE_TABLE_NAME 11 +#define IDX_BUFFER_PAGE_TABLE_NAME 10 + I_S_AHI {STRUCT_FLD(field_name, "TABLE_NAME"), STRUCT_FLD(field_length, 1024), STRUCT_FLD(field_type, MYSQL_TYPE_STRING), @@ -5036,7 +4759,7 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUFFER_PAGE_INDEX_NAME 12 +#define IDX_BUFFER_PAGE_INDEX_NAME 11 + I_S_AHI {STRUCT_FLD(field_name, "INDEX_NAME"), STRUCT_FLD(field_length, 1024), STRUCT_FLD(field_type, MYSQL_TYPE_STRING), @@ -5045,7 +4768,7 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUFFER_PAGE_NUM_RECS 13 +#define IDX_BUFFER_PAGE_NUM_RECS 12 + I_S_AHI {STRUCT_FLD(field_name, "NUMBER_RECORDS"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5054,7 +4777,7 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUFFER_PAGE_DATA_SIZE 14 +#define IDX_BUFFER_PAGE_DATA_SIZE 13 + I_S_AHI {STRUCT_FLD(field_name, "DATA_SIZE"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5063,7 +4786,7 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUFFER_PAGE_ZIP_SIZE 15 +#define IDX_BUFFER_PAGE_ZIP_SIZE 14 + I_S_AHI {STRUCT_FLD(field_name, "COMPRESSED_SIZE"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5072,7 +4795,7 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUFFER_PAGE_STATE 16 +#define IDX_BUFFER_PAGE_STATE 15 + I_S_AHI {STRUCT_FLD(field_name, "PAGE_STATE"), STRUCT_FLD(field_length, 64), STRUCT_FLD(field_type, MYSQL_TYPE_STRING), @@ -5081,7 +4804,7 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUFFER_PAGE_IO_FIX 17 +#define IDX_BUFFER_PAGE_IO_FIX 16 + I_S_AHI {STRUCT_FLD(field_name, "IO_FIX"), STRUCT_FLD(field_length, 64), STRUCT_FLD(field_type, MYSQL_TYPE_STRING), @@ -5090,7 +4813,7 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUFFER_PAGE_IS_OLD 18 +#define IDX_BUFFER_PAGE_IS_OLD 17 + I_S_AHI {STRUCT_FLD(field_name, "IS_OLD"), STRUCT_FLD(field_length, 3), STRUCT_FLD(field_type, MYSQL_TYPE_STRING), @@ -5099,7 +4822,7 @@ static ST_FIELD_INFO i_s_innodb_buffer_page_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUFFER_PAGE_FREE_CLOCK 19 +#define IDX_BUFFER_PAGE_FREE_CLOCK 18 + I_S_AHI {STRUCT_FLD(field_name, "FREE_PAGE_CLOCK"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5169,13 +4892,11 @@ i_s_innodb_buffer_page_fill( OK(fields[IDX_BUFFER_PAGE_FIX_COUNT]->store( page_info->fix_count)); - if (page_info->hashed) { - OK(field_store_string( - fields[IDX_BUFFER_PAGE_HASHED], "YES")); - } else { - OK(field_store_string( - fields[IDX_BUFFER_PAGE_HASHED], "NO")); - } +#ifdef BTR_CUR_HASH_ADAPT + OK(field_store_string( + fields[IDX_BUFFER_PAGE_HASHED], + page_info->hashed ? "YES" : "NO")); +#endif /* BTR_CUR_HASH_ADAPT */ OK(fields[IDX_BUFFER_PAGE_NEWEST_MOD]->store( page_info->newest_mod, true)); @@ -5209,7 +4930,7 @@ i_s_innodb_buffer_page_fill( OK(fields[IDX_BUFFER_PAGE_TABLE_NAME]->store( table_name, - static_cast(table_name_end - table_name), + uint(table_name_end - table_name), system_charset_info)); fields[IDX_BUFFER_PAGE_TABLE_NAME]->set_notnull(); @@ -5331,7 +5052,7 @@ i_s_innodb_set_page_type( page_info->page_type = I_S_PAGE_TYPE_INDEX; } - page_info->data_size = (ulint)(page_header_get_field( + page_info->data_size = unsigned(page_header_get_field( page, PAGE_HEAP_TOP) - (page_is_comp(page) ? PAGE_NEW_SUPREMUM_END : PAGE_OLD_SUPREMUM_END) @@ -5425,7 +5146,9 @@ i_s_innodb_buffer_page_get_info( block = reinterpret_cast(bpage); frame = block->frame; +#ifdef BTR_CUR_HASH_ADAPT page_info->hashed = (block->index != NULL); +#endif /* BTR_CUR_HASH_ADAPT */ } else { ut_ad(page_info->zip_ssize); frame = bpage->zip.data; @@ -5706,6 +5429,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, +#ifdef BTR_CUR_HASH_ADAPT #define IDX_BUF_LRU_PAGE_HASHED 7 {STRUCT_FLD(field_name, "IS_HASHED"), STRUCT_FLD(field_length, 3), @@ -5714,8 +5438,9 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(field_flags, MY_I_S_MAYBE_NULL), STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, +#endif /* BTR_CUR_HASH_ADAPT */ -#define IDX_BUF_LRU_PAGE_NEWEST_MOD 8 +#define IDX_BUF_LRU_PAGE_NEWEST_MOD 7 + I_S_AHI {STRUCT_FLD(field_name, "NEWEST_MODIFICATION"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5724,7 +5449,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUF_LRU_PAGE_OLDEST_MOD 9 +#define IDX_BUF_LRU_PAGE_OLDEST_MOD 8 + I_S_AHI {STRUCT_FLD(field_name, "OLDEST_MODIFICATION"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5733,7 +5458,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUF_LRU_PAGE_ACCESS_TIME 10 +#define IDX_BUF_LRU_PAGE_ACCESS_TIME 9 + I_S_AHI {STRUCT_FLD(field_name, "ACCESS_TIME"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5742,7 +5467,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUF_LRU_PAGE_TABLE_NAME 11 +#define IDX_BUF_LRU_PAGE_TABLE_NAME 10 + I_S_AHI {STRUCT_FLD(field_name, "TABLE_NAME"), STRUCT_FLD(field_length, 1024), STRUCT_FLD(field_type, MYSQL_TYPE_STRING), @@ -5751,7 +5476,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUF_LRU_PAGE_INDEX_NAME 12 +#define IDX_BUF_LRU_PAGE_INDEX_NAME 11 + I_S_AHI {STRUCT_FLD(field_name, "INDEX_NAME"), STRUCT_FLD(field_length, 1024), STRUCT_FLD(field_type, MYSQL_TYPE_STRING), @@ -5760,7 +5485,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUF_LRU_PAGE_NUM_RECS 13 +#define IDX_BUF_LRU_PAGE_NUM_RECS 12 + I_S_AHI {STRUCT_FLD(field_name, "NUMBER_RECORDS"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5769,7 +5494,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUF_LRU_PAGE_DATA_SIZE 14 +#define IDX_BUF_LRU_PAGE_DATA_SIZE 13 + I_S_AHI {STRUCT_FLD(field_name, "DATA_SIZE"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5778,7 +5503,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUF_LRU_PAGE_ZIP_SIZE 15 +#define IDX_BUF_LRU_PAGE_ZIP_SIZE 14 + I_S_AHI {STRUCT_FLD(field_name, "COMPRESSED_SIZE"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5787,7 +5512,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUF_LRU_PAGE_STATE 16 +#define IDX_BUF_LRU_PAGE_STATE 15 + I_S_AHI {STRUCT_FLD(field_name, "COMPRESSED"), STRUCT_FLD(field_length, 3), STRUCT_FLD(field_type, MYSQL_TYPE_STRING), @@ -5796,7 +5521,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUF_LRU_PAGE_IO_FIX 17 +#define IDX_BUF_LRU_PAGE_IO_FIX 16 + I_S_AHI {STRUCT_FLD(field_name, "IO_FIX"), STRUCT_FLD(field_length, 64), STRUCT_FLD(field_type, MYSQL_TYPE_STRING), @@ -5805,7 +5530,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUF_LRU_PAGE_IS_OLD 18 +#define IDX_BUF_LRU_PAGE_IS_OLD 17 + I_S_AHI {STRUCT_FLD(field_name, "IS_OLD"), STRUCT_FLD(field_length, 3), STRUCT_FLD(field_type, MYSQL_TYPE_STRING), @@ -5814,7 +5539,7 @@ static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, -#define IDX_BUF_LRU_PAGE_FREE_CLOCK 19 +#define IDX_BUF_LRU_PAGE_FREE_CLOCK 18 + I_S_AHI {STRUCT_FLD(field_name, "FREE_PAGE_CLOCK"), STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), @@ -5887,13 +5612,11 @@ i_s_innodb_buf_page_lru_fill( OK(fields[IDX_BUF_LRU_PAGE_FIX_COUNT]->store( page_info->fix_count, true)); - if (page_info->hashed) { - OK(field_store_string( - fields[IDX_BUF_LRU_PAGE_HASHED], "YES")); - } else { - OK(field_store_string( - fields[IDX_BUF_LRU_PAGE_HASHED], "NO")); - } +#ifdef BTR_CUR_HASH_ADAPT + OK(field_store_string( + fields[IDX_BUF_LRU_PAGE_HASHED], + page_info->hashed ? "YES" : "NO")); +#endif /* BTR_CUR_HASH_ADAPT */ OK(fields[IDX_BUF_LRU_PAGE_NEWEST_MOD]->store( page_info->newest_mod, true)); @@ -5927,7 +5650,7 @@ i_s_innodb_buf_page_lru_fill( OK(fields[IDX_BUF_LRU_PAGE_TABLE_NAME]->store( table_name, - static_cast(table_name_end - table_name), + uint(table_name_end - table_name), system_charset_info)); fields[IDX_BUF_LRU_PAGE_TABLE_NAME]->set_notnull(); @@ -6331,8 +6054,6 @@ i_s_dict_fill_sys_tables( if (is_system_tablespace(table->space)) { space_type = "System"; - } else if (DICT_TF_HAS_SHARED_SPACE(table->flags)) { - space_type = "General"; } else { space_type = "Single"; } @@ -8326,9 +8047,6 @@ i_s_dict_fill_sys_tablespaces( file_format = trx_sys_file_format_id_to_name(atomic_blobs); if (is_system_tablespace(space)) { row_format = "Compact or Redundant"; - } else if (fsp_is_shared_tablespace(flags) && !is_compressed) { - file_format = "Any"; - row_format = "Any"; } else if (is_compressed) { row_format = "Compressed"; } else if (atomic_blobs) { @@ -8339,8 +8057,6 @@ i_s_dict_fill_sys_tablespaces( if (is_system_tablespace(space)) { space_type = "System"; - } else if (fsp_is_shared_tablespace(flags)) { - space_type = "General"; } else { space_type = "Single"; } @@ -8370,8 +8086,7 @@ i_s_dict_fill_sys_tablespaces( space_type)); char* filepath = NULL; - if (FSP_FLAGS_HAS_DATA_DIR(flags) - || FSP_FLAGS_GET_SHARED(flags)) { + if (FSP_FLAGS_HAS_DATA_DIR(flags)) { mutex_enter(&dict_sys->mutex); filepath = dict_get_first_path(space); mutex_exit(&dict_sys->mutex); @@ -9439,7 +9154,8 @@ i_s_innodb_mutexes_fill_table( OK(field_store_string(fields[MUTEXES_NAME], mutex->cmutex_name)); OK(field_store_string(fields[MUTEXES_CREATE_FILE], innobase_basename(mutex->cfile_name))); - OK(field_store_ulint(fields[MUTEXES_CREATE_LINE], mutex->cline)); + OK(fields[MUTEXES_CREATE_LINE]->store(mutex->cline, true)); + fields[MUTEXES_CREATE_LINE]->set_notnull(); OK(field_store_ulint(fields[MUTEXES_OS_WAITS], (longlong)mutex->count_os_wait)); OK(schema_table_store_record(thd, tables->table)); } @@ -9452,7 +9168,8 @@ i_s_innodb_mutexes_fill_table( OK(field_store_string(fields[MUTEXES_NAME], block_mutex->cmutex_name)); OK(field_store_string(fields[MUTEXES_CREATE_FILE], buf1)); - OK(field_store_ulint(fields[MUTEXES_CREATE_LINE], block_mutex->cline)); + OK(fields[MUTEXES_CREATE_LINE]->store(block_mutex->cline, true)); + fields[MUTEXES_CREATE_LINE]->set_notnull(); OK(field_store_ulint(fields[MUTEXES_OS_WAITS], (longlong)block_mutex_oswait_count)); OK(schema_table_store_record(thd, tables->table)); } @@ -9476,7 +9193,8 @@ i_s_innodb_mutexes_fill_table( //OK(field_store_string(fields[MUTEXES_NAME], lock->lock_name)); OK(field_store_string(fields[MUTEXES_CREATE_FILE], innobase_basename(lock->cfile_name))); - OK(field_store_ulint(fields[MUTEXES_CREATE_LINE], lock->cline)); + OK(fields[MUTEXES_CREATE_LINE]->store(lock->cline, true)); + fields[MUTEXES_CREATE_LINE]->set_notnull(); OK(field_store_ulint(fields[MUTEXES_OS_WAITS], (longlong)lock->count_os_wait)); OK(schema_table_store_record(thd, tables->table)); } @@ -9489,7 +9207,8 @@ i_s_innodb_mutexes_fill_table( //OK(field_store_string(fields[MUTEXES_NAME], block_lock->lock_name)); OK(field_store_string(fields[MUTEXES_CREATE_FILE], buf1)); - OK(field_store_ulint(fields[MUTEXES_CREATE_LINE], block_lock->cline)); + OK(fields[MUTEXES_CREATE_LINE]->store(block_lock->cline, true)); + fields[MUTEXES_CREATE_LINE]->set_notnull(); OK(field_store_ulint(fields[MUTEXES_OS_WAITS], (longlong)block_lock_oswait_count)); OK(schema_table_store_record(thd, tables->table)); } diff --git a/storage/innobase/handler/i_s.h b/storage/innobase/handler/i_s.h index d272490dd27..8d34fbf8fbb 100644 --- a/storage/innobase/handler/i_s.h +++ b/storage/innobase/handler/i_s.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2007, 2015, Oracle and/or its affiliates. All Rights Reserved. -Copyrigth (c) 2014, 2016, MariaDB Corporation +Copyrigth (c) 2014, 2017, MariaDB Corporation This 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 @@ -50,7 +50,6 @@ extern struct st_maria_plugin i_s_innodb_ft_config; extern struct st_maria_plugin i_s_innodb_buffer_page; extern struct st_maria_plugin i_s_innodb_buffer_page_lru; extern struct st_maria_plugin i_s_innodb_buffer_stats; -extern struct st_maria_plugin i_s_innodb_temp_table_info; extern struct st_maria_plugin i_s_innodb_sys_tables; extern struct st_maria_plugin i_s_innodb_sys_tablestats; extern struct st_maria_plugin i_s_innodb_sys_indexes; diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc index 612a2f9a690..3bc56c2d737 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.cc +++ b/storage/innobase/ibuf/ibuf0ibuf.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. +Copyright (c) 2016, 2017, MariaDB Corporation. This 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 @@ -571,7 +571,9 @@ ibuf_init_at_db_start(void) ibuf->index->n_uniq = REC_MAX_N_FIELDS; rw_lock_create(index_tree_rw_lock_key, &ibuf->index->lock, SYNC_IBUF_INDEX_TREE); +#ifdef BTR_CUR_ADAPT ibuf->index->search_info = btr_search_info_create(ibuf->index->heap); +#endif /* BTR_CUR_ADAPT */ ibuf->index->page = FSP_IBUF_TREE_ROOT_PAGE_NO; ut_d(ibuf->index->cached = TRUE); return (error); @@ -808,7 +810,7 @@ ibuf_bitmap_get_map_page_func( const page_id_t& page_id, const page_size_t& page_size, const char* file, - ulint line, + unsigned line, mtr_t* mtr) { buf_block_t* block = NULL; @@ -1136,7 +1138,7 @@ ibuf_page_low( ibool x_latch, #endif /* UNIV_DEBUG */ const char* file, - ulint line, + unsigned line, mtr_t* mtr) { ibool ret; @@ -1227,8 +1229,9 @@ ibuf_rec_get_page_no_func( const byte* field; ulint len; - ut_ad(mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_S_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, rec, + MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_S_FIX)); ut_ad(ibuf_inside(mtr)); ut_ad(rec_get_n_fields_old(rec) > 2); @@ -1265,8 +1268,8 @@ ibuf_rec_get_space_func( const byte* field; ulint len; - ut_ad(mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_S_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, rec, MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_S_FIX)); ut_ad(ibuf_inside(mtr)); ut_ad(rec_get_n_fields_old(rec) > 2); @@ -1315,8 +1318,8 @@ ibuf_rec_get_info_func( ulint info_len_local; ulint counter_local; - ut_ad(mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_S_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, rec, MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_S_FIX)); ut_ad(ibuf_inside(mtr)); fields = rec_get_n_fields_old(rec); ut_a(fields > IBUF_REC_FIELD_USER); @@ -1387,8 +1390,8 @@ ibuf_rec_get_op_type_func( { ulint len; - ut_ad(mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_S_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, rec, MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_S_FIX)); ut_ad(ibuf_inside(mtr)); ut_ad(rec_get_n_fields_old(rec) > 2); @@ -1586,8 +1589,8 @@ ibuf_build_entry_from_ibuf_rec_func( ulint comp; dict_index_t* index; - ut_ad(mtr_memo_contains_page(mtr, ibuf_rec, MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains_page(mtr, ibuf_rec, MTR_MEMO_PAGE_S_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, ibuf_rec, MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_S_FIX)); ut_ad(ibuf_inside(mtr)); data = rec_get_nth_field_old(ibuf_rec, IBUF_REC_FIELD_MARKER, &len); @@ -1708,8 +1711,8 @@ ibuf_rec_get_volume_func( ibuf_op_t op; ulint info_len; - ut_ad(mtr_memo_contains_page(mtr, ibuf_rec, MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains_page(mtr, ibuf_rec, MTR_MEMO_PAGE_S_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, ibuf_rec, MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_S_FIX)); ut_ad(ibuf_inside(mtr)); ut_ad(rec_get_n_fields_old(ibuf_rec) > 2); @@ -2291,8 +2294,8 @@ ibuf_get_merge_page_nos_func( ulint limit; ulint n_pages; - ut_ad(mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_S_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, rec, MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_S_FIX)); ut_ad(ibuf_inside(mtr)); *n_stored = 0; @@ -2875,8 +2878,8 @@ ibuf_get_volume_buffered_count_func( const byte* types; ulint n_fields; - ut_ad(mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_S_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, rec, MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_S_FIX)); ut_ad(ibuf_inside(mtr)); n_fields = rec_get_n_fields_old(rec); @@ -3248,8 +3251,8 @@ ibuf_get_entry_counter_low_func( ulint len; ut_ad(ibuf_inside(mtr)); - ut_ad(mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_S_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, rec, MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_S_FIX)); ut_ad(rec_get_n_fields_old(rec) > 2); field = rec_get_nth_field_old(rec, IBUF_REC_FIELD_MARKER, &len); @@ -3953,7 +3956,9 @@ ibuf_insert_to_index_page( ut_ad(!dict_index_is_online_ddl(index));// this is an ibuf_dummy index ut_ad(ibuf_inside(mtr)); ut_ad(dtuple_check_typed(entry)); +#ifdef BTR_CUR_HASH_ADAPT ut_ad(!block->index); +#endif /* BTR_CUR_HASH_ADAPT */ ut_ad(mtr->is_named_space(block->page.id.space())); if (UNIV_UNLIKELY(dict_table_is_comp(index->table) diff --git a/storage/innobase/include/api0api.h b/storage/innobase/include/api0api.h deleted file mode 100644 index ec02febee74..00000000000 --- a/storage/innobase/include/api0api.h +++ /dev/null @@ -1,1040 +0,0 @@ -/***************************************************************************** - -Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. - -This 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/api0api.h -InnoDB Native API - -2008-08-01 Created by Sunny Bains. -3/20/2011 Jimmy Yang extracted from Embedded InnoDB -*******************************************************/ - -#ifndef api0api_h -#define api0api_h - -#include "db0err.h" -#include - -#if defined(__GNUC__) -#define UNIV_NO_IGNORE MY_ATTRIBUTE ((warn_unused_result)) -#else -#define UNIV_NO_IGNORE -#endif /* __GNUC__ */ - -/* See comment about ib_bool_t as to why the two macros are unsigned long. */ -/** The boolean value of "true" used internally within InnoDB */ -#define IB_TRUE 0x1UL -/** The boolean value of "false" used internally within InnoDB */ -#define IB_FALSE 0x0UL - -/* Basic types used by the InnoDB API. */ -/** All InnoDB error codes are represented by ib_err_t */ -typedef enum dberr_t ib_err_t; -/** Representation of a byte within InnoDB */ -typedef unsigned char ib_byte_t; -/** Representation of an unsigned long int within InnoDB */ -#ifdef _WIN64 -typedef unsigned __int64 ib_ulint_t; -#else -typedef unsigned long int ib_ulint_t; -#endif /* _WIN64 */ - -/* We assume C99 support except when using VisualStudio. */ -#if !defined(_MSC_VER) -#include -#endif /* _MSC_VER */ - -/* Integer types used by the API. Microsft VS defines its own types -and we use the Microsoft types when building with Visual Studio. */ -#if defined(_MSC_VER) -/** A signed 8 bit integral type. */ -typedef __int8 ib_i8_t; -#else -/** A signed 8 bit integral type. */ -typedef int8_t ib_i8_t; -#endif - -#if defined(_MSC_VER) -/** An unsigned 8 bit integral type. */ -typedef unsigned __int8 ib_u8_t; -#else -/** An unsigned 8 bit integral type. */ -typedef uint8_t ib_u8_t; -#endif - -#if defined(_MSC_VER) -/** A signed 16 bit integral type. */ -typedef __int16 ib_i16_t; -#else -/** A signed 16 bit integral type. */ -typedef int16_t ib_i16_t; -#endif - -#if defined(_MSC_VER) -/** An unsigned 16 bit integral type. */ -typedef unsigned __int16 ib_u16_t; -#else -/** An unsigned 16 bit integral type. */ -typedef uint16_t ib_u16_t; -#endif - -#if defined(_MSC_VER) -/** A signed 32 bit integral type. */ -typedef __int32 ib_i32_t; -#else -/** A signed 32 bit integral type. */ -typedef int32_t ib_i32_t; -#endif - -#if defined(_MSC_VER) -/** An unsigned 32 bit integral type. */ -typedef unsigned __int32 ib_u32_t; -#else -/** An unsigned 32 bit integral type. */ -typedef uint32_t ib_u32_t; -#endif - -#if defined(_MSC_VER) -/** A signed 64 bit integral type. */ -typedef __int64 ib_i64_t; -#else -/** A signed 64 bit integral type. */ -typedef int64_t ib_i64_t; -#endif - -#if defined(_MSC_VER) -/** An unsigned 64 bit integral type. */ -typedef unsigned __int64 ib_u64_t; -#else -/** An unsigned 64 bit integral type. */ -typedef uint64_t ib_u64_t; -#endif - -typedef void* ib_opaque_t; -typedef ib_opaque_t ib_charset_t; -typedef ib_ulint_t ib_bool_t; -typedef ib_u64_t ib_id_u64_t; - -/** @enum ib_cfg_type_t Possible types for a configuration variable. */ -typedef enum { - IB_CFG_IBOOL, /*!< The configuration parameter is - of type ibool */ - - /* XXX Can we avoid having different types for ulint and ulong? - - On Win64 "unsigned long" is 32 bits - - ulong is always defined as "unsigned long" - - On Win64 ulint is defined as 64 bit integer - => On Win64 ulint != ulong. - If we typecast all ulong and ulint variables to the smaller type - ulong, then we will cut the range of the ulint variables. - This is not a problem for most ulint variables because their max - allowed values do not exceed 2^32-1 (e.g. log_groups is ulint - but its max allowed value is 10). BUT buffer_pool_size and - log_file_size allow up to 2^64-1. */ - - IB_CFG_ULINT, /*!< The configuration parameter is - of type ulint */ - - IB_CFG_ULONG, /*!< The configuration parameter is - of type ulong */ - - IB_CFG_TEXT, /*!< The configuration parameter is - of type char* */ - - IB_CFG_CB /*!< The configuration parameter is - a callback parameter */ -} ib_cfg_type_t; - -/** @enum ib_col_type_t column types that are supported. */ -typedef enum { - IB_VARCHAR = 1, /*!< Character varying length. The - column is not padded. */ - - IB_CHAR = 2, /*!< Fixed length character string. The - column is padded to the right. */ - - IB_BINARY = 3, /*!< Fixed length binary, similar to - IB_CHAR but the column is not padded - to the right. */ - - IB_VARBINARY = 4, /*!< Variable length binary */ - - IB_BLOB = 5, /*!< Binary large object, or - a TEXT type */ - - IB_INT = 6, /*!< Integer: can be any size - from 1 - 8 bytes. If the size is - 1, 2, 4 and 8 bytes then you can use - the typed read and write functions. For - other sizes you will need to use the - ib_col_get_value() function and do the - conversion yourself. */ - - IB_SYS = 8, /*!< System column, this column can - be one of DATA_TRX_ID, DATA_ROLL_PTR - or DATA_ROW_ID. */ - - IB_FLOAT = 9, /*!< C (float) floating point value. */ - - IB_DOUBLE = 10, /*!> C (double) floating point value. */ - - IB_DECIMAL = 11, /*!< Decimal stored as an ASCII - string */ - - IB_VARCHAR_ANYCHARSET = 12, /*!< Any charset, varying length */ - - IB_CHAR_ANYCHARSET = 13 /*!< Any charset, fixed length */ - -} ib_col_type_t; - -/** @enum ib_tbl_fmt_t InnoDB table format types */ -typedef enum { - IB_TBL_REDUNDANT, /*!< Redundant row format, the column - type and length is stored in the row.*/ - - IB_TBL_COMPACT, /*!< Compact row format, the column - type is not stored in the row. The - length is stored in the row but the - storage format uses a compact format - to store the length of the column data - and record data storage format also - uses less storage. */ - - IB_TBL_DYNAMIC, /*!< Compact row format. BLOB prefixes - are not stored in the clustered index */ - - IB_TBL_COMPRESSED /*!< Similar to dynamic format but - with pages compressed */ -} ib_tbl_fmt_t; - -/** @enum ib_col_attr_t InnoDB column attributes */ -typedef enum { - IB_COL_NONE = 0, /*!< No special attributes. */ - - IB_COL_NOT_NULL = 1, /*!< Column data can't be NULL. */ - - IB_COL_UNSIGNED = 2, /*!< Column is IB_INT and unsigned. */ - - IB_COL_NOT_USED = 4, /*!< Future use, reserved. */ - - IB_COL_CUSTOM1 = 8, /*!< Custom precision type, this is - a bit that is ignored by InnoDB and so - can be set and queried by users. */ - - IB_COL_CUSTOM2 = 16, /*!< Custom precision type, this is - a bit that is ignored by InnoDB and so - can be set and queried by users. */ - - IB_COL_CUSTOM3 = 32 /*!< Custom precision type, this is - a bit that is ignored by InnoDB and so - can be set and queried by users. */ -} ib_col_attr_t; - -/* Note: must match lock0types.h */ -/** @enum ib_lck_mode_t InnoDB lock modes. */ -typedef enum { - IB_LOCK_IS = 0, /*!< Intention shared, an intention - lock should be used to lock tables */ - - IB_LOCK_IX, /*!< Intention exclusive, an intention - lock should be used to lock tables */ - - IB_LOCK_S, /*!< Shared locks should be used to - lock rows */ - - IB_LOCK_X, /*!< Exclusive locks should be used to - lock rows*/ - - IB_LOCK_TABLE_X, /*!< exclusive table lock */ - - IB_LOCK_NONE, /*!< This is used internally to note - consistent read */ - - IB_LOCK_NUM = IB_LOCK_NONE /*!< number of lock modes */ -} ib_lck_mode_t; - -typedef enum { - IB_CLUSTERED = 1, /*!< clustered index */ - IB_UNIQUE = 2 /*!< unique index */ -} ib_index_type_t; - -/** @enum ib_srch_mode_t InnoDB cursor search modes for ib_cursor_moveto(). -Note: Values must match those found in page0cur.h */ -typedef enum { - IB_CUR_G = 1, /*!< If search key is not found then - position the cursor on the row that - is greater than the search key */ - - IB_CUR_GE = 2, /*!< If the search key not found then - position the cursor on the row that - is greater than or equal to the search - key */ - - IB_CUR_L = 3, /*!< If search key is not found then - position the cursor on the row that - is less than the search key */ - - IB_CUR_LE = 4 /*!< If search key is not found then - position the cursor on the row that - is less than or equal to the search - key */ -} ib_srch_mode_t; - -/** @enum ib_match_mode_t Various match modes used by ib_cursor_moveto() */ -typedef enum { - IB_CLOSEST_MATCH, /*!< Closest match possible */ - - IB_EXACT_MATCH, /*!< Search using a complete key - value */ - - IB_EXACT_PREFIX /*!< Search using a key prefix which - must match to rows: the prefix may - contain an incomplete field (the - last field in prefix may be just - a prefix of a fixed length column) */ -} ib_match_mode_t; - -/** @struct ib_col_meta_t InnoDB column meta data. */ -typedef struct { - ib_col_type_t type; /*!< Type of the column */ - - ib_col_attr_t attr; /*!< Column attributes */ - - ib_u32_t type_len; /*!< Length of type */ - - ib_u16_t client_type; /*!< 16 bits of data relevant only to - the client. InnoDB doesn't care */ - - ib_charset_t* charset; /*!< Column charset */ -} ib_col_meta_t; - -/* Note: Must be in sync with trx0trx.h */ -/** @enum ib_trx_level_t Transaction isolation levels */ -typedef enum { - IB_TRX_READ_UNCOMMITTED = 0, /*!< Dirty read: non-locking SELECTs are - performed so that we do not look at a - possible earlier version of a record; - thus they are not 'consistent' reads - under this isolation level; otherwise - like level 2 */ - - IB_TRX_READ_COMMITTED = 1, /*!< Somewhat Oracle-like isolation, - except that in range UPDATE and DELETE - we must block phantom rows with - next-key locks; SELECT ... FOR UPDATE - and ... LOCK IN SHARE MODE only lock - the index records, NOT the gaps before - them, and thus allow free inserting; - each consistent read reads its own - snapshot */ - - IB_TRX_REPEATABLE_READ = 2, /*!< All consistent reads in the same - trx read the same snapshot; full - next-key locking used in locking reads - to block insertions into gaps */ - - IB_TRX_SERIALIZABLE = 3 /*!< All plain SELECTs are converted to - LOCK IN SHARE MODE reads */ -} ib_trx_level_t; - -/** Generical InnoDB callback prototype. */ -typedef void (*ib_cb_t)(void); - -#define IB_CFG_BINLOG_ENABLED 0x1 -#define IB_CFG_MDL_ENABLED 0x2 -#define IB_CFG_DISABLE_ROWLOCK 0x4 - -/** The first argument to the InnoDB message logging function. By default -it's set to stderr. You should treat ib_msg_stream_t as a void*, since -it will probably change in the future. */ -typedef FILE* ib_msg_stream_t; - -/** All log messages are written to this function.It should have the same -behavior as fprintf(3). */ -typedef int (*ib_msg_log_t)(ib_msg_stream_t, const char*, ...); - -/* Note: This is to make it easy for API users to have type -checking for arguments to our functions. Making it ib_opaque_t -by itself will result in pointer decay resulting in subverting -of the compiler's type checking. */ - -/** InnoDB tuple handle. This handle can refer to either a cluster index -tuple or a secondary index tuple. There are two types of tuples for each -type of index, making a total of four types of tuple handles. There -is a tuple for reading the entire row contents and another for searching -on the index key. */ -typedef struct ib_tuple_t* ib_tpl_t; - -/** InnoDB transaction handle, all database operations need to be covered -by transactions. This handle represents a transaction. The handle can be -created with ib_trx_begin(), you commit your changes with ib_trx_commit() -and undo your changes using ib_trx_rollback(). If the InnoDB deadlock -monitor rolls back the transaction then you need to free the transaction -using the function ib_trx_release(). You can query the state of an InnoDB -transaction by calling ib_trx_state(). */ -typedef struct trx_t* ib_trx_t; - -/** InnoDB cursor handle */ -typedef struct ib_cursor_t* ib_crsr_t; - -/*************************************************************//** -This function is used to compare two data fields for which the data type -is such that we must use the client code to compare them. - -@param col_meta column meta data -@param p1 key -@oaram p1_len key length -@param p2 second key -@param p2_len second key length -@return 1, 0, -1, if a is greater, equal, less than b, respectively */ - -typedef int (*ib_client_cmp_t)( - const ib_col_meta_t* col_meta, - const ib_byte_t* p1, - ib_ulint_t p1_len, - const ib_byte_t* p2, - ib_ulint_t p2_len); - -/* This should be the same as univ.i */ -/** Represents SQL_NULL length */ -#define IB_SQL_NULL 0xFFFFFFFF - -/*****************************************************************//** -Start a transaction that's been rolled back. This special function -exists for the case when InnoDB's deadlock detector has rolledack -a transaction. While the transaction has been rolled back the handle -is still valid and can be reused by calling this function. If you -don't want to reuse the transaction handle then you can free the handle -by calling ib_trx_release(). -@return innobase txn handle */ -ib_err_t -ib_trx_start( -/*=========*/ - ib_trx_t ib_trx, /*!< in: transaction to restart */ - ib_trx_level_t ib_trx_level, /*!< in: trx isolation level */ - ib_bool_t read_write, /*!< in: true if read write - transaction */ - ib_bool_t auto_commit, /*!< in: auto commit after each - single DML */ - void* thd); /*!< in: THD */ - -/*****************************************************************//** -Begin a transaction. This will allocate a new transaction handle and -put the transaction in the active state. -@return innobase txn handle */ -ib_trx_t -ib_trx_begin( -/*=========*/ - ib_trx_level_t ib_trx_level, /*!< in: trx isolation level */ - ib_bool_t read_write, /*!< in: true if read write - transaction */ - ib_bool_t auto_commit); /*!< in: auto commit after each - single DML */ - -/*****************************************************************//** -Check if the transaction is read_only */ -ib_u32_t -ib_trx_read_only( -/*=============*/ - ib_trx_t ib_trx); /*!< in: trx handle */ - -/*****************************************************************//** -Release the resources of the transaction. If the transaction was -selected as a victim by InnoDB and rolled back then use this function -to free the transaction handle. -@return DB_SUCCESS or err code */ -ib_err_t -ib_trx_release( -/*===========*/ - ib_trx_t ib_trx); /*!< in: trx handle */ - -/*****************************************************************//** -Commit a transaction. This function will release the schema latches too. -It will also free the transaction handle. -@return DB_SUCCESS or err code */ -ib_err_t -ib_trx_commit( -/*==========*/ - ib_trx_t ib_trx); /*!< in: trx handle */ - -/*****************************************************************//** -Rollback a transaction. This function will release the schema latches too. -It will also free the transaction handle. -@return DB_SUCCESS or err code */ -ib_err_t -ib_trx_rollback( -/*============*/ - ib_trx_t ib_trx); /*!< in: trx handle */ - -/*****************************************************************//** -Open an InnoDB table and return a cursor handle to it. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_open_table_using_id( -/*==========================*/ - ib_id_u64_t table_id, /*!< in: table id of table to open */ - ib_trx_t ib_trx, /*!< in: Current transaction handle - can be NULL */ - ib_crsr_t* ib_crsr); /*!< out,own: InnoDB cursor */ - -/*****************************************************************//** -Open an InnoDB secondary index cursor and return a cursor handle to it. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_open_index_using_name( -/*============================*/ - ib_crsr_t ib_open_crsr, /*!< in: open/active cursor */ - const char* index_name, /*!< in: secondary index name */ - ib_crsr_t* ib_crsr, /*!< out,own: InnoDB index cursor */ - int* idx_type, /*!< out: index is cluster index */ - ib_id_u64_t* idx_id); /*!< out: index id */ - -/*****************************************************************//** -Open an InnoDB table by name and return a cursor handle to it. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_open_table( -/*=================*/ - const char* name, /*!< in: table name */ - ib_trx_t ib_trx, /*!< in: Current transaction handle - can be NULL */ - ib_crsr_t* ib_crsr); /*!< out,own: InnoDB cursor */ - -/*****************************************************************//** -Reset the cursor. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_reset( -/*============*/ - ib_crsr_t ib_crsr); /*!< in/out: InnoDB cursor */ - -/*****************************************************************//** -Close an InnoDB table and free the cursor. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_close( -/*============*/ - ib_crsr_t ib_crsr); /*!< in/out: InnoDB cursor */ - -/*****************************************************************//** -Close the table, decrement n_ref_count count. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_close_table( -/*==================*/ - ib_crsr_t ib_crsr); /*!< in/out: InnoDB cursor */ - -/*****************************************************************//** -update the cursor with new transactions and also reset the cursor -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_new_trx( -/*==============*/ - ib_crsr_t ib_crsr, /*!< in/out: InnoDB cursor */ - ib_trx_t ib_trx); /*!< in: transaction */ - -/*****************************************************************//** -Commit the transaction in a cursor -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_commit_trx( -/*=================*/ - ib_crsr_t ib_crsr, /*!< in/out: InnoDB cursor */ - ib_trx_t ib_trx); /*!< in: transaction */ - -/*****************************************************************//** -Insert a row to a table. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_insert_row( -/*=================*/ - ib_crsr_t ib_crsr, /*!< in/out: InnoDB cursor instance */ - const ib_tpl_t ib_tpl); /*!< in: tuple to insert */ - -/*****************************************************************//** -Update a row in a table. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_update_row( -/*=================*/ - ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - const ib_tpl_t ib_old_tpl, /*!< in: Old tuple in table */ - const ib_tpl_t ib_new_tpl); /*!< in: New tuple to update */ - -/*****************************************************************//** -Delete a row in a table. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_delete_row( -/*=================*/ - ib_crsr_t ib_crsr); /*!< in: cursor instance */ - -/*****************************************************************//** -Read current row. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_read_row( -/*===============*/ - ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - ib_tpl_t ib_tpl, /*!< out: read cols into this tuple */ - void** row_buf, /*!< in/out: row buffer */ - ib_ulint_t* row_len); /*!< in/out: row buffer len */ - -/*****************************************************************//** -Move cursor to the first record in the table. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_first( -/*============*/ - ib_crsr_t ib_crsr); /*!< in: InnoDB cursor instance */ - -/*****************************************************************//** -Move cursor to the next record in the table. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_next( -/*===========*/ - ib_crsr_t ib_crsr); /*!< in: InnoDB cursor instance */ - -/*****************************************************************//** -Search for key. -@return DB_SUCCESS or err code */ -ib_err_t -ib_cursor_moveto( -/*=============*/ - ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - ib_tpl_t ib_tpl, /*!< in: Key to search for */ - ib_srch_mode_t ib_srch_mode); /*!< in: search mode */ - -/*****************************************************************//** -Set the match mode for ib_cursor_move(). */ -void -ib_cursor_set_match_mode( -/*=====================*/ - ib_crsr_t ib_crsr, /*!< in: Cursor instance */ - ib_match_mode_t match_mode); /*!< in: ib_cursor_moveto match mode */ - -/*****************************************************************//** -Set a column of the tuple. Make a copy using the tuple's heap. -@return DB_SUCCESS or error code */ -ib_err_t -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_bool_t need_cpy); /*!< in: if need memcpy */ - - -/*****************************************************************//** -Get the size of the data available in the column the tuple. -@return bytes avail or IB_SQL_NULL */ -ib_ulint_t -ib_col_get_len( -/*===========*/ - ib_tpl_t ib_tpl, /*!< in: tuple instance */ - ib_ulint_t i); /*!< in: column index in tuple */ - -/*****************************************************************//** -Copy a column value from the tuple. -@return bytes copied or IB_SQL_NULL */ -ib_ulint_t -ib_col_copy_value( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: tuple instance */ - ib_ulint_t i, /*!< in: column index in tuple */ - void* dst, /*!< out: copied data value */ - ib_ulint_t len); /*!< in: max data value len to copy */ - -/*************************************************************//** -Read a signed int 8 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_i8( -/*=============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_i8_t* ival); /*!< out: integer value */ - -/*************************************************************//** -Read an unsigned int 8 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_u8( -/*=============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_u8_t* ival); /*!< out: integer value */ - -/*************************************************************//** -Read a signed int 16 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_i16( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_i16_t* ival); /*!< out: integer value */ - -/*************************************************************//** -Read an unsigned int 16 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_u16( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_u16_t* ival); /*!< out: integer value */ - -/*************************************************************//** -Read a signed int 32 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_i32( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_i32_t* ival); /*!< out: integer value */ - -/*************************************************************//** -Read an unsigned int 32 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_u32( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_u32_t* ival); /*!< out: integer value */ - -/*************************************************************//** -Read a signed int 64 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_i64( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_i64_t* ival); /*!< out: integer value */ - -/*************************************************************//** -Read an unsigned int 64 bit column from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_u64( -/*==============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_u64_t* ival); /*!< out: integer value */ - -/*****************************************************************//** -Get a column value pointer from the tuple. -@return NULL or pointer to buffer */ -const void* -ib_col_get_value( -/*=============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i); /*!< in: column number */ - -/*****************************************************************//** -Get a column type, length and attributes from the tuple. -@return len of column data */ -ib_ulint_t -ib_col_get_meta( -/*============*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t i, /*!< in: column number */ - ib_col_meta_t* ib_col_meta); /*!< out: column meta data */ - -/*****************************************************************//** -"Clear" or reset an InnoDB tuple. We free the heap and recreate the tuple. -@return new tuple, or NULL */ -ib_tpl_t -ib_tuple_clear( -/*============*/ - ib_tpl_t ib_tpl); /*!< in: InnoDB tuple */ - -/*****************************************************************//** -Create a new cluster key search tuple and copy the contents of the -secondary index key tuple columns that refer to the cluster index record -to the cluster key. It does a deep copy of the column data. -@return DB_SUCCESS or error code */ -ib_err_t -ib_tuple_get_cluster_key( -/*=====================*/ - ib_crsr_t ib_crsr, /*!< in: secondary index cursor */ - ib_tpl_t* ib_dst_tpl, /*!< out,own: destination tuple */ - const ib_tpl_t ib_src_tpl); /*!< in: source tuple */ - -/*****************************************************************//** -Create an InnoDB tuple used for index/table search. -@return tuple for current index */ -ib_tpl_t -ib_sec_search_tuple_create( -/*=======================*/ - ib_crsr_t ib_crsr); /*!< in: Cursor instance */ - -/*****************************************************************//** -Create an InnoDB tuple used for index/table search. -@return tuple for current index */ -ib_tpl_t -ib_sec_read_tuple_create( -/*=====================*/ - ib_crsr_t ib_crsr); /*!< in: Cursor instance */ - -/*****************************************************************//** -Create an InnoDB tuple used for table key operations. -@return tuple for current table */ -ib_tpl_t -ib_clust_search_tuple_create( -/*=========================*/ - ib_crsr_t ib_crsr); /*!< in: Cursor instance */ - -/*****************************************************************//** -Create an InnoDB tuple for table row operations. -@return tuple for current table */ -ib_tpl_t -ib_clust_read_tuple_create( -/*=======================*/ - ib_crsr_t ib_crsr); /*!< in: Cursor instance */ - -/*****************************************************************//** -Return the number of user columns in the tuple definition. -@return number of user columns */ -ib_ulint_t -ib_tuple_get_n_user_cols( -/*=====================*/ - const ib_tpl_t ib_tpl); /*!< in: Tuple for current table */ - -/*****************************************************************//** -Return the number of columns in the tuple definition. -@return number of columns */ -ib_ulint_t -ib_tuple_get_n_cols( -/*================*/ - const ib_tpl_t ib_tpl); /*!< in: Tuple for current table */ - -/*****************************************************************//** -Destroy an InnoDB tuple. */ -void -ib_tuple_delete( -/*============*/ - ib_tpl_t ib_tpl); /*!< in,own: Tuple instance to delete */ - -/*****************************************************************//** -Truncate a table. The cursor handle will be closed and set to NULL -on success. -@return DB_SUCCESS or error code */ -ib_err_t -ib_cursor_truncate( -/*===============*/ - ib_crsr_t* ib_crsr, /*!< in/out: cursor for table - to truncate */ - ib_id_u64_t* table_id); /*!< out: new table id */ - -/*****************************************************************//** -Get a table id. -@return DB_SUCCESS if found */ -ib_err_t -ib_table_get_id( -/*============*/ - const char* table_name, /*!< in: table to find */ - ib_id_u64_t* table_id); /*!< out: table id if found */ - -/*****************************************************************//** -Check if cursor is positioned. -@return IB_TRUE if positioned */ -ib_bool_t -ib_cursor_is_positioned( -/*====================*/ - const ib_crsr_t ib_crsr); /*!< in: InnoDB cursor instance */ - -/*****************************************************************//** -Checks if the data dictionary is latched in exclusive mode by a -user transaction. -@return TRUE if exclusive latch */ -ib_bool_t -ib_schema_lock_is_exclusive( -/*========================*/ - const ib_trx_t ib_trx); /*!< in: transaction */ - -/*****************************************************************//** -Lock an InnoDB cursor/table. -@return DB_SUCCESS or error code */ -ib_err_t -ib_cursor_lock( -/*===========*/ - ib_crsr_t ib_crsr, /*!< in/out: InnoDB cursor */ - ib_lck_mode_t ib_lck_mode); /*!< in: InnoDB lock mode */ - -/*****************************************************************//** -Set the Lock an InnoDB table using the table id. -@return DB_SUCCESS or error code */ -ib_err_t -ib_table_lock( -/*===========*/ - ib_trx_t ib_trx, /*!< in/out: transaction */ - ib_id_u64_t table_id, /*!< in: table id */ - ib_lck_mode_t ib_lck_mode); /*!< in: InnoDB lock mode */ - -/*****************************************************************//** -Set the Lock mode of the cursor. -@return DB_SUCCESS or error code */ -ib_err_t -ib_cursor_set_lock_mode( -/*====================*/ - ib_crsr_t ib_crsr, /*!< in/out: InnoDB cursor */ - ib_lck_mode_t ib_lck_mode); /*!< in: InnoDB lock mode */ - -/*****************************************************************//** -Set need to access clustered index record flag. */ -void -ib_cursor_set_cluster_access( -/*=========================*/ - ib_crsr_t ib_crsr); /*!< in/out: InnoDB cursor */ - -/*****************************************************************//** -Inform the cursor that it's the start of an SQL statement. */ -void -ib_cursor_stmt_begin( -/*=================*/ - ib_crsr_t ib_crsr); /*!< in: cursor */ - -/*****************************************************************//** -Write a double value to a column. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_write_double( -/*==================*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - int col_no, /*!< in: column number */ - double val); /*!< in: value to write */ - -/*************************************************************//** -Read a double column value from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_double( -/*=================*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t col_no, /*!< in: column number */ - double* dval); /*!< out: double value */ - -/*****************************************************************//** -Write a float value to a column. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_write_float( -/*=================*/ - ib_tpl_t ib_tpl, /*!< in/out: tuple to write to */ - int col_no, /*!< in: column number */ - float val); /*!< in: value to write */ - -/*************************************************************//** -Read a float value from an InnoDB tuple. -@return DB_SUCCESS or error */ -ib_err_t -ib_tuple_read_float( -/*================*/ - ib_tpl_t ib_tpl, /*!< in: InnoDB tuple */ - ib_ulint_t col_no, /*!< in: column number */ - float* fval); /*!< out: float value */ - -/*****************************************************************//** -Get a column type, length and attributes from the tuple. -@return len of column data */ -const char* -ib_col_get_name( -/*============*/ - ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - ib_ulint_t i); /*!< in: column index in tuple */ - -/*****************************************************************//** -Get an index field name from the cursor. -@return name of the field */ -const char* -ib_get_idx_field_name( -/*==================*/ - ib_crsr_t ib_crsr, /*!< in: InnoDB cursor instance */ - ib_ulint_t i); /*!< in: column index in tuple */ - -/*****************************************************************//** -Truncate a table. -@return DB_SUCCESS or error code */ -ib_err_t -ib_table_truncate( -/*==============*/ - const char* table_name, /*!< in: table name */ - ib_id_u64_t* table_id); /*!< out: new table id */ - -/*****************************************************************//** -Get generic configure status -@return configure status*/ -int -ib_cfg_get_cfg(); -/*============*/ - -/*****************************************************************//** -Increase/decrease the memcached sync count of table to sync memcached -DML with SQL DDLs. -@return DB_SUCCESS or error number */ -ib_err_t -ib_cursor_set_memcached_sync( -/*=========================*/ - ib_crsr_t ib_crsr, /*!< in: cursor */ - ib_bool_t flag); /*!< in: true for increasing */ - -/*****************************************************************//** -Return isolation configuration set by "innodb_api_trx_level" -@return trx isolation level*/ -ib_trx_level_t -ib_cfg_trx_level(); -/*==============*/ - -/*****************************************************************//** -Return configure value for background commit interval (in seconds) -@return background commit interval (in seconds) */ -ib_ulint_t -ib_cfg_bk_commit_interval(); -/*=======================*/ - -/*****************************************************************//** -Get a trx start time. -@return trx start_time */ -ib_u64_t -ib_trx_get_start_time( -/*==================*/ - ib_trx_t ib_trx); /*!< in: transaction */ - -/*****************************************************************//** -Wrapper of ut_strerr() which converts an InnoDB error number to a -human readable text message. -@return string, describing the error */ -const char* -ib_ut_strerr( -/*=========*/ - ib_err_t num); /*!< in: error number */ - -/** Check the table whether it contains virtual columns. -@param[in] crsr InnoDB Cursor -@return true if table contains virtual column else false. */ -ib_bool_t -ib_is_virtual_table( - ib_crsr_t crsr); - -#endif /* api0api_h */ diff --git a/storage/innobase/include/api0misc.h b/storage/innobase/include/api0misc.h deleted file mode 100644 index 84ac3d622a9..00000000000 --- a/storage/innobase/include/api0misc.h +++ /dev/null @@ -1,76 +0,0 @@ -/***************************************************************************** - -Copyright (c) 2008, 2014, Oracle and/or its affiliates. All Rights Reserved. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by 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/api0misc.h -InnoDB Native API - -3/20/2011 Jimmy Yang extracted from Embedded InnoDB -2008 Created by Sunny Bains -*******************************************************/ - -#ifndef api0misc_h -#define api0misc_h - -#include "univ.i" -#include "os0file.h" -#include "que0que.h" -#include "trx0trx.h" - -/** Whether binlog is enabled for applications using InnoDB APIs */ -extern my_bool ib_binlog_enabled; - -/** Whether MySQL MDL is enabled for applications using InnoDB APIs */ -extern my_bool ib_mdl_enabled; - -/** Whether InnoDB row lock is disabled for applications using InnoDB APIs */ -extern my_bool ib_disable_row_lock; - -/** configure value for transaction isolation level */ -extern ulong ib_trx_level_setting; - -/** configure value for background commit interval (in seconds) */ -extern ulong ib_bk_commit_interval; - -/******************************************************************** -Handles user errors and lock waits detected by the database engine. -@return TRUE if it was a lock wait and we should continue running -the query thread */ -ibool -ib_handle_errors( -/*=============*/ - dberr_t* new_err, /*!< out: possible new error - encountered in lock wait, or if - no new error, the value of - trx->error_state at the entry of this - function */ - trx_t* trx, /*!< in: transaction */ - que_thr_t* thr, /*!< in: query thread */ - trx_savept_t* savept); /*!< in: savepoint or NULL */ - -/************************************************************************* -Sets a lock on a table. -@return error code or DB_SUCCESS */ -dberr_t -ib_trx_lock_table_with_retry( -/*=========================*/ - trx_t* trx, /*!< in/out: transaction */ - dict_table_t* table, /*!< in: table to lock */ - enum lock_mode mode); /*!< in: lock mode */ - -#endif /* api0misc_h */ diff --git a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h index 419c5db657d..3e9c639f602 100644 --- a/storage/innobase/include/btr0btr.h +++ b/storage/innobase/include/btr0btr.h @@ -2,7 +2,7 @@ Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2014, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2014, 2017, MariaDB Corporation. This 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 @@ -71,74 +71,99 @@ enum btr_latch_mode { /** Start searching the entire B-tree. */ BTR_SEARCH_TREE = 37, /** Continue searching the entire B-tree. */ - BTR_CONT_SEARCH_TREE = 38 + BTR_CONT_SEARCH_TREE = 38, + + /* BTR_INSERT, BTR_DELETE and BTR_DELETE_MARK are mutually + exclusive. */ + /** The search tuple will be inserted to the secondary index + at the searched position. When the leaf page is not in the + buffer pool, try to use the change buffer. */ + BTR_INSERT = 512, + + /** Try to delete mark a secondary index leaf page record at + the searched position using the change buffer when the page is + not in the buffer pool. */ + BTR_DELETE_MARK = 4096, + + /** Try to purge the record using the change buffer when the + secondary index leaf page is not in the buffer pool. */ + BTR_DELETE = 8192, + + /** The caller is already holding dict_index_t::lock S-latch. */ + BTR_ALREADY_S_LATCHED = 16384, + /** Search and S-latch a leaf page, assuming that the + dict_index_t::lock S-latch is being held. */ + BTR_SEARCH_LEAF_ALREADY_S_LATCHED = BTR_SEARCH_LEAF + | BTR_ALREADY_S_LATCHED, + /** Search the entire index tree, assuming that the + dict_index_t::lock S-latch is being held. */ + BTR_SEARCH_TREE_ALREADY_S_LATCHED = BTR_SEARCH_TREE + | BTR_ALREADY_S_LATCHED, + /** Search and X-latch a leaf page, assuming that the + dict_index_t::lock S-latch is being held. */ + BTR_MODIFY_LEAF_ALREADY_S_LATCHED = BTR_MODIFY_LEAF + | BTR_ALREADY_S_LATCHED, + + /** Attempt to delete-mark a secondary index record. */ + BTR_DELETE_MARK_LEAF = BTR_MODIFY_LEAF | BTR_DELETE_MARK, + /** Attempt to delete-mark a secondary index record + while holding the dict_index_t::lock S-latch. */ + BTR_DELETE_MARK_LEAF_ALREADY_S_LATCHED = BTR_DELETE_MARK_LEAF + | BTR_ALREADY_S_LATCHED, + /** Attempt to purge a secondary index record. */ + BTR_PURGE_LEAF = BTR_MODIFY_LEAF | BTR_DELETE, + /** Attempt to purge a secondary index record + while holding the dict_index_t::lock S-latch. */ + BTR_PURGE_LEAF_ALREADY_S_LATCHED = BTR_PURGE_LEAF + | BTR_ALREADY_S_LATCHED }; -/* BTR_INSERT, BTR_DELETE and BTR_DELETE_MARK are mutually exclusive. */ - -/** If this is ORed to btr_latch_mode, it means that the search tuple -will be inserted to the index, at the searched position. -When the record is not in the buffer pool, try to use the insert buffer. */ -#define BTR_INSERT 512 - /** This flag ORed to btr_latch_mode says that we do the search in query optimization */ -#define BTR_ESTIMATE 1024 +#define BTR_ESTIMATE 1024U /** This flag ORed to BTR_INSERT says that we can ignore possible UNIQUE definition on secondary indexes when we decide if we can use the insert buffer to speed up inserts */ -#define BTR_IGNORE_SEC_UNIQUE 2048 - -/** Try to delete mark the record at the searched position using the -insert/delete buffer when the record is not in the buffer pool. */ -#define BTR_DELETE_MARK 4096 - -/** Try to purge the record at the searched position using the insert/delete -buffer when the record is not in the buffer pool. */ -#define BTR_DELETE 8192 - -/** In the case of BTR_SEARCH_LEAF or BTR_MODIFY_LEAF, the caller is -already holding an S latch on the index tree */ -#define BTR_ALREADY_S_LATCHED 16384 +#define BTR_IGNORE_SEC_UNIQUE 2048U /** In the case of BTR_MODIFY_TREE, the caller specifies the intention to insert record only. It is used to optimize block->lock range.*/ -#define BTR_LATCH_FOR_INSERT 32768 +#define BTR_LATCH_FOR_INSERT 32768U /** In the case of BTR_MODIFY_TREE, the caller specifies the intention to delete record only. It is used to optimize block->lock range.*/ -#define BTR_LATCH_FOR_DELETE 65536 +#define BTR_LATCH_FOR_DELETE 65536U /** This flag is for undo insert of rtree. For rtree, we need this flag to find proper rec to undo insert.*/ -#define BTR_RTREE_UNDO_INS 131072 +#define BTR_RTREE_UNDO_INS 131072U /** In the case of BTR_MODIFY_LEAF, the caller intends to allocate or free the pages of externally stored fields. */ -#define BTR_MODIFY_EXTERNAL 262144 +#define BTR_MODIFY_EXTERNAL 262144U /** Try to delete mark the record at the searched position when the record is in spatial index */ -#define BTR_RTREE_DELETE_MARK 524288 +#define BTR_RTREE_DELETE_MARK 524288U -#define BTR_LATCH_MODE_WITHOUT_FLAGS(latch_mode) \ - ((latch_mode) & ~(BTR_INSERT \ - | BTR_DELETE_MARK \ - | BTR_RTREE_UNDO_INS \ - | BTR_RTREE_DELETE_MARK \ - | BTR_DELETE \ - | BTR_ESTIMATE \ - | BTR_IGNORE_SEC_UNIQUE \ - | BTR_ALREADY_S_LATCHED \ - | BTR_LATCH_FOR_INSERT \ - | BTR_LATCH_FOR_DELETE \ - | BTR_MODIFY_EXTERNAL)) +#define BTR_LATCH_MODE_WITHOUT_FLAGS(latch_mode) \ + ((latch_mode) & btr_latch_mode(~(BTR_INSERT \ + | BTR_DELETE_MARK \ + | BTR_RTREE_UNDO_INS \ + | BTR_RTREE_DELETE_MARK \ + | BTR_DELETE \ + | BTR_ESTIMATE \ + | BTR_IGNORE_SEC_UNIQUE \ + | BTR_ALREADY_S_LATCHED \ + | BTR_LATCH_FOR_INSERT \ + | BTR_LATCH_FOR_DELETE \ + | BTR_MODIFY_EXTERNAL))) -#define BTR_LATCH_MODE_WITHOUT_INTENTION(latch_mode) \ - ((latch_mode) & ~(BTR_LATCH_FOR_INSERT \ - | BTR_LATCH_FOR_DELETE \ - | BTR_MODIFY_EXTERNAL)) +#define BTR_LATCH_MODE_WITHOUT_INTENTION(latch_mode) \ + ((latch_mode) & btr_latch_mode(~(BTR_LATCH_FOR_INSERT \ + | BTR_LATCH_FOR_DELETE \ + | BTR_MODIFY_EXTERNAL))) /**************************************************************//** Report that an index page is corrupted. */ @@ -206,7 +231,7 @@ btr_block_get_func( const page_size_t& page_size, ulint mode, const char* file, - ulint line, + unsigned line, dict_index_t* index, mtr_t* mtr); @@ -507,7 +532,7 @@ btr_insert_on_non_leaf_level_func( ulint level, /*!< in: level, must be > 0 */ dtuple_t* tuple, /*!< in: the record to be inserted */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr); /*!< in: mtr */ #define btr_insert_on_non_leaf_level(f,i,l,t,m) \ btr_insert_on_non_leaf_level_func(f,i,l,t,__FILE__,__LINE__,m) diff --git a/storage/innobase/include/btr0btr.ic b/storage/innobase/include/btr0btr.ic index 810ac8f8b67..308fcfe9b03 100644 --- a/storage/innobase/include/btr0btr.ic +++ b/storage/innobase/include/btr0btr.ic @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2016, MariaDB Corporation. +Copyright (c) 2015, 2017, MariaDB Corporation. This 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 @@ -51,7 +51,7 @@ btr_block_get_func( const page_size_t& page_size, ulint mode, const char* file, - ulint line, + unsigned line, dict_index_t* index, mtr_t* mtr) { diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h index a1e37ec46d0..19109e30b13 100644 --- a/storage/innobase/include/btr0cur.h +++ b/storage/innobase/include/btr0cur.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -64,9 +65,6 @@ struct btr_latch_leaves_t { #include "row0types.h" #include "ha0ha.h" -#define BTR_CUR_ADAPT -#define BTR_CUR_HASH_ADAPT - #ifdef UNIV_DEBUG /*********************************************************//** Returns the page cursor component of a tree cursor. @@ -145,7 +143,7 @@ btr_cur_optimistic_latch_leaves( ulint* latch_mode, btr_cur_t* cursor, const char* file, - ulint line, + unsigned line, mtr_t* mtr); /********************************************************************//** @@ -188,7 +186,7 @@ btr_cur_search_to_nth_level( currently has on search system: RW_S_LATCH, or 0 */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr, /*!< in/out: mini-transaction */ ib_uint64_t autoinc = 0); /*!< in: PAGE_ROOT_AUTO_INC to be written @@ -208,7 +206,7 @@ btr_cur_open_at_index_side_func( ulint level, /*!< in: level to search for (0=leaf) */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in/out: mini-transaction */ MY_ATTRIBUTE((nonnull)); @@ -226,7 +224,7 @@ btr_cur_open_at_rnd_pos_func( ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ btr_cur_t* cursor, /*!< in/out: B-tree cursor */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr); /*!< in: mtr */ #define btr_cur_open_at_rnd_pos(i,l,c,m) \ btr_cur_open_at_rnd_pos_func(i,l,c,__FILE__,__LINE__,m) @@ -970,27 +968,29 @@ stored part. */ significant bit of the byte at smallest address) is set to 1 if this field does not 'own' the externally stored field; only the owner field is allowed to free the field in purge! */ -#define BTR_EXTERN_OWNER_FLAG 128 +#define BTR_EXTERN_OWNER_FLAG 128U /** If the second most significant bit of BTR_EXTERN_LEN (i.e., the second most significant bit of the byte at smallest address) is 1 then it means that the externally stored field was inherited from an earlier version of the row. In rollback we are not allowed to free an inherited external field. */ -#define BTR_EXTERN_INHERITED_FLAG 64 +#define BTR_EXTERN_INHERITED_FLAG 64U /** Number of searches down the B-tree in btr_cur_search_to_nth_level(). */ extern ulint btr_cur_n_non_sea; -/** Number of successful adaptive hash index lookups in -btr_cur_search_to_nth_level(). */ -extern ulint btr_cur_n_sea; /** Old value of btr_cur_n_non_sea. Copied by srv_refresh_innodb_monitor_stats(). Referenced by srv_printf_innodb_monitor(). */ extern ulint btr_cur_n_non_sea_old; +#ifdef BTR_CUR_HASH_ADAPT +/** Number of successful adaptive hash index lookups in +btr_cur_search_to_nth_level(). */ +extern ulint btr_cur_n_sea; /** Old value of btr_cur_n_sea. Copied by srv_refresh_innodb_monitor_stats(). Referenced by srv_printf_innodb_monitor(). */ extern ulint btr_cur_n_sea_old; +#endif /* BTR_CUR_HASH_ADAPT */ #ifdef UNIV_DEBUG /* Flag to limit optimistic insert records */ diff --git a/storage/innobase/include/btr0pcur.h b/storage/innobase/include/btr0pcur.h index 947316f0e4d..28636715c2b 100644 --- a/storage/innobase/include/btr0pcur.h +++ b/storage/innobase/include/btr0pcur.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -113,7 +114,7 @@ btr_pcur_open_low( ulint latch_mode,/*!< in: BTR_SEARCH_LEAF, ... */ btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ ib_uint64_t autoinc,/*!< in: PAGE_ROOT_AUTO_INC to be written (0 if none) */ mtr_t* mtr); /*!< in: mtr */ @@ -145,7 +146,7 @@ btr_pcur_open_with_no_init_func( currently has on search system: RW_S_LATCH, or 0 */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr); /*!< in: mtr */ #define btr_pcur_open_with_no_init(ix,t,md,l,cur,has,m) \ btr_pcur_open_with_no_init_func(ix,t,md,l,cur,has,__FILE__,__LINE__,m) @@ -202,7 +203,7 @@ btr_pcur_open_on_user_rec_func( btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr); /*!< in: mtr */ #define btr_pcur_open_on_user_rec(i,t,md,l,c,m) \ btr_pcur_open_on_user_rec_func(i,t,md,l,c,__FILE__,__LINE__,m) @@ -218,7 +219,7 @@ btr_pcur_open_at_rnd_pos_func( ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ btr_pcur_t* cursor, /*!< in/out: B-tree pcur */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr); /*!< in: mtr */ #define btr_pcur_open_at_rnd_pos(i,l,c,m) \ btr_pcur_open_at_rnd_pos_func(i,l,c,__FILE__,__LINE__,m) @@ -272,7 +273,7 @@ btr_pcur_restore_position_func( ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ btr_pcur_t* cursor, /*!< in: detached persistent cursor */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr); /*!< in: mtr */ #define btr_pcur_restore_position(l,cur,mtr) \ btr_pcur_restore_position_func(l,cur,__FILE__,__LINE__,mtr) diff --git a/storage/innobase/include/btr0pcur.ic b/storage/innobase/include/btr0pcur.ic index 60790bc1316..425593631d3 100644 --- a/storage/innobase/include/btr0pcur.ic +++ b/storage/innobase/include/btr0pcur.ic @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2016, MariaDB Corporation. +Copyright (c) 2015, 2017, MariaDB Corporation. This 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 @@ -433,7 +433,7 @@ btr_pcur_open_low( ulint latch_mode,/*!< in: BTR_SEARCH_LEAF, ... */ btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ ib_uint64_t autoinc,/*!< in: PAGE_ROOT_AUTO_INC to be written (0 if none) */ mtr_t* mtr) /*!< in: mtr */ @@ -499,7 +499,7 @@ btr_pcur_open_with_no_init_func( currently has on search system: RW_S_LATCH, or 0 */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mtr */ { btr_cur_t* btr_cursor; @@ -574,7 +574,7 @@ btr_pcur_open_at_rnd_pos_func( ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ btr_pcur_t* cursor, /*!< in/out: B-tree pcur */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mtr */ { /* Initialize the cursor */ diff --git a/storage/innobase/include/btr0sea.h b/storage/innobase/include/btr0sea.h index 12659037904..8ff411cffd0 100644 --- a/storage/innobase/include/btr0sea.h +++ b/storage/innobase/include/btr0sea.h @@ -32,6 +32,7 @@ Created 2/17/1996 Heikki Tuuri #include "dict0dict.h" #include "btr0types.h" #include "mtr0mtr.h" +#ifdef BTR_CUR_HASH_ADAPT #include "ha0ha.h" /** Creates and initializes the adaptive search system at a database start. @@ -57,22 +58,6 @@ btr_search_disable( void btr_search_enable(); -/********************************************************************//** -Returns search info for an index. -@return search info; search mutex reserved */ -UNIV_INLINE -btr_search_t* -btr_search_get_info( -/*================*/ - dict_index_t* index) /*!< in: index */ - MY_ATTRIBUTE((nonnull)); - -/** Creates and initializes a search info struct. -@param[in] heap heap where created. -@return own: search info struct */ -btr_search_t* -btr_search_info_create(mem_heap_t* heap); - /** Returns the value of ref_count. The value is protected by latch. @param[in] info search info @param[in] index index identifier @@ -257,16 +242,40 @@ A table is selected from an array of tables using pair of index-id, space-id. UNIV_INLINE hash_table_t* btr_get_search_table(const dict_index_t* index); +#else /* BTR_CUR_HASH_ADAPT */ +# define btr_search_sys_create(size) +# define btr_search_drop_page_hash_index(block) +# define btr_search_s_lock(index) +# define btr_search_s_unlock(index) +# define btr_search_x_lock(index) +# define btr_search_x_unlock(index) +# define btr_search_info_update(index, cursor) +# define btr_search_move_or_delete_hash_entries(new_block, block, index) +# define btr_search_update_hash_on_insert(cursor) +# define btr_search_update_hash_on_delete(cursor) +# define btr_search_sys_resize(hash_size) +#endif /* BTR_CUR_HASH_ADAPT */ + +#ifdef BTR_CUR_ADAPT +/** Create and initialize search info. +@param[in,out] heap heap where created +@return own: search info struct */ +UNIV_INLINE +btr_search_t* +btr_search_info_create(mem_heap_t* heap) + MY_ATTRIBUTE((nonnull, warn_unused_result)); + +/** @return the search info of an index */ +UNIV_INLINE +btr_search_t* +btr_search_get_info(dict_index_t* index) +{ + return(index->search_info); +} +#endif /* BTR_CUR_ADAPT */ /** The search info struct in an index */ struct btr_search_t{ - ulint ref_count; /*!< Number of blocks in this index tree - that have search index built - i.e. block->index points to this index. - Protected by search latch except - when during initialization in - btr_search_info_create(). */ - /* @{ The following fields are not protected by any latch. Unfortunately, this means that they must be aligned to the machine word, i.e., they cannot be turned into bit-fields. */ @@ -274,6 +283,7 @@ struct btr_search_t{ fetched, or NULL */ ulint withdraw_clock; /*!< the withdraw clock value of the buffer pool when root_guess was stored */ +#ifdef BTR_CUR_HASH_ADAPT ulint hash_analysis; /*!< when this exceeds BTR_SEARCH_HASH_ANALYSIS, the hash analysis starts; this is reset if no @@ -289,6 +299,13 @@ struct btr_search_t{ using the hash index; the range is 0 .. BTR_SEARCH_BUILD_LIMIT + 5 */ /* @} */ + ulint ref_count; /*!< Number of blocks in this index tree + that have search index built + i.e. block->index points to this index. + Protected by search latch except + when during initialization in + btr_search_info_create(). */ + /*---------------------- @{ */ ulint n_fields; /*!< recommended prefix length for hash search: number of full fields */ @@ -308,6 +325,7 @@ struct btr_search_t{ far */ ulint n_searches; /*!< number of searches */ #endif /* UNIV_SEARCH_PERF_STAT */ +#endif /* BTR_CUR_HASH_ADAPT */ #ifdef UNIV_DEBUG ulint magic_n; /*!< magic number @see BTR_SEARCH_MAGIC_N */ /** value of btr_search_t::magic_n, used in assertions */ @@ -315,6 +333,7 @@ struct btr_search_t{ #endif /* UNIV_DEBUG */ }; +#ifdef BTR_CUR_HASH_ADAPT /** The hash index system */ struct btr_search_sys_t{ hash_table_t** hash_tables; /*!< the adaptive hash tables, @@ -352,6 +371,7 @@ the hash index */ over calls from MySQL. If we notice someone waiting for the latch, we again set this much timeout. This is to reduce contention. */ #define BTR_SEA_TIMEOUT 10000 +#endif /* BTR_CUR_HASH_ADAPT */ #ifndef UNIV_NONINL #include "btr0sea.ic" diff --git a/storage/innobase/include/btr0sea.ic b/storage/innobase/include/btr0sea.ic index 5f7c39ba500..b5a7536a2b4 100644 --- a/storage/innobase/include/btr0sea.ic +++ b/storage/innobase/include/btr0sea.ic @@ -27,6 +27,24 @@ Created 2/17/1996 Heikki Tuuri #include "btr0cur.h" #include "buf0buf.h" +/** Create and initialize search info. +@param[in,out] heap heap where created +@return own: search info struct */ +UNIV_INLINE +btr_search_t* +btr_search_info_create(mem_heap_t* heap) +{ + btr_search_t* info = static_cast( + mem_heap_zalloc(heap, sizeof(btr_search_t))); + ut_d(info->magic_n = BTR_SEARCH_MAGIC_N); +#ifdef BTR_CUR_HASH_ADAPT + info->n_fields = 1; + info->left_side = TRUE; +#endif /* BTR_CUR_HASH_ADAPT */ + return(info); +} + +#ifdef BTR_CUR_HASH_ADAPT /*********************************************************************//** Updates the search info. */ void @@ -35,18 +53,6 @@ btr_search_info_update_slow( btr_search_t* info, /*!< in/out: search info */ btr_cur_t* cursor);/*!< in: cursor which was just positioned */ -/********************************************************************//** -Returns search info for an index. -@return search info; search mutex reserved */ -UNIV_INLINE -btr_search_t* -btr_search_get_info( -/*================*/ - dict_index_t* index) /*!< in: index */ -{ - return(index->search_info); -} - /*********************************************************************//** Updates the search info. */ UNIV_INLINE @@ -221,3 +227,4 @@ btr_get_search_table(const dict_index_t* index) return(btr_search_sys->hash_tables[ifold % btr_ahi_parts]); } +#endif /* BTR_CUR_HASH_ADAPT */ diff --git a/storage/innobase/include/btr0types.h b/storage/innobase/include/btr0types.h index 19c21982011..77d1b286fbb 100644 --- a/storage/innobase/include/btr0types.h +++ b/storage/innobase/include/btr0types.h @@ -40,12 +40,14 @@ struct btr_cur_t; /** B-tree search information for the adaptive hash index */ struct btr_search_t; +#ifdef BTR_CUR_HASH_ADAPT /** Is search system enabled. Search system is protected by array of latches. */ extern char btr_search_enabled; /** Number of adaptive hash index partition. */ extern ulong btr_ahi_parts; +#endif /* BTR_CUR_HASH_ADAPT */ /** The size of a reference to data stored on a different page. The reference is stored at the end of the prefix of the field diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index e1c92c130c4..ea0dd48cdbd 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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 @@ -389,21 +389,17 @@ buf_pool_resize(); /** This is the thread for resizing buffer pool. It waits for an event and when waked up either performs a resizing and sleeps again. -@param[in] arg a dummy parameter required by os_thread_create. @return this function does not return, calls os_thread_exit() */ extern "C" os_thread_ret_t -DECLARE_THREAD(buf_resize_thread)( -/*==============================*/ - void* arg); /*!< in: a dummy parameter - required by os_thread_create */ +DECLARE_THREAD(buf_resize_thread)(void*); -/********************************************************************//** -Clears the adaptive hash index on all pages in the buffer pool. */ +#ifdef BTR_CUR_HASH_ADAPT +/** Clear the adaptive hash index on all pages in the buffer pool. */ void -buf_pool_clear_hash_index(void); -/*===========================*/ +buf_pool_clear_hash_index(); +#endif /* BTR_CUR_HASH_ADAPT */ /*********************************************************************//** Gets the current size of buffer buf_pool in bytes. @@ -497,7 +493,7 @@ buf_page_optimistic_get( buf_block_t* block, /*!< in: guessed block */ ib_uint64_t modify_clock,/*!< in: modify clock value */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr); /*!< in: mini-transaction */ /********************************************************************//** This is used to get access to a known database page, when no waiting can be @@ -510,7 +506,7 @@ buf_page_get_known_nowait( buf_block_t* block, /*!< in: the known page */ ulint mode, /*!< in: BUF_MAKE_YOUNG or BUF_KEEP_OLD */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr); /*!< in: mini-transaction */ /** Given a tablespace id and page number tries to get that page. If the @@ -525,7 +521,7 @@ buf_block_t* buf_page_try_get_func( const page_id_t& page_id, const char* file, - ulint line, + unsigned line, mtr_t* mtr); /** Tries to get a page. @@ -571,7 +567,7 @@ buf_page_get_gen( buf_block_t* guess, ulint mode, const char* file, - ulint line, + unsigned line, mtr_t* mtr, dberr_t* err); @@ -651,7 +647,7 @@ buf_page_reset_file_page_was_freed( Reads the freed_page_clock of a buffer block. @return freed_page_clock */ UNIV_INLINE -ulint +unsigned buf_page_get_freed_page_clock( /*==========================*/ const buf_page_t* bpage) /*!< in: block */ @@ -660,7 +656,7 @@ buf_page_get_freed_page_clock( Reads the freed_page_clock of a buffer block. @return freed_page_clock */ UNIV_INLINE -ulint +unsigned buf_block_get_freed_page_clock( /*===========================*/ const buf_block_t* block) /*!< in: block */ @@ -724,7 +720,7 @@ buf_block_buf_fix_inc_func( /*=======================*/ # ifdef UNIV_DEBUG const char* file, /*!< in: file name */ - ulint line, /*!< in: line */ + unsigned line, /*!< in: line */ # endif /* UNIV_DEBUG */ buf_block_t* block) /*!< in/out: block to bufferfix */ MY_ATTRIBUTE((nonnull)); @@ -824,7 +820,7 @@ Gets the hash value of a block. This can be used in searches in the lock hash table. @return lock hash value */ UNIV_INLINE -ulint +unsigned buf_block_get_lock_hash_val( /*========================*/ const buf_block_t* block) /*!< in: block */ @@ -1164,7 +1160,7 @@ void buf_page_set_old( /*=============*/ buf_page_t* bpage, /*!< in/out: control block */ - ibool old); /*!< in: old */ + bool old); /*!< in: old */ /*********************************************************************//** Determine the time of first access of a block in the buffer pool. @return ut_time_ms() at the time of first access, 0 if not accessed */ @@ -1214,12 +1210,14 @@ if applicable. */ #define buf_block_get_page_zip(block) \ ((block)->page.zip.data ? &(block)->page.zip : NULL) +#ifdef BTR_CUR_HASH_ADAPT /** Get a buffer block from an adaptive hash index pointer. This function does not return if the block is not identified. @param[in] ptr pointer to within a page frame @return pointer to block, never NULL */ buf_block_t* buf_block_from_ahi(const byte* ptr); +#endif /* BTR_CUR_HASH_ADAPT */ /********************************************************************//** Find out if a pointer belongs to a buf_block_t. It can be a pointer to @@ -1276,7 +1274,7 @@ buf_page_io_complete( Calculates the index of a buffer pool to the buf_pool[] array. @return the position of the buffer pool in buf_pool[] */ UNIV_INLINE -ulint +unsigned buf_pool_index( /*===========*/ const buf_pool_t* buf_pool) /*!< in: buffer pool */ @@ -1619,7 +1617,6 @@ public: if written again we check is TRIM operation needed. */ - ulint space; /*!< space id */ unsigned key_version; /*!< key version for this block */ bool page_encrypted; /*!< page is page encrypted */ bool page_compressed;/*!< page is page compressed */ @@ -1804,6 +1801,7 @@ struct buf_block_t{ bufferfixed, or (2) the thread has an x-latch on the block */ /* @} */ +#ifdef BTR_CUR_HASH_ADAPT /** @name Hash search fields (unprotected) NOTE that these fields are NOT protected by any semaphore! */ /* @{ */ @@ -1835,11 +1833,11 @@ struct buf_block_t{ /* @{ */ -#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG +# if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG ulint n_pointers; /*!< used in debugging: the number of pointers in the adaptive hash index pointing to this frame */ -#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ +# endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ unsigned curr_n_fields:10;/*!< prefix length for hash indexing: number of full fields */ unsigned curr_n_bytes:15;/*!< number of bytes in hash @@ -1854,6 +1852,7 @@ struct buf_block_t{ complete, though: there may have been hash collisions, record deletions, etc. */ +#endif /* BTR_CUR_HASH_ADAPT */ bool skip_flush_check; /*!< Skip check in buf_dblwr_check_block during bulk load, protected by lock.*/ @@ -2188,7 +2187,9 @@ struct buf_pool_t{ os_event_t no_flush[BUF_FLUSH_N_TYPES]; /*!< this is in the set state when there is no flush batch - of the given type running */ + of the given type running; + os_event_set() and os_event_reset() + are protected by buf_pool_t::mutex */ ib_rbt_t* flush_rbt; /*!< a red-black tree is used exclusively during recovery to speed up insertions in the @@ -2203,7 +2204,7 @@ struct buf_pool_t{ recovery and is set to NULL once the recovery is over. Protected by flush_list_mutex */ - ulint freed_page_clock;/*!< a sequence number used + unsigned freed_page_clock;/*!< a sequence number used to count the number of buffer blocks removed from the end of the LRU list; NOTE that this diff --git a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.ic index f2b1b151598..429c7fd3ba6 100644 --- a/storage/innobase/include/buf0buf.ic +++ b/storage/innobase/include/buf0buf.ic @@ -2,7 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. -Copyright (c) 2014, 2016, MariaDB Corporation. +Copyright (c) 2014, 2017, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -71,12 +71,12 @@ buf_pool_get_curr_size(void) Calculates the index of a buffer pool to the buf_pool[] array. @return the position of the buffer pool in buf_pool[] */ UNIV_INLINE -ulint +unsigned buf_pool_index( /*===========*/ const buf_pool_t* buf_pool) /*!< in: buffer pool */ { - ulint i = buf_pool - buf_pool_ptr; + unsigned i = unsigned(buf_pool - buf_pool_ptr); ut_ad(i < MAX_BUFFER_POOLS); ut_ad(i < srv_buf_pool_instances); return(i); @@ -91,10 +91,8 @@ buf_pool_from_bpage( /*================*/ const buf_page_t* bpage) /*!< in: buffer pool page */ { - ulint i; - i = bpage->buf_pool_index; - ut_ad(i < srv_buf_pool_instances); - return(&buf_pool_ptr[i]); + ut_ad(bpage->buf_pool_index < srv_buf_pool_instances); + return(&buf_pool_ptr[bpage->buf_pool_index]); } /******************************************************************//** @@ -124,7 +122,7 @@ buf_pool_get_n_pages(void) Reads the freed_page_clock of a buffer block. @return freed_page_clock */ UNIV_INLINE -ulint +unsigned buf_page_get_freed_page_clock( /*==========================*/ const buf_page_t* bpage) /*!< in: block */ @@ -137,7 +135,7 @@ buf_page_get_freed_page_clock( Reads the freed_page_clock of a buffer block. @return freed_page_clock */ UNIV_INLINE -ulint +unsigned buf_block_get_freed_page_clock( /*===========================*/ const buf_block_t* block) /*!< in: block */ @@ -162,7 +160,7 @@ buf_page_peek_if_young( /* FIXME: bpage->freed_page_clock is 31 bits */ return((buf_pool->freed_page_clock & ((1UL << 31) - 1)) - < ((ulint) bpage->freed_page_clock + < (bpage->freed_page_clock + (buf_pool->curr_size * (BUF_LRU_OLD_RATIO_DIV - buf_pool->LRU_old_ratio) / (BUF_LRU_OLD_RATIO_DIV * 4)))); @@ -629,7 +627,7 @@ void buf_page_set_old( /*=============*/ buf_page_t* bpage, /*!< in/out: control block */ - ibool old) /*!< in: old */ + bool old) /*!< in: old */ { #ifdef UNIV_DEBUG buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); @@ -734,9 +732,6 @@ buf_block_get_frame( case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: case BUF_BLOCK_NOT_USED: - if (block->page.encrypted) { - goto ok; - } ut_error; break; case BUF_BLOCK_FILE_PAGE: @@ -795,7 +790,7 @@ Gets the hash value of the page the pointer is pointing to. This can be used in searches in the lock hash table. @return lock hash value */ UNIV_INLINE -ulint +unsigned buf_block_get_lock_hash_val( /*========================*/ const buf_block_t* block) /*!< in: block */ @@ -981,7 +976,7 @@ buf_block_buf_fix_inc_func( /*=======================*/ #ifdef UNIV_DEBUG const char* file, /*!< in: file name */ - ulint line, /*!< in: line */ + unsigned line, /*!< in: line */ #endif /* UNIV_DEBUG */ buf_block_t* block) /*!< in/out: block to bufferfix */ { diff --git a/storage/innobase/include/buf0dblwr.h b/storage/innobase/include/buf0dblwr.h index fdb9ab15a24..bf2bf6ab32b 100644 --- a/storage/innobase/include/buf0dblwr.h +++ b/storage/innobase/include/buf0dblwr.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -132,11 +133,13 @@ struct buf_dblwr_t{ ulint b_reserved;/*!< number of slots currently reserved for batch flush. */ os_event_t b_event;/*!< event where threads wait for a - batch flush to end. */ + batch flush to end; + os_event_set() and os_event_reset() + are protected by buf_dblwr_t::mutex */ 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. */ + single page flush slot. Protected by mutex. */ bool* in_use; /*!< flag used to indicate if a slot is in use. Only used for single page flushes. */ diff --git a/storage/innobase/include/buf0flu.h b/storage/innobase/include/buf0flu.h index 273f9666419..fd124e8f94e 100644 --- a/storage/innobase/include/buf0flu.h +++ b/storage/innobase/include/buf0flu.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2014, 2016, MariaDB Corporation +Copyright (c) 2014, 2017, MariaDB Corporation. This 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 @@ -376,7 +376,7 @@ public: /** Check pages have been flushed and removed from the flush list in a buffer pool instance. - @pram[in] instance_no buffer pool instance no + @param[in] instance_no buffer pool instance no @return true if the pages were removed from the flush list */ bool is_complete(ulint instance_no) { diff --git a/storage/innobase/include/data0data.ic b/storage/innobase/include/data0data.ic index 71698cc12b3..81788885aa5 100644 --- a/storage/innobase/include/data0data.ic +++ b/storage/innobase/include/data0data.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 +222,7 @@ dfield_write_mbr( #endif /* UNIV_VALGRIND_DEBUG */ field->ext = 0; - for (int i = 0; i < SPDIMS * 2; i++) { + for (unsigned i = 0; i < SPDIMS * 2; i++) { mach_double_write(static_cast(field->data) + i * sizeof(double), mbr[i]); } @@ -467,7 +468,6 @@ dtuple_create_from_mem( dtuple_t* tuple; ulint n_t_fields = n_fields + n_v_fields; - ut_ad(buf != NULL); ut_a(buf_size >= DTUPLE_EST_ALLOC(n_t_fields)); tuple = (dtuple_t*) buf; diff --git a/storage/innobase/include/data0type.h b/storage/innobase/include/data0type.h index d38aa7c1533..958f5a4d0de 100644 --- a/storage/innobase/include/data0type.h +++ b/storage/innobase/include/data0type.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,7 +148,7 @@ columns, and for them the precise type is usually not used at all. for InnoDB's own system tables */ #define DATA_ERROR 111 /* another relic from pre-MySQL time */ -#define DATA_MYSQL_TYPE_MASK 255 /* AND with this mask to extract the MySQL +#define DATA_MYSQL_TYPE_MASK 255U/* AND with this mask to extract the MySQL type from the precise type */ #define DATA_MYSQL_TRUE_VARCHAR 15 /* MySQL type code for the >= 5.0.3 format true VARCHAR */ @@ -168,14 +169,14 @@ be less than 256 */ #define DATA_FTS_DOC_ID 3 /* Used as FTS DOC ID column */ -#define DATA_SYS_PRTYPE_MASK 0xF /* mask to extract the above from prtype */ +#define DATA_SYS_PRTYPE_MASK 0xFU /* mask to extract the above from prtype */ /* Flags ORed to the precise data type */ -#define DATA_NOT_NULL 256 /* this is ORed to the precise type when +#define DATA_NOT_NULL 256U /* this is ORed to the precise type when the column is declared as NOT NULL */ -#define DATA_UNSIGNED 512 /* this id ORed to the precise type when +#define DATA_UNSIGNED 512U /* this id ORed to the precise type when we have an unsigned integer type */ -#define DATA_BINARY_TYPE 1024 /* if the data type is a binary character +#define DATA_BINARY_TYPE 1024U /* if the data type is a binary character string, this is ORed to the precise type: this only holds for tables created with >= MySQL-4.0.14 */ @@ -183,14 +184,14 @@ be less than 256 */ In earlier versions this was set for some BLOB columns. */ -#define DATA_GIS_MBR 2048 /* Used as GIS MBR column */ +#define DATA_GIS_MBR 2048U /* Used as GIS MBR column */ #define DATA_MBR_LEN SPDIMS * 2 * sizeof(double) /* GIS MBR length*/ -#define DATA_LONG_TRUE_VARCHAR 4096 /* this is ORed to the precise data +#define DATA_LONG_TRUE_VARCHAR 4096U /* this is ORed to the precise data type when the column is true VARCHAR where MySQL uses 2 bytes to store the data len; for shorter VARCHARs MySQL uses only 1 byte */ -#define DATA_VIRTUAL 8192 /* Virtual column */ +#define DATA_VIRTUAL 8192U /* Virtual column */ /** Get the number of system columns in a table. */ #define dict_table_get_n_sys_cols(table) DATA_N_SYS_COLS @@ -221,14 +222,12 @@ length from corresponding column or index definition, instead of this MACRO /* Pack mbminlen, mbmaxlen to mbminmaxlen. */ #define DATA_MBMINMAXLEN(mbminlen, mbmaxlen) \ - ((mbmaxlen) * DATA_MBMAX + (mbminlen)) -/* Get mbminlen from mbminmaxlen. Cast the result of UNIV_EXPECT to ulint -because in GCC it returns a long. */ -#define DATA_MBMINLEN(mbminmaxlen) ((ulint) \ - UNIV_EXPECT(((mbminmaxlen) % DATA_MBMAX), \ - 1)) + unsigned((mbmaxlen) * DATA_MBMAX + (mbminlen)) +/* Get mbminlen from mbminmaxlen. */ +#define DATA_MBMINLEN(mbminmaxlen) \ + unsigned(UNIV_EXPECT((mbminmaxlen) % DATA_MBMAX, 1)) /* Get mbmaxlen from mbminmaxlen. */ -#define DATA_MBMAXLEN(mbminmaxlen) ((ulint) ((mbminmaxlen) / DATA_MBMAX)) +#define DATA_MBMAXLEN(mbminmaxlen) unsigned((mbminmaxlen) / DATA_MBMAX) /* For checking if a geom_type is POINT */ #define DATA_POINT_MTYPE(mtype) ((mtype) == DATA_POINT \ @@ -369,16 +368,21 @@ ulint dtype_get_charset_coll( /*===================*/ ulint prtype);/*!< in: precise data type */ -/*********************************************************************//** -Forms a precise type from the < 4.1.2 format precise type plus the +/** Form a precise type from the < 4.1.2 format precise type plus the charset-collation code. +@param[in] old_prtype MySQL type code and the flags + DATA_BINARY_TYPE etc. +@param[in] charset_coll character-set collation code @return precise type, including the charset-collation code */ -ulint -dtype_form_prtype( -/*==============*/ - ulint old_prtype, /*!< in: the MySQL type code and the flags - DATA_BINARY_TYPE etc. */ - ulint charset_coll); /*!< in: MySQL charset-collation code */ +UNIV_INLINE +uint32_t +dtype_form_prtype(ulint old_prtype, ulint charset_coll) +{ + ut_ad(old_prtype < 256 * 256); + ut_ad(charset_coll <= MAX_CHAR_COLL_NUM); + return(uint32_t(old_prtype + (charset_coll << 16))); +} + /*********************************************************************//** Determines if a MySQL string type is a subset of UTF-8. This function may return false negatives, in case further character-set collation diff --git a/storage/innobase/include/data0type.ic b/storage/innobase/include/data0type.ic index 869d0ba8ed6..9ec85dfaf50 100644 --- a/storage/innobase/include/data0type.ic +++ b/storage/innobase/include/data0type.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -151,9 +152,9 @@ dtype_set( ut_ad(type); ut_ad(mtype <= DATA_MTYPE_MAX); - type->mtype = mtype; - type->prtype = prtype; - type->len = len; + type->mtype = unsigned(mtype); + type->prtype = unsigned(prtype); + type->len = unsigned(len); dtype_set_mblen(type); } diff --git a/storage/innobase/include/db0err.h b/storage/innobase/include/db0err.h index 32f9117af84..b0609991f61 100644 --- a/storage/innobase/include/db0err.h +++ b/storage/innobase/include/db0err.h @@ -146,24 +146,6 @@ enum dberr_t { DB_IO_ERROR = 100, /*!< Generic IO error */ - DB_IO_DECOMPRESS_FAIL, /*!< Failure to decompress a page - after reading it from disk */ - - DB_IO_NO_PUNCH_HOLE, /*!< Punch hole not supported by - InnoDB */ - - DB_IO_NO_PUNCH_HOLE_FS, /*!< The file system doesn't support - punch hole */ - - DB_IO_NO_PUNCH_HOLE_TABLESPACE, /*!< The tablespace doesn't support - punch hole */ - - DB_IO_DECRYPT_FAIL, /*!< Failure to decrypt a page - after reading it from disk */ - - DB_IO_NO_ENCRYPT_TABLESPACE, /*!< The tablespace doesn't support - encrypt */ - DB_IO_PARTIAL_FAILED, /*!< Partial IO request failed */ DB_FORCED_ABORT, /*!< Transaction was forced to rollback @@ -172,14 +154,15 @@ enum dberr_t { DB_TABLE_CORRUPT, /*!< Table/clustered index is corrupted */ - DB_WRONG_FILE_NAME, /*!< Invalid Filename */ - DB_COMPUTE_VALUE_FAILED, /*!< Compute generated value failed */ DB_NO_FK_ON_S_BASE_COL, /*!< Cannot add foreign constrain placed on the base column of stored column */ + DB_IO_NO_PUNCH_HOLE, /*!< Punch hole not supported by + file system. */ + /* The following are partial failure codes */ DB_FAIL = 1000, DB_OVERFLOW, @@ -190,16 +173,6 @@ enum dberr_t { DB_END_OF_INDEX, DB_NOT_FOUND, /*!< Generic error code for "Not found" type of errors */ - - /* The following are API only error codes. */ - DB_DATA_MISMATCH = 2000, /*!< Column update or read failed - because the types mismatch */ - - DB_SCHEMA_NOT_LOCKED /*!< If an API function expects the - schema to be locked in exclusive mode - and if it's not then that API function - will return this error code */ - }; #endif diff --git a/storage/innobase/include/dict0crea.h b/storage/innobase/include/dict0crea.h index 51cef91d318..9065f7ebf3d 100644 --- a/storage/innobase/include/dict0crea.h +++ b/storage/innobase/include/dict0crea.h @@ -67,13 +67,6 @@ dict_create_table_step( /*===================*/ que_thr_t* thr); /*!< in: query thread */ -/** Builds a tablespace to store various objects. -@param[in,out] tablespace Tablespace object describing what to build. -@return DB_SUCCESS or error code. */ -dberr_t -dict_build_tablespace( - Tablespace* tablespace); - /** Builds a tablespace to contain a table, using file-per-table=1. @param[in,out] table Table to build in its own tablespace. @param[in] node Table create node diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h index be6f6b1d9a5..92f00549dc9 100644 --- a/storage/innobase/include/dict0dict.h +++ b/storage/innobase/include/dict0dict.h @@ -2,7 +2,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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 @@ -399,7 +399,7 @@ void dict_table_add_to_cache( /*====================*/ dict_table_t* table, /*!< in: table */ - ibool can_be_evicted, /*!< in: TRUE if can be evicted*/ + bool can_be_evicted, /*!< in: whether can be evicted*/ mem_heap_t* heap) /*!< in: temporary heap */ MY_ATTRIBUTE((nonnull)); /**********************************************************************//** @@ -992,7 +992,9 @@ dict_tf_get_format( @param[in] format, File Format @param[in] zip_ssize Zip Shift Size @param[in] use_data_dir Table uses DATA DIRECTORY -@param[in] shared_space Table uses a General Shared Tablespace */ +@param[in] page_compressed Table uses page compression +@param[in] page_compression_level Page compression level +@param[in] not_used For future */ UNIV_INLINE void dict_tf_set( @@ -1000,28 +1002,9 @@ dict_tf_set( rec_format_t format, ulint zip_ssize, bool use_data_dir, - bool shared_space, bool page_compressed, ulint page_compression_level, - ulint atomic_writes); - -/** Initialize a dict_table_t::flags pointer. -@param[in] compact, Table uses Compact or greater -@param[in] zip_ssize Zip Shift Size (log 2 minus 9) -@param[in] atomic_blobs Table uses Compressed or Dynamic -@param[in] data_dir Table uses DATA DIRECTORY -@param[in] shared_space Table uses a General Shared Tablespace */ -UNIV_INLINE -ulint -dict_tf_init( - bool compact, - ulint zip_ssize, - bool atomic_blobs, - bool data_dir, - bool shared_space, - bool page_compressed, - ulint page_compression_level, - ulint atomic_writes); + ulint not_used); /** Convert a 32 bit integer table flags to the 32 bit FSP Flags. Fsp Flags are written into the tablespace header at the offset @@ -1034,14 +1017,10 @@ dict_table_t::flags | 0 | 1 | 1 | 1 fil_space_t::flags | 0 | 0 | 1 | 1 ================================================================== @param[in] table_flags dict_table_t::flags -@param[in] is_temp whether the tablespace is temporary -@param[in] is_encrypted whether the tablespace is encrypted @return tablespace flags (fil_space_t::flags) */ +UNIV_INLINE ulint -dict_tf_to_fsp_flags( - ulint table_flags, - bool is_temp, - bool is_encrypted = false) +dict_tf_to_fsp_flags(ulint table_flags) MY_ATTRIBUTE((const)); /** Extract the page size from table flags. @@ -1588,11 +1567,9 @@ dict_index_calc_min_rec_len( /*========================*/ const dict_index_t* index) /*!< in: index */ MY_ATTRIBUTE((nonnull, warn_unused_result)); -/********************************************************************//** -Reserves the dictionary system mutex for MySQL. */ +/** Reserve the dictionary system mutex. */ void -dict_mutex_enter_for_mysql_func(const char * file, ulint line); -/*============================*/ +dict_mutex_enter_for_mysql_func(const char *file, unsigned line); #define dict_mutex_enter_for_mysql() \ dict_mutex_enter_for_mysql_func(__FILE__, __LINE__) @@ -1784,11 +1761,13 @@ struct dict_sys_t{ /** dummy index for ROW_FORMAT=REDUNDANT supremum and infimum records */ extern dict_index_t* dict_ind_redundant; -/**********************************************************************//** -Inits dict_ind_redundant. */ +/** Initialize dict_ind_redundant. */ void -dict_ind_init(void); -/*===============*/ +dict_ind_init(); + +/** Free dict_ind_redundant. */ +void +dict_ind_free(); /* Auxiliary structs for checking a table definition @{ */ @@ -1975,25 +1954,6 @@ dict_table_is_temporary( const dict_table_t* table) /*!< in: table to check */ MY_ATTRIBUTE((warn_unused_result)); -/********************************************************************//** -Check if it is a encrypted table. -@return true if table encryption flag is set. */ -UNIV_INLINE -bool -dict_table_is_encrypted( -/*====================*/ - const dict_table_t* table) /*!< in: table to check */ - MY_ATTRIBUTE((warn_unused_result)); - -/** Check if the table is in a shared tablespace (System or General). -@param[in] id Space ID to check -@return true if id is a shared tablespace, false if not. */ -UNIV_INLINE -bool -dict_table_in_shared_tablespace( - const dict_table_t* table) - MY_ATTRIBUTE((warn_unused_result)); - /********************************************************************//** Turn-off redo-logging if temporary table. */ UNIV_INLINE diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic index b99cb421ab2..061153589c8 100644 --- a/storage/innobase/include/dict0dict.ic +++ b/storage/innobase/include/dict0dict.ic @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation +Copyright (c) 2013, 2017, MariaDB Corporation. This 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 @@ -660,11 +660,9 @@ dict_tf_is_valid( ulint zip_ssize = DICT_TF_GET_ZIP_SSIZE(flags); bool atomic_blobs = DICT_TF_HAS_ATOMIC_BLOBS(flags); bool data_dir = DICT_TF_HAS_DATA_DIR(flags); - bool shared_space = DICT_TF_HAS_SHARED_SPACE(flags); ulint unused = DICT_TF_GET_UNUSED(flags); bool page_compression = DICT_TF_GET_PAGE_COMPRESSION(flags); ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(flags); - ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(flags); bool flags_corrupt = false; /* Make sure there are no bits that we do not know about. */ @@ -711,17 +709,6 @@ dict_tf_is_valid( } } - if (atomic_writes) { - - if(atomic_writes > ATOMIC_WRITES_OFF) { - flags_corrupt = true; - } - } - - /* HAS_DATA_DIR and SHARED_SPACE are mutually exclusive. */ - if (data_dir && shared_space) { - flags_corrupt = true; - } if (flags_corrupt) { ib::error() @@ -733,9 +720,7 @@ dict_tf_is_valid( << " data_dir:" << data_dir << " zip_ssize:" << zip_ssize << " page_compression:" << page_compression - << " page_compression_level:" << page_compression_level - << " atomic_writes:" << atomic_writes - << " shared_space:" << shared_space; + << " page_compression_level:" << page_compression_level; return (false); } else { return(true); @@ -761,13 +746,6 @@ dict_tf2_is_valid( return(false); } - bool file_per_table = ((flags2 & DICT_TF2_USE_FILE_PER_TABLE) != 0); - bool shared_space = DICT_TF_HAS_SHARED_SPACE(flags); - - if (file_per_table && shared_space) { - return(false); - } - return(true); } @@ -789,9 +767,6 @@ dict_sys_tables_type_validate( ulint unused = DICT_TF_GET_UNUSED(type); bool page_compression = DICT_TF_GET_PAGE_COMPRESSION(type); ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(type); - ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(type); - - ut_a(atomic_writes <= ATOMIC_WRITES_OFF); /* The low order bit of SYS_TABLES.TYPE is always set to 1. If the format is UNIV_FORMAT_B or higher, this field is the same @@ -875,13 +850,6 @@ dict_sys_tables_type_validate( } } - /* Validate that the atomic writes number is within allowed range. */ - if (atomic_writes > ATOMIC_WRITES_OFF) { - ib::error() << "SYS_TABLES::TYPE=" << type - << " atomic_writes:" << atomic_writes; - return(ULINT_UNDEFINED); - } - /* Return the validated SYS_TABLES.TYPE. */ return(type); } @@ -949,11 +917,9 @@ dict_table_get_format( @param[in] format File Format @param[in] zip_ssize Zip Shift Size @param[in] use_data_dir Table uses DATA DIRECTORY -@param[in] atomic_writes Does table use atomic writes -@param[in] shared_space Table uses a General Shared Tablespace @param[in] page_compressed Table uses page compression @param[in] page_compression_level Page compression level -@param[in] atomic_writes Table uses atomic writes */ +@param[in] not_used For future */ UNIV_INLINE void dict_tf_set( @@ -962,10 +928,9 @@ dict_tf_set( rec_format_t format, ulint zip_ssize, bool use_data_dir, - bool shared_space, bool page_compressed, ulint page_compression_level, - ulint atomic_writes) + ulint not_used) { switch (format) { case REC_FORMAT_REDUNDANT: @@ -992,10 +957,6 @@ dict_tf_set( *flags |= (1 << DICT_TF_POS_DATA_DIR); } - if (shared_space) { - *flags |= (1 << DICT_TF_POS_SHARED_SPACE); - } - if (page_compressed) { *flags |= (1 << DICT_TF_POS_ATOMIC_BLOBS) | (1 << DICT_TF_POS_PAGE_COMPRESSION) @@ -1005,72 +966,58 @@ dict_tf_set( ut_ad(dict_tf_get_page_compression(*flags) == TRUE); ut_ad(dict_tf_get_page_compression_level(*flags) == page_compression_level); } - - if (atomic_writes) { - *flags |= (atomic_writes << DICT_TF_POS_ATOMIC_WRITES); - ut_a(dict_tf_get_atomic_writes(*flags) == atomic_writes); - } } -/** Initialize a dict_table_t::flags pointer. -@param[in] compact, Table uses Compact or greater -@param[in] zip_ssize Zip Shift Size (log 2 minus 9) -@param[in] atomic_blobs Table uses Compressed or Dynamic -@param[in] data_dir Table uses DATA DIRECTORY -@param[in] shared_space Table uses a General Shared Tablespace -@param[in] page_compression Table uses page compression -@param[in] page_compression_level used compression level -@param[in] atomic_writes Table atomic writes option */ +/** Convert a 32 bit integer table flags to the 32 bit FSP Flags. +Fsp Flags are written into the tablespace header at the offset +FSP_SPACE_FLAGS and are also stored in the fil_space_t::flags field. +The following chart shows the translation of the low order bit. +Other bits are the same. +========================= Low order bit ========================== + | REDUNDANT | COMPACT | COMPRESSED | DYNAMIC +dict_table_t::flags | 0 | 1 | 1 | 1 +fil_space_t::flags | 0 | 0 | 1 | 1 +================================================================== +@param[in] table_flags dict_table_t::flags +@return tablespace flags (fil_space_t::flags) */ UNIV_INLINE ulint -dict_tf_init( - bool compact, - ulint zip_ssize, - bool atomic_blobs, - bool data_dir, - bool shared_space, - bool page_compressed, - ulint page_compression_level, - ulint atomic_writes) +dict_tf_to_fsp_flags(ulint table_flags) { - ulint flags = 0; + ulint fsp_flags; + ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL( + table_flags); + ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(table_flags); - if (compact) { - flags |= DICT_TF_COMPACT; + ut_ad((DICT_TF_GET_PAGE_COMPRESSION(table_flags) == 0) + == (page_compression_level == 0)); + + DBUG_EXECUTE_IF("dict_tf_to_fsp_flags_failure", + return(ULINT_UNDEFINED);); + + /* Adjust bit zero. */ + fsp_flags = DICT_TF_HAS_ATOMIC_BLOBS(table_flags) ? 1 : 0; + + /* ZIP_SSIZE and ATOMIC_BLOBS are at the same position. */ + fsp_flags |= table_flags + & (DICT_TF_MASK_ZIP_SSIZE | DICT_TF_MASK_ATOMIC_BLOBS); + + fsp_flags |= FSP_FLAGS_PAGE_SSIZE(); + + if (page_compression_level) { + fsp_flags |= FSP_FLAGS_MASK_PAGE_COMPRESSION; } - if (zip_ssize) { - flags |= (zip_ssize << DICT_TF_POS_ZIP_SSIZE); + ut_a(fsp_flags_is_valid(fsp_flags)); + + if (DICT_TF_HAS_DATA_DIR(table_flags)) { + fsp_flags |= 1U << FSP_FLAGS_MEM_DATA_DIR; } - if (atomic_blobs) { - flags |= (1 << DICT_TF_POS_ATOMIC_BLOBS); - } + fsp_flags |= atomic_writes << FSP_FLAGS_MEM_ATOMIC_WRITES; + fsp_flags |= page_compression_level << FSP_FLAGS_MEM_COMPRESSION_LEVEL; - if (data_dir) { - flags |= (1 << DICT_TF_POS_DATA_DIR); - } - - if (shared_space) { - flags |= (1 << DICT_TF_POS_SHARED_SPACE); - } - - if (page_compressed) { - flags |= (1 << DICT_TF_POS_ATOMIC_BLOBS) - | (1 << DICT_TF_POS_PAGE_COMPRESSION) - | (page_compression_level << DICT_TF_POS_PAGE_COMPRESSION_LEVEL); - - ut_ad(zip_ssize == 0); - ut_ad(dict_tf_get_page_compression(flags) == TRUE); - ut_ad(dict_tf_get_page_compression_level(flags) == page_compression_level); - } - - if (atomic_writes) { - flags |= (atomic_writes << DICT_TF_POS_ATOMIC_WRITES); - ut_a(dict_tf_get_atomic_writes(flags) == atomic_writes); - } - - return(flags); + return(fsp_flags); } /********************************************************************//** @@ -1097,14 +1044,12 @@ dict_sys_tables_type_to_tf( flags = redundant ? 0 : 1; /* ZIP_SSIZE, ATOMIC_BLOBS, DATA_DIR, PAGE_COMPRESSION, - PAGE_COMPRESSION_LEVEL, ATOMIC_WRITES are the same. */ + PAGE_COMPRESSION_LEVEL are the same. */ flags |= type & (DICT_TF_MASK_ZIP_SSIZE | DICT_TF_MASK_ATOMIC_BLOBS | DICT_TF_MASK_DATA_DIR | DICT_TF_MASK_PAGE_COMPRESSION - | DICT_TF_MASK_PAGE_COMPRESSION_LEVEL - | DICT_TF_MASK_ATOMIC_WRITES - | DICT_TF_MASK_SHARED_SPACE); + | DICT_TF_MASK_PAGE_COMPRESSION_LEVEL); ut_ad(!DICT_TF_GET_ZIP_SSIZE(flags) || DICT_TF_HAS_ATOMIC_BLOBS(flags)); return(flags); @@ -1134,14 +1079,12 @@ dict_tf_to_sys_tables_type( type = 1; /* ZIP_SSIZE, ATOMIC_BLOBS, DATA_DIR, PAGE_COMPRESSION, - PAGE_COMPRESSION_LEVEL, ATOMIC_WRITES are the same. */ + PAGE_COMPRESSION_LEVEL are the same. */ type |= flags & (DICT_TF_MASK_ZIP_SSIZE | DICT_TF_MASK_ATOMIC_BLOBS | DICT_TF_MASK_DATA_DIR | DICT_TF_MASK_PAGE_COMPRESSION - | DICT_TF_MASK_PAGE_COMPRESSION_LEVEL - | DICT_TF_MASK_ATOMIC_WRITES - | DICT_TF_MASK_SHARED_SPACE); + | DICT_TF_MASK_PAGE_COMPRESSION_LEVEL); return(type); } @@ -1299,7 +1242,6 @@ ulint dict_index_get_n_unique_in_tree_nonleaf( const dict_index_t* index) { - ut_ad(index != NULL); ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); ut_ad(index->cached); @@ -1476,7 +1418,7 @@ dict_index_set_space( ut_ad(index); ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); - index->space = space; + index->space = unsigned(space); } /*********************************************************************//** @@ -1775,30 +1717,6 @@ dict_table_is_temporary( return(DICT_TF2_FLAG_IS_SET(table, DICT_TF2_TEMPORARY)); } -/********************************************************************//** -Check if it is a encrypted table. -@return true if table encrypted flag is set. */ -UNIV_INLINE -bool -dict_table_is_encrypted( -/*====================*/ - const dict_table_t* table) /*!< in: table to check */ -{ - return(DICT_TF2_FLAG_IS_SET(table, DICT_TF2_ENCRYPTION)); -} - -/** Check if the table is in a shared tablespace (System or General). -@param[in] id Space ID to check -@return true if id is a shared tablespace, false if not. */ -UNIV_INLINE -bool -dict_table_in_shared_tablespace( - const dict_table_t* table) -{ - return(is_system_tablespace(table->space) - || DICT_TF_HAS_SHARED_SPACE(table->flags)); -} - /********************************************************************//** Turn-off redo-logging if temporary table. */ UNIV_INLINE @@ -1821,8 +1739,8 @@ A patch was added to v3.23.52 which initializes the MIX_LEN field to 0. Since file-per-table tablespaces were added in 4.1, any SYS_TABLES record with a non-zero space ID will have a reliable MIX_LEN field. However, this test does not use flags2 from SYS_TABLES.MIX_LEN. Instead, -assume that if the tablespace is not a predefined system tablespace and it -is not a general shared tablespace, then it must be file-per-table. +assume that if the tablespace is not a predefined system tablespace, + then it must be file-per-table. Also, during ALTER TABLE, the DICT_TF2_USE_FILE_PER_TABLE flag may not be set on one of the file-per-table tablespaces. This test cannot be done on a table in the process of being created @@ -1835,8 +1753,7 @@ dict_table_is_file_per_table( const dict_table_t* table) /*!< in: table to check */ { bool is_file_per_table = - !is_system_tablespace(table->space) - && !DICT_TF_HAS_SHARED_SPACE(table->flags); + !is_system_tablespace(table->space); /* If the table is file-per-table and it is not redundant, then it should have the flags2 bit for DICT_TF2_USE_FILE_PER_TABLE. */ @@ -1844,7 +1761,7 @@ dict_table_is_file_per_table( || !DICT_TF_GET_COMPACT(table->flags) || DICT_TF2_FLAG_IS_SET(table, DICT_TF2_USE_FILE_PER_TABLE)); - return(is_file_per_table ); + return(is_file_per_table); } /** Get reference count. @@ -1876,20 +1793,6 @@ dict_table_t::release() --n_ref_count; } -/** Check if tablespace name is "innodb_general". -@param[in] tablespace_name tablespace name -@retval true if name is "innodb_general" -@retval false if name is not "innodb_general" */ -inline -bool -dict_table_has_temp_general_tablespace_name( - const char* tablespace_name) { - - return(tablespace_name != NULL - && strncmp(tablespace_name, general_space_name, - strlen(general_space_name)) == 0); -} - /** Encode the number of columns and number of virtual columns in a 4 bytes value. We could do this because the number of columns in InnoDB is limited to 1017 @@ -1961,4 +1864,3 @@ dict_table_have_virtual_index( return(false); } - diff --git a/storage/innobase/include/dict0load.h b/storage/innobase/include/dict0load.h index 6d01c38c432..0a862bb17a9 100644 --- a/storage/innobase/include/dict0load.h +++ b/storage/innobase/include/dict0load.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -201,15 +202,6 @@ dict_get_and_save_data_dir_path( dict_table_t* table, bool dict_mutex_own); -/** Make sure the tablespace name is saved in dict_table_t if needed. -Try to read it from the file dictionary first, then from SYS_TABLESPACES. -@param[in] table Table object -@param[in] dict_mutex_own) true if dict_sys->mutex is owned already */ -void -dict_get_and_save_space_name( - dict_table_t* table, - bool dict_mutex_own); - /** Loads a table definition and also all its index definitions, and also the cluster definition if the table is a member in a cluster. Also loads all foreign key constraints where the foreign key is in the table or where diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index 538306f7af8..ff28add8ca4 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -2,7 +2,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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,12 +137,8 @@ This flag prevents older engines from attempting to open the table and allows InnoDB to update_create_info() accordingly. */ #define DICT_TF_WIDTH_DATA_DIR 1 -/** Width of the SHARED tablespace flag. -It is used to identify tables that exist inside a shared general tablespace. -If a table is created with the TABLESPACE=tsname option, an older engine will -not be able to find that table. This flag prevents older engines from attempting -to open the table and allows InnoDB to quickly find the tablespace. */ - +/** Width of the SHARED tablespace flag (Oracle MYSQL 5.7). +Not supported by MariaDB. */ #define DICT_TF_WIDTH_SHARED_SPACE 1 /** @@ -226,10 +222,6 @@ DEFAULT=0, ON = 1, OFF = 2 #define DICT_TF_MASK_DATA_DIR \ ((~(~0U << DICT_TF_WIDTH_DATA_DIR)) \ << DICT_TF_POS_DATA_DIR) -/** Bit mask of the SHARED_SPACE field */ -#define DICT_TF_MASK_SHARED_SPACE \ - ((~(~0U << DICT_TF_WIDTH_SHARED_SPACE)) \ - << DICT_TF_POS_SHARED_SPACE) /** Bit mask of the PAGE_COMPRESSION field */ #define DICT_TF_MASK_PAGE_COMPRESSION \ ((~(~0U << DICT_TF_WIDTH_PAGE_COMPRESSION)) \ @@ -267,10 +259,6 @@ DEFAULT=0, ON = 1, OFF = 2 #define DICT_TF_HAS_DATA_DIR(flags) \ ((flags & DICT_TF_MASK_DATA_DIR) \ >> DICT_TF_POS_DATA_DIR) -/** Return the value of the SHARED_SPACE field */ -#define DICT_TF_HAS_SHARED_SPACE(flags) \ - ((flags & DICT_TF_MASK_SHARED_SPACE) \ - >> DICT_TF_POS_SHARED_SPACE) /** Return the value of the PAGE_COMPRESSION field */ #define DICT_TF_GET_PAGE_COMPRESSION(flags) \ ((flags & DICT_TF_MASK_PAGE_COMPRESSION) \ @@ -307,35 +295,33 @@ for unknown bits in order to protect backward incompatibility. */ /* @{ */ /** Total number of bits in table->flags2. */ #define DICT_TF2_BITS 9 -#define DICT_TF2_UNUSED_BIT_MASK (~0U << DICT_TF2_BITS) +#define DICT_TF2_UNUSED_BIT_MASK (~0U << DICT_TF2_BITS | \ + 1U << DICT_TF_POS_SHARED_SPACE) #define DICT_TF2_BIT_MASK ~DICT_TF2_UNUSED_BIT_MASK /** TEMPORARY; TRUE for tables from CREATE TEMPORARY TABLE. */ -#define DICT_TF2_TEMPORARY 1 +#define DICT_TF2_TEMPORARY 1U /** The table has an internal defined DOC ID column */ -#define DICT_TF2_FTS_HAS_DOC_ID 2 +#define DICT_TF2_FTS_HAS_DOC_ID 2U /** The table has an FTS index */ -#define DICT_TF2_FTS 4 +#define DICT_TF2_FTS 4U /** Need to add Doc ID column for FTS index build. This is a transient bit for index build */ -#define DICT_TF2_FTS_ADD_DOC_ID 8 +#define DICT_TF2_FTS_ADD_DOC_ID 8U /** This bit is used during table creation to indicate that it will use its own tablespace instead of the system tablespace. */ -#define DICT_TF2_USE_FILE_PER_TABLE 16 +#define DICT_TF2_USE_FILE_PER_TABLE 16U /** Set when we discard/detach the tablespace */ -#define DICT_TF2_DISCARDED 32 +#define DICT_TF2_DISCARDED 32U /** This bit is set if all aux table names (both common tables and index tables) of a FTS table are in HEX format. */ -#define DICT_TF2_FTS_AUX_HEX_NAME 64 - -/** Encryption table bit. */ -#define DICT_TF2_ENCRYPTION 256 +#define DICT_TF2_FTS_AUX_HEX_NAME 64U /* @} */ @@ -892,6 +878,7 @@ struct dict_index_t{ representation we add more columns */ unsigned nulls_equal:1; /*!< if true, SQL NULL == SQL NULL */ +#ifdef BTR_CUR_HASH_ADAPT #ifdef MYSQL_INDEX_DISABLE_AHI unsigned disable_ahi:1; /*!< whether to disable the @@ -899,6 +886,7 @@ struct dict_index_t{ Maybe this could be disabled for temporary tables? */ #endif +#endif /* BTR_CUR_HASH_ADAPT */ unsigned n_uniq:10;/*!< number of fields from the beginning which are enough to determine an index entry uniquely */ @@ -937,8 +925,10 @@ struct dict_index_t{ column in ALTER */ UT_LIST_NODE_T(dict_index_t) indexes;/*!< list of indexes of the table */ +#ifdef BTR_CUR_ADAPT btr_search_t* search_info; /*!< info used in optimistic searches */ +#endif /* BTR_CUR_ADAPT */ row_log_t* online_log; /*!< the log of modifications during online index creation; @@ -1267,12 +1257,12 @@ struct dict_foreign_set_free { /** The flags for ON_UPDATE and ON_DELETE can be ORed; the default is that a foreign key constraint is enforced, therefore RESTRICT just means no flag */ /* @{ */ -#define DICT_FOREIGN_ON_DELETE_CASCADE 1 /*!< ON DELETE CASCADE */ -#define DICT_FOREIGN_ON_DELETE_SET_NULL 2 /*!< ON UPDATE SET NULL */ -#define DICT_FOREIGN_ON_UPDATE_CASCADE 4 /*!< ON DELETE CASCADE */ -#define DICT_FOREIGN_ON_UPDATE_SET_NULL 8 /*!< ON UPDATE SET NULL */ -#define DICT_FOREIGN_ON_DELETE_NO_ACTION 16 /*!< ON DELETE NO ACTION */ -#define DICT_FOREIGN_ON_UPDATE_NO_ACTION 32 /*!< ON UPDATE NO ACTION */ +#define DICT_FOREIGN_ON_DELETE_CASCADE 1U /*!< ON DELETE CASCADE */ +#define DICT_FOREIGN_ON_DELETE_SET_NULL 2U /*!< ON UPDATE SET NULL */ +#define DICT_FOREIGN_ON_UPDATE_CASCADE 4U /*!< ON DELETE CASCADE */ +#define DICT_FOREIGN_ON_UPDATE_SET_NULL 8U /*!< ON UPDATE SET NULL */ +#define DICT_FOREIGN_ON_DELETE_NO_ACTION 16U /*!< ON DELETE NO ACTION */ +#define DICT_FOREIGN_ON_UPDATE_NO_ACTION 32U /*!< ON UPDATE NO ACTION */ /* @} */ /** Display an identifier. @@ -1333,14 +1323,9 @@ struct dict_vcol_templ_t { /** when mysql_table was cached */ uint64_t mysql_table_query_id; - dict_vcol_templ_t() : vtempl(0), mysql_table_query_id(-1) {} + dict_vcol_templ_t() : vtempl(0), mysql_table_query_id(~0ULL) {} }; -/* This flag is for sync SQL DDL and memcached DML. -if table->memcached_sync_count == DICT_TABLE_IN_DDL means there's DDL running on -the table, DML from memcached will be blocked. */ -#define DICT_TABLE_IN_DDL -1 - /** These are used when MySQL FRM and InnoDB data dictionary are in inconsistent state. */ typedef enum { @@ -1389,19 +1374,9 @@ struct dict_table_t { /** Table name. */ table_name_t name; - /** NULL or the directory path where a TEMPORARY table that was - explicitly created by a user should be placed if innodb_file_per_table - is defined in my.cnf. In Unix this is usually "/tmp/...", - in Windows "temp\...". */ - const char* dir_path_of_temp_table; - /** NULL or the directory path specified by DATA DIRECTORY. */ char* data_dir_path; - /** NULL or the tablespace name that this table is assigned to, - specified by the TABLESPACE option.*/ - id_name_t tablespace; - /** Space where the clustered index of the table is placed. */ uint32_t space; @@ -1733,12 +1708,6 @@ struct dict_table_t { /* @} */ - /** Count of how many handles are opened to this table from memcached. - DDL on the table is NOT allowed until this count goes to zero. If - it is -1, then there's DDL on the table, DML from memcached will be - blocked. */ - lint memcached_sync_count; - /** FTS specific state variables. */ fts_t* fts; @@ -1779,12 +1748,6 @@ public: /** mysql_row_templ_t for base columns used for compute the virtual columns */ dict_vcol_templ_t* vc_templ; - - /** encryption key, it's only for export/import */ - byte* encryption_key; - - /** encryption iv, it's only for export/import */ - byte* encryption_iv; }; /*******************************************************************//** diff --git a/storage/innobase/include/dict0mem.ic b/storage/innobase/include/dict0mem.ic index 933f233aae6..da2ac629850 100644 --- a/storage/innobase/include/dict0mem.ic +++ b/storage/innobase/include/dict0mem.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -59,7 +60,7 @@ dict_mem_fill_index_struct( /* Assign a ulint to a 4-bit-mapped field. Only the low-order 4 bits are assigned. */ - index->type = type; + index->type = unsigned(type); index->space = (unsigned int) space; index->page = FIL_NULL; index->merge_threshold = DICT_INDEX_MERGE_THRESHOLD_DEFAULT; @@ -68,11 +69,10 @@ dict_mem_fill_index_struct( /* The '1 +' above prevents allocation of an empty mem block */ index->nulls_equal = false; +#ifdef BTR_CUR_HASH_ADAPT #ifdef MYSQL_INDEX_DISABLE_AHI index->disable_ahi = false; #endif - -#ifdef UNIV_DEBUG - index->magic_n = DICT_INDEX_MAGIC_N; -#endif /* UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ + ut_d(index->magic_n = DICT_INDEX_MAGIC_N); } diff --git a/storage/innobase/include/dict0pagecompress.h b/storage/innobase/include/dict0pagecompress.h index 19a2a6c52f3..6641f6ba85f 100644 --- a/storage/innobase/include/dict0pagecompress.h +++ b/storage/innobase/include/dict0pagecompress.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (C) 2013 SkySQL Ab. All Rights Reserved. +Copyright (C) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -56,37 +56,6 @@ dict_table_page_compression_level( const dict_table_t* table) /*!< in: table */ __attribute__((const)); -/********************************************************************//** -Verify that dictionary flags match tablespace flags -@return true if flags match, false if not */ -UNIV_INLINE -ibool -dict_tf_verify_flags( -/*=================*/ - ulint table_flags, /*!< in: dict_table_t::flags */ - ulint fsp_flags) /*!< in: fil_space_t::flags */ - __attribute__((const)); - -/********************************************************************//** -Extract the atomic writes flag from table flags. -@return true if atomic writes are used, false if not used */ -UNIV_INLINE -atomic_writes_t -dict_tf_get_atomic_writes( -/*======================*/ - ulint flags) /*!< in: flags */ - __attribute__((const)); - -/********************************************************************//** -Check whether the table uses the atomic writes. -@return true if atomic writes is used, false if not */ -UNIV_INLINE -atomic_writes_t -dict_table_get_atomic_writes( -/*=========================*/ - const dict_table_t* table); /*!< in: table */ - - #ifndef UNIV_NONINL #include "dict0pagecompress.ic" #endif diff --git a/storage/innobase/include/dict0pagecompress.ic b/storage/innobase/include/dict0pagecompress.ic index 811976434a8..67f4a26723f 100644 --- a/storage/innobase/include/dict0pagecompress.ic +++ b/storage/innobase/include/dict0pagecompress.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (C) 2013 SkySQL Ab. All Rights Reserved. +Copyright (C) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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,92 +24,6 @@ page compression and atomic writes information to dictionary. Created 11/12/2013 Jan Lindström jan.lindstrom@skysql.com ***********************************************************************/ -/********************************************************************//** -Verify that dictionary flags match tablespace flags -@return true if flags match, false if not */ -UNIV_INLINE -ibool -dict_tf_verify_flags( -/*=================*/ - ulint table_flags, /*!< in: dict_table_t::flags */ - ulint fsp_flags) /*!< in: fil_space_t::flags */ -{ - ulint table_unused = DICT_TF_GET_UNUSED(table_flags); - ulint compact = DICT_TF_GET_COMPACT(table_flags); - ulint ssize = DICT_TF_GET_ZIP_SSIZE(table_flags); - ulint atomic_blobs = DICT_TF_HAS_ATOMIC_BLOBS(table_flags); - ulint data_dir = DICT_TF_HAS_DATA_DIR(table_flags); - ulint page_compression = DICT_TF_GET_PAGE_COMPRESSION(table_flags); - ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(table_flags); - ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(table_flags); - ulint post_antelope = FSP_FLAGS_GET_POST_ANTELOPE(fsp_flags); - ulint zip_ssize = FSP_FLAGS_GET_ZIP_SSIZE(fsp_flags); - ulint fsp_atomic_blobs = FSP_FLAGS_HAS_ATOMIC_BLOBS(fsp_flags); - ulint page_ssize = FSP_FLAGS_GET_PAGE_SSIZE(fsp_flags); - ulint fsp_unused = FSP_FLAGS_GET_UNUSED(fsp_flags); - ulint fsp_page_compression = FSP_FLAGS_GET_PAGE_COMPRESSION(fsp_flags); - ulint fsp_page_compression_level = FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL(fsp_flags); - ulint fsp_atomic_writes = FSP_FLAGS_GET_ATOMIC_WRITES(fsp_flags); - - DBUG_EXECUTE_IF("dict_tf_verify_flags_failure", - return(ULINT_UNDEFINED);); - - ut_a(!table_unused); - ut_a(!fsp_unused); - ut_a(page_ssize == 0 || page_ssize != 0); /* silence compiler */ - ut_a(compact == 0 || compact == 1); /* silence compiler */ - ut_a(data_dir == 0 || data_dir == 1); /* silence compiler */ - ut_a(post_antelope == 0 || post_antelope == 1); /* silence compiler */ - - if (ssize != zip_ssize) { - fprintf(stderr, - "InnoDB: Error: table flags has zip_ssize %ld" - " in the data dictionary\n" - "InnoDB: but the flags in file has zip_ssize %ld\n", - ssize, zip_ssize); - return (FALSE); - } - if (atomic_blobs != fsp_atomic_blobs) { - fprintf(stderr, - "InnoDB: Error: table flags has atomic_blobs %ld" - " in the data dictionary\n" - "InnoDB: but the flags in file has atomic_blobs %ld\n", - atomic_blobs, fsp_atomic_blobs); - - return (FALSE); - } - if (page_compression != fsp_page_compression) { - fprintf(stderr, - "InnoDB: Error: table flags has page_compression %ld" - " in the data dictionary\n" - "InnoDB: but the flags in file ahas page_compression %ld\n", - page_compression, fsp_page_compression); - - return (FALSE); - } - if (page_compression_level != fsp_page_compression_level) { - fprintf(stderr, - "InnoDB: Error: table flags has page_compression_level %ld" - " in the data dictionary\n" - "InnoDB: but the flags in file has page_compression_level %ld\n", - page_compression_level, fsp_page_compression_level); - - return (FALSE); - } - - if (atomic_writes != fsp_atomic_writes) { - fprintf(stderr, - "InnoDB: Error: table flags has atomic writes %ld" - " in the data dictionary\n" - "InnoDB: but the flags in file has atomic_writes %ld\n", - atomic_writes, fsp_atomic_writes); - - return (FALSE); - } - - return(TRUE); -} - /********************************************************************//** Extract the page compression level from dict_table_t::flags. These flags are in memory, so assert that they are valid. @@ -165,27 +79,3 @@ dict_table_is_page_compressed( { return (dict_tf_get_page_compression(table->flags)); } - -/********************************************************************//** -Extract the atomic writes flag from table flags. -@return enumerated value of atomic writes */ -UNIV_INLINE -atomic_writes_t -dict_tf_get_atomic_writes( -/*======================*/ - ulint flags) /*!< in: flags */ -{ - return((atomic_writes_t)DICT_TF_GET_ATOMIC_WRITES(flags)); -} - -/********************************************************************//** -Check whether the table uses the atomic writes. -@return enumerated value of atomic writes */ -UNIV_INLINE -atomic_writes_t -dict_table_get_atomic_writes( -/*=========================*/ - const dict_table_t* table) /*!< in: table */ -{ - return ((atomic_writes_t)dict_tf_get_atomic_writes(table->flags)); -} diff --git a/storage/innobase/include/dict0stats.h b/storage/innobase/include/dict0stats.h index 8941b399f7d..cb16a4dee9c 100644 --- a/storage/innobase/include/dict0stats.h +++ b/storage/innobase/include/dict0stats.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2009, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -77,14 +78,10 @@ dict_stats_set_persistent( ibool ps_off) /*!< in: persistent stats explicitly disabled */ MY_ATTRIBUTE((nonnull)); -/*********************************************************************//** -Check whether persistent statistics is enabled for a given table. -@return TRUE if enabled, FALSE otherwise */ +/** @return whether persistent statistics is enabled for a given table */ UNIV_INLINE -ibool -dict_stats_is_persistent_enabled( -/*=============================*/ - const dict_table_t* table) /*!< in: table */ +bool +dict_stats_is_persistent_enabled(const dict_table_t* table) MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** @@ -100,14 +97,11 @@ dict_stats_auto_recalc_set( ibool auto_recalc_on, /*!< in: explicitly enabled */ ibool auto_recalc_off); /*!< in: explicitly disabled */ -/*********************************************************************//** -Check whether auto recalc is enabled for a given table. -@return TRUE if enabled, FALSE otherwise */ +/** @return whether auto recalc is enabled for a given table*/ UNIV_INLINE -ibool -dict_stats_auto_recalc_is_enabled( -/*==============================*/ - const dict_table_t* table); /*!< in: table */ +bool +dict_stats_auto_recalc_is_enabled(const dict_table_t* table) + MY_ATTRIBUTE((nonnull, warn_unused_result)); /*********************************************************************//** Initialize table's stats for the first time when opening a table. */ diff --git a/storage/innobase/include/dict0stats.ic b/storage/innobase/include/dict0stats.ic index 61c88773912..1efe5780b58 100644 --- a/storage/innobase/include/dict0stats.ic +++ b/storage/innobase/include/dict0stats.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -60,14 +61,10 @@ dict_stats_set_persistent( table->stat_persistent = stat_persistent; } -/*********************************************************************//** -Check whether persistent statistics is enabled for a given table. -@return TRUE if enabled, FALSE otherwise */ +/** @return whether persistent statistics is enabled for a given table */ UNIV_INLINE -ibool -dict_stats_is_persistent_enabled( -/*=============================*/ - const dict_table_t* table) /*!< in: table */ +bool +dict_stats_is_persistent_enabled(const dict_table_t* table) { /* Because of the nature of this check (non-locking) it is possible that a table becomes: @@ -89,9 +86,9 @@ dict_stats_is_persistent_enabled( if (stat_persistent & DICT_STATS_PERSISTENT_ON) { ut_ad(!(stat_persistent & DICT_STATS_PERSISTENT_OFF)); - return(TRUE); + return(true); } else if (stat_persistent & DICT_STATS_PERSISTENT_OFF) { - return(FALSE); + return(false); } else { return(srv_stats_persistent); } @@ -126,23 +123,19 @@ dict_stats_auto_recalc_set( table->stats_auto_recalc = stats_auto_recalc; } -/*********************************************************************//** -Check whether auto recalc is enabled for a given table. -@return TRUE if enabled, FALSE otherwise */ +/** @return whether auto recalc is enabled for a given table*/ UNIV_INLINE -ibool -dict_stats_auto_recalc_is_enabled( -/*==============================*/ - const dict_table_t* table) /*!< in: table */ +bool +dict_stats_auto_recalc_is_enabled(const dict_table_t* table) { /* we rely on this read to be atomic */ ib_uint32_t stats_auto_recalc = table->stats_auto_recalc; if (stats_auto_recalc & DICT_STATS_AUTO_RECALC_ON) { ut_ad(!(stats_auto_recalc & DICT_STATS_AUTO_RECALC_OFF)); - return(TRUE); + return(true); } else if (stats_auto_recalc & DICT_STATS_AUTO_RECALC_OFF) { - return(FALSE); + return(false); } else { return(srv_stats_auto_recalc); } diff --git a/storage/innobase/include/dict0stats_bg.h b/storage/innobase/include/dict0stats_bg.h index 50c2591332e..e09716e3842 100644 --- a/storage/innobase/include/dict0stats_bg.h +++ b/storage/innobase/include/dict0stats_bg.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -32,7 +33,8 @@ Created Apr 26, 2012 Vasil Dimov #include "os0event.h" #include "os0thread.h" -/** Event to wake up the stats thread */ +/** Event to wake up dict_stats_thread on dict_stats_recalc_pool_add() +or shutdown. Not protected by any mutex. */ extern os_event_t dict_stats_event; #ifdef HAVE_PSI_INTERFACE diff --git a/storage/innobase/include/dict0types.h b/storage/innobase/include/dict0types.h index ae002dd9487..27b4cc0e694 100644 --- a/storage/innobase/include/dict0types.h +++ b/storage/innobase/include/dict0types.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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 @@ -80,13 +80,6 @@ enum ib_quiesce_t { QUIESCE_COMPLETE /*!< All done */ }; -/** Enum values for atomic_writes table option */ -typedef enum { - ATOMIC_WRITES_DEFAULT = 0, - ATOMIC_WRITES_ON = 1, - ATOMIC_WRITES_OFF = 2 -} atomic_writes_t; - #ifndef UNIV_INNOCHECKSUM typedef ib_mutex_t DictSysMutex; #endif /* !UNIV_INNOCHECKSUM */ @@ -108,7 +101,7 @@ extern uint ibuf_debug; #define SPATIAL_STATUS_SHIFT 12 /** Mask to encode/decode spatial status. */ -#define SPATIAL_STATUS_MASK (3 << SPATIAL_STATUS_SHIFT) +#define SPATIAL_STATUS_MASK (3U << SPATIAL_STATUS_SHIFT) #if SPATIAL_STATUS_MASK < REC_VERSION_56_MAX_INDEX_COL_LEN # error SPATIAL_STATUS_MASK < REC_VERSION_56_MAX_INDEX_COL_LEN diff --git a/storage/innobase/include/fil0crypt.h b/storage/innobase/include/fil0crypt.h index e854915b2ae..7211d295c27 100644 --- a/storage/innobase/include/fil0crypt.h +++ b/storage/innobase/include/fil0crypt.h @@ -1,6 +1,6 @@ /***************************************************************************** Copyright (C) 2013, 2015, Google Inc. All Rights Reserved. -Copyright (c) 2015, 2016, MariaDB Corporation. +Copyright (c) 2015, 2017, MariaDB Corporation. This 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,9 @@ Created 04/01/2015 Jan Lindström #ifndef fil0crypt_h #define fil0crypt_h +#include "os0event.h" +#include "my_crypt.h" + /** * Magic pattern in start of crypt data on page 0 */ @@ -45,6 +48,8 @@ typedef enum { FIL_SPACE_ENCRYPTION_OFF = 2 /* Tablespace is not encrypted */ } fil_encryption_t; +extern os_event_t fil_crypt_threads_event; + /** * CRYPT_SCHEME_UNENCRYPTED * @@ -109,7 +114,7 @@ struct fil_space_crypt_struct : st_encryption_scheme The object is expected to be placed in a buffer that has been zero-initialized. */ fil_space_crypt_struct( - ulint new_type, + uint new_type, uint new_min_key_version, uint new_key_id, ulint offset, @@ -391,12 +396,6 @@ fil_crypt_set_thread_cnt( /*=====================*/ uint new_cnt); /*!< in: requested #threads */ -/********************************************************************* -End threads for key rotation */ -UNIV_INTERN -void -fil_crypt_threads_end(); - /********************************************************************* Cleanup resources for threads for key rotation */ UNIV_INTERN diff --git a/storage/innobase/include/fil0crypt.ic b/storage/innobase/include/fil0crypt.ic index 65ca4def85f..fe3a21f0643 100644 --- a/storage/innobase/include/fil0crypt.ic +++ b/storage/innobase/include/fil0crypt.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2015, 2016, MariaDB Corporation. +Copyright (c) 2015, 2017, MariaDB Corporation. This 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 @@ -59,7 +59,7 @@ fil_page_encryption_status( } } } else { - ulint key = mach_read_from_4(buf + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION); + unsigned key = mach_read_from_4(buf + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION); if (!encryption_key_version_exists(crypt_data->key_id, key)) { return 1; } diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h index 1e07c4f8fb5..587ad902c2a 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2017, MariaDB Corporation. This 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,13 +38,10 @@ Created 10/25/1995 Heikki Tuuri #include #include -extern const char general_space_name[]; - // Forward declaration struct trx_t; class page_id_t; class truncate_t; -struct btr_create_t; /* structure containing encryption specification */ typedef struct fil_space_crypt_struct fil_space_crypt_t; @@ -133,7 +130,8 @@ struct fil_space_t { /*!< recovered tablespace size in pages; 0 if no size change was read from the redo log, or if the size change was implemented */ - ulint flags; /*!< tablespace flags; see + ulint flags; /*!< FSP_SPACE_FLAGS and FSP_FLAGS_MEM_ flags; + see fsp0types.h, fsp_flags_is_valid(), page_size_t(ulint) (constructor) */ ulint n_reserved_extents; @@ -166,21 +164,6 @@ struct fil_space_t { UT_LIST_NODE_T(fil_space_t) space_list; /*!< list of all spaces */ - /** Compression algorithm */ - Compression::Type compression_type; - - /** Encryption algorithm */ - Encryption::Type encryption_type; - - /** Encrypt key */ - byte encryption_key[ENCRYPTION_KEY_LEN]; - - /** Encrypt key length*/ - ulint encryption_klen; - - /** Encrypt initial vector */ - byte encryption_iv[ENCRYPTION_KEY_LEN]; - /** MariaDB encryption data */ fil_space_crypt_t* crypt_data; @@ -193,10 +176,17 @@ struct fil_space_t { /** True if page 0 of tablespace is read */ bool read_page0; + /** True if the device this filespace is on supports atomic writes */ + bool atomic_write_supported; + /** Release the reserved free extents. @param[in] n_reserved number of reserved extents */ void release_free_extents(ulint n_reserved); + /** True if file system storing this tablespace supports + punch hole */ + bool punch_hole; + ulint magic_n;/*!< FIL_SPACE_MAGIC_N */ }; @@ -209,11 +199,11 @@ struct fil_node_t { fil_space_t* space; /** file name; protected by fil_system->mutex and log_sys->mutex. */ char* name; - /** whether this file is open */ - bool is_open; /** file handle (valid if is_open) */ os_file_t handle; - /** event that groups and serializes calls to fsync */ + /** event that groups and serializes calls to fsync; + os_event_set() and os_event_reset() are protected by + fil_system_t::mutex */ os_event_t sync_event; /** whether the file actually is a raw device or disk partition */ bool is_raw_disk; @@ -241,17 +231,20 @@ struct fil_node_t { /** link to the fil_system->LRU list (keeping track of open files) */ UT_LIST_NODE_T(fil_node_t) LRU; - /** whether the file system of this file supports PUNCH HOLE */ - bool punch_hole; - - /** block size to use for punching holes */ - ulint block_size; - - /** whether atomic write is enabled for this file */ + /** whether this file could use atomic write (data file) */ bool atomic_write; + /** Filesystem block size */ + ulint block_size; + /** FIL_NODE_MAGIC_N */ ulint magic_n; + + /** @return whether this file is open */ + bool is_open() const + { + return(handle != OS_FILE_CLOSED); + } }; /** Value of fil_node_t::magic_n */ @@ -262,110 +255,17 @@ enum ib_extention { NO_EXT = 0, IBD = 1, ISL = 2, - CFG = 3, - CFP = 4 + CFG = 3 }; extern const char* dot_ext[]; #define DOT_IBD dot_ext[IBD] #define DOT_ISL dot_ext[ISL] #define DOT_CFG dot_ext[CFG] -#define DOT_CPF dot_ext[CFP] - -/** Wrapper for a path to a directory. -This folder may or may not yet esist. Since not all directory paths -end in "/", we should only use this for a directory path or a filepath -that has a ".ibd" extension. */ -class Folder -{ -public: - /** Default constructor */ - Folder() : m_folder(NULL) {} - - /** Constructor - @param[in] path pathname (not necessarily NUL-terminated) - @param[in] len length of the path, in bytes */ - Folder(const char* path, size_t len); - - /** Assignment operator - @param[in] folder folder string provided */ - class Folder& operator=(const char* path); - - /** Destructor */ - ~Folder() - { - ut_free(m_folder); - } - - /** Implicit type conversion - @return the wrapped object */ - operator const char*() const - { - return(m_folder); - } - - /** Explicit type conversion - @return the wrapped object */ - const char* operator()() const - { - return(m_folder); - } - - /** return the length of m_folder - @return the length of m_folder */ - size_t len() - { - return m_folder_len; - } - - /** Determine if two folders are equal - @param[in] other folder to compare to - @return whether the folders are equal */ - bool operator==(const Folder& other) const; - - /** Determine if the left folder is the same or an ancestor of - (contains) the right folder. - @param[in] other folder to compare to - @return whether this is the same or an ancestor or the other folder. */ - bool operator>=(const Folder& other) const; - - /** Determine if the left folder is an ancestor of (contains) - the right folder. - @param[in] other folder to compare to - @return whether this is an ancestor of the other folder */ - bool operator>(const Folder& other) const; - - /** Determine if the directory referenced by m_folder exists. - @return whether the directory exists */ - bool exists(); - -private: - /** Build the basic folder name from the path and length provided - @param[in] path pathname (not necessarily NUL-terminated) - @param[in] len length of the path, in bytes */ - void make_path(const char* path, size_t len); - - /** Resolve a relative path in m_folder to an absolute path - in m_abs_path setting m_abs_len. */ - void make_abs_path(); - - /** The wrapped folder string */ - char* m_folder; - - /** Length of m_folder */ - size_t m_folder_len; - - /** A full absolute path to the same file. */ - char m_abs_path[FN_REFLEN + 2]; - - /** Length of m_abs_path to the deepest folder */ - size_t m_abs_len; -}; /** When mysqld is run, the default directory "." is the mysqld datadir, but in the MySQL Embedded Server Library and mysqlbackup it is not the default directory, and we must set the base file path explicitly */ extern const char* fil_path_to_mysql_datadir; -extern Folder folder_mysql_datadir; /** Initial size of a single-table tablespace in pages */ #define FIL_IBD_FILE_INITIAL_SIZE 4 @@ -447,23 +347,6 @@ extern fil_addr_t fil_addr_null; used to encrypt the page + 32-bit checksum or 64 bits of zero if no encryption */ -/** If page type is FIL_PAGE_COMPRESSED then the 8 bytes starting at -FIL_PAGE_FILE_FLUSH_LSN are broken down as follows: */ - -/** Control information version format (u8) */ -static const ulint FIL_PAGE_VERSION = FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION; - -/** Compression algorithm (u8) */ -static const ulint FIL_PAGE_ALGORITHM_V1 = FIL_PAGE_VERSION + 1; - -/** Original page type (u16) */ -static const ulint FIL_PAGE_ORIGINAL_TYPE_V1 = FIL_PAGE_ALGORITHM_V1 + 1; - -/** Original data size in bytes (u16)*/ -static const ulint FIL_PAGE_ORIGINAL_SIZE_V1 = FIL_PAGE_ORIGINAL_TYPE_V1 + 2; - -/** Size after compression (u16) */ -static const ulint FIL_PAGE_COMPRESS_SIZE_V1 = FIL_PAGE_ORIGINAL_SIZE_V1 + 2; /** This overloads FIL_PAGE_FILE_FLUSH_LSN for RTREE Split Sequence Number */ #define FIL_RTREE_SPLIT_SEQ_NUM FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION @@ -513,11 +396,12 @@ static const ulint FIL_PAGE_COMPRESS_SIZE_V1 = FIL_PAGE_ORIGINAL_SIZE_V1 + 2; #define FIL_PAGE_TYPE_UNKNOWN 13 /*!< In old tablespaces, garbage in FIL_PAGE_TYPE is replaced with this value when flushing pages. */ -#define FIL_PAGE_COMPRESSED 14 /*!< Compressed page */ -#define FIL_PAGE_ENCRYPTED 15 /*!< Encrypted page */ -#define FIL_PAGE_COMPRESSED_AND_ENCRYPTED 16 - /*!< Compressed and Encrypted page */ -#define FIL_PAGE_ENCRYPTED_RTREE 17 /*!< Encrypted R-tree page */ + +/* File page types introduced in MySQL 5.7, not supported in MariaDB */ +//#define FIL_PAGE_COMPRESSED 14 +//#define FIL_PAGE_ENCRYPTED 15 +//#define FIL_PAGE_COMPRESSED_AND_ENCRYPTED 16 +//#define FIL_PAGE_ENCRYPTED_RTREE 17 /** Used by i_s.cc to index into the text description. */ #define FIL_PAGE_TYPE_LAST FIL_PAGE_TYPE_UNKNOWN @@ -598,14 +482,6 @@ struct fil_system_t { startup we scan the data dictionary and set here the maximum of the space id's of the tables there */ - int64_t tablespace_version; - /*!< a counter which is incremented for - every space object memory creation; - every space mem object gets a - 'timestamp' from this; in DISCARD/ - IMPORT this is used to check if we - should ignore an insert buffer merge - request */ UT_LIST_BASE_NODE_T(fil_space_t) space_list; /*!< list of all file spaces */ UT_LIST_BASE_NODE_T(fil_space_t) named_spaces; @@ -666,7 +542,7 @@ MY_ATTRIBUTE((warn_unused_result, pure)); @param[in] size file size in entire database blocks @param[in,out] space tablespace from fil_space_create() @param[in] is_raw whether this is a raw device or partition -@param[in] atomic_write true if atomic write enabled +@param[in] atomic_write true if atomic write could be enabled @param[in] max_pages maximum number of pages in file, ULINT_MAX means the file size is unlimited. @return pointer to the file name @@ -754,13 +630,6 @@ fil_space_get_flags( /*================*/ ulint id); /*!< in: space id */ -/** Check if table is mark for truncate. -@param[in] id space id -@return true if tablespace is marked for truncate. */ -bool -fil_space_is_being_truncated( - ulint id); - /** Open each fil_node_t of a named fil_space_t if not already open. @param[in] name Tablespace name @return true if all file nodes are opened. */ @@ -1080,14 +949,15 @@ fil_make_filepath( ib_extention suffix, bool strip_name); -/** Creates a new General or Single-Table tablespace +/** Create a tablespace file. @param[in] space_id Tablespace ID @param[in] name Tablespace name in dbname/tablename format. -For general tablespaces, the 'dbname/' part may be missing. @param[in] path Path and filename of the datafile to create. @param[in] flags Tablespace flags @param[in] size Initial size of the tablespace file in pages, must be >= FIL_IBD_FILE_INITIAL_SIZE +@param[in] mode MariaDB encryption mode +@param[in] key_id MariaDB encryption key_id @return DB_SUCCESS or error code */ dberr_t fil_ibd_create( @@ -1096,10 +966,18 @@ fil_ibd_create( const char* path, ulint flags, ulint size, - fil_encryption_t mode, /*!< in: encryption mode */ - ulint key_id) /*!< in: encryption key_id */ + fil_encryption_t mode, + ulint key_id) MY_ATTRIBUTE((warn_unused_result)); +/** Try to adjust FSP_SPACE_FLAGS if they differ from the expectations. +(Typically when upgrading from MariaDB 10.1.0..10.1.20.) +@param[in] space_id tablespace ID +@param[in] flags desired tablespace flags */ +UNIV_INTERN +void +fsp_flags_try_adjust(ulint space_id, ulint flags); + /********************************************************************//** Tries to open a single-table tablespace and optionally checks the space id is right in it. If does not succeed, prints an error message to the .err log. This @@ -1124,7 +1002,7 @@ statement to update the dictionary tables if they are incorrect. @param[in] fix_dict true if the dictionary is available to be fixed @param[in] purpose FIL_TYPE_TABLESPACE or FIL_TYPE_TEMPORARY @param[in] id tablespace ID -@param[in] flags tablespace flags +@param[in] flags expected FSP_SPACE_FLAGS @param[in] space_name tablespace name of the datafile If file-per-table, it is the table name in the databasename/tablename format @param[in] path_in expected filepath, usually read from dictionary @@ -1200,7 +1078,8 @@ fil_space_for_table_exists_in_mem( when find table space mismatch */ mem_heap_t* heap, /*!< in: heap memory */ table_id_t table_id, /*!< in: table id */ - dict_table_t* table); /*!< in: table or NULL */ + dict_table_t* table, /*!< in: table or NULL */ + ulint table_flags); /*!< in: table flags */ /** Try to extend a tablespace if it is smaller than the specified size. @param[in,out] space tablespace @@ -1250,11 +1129,6 @@ fil_space_get_n_reserved_extents( aligned @param[in] message message for aio handler if non-sync aio used, else ignored -@param[in,out] write_size Actual write size initialized - after fist successfull trim - operation for this page and if - nitialized we do not trim again if - Actual page @return DB_SUCCESS, DB_TABLESPACE_DELETED or DB_TABLESPACE_TRUNCATED if we are trying to do i/o on a tablespace which does not exist */ @@ -1267,8 +1141,7 @@ fil_io( ulint byte_offset, ulint len, void* buf, - void* message, - ulint* write_size); + void* message); /**********************************************************************//** Waits for an aio operation to complete. This function is used to write the handler for completed requests. The aio array of pending requests is divided @@ -1398,14 +1271,6 @@ fil_space_inc_redo_skipped_count( void fil_space_dec_redo_skipped_count( ulint id); - -/*******************************************************************//** -Check whether a single-table tablespace is redo skipped. -@return true if redo skipped */ -bool -fil_space_is_redo_skipped( -/*======================*/ - ulint id); /*!< in: space id */ #endif /********************************************************************//** @@ -1464,10 +1329,6 @@ struct PageCallback { @retval the space flags of the tablespace being iterated over */ virtual ulint get_space_flags() const UNIV_NOTHROW = 0; - /** Set the tablespace table size. - @param[in] page a page belonging to the tablespace */ - void set_page_size(const buf_frame_t* page) UNIV_NOTHROW; - /** The compressed page size @return the compressed page size */ const page_size_t& get_page_size() const @@ -1631,43 +1492,6 @@ fil_names_dirty_and_write( fil_space_t* space, mtr_t* mtr); -/** Set the compression type for the tablespace of a table -@param[in] table Table that should be compressesed -@param[in] algorithm Text representation of the algorithm -@return DB_SUCCESS or error code */ -dberr_t -fil_set_compression( - dict_table_t* table, - const char* algorithm) - MY_ATTRIBUTE((warn_unused_result)); - -/** Get the compression type for the tablespace -@param[in] space_id Space ID to check -@return the compression algorithm */ -Compression::Type -fil_get_compression( - ulint space_id) - MY_ATTRIBUTE((warn_unused_result)); - -/** Set the encryption type for the tablespace -@param[in] space Space ID of tablespace for which to set -@param[in] algorithm Encryption algorithm -@param[in] key Encryption key -@param[in] iv Encryption iv -@return DB_SUCCESS or error code */ -dberr_t -fil_set_encryption( - ulint space_id, - Encryption::Type algorithm, - byte* key, - byte* iv) - MY_ATTRIBUTE((warn_unused_result)); - -/** -@return true if the re-encrypt success */ -bool -fil_encryption_rotate(); - /** Write MLOG_FILE_NAME records if a persistent tablespace was modified for the first time since the latest fil_names_clear(). @param[in,out] space tablespace @@ -1733,19 +1557,6 @@ fil_names_clear( lsn_t lsn, bool do_write); -#ifdef UNIV_LINUX -/** -Try and enable FusionIO atomic writes. -@param[in] file OS file handle -@return true if successful */ -bool -fil_fusionio_enable_atomic_write(os_file_t file); -#endif /* UNIV_LINUX */ - -/** Note that the file system where the file resides doesn't support PUNCH HOLE -@param[in,out] node Node to set */ -void fil_no_punch_hole(fil_node_t* node); - #ifdef UNIV_ENABLE_UNIT_TEST_MAKE_FILEPATH void test_make_filepath(); #endif /* UNIV_ENABLE_UNIT_TEST_MAKE_FILEPATH */ @@ -1753,15 +1564,16 @@ void test_make_filepath(); /*******************************************************************//** Returns the block size of the file space +@param[in] space_id space id +@param[in] offset page offset +@param[in] len page len @return block size */ UNIV_INTERN ulint fil_space_get_block_size( -/*=====================*/ - ulint id, /*!< in: space id */ - ulint offset, /*!< in: page offset */ - ulint len); /*!< in: page len */ - + ulint id, + os_offset_t offset, + ulint len); /*******************************************************************//** Increments the count of pending operation, if space is not being deleted. @return TRUE if being deleted, and operation should be skipped */ diff --git a/storage/innobase/include/fil0fil.ic b/storage/innobase/include/fil0fil.ic index 8f8a4194c0d..01fa1093e5e 100644 --- a/storage/innobase/include/fil0fil.ic +++ b/storage/innobase/include/fil0fil.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2015, MariaDB Corporation. +Copyright (c) 2015, 2017 MariaDB Corporation. This 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,49 +58,41 @@ fil_get_page_type_name( { switch(page_type) { case FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED: - return (const char*)"PAGE_COMPRESSED_ENRYPTED"; + return "PAGE_COMPRESSED_ENRYPTED"; case FIL_PAGE_PAGE_COMPRESSED: - return (const char*)"PAGE_COMPRESSED"; + return "PAGE_COMPRESSED"; case FIL_PAGE_INDEX: - return (const char*)"INDEX"; + return "INDEX"; case FIL_PAGE_RTREE: - return (const char*)"RTREE"; + return "RTREE"; case FIL_PAGE_UNDO_LOG: - return (const char*)"UNDO LOG"; + return "UNDO LOG"; case FIL_PAGE_INODE: - return (const char*)"INODE"; + return "INODE"; case FIL_PAGE_IBUF_FREE_LIST: - return (const char*)"IBUF_FREE_LIST"; + return "IBUF_FREE_LIST"; case FIL_PAGE_TYPE_ALLOCATED: - return (const char*)"ALLOCATED"; + return "ALLOCATED"; case FIL_PAGE_IBUF_BITMAP: - return (const char*)"IBUF_BITMAP"; + return "IBUF_BITMAP"; case FIL_PAGE_TYPE_SYS: - return (const char*)"SYS"; + return "SYS"; case FIL_PAGE_TYPE_TRX_SYS: - return (const char*)"TRX_SYS"; + return "TRX_SYS"; case FIL_PAGE_TYPE_FSP_HDR: - return (const char*)"FSP_HDR"; + return "FSP_HDR"; case FIL_PAGE_TYPE_XDES: - return (const char*)"XDES"; + return "XDES"; case FIL_PAGE_TYPE_BLOB: - return (const char*)"BLOB"; + return "BLOB"; case FIL_PAGE_TYPE_ZBLOB: - return (const char*)"ZBLOB"; + return "ZBLOB"; case FIL_PAGE_TYPE_ZBLOB2: - return (const char*)"ZBLOB2"; - case FIL_PAGE_COMPRESSED: - return (const char*)"ORACLE PAGE COMPRESSED"; - case FIL_PAGE_ENCRYPTED: - return (const char*)"ORACLE PAGE ENCRYPTED"; - case FIL_PAGE_COMPRESSED_AND_ENCRYPTED: - return (const char*)"ORACLE PAGE COMPRESSED AND ENCRYPTED"; - case FIL_PAGE_ENCRYPTED_RTREE: - return (const char*)"ORACLE RTREE ENCRYPTED"; + return "ZBLOB2"; case FIL_PAGE_TYPE_UNKNOWN: - return (const char*)"OLD UNKOWN PAGE TYPE"; + return "OLD UNKOWN PAGE TYPE"; default: - return (const char*)"PAGE TYPE CORRUPTED"; + return "PAGE TYPE CORRUPTED"; } } @@ -145,52 +137,22 @@ fil_page_type_validate( page_type == FIL_PAGE_TYPE_BLOB || page_type == FIL_PAGE_TYPE_ZBLOB || page_type == FIL_PAGE_TYPE_ZBLOB2 || - page_type == FIL_PAGE_COMPRESSED || - page_type == FIL_PAGE_TYPE_UNKNOWN || - page_type == FIL_PAGE_ENCRYPTED || - page_type == FIL_PAGE_COMPRESSED_AND_ENCRYPTED || - page_type == FIL_PAGE_ENCRYPTED_RTREE))) { + page_type == FIL_PAGE_TYPE_UNKNOWN))) { - uint key_version = mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION); - bool page_compressed = (page_type == FIL_PAGE_PAGE_COMPRESSED); - bool page_compressed_encrypted = (page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED); ulint space = mach_read_from_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); ulint offset = mach_read_from_4(page + FIL_PAGE_OFFSET); - ib_uint64_t lsn = mach_read_from_8(page + FIL_PAGE_LSN); - ulint compressed_len = mach_read_from_2(page + FIL_PAGE_DATA); fil_system_enter(); fil_space_t* rspace = fil_space_get_by_id(space); fil_system_exit(); /* Dump out the page info */ - fprintf(stderr, "InnoDB: Space %lu offset %lu name %s page_type %lu page_type_name %s\n" - "InnoDB: key_version %u page_compressed %d page_compressed_encrypted %d lsn %llu compressed_len %lu\n", - space, offset, rspace->name, page_type, fil_get_page_type_name(page_type), - key_version, page_compressed, page_compressed_encrypted, (ulonglong)lsn, compressed_len); - fflush(stderr); - - ut_ad(page_type == FIL_PAGE_PAGE_COMPRESSED || - page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED || - page_type == FIL_PAGE_INDEX || - page_type == FIL_PAGE_RTREE || - page_type == FIL_PAGE_UNDO_LOG || - page_type == FIL_PAGE_INODE || - page_type == FIL_PAGE_IBUF_FREE_LIST || - page_type == FIL_PAGE_TYPE_ALLOCATED || - page_type == FIL_PAGE_IBUF_BITMAP || - page_type == FIL_PAGE_TYPE_SYS || - page_type == FIL_PAGE_TYPE_TRX_SYS || - page_type == FIL_PAGE_TYPE_FSP_HDR || - page_type == FIL_PAGE_TYPE_XDES || - page_type == FIL_PAGE_TYPE_BLOB || - page_type == FIL_PAGE_TYPE_ZBLOB || - page_type == FIL_PAGE_TYPE_ZBLOB2 || - page_type == FIL_PAGE_COMPRESSED || - page_type == FIL_PAGE_TYPE_UNKNOWN || - page_type == FIL_PAGE_ENCRYPTED || - page_type == FIL_PAGE_COMPRESSED_AND_ENCRYPTED || - page_type == FIL_PAGE_ENCRYPTED_RTREE); - + ib::fatal() << "Page " << space << ":" << offset + << " name " << (rspace ? rspace->name : "???") + << " page_type " << page_type + << " key_version " + << mach_read_from_4(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION) + << " lsn " << mach_read_from_8(page + FIL_PAGE_LSN) + << " compressed_len " << mach_read_from_2(page + FIL_PAGE_DATA); return false; } diff --git a/storage/innobase/include/fil0pagecompress.h b/storage/innobase/include/fil0pagecompress.h index d4cc54c7b2a..0bf6aa75f19 100644 --- a/storage/innobase/include/fil0pagecompress.h +++ b/storage/innobase/include/fil0pagecompress.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (C) 2013, 2016 MariaDB Corporation. All Rights Reserved. +Copyright (C) 2013, 2017 MariaDB Corporation. All Rights Reserved. This 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,20 +49,11 @@ fil_space_is_page_compressed( /*=========================*/ ulint id); /*!< in: space id */ /*******************************************************************//** -Returns the page compression flag of the space, or false if the space -is not compressed. The tablespace must be cached in the memory cache. -@return true if page compressed, false if not or space not found */ -UNIV_INTERN -bool -fil_space_get_page_compressed( -/*=========================*/ - fil_space_t* space); /*!< in: space id */ -/*******************************************************************//** Returns the atomic writes flag of the space, or false if the space is not using atomic writes. The tablespace must be cached in the memory cache. @return atomic write table option value */ UNIV_INLINE -atomic_writes_t +bool fil_space_get_atomic_writes( /*=========================*/ ulint id); /*!< in: space id */ diff --git a/storage/innobase/include/fsp0file.h b/storage/innobase/include/fsp0file.h index 83aa370abf0..1c4ac8152c9 100644 --- a/storage/innobase/include/fsp0file.h +++ b/storage/innobase/include/fsp0file.h @@ -65,11 +65,8 @@ public: m_is_valid(), m_first_page_buf(), m_first_page(), - m_atomic_write(), m_last_os_error(), m_file_info(), - m_encryption_key(NULL), - m_encryption_iv(NULL), m_crypt_info() { /* No op */ @@ -91,11 +88,8 @@ public: m_is_valid(), m_first_page_buf(), m_first_page(), - m_atomic_write(), m_last_os_error(), m_file_info(), - m_encryption_key(NULL), - m_encryption_iv(NULL), m_crypt_info() { ut_ad(m_name != NULL); @@ -115,11 +109,8 @@ public: m_is_valid(file.m_is_valid), m_first_page_buf(), m_first_page(), - m_atomic_write(file.m_atomic_write), m_last_os_error(), m_file_info(), - m_encryption_key(NULL), - m_encryption_iv(NULL), m_crypt_info() { m_name = mem_strdup(file.m_name); @@ -178,13 +169,9 @@ public: it should be reread if needed */ m_first_page_buf = NULL; m_first_page = NULL; - m_encryption_key = NULL; - m_encryption_iv = NULL; /* Do not copy crypt info it is read from first page */ m_crypt_info = NULL; - m_atomic_write = file.m_atomic_write; - return(*this); } @@ -233,9 +220,8 @@ public: void set_filepath(const char* filepath); /** Allocate and set the datafile or tablespace name in m_name. - If a name is provided, use it; else if the datafile is file-per-table, - extract a file-per-table tablespace name from m_filepath; else it is a - general tablespace, so just call it that for now. The value of m_name + If a name is provided, use it; else extract a file-per-table + tablespace name from m_filepath. The value of m_name will be freed in the destructor. @param[in] name Tablespace Name if known, NULL if not */ void set_name(const char* name); @@ -245,13 +231,9 @@ public: successfully opened in order for this function to validate it. @param[in] space_id The expected tablespace ID. @param[in] flags The expected tablespace flags. - @param[in] for_import is it for importing @retval DB_SUCCESS if tablespace is valid, DB_ERROR if not. m_is_valid is also set true on success, else false. */ - dberr_t validate_to_dd( - ulint space_id, - ulint flags, - bool for_import) + dberr_t validate_to_dd(ulint space_id, ulint flags) MY_ATTRIBUTE((warn_unused_result)); /** Validates this datafile for the purpose of recovery. @@ -270,13 +252,10 @@ public: so the Space ID found here must not already be open. m_is_valid is set true on success, else false. @param[out] flush_lsn contents of FIL_PAGE_FILE_FLUSH_LSN - @param[in] for_import if it is for importing - (only valid for the first file of the system tablespace) @retval DB_SUCCESS on if the datafile is valid @retval DB_CORRUPTION if the datafile is not readable @retval DB_TABLESPACE_EXISTS if there is a duplicate space_id */ - dberr_t validate_first_page(lsn_t* flush_lsn, - bool for_import) + dberr_t validate_first_page(lsn_t* flush_lsn) MY_ATTRIBUTE((warn_unused_result)); /** Get Datafile::m_name. @@ -428,12 +407,10 @@ private: else DB_ERROR. */ dberr_t find_space_id(); - /** Finds a given page of the given space id from the double write - buffer and copies it to the corresponding .ibd file. - @param[in] page_no Page number to restore - @return DB_SUCCESS if page was restored, else DB_ERROR */ - dberr_t restore_from_doublewrite( - ulint restore_page_no); + /** Restore the first page of the tablespace from + the double write buffer. + @return whether the operation failed */ + bool restore_from_doublewrite(); /** Points into m_filepath to the file name with extension */ char* m_filename; @@ -475,9 +452,6 @@ private: /** Pointer to the first page held in the buffer above */ byte* m_first_page; - /** true if atomic writes enabled for this file */ - bool m_atomic_write; - protected: /** Last OS error received so it can be reported if needed. */ ulint m_last_os_error; @@ -492,12 +466,6 @@ public: struct stat m_file_info; #endif /* WIN32 */ - /** Encryption key read from first page */ - byte* m_encryption_key; - - /** Encryption iv read from first page */ - byte* m_encryption_iv; - /** Encryption information */ fil_space_crypt_t* m_crypt_info; }; @@ -581,13 +549,10 @@ public: the path ".". @param[in] name tablespace name @param[in] filepath remote filepath of tablespace datafile - @param[in] is_shared true for general tablespace, - false for file-per-table @return DB_SUCCESS or error code */ static dberr_t create_link_file( const char* name, - const char* filepath, - bool is_shared = false); + const char* filepath); /** Delete an InnoDB Symbolic Link (ISL) file by name. @param[in] name tablespace name */ @@ -597,8 +562,6 @@ public: It is always created under the datadir of MySQL. For file-per-table tablespaces, the isl file is expected to be in a 'database' directory and called 'tablename.isl'. - For general tablespaces, there will be no 'database' directory. - The 'basename.isl' will be in the datadir. The caller must free the memory returned if it is not null. @param[in] link_filepath filepath of the ISL file @return Filepath of the IBD file read from the ISL file */ diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h index f503580a1a7..621498b9a4c 100644 --- a/storage/innobase/include/fsp0fsp.h +++ b/storage/innobase/include/fsp0fsp.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -43,17 +43,55 @@ Created 12/18/1995 Heikki Tuuri #endif /* !UNIV_INNOCHECKSUM */ #include "fsp0types.h" -#define FSP_FLAGS_POS_DATA_DIR_ORACLE (FSP_FLAGS_POS_ATOMIC_BLOBS \ - + FSP_FLAGS_WIDTH_ATOMIC_BLOBS \ - + FSP_FLAGS_WIDTH_PAGE_SSIZE) -/** Bit mask of the DATA_DIR field */ -#define FSP_FLAGS_MASK_DATA_DIR_ORACLE \ - ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR)) \ - << FSP_FLAGS_POS_DATA_DIR_ORACLE) +/** @return the PAGE_SSIZE flags for the current innodb_page_size */ +#define FSP_FLAGS_PAGE_SSIZE() \ + ((UNIV_PAGE_SIZE == UNIV_PAGE_SIZE_ORIG) ? \ + 0 : (UNIV_PAGE_SIZE_SHIFT - UNIV_ZIP_SIZE_SHIFT_MIN + 1) \ + << FSP_FLAGS_POS_PAGE_SSIZE) -#define FSP_FLAGS_HAS_DATA_DIR_ORACLE(flags) \ - ((flags & FSP_FLAGS_MASK_DATA_DIR_ORACLE) \ - >> FSP_FLAGS_POS_DATA_DIR_ORACLE) +/* @defgroup Compatibility macros for MariaDB 10.1.0 through 10.1.20; +see the table in fsp0types.h @{ */ +/** Zero relative shift position of the PAGE_COMPRESSION field */ +#define FSP_FLAGS_POS_PAGE_COMPRESSION_MARIADB101 \ + (FSP_FLAGS_POS_ATOMIC_BLOBS \ + + FSP_FLAGS_WIDTH_ATOMIC_BLOBS) +/** Zero relative shift position of the PAGE_COMPRESSION_LEVEL field */ +#define FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL_MARIADB101 \ + (FSP_FLAGS_POS_PAGE_COMPRESSION_MARIADB101 + 1) +/** Zero relative shift position of the ATOMIC_WRITES field */ +#define FSP_FLAGS_POS_ATOMIC_WRITES_MARIADB101 \ + (FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL_MARIADB101 + 4) +/** Zero relative shift position of the PAGE_SSIZE field */ +#define FSP_FLAGS_POS_PAGE_SSIZE_MARIADB101 \ + (FSP_FLAGS_POS_ATOMIC_WRITES_MARIADB101 + 2) + +/** Bit mask of the PAGE_COMPRESSION field */ +#define FSP_FLAGS_MASK_PAGE_COMPRESSION_MARIADB101 \ + (1U << FSP_FLAGS_POS_PAGE_COMPRESSION_MARIADB101) +/** Bit mask of the PAGE_COMPRESSION_LEVEL field */ +#define FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL_MARIADB101 \ + (15U << FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL_MARIADB101) +/** Bit mask of the ATOMIC_WRITES field */ +#define FSP_FLAGS_MASK_ATOMIC_WRITES_MARIADB101 \ + (3U << FSP_FLAGS_POS_ATOMIC_WRITES_MARIADB101) +/** Bit mask of the PAGE_SSIZE field */ +#define FSP_FLAGS_MASK_PAGE_SSIZE_MARIADB101 \ + (15U << FSP_FLAGS_POS_PAGE_SSIZE_MARIADB101) + +/** Return the value of the PAGE_COMPRESSION field */ +#define FSP_FLAGS_GET_PAGE_COMPRESSION_MARIADB101(flags) \ + ((flags & FSP_FLAGS_MASK_PAGE_COMPRESSION_MARIADB101) \ + >> FSP_FLAGS_POS_PAGE_COMPRESSION_MARIADB101) +/** Return the value of the PAGE_COMPRESSION_LEVEL field */ +#define FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL_MARIADB101(flags) \ + ((flags & FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL_MARIADB101) \ + >> FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL_MARIADB101) +/** Return the value of the PAGE_SSIZE field */ +#define FSP_FLAGS_GET_PAGE_SSIZE_MARIADB101(flags) \ + ((flags & FSP_FLAGS_MASK_PAGE_SSIZE_MARIADB101) \ + >> FSP_FLAGS_POS_PAGE_SSIZE_MARIADB101) + +/* @} */ /* @defgroup Tablespace Header Constants (moved from fsp0fsp.c) @{ */ @@ -274,7 +312,7 @@ fsp_header_get_tablespace_size(void); /*================================*/ /** Calculate the number of pages to extend a datafile. -We extend single-table and general tablespaces first one extent at a time, +We extend single-table tablespaces first one extent at a time, but 4 at a time for bigger tablespaces. It is not enough to extend always by one extent, because we need to add at least one extent to FSP_FREE. A single extent descriptor page will track many extents. And the extent @@ -329,38 +367,6 @@ fsp_header_get_flags(const page_t* page) return(fsp_header_get_field(page, FSP_SPACE_FLAGS)); } -/** Reads the page size from the first page of a tablespace. -@param[in] page first page of a tablespace -@return page size */ -page_size_t -fsp_header_get_page_size( - const page_t* page); - -/** Decoding the encryption info -from the first page of a tablespace. -@param[in/out] key key -@param[in/out] iv iv -@param[in] encryption_info encrytion info. -@return true if success */ -bool -fsp_header_decode_encryption_info( - byte* key, - byte* iv, - byte* encryption_info); - -/** Reads the encryption key from the first page of a tablespace. -@param[in] fsp_flags tablespace flags -@param[in/out] key tablespace key -@param[in/out] iv tablespace iv -@param[in] page first page of a tablespace -@return true if success */ -bool -fsp_header_get_encryption_key( - ulint fsp_flags, - byte* key, - byte* iv, - page_t* page); - /** Get the byte offset of encryption information in page 0. @param[in] ps page size @return byte offset relative to FSP_HEADER_OFFSET */ @@ -392,17 +398,6 @@ fsp_header_init_fields( ulint flags); /*!< in: tablespace flags (FSP_SPACE_FLAGS): 0, or table->flags if newer than COMPACT */ -/** Rotate the encryption info in the space header. -@param[in] space tablespace -@param[in] encrypt_info buffer for re-encrypt key. -@param[in,out] mtr mini-transaction -@return true if success. */ -bool -fsp_header_rotate_encryption( - fil_space_t* space, - byte* encrypt_info, - mtr_t* mtr); - /** Initializes the space header of a new created space and creates also the insert buffer tree root if space == 0. @param[in] space_id space id @@ -584,14 +579,22 @@ fsp_get_available_space_in_free_extents( /**********************************************************************//** Frees a single page of a segment. */ void -fseg_free_page( -/*===========*/ +fseg_free_page_func( fseg_header_t* seg_header, /*!< in: segment header */ ulint space_id, /*!< in: space id */ ulint page, /*!< in: page offset */ +#ifdef BTR_CUR_HASH_ADAPT bool ahi, /*!< in: whether we may need to drop the adaptive hash index */ +#endif /* BTR_CUR_HASH_ADAPT */ mtr_t* mtr); /*!< in/out: mini-transaction */ +#ifdef BTR_CUR_HASH_ADAPT +# define fseg_free_page(header, space_id, page, ahi, mtr) \ + fseg_free_page_func(header, space_id, page, ahi, mtr) +#else /* BTR_CUR_HASH_ADAPT */ +# define fseg_free_page(header, space_id, page, ahi, mtr) \ + fseg_free_page_func(header, space_id, page, mtr) +#endif /* BTR_CUR_HASH_ADAPT */ /**********************************************************************//** Checks if a single page of a segment is free. @return true if free */ @@ -609,29 +612,43 @@ Doing the freeing in a single mini-transaction might result in too big a mini-transaction. @return TRUE if freeing completed */ ibool -fseg_free_step( -/*===========*/ +fseg_free_step_func( fseg_header_t* header, /*!< in, own: segment header; NOTE: if the header resides on the first page of the frag list of the segment, this pointer becomes obsolete after the last freeing step */ +#ifdef BTR_CUR_HASH_ADAPT bool ahi, /*!< in: whether we may need to drop the adaptive hash index */ +#endif /* BTR_CUR_HASH_ADAPT */ mtr_t* mtr) /*!< in/out: mini-transaction */ MY_ATTRIBUTE((warn_unused_result)); +#ifdef BTR_CUR_HASH_ADAPT +# define fseg_free_step(header, ahi, mtr) fseg_free_step_func(header, ahi, mtr) +#else /* BTR_CUR_HASH_ADAPT */ +# define fseg_free_step(header, ahi, mtr) fseg_free_step_func(header, mtr) +#endif /* BTR_CUR_HASH_ADAPT */ /**********************************************************************//** Frees part of a segment. Differs from fseg_free_step because this function leaves the header page unfreed. @return TRUE if freeing completed, except the header page */ ibool -fseg_free_step_not_header( -/*======================*/ +fseg_free_step_not_header_func( fseg_header_t* header, /*!< in: segment header which must reside on the first fragment page of the segment */ +#ifdef BTR_CUR_HASH_ADAPT bool ahi, /*!< in: whether we may need to drop the adaptive hash index */ +#endif /* BTR_CUR_HASH_ADAPT */ mtr_t* mtr) /*!< in/out: mini-transaction */ MY_ATTRIBUTE((warn_unused_result)); +#ifdef BTR_CUR_HASH_ADAPT +# define fseg_free_step_not_header(header, ahi, mtr) \ + fseg_free_step_not_header_func(header, ahi, mtr) +#else /* BTR_CUR_HASH_ADAPT */ +# define fseg_free_step_not_header(header, ahi, mtr) \ + fseg_free_step_not_header_func(header, mtr) +#endif /* BTR_CUR_HASH_ADAPT */ /** Checks if a page address is an extent descriptor page address. @param[in] page_id page id @@ -672,60 +689,135 @@ fseg_print( mtr_t* mtr); /*!< in/out: mini-transaction */ #endif /* UNIV_BTR_PRINT */ -/** Determine if the tablespace is compressed from tablespace flags. -@param[in] flags Tablespace flags -@return true if compressed, false if not compressed */ -UNIV_INLINE -bool -fsp_flags_is_compressed( - ulint flags); - -/** Determine if two tablespaces are equivalent or compatible. -@param[in] flags1 First tablespace flags -@param[in] flags2 Second tablespace flags -@return true the flags are compatible, false if not */ -UNIV_INLINE -bool -fsp_flags_are_equal( - ulint flags1, - ulint flags2); - -/** Initialize an FSP flags integer. -@param[in] page_size page sizes in bytes and compression flag. -@param[in] atomic_blobs Used by Dynammic and Compressed. -@param[in] has_data_dir This tablespace is in a remote location. -@param[in] is_shared This tablespace can be shared by many tables. -@param[in] is_temporary This tablespace is temporary. -@param[in] is_encrypted This tablespace is encrypted. -@return tablespace flags after initialization */ +/** Convert FSP_SPACE_FLAGS from the buggy MariaDB 10.1.0..10.1.20 format. +@param[in] flags the contents of FSP_SPACE_FLAGS +@return the flags corrected from the buggy MariaDB 10.1 format +@retval ULINT_UNDEFINED if the flags are not in the buggy 10.1 format */ +MY_ATTRIBUTE((warn_unused_result, const)) UNIV_INLINE ulint -fsp_flags_init( - const page_size_t& page_size, - bool atomic_blobs, - bool has_data_dir, - bool is_shared, - bool is_temporary, - bool page_compression, - ulint page_compression_level, - ulint atomic_writes, - bool is_encrypted = false); +fsp_flags_convert_from_101(ulint flags) +{ + DBUG_EXECUTE_IF("fsp_flags_is_valid_failure", + return(ULINT_UNDEFINED);); + if (flags == 0) { + return(flags); + } -/** Convert a 32 bit integer tablespace flags to the 32 bit table flags. -This can only be done for a tablespace that was built as a file-per-table -tablespace. Note that the fsp_flags cannot show the difference between a -Compact and Redundant table, so an extra Compact boolean must be supplied. - Low order bit - | REDUNDANT | COMPACT | COMPRESSED | DYNAMIC -fil_space_t::flags | 0 | 0 | 1 | 1 -dict_table_t::flags | 0 | 1 | 1 | 1 -@param[in] fsp_flags fil_space_t::flags -@param[in] compact true if not Redundant row format -@return tablespace flags (fil_space_t::flags) */ -ulint -fsp_flags_to_dict_tf( - ulint fsp_flags, - bool compact); + if (flags >> 18) { + /* The most significant FSP_SPACE_FLAGS bit that was ever set + by MariaDB 10.1.0 to 10.1.20 was bit 17 (misplaced DATA_DIR flag). + The flags must be less than 1<<18 in order to be valid. */ + return(ULINT_UNDEFINED); + } + + if ((flags & (FSP_FLAGS_MASK_POST_ANTELOPE | FSP_FLAGS_MASK_ATOMIC_BLOBS)) + == FSP_FLAGS_MASK_ATOMIC_BLOBS) { + /* If the "atomic blobs" flag (indicating + ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED) flag + is set, then the "post Antelope" (ROW_FORMAT!=REDUNDANT) flag + must also be set. */ + return(ULINT_UNDEFINED); + } + + /* Bits 6..10 denote compression in MariaDB 10.1.0 to 10.1.20. + They must be either 0b00000 or 0b00011 through 0b10011. + In correct versions, these bits would be + 0bd0sss where d is the DATA_DIR flag (garbage bit) and + sss is the PAGE_SSIZE (3, 4, 6, or 7). + + NOTE: MariaDB 10.1.0 to 10.1.20 can misinterpret + uncompressed data files with innodb_page_size=4k or 64k as + compressed innodb_page_size=16k files. Below is an exhaustive + state space analysis. + + -0by1zzz: impossible (the bit 4 must be clean; see above) + -0b101xx: DATA_DIR, innodb_page_size>4k: invalid (COMPRESSION_LEVEL>9) + +0bx0011: innodb_page_size=4k: + !!! Misinterpreted as COMPRESSION_LEVEL=9 or 1, COMPRESSION=1. + -0bx0010: impossible, because sss must be 0b011 or 0b1xx + -0bx0001: impossible, because sss must be 0b011 or 0b1xx + -0b10000: DATA_DIR, innodb_page_size=16: + invalid (COMPRESSION_LEVEL=8 but COMPRESSION=0) + +0b00111: no DATA_DIR, innodb_page_size=64k: + !!! Misinterpreted as COMPRESSION_LEVEL=3, COMPRESSION=1. + -0b00101: impossible, because sss must be 0 for 16k, not 0b101 + -0b001x0: no DATA_DIR, innodb_page_size=32k or 8k: + invalid (COMPRESSION_LEVEL=3 but COMPRESSION=0) + +0b00000: innodb_page_size=16k (looks like COMPRESSION=0) + ??? Could actually be compressed; see PAGE_SSIZE below */ + const ulint level = FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL_MARIADB101( + flags); + if (FSP_FLAGS_GET_PAGE_COMPRESSION_MARIADB101(flags) != (level != 0) + || level > 9) { + /* The compression flags are not in the buggy MariaDB + 10.1 format. */ + return(ULINT_UNDEFINED); + } + if (!(~flags & FSP_FLAGS_MASK_ATOMIC_WRITES_MARIADB101)) { + /* The ATOMIC_WRITES flags cannot be 0b11. + (The bits 11..12 should actually never be 0b11, + because in MySQL they would be SHARED|TEMPORARY.) */ + return(ULINT_UNDEFINED); + } + + /* Bits 13..16 are the wrong position for PAGE_SSIZE, and they + should contain one of the values 3,4,6,7, that is, be of the form + 0b0011 or 0b01xx (except 0b0110). + In correct versions, these bits should be 0bc0se + where c is the MariaDB COMPRESSED flag + and e is the MySQL 5.7 ENCRYPTION flag + and s is the MySQL 8.0 SDI flag. MariaDB can only support s=0, e=0. + + Compressed innodb_page_size=16k tables with correct FSP_SPACE_FLAGS + will be properly rejected by older MariaDB 10.1.x because they + would read as PAGE_SSIZE>=8 which is not valid. */ + + const ulint ssize = FSP_FLAGS_GET_PAGE_SSIZE_MARIADB101(flags); + if (ssize == 1 || ssize == 2 || ssize == 5 || ssize & 8) { + /* the page_size is not between 4k and 64k; + 16k should be encoded as 0, not 5 */ + return(ULINT_UNDEFINED); + } + const ulint zssize = FSP_FLAGS_GET_ZIP_SSIZE(flags); + if (zssize == 0) { + /* not ROW_FORMAT=COMPRESSED */ + } else if (zssize > (ssize ? ssize : 5)) { + /* invalid KEY_BLOCK_SIZE */ + return(ULINT_UNDEFINED); + } else if (~flags & (FSP_FLAGS_MASK_POST_ANTELOPE + | FSP_FLAGS_MASK_ATOMIC_BLOBS)) { + /* both these flags should be set for + ROW_FORMAT=COMPRESSED */ + return(ULINT_UNDEFINED); + } + + flags = ((flags & 0x3f) | ssize << FSP_FLAGS_POS_PAGE_SSIZE + | FSP_FLAGS_GET_PAGE_COMPRESSION_MARIADB101(flags) + << FSP_FLAGS_POS_PAGE_COMPRESSION); + ut_ad(fsp_flags_is_valid(flags)); + return(flags); +} + +/** Compare tablespace flags. +@param[in] expected expected flags from dict_tf_to_fsp_flags() +@param[in] actual flags read from FSP_SPACE_FLAGS +@return whether the flags match */ +MY_ATTRIBUTE((warn_unused_result)) +UNIV_INLINE +bool +fsp_flags_match(ulint expected, ulint actual) +{ + expected &= ~FSP_FLAGS_MEM_MASK; + ut_ad(fsp_flags_is_valid(expected)); + + if (actual == expected) { + return(true); + } + + actual = fsp_flags_convert_from_101(actual); + return(actual == expected); +} /** Calculates the descriptor index within a descriptor page. @param[in] page_size page size @@ -737,27 +829,6 @@ xdes_calc_descriptor_index( const page_size_t& page_size, ulint offset); -/** Gets pointer to a the extent descriptor of a page. -The page where the extent descriptor resides is x-locked. If the page offset -is equal to the free limit of the space, adds new extents from above the free -limit to the space free list, if not free limit == space size. This adding -is necessary to make the descriptor defined, as they are uninitialized -above the free limit. -@param[in] space_id space id -@param[in] offset page offset; if equal to the free limit, we -try to add new extents to the space free list -@param[in] page_size page size -@param[in,out] mtr mini-transaction -@return pointer to the extent descriptor, NULL if the page does not -exist in the space or if the offset exceeds the free limit */ -xdes_t* -xdes_get_descriptor( - ulint space_id, - ulint offset, - const page_size_t& page_size, - mtr_t* mtr) -MY_ATTRIBUTE((warn_unused_result)); - /**********************************************************************//** Gets a descriptor bit of a page. @return TRUE if free */ @@ -791,7 +862,7 @@ fsp_page_is_free_func( ulint page, /*!< in: page offset */ mtr_t* mtr, /*!< in/out: mini-transaction */ const char *file, - ulint line); + unsigned line); #define fsp_page_is_free(space,page,mtr) \ fsp_page_is_free_func(space,page,mtr, __FILE__, __LINE__) diff --git a/storage/innobase/include/fsp0fsp.ic b/storage/innobase/include/fsp0fsp.ic index c675c6302a6..6317a67a089 100644 --- a/storage/innobase/include/fsp0fsp.ic +++ b/storage/innobase/include/fsp0fsp.ic @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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,224 +40,6 @@ fsp_descr_page( == FSP_XDES_OFFSET); } -/** Determine if the tablespace is compressed from tablespace flags. -@param[in] flags Tablespace flags -@return true if compressed, false if not compressed */ -UNIV_INLINE -bool -fsp_flags_is_compressed( - ulint flags) -{ - return(FSP_FLAGS_GET_ZIP_SSIZE(flags) != 0); -} - -#define ACTUAL_SSIZE(ssize) (0 == ssize ? UNIV_PAGE_SSIZE_ORIG : ssize) - -/** Determine if two tablespaces are equivalent or compatible. -@param[in] flags1 First tablespace flags -@param[in] flags2 Second tablespace flags -@return true the flags are compatible, false if not */ -UNIV_INLINE -bool -fsp_flags_are_equal( - ulint flags1, - ulint flags2) -{ - /* If either one of these flags is ULINT_UNDEFINED, - then they are not equal */ - if (flags1 == ULINT_UNDEFINED || flags2 == ULINT_UNDEFINED) { - return(false); - } - - if (!fsp_is_shared_tablespace(flags1) || !fsp_is_shared_tablespace(flags2)) { - /* At least one of these is a single-table tablespaces so all - flags must match. */ - return(flags1 == flags2); - } - - /* Both are shared tablespaces which can contain all formats. - But they must have the same logical and physical page size. - Once InnoDB can support multiple page sizes together, - the logical page size will not matter. */ - ulint zip_ssize1 = ACTUAL_SSIZE(FSP_FLAGS_GET_ZIP_SSIZE(flags1)); - ulint zip_ssize2 = ACTUAL_SSIZE(FSP_FLAGS_GET_ZIP_SSIZE(flags2)); - ulint page_ssize1 = ACTUAL_SSIZE(FSP_FLAGS_GET_PAGE_SSIZE(flags1)); - ulint page_ssize2 = ACTUAL_SSIZE(FSP_FLAGS_GET_PAGE_SSIZE(flags2)); - - return(zip_ssize1 == zip_ssize2 && page_ssize1 == page_ssize2); -} - -/** Convert a page size, which is a power of 2, to an ssize, which is -the number of bit shifts from 512 to make that page size. -@param[in] page_size compressed page size in bytes -@return an ssize created from the page size provided. */ -UNIV_INLINE -ulint -page_size_to_ssize( - ulint page_size) -{ - ulint ssize; - - for (ssize = UNIV_ZIP_SIZE_SHIFT_MIN; - ((ulint) 1 << ssize) < page_size; - ssize++) {}; - - return(ssize - UNIV_ZIP_SIZE_SHIFT_MIN + 1); -} - -/** Add the compressed page size to the tablespace flags. -@param[in] flags Tablespace flags -@param[in] page_size page sizes in bytes and compression flag. -@return tablespace flags after zip size is added */ -UNIV_INLINE -ulint -fsp_flags_set_zip_size( - ulint flags, - const page_size_t& page_size) -{ - if (!page_size.is_compressed()) { - return(flags); - } - - /* Zip size should be a power of 2 between UNIV_ZIP_SIZE_MIN - and UNIV_ZIP_SIZE_MAX */ - ut_ad(page_size.physical() >= UNIV_ZIP_SIZE_MIN); - ut_ad(page_size.physical() <= UNIV_ZIP_SIZE_MAX); - ut_ad(ut_is_2pow(page_size.physical())); - - ulint ssize = page_size_to_ssize(page_size.physical()); - - ut_ad(ssize > 0); - ut_ad(ssize <= UNIV_PAGE_SSIZE_MAX); - - flags |= (ssize << FSP_FLAGS_POS_ZIP_SSIZE); - - ut_ad(fsp_flags_is_valid(flags)); - - return(flags); -} - -/** Add the page size to the tablespace flags. -@param[in] flags Tablespace flags -@param[in] page_size page sizes in bytes and compression flag. -@return tablespace flags after page size is added */ -UNIV_INLINE -ulint -fsp_flags_set_page_size( - ulint flags, - const page_size_t& page_size) -{ - /* Page size should be a power of two between UNIV_PAGE_SIZE_MIN - and UNIV_PAGE_SIZE */ - ut_ad(page_size.logical() >= UNIV_PAGE_SIZE_MIN); - ut_ad(page_size.logical() <= UNIV_PAGE_SIZE_MAX); - ut_ad(ut_is_2pow(page_size.logical())); - - /* Remove this assert once we add support for different - page size per tablespace. Currently all tablespaces must - have a page size that is equal to innodb-page-size */ - ut_ad(page_size.logical() == UNIV_PAGE_SIZE); - - if (page_size.logical() == UNIV_PAGE_SIZE_ORIG) { - ut_ad(0 == FSP_FLAGS_GET_PAGE_SSIZE(flags)); - - } else { - ulint ssize = page_size_to_ssize(page_size.logical()); - - ut_ad(ssize); - ut_ad(ssize <= UNIV_PAGE_SSIZE_MAX); - - flags |= (ssize << FSP_FLAGS_POS_PAGE_SSIZE); - } - - ut_ad(fsp_flags_is_valid(flags)); - - return(flags); -} - -/** Initialize an FSP flags integer. -@param[in] page_size page sizes in bytes and compression flag. -@param[in] atomic_blobs Used by Dynammic and Compressed. -@param[in] has_data_dir This tablespace is in a remote location. -@param[in] is_shared This tablespace can be shared by many tables. -@param[in] is_temporary This tablespace is temporary. -@param[in] is_encrypted This tablespace is encrypted. -@param[in] page_compressed Table uses page compression -@param[in] page_compression_level Page compression level -@param[in] atomic_writes Table uses atomic writes -@@return tablespace flags after initialization */ -UNIV_INLINE -ulint -fsp_flags_init( - const page_size_t& page_size, - bool atomic_blobs, - bool has_data_dir, - bool is_shared, - bool is_temporary, - bool page_compression, - ulint page_compression_level, - ulint atomic_writes, - bool is_encrypted) -{ - ut_ad(page_size.physical() <= page_size.logical()); - ut_ad(!page_size.is_compressed() || atomic_blobs); - - /* Page size should be a power of two between UNIV_PAGE_SIZE_MIN - and UNIV_PAGE_SIZE, but zip_size may be 0 if not compressed. */ - ulint flags = fsp_flags_set_page_size(0, page_size); - - if (atomic_blobs) { - flags |= FSP_FLAGS_MASK_POST_ANTELOPE - | FSP_FLAGS_MASK_ATOMIC_BLOBS; - } - - /* If the zip_size is explicit and different from the default, - compressed row format is implied. */ - flags = fsp_flags_set_zip_size(flags, page_size); - - if (has_data_dir) { - flags |= FSP_FLAGS_MASK_DATA_DIR; - } - - /* Shared tablespaces can hold all row formats, so we only mark the - POST_ANTELOPE and ATOMIC_BLOB bits if it is compressed. */ - if (is_shared) { - ut_ad(!has_data_dir); - flags |= FSP_FLAGS_MASK_SHARED; - } - - if (is_temporary) { - ut_ad(!has_data_dir); - flags |= FSP_FLAGS_MASK_TEMPORARY; - } - - if (is_encrypted) { - flags |= FSP_FLAGS_MASK_ENCRYPTION; - } - - /* In addition, tablespace flags also contain if the page - compression is used for this table. */ - if (page_compression) { - flags |= FSP_FLAGS_SET_PAGE_COMPRESSION(flags, page_compression); - } - - /* In addition, tablespace flags also contain page compression level - if page compression is used for this table. */ - if (page_compression && page_compression_level) { - flags |= FSP_FLAGS_SET_PAGE_COMPRESSION_LEVEL(flags, page_compression_level); - } - - /* In addition, tablespace flags also contain flag if atomic writes - is used for this table */ - if (atomic_writes) { - flags |= FSP_FLAGS_SET_ATOMIC_WRITES(flags, atomic_writes); - } - - ut_ad(fsp_flags_is_valid(flags)); - - return(flags); -} - /** Calculates the descriptor index within a descriptor page. @param[in] page_size page size @param[in] offset page offset diff --git a/storage/innobase/include/fsp0pagecompress.h b/storage/innobase/include/fsp0pagecompress.h index 44bdddfa3bf..b45a4b87890 100644 --- a/storage/innobase/include/fsp0pagecompress.h +++ b/storage/innobase/include/fsp0pagecompress.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (C) 2013, 2015, MariaDB Corporation. All Rights Reserved. +Copyright (C) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -47,15 +47,6 @@ fsp_header_get_compression_level( /*=============================*/ const page_t* page); /*!< in: first page of a tablespace */ -/********************************************************************//** -Determine if the tablespace is page compressed from dict_table_t::flags. -@return TRUE if page compressed, FALSE if not compressed */ -UNIV_INLINE -bool -fsp_flags_is_page_compressed( -/*=========================*/ - ulint flags); /*!< in: tablespace flags */ - /********************************************************************//** Extract the page compression level from tablespace flags. A tablespace has only one physical page compression level @@ -68,15 +59,6 @@ fsp_flags_get_page_compression_level( /*=================================*/ ulint flags); /*!< in: tablespace flags */ -/********************************************************************//** -Determine the tablespace is using atomic writes from dict_table_t::flags. -@return true if atomic writes is used, false if not */ -UNIV_INLINE -atomic_writes_t -fsp_flags_get_atomic_writes( -/*========================*/ - ulint flags); /*!< in: tablespace flags */ - #ifndef UNIV_NONINL #include "fsp0pagecompress.ic" #endif diff --git a/storage/innobase/include/fsp0pagecompress.ic b/storage/innobase/include/fsp0pagecompress.ic index a3971da6772..bb11371d712 100644 --- a/storage/innobase/include/fsp0pagecompress.ic +++ b/storage/innobase/include/fsp0pagecompress.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (C) 2013, 2015, MariaDB Corporation. All Rights Reserved. +Copyright (C) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -25,18 +25,6 @@ Created 11/12/2013 Jan Lindström jan.lindstrom@mariadb.com ***********************************************************************/ -/********************************************************************//** -Determine if the tablespace is page compressed from dict_table_t::flags. -@return TRUE if page compressed, FALSE if not page compressed */ -UNIV_INLINE -bool -fsp_flags_is_page_compressed( -/*=========================*/ - ulint flags) /*!< in: tablespace flags */ -{ - return(FSP_FLAGS_GET_PAGE_COMPRESSION(flags)); -} - /********************************************************************//** Determine the tablespace is page compression level from dict_table_t::flags. @return page compression level or 0 if not compressed*/ @@ -49,17 +37,6 @@ fsp_flags_get_page_compression_level( return(FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL(flags)); } -/********************************************************************//** -Determine the tablespace is using atomic writes from dict_table_t::flags. -@return true if atomic writes is used, false if not */ -UNIV_INLINE -atomic_writes_t -fsp_flags_get_atomic_writes( -/*========================*/ - ulint flags) /*!< in: tablespace flags */ -{ - return((atomic_writes_t)FSP_FLAGS_GET_ATOMIC_WRITES(flags)); -} /*******************************************************************//** Find out wheather the page is index page or not @@ -130,16 +107,10 @@ fil_space_is_page_compressed( /*=========================*/ ulint id) /*!< in: space id */ { - ulint flags; + ulint flags = fil_space_get_flags(id); - flags = fil_space_get_flags(id); - - if (flags && flags != ULINT_UNDEFINED) { - - return(fsp_flags_is_page_compressed(flags)); - } - - return(0); + return(flags != ULINT_UNDEFINED + && FSP_FLAGS_HAS_PAGE_COMPRESSION(flags)); } #endif /* UNIV_INNOCHECKSUM */ @@ -186,25 +157,28 @@ fil_get_compression_alg_name( /*******************************************************************//** Returns the atomic writes flag of the space, or false if the space is not using atomic writes. The tablespace must be cached in the memory cache. -@return atomic writes table option value */ +@return 1 if atomic writes can be used for the file */ UNIV_INLINE -atomic_writes_t +bool fil_space_get_atomic_writes( /*========================*/ ulint id) /*!< in: space id */ { - ulint flags; + struct fil_space_t* space; + bool ret= 0; - flags = fil_space_get_flags(id); + ut_ad(fil_system); - if (flags && flags != ULINT_UNDEFINED) { + mutex_enter(&fil_system->mutex); - return((atomic_writes_t)fsp_flags_get_atomic_writes(flags)); - } + if ((space = fil_space_get_by_id(id))) + ret= space->atomic_write_supported; - return((atomic_writes_t)0); + mutex_exit(&fil_system->mutex); + return(ret); } + /*******************************************************************//** Find out wheather the page is page compressed with lzo method @return true if page is page compressed with lzo method, false if not */ diff --git a/storage/innobase/include/fsp0space.h b/storage/innobase/include/fsp0space.h index 31a1a4abc75..0b66827ab49 100644 --- a/storage/innobase/include/fsp0space.h +++ b/storage/innobase/include/fsp0space.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2013, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -18,7 +19,7 @@ this program; if not, write to the Free Software Foundation, Inc., /**************************************************//** @file include/fsp0space.h -General shared tablespace implementation. +Shared tablespace interface Created 2013-7-26 by Kevin Lewis *******************************************************/ @@ -61,10 +62,6 @@ public: shutdown(); ut_ad(m_files.empty()); ut_ad(m_space_id == ULINT_UNDEFINED); - if (m_name != NULL) { - ut_free(m_name); - m_name = NULL; - } if (m_path != NULL) { ut_free(m_path); m_path = NULL; @@ -75,21 +72,8 @@ public: Tablespace(const Tablespace&); Tablespace& operator=(const Tablespace&); - /** Set tablespace name - @param[in] name tablespace name */ - void set_name(const char* name) - { - ut_ad(m_name == NULL); - m_name = mem_strdup(name); - ut_ad(m_name != NULL); - } - - /** Get tablespace name - @return tablespace name */ - const char* name() const - { - return(m_name); - } + void set_name(const char* name) { m_name = name; } + const char* name() const { return m_name; } /** Set tablespace path and filename members. @param[in] path where tablespace file(s) resides @@ -216,13 +200,6 @@ public: ut_a(!m_files.empty()); return(&m_files.front()); } - - /** Check if undo tablespace. - @return true if undo tablespace */ - static bool is_undo_tablespace(ulint id) - { - return(id <= srv_undo_tablespaces_open); - } private: /** @param[in] filename Name to lookup in the data files. @@ -236,7 +213,7 @@ private: /* DATA MEMBERS */ /** Name of the tablespace. */ - char* m_name; + const char* m_name; /** Tablespace ID */ ulint m_space_id; diff --git a/storage/innobase/include/fsp0types.h b/storage/innobase/include/fsp0types.h index c264fe1b595..ec33f2e4d10 100644 --- a/storage/innobase/include/fsp0types.h +++ b/storage/innobase/include/fsp0types.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2014, 2016, MariaDB Corporation. +Copyright (c) 2014, 2017, MariaDB Corporation. This 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 @@ -187,18 +187,6 @@ every XDES_DESCRIBED_PER_PAGE pages in every tablespace. */ /*--------------------------------------*/ /* @} */ -/** Validate the tablespace flags. -These flags are stored in the tablespace header at offset FSP_SPACE_FLAGS. -They should be 0 for ROW_FORMAT=COMPACT and ROW_FORMAT=REDUNDANT. -The newer row formats, COMPRESSED and DYNAMIC, use a file format > Antelope -so they should have a file format number plus the DICT_TF_COMPACT bit set. -@param[in] flags Tablespace flags -@return true if valid, false if not */ -bool -fsp_flags_is_valid( - ulint flags) - MY_ATTRIBUTE((warn_unused_result, const)); - /** Check if tablespace is system temporary. @param[in] space_id verify is checksum is enabled for given space. @return true if tablespace is system temporary. */ @@ -216,15 +204,6 @@ bool fsp_is_checksum_disabled( ulint space_id); -/** Check if tablespace is file-per-table. -@param[in] space_id Tablespace ID -@param[in] fsp_flags Tablespace Flags -@return true if tablespace is file-per-table. */ -bool -fsp_is_file_per_table( - ulint space_id, - ulint fsp_flags); - #ifdef UNIV_DEBUG /** Skip some of the sanity checks that are time consuming even in debug mode and can affect frequent verification runs that are done to ensure stability of @@ -249,43 +228,68 @@ to the two Barracuda row formats COMPRESSED and DYNAMIC. */ #define FSP_FLAGS_WIDTH_ATOMIC_BLOBS 1 /** Number of flag bits used to indicate the tablespace page size */ #define FSP_FLAGS_WIDTH_PAGE_SSIZE 4 -/** Width of the DATA_DIR flag. This flag indicates that the tablespace -is found in a remote location, not the default data directory. */ -#define FSP_FLAGS_WIDTH_DATA_DIR 1 -/** Width of the SHARED flag. This flag indicates that the tablespace -was created with CREATE TABLESPACE and can be shared by multiple tables. */ -#define FSP_FLAGS_WIDTH_SHARED 1 -/** Width of the TEMPORARY flag. This flag indicates that the tablespace -is a temporary tablespace and everything in it is temporary, meaning that -it is for a single client and should be deleted upon startup if it exists. */ -#define FSP_FLAGS_WIDTH_TEMPORARY 1 -/** Width of the encryption flag. This flag indicates that the tablespace -is a tablespace with encryption. */ -#define FSP_FLAGS_WIDTH_ENCRYPTION 1 +/** Number of reserved bits */ +#define FSP_FLAGS_WIDTH_RESERVED 6 +/** Number of flag bits used to indicate the page compression */ +#define FSP_FLAGS_WIDTH_PAGE_COMPRESSION 1 -/** Number of flag bits used to indicate the page compression and compression level */ -#define FSP_FLAGS_WIDTH_PAGE_COMPRESSION 1 -#define FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL 4 - -/** Number of flag bits used to indicate atomic writes for this tablespace */ -#define FSP_FLAGS_WIDTH_ATOMIC_WRITES 2 - -/** Width of all the currently known tablespace flags */ +/** Width of all the currently known persistent tablespace flags */ #define FSP_FLAGS_WIDTH (FSP_FLAGS_WIDTH_POST_ANTELOPE \ + FSP_FLAGS_WIDTH_ZIP_SSIZE \ + FSP_FLAGS_WIDTH_ATOMIC_BLOBS \ + FSP_FLAGS_WIDTH_PAGE_SSIZE \ - + FSP_FLAGS_WIDTH_DATA_DIR \ - + FSP_FLAGS_WIDTH_SHARED \ - + FSP_FLAGS_WIDTH_TEMPORARY \ - + FSP_FLAGS_WIDTH_ENCRYPTION \ - + FSP_FLAGS_WIDTH_PAGE_COMPRESSION \ - + FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL \ - + FSP_FLAGS_WIDTH_ATOMIC_WRITES ) + + FSP_FLAGS_WIDTH_RESERVED \ + + FSP_FLAGS_WIDTH_PAGE_COMPRESSION) -/** A mask of all the known/used bits in tablespace flags */ +/** A mask of all the known/used bits in FSP_SPACE_FLAGS */ #define FSP_FLAGS_MASK (~(~0U << FSP_FLAGS_WIDTH)) +/* FSP_SPACE_FLAGS position and name in MySQL 5.6/MariaDB 10.0 or older +and MariaDB 10.1.20 or older MariaDB 10.1 and in MariaDB 10.1.21 +or newer. +MySQL 5.6 MariaDB 10.1.x MariaDB 10.1.21 +==================================================================== +Below flags in same offset +==================================================================== +0: POST_ANTELOPE 0:POST_ANTELOPE 0: POST_ANTELOPE +1..4: ZIP_SSIZE(0..5) 1..4:ZIP_SSIZE(0..5) 1..4: ZIP_SSIZE(0..5) +(NOTE: bit 4 is always 0) +5: ATOMIC_BLOBS 5:ATOMIC_BLOBS 5: ATOMIC_BLOBS +===================================================================== +Below note the order difference: +===================================================================== +6..9: PAGE_SSIZE(3..7) 6: COMPRESSION 6..9: PAGE_SSIZE(3..7) +10: DATA_DIR 7..10: COMP_LEVEL(0..9) 10: RESERVED (5.6 DATA_DIR) +===================================================================== +The flags below were in incorrect position in MariaDB 10.1, +or have been introduced in MySQL 5.7 or 8.0: +===================================================================== +11: UNUSED 11..12:ATOMIC_WRITES 11: RESERVED (5.7 SHARED) + 12: RESERVED (5.7 TEMPORARY) + 13..15:PAGE_SSIZE(3..7) 13: RESERVED (5.7 ENCRYPTION) + 14: RESERVED (8.0 SDI) + 15: RESERVED + 16: PAGE_SSIZE_msb(0) 16: COMPRESSION + 17: DATA_DIR 17: UNUSED + 18: UNUSED +===================================================================== +The flags below only exist in fil_space_t::flags, not in FSP_SPACE_FLAGS: +===================================================================== + 25: DATA_DIR + 26..27: ATOMIC_WRITES + 28..31: COMPRESSION_LEVEL +*/ + +/** A mask of the memory-only flags in fil_space_t::flags */ +#define FSP_FLAGS_MEM_MASK (~0U << FSP_FLAGS_MEM_DATA_DIR) + +/** Zero relative shift position of the DATA_DIR flag */ +#define FSP_FLAGS_MEM_DATA_DIR 25 +/** Zero relative shift position of the ATOMIC_WRITES field */ +#define FSP_FLAGS_MEM_ATOMIC_WRITES 26 +/** Zero relative shift position of the COMPRESSION_LEVEL field */ +#define FSP_FLAGS_MEM_COMPRESSION_LEVEL 28 + /** Zero relative shift position of the POST_ANTELOPE field */ #define FSP_FLAGS_POS_POST_ANTELOPE 0 /** Zero relative shift position of the ZIP_SSIZE field */ @@ -294,34 +298,16 @@ is a tablespace with encryption. */ /** Zero relative shift position of the ATOMIC_BLOBS field */ #define FSP_FLAGS_POS_ATOMIC_BLOBS (FSP_FLAGS_POS_ZIP_SSIZE \ + FSP_FLAGS_WIDTH_ZIP_SSIZE) -/** Zero relative shift position of the PAGE_SSIZE field */ +/** Zero relative shift position of the start of the PAGE_SSIZE bits */ #define FSP_FLAGS_POS_PAGE_SSIZE (FSP_FLAGS_POS_ATOMIC_BLOBS \ - + FSP_FLAGS_WIDTH_ATOMIC_BLOBS) -/** Zero relative shift position of the start of the DATA_DIR bit */ -#define FSP_FLAGS_POS_DATA_DIR (FSP_FLAGS_POS_PAGE_SSIZE \ + + FSP_FLAGS_WIDTH_ATOMIC_BLOBS) +/** Zero relative shift position of the start of the RESERVED bits +these are only used in MySQL 5.7 and used for compatibility. */ +#define FSP_FLAGS_POS_RESERVED (FSP_FLAGS_POS_PAGE_SSIZE \ + FSP_FLAGS_WIDTH_PAGE_SSIZE) -/** Zero relative shift position of the start of the SHARED bit */ -#define FSP_FLAGS_POS_SHARED (FSP_FLAGS_POS_DATA_DIR \ - + FSP_FLAGS_WIDTH_DATA_DIR) -/** Zero relative shift position of the start of the TEMPORARY bit */ -#define FSP_FLAGS_POS_TEMPORARY (FSP_FLAGS_POS_SHARED \ - + FSP_FLAGS_WIDTH_SHARED) -/** Zero relative shift position of the start of the ENCRYPTION bit */ -#define FSP_FLAGS_POS_ENCRYPTION (FSP_FLAGS_POS_TEMPORARY \ - + FSP_FLAGS_WIDTH_TEMPORARY) /** Zero relative shift position of the PAGE_COMPRESSION field */ -#define FSP_FLAGS_POS_PAGE_COMPRESSION (FSP_FLAGS_POS_ENCRYPTION \ - + FSP_FLAGS_WIDTH_ENCRYPTION) -/** Zero relative shift position of the PAGE_COMPRESSION_LEVEL field */ -#define FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL (FSP_FLAGS_POS_PAGE_COMPRESSION \ - + FSP_FLAGS_WIDTH_PAGE_COMPRESSION) -/** Zero relative shift position of the ATOMIC_WRITES field */ -#define FSP_FLAGS_POS_ATOMIC_WRITES (FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL \ - + FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL) -/** Zero relative shift position of the start of the UNUSED bits */ -#define FSP_FLAGS_POS_UNUSED (FSP_FLAGS_POS_ATOMIC_WRITES \ - + FSP_FLAGS_WIDTH_ATOMIC_WRITES) - +#define FSP_FLAGS_POS_PAGE_COMPRESSION (FSP_FLAGS_POS_RESERVED \ + + FSP_FLAGS_WIDTH_RESERVED) /** Bit mask of the POST_ANTELOPE field */ #define FSP_FLAGS_MASK_POST_ANTELOPE \ @@ -339,34 +325,22 @@ is a tablespace with encryption. */ #define FSP_FLAGS_MASK_PAGE_SSIZE \ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_SSIZE)) \ << FSP_FLAGS_POS_PAGE_SSIZE) -/** Bit mask of the DATA_DIR field */ -#define FSP_FLAGS_MASK_DATA_DIR \ - ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR)) \ - << FSP_FLAGS_POS_DATA_DIR) -/** Bit mask of the SHARED field */ -#define FSP_FLAGS_MASK_SHARED \ - ((~(~0U << FSP_FLAGS_WIDTH_SHARED)) \ - << FSP_FLAGS_POS_SHARED) -/** Bit mask of the TEMPORARY field */ -#define FSP_FLAGS_MASK_TEMPORARY \ - ((~(~0U << FSP_FLAGS_WIDTH_TEMPORARY)) \ - << FSP_FLAGS_POS_TEMPORARY) -/** Bit mask of the ENCRYPTION field */ -#define FSP_FLAGS_MASK_ENCRYPTION \ - ((~(~0U << FSP_FLAGS_WIDTH_ENCRYPTION)) \ - << FSP_FLAGS_POS_ENCRYPTION) +/** Bit mask of the RESERVED1 field */ +#define FSP_FLAGS_MASK_RESERVED \ + ((~(~0U << FSP_FLAGS_WIDTH_RESERVED)) \ + << FSP_FLAGS_POS_RESERVED) /** Bit mask of the PAGE_COMPRESSION field */ -#define FSP_FLAGS_MASK_PAGE_COMPRESSION \ +#define FSP_FLAGS_MASK_PAGE_COMPRESSION \ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_COMPRESSION)) \ << FSP_FLAGS_POS_PAGE_COMPRESSION) -/** Bit mask of the PAGE_COMPRESSION_LEVEL field */ -#define FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL \ - ((~(~0U << FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL)) \ - << FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL) -/** Bit mask of the ATOMIC_WRITES field */ -#define FSP_FLAGS_MASK_ATOMIC_WRITES \ - ((~(~0U << FSP_FLAGS_WIDTH_ATOMIC_WRITES)) \ - << FSP_FLAGS_POS_ATOMIC_WRITES) + +/** Bit mask of the in-memory ATOMIC_WRITES field */ +#define FSP_FLAGS_MASK_MEM_ATOMIC_WRITES \ + (3U << FSP_FLAGS_MEM_ATOMIC_WRITES) + +/** Bit mask of the in-memory COMPRESSION_LEVEL field */ +#define FSP_FLAGS_MASK_MEM_COMPRESSION_LEVEL \ + (15U << FSP_FLAGS_MEM_COMPRESSION_LEVEL) /** Return the value of the POST_ANTELOPE field */ #define FSP_FLAGS_GET_POST_ANTELOPE(flags) \ @@ -384,53 +358,88 @@ is a tablespace with encryption. */ #define FSP_FLAGS_GET_PAGE_SSIZE(flags) \ ((flags & FSP_FLAGS_MASK_PAGE_SSIZE) \ >> FSP_FLAGS_POS_PAGE_SSIZE) -/** Return the value of the DATA_DIR field */ -#define FSP_FLAGS_HAS_DATA_DIR(flags) \ - ((flags & FSP_FLAGS_MASK_DATA_DIR) \ - >> FSP_FLAGS_POS_DATA_DIR) -/** Return the contents of the SHARED field */ -#define FSP_FLAGS_GET_SHARED(flags) \ - ((flags & FSP_FLAGS_MASK_SHARED) \ - >> FSP_FLAGS_POS_SHARED) -/** Return the contents of the TEMPORARY field */ -#define FSP_FLAGS_GET_TEMPORARY(flags) \ - ((flags & FSP_FLAGS_MASK_TEMPORARY) \ - >> FSP_FLAGS_POS_TEMPORARY) -/** Return the contents of the ENCRYPTION field */ -#define FSP_FLAGS_GET_ENCRYPTION(flags) \ - ((flags & FSP_FLAGS_MASK_ENCRYPTION) \ - >> FSP_FLAGS_POS_ENCRYPTION) +/** @return the RESERVED flags */ +#define FSP_FLAGS_GET_RESERVED(flags) \ + ((flags & FSP_FLAGS_MASK_RESERVED) \ + >> FSP_FLAGS_POS_RESERVED) +/** @return the PAGE_COMPRESSION flag */ +#define FSP_FLAGS_HAS_PAGE_COMPRESSION(flags) \ + ((flags & FSP_FLAGS_MASK_PAGE_COMPRESSION) \ + >> FSP_FLAGS_POS_PAGE_COMPRESSION) + /** Return the contents of the UNUSED bits */ #define FSP_FLAGS_GET_UNUSED(flags) \ (flags >> FSP_FLAGS_POS_UNUSED) -/** Return the value of the PAGE_COMPRESSION field */ -#define FSP_FLAGS_GET_PAGE_COMPRESSION(flags) \ - ((flags & FSP_FLAGS_MASK_PAGE_COMPRESSION) \ - >> FSP_FLAGS_POS_PAGE_COMPRESSION) -/** Return the value of the PAGE_COMPRESSION_LEVEL field */ + +/** @return the value of the DATA_DIR field */ +#define FSP_FLAGS_HAS_DATA_DIR(flags) \ + (flags & 1U << FSP_FLAGS_MEM_DATA_DIR) +/** @return the COMPRESSION_LEVEL field */ #define FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL(flags) \ - ((flags & FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL) \ - >> FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL) -/** Return the value of the ATOMIC_WRITES field */ + ((flags & FSP_FLAGS_MASK_MEM_COMPRESSION_LEVEL) \ + >> FSP_FLAGS_MEM_COMPRESSION_LEVEL) +/** @return the ATOMIC_WRITES field */ #define FSP_FLAGS_GET_ATOMIC_WRITES(flags) \ - ((flags & FSP_FLAGS_MASK_ATOMIC_WRITES) \ - >> FSP_FLAGS_POS_ATOMIC_WRITES) -/** Use an alias in the code for FSP_FLAGS_GET_SHARED() */ -#define fsp_is_shared_tablespace FSP_FLAGS_GET_SHARED + ((flags & FSP_FLAGS_MASK_MEM_ATOMIC_WRITES) \ + >> FSP_FLAGS_MEM_ATOMIC_WRITES) + /* @} */ -/** Set a PAGE_COMPRESSION into the correct bits in a given -tablespace flags. */ -#define FSP_FLAGS_SET_PAGE_COMPRESSION(flags, compression) \ - (flags | (compression << FSP_FLAGS_POS_PAGE_COMPRESSION)) +/** Validate the tablespace flags, which are stored in the +tablespace header at offset FSP_SPACE_FLAGS. +@param[in] flags the contents of FSP_SPACE_FLAGS +@return whether the flags are correct (not in the buggy 10.1) format */ +MY_ATTRIBUTE((warn_unused_result, const)) +UNIV_INLINE +bool +fsp_flags_is_valid(ulint flags) +{ + DBUG_EXECUTE_IF("fsp_flags_is_valid_failure", + return(false);); + if (flags == 0) { + return(true); + } + if (flags & ~FSP_FLAGS_MASK) { + return(false); + } + if ((flags & (FSP_FLAGS_MASK_POST_ANTELOPE | FSP_FLAGS_MASK_ATOMIC_BLOBS)) + == FSP_FLAGS_MASK_ATOMIC_BLOBS) { + /* If the "atomic blobs" flag (indicating + ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED) flag + is set, then the "post Antelope" (ROW_FORMAT!=REDUNDANT) flag + must also be set. */ + return(false); + } + /* Bits 10..14 should be 0b0000d where d is the DATA_DIR flag + of MySQL 5.6 and MariaDB 10.0, which we ignore. + In the buggy FSP_SPACE_FLAGS written by MariaDB 10.1.0 to 10.1.20, + bits 10..14 would be nonzero 0bsssaa where sss is + nonzero PAGE_SSIZE (3, 4, 6, or 7) + and aa is ATOMIC_WRITES (not 0b11). */ + if (FSP_FLAGS_GET_RESERVED(flags) & ~1U) { + return(false); + } -/** Set a PAGE_COMPRESSION_LEVEL into the correct bits in a given -tablespace flags. */ -#define FSP_FLAGS_SET_PAGE_COMPRESSION_LEVEL(flags, level) \ - (flags | (level << FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL)) + const ulint ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags); + if (ssize == 1 || ssize == 2 || ssize == 5 || ssize & 8) { + /* the page_size is not between 4k and 64k; + 16k should be encoded as 0, not 5 */ + return(false); + } + const ulint zssize = FSP_FLAGS_GET_ZIP_SSIZE(flags); + if (zssize == 0) { + /* not ROW_FORMAT=COMPRESSED */ + } else if (zssize > (ssize ? ssize : 5)) { + /* invalid KEY_BLOCK_SIZE */ + return(false); + } else if (~flags & (FSP_FLAGS_MASK_POST_ANTELOPE + | FSP_FLAGS_MASK_ATOMIC_BLOBS)) { + /* both these flags should be set for + ROW_FORMAT=COMPRESSED */ + return(false); + } + + return(true); +} -/** Set a ATOMIC_WRITES into the correct bits in a given -tablespace flags. */ -#define FSP_FLAGS_SET_ATOMIC_WRITES(flags, atomics) \ - (flags | (atomics << FSP_FLAGS_POS_ATOMIC_WRITES)) #endif /* fsp0types_h */ diff --git a/storage/innobase/include/fts0types.h b/storage/innobase/include/fts0types.h index 039006265f6..5c6cd3ee56d 100644 --- a/storage/innobase/include/fts0types.h +++ b/storage/innobase/include/fts0types.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -127,7 +128,9 @@ struct fts_sync_t { bool in_progress; /*!< flag whether sync is in progress.*/ bool unlock_cache; /*!< flag whether unlock cache when write fts node */ - os_event_t event; /*!< sync finish event */ + os_event_t event; /*!< sync finish event; + only os_event_set() and os_event_wait() + are used */ }; /** The cache for the FTS system. It is a memory-based inverted index diff --git a/storage/innobase/include/fut0lst.h b/storage/innobase/include/fut0lst.h index e29973c1696..450def96227 100644 --- a/storage/innobase/include/fut0lst.h +++ b/storage/innobase/include/fut0lst.h @@ -99,29 +99,6 @@ flst_remove( flst_base_node_t* base, /*!< in: pointer to base node of list */ flst_node_t* node2, /*!< in: node to remove */ mtr_t* mtr); /*!< in: mini-transaction handle */ -/********************************************************************//** -Cuts off the tail of the list, including the node given. The number of -nodes which will be removed must be provided by the caller, as this function -does not measure the length of the tail. */ -void -flst_cut_end( -/*=========*/ - flst_base_node_t* base, /*!< in: pointer to base node of list */ - flst_node_t* node2, /*!< in: first node to remove */ - ulint n_nodes,/*!< in: number of nodes to remove, - must be >= 1 */ - mtr_t* mtr); /*!< in: mini-transaction handle */ -/********************************************************************//** -Cuts off the tail of the list, not including the given node. The number of -nodes which will be removed must be provided by the caller, as this function -does not measure the length of the tail. */ -void -flst_truncate_end( -/*==============*/ - flst_base_node_t* base, /*!< in: pointer to base node of list */ - flst_node_t* node2, /*!< in: first node not to remove */ - ulint n_nodes,/*!< in: number of nodes to remove */ - mtr_t* mtr); /*!< in: mini-transaction handle */ /** Get the length of a list. @param[in] base base node @return length */ diff --git a/storage/innobase/include/gis0rtree.h b/storage/innobase/include/gis0rtree.h index 436374fd6b2..950e2f2e9f5 100644 --- a/storage/innobase/include/gis0rtree.h +++ b/storage/innobase/include/gis0rtree.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2014, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -151,7 +152,7 @@ rtr_cur_restore_position_func( btr_cur_t* cursor, /*!< in: detached persistent cursor */ ulint level, /*!< in: index level */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr); /*!< in: mtr */ #define rtr_cur_restore_position(l,cur,level,mtr) \ rtr_cur_restore_position_func(l,cur,level,__FILE__,__LINE__,mtr) @@ -351,7 +352,7 @@ rtr_page_get_father_node_ptr_func( out: cursor on node pointer record, its page x-latched */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr); /*!< in: mtr */ @@ -402,7 +403,7 @@ rtr_pcur_open_low( ulint latch_mode,/*!< in: BTR_SEARCH_LEAF, ... */ btr_pcur_t* cursor, /*!< in: memory buffer for persistent cursor */ const char* file, /*!< in: file name */ - ulint line, /*!< in: line where called */ + unsigned line, /*!< in: line where called */ mtr_t* mtr); /*!< in: mtr */ #define rtr_pcur_open(i,t,md,l,c,m) \ diff --git a/storage/innobase/include/gis0rtree.ic b/storage/innobase/include/gis0rtree.ic index a30db122273..7f64a9b13a1 100644 --- a/storage/innobase/include/gis0rtree.ic +++ b/storage/innobase/include/gis0rtree.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -64,7 +65,7 @@ rtr_page_cal_mbr( ut_ad(len == DATA_MBR_LEN); inc = 0; - for (int i = 0; i < SPDIMS; i++) { + for (unsigned i = 0; i < SPDIMS; i++) { bmin = mach_double_read(field + inc); bmax = mach_double_read(field + inc + sizeof(double)); @@ -167,7 +168,7 @@ rtr_write_mbr( { const double* my_mbr = reinterpret_cast(mbr); - for (int i = 0; i < SPDIMS * 2; i++) { + for (unsigned i = 0; i < SPDIMS * 2; i++) { mach_double_write(data + i * sizeof(double), my_mbr[i]); } } @@ -181,7 +182,7 @@ rtr_read_mbr( const byte* data, /*!< in: data */ rtr_mbr_t* mbr) /*!< out: MBR */ { - for (int i = 0; i < SPDIMS * 2; i++) { + for (unsigned i = 0; i < SPDIMS * 2; i++) { (reinterpret_cast(mbr))[i] = mach_double_read( data + i * sizeof(double)); diff --git a/storage/innobase/include/ha0ha.h b/storage/innobase/include/ha0ha.h index 6857670a01b..7ddcaf82aa8 100644 --- a/storage/innobase/include/ha0ha.h +++ b/storage/innobase/include/ha0ha.h @@ -33,6 +33,7 @@ Created 8/18/1994 Heikki Tuuri #include "buf0types.h" #include "rem0types.h" +#ifdef BTR_CUR_HASH_ADAPT /*************************************************************//** Looks for an element in a hash table. @return pointer to the data of the first hash table node in chain @@ -79,6 +80,7 @@ updates the pointer to data if found. # define ha_search_and_update_if_found(table,fold,data,new_block,new_data) \ ha_search_and_update_if_found_func(table,fold,data,new_data) #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ /*************************************************************//** Creates a hash table with at least n array cells. The actual number @@ -115,6 +117,7 @@ ha_clear( /*=====*/ hash_table_t* table); /*!< in, own: hash table */ +#ifdef BTR_CUR_HASH_ADAPT /*************************************************************//** Inserts an entry into a hash table. If an entry with the same fold number is found, its node is updated to point to the new data, and no new node @@ -212,6 +215,7 @@ struct ha_node_t { #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ const rec_t* data; /*!< pointer to the data */ }; +#endif /* BTR_CUR_HASH_ADAPT */ #ifdef UNIV_DEBUG /********************************************************************//** diff --git a/storage/innobase/include/ha0ha.ic b/storage/innobase/include/ha0ha.ic index 854ff9bc046..1513df209ad 100644 --- a/storage/innobase/include/ha0ha.ic +++ b/storage/innobase/include/ha0ha.ic @@ -23,18 +23,11 @@ The hash table with external chains Created 8/18/1994 Heikki Tuuri *************************************************************************/ +#ifdef BTR_CUR_HASH_ADAPT #include "ut0rnd.h" #include "mem0mem.h" #include "btr0types.h" -/***********************************************************//** -Deletes a hash node. */ -void -ha_delete_hash_node( -/*================*/ - hash_table_t* table, /*!< in: hash table */ - ha_node_t* del_node); /*!< in: node to be deleted */ - /******************************************************************//** Gets a hash node data. @return pointer to the data */ @@ -213,6 +206,14 @@ ha_search_with_data( return(NULL); } +/***********************************************************//** +Deletes a hash node. */ +void +ha_delete_hash_node( +/*================*/ + hash_table_t* table, /*!< in: hash table */ + ha_node_t* del_node); /*!< in: node to be deleted */ + /*********************************************************//** Looks for an element when we know the pointer to the data, and deletes it from the hash table, if found. @@ -240,3 +241,4 @@ ha_search_and_delete_if_found( return(FALSE); } +#endif /* BTR_CUR_HASH_ADAPT */ diff --git a/storage/innobase/include/ha_prototypes.h b/storage/innobase/include/ha_prototypes.h index c10644be832..2bb2c0fe773 100644 --- a/storage/innobase/include/ha_prototypes.h +++ b/storage/innobase/include/ha_prototypes.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -41,17 +42,13 @@ struct fts_string_t; // JAN: TODO missing features: #undef MYSQL_57_SELECT_COUNT_OPTIMIZATION -#undef MYSQL_COMPRESSION -#undef MYSQL_ENCRYPTION #undef MYSQL_FT_INIT_EXT -#undef MYSQL_INNODB_API_CB #undef MYSQL_INNODB_PARTITIONING #undef MYSQL_PFS #undef MYSQL_RENAME_INDEX #undef MYSQL_REPLACE_TRX_IN_THD #undef MYSQL_SPATIAL_INDEX #undef MYSQL_STORE_FTS_DOC_ID -#undef MYSQL_TABLESPACES /*********************************************************************//** Wrapper around MySQL's copy_and_convert function. @@ -322,16 +319,6 @@ innobase_get_at_most_n_mbchars( ulint data_len, /*!< in: length of the string in bytes */ const char* str); /*!< in: character string */ -/******************************************************************//** -Returns true if the thread supports XA, -global value of innodb_supports_xa if thd is NULL. -@return true if thd supports XA */ -ibool -thd_supports_xa( -/*============*/ - THD* thd); /*!< in: thread handle, or NULL to query - the global innodb_supports_xa */ - /** Get status of innodb_tmpdir. @param[in] thd thread handle, or NULL to query the global innodb_tmpdir. diff --git a/storage/innobase/include/hash0hash.h b/storage/innobase/include/hash0hash.h index 2922d424d37..738fa813ddd 100644 --- a/storage/innobase/include/hash0hash.h +++ b/storage/innobase/include/hash0hash.h @@ -536,11 +536,13 @@ struct hash_cell_t{ /* The hash table structure */ struct hash_table_t { enum hash_table_sync_t type; /*wait_mutex */ + by the lock_sys->wait_mutex; + os_event_set() and + os_event_reset() on + waiting_threads[]->event + are protected by + trx_t::mutex */ srv_slot_t* last_slot; /*!< highest slot ever used in the waiting_threads array, protected by @@ -1053,10 +1058,11 @@ struct lock_sys_t{ ulint n_lock_max_wait_time; /*!< Max wait time */ - os_event_t timeout_event; /*!< Set to the event that is - created in the lock wait monitor - thread. A value of 0 means the - thread is not active */ + os_event_t timeout_event; /*!< An event waited for by + lock_wait_timeout_thread. + Not protected by a mutex, + but the waits are timed. + Signaled on shutdown only. */ bool timeout_thread_active; /*!< True if the timeout thread is running */ diff --git a/storage/innobase/include/lock0lock.ic b/storage/innobase/include/lock0lock.ic index ba2311c02ea..6c28300467d 100644 --- a/storage/innobase/include/lock0lock.ic +++ b/storage/innobase/include/lock0lock.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -56,14 +57,14 @@ Calculates the hash value of a page file address: used in inserting or searching for a lock in the hash table. @return hashed value */ UNIV_INLINE -ulint +unsigned lock_rec_hash( /*==========*/ ulint space, /*!< in: space */ ulint page_no)/*!< in: page number */ { - return(hash_calc_hash(lock_rec_fold(space, page_no), - lock_sys->rec_hash)); + return(unsigned(hash_calc_hash(lock_rec_fold(space, page_no), + lock_sys->rec_hash))); } /*********************************************************************//** diff --git a/storage/innobase/include/log0crypt.h b/storage/innobase/include/log0crypt.h index 6b164e90d6e..d1282043665 100644 --- a/storage/innobase/include/log0crypt.h +++ b/storage/innobase/include/log0crypt.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (C) 2013, 2015, Google Inc. All Rights Reserved. -Copyright (C) 2014, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (C) 2014, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -22,27 +22,21 @@ Innodb log encrypt/decrypt Created 11/25/2013 Minli Zhu Modified Jan Lindström jan.lindstrom@mariadb.com +MDEV-11782: Rewritten for MariaDB 10.2 by Marko Mäkelä, MariaDB Corporation. *******************************************************/ #ifndef log0crypt_h #define log0crypt_h -#include "univ.i" -#include "ut0byte.h" -#include "my_crypt.h" +#include "log0log.h" -typedef int Crypt_result; - -/* If true, enable redo log encryption. */ +/** innodb_encrypt_log: whether to encrypt the redo log */ extern my_bool srv_encrypt_log; -/*********************************************************************** -Set next checkpoint's key version to latest one, and generate new key */ +/** Initialize the redo log encryption key. +@return whether the operation succeeded */ UNIV_INTERN -void -log_crypt_set_ver_and_key( -/*======================*/ - ib_uint64_t next_checkpoint_no);/*!< in: next checkpoint no */ - +bool +log_crypt_init(); /*********************************************************************//** Writes the crypto (version, msg and iv) info, which has been used for @@ -54,75 +48,33 @@ log_crypt_write_checkpoint_buf( /*===========================*/ byte* buf); /*!< in/out: checkpoint buffer */ -/*********************************************************************//** -Read the crypto (version, msg and iv) info, which has been used for -log blocks with lsn <= this checkpoint's lsn, from a log header's -checkpoint buf. */ +/** Read the MariaDB 10.1 checkpoint crypto (version, msg and iv) info. +@param[in] buf checkpoint buffer +@return whether the operation was successful */ UNIV_INTERN bool -log_crypt_read_checkpoint_buf( -/*===========================*/ - const byte* buf); /*!< in: checkpoint buffer */ +log_crypt_101_read_checkpoint(const byte* buf); -/******************************************************** -Encrypt one or more log block before it is flushed to disk */ +/** Decrypt a MariaDB 10.1 redo log block. +@param[in,out] buf log block +@return whether the decryption was successful */ +UNIV_INTERN +bool +log_crypt_101_read_block(byte* buf); + +/** Read the checkpoint crypto (version, msg and iv) info. +@param[in] buf checkpoint buffer +@return whether the operation was successful */ +UNIV_INTERN +bool +log_crypt_read_checkpoint_buf(const byte* buf); + +/** Encrypt or decrypt log blocks. +@param[in,out] buf log blocks to encrypt or decrypt +@param[in] size size of the buffer, in bytes +@param[in] decrypt whether to decrypt instead of encrypting */ UNIV_INTERN void -log_encrypt_before_write( -/*=====================*/ - ib_uint64_t next_checkpoint_no, /*!< in: log group to be flushed */ - byte* block, /*!< in/out: pointer to a log block */ - const ulint size); /*!< in: size of log blocks */ - -/******************************************************** -Decrypt a specified log segment after they are read from a log file to a buffer. -*/ -UNIV_INTERN -void -log_decrypt_after_read( -/*===================*/ - byte* frame, /*!< in/out: log segment */ - const ulint size); /*!< in: log segment size */ - -/* Error codes for crypt info */ -typedef enum { - LOG_UNENCRYPTED = 0, - LOG_CRYPT_KEY_NOT_FOUND = 1, - LOG_DECRYPT_MAYBE_FAILED = 2 -} log_crypt_err_t; - -/******************************************************** -Check is the checkpoint information encrypted. This check -is based on fact has log group crypt info and based -on this crypt info was the key version different from -unencrypted key version. There is no realible way to -distinguish encrypted log block from corrupted log block, -but if log block corruption is found this function is -used to find out if log block is maybe encrypted but -encryption key, key management plugin or encryption -algorithm does not match. -@return TRUE, if log block may be encrypted */ -UNIV_INTERN -ibool -log_crypt_block_maybe_encrypted( -/*============================*/ - const byte* log_block, /*!< in: log block */ - log_crypt_err_t* err_info); /*!< out: error info */ - -/******************************************************** -Print crypt error message to error log */ -UNIV_INTERN -void -log_crypt_print_error( -/*==================*/ - log_crypt_err_t err_info); /*!< out: error info */ - -/*********************************************************************//** -Print checkpoint no from log block and all encryption keys from -checkpoints if they are present. Used for problem analysis. */ -void -log_crypt_print_checkpoint_keys( -/*============================*/ - const byte* log_block); +log_crypt(byte* buf, ulint size, bool decrypt = false); #endif // log0crypt.h diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h index 68dc8faf519..de72e5291ef 100644 --- a/storage/innobase/include/log0log.h +++ b/storage/innobase/include/log0log.h @@ -2,6 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2009, Google Inc. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -36,11 +37,8 @@ Created 12/9/1995 Heikki Tuuri #include "univ.i" #include "dyn0buf.h" #include "sync0rw.h" -#include "log0crypt.h" #include "log0types.h" - -/** Redo log buffer */ -struct log_t; +#include "os0event.h" /** Redo log group */ struct log_group_t; @@ -254,10 +252,10 @@ log_group_header_read( const log_group_t* group, ulint header); /** Write checkpoint info to the log header and invoke log_mutex_exit(). -@param[in] sync whether to wait for the write to complete */ +@param[in] sync whether to wait for the write to complete +@param[in] end_lsn start LSN of the MLOG_CHECKPOINT mini-transaction */ void -log_write_checkpoint_info( - bool sync); +log_write_checkpoint_info(bool sync, lsn_t end_lsn); /** Set extra data to be written to the redo log during checkpoint. @param[in] buf data to be appended on checkpoint, or NULL @@ -273,15 +271,6 @@ objects! */ void log_check_margins(void); -/******************************************************//** -Reads a specified log segment to a buffer. */ -void -log_group_read_log_seg( -/*===================*/ - byte* buf, /*!< in: buffer where to read */ - log_group_t* group, /*!< in: log group */ - lsn_t start_lsn, /*!< in: read area start */ - lsn_t end_lsn); /*!< in: read area end */ /********************************************************//** Sets the field values in group to correspond to a given lsn. For this function to work, the values must already be correctly initialized to correspond to @@ -447,9 +436,6 @@ void log_mem_free(void); /*==============*/ -/** Redo log system */ -extern log_t* log_sys; - /** Whether to generate and require checksums on the redo log pages */ extern my_bool innodb_log_checksums; @@ -501,11 +487,26 @@ extern my_bool innodb_log_checksums; .._HDR_NO */ #define LOG_BLOCK_TRL_SIZE 4 /* trailer size in bytes */ -/* Offsets inside the checkpoint pages (redo log format version 1) */ +/** Offsets inside the checkpoint pages (redo log format version 1) @{ */ +/** Checkpoint number */ #define LOG_CHECKPOINT_NO 0 +/** Log sequence number up to which all changes have been flushed */ #define LOG_CHECKPOINT_LSN 8 +/** Byte offset of the log record corresponding to LOG_CHECKPOINT_LSN */ #define LOG_CHECKPOINT_OFFSET 16 +/** log_sys_t::buf_size at the time of the checkpoint (not used) */ #define LOG_CHECKPOINT_LOG_BUF_SIZE 24 +/** MariaDB 10.2.5 encrypted redo log encryption key version (32 bits)*/ +#define LOG_CHECKPOINT_CRYPT_KEY 32 +/** MariaDB 10.2.5 encrypted redo log random nonce (32 bits) */ +#define LOG_CHECKPOINT_CRYPT_NONCE 36 +/** MariaDB 10.2.5 encrypted redo log random message (MY_AES_BLOCK_SIZE) */ +#define LOG_CHECKPOINT_CRYPT_MESSAGE 40 +/** start LSN of the MLOG_CHECKPOINT mini-transaction corresponding +to this checkpoint, or 0 if the information has not been written */ +#define LOG_CHECKPOINT_END_LSN OS_FILE_LOG_BLOCK_SIZE - 16 + +/* @} */ /** Offsets of a log file header */ /* @{ */ @@ -536,19 +537,9 @@ or the MySQL version that created the redo log file. */ /** The redo log format identifier corresponding to the current format version. Stored in LOG_HEADER_FORMAT. */ #define LOG_HEADER_FORMAT_CURRENT 1 +/** Encrypted MariaDB redo log */ +#define LOG_HEADER_FORMAT_ENCRYPTED (1U<<31) -// JAN: TODO: Shoud 32 here be LOG_HEADER_CREATOR_END ? -// Problem: Log format 5.6 == 5.7 ? -#define LOG_CHECKPOINT_ARRAY_END (32 + 32 * 8) -#define LOG_CRYPT_VER (20 + LOG_CHECKPOINT_ARRAY_END) -#define LOG_CRYPT_MAX_ENTRIES (5) -#define LOG_CRYPT_ENTRY_SIZE (4 + 4 + 2 * MY_AES_BLOCK_SIZE) -#define LOG_CRYPT_SIZE (1 + 1 + \ - (LOG_CRYPT_MAX_ENTRIES * \ - LOG_CRYPT_ENTRY_SIZE)) - -#define LOG_CHECKPOINT_SIZE (20 + LOG_CHECKPOINT_ARRAY_END + \ - LOG_CRYPT_SIZE) /* @} */ #define LOG_CHECKPOINT_1 OS_FILE_LOG_BLOCK_SIZE @@ -609,6 +600,12 @@ struct log_group_t{ byte* checkpoint_buf; /** list of log groups */ UT_LIST_NODE_T(log_group_t) log_groups; + + /** @return whether the redo log is encrypted */ + bool is_encrypted() const + { + return((format & LOG_HEADER_FORMAT_ENCRYPTED) != 0); + } }; /** Redo log buffer */ @@ -681,16 +678,12 @@ struct log_t{ /*!< how far we have written the log AND flushed to disk */ ulint n_pending_flushes;/*!< number of currently - pending flushes; incrementing is - protected by the log mutex; - may be decremented between - resetting and setting flush_event */ + pending flushes; protected by + log_sys_t::mutex */ os_event_t flush_event; /*!< this event is in the reset state - when a flush is running; a thread - should wait for this without - owning the log mutex, but NOTE that - to set this event, the - thread MUST own the log mutex! */ + when a flush is running; + os_event_set() and os_event_reset() + are protected by log_sys_t::mutex */ ulint n_log_ios; /*!< number of log i/os initiated thus far */ ulint n_log_ios_old; /*!< number of log i/o's at the @@ -750,8 +743,17 @@ struct log_t{ byte* checkpoint_buf; /*!< checkpoint header is read to this buffer */ /* @} */ + + /** @return whether the redo log is encrypted */ + bool is_encrypted() const + { + return(UT_LIST_GET_FIRST(log_groups)->is_encrypted()); + } }; +/** Redo log system */ +extern log_t* log_sys; + /** Test if flush order mutex is owned. */ #define log_flush_order_mutex_own() \ mutex_own(&log_sys->log_flush_order_mutex) @@ -804,21 +806,13 @@ log_group_calc_lsn_offset( lsn_t lsn, const log_group_t* group); -extern os_event_t log_scrub_event; /* log scrubbing speed, in bytes/sec */ extern ulonglong innodb_scrub_log_speed; -/*****************************************************************//** -This is the main thread for log scrub. It waits for an event and -when waked up fills current log block with dummy records and -sleeps again. -@return this function does not return, it calls os_thread_exit() */ -extern "C" UNIV_INTERN -os_thread_ret_t -DECLARE_THREAD(log_scrub_thread)( -/*===============================*/ - void* arg); /*!< in: a dummy parameter - required by os_thread_create */ +/** Event to wake up log_scrub_thread */ +extern os_event_t log_scrub_event; +/** Whether log_scrub_thread is active */ +extern bool log_scrub_thread_active; #ifndef UNIV_NONINL #include "log0log.ic" diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h index a9d98b08d85..74ea6c95036 100644 --- a/storage/innobase/include/log0recv.h +++ b/storage/innobase/include/log0recv.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,20 +105,12 @@ Reset the state of the recovery system variables. */ void recv_sys_var_init(void); /*===================*/ -/*******************************************************************//** -Empties the hash table of stored log records, applying them to appropriate -pages. */ -dberr_t -recv_apply_hashed_log_recs( -/*=======================*/ - ibool allow_ibuf) /*!< in: if TRUE, also ibuf operations are - allowed during the application; if FALSE, - no ibuf operations are allowed, and after - the application all file pages are flushed to - disk and invalidated in buffer pool: this - alternative means that no new log records - can be generated during the application */ - __attribute__((warn_unused_result)); + +/** Apply the hash table of stored log records to persistent data pages. +@param[in] last_batch whether the change buffer merge will be + performed as part of the operation */ +void +recv_apply_hashed_log_recs(bool last_batch); /** Block of log record data */ struct recv_data_t{ @@ -173,7 +166,7 @@ struct recv_addr_t{ struct recv_dblwr_t { /** Add a page frame to the doublewrite recovery buffer. */ - void add(const byte* page) { + void add(byte* page) { pages.push_back(page); } @@ -184,22 +177,12 @@ struct recv_dblwr_t { @retval NULL if no page was found */ const byte* find_page(ulint space_id, ulint page_no); - typedef std::list > list; + typedef std::list > list; /** Recovered doublewrite buffer page frames */ list pages; }; -/* Recovery encryption information */ -typedef struct recv_encryption { - ulint space_id; /*!< the page number */ - byte* key; /*!< encryption key */ - byte* iv; /*!< encryption iv */ -} recv_encryption_t; - -typedef std::vector > - encryption_list_t; - /** Recovery system data structure */ struct recv_sys_t{ ib_mutex_t mutex; /*!< mutex protecting the fields apply_log_recs, @@ -223,12 +206,6 @@ struct recv_sys_t{ ibool apply_batch_on; /*!< this is TRUE when a log rec application batch is running */ - byte* last_block; - /*!< possible incomplete last recovered log - block */ - byte* last_block_buf_start; - /*!< the nonaligned start address of the - preceding buffer */ byte* buf; /*!< buffer for parsing log records */ ulint len; /*!< amount of data in buf */ lsn_t parse_start_lsn; @@ -259,6 +236,8 @@ struct recv_sys_t{ lsn_t mlog_checkpoint_lsn; /*!< the LSN of a MLOG_CHECKPOINT record, or 0 if none was parsed */ + /** the time when progress was last reported */ + ib_time_t progress_time; mem_heap_t* heap; /*!< memory heap of log records and file addresses*/ hash_table_t* addr_hash;/*!< hash table of file addresses of pages */ @@ -267,8 +246,19 @@ struct recv_sys_t{ recv_dblwr_t dblwr; - encryption_list_t* /*!< Encryption information list */ - encryption_list; + /** Determine whether redo log recovery progress should be reported. + @param[in] time the current time + @return whether progress should be reported + (the last report was at least 15 seconds ago) */ + bool report(ib_time_t time) + { + if (time - progress_time < 15) { + return false; + } + + progress_time = time; + return true; + } }; /** The recovery system */ @@ -301,9 +291,6 @@ number (FIL_PAGE_LSN) is in the future. Initially FALSE, and set by recv_recovery_from_checkpoint_start(). */ extern bool recv_lsn_checks_on; -/** Flag indicating if recv_writer thread is active. */ -extern volatile bool recv_writer_thread_active; - /** Size of the parsing buffer; it must accommodate RECV_SCAN_SIZE many times! */ #define RECV_PARSING_BUF_SIZE (2 * 1024 * 1024) @@ -318,13 +305,4 @@ use these free frames to read in pages when we start applying the log records to the database. */ extern ulint recv_n_pool_free_frames; -/******************************************************//** -Checks the 4-byte checksum to the trailer checksum field of a log -block. */ -bool -log_block_checksum_is_ok( -/*===================================*/ - const byte* block, /*!< in: pointer to a log block */ - bool print_err); /*!< in print error ? */ - #endif diff --git a/storage/innobase/include/mach0data.h b/storage/innobase/include/mach0data.h index de05de55d77..d3e3a53c655 100644 --- a/storage/innobase/include/mach0data.h +++ b/storage/innobase/include/mach0data.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,14 +46,13 @@ mach_write_to_1( /*============*/ byte* b, /*!< in: pointer to byte where to store */ ulint n); /*!< in: ulint integer to be stored, >= 0, < 256 */ -/********************************************************//** -The following function is used to fetch data from one byte. +/** The following function is used to fetch data from one byte. +@param[in] b pointer to a byte to read @return ulint integer, >= 0, < 256 */ UNIV_INLINE -ulint +uint8_t mach_read_from_1( -/*=============*/ - const byte* b) /*!< in: pointer to byte */ + const byte* b) MY_ATTRIBUTE((warn_unused_result)); /*******************************************************//** The following function is used to store data in two consecutive @@ -63,17 +63,15 @@ mach_write_to_2( /*============*/ byte* b, /*!< in: pointer to two bytes where to store */ ulint n); /*!< in: ulint integer to be stored, >= 0, < 64k */ -/********************************************************//** -The following function is used to fetch data from two consecutive +/** The following function is used to fetch data from 2 consecutive bytes. The most significant byte is at the lowest address. -@return ulint integer, >= 0, < 64k */ +@param[in] b pointer to 2 bytes where to store +@return 2-byte integer, >= 0, < 64k */ UNIV_INLINE -ulint +uint16_t mach_read_from_2( -/*=============*/ - const byte* b) /*!< in: pointer to two bytes */ + const byte* b) MY_ATTRIBUTE((warn_unused_result)); - /********************************************************//** The following function is used to convert a 16-bit data item to the canonical format, for fast bytewise equality test @@ -105,15 +103,14 @@ mach_write_to_3( /*============*/ byte* b, /*!< in: pointer to 3 bytes where to store */ ulint n); /*!< in: ulint integer to be stored */ -/********************************************************//** -The following function is used to fetch data from 3 consecutive +/** The following function is used to fetch data from 3 consecutive bytes. The most significant byte is at the lowest address. -@return ulint integer */ +@param[in] b pointer to 3 bytes to read +@return 32 bit integer */ UNIV_INLINE -ulint +uint32_t mach_read_from_3( -/*=============*/ - const byte* b) /*!< in: pointer to 3 bytes */ + const byte* b) MY_ATTRIBUTE((warn_unused_result)); /*******************************************************//** The following function is used to store data in four consecutive @@ -124,15 +121,14 @@ mach_write_to_4( /*============*/ byte* b, /*!< in: pointer to four bytes where to store */ ulint n); /*!< in: ulint integer to be stored */ -/********************************************************//** -The following function is used to fetch data from 4 consecutive +/** The following function is used to fetch data from 4 consecutive bytes. The most significant byte is at the lowest address. -@return ulint integer */ +@param[in] b pointer to 4 bytes to read +@return 32 bit integer */ UNIV_INLINE -ulint +uint32_t mach_read_from_4( -/*=============*/ - const byte* b) /*!< in: pointer to four bytes */ + const byte* b) MY_ATTRIBUTE((warn_unused_result)); /*********************************************************//** Writes a ulint in a compressed form (1..5 bytes). @@ -353,17 +349,6 @@ mach_read_int_type( const byte* src, /*!< in: where to read from */ ulint len, /*!< in: length of src */ ibool unsigned_type); /*!< in: signed or unsigned flag */ -/***********************************************************//** -Convert integral type from host byte order to (big-endian) storage -byte order. */ -UNIV_INLINE -void -mach_write_int_type( -/*================*/ - byte* dest, /*!< in: where to write*/ - const byte* src, /*!< in: where to read from */ - ulint len, /*!< in: length of src */ - bool usign); /*!< in: signed or unsigned flag */ /************************************************************* Convert a ulonglong integer from host byte order to (big-endian) diff --git a/storage/innobase/include/mach0data.ic b/storage/innobase/include/mach0data.ic index 31520c47825..6c879b38354 100644 --- a/storage/innobase/include/mach0data.ic +++ b/storage/innobase/include/mach0data.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,30 +63,28 @@ mach_write_to_2( b[1] = (byte)(n); } -/********************************************************//** -The following function is used to fetch data from one byte. +/** The following function is used to fetch data from one byte. +@param[in] b pointer to a byte to read @return ulint integer, >= 0, < 256 */ UNIV_INLINE -ulint +uint8_t mach_read_from_1( -/*=============*/ - const byte* b) /*!< in: pointer to byte */ + const byte* b) { ut_ad(b); - return((ulint)(b[0])); + return(uint8_t(*b)); } -/********************************************************//** -The following function is used to fetch data from 2 consecutive +/** The following function is used to fetch data from 2 consecutive bytes. The most significant byte is at the lowest address. -@return ulint integer */ +@param[in] b pointer to 2 bytes to read +@return 2-byte integer, >= 0, < 64k */ UNIV_INLINE -ulint +uint16_t mach_read_from_2( -/*=============*/ - const byte* b) /*!< in: pointer to 2 bytes */ + const byte* b) { - return(((ulint)(b[0]) << 8) | (ulint)(b[1])); + return(uint16_t(uint16_t(b[0]) << 8 | b[1])); } #ifndef UNIV_INNOCHECKSUM @@ -139,23 +138,21 @@ mach_write_to_3( b[2] = (byte)(n); } -/********************************************************//** -The following function is used to fetch data from 3 consecutive +/** The following function is used to fetch data from 3 consecutive bytes. The most significant byte is at the lowest address. -@return ulint integer */ +@param[in] b pointer to 3 bytes to read +@return uint32_t integer */ UNIV_INLINE -ulint +uint32_t mach_read_from_3( -/*=============*/ - const byte* b) /*!< in: pointer to 3 bytes */ + const byte* b) { ut_ad(b); - return( ((ulint)(b[0]) << 16) - | ((ulint)(b[1]) << 8) - | (ulint)(b[2]) + return( (static_cast(b[0]) << 16) + | (static_cast(b[1]) << 8) + | static_cast(b[2]) ); } - #endif /* !UNIV_INNOCHECKSUM */ /*******************************************************//** @@ -176,21 +173,20 @@ mach_write_to_4( b[3] = (byte) n; } -/********************************************************//** -The following function is used to fetch data from 4 consecutive +/** The following function is used to fetch data from 4 consecutive bytes. The most significant byte is at the lowest address. -@return ulint integer */ +@param[in] b pointer to 4 bytes to read +@return 32 bit integer */ UNIV_INLINE -ulint +uint32_t mach_read_from_4( -/*=============*/ - const byte* b) /*!< in: pointer to four bytes */ + const byte* b) { ut_ad(b); - return( ((ulint)(b[0]) << 24) - | ((ulint)(b[1]) << 16) - | ((ulint)(b[2]) << 8) - | (ulint)(b[3]) + return( (static_cast(b[0]) << 24) + | (static_cast(b[1]) << 16) + | (static_cast(b[2]) << 8) + | static_cast(b[3]) ); } @@ -870,31 +866,6 @@ mach_swap_byte_order( } } -/************************************************************* -Convert integral type from host byte order (big-endian) storage -byte order. */ -UNIV_INLINE -void -mach_write_int_type( -/*================*/ - byte* dest, /*!< in: where to write */ - const byte* src, /*!< in: where to read from */ - ulint len, /*!< in: length of src */ - bool usign) /*!< in: signed or unsigned flag */ -{ - ut_ad(len >= 1 && len <= 8); - -#ifdef WORDS_BIGENDIAN - memcpy(dest, src, len); -#else - mach_swap_byte_order(dest, src, len); -#endif /* WORDS_BIGENDIAN */ - - if (!usign) { - *dest ^= 0x80; - } -} - /************************************************************* Convert a ulonglong integer from host byte order to (big-endian) storage byte order. */ diff --git a/storage/innobase/include/mem0mem.h b/storage/innobase/include/mem0mem.h index 991d1179098..c44b6d38b78 100644 --- a/storage/innobase/include/mem0mem.h +++ b/storage/innobase/include/mem0mem.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -121,7 +122,7 @@ mem_heap_create_func( ulint size, #ifdef UNIV_DEBUG const char* file_name, - ulint line, + unsigned line, #endif /* UNIV_DEBUG */ ulint type); @@ -371,7 +372,7 @@ struct mem_block_info_t { ulint magic_n;/* magic number for debugging */ #ifdef UNIV_DEBUG char file_name[8];/* file name where the mem heap was created */ - ulint line; /*!< line number where the mem heap was created */ + unsigned line; /*!< line number where the mem heap was created */ #endif /* UNIV_DEBUG */ UT_LIST_BASE_NODE_T(mem_block_t) base; /* In the first block in the the list this is the base node of the list of blocks; diff --git a/storage/innobase/include/mem0mem.ic b/storage/innobase/include/mem0mem.ic index 82c90584e6f..a8292a16143 100644 --- a/storage/innobase/include/mem0mem.ic +++ b/storage/innobase/include/mem0mem.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,7 +49,7 @@ mem_heap_create_block_func( ulint n, /*!< in: number of bytes needed for user data */ #ifdef UNIV_DEBUG const char* file_name,/*!< in: file name where created */ - ulint line, /*!< in: line where created */ + unsigned line, /*!< in: line where created */ #endif /* UNIV_DEBUG */ ulint type); /*!< in: type of heap: MEM_HEAP_DYNAMIC or MEM_HEAP_BUFFER */ @@ -477,7 +478,7 @@ mem_heap_create_func( ulint size, #ifdef UNIV_DEBUG const char* file_name, - ulint line, + unsigned line, #endif /* UNIV_DEBUG */ ulint type) { diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h index 3526436f042..972209c1bf6 100644 --- a/storage/innobase/include/mtr0mtr.h +++ b/storage/innobase/include/mtr0mtr.h @@ -2,7 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2016, MariaDB Corporation +Copyright (c) 2013, 2017, MariaDB Corporation This 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 @@ -378,21 +378,21 @@ struct mtr_t { @param lock rw-lock @param file file name from where called @param line line number in file */ - inline void s_lock(rw_lock_t* lock, const char* file, ulint line); + inline void s_lock(rw_lock_t* lock, const char* file, unsigned line); /** Locks a rw-latch in X mode. NOTE: use mtr_x_lock(). @param lock rw-lock @param file file name from where called @param line line number in file */ - inline void x_lock(rw_lock_t* lock, const char* file, ulint line); + inline void x_lock(rw_lock_t* lock, const char* file, unsigned line); /** Locks a rw-latch in X mode. NOTE: use mtr_sx_lock(). @param lock rw-lock @param file file name from where called @param line line number in file */ - inline void sx_lock(rw_lock_t* lock, const char* file, ulint line); + inline void sx_lock(rw_lock_t* lock, const char* file, unsigned line); /** Acquire a tablespace X-latch. NOTE: use mtr_x_lock_space(). @@ -403,7 +403,7 @@ struct mtr_t { fil_space_t* x_lock_space( ulint space_id, const char* file, - ulint line); + unsigned line); /** Release an object in the memo stack. @param object object @@ -487,9 +487,9 @@ struct mtr_t { @param type type of object @return true if contains */ static bool memo_contains( - mtr_buf_t* memo, - const void* object, - ulint type) + const mtr_buf_t* memo, + const void* object, + ulint type) MY_ATTRIBUTE((warn_unused_result)); /** Check if memo contains the given item. diff --git a/storage/innobase/include/mtr0mtr.ic b/storage/innobase/include/mtr0mtr.ic index f0354756b23..82f552f22ce 100644 --- a/storage/innobase/include/mtr0mtr.ic +++ b/storage/innobase/include/mtr0mtr.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -232,7 +233,7 @@ mtr_t::set_log_mode(mtr_log_t mode) Locks a lock in s-mode. */ void -mtr_t::s_lock(rw_lock_t* lock, const char* file, ulint line) +mtr_t::s_lock(rw_lock_t* lock, const char* file, unsigned line) { rw_lock_s_lock_inline(lock, 0, file, line); @@ -243,7 +244,7 @@ mtr_t::s_lock(rw_lock_t* lock, const char* file, ulint line) Locks a lock in x-mode. */ void -mtr_t::x_lock(rw_lock_t* lock, const char* file, ulint line) +mtr_t::x_lock(rw_lock_t* lock, const char* file, unsigned line) { rw_lock_x_lock_inline(lock, 0, file, line); @@ -254,7 +255,7 @@ mtr_t::x_lock(rw_lock_t* lock, const char* file, ulint line) Locks a lock in sx-mode. */ void -mtr_t::sx_lock(rw_lock_t* lock, const char* file, ulint line) +mtr_t::sx_lock(rw_lock_t* lock, const char* file, unsigned line) { rw_lock_sx_lock_inline(lock, 0, file, line); diff --git a/storage/innobase/include/mtr0types.h b/storage/innobase/include/mtr0types.h index 69a68830af1..0725a5405a4 100644 --- a/storage/innobase/include/mtr0types.h +++ b/storage/innobase/include/mtr0types.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -167,11 +168,6 @@ enum mlog_id_t { /** mark compact clustered index record deleted */ MLOG_COMP_REC_CLUST_DELETE_MARK = 39, - /** mark compact secondary index record deleted; this log - record type is redundant, as MLOG_REC_SEC_DELETE_MARK is - independent of the record format. */ - MLOG_COMP_REC_SEC_DELETE_MARK = 40, - /** update of a compact record, preserves record field sizes */ MLOG_COMP_REC_UPDATE_IN_PLACE = 41, @@ -257,10 +253,10 @@ The record consists of a MLOG_CHECKPOINT byte followed by mach_write_to_8(checkpoint_lsn). */ #define SIZE_OF_MLOG_CHECKPOINT 9 +#ifndef UNIV_INNOCHECKSUM /** Types for the mlock objects to store in the mtr memo; NOTE that the first 3 values must be RW_S_LATCH, RW_X_LATCH, RW_NO_LATCH */ enum mtr_memo_type_t { -#ifndef UNIV_INNOCHECKSUM MTR_MEMO_PAGE_S_FIX = RW_S_LATCH, MTR_MEMO_PAGE_X_FIX = RW_X_LATCH, @@ -268,18 +264,18 @@ enum mtr_memo_type_t { MTR_MEMO_PAGE_SX_FIX = RW_SX_LATCH, MTR_MEMO_BUF_FIX = RW_NO_LATCH, -#endif /* !UNIV_CHECKSUM */ #ifdef UNIV_DEBUG - MTR_MEMO_MODIFY = 32, + MTR_MEMO_MODIFY = 16, #endif /* UNIV_DEBUG */ - MTR_MEMO_S_LOCK = 64, + MTR_MEMO_S_LOCK = RW_S_LATCH << 5, - MTR_MEMO_X_LOCK = 128, + MTR_MEMO_X_LOCK = RW_X_LATCH << 5, - MTR_MEMO_SX_LOCK = 256 + MTR_MEMO_SX_LOCK = RW_SX_LATCH << 5 }; +#endif /* !UNIV_CHECKSUM */ #ifdef UNIV_DEBUG # define MTR_MAGIC_N 54551 diff --git a/storage/innobase/include/os0api.h b/storage/innobase/include/os0api.h new file mode 100644 index 00000000000..63f213b5457 --- /dev/null +++ b/storage/innobase/include/os0api.h @@ -0,0 +1,75 @@ +/*********************************************************************** + +Copyright (c) 2017, MariaDB Corporation. + +This 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 os0api.h +The interface to the helper functions. +These functions are used on os0file.h where +including full full header is not feasible and +implemented on buf0buf.cc and fil0fil.cc. +*******************************************************/ + +#ifndef OS_API_H +#define OS_API_H 1 + +/** Page control block */ +class buf_page_t; + +/** File Node */ +struct fil_node_t; + +/** +Should we punch hole to deallocate unused portion of the page. +@param[in] bpage Page control block +@return true if punch hole should be used, false if not */ +bool +buf_page_should_punch_hole( + const buf_page_t* bpage) + MY_ATTRIBUTE((warn_unused_result)); + +/** +Calculate the length of trim (punch_hole) operation. +@param[in] bpage Page control block +@param[in] write_length Write length +@return length of the trim or zero. */ +ulint +buf_page_get_trim_length( + const buf_page_t* bpage, + ulint write_length) + MY_ATTRIBUTE((warn_unused_result)); + +/** +Get should we punch hole to tablespace. +@param[in] space Tablespace +@return true, if punch hole should be tried, false if not. */ +bool +fil_node_should_punch_hole( + const fil_node_t* node) + MY_ATTRIBUTE((warn_unused_result)); + +/** +Set punch hole to tablespace to given value. +@param[in] space Tablespace +@param[in] val value to be set. */ +void +fil_space_set_punch_hole( + fil_node_t* node, + bool val); + +#endif /* OS_API_H */ diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h index f65d5f8dc1b..e30c427dff6 100644 --- a/storage/innobase/include/os0file.h +++ b/storage/innobase/include/os0file.h @@ -2,7 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Percona Inc.. Those modifications are @@ -36,7 +36,8 @@ Created 10/21/1995 Heikki Tuuri #ifndef os0file_h #define os0file_h -#include "univ.i" +#include "page0size.h" +#include "os0api.h" #ifndef _WIN32 #include @@ -46,8 +47,10 @@ Created 10/21/1995 Heikki Tuuri /** File node of a tablespace or the log data space */ struct fil_node_t; +struct fil_space_t; extern bool os_has_said_disk_full; +extern my_bool srv_use_trim; /** Number of pending read operations */ extern ulint os_n_pending_reads; @@ -77,7 +80,7 @@ the OS actually supports it: Win 95 does not, NT does. */ # define UNIV_NON_BUFFERED_IO /** File handle */ -# define os_file_t HANDLE +typedef HANDLE os_file_t; /** Convert a C file descriptor to a native file handle @param fd file descriptor @@ -107,7 +110,7 @@ whole block gets written. This should be true even in most cases of a crash: if this fails for a log block, then it is equivalent to a media failure in the log. */ -#define OS_FILE_LOG_BLOCK_SIZE 512 +#define OS_FILE_LOG_BLOCK_SIZE 512U /** Options for os_file_create_func @{ */ enum os_file_create_t { @@ -169,333 +172,6 @@ static const ulint OS_FILE_OPERATION_NOT_SUPPORTED = 125; static const ulint OS_FILE_ERROR_MAX = 200; /* @} */ -/** Compression algorithm. */ -struct Compression { - - /** Algorithm types supported */ - enum Type { - /* Note: During recovery we don't have the compression type - because the .frm file has not been read yet. Therefore - we write the recovered pages out without compression. */ - - /** No compression */ - NONE = 0, - - /** Use ZLib */ - ZLIB = 1, - - /** Use LZ4 faster variant, usually lower compression. */ - LZ4 = 2 - }; - - /** Compressed page meta-data */ - struct meta_t { - - /** Version number */ - uint8_t m_version; - - /** Algorithm type */ - Type m_algorithm; - - /** Original page type */ - uint16_t m_original_type; - - /** Original page size, before compression */ - uint16_t m_original_size; - - /** Size after compression */ - uint16_t m_compressed_size; - }; - - /** Default constructor */ - Compression() : m_type(NONE) { }; - - /** Specific constructor - @param[in] type Algorithm type */ - explicit Compression(Type type) - : - m_type(type) - { -#ifdef UNIV_DEBUG - switch (m_type) { - case NONE: - case ZLIB: - case LZ4: - - default: - ut_error; - } -#endif /* UNIV_DEBUG */ - } - - /** Check the page header type field. - @param[in] page Page contents - @return true if it is a compressed page */ - static bool is_compressed_page(const byte* page) - MY_ATTRIBUTE((warn_unused_result)); - - /** Check wether the compression algorithm is supported. - @param[in] algorithm Compression algorithm to check - @param[out] type The type that algorithm maps to - @return DB_SUCCESS or error code */ - static dberr_t check(const char* algorithm, Compression* type) - MY_ATTRIBUTE((warn_unused_result)); - - /** Validate the algorithm string. - @param[in] algorithm Compression algorithm to check - @return DB_SUCCESS or error code */ - static dberr_t validate(const char* algorithm) - MY_ATTRIBUTE((warn_unused_result)); - - /** Convert to a "string". - @param[in] type The compression type - @return the string representation */ - static const char* to_string(Type type) - MY_ATTRIBUTE((warn_unused_result)); - - /** Convert the meta data to a std::string. - @param[in] meta Page Meta data - @return the string representation */ - static std::string to_string(const meta_t& meta) - MY_ATTRIBUTE((warn_unused_result)); - - /** Deserizlise the page header compression meta-data - @param[in] header Pointer to the page header - @param[out] control Deserialised data */ - static void deserialize_header( - const byte* page, - meta_t* control); - - /** Check if the string is "empty" or "none". - @param[in] algorithm Compression algorithm to check - @return true if no algorithm requested */ - static bool is_none(const char* algorithm) - MY_ATTRIBUTE((warn_unused_result)); - - /** Decompress the page data contents. Page type must be - FIL_PAGE_COMPRESSED, if not then the source contents are - left unchanged and DB_SUCCESS is returned. - @param[in] dblwr_recover true of double write recovery - in progress - @param[in,out] src Data read from disk, decompressed - data will be copied to this page - @param[in,out] dst Scratch area to use for decompression - @param[in] dst_len Size of the scratch area in bytes - @return DB_SUCCESS or error code */ - static dberr_t deserialize( - bool dblwr_recover, - byte* src, - byte* dst, - ulint dst_len) - MY_ATTRIBUTE((warn_unused_result)); - - /** Compression type */ - Type m_type; -}; - -/** Encryption key length */ -static const ulint ENCRYPTION_KEY_LEN = 32; - -/** Encryption magic bytes size */ -static const ulint ENCRYPTION_MAGIC_SIZE = 3; - -/** Encryption magic bytes for 5.7.11, it's for checking the encryption information -version. */ -static const char ENCRYPTION_KEY_MAGIC_V1[] = "lCA"; - -/** Encryption magic bytes for 5.7.12+, it's for checking the encryption information -version. */ -static const char ENCRYPTION_KEY_MAGIC_V2[] = "lCB"; - -/** Encryption master key prifix */ -static const char ENCRYPTION_MASTER_KEY_PRIFIX[] = "INNODBKey"; - -/** Encryption master key prifix size */ -static const ulint ENCRYPTION_MASTER_KEY_PRIFIX_LEN = 9; - -/** Encryption master key prifix size */ -static const ulint ENCRYPTION_MASTER_KEY_NAME_MAX_LEN = 100; - -/** UUID of server instance, it's needed for composing master key name */ -static const ulint ENCRYPTION_SERVER_UUID_LEN = 36; - -/** Encryption information total size for 5.7.11: magic number + master_key_id + -key + iv + checksum */ -static const ulint ENCRYPTION_INFO_SIZE_V1 = (ENCRYPTION_MAGIC_SIZE \ - + (ENCRYPTION_KEY_LEN * 2) \ - + 2 * sizeof(ulint)); - -/** Encryption information total size: magic number + master_key_id + -key + iv + server_uuid + checksum */ -static const ulint ENCRYPTION_INFO_SIZE_V2 = (ENCRYPTION_MAGIC_SIZE \ - + (ENCRYPTION_KEY_LEN * 2) \ - + ENCRYPTION_SERVER_UUID_LEN \ - + 2 * sizeof(ulint)); - -class IORequest; - -/** Encryption algorithm. */ -struct Encryption { - - /** Algorithm types supported */ - enum Type { - - /** No encryption */ - NONE = 0, - - /** Use AES */ - AES = 1, - }; - - /** Encryption information format version */ - enum Version { - - /** Version in 5.7.11 */ - ENCRYPTION_VERSION_1 = 0, - - /** Version in > 5.7.11 */ - ENCRYPTION_VERSION_2 = 1, - }; - - /** Default constructor */ - Encryption() : m_type(NONE) { }; - - /** Specific constructor - @param[in] type Algorithm type */ - explicit Encryption(Type type) - : - m_type(type) - { -#ifdef UNIV_DEBUG - switch (m_type) { - case NONE: - case AES: - - default: - ut_error; - } -#endif /* UNIV_DEBUG */ - } - - /** Copy constructor */ - Encryption(const Encryption& other) - : - m_type(other.m_type), - m_key(other.m_key), - m_klen(other.m_klen), - m_iv(other.m_iv) - { }; - - /** Check if page is encrypted page or not - @param[in] page page which need to check - @return true if it is a encrypted page */ - static bool is_encrypted_page(const byte* page) - MY_ATTRIBUTE((warn_unused_result)); - - /** Check the encryption option and set it - @param[in] option encryption option - @param[in/out] encryption The encryption type - @return DB_SUCCESS or DB_UNSUPPORTED */ - dberr_t set_algorithm(const char* option, Encryption* type) - MY_ATTRIBUTE((warn_unused_result)); - - /** Validate the algorithm string. - @param[in] algorithm Encryption algorithm to check - @return DB_SUCCESS or error code */ - static dberr_t validate(const char* algorithm) - MY_ATTRIBUTE((warn_unused_result)); - - /** Convert to a "string". - @param[in] type The encryption type - @return the string representation */ - static const char* to_string(Type type) - MY_ATTRIBUTE((warn_unused_result)); - - /** Check if the string is "empty" or "none". - @param[in] algorithm Encryption algorithm to check - @return true if no algorithm requested */ - static bool is_none(const char* algorithm) - MY_ATTRIBUTE((warn_unused_result)); - - /** Generate random encryption value for key and iv. - @param[in,out] value Encryption value */ - static void random_value(byte* value); - - /** Create new master key for key rotation. - @param[in,out] master_key master key */ - static void create_master_key(byte** master_key); - - /** Get master key by key id. - @param[in] master_key_id master key id - @param[in] srv_uuid uuid of server instance - @param[in,out] master_key master key */ - static void get_master_key(ulint master_key_id, - char* srv_uuid, - byte** master_key); - - /** Get current master key and key id. - @param[in,out] master_key_id master key id - @param[in,out] master_key master key - @param[in,out] version encryption information version */ - static void get_master_key(ulint* master_key_id, - byte** master_key, - Encryption::Version* version); - - /** Encrypt the page data contents. Page type can't be - FIL_PAGE_ENCRYPTED, FIL_PAGE_COMPRESSED_AND_ENCRYPTED, - FIL_PAGE_ENCRYPTED_RTREE. - @param[in] type IORequest - @param[in,out] src page data which need to encrypt - @param[in] src_len Size of the source in bytes - @param[in,out] dst destination area - @param[in,out] dst_len Size of the destination in bytes - @return buffer data, dst_len will have the length of the data */ - byte* encrypt( - const IORequest& type, - byte* src, - ulint src_len, - byte* dst, - ulint* dst_len) - MY_ATTRIBUTE((warn_unused_result)); - - /** Decrypt the page data contents. Page type must be - FIL_PAGE_ENCRYPTED, FIL_PAGE_COMPRESSED_AND_ENCRYPTED, - FIL_PAGE_ENCRYPTED_RTREE, if not then the source contents are - left unchanged and DB_SUCCESS is returned. - @param[in] type IORequest - @param[in,out] src Data read from disk, decrypt - data will be copied to this page - @param[in] src_len source data length - @param[in,out] dst Scratch area to use for decrypt - @param[in] dst_len Size of the scratch area in bytes - @return DB_SUCCESS or error code */ - dberr_t decrypt( - const IORequest& type, - byte* src, - ulint src_len, - byte* dst, - ulint dst_len) - MY_ATTRIBUTE((warn_unused_result)); - - /** Encrypt type */ - Type m_type; - - /** Encrypt key */ - byte* m_key; - - /** Encrypt key length*/ - ulint m_klen; - - /** Encrypt initial vector */ - byte* m_iv; - - /** Current master key id */ - static ulint master_key_id; - - /** Current uuid of server instance */ - static char uuid[ENCRYPTION_SERVER_UUID_LEN + 1]; -}; - /** Types for AIO operations @{ */ /** No transformations during read/write, write as is. */ @@ -504,6 +180,8 @@ struct Encryption { #define IORequestLogRead IORequest(IORequest::LOG | IORequest::READ) #define IORequestLogWrite IORequest(IORequest::LOG | IORequest::WRITE) + + /** The IO Context that is passed down to the low level IO code */ class IORequest { @@ -539,24 +217,16 @@ public: /** Ignore failed reads of non-existent pages */ IGNORE_MISSING = 128, - /** Use punch hole if available, only makes sense if - compression algorithm != NONE. Ignored if not set */ + /** Use punch hole if available*/ PUNCH_HOLE = 256, - - /** Force raw read, do not try to compress/decompress. - This can be used to force a read and write without any - compression e.g., for redo log, merge sort temporary files - and the truncate redo log. */ - NO_COMPRESSION = 512 - }; /** Default constructor */ IORequest() : - m_block_size(UNIV_SECTOR_SIZE), - m_type(READ), - m_compression() + m_bpage(NULL), + m_fil_node(NULL), + m_type(READ) { /* No op */ } @@ -566,15 +236,30 @@ public: ORed from the above enum */ explicit IORequest(ulint type) : - m_block_size(UNIV_SECTOR_SIZE), - m_type(static_cast(type)), - m_compression() + m_bpage(NULL), + m_fil_node(NULL), + m_type(static_cast(type)) { - if (is_log()) { - disable_compression(); + if (!is_punch_hole_supported() || !srv_use_trim) { + clear_punch_hole(); + } + } + + /** + @param[in] type Request type, can be a value that is + ORed from the above enum + @param[in] bpage Page to be written */ + IORequest(ulint type, buf_page_t* bpage) + : + m_bpage(bpage), + m_fil_node(NULL), + m_type(static_cast(type)) + { + if (bpage && buf_page_should_punch_hole(bpage)) { + set_punch_hole(); } - if (!is_punch_hole_supported()) { + if (!is_punch_hole_supported() || !srv_use_trim) { clear_punch_hole(); } } @@ -617,6 +302,12 @@ public: return((m_type & DO_NOT_WAKE) == 0); } + /** Clear the punch hole flag */ + void clear_punch_hole() + { + m_type &= ~PUNCH_HOLE; + } + /** @return true if partial read warning disabled */ bool is_partial_io_warning_disabled() const MY_ATTRIBUTE((warn_unused_result)) @@ -649,15 +340,13 @@ public: bool validate() const MY_ATTRIBUTE((warn_unused_result)) { - ut_a(is_read() ^ is_write()); - - return(!is_read() || !punch_hole()); + return(is_read() ^ is_write()); } /** Set the punch hole flag */ void set_punch_hole() { - if (is_punch_hole_supported()) { + if (is_punch_hole_supported() && srv_use_trim) { m_type |= PUNCH_HOLE; } } @@ -668,32 +357,16 @@ public: m_type &= ~DO_NOT_WAKE; } - /** Clear the punch hole flag */ - void clear_punch_hole() + /** Set the pointer to file node for IO + @param[in] node File node */ + void set_fil_node(fil_node_t* node) { - m_type &= ~PUNCH_HOLE; - } + if (!srv_use_trim || + (node && !fil_node_should_punch_hole(node))) { + clear_punch_hole(); + } - /** @return the block size to use for IO */ - ulint block_size() const - MY_ATTRIBUTE((warn_unused_result)) - { - return(m_block_size); - } - - /** Set the block size for IO - @param[in] block_size Block size to set */ - void block_size(ulint block_size) - { - m_block_size = static_cast(block_size); - } - - /** Clear all compression related flags */ - void clear_compressed() - { - clear_punch_hole(); - - m_compression.m_type = Compression::NONE; + m_fil_node = node; } /** Compare two requests @@ -703,95 +376,6 @@ public: return(m_type == rhs.m_type); } - /** Set compression algorithm - @param[in] compression The compression algorithm to use */ - void compression_algorithm(Compression::Type type) - { - if (type == Compression::NONE) { - return; - } - - set_punch_hole(); - - m_compression.m_type = type; - } - - /** Get the compression algorithm. - @return the compression algorithm */ - Compression compression_algorithm() const - MY_ATTRIBUTE((warn_unused_result)) - { - return(m_compression); - } - - /** @return true if the page should be compressed */ - bool is_compressed() const - MY_ATTRIBUTE((warn_unused_result)) - { - return(compression_algorithm().m_type != Compression::NONE); - } - - /** @return true if the page read should not be transformed. */ - bool is_compression_enabled() const - MY_ATTRIBUTE((warn_unused_result)) - { - return((m_type & NO_COMPRESSION) == 0); - } - - /** Disable transformations. */ - void disable_compression() - { - m_type |= NO_COMPRESSION; - } - - /** Set encryption algorithm - @param[in] type The encryption algorithm to use */ - void encryption_algorithm(Encryption::Type type) - { - if (type == Encryption::NONE) { - return; - } - - m_encryption.m_type = type; - } - - /** Set encryption key and iv - @param[in] key The encryption key to use - @param[in] key_len length of the encryption key - @param[in] iv The encryption iv to use */ - void encryption_key(byte* key, - ulint key_len, - byte* iv) - { - m_encryption.m_key = key; - m_encryption.m_klen = key_len; - m_encryption.m_iv = iv; - } - - /** Get the encryption algorithm. - @return the encryption algorithm */ - Encryption encryption_algorithm() const - MY_ATTRIBUTE((warn_unused_result)) - { - return(m_encryption); - } - - /** @return true if the page should be encrypted. */ - bool is_encrypted() const - MY_ATTRIBUTE((warn_unused_result)) - { - return(m_encryption.m_type != Encryption::NONE); - } - - /** Clear all encryption related flags */ - void clear_encrypted() - { - m_encryption.m_key = NULL; - m_encryption.m_klen = 0; - m_encryption.m_iv = NULL; - m_encryption.m_type = Encryption::NONE; - } - /** Note that the IO is for double write recovery. */ void dblwr_recover() { @@ -823,18 +407,44 @@ public: #endif /* HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE || _WIN32 */ } + ulint get_trim_length(ulint write_length) const + { + return (m_bpage ? + buf_page_get_trim_length(m_bpage, write_length) + : 0); + } + + bool should_punch_hole() const { + return (m_fil_node ? + fil_node_should_punch_hole(m_fil_node) + : false); + } + + void space_no_punch_hole() const { + if (m_fil_node) { + fil_space_set_punch_hole(m_fil_node, false); + } + } + + /** Punch a hole in the file if it was a write + @param[in] fh Open file handle + @param[in] len Compressed buffer length for write + @return DB_SUCCESS or error code */ + + dberr_t punch_hole( + os_file_t fh, + os_offset_t offset, + os_offset_t len); + private: - /* File system best block size */ - uint32_t m_block_size; + /** Page to be written on write operation. */ + buf_page_t* m_bpage; + + /** File node */ + fil_node_t* m_fil_node; /** Request type bit flags */ uint16_t m_type; - - /** Compression algorithm */ - Compression m_compression; - - /** Encryption algorithm */ - Encryption m_encryption; }; /* @} */ @@ -1197,10 +807,10 @@ The wrapper functions have the prefix of "innodb_". */ # define os_file_close(file) \ pfs_os_file_close_func(file, __FILE__, __LINE__) -# define os_aio(type, mode, name, file, buf, offset, \ - n, read_only, message1, message2, wsize) \ - pfs_os_aio_func(type, mode, name, file, buf, offset, \ - n, read_only, message1, message2, wsize, \ +# define os_aio(type, mode, name, file, buf, offset, \ + n, read_only, message1, message2) \ + pfs_os_aio_func(type, mode, name, file, buf, offset, \ + n, read_only, message1, message2, \ __FILE__, __LINE__) # define os_file_read(type, file, buf, offset, n) \ @@ -1212,7 +822,7 @@ The wrapper functions have the prefix of "innodb_". */ # define os_file_write(type, name, file, buf, offset, n) \ pfs_os_file_write_func(type, name, file, buf, offset, \ - n, __FILE__, __LINE__) + n,__FILE__, __LINE__) # define os_file_flush(file) \ pfs_os_file_flush_func(file, __FILE__, __LINE__) @@ -1251,7 +861,7 @@ pfs_os_file_create_simple_func( bool read_only, bool* success, const char* src_file, - ulint src_line) + uint src_line) MY_ATTRIBUTE((warn_unused_result)); /** NOTE! Please use the corresponding macro @@ -1282,7 +892,7 @@ pfs_os_file_create_simple_no_error_handling_func( bool read_only, bool* success, const char* src_file, - ulint src_line) + uint src_line) MY_ATTRIBUTE((warn_unused_result)); /** NOTE! Please use the corresponding macro os_file_create(), not directly @@ -1316,7 +926,7 @@ pfs_os_file_create_func( bool read_only, bool* success, const char* src_file, - ulint src_line) + uint src_line) MY_ATTRIBUTE((warn_unused_result)); /** NOTE! Please use the corresponding macro os_file_close(), not directly @@ -1331,7 +941,7 @@ bool pfs_os_file_close_func( os_file_t file, const char* src_file, - ulint src_line); + uint src_line); /** NOTE! Please use the corresponding macro os_file_read(), not directly this function! @@ -1354,7 +964,7 @@ pfs_os_file_read_func( os_offset_t offset, ulint n, const char* src_file, - ulint src_line); + uint src_line); /** NOTE! Please use the corresponding macro os_file_read_no_error_handling(), not directly this function! @@ -1380,7 +990,7 @@ pfs_os_file_read_no_error_handling_func( ulint n, ulint* o, const char* src_file, - ulint src_line); + uint src_line); /** NOTE! Please use the corresponding macro os_aio(), not directly this function! @@ -1417,9 +1027,8 @@ pfs_os_aio_func( bool read_only, fil_node_t* m1, void* m2, - ulint* wsize, const char* src_file, - ulint src_line); + uint src_line); /** NOTE! Please use the corresponding macro os_file_write(), not directly this function! @@ -1445,7 +1054,7 @@ pfs_os_file_write_func( os_offset_t offset, ulint n, const char* src_file, - ulint src_line); + uint src_line); /** NOTE! Please use the corresponding macro os_file_flush(), not directly this function! @@ -1461,7 +1070,7 @@ bool pfs_os_file_flush_func( os_file_t file, const char* src_file, - ulint src_line); + uint src_line); /** NOTE! Please use the corresponding macro os_file_rename(), not directly this function! @@ -1480,7 +1089,7 @@ pfs_os_file_rename_func( const char* oldpath, const char* newpath, const char* src_file, - ulint src_line); + uint src_line); /** NOTE! Please use the corresponding macro os_file_delete(), not directly @@ -1498,7 +1107,7 @@ pfs_os_file_delete_func( mysql_pfs_key_t key, const char* name, const char* src_file, - ulint src_line); + uint src_line); /** NOTE! Please use the corresponding macro os_file_delete_if_exists(), not @@ -1518,7 +1127,7 @@ pfs_os_file_delete_if_exists_func( const char* name, bool* exist, const char* src_file, - ulint src_line); + uint src_line); #else /* UNIV_PFS_IO */ @@ -1542,9 +1151,9 @@ to original un-instrumented file I/O APIs */ # define os_file_close(file) os_file_close_func(file) # define os_aio(type, mode, name, file, buf, offset, \ - n, read_only, message1, message2, wsize) \ + n, read_only, message1, message2) \ os_aio_func(type, mode, name, file, buf, offset, \ - n, read_only, message1, message2, wsize) + n, read_only, message1, message2) # define os_file_read(type, file, buf, offset, n) \ os_file_read_func(type, file, buf, offset, n) @@ -1552,7 +1161,7 @@ to original un-instrumented file I/O APIs */ # define os_file_read_no_error_handling(type, file, buf, offset, n, o) \ os_file_read_no_error_handling_func(type, file, buf, offset, n, o) -# define os_file_write(type, name, file, buf, offset, n) \ +# define os_file_write(type, name, file, buf, offset, n) \ os_file_write_func(type, name, file, buf, offset, n) # define os_file_flush(file) os_file_flush_func(file) @@ -1815,8 +1424,7 @@ os_aio_func( ulint n, bool read_only, fil_node_t* m1, - void* m2, - ulint* wsize); + void* m2); /** Wakes up all async i/o threads so that they know to exit themselves in shutdown. */ @@ -1832,12 +1440,16 @@ os_aio_wait_until_no_pending_writes(); void os_aio_simulated_wake_handler_threads(); +#ifdef _WIN32 /** This function can be called if one wants to post a batch of reads and prefers an i/o-handler thread to handle them all at once later. You must call os_aio_simulated_wake_handler_threads later to ensure the threads are not left sleeping! */ void os_aio_simulated_put_read_threads_to_sleep(); +#else /* _WIN32 */ +# define os_aio_simulated_put_read_threads_to_sleep() +#endif /* _WIN32 */ /** This is the generic AIO handler interface function. Waits for an aio operation to complete. This function is used to wait the @@ -1913,37 +1525,11 @@ int innobase_mysql_tmpfile( const char* path); -/** If it is a compressed page return the compressed page data + footer size -@param[in] buf Buffer to check, must include header + 10 bytes -@return ULINT_UNDEFINED if the page is not a compressed page or length - of the compressed data (including footer) if it is a compressed page */ -ulint -os_file_compressed_page_size(const byte* buf); - -/** If it is a compressed page return the original page data + footer size -@param[in] buf Buffer to check, must include header + 10 bytes -@return ULINT_UNDEFINED if the page is not a compressed page or length - of the original data + footer if it is a compressed page */ -ulint -os_file_original_page_size(const byte* buf); - /** Set the file create umask @param[in] umask The umask to use for file creation. */ void os_file_set_umask(ulint umask); -/** Free storage space associated with a section of the file. -@param[in] fh Open file handle -@param[in] off Starting offset (SEEK_SET) -@param[in] len Size of the hole -@return DB_SUCCESS or error code */ -dberr_t -os_file_punch_hole( - os_file_t fh, - os_offset_t off, - os_offset_t len) - MY_ATTRIBUTE((warn_unused_result)); - /** Check if the file system supports sparse files. Warning: On POSIX systems we try and punch a hole from offset 0 to @@ -1961,21 +1547,29 @@ os_is_sparse_file_supported( os_file_t fh) MY_ATTRIBUTE((warn_unused_result)); -/** Decompress the page data contents. Page type must be FIL_PAGE_COMPRESSED, if -not then the source contents are left unchanged and DB_SUCCESS is returned. -@param[in] dblwr_recover true of double write recovery in progress -@param[in,out] src Data read from disk, decompressed data will be - copied to this page -@param[in,out] dst Scratch area to use for decompression -@param[in] dst_len Size of the scratch area in bytes +/** Free storage space associated with a section of the file. +@param[in] fh Open file handle +@param[in] off Starting offset (SEEK_SET) +@param[in] len Size of the hole @return DB_SUCCESS or error code */ - dberr_t -os_file_decompress_page( - bool dblwr_recover, - byte* src, - byte* dst, - ulint dst_len) +os_file_punch_hole( + IORequest& type, + os_file_t fh, + os_offset_t off, + os_offset_t len) + MY_ATTRIBUTE((warn_unused_result)); + +/** Free storage space associated with a section of the file. +@param[in] fh Open file handle +@param[in] off Starting offset (SEEK_SET) +@param[in] len Size of the hole +@return DB_SUCCESS or error code */ +dberr_t +os_file_punch_hole( + os_file_t fh, + os_offset_t off, + os_offset_t len) MY_ATTRIBUTE((warn_unused_result)); /** Normalizes a directory path for the current OS: @@ -2005,6 +1599,16 @@ is_absolute_path( return(false); } +/***********************************************************************//** +Try to get number of bytes per sector from file system. +@return file block size */ +UNIV_INTERN +ulint +os_file_get_block_size( +/*===================*/ + os_file_t file, /*!< in: handle to a file */ + const char* name); /*!< in: file name */ + #ifndef UNIV_NONINL #include "os0file.ic" #endif /* UNIV_NONINL */ diff --git a/storage/innobase/include/os0file.ic b/storage/innobase/include/os0file.ic index 74d0b2c83a8..807d3254b9d 100644 --- a/storage/innobase/include/os0file.ic +++ b/storage/innobase/include/os0file.ic @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2010, 2015, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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,7 @@ pfs_os_file_create_simple_func( bool read_only, bool* success, const char* src_file, - ulint src_line) + uint src_line) { PSI_file_locker_state state; struct PSI_file_locker* locker = NULL; @@ -101,7 +101,7 @@ pfs_os_file_create_simple_no_error_handling_func( bool read_only, bool* success, const char* src_file, - ulint src_line) + uint src_line) { PSI_file_locker_state state; struct PSI_file_locker* locker = NULL; @@ -152,7 +152,7 @@ pfs_os_file_create_func( bool read_only, bool* success, const char* src_file, - ulint src_line) + uint src_line) { PSI_file_locker_state state; struct PSI_file_locker* locker = NULL; @@ -184,7 +184,7 @@ bool pfs_os_file_close_func( os_file_t file, const char* src_file, - ulint src_line) + uint src_line) { PSI_file_locker_state state; struct PSI_file_locker* locker = NULL; @@ -219,11 +219,6 @@ an asynchronous i/o operation. @param[in,out] m2 message for the AIO handler (can be used to identify a completed AIO operation); ignored if mode is OS_AIO_SYNC -@param[in,out] write_size Actual write size initialized - after fist successfull trim - operation for this page and if - initialized we do not trim again if - actual page size @param[in] src_file file name where func invoked @param[in] src_line line where the func invoked @return DB_SUCCESS if request was queued successfully, FALSE if fail */ @@ -240,9 +235,8 @@ pfs_os_aio_func( bool read_only, fil_node_t* m1, void* m2, - ulint* write_size, const char* src_file, - ulint src_line) + uint src_line) { PSI_file_locker_state state; struct PSI_file_locker* locker = NULL; @@ -256,7 +250,7 @@ pfs_os_aio_func( src_file, src_line); dberr_t result = os_aio_func( - type, mode, name, file, buf, offset, n, read_only, m1, m2, write_size); + type, mode, name, file, buf, offset, n, read_only, m1, m2); register_pfs_file_io_end(locker, n); @@ -284,7 +278,7 @@ pfs_os_file_read_func( os_offset_t offset, ulint n, const char* src_file, - ulint src_line) + uint src_line) { PSI_file_locker_state state; struct PSI_file_locker* locker = NULL; @@ -327,7 +321,7 @@ pfs_os_file_read_no_error_handling_func( ulint n, ulint* o, const char* src_file, - ulint src_line) + uint src_line) { PSI_file_locker_state state; struct PSI_file_locker* locker = NULL; @@ -367,7 +361,7 @@ pfs_os_file_write_func( os_offset_t offset, ulint n, const char* src_file, - ulint src_line) + uint src_line) { PSI_file_locker_state state; struct PSI_file_locker* locker = NULL; @@ -398,7 +392,7 @@ bool pfs_os_file_flush_func( os_file_t file, const char* src_file, - ulint src_line) + uint src_line) { PSI_file_locker_state state; struct PSI_file_locker* locker = NULL; @@ -430,7 +424,7 @@ pfs_os_file_rename_func( const char* oldpath, const char* newpath, const char* src_file, - ulint src_line) + uint src_line) { PSI_file_locker_state state; @@ -462,7 +456,7 @@ pfs_os_file_delete_func( mysql_pfs_key_t key, const char* name, const char* src_file, - ulint src_line) + uint src_line) { PSI_file_locker_state state; struct PSI_file_locker* locker = NULL; @@ -495,7 +489,7 @@ pfs_os_file_delete_if_exists_func( const char* name, bool* exist, const char* src_file, - ulint src_line) + uint src_line) { PSI_file_locker_state state; struct PSI_file_locker* locker = NULL; @@ -510,4 +504,3 @@ pfs_os_file_delete_if_exists_func( return(result); } #endif /* UNIV_PFS_IO */ - diff --git a/storage/innobase/include/page0cur.h b/storage/innobase/include/page0cur.h index 2bb922cc829..731817e740a 100644 --- a/storage/innobase/include/page0cur.h +++ b/storage/innobase/include/page0cur.h @@ -36,8 +36,6 @@ Created 10/4/1994 Heikki Tuuri #include "gis0type.h" -#define PAGE_CUR_ADAPT - #ifdef UNIV_DEBUG /*********************************************************//** Gets pointer to the page frame where the cursor is positioned. @@ -297,6 +295,7 @@ page_cur_search_with_match( fields in lower limit record */ page_cur_t* cursor, /*!< out: page cursor */ rtr_info_t* rtr_info);/*!< in/out: rtree search stack */ +#ifdef BTR_CUR_HASH_ADAPT /** Search the right position for a page cursor. @param[in] block buffer block @param[in] index index tree @@ -322,6 +321,7 @@ page_cur_search_with_match_bytes( ulint* ilow_matched_fields, ulint* ilow_matched_bytes, page_cur_t* cursor); +#endif /* BTR_CUR_HASH_ADAPT */ /***********************************************************//** Positions a page cursor on a randomly chosen user record on a page. If there are no user records, sets the cursor on the infimum record. */ diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.ic index 97f9d5a578f..3940931125e 100644 --- a/storage/innobase/include/page0page.ic +++ b/storage/innobase/include/page0page.ic @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. +Copyright (c) 2016, 2017, MariaDB Corporation. This 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,8 +147,9 @@ page_set_ssn_id( { page_t* page = buf_block_get_frame(block); - ut_ad(!mtr || mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_SX_FIX) - || mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); + ut_ad(!mtr || mtr_memo_contains_flagged(mtr, block, + MTR_MEMO_PAGE_SX_FIX + | MTR_MEMO_PAGE_X_FIX)); if (page_zip) { mach_write_to_8(page + FIL_RTREE_SPLIT_SEQ_NUM, ssn_id); @@ -251,7 +252,7 @@ page_header_set_ptr( if (ptr == NULL) { offs = 0; } else { - offs = ptr - page; + offs = ulint(ptr - page); } ut_ad((field != PAGE_HEAP_TOP) || offs); @@ -1247,11 +1248,9 @@ page_mem_free( ut_ad(rec_offs_validate(rec, index, offsets)); free = page_header_get_ptr(page, PAGE_FREE); - bool scrub = srv_immediate_scrub_data_uncompressed; - if (scrub) { + if (srv_immediate_scrub_data_uncompressed) { /* scrub record */ - uint size = rec_offs_data_size(offsets); - memset(rec, 0, size); + memset(rec, 0, rec_offs_data_size(offsets)); } page_rec_set_next(rec, free); diff --git a/storage/innobase/include/page0size.h b/storage/innobase/include/page0size.h index ab917e1ff05..30a996df0a6 100644 --- a/storage/innobase/include/page0size.h +++ b/storage/innobase/include/page0size.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -81,7 +82,7 @@ public: ssize = (0 == ssize) ? UNIV_PAGE_SSIZE_ORIG : ssize; /* Convert from a 'log2 minus 9' to a page size in bytes. */ - const ulint size = ((UNIV_ZIP_SIZE_MIN >> 1) << ssize); + const unsigned size = ((UNIV_ZIP_SIZE_MIN >> 1) << ssize); ut_ad(size <= UNIV_PAGE_SIZE_MAX); ut_ad(size <= (1 << PAGE_SIZE_T_SIZE_BITS)); @@ -101,7 +102,7 @@ public: /* Convert from a 'log2 minus 9' to a page size in bytes. */ - const ulint phy + const unsigned phy = ((UNIV_ZIP_SIZE_MIN >> 1) << ssize); ut_ad(phy <= UNIV_ZIP_SIZE_MAX); @@ -139,9 +140,7 @@ public: @param[in] src page size object whose values to fetch */ inline void copy_from(const page_size_t& src) { - m_physical = src.physical(); - m_logical = src.logical(); - m_is_compressed = src.is_compressed(); + *this = src; } /** Check if a given page_size_t object is equal to the current one. @@ -156,9 +155,6 @@ public: private: - /* Disable implicit copying. */ - void operator=(const page_size_t&); - /* For non compressed tablespaces, physical page size is equal to the logical page size and the data is stored in buf_page_t::frame (and is also always equal to univ_page_size (--innodb-page-size=)). diff --git a/storage/innobase/include/page0zip.h b/storage/innobase/include/page0zip.h index 4a32595af66..f4da2b55385 100644 --- a/storage/innobase/include/page0zip.h +++ b/storage/innobase/include/page0zip.h @@ -2,6 +2,7 @@ Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -69,11 +70,11 @@ extern uint page_zip_level; + DATA_TRX_ID_LEN \ + DATA_ROLL_PTR_LEN) /** Mask of record offsets */ -#define PAGE_ZIP_DIR_SLOT_MASK 0x3fff +#define PAGE_ZIP_DIR_SLOT_MASK 0x3fffU /** 'owned' flag */ -#define PAGE_ZIP_DIR_SLOT_OWNED 0x4000 +#define PAGE_ZIP_DIR_SLOT_OWNED 0x4000U /** 'deleted' flag */ -#define PAGE_ZIP_DIR_SLOT_DEL 0x8000 +#define PAGE_ZIP_DIR_SLOT_DEL 0x8000U /* Whether or not to log compressed page images to avoid possible compression algorithm changes in zlib. */ diff --git a/storage/innobase/include/page0zip.ic b/storage/innobase/include/page0zip.ic index 9cc54dc42fa..5f754e1f993 100644 --- a/storage/innobase/include/page0zip.ic +++ b/storage/innobase/include/page0zip.ic @@ -2,6 +2,7 @@ Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -133,11 +134,11 @@ page_zip_set_size( ulint size) /*!< in: size in bytes */ { if (size) { - int ssize; + unsigned ssize; ut_ad(ut_is_2pow(size)); - for (ssize = 1; size > (ulint) (512 << ssize); ssize++) { + for (ssize = 1; size > (512U << ssize); ssize++) { } page_zip->ssize = ssize; @@ -268,9 +269,9 @@ page_zip_max_ins_size( trailer_len += PAGE_ZIP_DIR_SLOT_SIZE; - return((lint) page_zip_get_size(page_zip) - - trailer_len - page_zip->m_end - - (REC_N_NEW_EXTRA_BYTES - 2)); + return(lint(page_zip_get_size(page_zip) + - trailer_len - page_zip->m_end + - (REC_N_NEW_EXTRA_BYTES - 2))); } /**********************************************************************//** diff --git a/storage/innobase/include/que0que.h b/storage/innobase/include/que0que.h index 3e90e0b25e3..574b7e6acee 100644 --- a/storage/innobase/include/que0que.h +++ b/storage/innobase/include/que0que.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -315,18 +316,6 @@ que_fork_scheduler_round_robin( que_fork_t* fork, /*!< in: a query fork */ que_thr_t* thr); /*!< in: current pos */ -/*********************************************************************//** -Initialise the query sub-system. */ -void -que_init(void); -/*==========*/ - -/*********************************************************************//** -Close the query sub-system. */ -void -que_close(void); -/*===========*/ - /** Query thread states */ enum que_thr_state_t { QUE_THR_RUNNING, diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h index ed700139b53..4b82a6b05b9 100644 --- a/storage/innobase/include/rem0rec.h +++ b/storage/innobase/include/rem0rec.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -458,7 +459,7 @@ rec_get_offsets_func( (ULINT_UNDEFINED if all fields) */ #ifdef UNIV_DEBUG const char* file, /*!< in: file name where called */ - ulint line, /*!< in: line number where called */ + unsigned line, /*!< in: line number where called */ #endif /* UNIV_DEBUG */ mem_heap_t** heap) /*!< in/out: memory heap */ #ifdef UNIV_DEBUG diff --git a/storage/innobase/include/row0ins.h b/storage/innobase/include/row0ins.h index 4038c32b9c0..00a32942de2 100644 --- a/storage/innobase/include/row0ins.h +++ b/storage/innobase/include/row0ins.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -153,7 +154,7 @@ row_ins_index_entry_big_rec_func( #ifndef DBUG_OFF const void* thd, /*!< in: connection, or NULL */ #endif /* DBUG_OFF */ - ulint line) /*!< in: line number of caller */ + unsigned line) /*!< in: line number of caller */ MY_ATTRIBUTE((nonnull(1,2,3,4,5,6), warn_unused_result)); #ifdef DBUG_OFF # define row_ins_index_entry_big_rec(e,big,ofs,heap,index,thd,file,line) \ diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h index 8cb9eb7976e..1b61c475c6f 100644 --- a/storage/innobase/include/row0merge.h +++ b/storage/innobase/include/row0merge.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2016, MariaDB Corporation. +Copyright (c) 2015, 2017, MariaDB Corporation. This 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 @@ -283,8 +283,8 @@ row_merge_create_index( /*********************************************************************//** Check if a transaction can use an index. -@return TRUE if index can be used by the transaction else FALSE */ -ibool +@return whether the index can be used by the transaction */ +bool row_merge_is_index_usable( /*======================*/ const trx_t* trx, /*!< in: transaction */ @@ -431,8 +431,8 @@ row_merge_sort( row_merge_block_t* block, int* tmpfd, const bool update_progress, - const float pct_progress, - const float pct_cost, + const double pct_progress, + const double pct_cost, fil_space_crypt_t* crypt_data, row_merge_block_t* crypt_block, ulint space, diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h index f010e717103..0e4ebafc990 100644 --- a/storage/innobase/include/row0mysql.h +++ b/storage/innobase/include/row0mysql.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -337,7 +338,7 @@ row_mysql_lock_data_dictionary_func( /*================================*/ trx_t* trx, /*!< in/out: transaction */ const char* file, /*!< in: file name */ - ulint line); /*!< in: line number */ + unsigned line); /*!< in: line number */ #define row_mysql_lock_data_dictionary(trx) \ row_mysql_lock_data_dictionary_func(trx, __FILE__, __LINE__) /*********************************************************************//** @@ -354,7 +355,7 @@ row_mysql_freeze_data_dictionary_func( /*==================================*/ trx_t* trx, /*!< in/out: transaction */ const char* file, /*!< in: file name */ - ulint line); /*!< in: line number */ + unsigned line); /*!< in: line number */ #define row_mysql_freeze_data_dictionary(trx) \ row_mysql_freeze_data_dictionary_func(trx, __FILE__, __LINE__) /*********************************************************************//** @@ -373,9 +374,6 @@ row_create_table_for_mysql( dict_table_t* table, /*!< in, own: table definition (will be freed, or on DB_SUCCESS added to the data dictionary cache) */ - const char* compression, - /*!< in: compression algorithm to use, - can be NULL */ trx_t* trx, /*!< in/out: transaction */ bool commit, /*!< in: if true, commit the transaction */ fil_encryption_t mode, /*!< in: encryption mode */ @@ -484,11 +482,6 @@ row_drop_table_for_mysql( bool nonatomic = true); /*!< in: whether it is permitted to release and reacquire dict_operation_lock */ -/*********************************************************************//** -Drop all temporary tables during crash recovery. */ -void -row_mysql_drop_temp_tables(void); -/*============================*/ /*********************************************************************//** Discards the tablespace of a table which stored in an .ibd file. Discarding @@ -872,10 +865,6 @@ struct row_prebuilt_t { ulint idx_cond_n_cols;/*!< Number of fields in idx_cond_cols. 0 if and only if idx_cond == NULL. */ /*----------------------*/ - unsigned innodb_api:1; /*!< whether this is a InnoDB API - query */ - const rec_t* innodb_api_rec; /*!< InnoDB API search result */ - /*----------------------*/ /*----------------------*/ rtr_info_t* rtr_info; /*!< R-tree Search Info */ diff --git a/storage/innobase/include/row0row.ic b/storage/innobase/include/row0row.ic index 9243fae839a..8a32bb3ffd2 100644 --- a/storage/innobase/include/row0row.ic +++ b/storage/innobase/include/row0row.ic @@ -201,13 +201,13 @@ row_parse_int( case DATA_FLOAT: ut_a(len == sizeof(float)); - value = mach_float_read(data); + value = static_cast(mach_float_read(data)); break; case DATA_DOUBLE: ut_a(len == sizeof(double)); - value = mach_double_read(data); + value = static_cast(mach_double_read(data)); break; default: diff --git a/storage/innobase/include/row0upd.ic b/storage/innobase/include/row0upd.ic index 8b794e47a07..18c72309930 100644 --- a/storage/innobase/include/row0upd.ic +++ b/storage/innobase/include/row0upd.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,10 +98,10 @@ upd_field_set_field_no( dict_index_t* index, /*!< in: index */ trx_t* trx) /*!< in: transaction */ { - upd_field->field_no = field_no; + upd_field->field_no = unsigned(field_no); upd_field->orig_len = 0; - if (field_no >= dict_index_get_n_fields(index)) { + if (UNIV_UNLIKELY(field_no >= dict_index_get_n_fields(index))) { ib::error() << " trying to access field " << field_no << " in " << index->name @@ -125,19 +126,10 @@ upd_field_set_v_field_no( ulint field_no, dict_index_t* index) { - upd_field->field_no = field_no; + ut_a(field_no < dict_table_get_n_v_cols(index->table)); + upd_field->field_no = unsigned(field_no); upd_field->orig_len = 0; - if (field_no >= dict_table_get_n_v_cols(index->table)) { - ib::error() - << " trying to access virtual field " << field_no - << " in " << index->name - << " of table " << index->table->name - << " which contains only " << index->table->n_v_cols - << " virutal columns"; - ut_ad(0); - } - dict_col_copy_type(&dict_table_get_nth_v_col( index->table, field_no)->m_col, dfield_get_type(&upd_field->new_val)); diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h index e4e1394c2d3..3697604425c 100644 --- a/storage/innobase/include/srv0mon.h +++ b/storage/innobase/include/srv0mon.h @@ -343,16 +343,8 @@ enum monitor_id_t { MONITOR_PAD_DECREMENTS, /* New monitor variables for page compression */ MONITOR_OVLD_PAGE_COMPRESS_SAVED, - MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT512, - MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT1024, - MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT2048, - MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT4096, - MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT8192, - MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT16384, - MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT32768, MONITOR_OVLD_PAGES_PAGE_COMPRESSED, MONITOR_OVLD_PAGE_COMPRESSED_TRIM_OP, - MONITOR_OVLD_PAGE_COMPRESSED_TRIM_OP_SAVED, MONITOR_OVLD_PAGES_PAGE_DECOMPRESSED, MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR, @@ -369,16 +361,20 @@ enum monitor_id_t { MONITOR_INDEX_REORG_SUCCESSFUL, MONITOR_INDEX_DISCARD, +#ifdef BTR_CUR_HASH_ADAPT /* Adaptive Hash Index related counters */ MONITOR_MODULE_ADAPTIVE_HASH, MONITOR_OVLD_ADAPTIVE_HASH_SEARCH, +#endif /* BTR_CUR_HASH_ADAPT */ MONITOR_OVLD_ADAPTIVE_HASH_SEARCH_BTREE, +#ifdef BTR_CUR_HASH_ADAPT MONITOR_ADAPTIVE_HASH_PAGE_ADDED, MONITOR_ADAPTIVE_HASH_PAGE_REMOVED, MONITOR_ADAPTIVE_HASH_ROW_ADDED, MONITOR_ADAPTIVE_HASH_ROW_REMOVED, MONITOR_ADAPTIVE_HASH_ROW_REMOVE_NOT_FOUND, MONITOR_ADAPTIVE_HASH_ROW_UPDATED, +#endif /* BTR_CUR_HASH_ADAPT */ /* Tablespace related counters */ MONITOR_MODULE_FIL_SYSTEM, diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 92572a0f8b3..dd77738584b 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -3,7 +3,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, 2009, Google Inc. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2016, MariaDB Corporation +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -114,20 +114,6 @@ struct srv_stats_t { /** Number of bytes saved by page compression */ ulint_ctr_64_t page_compression_saved; - /** Number of 512Byte TRIM by page compression */ - ulint_ctr_64_t page_compression_trim_sect512; - /** Number of 1K TRIM by page compression */ - ulint_ctr_64_t page_compression_trim_sect1024; - /** Number of 2K TRIM by page compression */ - ulint_ctr_64_t page_compression_trim_sect2048; - /** Number of 4K TRIM by page compression */ - ulint_ctr_64_t page_compression_trim_sect4096; - /** Number of 8K TRIM by page compression */ - ulint_ctr_64_t page_compression_trim_sect8192; - /** Number of 16K TRIM by page compression */ - ulint_ctr_64_t page_compression_trim_sect16384; - /** Number of 32K TRIM by page compression */ - ulint_ctr_64_t page_compression_trim_sect32768; /* Number of index pages written */ ulint_ctr_64_t index_pages_written; /* Number of non index pages written */ @@ -136,8 +122,6 @@ struct srv_stats_t { ulint_ctr_64_t pages_page_compressed; /* Number of TRIM operations induced by page compression */ ulint_ctr_64_t page_compressed_trim_op; - /* Number of TRIM operations saved by using actual write size knowledge */ - ulint_ctr_64_t page_compressed_trim_op_saved; /* Number of pages decompressed with page compression */ ulint_ctr_64_t pages_page_decompressed; /* Number of page compression errors */ @@ -194,6 +178,9 @@ struct srv_stats_t { /** Number of encryption_get_latest_key_version calls */ ulint_ctr_64_t n_key_requests; + + /** Number of log scrub operations */ + ulint_ctr_64_t n_log_scrubs; }; extern const char* srv_main_thread_op_info; @@ -201,13 +188,16 @@ extern const char* srv_main_thread_op_info; /** Prefix used by MySQL to indicate pre-5.1 table name encoding */ extern const char srv_mysql50_table_name_prefix[10]; -/* The monitor thread waits on this event. */ +/** Event to signal srv_monitor_thread. Not protected by a mutex. +Set after setting srv_print_innodb_monitor. */ extern os_event_t srv_monitor_event; -/* The error monitor thread waits on this event. */ +/** Event to signal the shutdown of srv_error_monitor_thread. +Not protected by a mutex. */ extern os_event_t srv_error_event; -/** The buffer pool dump/load thread waits on this event. */ +/** Event for waking up buf_dump_thread. Not protected by a mutex. +Set on shutdown or by buf_dump_start() or buf_load_start(). */ extern os_event_t srv_buf_dump_event; /** The buffer pool resize thread waits on this event. */ @@ -328,6 +318,9 @@ extern ulong srv_undo_logs; /** Maximum size of undo tablespace. */ extern unsigned long long srv_max_undo_log_size; +extern uint srv_n_fil_crypt_threads; +extern uint srv_n_fil_crypt_threads_started; + /** Rate at which UNDO records should be purged. */ extern ulong srv_purge_rseg_truncate_frequency; @@ -460,17 +453,19 @@ extern double srv_adaptive_flushing_lwm; extern ulong srv_flushing_avg_loops; extern ulong srv_force_recovery; -#ifndef DBUG_OFF -extern ulong srv_force_recovery_crash; -#endif /* !DBUG_OFF */ -extern ulint srv_fast_shutdown; /*!< If this is 1, do not do a +extern uint srv_fast_shutdown; /*!< If this is 1, do not do a purge and index buffer merge. If this 2, do not even flush the buffer pool to data files at the shutdown: we effectively 'crash' InnoDB (but lose no committed transactions). */ + +/** Signal to shut down InnoDB (NULL if shutdown was signaled, or if +running in innodb_read_only mode, srv_read_only_mode) */ +extern volatile st_my_thread_var *srv_running; + extern ibool srv_innodb_status; extern unsigned long long srv_stats_transient_sample_pages; @@ -498,27 +493,25 @@ extern my_bool srv_print_innodb_monitor; extern my_bool srv_print_innodb_lock_monitor; extern ibool srv_print_verbose_log; -extern ibool srv_monitor_active; -extern ibool srv_error_monitor_active; +extern bool srv_monitor_active; +extern bool srv_error_monitor_active; /* TRUE during the lifetime of the buffer pool dump/load thread */ -extern ibool srv_buf_dump_thread_active; +extern bool srv_buf_dump_thread_active; /* true during the lifetime of the buffer pool resize thread */ extern bool srv_buf_resize_thread_active; /* TRUE during the lifetime of the stats thread */ -extern ibool srv_dict_stats_thread_active; +extern bool srv_dict_stats_thread_active; /* TRUE if enable log scrubbing */ extern my_bool srv_scrub_log; -/* TRUE during the lifetime of the log scrub thread */ -extern ibool srv_log_scrub_thread_active; extern ulong srv_n_spin_wait_rounds; extern ulong srv_n_free_tickets_to_enter; extern ulong srv_thread_sleep_delay; -extern ulong srv_spin_wait_delay; +extern uint srv_spin_wait_delay; extern ibool srv_priority_boost; extern ulint srv_truncated_status_writes; @@ -534,7 +527,7 @@ extern my_bool srv_purge_view_update_only_debug; /** Value of MySQL global used to disable master thread. */ extern my_bool srv_master_thread_disabled_debug; -extern ulong srv_sys_space_size_debug; +extern uint srv_sys_space_size_debug; #endif /* UNIV_DEBUG */ #define SRV_SEMAPHORE_WAIT_EXTENSION 7200 @@ -578,9 +571,6 @@ that semaphore times out in InnoDB */ #define DEFAULT_SRV_FATAL_SEMAPHORE_TIMEOUT 600 extern ulong srv_fatal_semaphore_wait_threshold; -/** Enable semaphore request instrumentation */ -extern my_bool srv_instrument_semaphores; - /** Buffer pool dump status frequence in percentages */ extern ulong srv_buf_dump_status_frequency; @@ -656,39 +646,34 @@ extern PSI_stage_info srv_stage_alter_table_read_pk_internal_sort; extern PSI_stage_info srv_stage_buffer_pool_load; #endif /* HAVE_PSI_STAGE_INTERFACE */ -#ifndef _WIN32 + /** Alternatives for the file flush option in Unix; see the InnoDB manual about what these mean */ -enum srv_unix_flush_t { - SRV_UNIX_FSYNC = 1, /*!< fsync, the default */ - SRV_UNIX_O_DSYNC, /*!< open log files in O_SYNC mode */ - SRV_UNIX_LITTLESYNC, /*!< do not call os_file_flush() +enum srv_flush_t { + SRV_FSYNC = 1, /*!< fsync, the default */ + SRV_O_DSYNC, /*!< open log files in O_SYNC mode */ + SRV_LITTLESYNC, /*!< do not call os_file_flush() when writing data files, but do flush after writing to log files */ - SRV_UNIX_NOSYNC, /*!< do not flush after writing */ - SRV_UNIX_O_DIRECT, /*!< invoke os_file_set_nocache() on + SRV_NOSYNC, /*!< do not flush after writing */ + SRV_O_DIRECT, /*!< invoke os_file_set_nocache() on data files. This implies using non-buffered IO but still using fsync, the reason for which is that some FS do not flush meta-data when unbuffered IO happens */ - SRV_UNIX_O_DIRECT_NO_FSYNC + SRV_O_DIRECT_NO_FSYNC, /*!< do not use fsync() when using direct IO i.e.: it can be set to avoid the fsync() call that we make when using SRV_UNIX_O_DIRECT. However, in this case user/DBA should be sure about the integrity of the meta-data */ + SRV_ALL_O_DIRECT_FSYNC + /*!< Traditional Windows appoach to open + all files without caching, and do FileFlushBuffers()*/ }; -extern enum srv_unix_flush_t srv_unix_file_flush_method; -#else -/** Alternatives for file i/o in Windows */ -enum srv_win_flush_t { - SRV_WIN_IO_NORMAL = 1, /*!< buffered I/O */ - SRV_WIN_IO_UNBUFFERED /*!< unbuffered I/O; this is the default */ -}; -extern enum srv_win_flush_t srv_win_file_flush_method; -#endif /* _WIN32 */ +extern enum srv_flush_t srv_file_flush_method; /** Alternatives for srv_force_recovery. Non-zero values are intended to help the user get a damaged database up so that he can dump intact @@ -727,11 +712,6 @@ enum srv_stats_method_name_enum { typedef enum srv_stats_method_name_enum srv_stats_method_name_t; -#ifdef UNIV_DEBUG -/** Force all user tables to use page compression. */ -extern ulong srv_debug_compress; -#endif /* UNIV_DEBUG */ - /** Types of threads existing in the system. */ enum srv_thread_type { SRV_NONE, /*!< None */ @@ -749,22 +729,11 @@ void srv_boot(void); /*==========*/ /*********************************************************************//** -Initializes the server. */ -void -srv_init(void); -/*==========*/ -/*********************************************************************//** Frees the data structures created in srv_init(). */ void srv_free(void); /*==========*/ /*********************************************************************//** -Initializes the synchronization primitives, memory system, and the thread -local storage. */ -void -srv_general_init(void); -/*==================*/ -/*********************************************************************//** Sets the info describing an i/o thread current state. */ void srv_set_io_thread_op_info( @@ -919,30 +888,16 @@ ulint srv_get_task_queue_length(void); /*===========================*/ -/*********************************************************************//** -Releases threads of the type given from suspension in the thread table. -NOTE! The server mutex has to be reserved by the caller! -@return number of threads released: this may be less than n if not -enough threads were suspended at the moment */ -ulint -srv_release_threads( -/*================*/ - enum srv_thread_type type, /*!< in: thread type */ - ulint n); /*!< in: number of threads to release */ - -/**********************************************************************//** -Check whether any background thread are active. If so print which thread -is active. Send the threads wakeup signal. -@return name of thread that is active or NULL */ -const char* -srv_any_background_threads_are_active(void); -/*=======================================*/ - -/**********************************************************************//** -Wakeup the purge threads. */ +/** Ensure that a given number of threads of the type given are running +(or are already terminated). +@param[in] type thread type +@param[in] n number of threads that have to run */ void -srv_purge_wakeup(void); -/*==================*/ +srv_release_threads(enum srv_thread_type type, ulint n); + +/** Wakeup the purge threads. */ +void +srv_purge_wakeup(); /** Check if tablespace is being truncated. (Ignore system-tablespace as we don't re-create the tablespace @@ -1068,20 +1023,6 @@ struct export_var_t{ int64_t innodb_page_compression_saved;/*!< Number of bytes saved by page compression */ - int64_t innodb_page_compression_trim_sect512;/*!< Number of 512b TRIM - by page compression */ - int64_t innodb_page_compression_trim_sect1024;/*!< Number of 1K TRIM - by page compression */ - int64_t innodb_page_compression_trim_sect2048;/*!< Number of 2K TRIM - by page compression */ - int64_t innodb_page_compression_trim_sect4096;/*!< Number of 4K byte TRIM - by page compression */ - int64_t innodb_page_compression_trim_sect8192;/*!< Number of 8K TRIM - by page compression */ - int64_t innodb_page_compression_trim_sect16384;/*!< Number of 16K TRIM - by page compression */ - int64_t innodb_page_compression_trim_sect32768;/*!< Number of 32K TRIM - by page compression */ int64_t innodb_index_pages_written; /*!< Number of index pages written */ int64_t innodb_non_index_pages_written; /*!< Number of non index pages @@ -1090,8 +1031,6 @@ struct export_var_t{ compressed by page compression */ int64_t innodb_page_compressed_trim_op;/*!< Number of TRIM operations induced by page compression */ - int64_t innodb_page_compressed_trim_op_saved;/*!< Number of TRIM operations - saved by page compression */ int64_t innodb_pages_page_decompressed;/*!< Number of pages decompressed by page compression */ @@ -1118,6 +1057,7 @@ struct export_var_t{ ulint innodb_scrub_page_split_failures_out_of_filespace; ulint innodb_scrub_page_split_failures_missing_index; ulint innodb_scrub_page_split_failures_unknown; + int64_t innodb_scrub_log; }; /** Thread slot in the thread table. */ diff --git a/storage/innobase/include/srv0start.h b/storage/innobase/include/srv0start.h index fb41ae50d2a..8de9e3457fc 100644 --- a/storage/innobase/include/srv0start.h +++ b/storage/innobase/include/srv0start.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation This 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,19 +34,6 @@ Created 10/10/1995 Heikki Tuuri // Forward declaration struct dict_table_t; -#ifdef DBUG_OFF -# define RECOVERY_CRASH(x) do {} while(0) -#else -# define RECOVERY_CRASH(x) do { \ - if (srv_force_recovery_crash == x) { \ - fprintf(stderr, "innodb_force_recovery_crash=%lu\n", \ - srv_force_recovery_crash); \ - fflush(stderr); \ - abort(); \ - } \ -} while (0) -#endif /* DBUG_OFF */ - /** If buffer pool is less than the size, only one buffer pool instance is used. */ #define BUF_POOL_SIZE_THRESHOLD (1024 * 1024 * 1024) @@ -79,11 +67,9 @@ are not found and the user wants. dberr_t innobase_start_or_create_for_mysql(void); /*====================================*/ -/****************************************************************//** -Shuts down the Innobase database. -@return DB_SUCCESS or error code */ -dberr_t -innobase_shutdown_for_mysql(void); +/** Shut down InnoDB. */ +void +innodb_shutdown(); /****************************************************************//** Shuts down background threads that can generate undo pages. */ @@ -111,11 +97,6 @@ srv_path_copy( const char* table_name) /*!< in: source table name */ MY_ATTRIBUTE((nonnull, warn_unused_result)); -/** -Shutdown all background threads created by InnoDB. */ -void -srv_shutdown_all_bg_threads(); - /** Get the meta-data filename from the table name for a single-table tablespace. @param[in] table table object diff --git a/storage/innobase/include/sync0arr.h b/storage/innobase/include/sync0arr.h index bc419a9be8f..23b9b746d20 100644 --- a/storage/innobase/include/sync0arr.h +++ b/storage/innobase/include/sync0arr.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2016, MariaDB Corporation. +Copyright (c) 2015, 2017, MariaDB Corporation. This 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,7 +49,7 @@ sync_array_get_and_reserve_cell( void* object, /*!< in: pointer to the object to wait for */ ulint type, /*!< in: lock request type */ const char* file, /*!< in: file where requested */ - ulint line, /*!< in: line where requested */ + unsigned line, /*!< in: line where requested */ sync_cell_t** cell); /*!< out: the cell reserved, never NULL */ /******************************************************************//** Reserves a wait array cell for waiting for an object. @@ -60,7 +60,7 @@ sync_array_reserve_cell( void* object, /*!< in: pointer to the object to wait for */ ulint type, /*!< in: lock request type */ const char* file, /*!< in: file where requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** This function should be called when a thread starts to wait on diff --git a/storage/innobase/include/sync0arr.ic b/storage/innobase/include/sync0arr.ic index a15e2176278..cd1d8e27625 100644 --- a/storage/innobase/include/sync0arr.ic +++ b/storage/innobase/include/sync0arr.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,7 +62,7 @@ sync_array_get_and_reserve_cell( void* object, /*!< in: pointer to the object to wait for */ ulint type, /*!< in: lock request type */ const char* file, /*!< in: file where requested */ - ulint line, /*!< in: line where requested */ + unsigned line, /*!< in: line where requested */ sync_cell_t** cell) /*!< out: the cell reserved, never NULL */ { sync_array_t* sync_arr = NULL; diff --git a/storage/innobase/include/sync0policy.h b/storage/innobase/include/sync0policy.h index 0eaefc7167a..1a430328f0e 100644 --- a/storage/innobase/include/sync0policy.h +++ b/storage/innobase/include/sync0policy.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -70,7 +71,7 @@ public: void locked( const Mutex* mutex, const char* filename, - ulint line) + unsigned line) UNIV_NOTHROW { m_mutex = mutex; @@ -92,7 +93,7 @@ public: m_filename = NULL; - m_line = ULINT_UNDEFINED; + m_line = 0; } /** Print information about the latch @@ -134,7 +135,7 @@ public: const char* m_filename; /** Line mumber in filename */ - ulint m_line; + unsigned m_line; /** Thread ID of the thread that own(ed) the mutex */ os_thread_id_t m_thread_id; @@ -176,7 +177,7 @@ public: void enter( const Mutex* mutex, const char* filename, - ulint line) + unsigned line) UNIV_NOTHROW; /** Called when the mutex is locked @@ -186,7 +187,7 @@ public: void locked( const Mutex* mutex, const char* filename, - ulint line) + unsigned line) UNIV_NOTHROW; /** Called when the mutex is released @@ -210,7 +211,7 @@ public: } /** @return the name of the file from the mutex was acquired */ - ulint get_enter_line() const + unsigned get_enter_line() const UNIV_NOTHROW { return(m_context.m_line); @@ -240,7 +241,7 @@ struct NoPolicy { void init(const Mutex&, latch_id_t, const char*, uint32_t) UNIV_NOTHROW { } void destroy() UNIV_NOTHROW { } - void enter(const Mutex&, const char*, ulint line) UNIV_NOTHROW { } + void enter(const Mutex&, const char*, unsigned line) UNIV_NOTHROW { } void add(uint32_t, uint32_t) UNIV_NOTHROW { } void locked(const Mutex&, const char*, ulint) UNIV_NOTHROW { } void release(const Mutex&) UNIV_NOTHROW { } @@ -293,7 +294,7 @@ public: meta.get_counter()->single_register(&m_count); - sync_file_created_register(this, filename, line); + sync_file_created_register(this, filename, uint16_t(line)); ut_d(MutexDebug::init(m_id)); } @@ -341,7 +342,7 @@ public: void enter( const MutexType& mutex, const char* filename, - ulint line) + unsigned line) UNIV_NOTHROW { ut_d(MutexDebug::enter(&mutex, filename, line)); @@ -354,7 +355,7 @@ public: void locked( const MutexType& mutex, const char* filename, - ulint line) + unsigned line) UNIV_NOTHROW { ut_d(MutexDebug::locked(&mutex, filename, line)); @@ -492,7 +493,7 @@ public: void locked( const MutexType& mutex, const char* filename, - ulint line) + unsigned line) UNIV_NOTHROW { ut_d(MutexDebug::locked(&mutex, filename, line)); @@ -513,7 +514,7 @@ public: void enter( const MutexType& mutex, const char* filename, - ulint line) + unsigned line) UNIV_NOTHROW { ut_d(MutexDebug::enter(&mutex, filename, line)); diff --git a/storage/innobase/include/sync0policy.ic b/storage/innobase/include/sync0policy.ic index f7598fe7854..f3526bbfef5 100644 --- a/storage/innobase/include/sync0policy.ic +++ b/storage/innobase/include/sync0policy.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,7 +58,7 @@ template void MutexDebug::enter( const Mutex* mutex, const char* name, - ulint line) + unsigned line) UNIV_NOTHROW { ut_ad(!is_owned()); @@ -75,7 +76,7 @@ template void MutexDebug::locked( const Mutex* mutex, const char* name, - ulint line) + unsigned line) UNIV_NOTHROW { ut_ad(!is_owned()); diff --git a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0rw.h index 9a9da2d145a..cf4a646cdcc 100644 --- a/storage/innobase/include/sync0rw.h +++ b/storage/innobase/include/sync0rw.h @@ -2,6 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -38,9 +39,6 @@ Created 9/11/1995 Heikki Tuuri #include "os0event.h" #include "ut0mutex.h" -/** Enable semaphore request instrumentation */ -extern my_bool srv_instrument_semaphores; - /** Counters for RW locks. */ struct rw_lock_stats_t { typedef ib_counter_t int64_counter_t; @@ -127,10 +125,10 @@ if MySQL performance schema is enabled and "UNIV_PFS_RWLOCK" is defined, the rwlock are instrumented with performance schema probes. */ # ifdef UNIV_DEBUG # define rw_lock_create(K, L, level) \ - rw_lock_create_func((L), (level), #L, __FILE__, __LINE__) + rw_lock_create_func((L), (level), __FILE__, __LINE__) # else /* UNIV_DEBUG */ # define rw_lock_create(K, L, level) \ - rw_lock_create_func((L), #L, __FILE__, __LINE__) + rw_lock_create_func((L), __FILE__, __LINE__) # endif /* UNIV_DEBUG */ /**************************************************************//** @@ -215,10 +213,10 @@ unlocking, not the corresponding function. */ /* Following macros point to Performance Schema instrumented functions. */ # ifdef UNIV_DEBUG # define rw_lock_create(K, L, level) \ - pfs_rw_lock_create_func((K), (L), (level), #L, __FILE__, __LINE__) + pfs_rw_lock_create_func((K), (L), (level), __FILE__, __LINE__) # else /* UNIV_DEBUG */ # define rw_lock_create(K, L, level) \ - pfs_rw_lock_create_func((K), (L), #L, __FILE__, __LINE__) + pfs_rw_lock_create_func((K), (L), __FILE__, __LINE__) # endif /* UNIV_DEBUG */ /****************************************************************** @@ -303,9 +301,8 @@ rw_lock_create_func( #ifdef UNIV_DEBUG latch_level_t level, /*!< in: level */ #endif /* UNIV_DEBUG */ - const char* cmutex_name, /*!< in: mutex name */ const char* cfile_name, /*!< in: file name where created */ - ulint cline); /*!< in: file line where created */ + unsigned cline); /*!< in: file line where created */ /******************************************************************//** Calling this function is obligatory only if the memory buffer containing the rw-lock is freed. Removes an rw-lock object from the global list. The @@ -337,7 +334,7 @@ rw_lock_s_lock_low( /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name, /*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** NOTE! Use the corresponding macro, not directly this function, except if you supply the file name and line number. Lock an rw-lock in shared mode @@ -353,7 +350,7 @@ rw_lock_s_lock_func( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** NOTE! Use the corresponding macro, not directly this function! Lock an rw-lock in exclusive mode for the current thread if the lock can be @@ -365,7 +362,7 @@ rw_lock_x_lock_func_nowait( /*=======================*/ rw_lock_t* lock, /*!< in: pointer to rw-lock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** Releases a shared mode lock. */ UNIV_INLINE @@ -394,7 +391,7 @@ rw_lock_x_lock_func( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** Low-level function for acquiring an sx lock. @return FALSE if did not succeed, TRUE if success. */ @@ -405,7 +402,7 @@ rw_lock_sx_lock_low( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** NOTE! Use the corresponding macro, not directly this function! Lock an rw-lock in SX mode for the current thread. If the rw-lock is locked @@ -422,7 +419,7 @@ rw_lock_sx_lock_func( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** Releases an exclusive mode lock. */ UNIV_INLINE @@ -637,11 +634,6 @@ struct rw_lock_t /** Line number where last time x-locked */ unsigned last_x_line:14; - const char* lock_name; - const char* file_name;/*!< File name where the lock was obtained */ - ulint line; /*!< Line where the rw-lock was locked */ - os_thread_id_t thread_id; - /** Count of os_waits. May not be accurate */ uint32_t count_os_wait; @@ -696,7 +688,7 @@ struct rw_lock_debug_t { ulint lock_type; /*!< Type of the lock: RW_LOCK_X, RW_LOCK_S, RW_LOCK_X_WAIT */ const char* file_name;/*!< File name where the lock was obtained */ - ulint line; /*!< Line where the rw-lock was locked */ + unsigned line; /*!< Line where the rw-lock was locked */ UT_LIST_NODE_T(rw_lock_debug_t) list; /*!< Debug structs are linked in a two-way list */ @@ -744,9 +736,8 @@ pfs_rw_lock_create_func( #ifdef UNIV_DEBUG latch_level_t level, /*!< in: level */ #endif /* UNIV_DEBUG */ - const char* cmutex_name, /*!< in: mutex name */ const char* cfile_name, /*!< in: file name where created */ - ulint cline); /*!< in: file line where created */ + unsigned cline); /*!< in: file line where created */ /******************************************************************//** Performance schema instrumented wrap function for rw_lock_x_lock_func() @@ -760,7 +751,7 @@ pfs_rw_lock_x_lock_func( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** Performance schema instrumented wrap function for rw_lock_x_lock_func_nowait() @@ -772,7 +763,7 @@ pfs_rw_lock_x_lock_func_nowait( /*===========================*/ rw_lock_t* lock, /*!< in: pointer to rw-lock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** Performance schema instrumented wrap function for rw_lock_s_lock_func() NOTE! Please use the corresponding macro rw_lock_s_lock(), not directly @@ -785,7 +776,7 @@ pfs_rw_lock_s_lock_func( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** Performance schema instrumented wrap function for rw_lock_s_lock_func() NOTE! Please use the corresponding macro rw_lock_s_lock(), not directly @@ -800,7 +791,7 @@ pfs_rw_lock_s_lock_low( lock will be passed to another thread to unlock */ const char* file_name, /*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** Performance schema instrumented wrap function for rw_lock_x_lock_func() NOTE! Please use the corresponding macro rw_lock_x_lock(), not directly @@ -813,7 +804,7 @@ pfs_rw_lock_x_lock_func( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** Performance schema instrumented wrap function for rw_lock_s_unlock_func() NOTE! Please use the corresponding macro rw_lock_s_unlock(), not directly @@ -854,7 +845,7 @@ pfs_rw_lock_sx_lock_func( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** Performance schema instrumented wrap function for rw_lock_sx_lock_nowait() NOTE! Please use the corresponding macro, not directly @@ -867,7 +858,7 @@ pfs_rw_lock_sx_lock_low( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** Performance schema instrumented wrap function for rw_lock_sx_unlock_func() NOTE! Please use the corresponding macro rw_lock_sx_unlock(), not directly diff --git a/storage/innobase/include/sync0rw.ic b/storage/innobase/include/sync0rw.ic index d67e26d961d..21872cc8bee 100644 --- a/storage/innobase/include/sync0rw.ic +++ b/storage/innobase/include/sync0rw.ic @@ -2,6 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -44,7 +45,7 @@ rw_lock_s_lock_spin( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ #ifdef UNIV_DEBUG /******************************************************************//** Inserts the debug information for an rw-lock. */ @@ -55,7 +56,7 @@ rw_lock_add_debug_info( ulint pass, /*!< in: pass value */ ulint lock_type, /*!< in: lock type */ const char* file_name, /*!< in: file where requested */ - ulint line); /*!< in: line where requested */ + unsigned line); /*!< in: line where requested */ /******************************************************************//** Removes a debug information struct for an rw-lock. */ void @@ -236,7 +237,7 @@ rw_lock_s_lock_low( /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name, /*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { if (!rw_lock_lock_word_decr(lock, 1, 0)) { /* Locking did not succeed */ @@ -250,14 +251,6 @@ rw_lock_s_lock_low( lock->last_s_file_name = file_name; lock->last_s_line = line; - /* - if (srv_instrument_semaphores) { - lock->thread_id = os_thread_get_curr_id(); - lock->file_name = file_name; - lock->line = line; - } - */ - return(TRUE); /* locking succeeded */ } @@ -275,7 +268,7 @@ rw_lock_s_lock_func( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { /* NOTE: As we do not know the thread ids for threads which have s-locked a latch, and s-lockers will be served only after waiting @@ -310,7 +303,7 @@ rw_lock_x_lock_func_nowait( /*=======================*/ rw_lock_t* lock, /*!< in: pointer to rw-lock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { lint oldval = X_LOCK_DECR; @@ -342,14 +335,6 @@ rw_lock_x_lock_func_nowait( ut_d(rw_lock_add_debug_info(lock, 0, RW_LOCK_X, file_name, line)); - /* - if (srv_instrument_semaphores) { - lock->thread_id = os_thread_get_curr_id(); - lock->file_name = file_name; - lock->line = line; - } - */ - lock->last_x_file_name = file_name; lock->last_x_line = line; @@ -507,9 +492,8 @@ pfs_rw_lock_create_func( # ifdef UNIV_DEBUG latch_level_t level, /*!< in: level */ # endif /* UNIV_DEBUG */ - const char* cmutex_name, /*!< in: mutex name */ const char* cfile_name, /*!< in: file name where created */ - ulint cline) /*!< in: file line where created */ + unsigned cline) /*!< in: file line where created */ { ut_d(new(lock) rw_lock_t()); @@ -521,7 +505,6 @@ pfs_rw_lock_create_func( #ifdef UNIV_DEBUG level, #endif /* UNIV_DEBUG */ - cmutex_name, cfile_name, cline); } @@ -537,7 +520,7 @@ pfs_rw_lock_x_lock_func( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { if (lock->pfs_psi != NULL) { PSI_rwlock_locker* locker; @@ -575,7 +558,7 @@ pfs_rw_lock_x_lock_func_nowait( rw_lock_t* lock, /*!< in: pointer to rw-lock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { ibool ret; @@ -634,7 +617,7 @@ pfs_rw_lock_s_lock_func( thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { if (lock->pfs_psi != NULL) { PSI_rwlock_locker* locker; @@ -669,7 +652,7 @@ pfs_rw_lock_sx_lock_func( thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { if (lock->pfs_psi != NULL) { PSI_rwlock_locker* locker; @@ -704,7 +687,7 @@ pfs_rw_lock_s_lock_low( lock will be passed to another thread to unlock */ const char* file_name, /*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { ibool ret; @@ -744,7 +727,7 @@ pfs_rw_lock_sx_lock_low( lock will be passed to another thread to unlock */ const char* file_name, /*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { ibool ret; diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h index 7fddada10f8..7157b07e9d0 100644 --- a/storage/innobase/include/sync0sync.h +++ b/storage/innobase/include/sync0sync.h @@ -136,7 +136,6 @@ extern mysql_pfs_key_t index_online_log_key; extern mysql_pfs_key_t dict_table_stats_key; extern mysql_pfs_key_t trx_sys_rw_lock_key; extern mysql_pfs_key_t hash_table_locks_key; -extern mysql_pfs_key_t master_key_id_mutex_key; #endif /* UNIV_PFS_RWLOCK */ /** Prints info of the sync system. diff --git a/storage/innobase/include/sync0types.h b/storage/innobase/include/sync0types.h index bd49e034384..736c5454711 100644 --- a/storage/innobase/include/sync0types.h +++ b/storage/innobase/include/sync0types.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This 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,11 +34,6 @@ Created 9/5/1995 Heikki Tuuri #include "ut0new.h" #include "ut0counter.h" -#if defined(UNIV_DEBUG) && !defined(UNIV_INNOCHECKSUM) -/** Set when InnoDB has invoked exit(). */ -extern bool innodb_calling_exit; -#endif /* UNIV_DEBUG && !UNIV_INNOCHECKSUM */ - #ifdef _WIN32 /** Native mutex */ typedef CRITICAL_SECTION sys_mutex_t; @@ -384,7 +380,6 @@ enum latch_id_t { LATCH_ID_HASH_TABLE_RW_LOCK, LATCH_ID_BUF_CHUNK_MAP_LATCH, LATCH_ID_SYNC_DEBUG_MUTEX, - LATCH_ID_MASTER_KEY_ID_MUTEX, LATCH_ID_SCRUB_STAT_MUTEX, LATCH_ID_DEFRAGMENT_MUTEX, LATCH_ID_BTR_DEFRAGMENT_MUTEX, @@ -437,7 +432,7 @@ struct OSMutex { void destroy() UNIV_NOTHROW { - ut_ad(innodb_calling_exit || !m_freed); + ut_ad(!m_freed); #ifdef _WIN32 DeleteCriticalSection((LPCRITICAL_SECTION) &m_mutex); #else @@ -459,7 +454,7 @@ struct OSMutex { void exit() UNIV_NOTHROW { - ut_ad(innodb_calling_exit || !m_freed); + ut_ad(!m_freed); #ifdef _WIN32 LeaveCriticalSection(&m_mutex); #else @@ -472,7 +467,7 @@ struct OSMutex { void enter() UNIV_NOTHROW { - ut_ad(innodb_calling_exit || !m_freed); + ut_ad(!m_freed); #ifdef _WIN32 EnterCriticalSection((LPCRITICAL_SECTION) &m_mutex); #else @@ -485,7 +480,7 @@ struct OSMutex { bool try_lock() UNIV_NOTHROW { - ut_ad(innodb_calling_exit || !m_freed); + ut_ad(!m_freed); #ifdef _WIN32 return(TryEnterCriticalSection(&m_mutex) != 0); #else @@ -1071,6 +1066,7 @@ struct sync_check_functor_t { virtual bool result() const = 0; }; +#ifdef BTR_CUR_HASH_ADAPT /** Functor to check whether the calling thread owns the btr search mutex. */ struct btrsea_sync_check : public sync_check_functor_t { @@ -1117,6 +1113,7 @@ private: /** If the caller owns the search latch */ const bool m_has_search_latch; }; +#endif /* BTR_CUR_HASH_ADAPT */ /** Functor to check for dictionay latching constraints. */ struct dict_sync_check : public sync_check_functor_t { diff --git a/storage/innobase/include/trx0i_s.h b/storage/innobase/include/trx0i_s.h index f588d820743..17a297527af 100644 --- a/storage/innobase/include/trx0i_s.h +++ b/storage/innobase/include/trx0i_s.h @@ -162,8 +162,10 @@ struct i_s_trx_row_t { /*!< check_foreigns in trx_t */ const char* trx_foreign_key_error; /*!< detailed_error in trx_t */ +#ifdef BTR_CUR_HASH_ADAPT ibool trx_has_search_latch; /*!< has_search_latch in trx_t */ +#endif /* BTR_CUR_HASH_ADAPT */ ulint trx_is_read_only; /*!< trx_t::read_only */ ulint trx_is_autocommit_non_locking; diff --git a/storage/innobase/include/trx0purge.h b/storage/innobase/include/trx0purge.h index 8917169dc94..ef4024d9908 100644 --- a/storage/innobase/include/trx0purge.h +++ b/storage/innobase/include/trx0purge.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -36,9 +37,6 @@ Created 3/26/1996 Heikki Tuuri #include "fil0fil.h" #include "read0types.h" -/** The global data structure coordinating a purge */ -extern trx_purge_t* purge_sys; - /** A dummy undo record used as a return value when we have a whole undo log which needs no purge */ extern trx_undo_rec_t trx_purge_dummy_rec; @@ -53,19 +51,6 @@ trx_purge_get_log_from_hist( /*========================*/ fil_addr_t node_addr); /*!< in: file address of the history list node of the log */ -/********************************************************************//** -Creates the global purge system control structure and inits the history -mutex. */ -void -trx_purge_sys_create( -/*=================*/ - ulint n_purge_threads,/*!< in: number of purge threads */ - purge_pq_t* purge_queue); /*!< in/own: UNDO log min binary heap*/ -/********************************************************************//** -Frees the global purge system control structure. */ -void -trx_purge_sys_close(void); -/*======================*/ /************************************************************************ Adds the update undo log as the first log in the history list. Removes the update undo log segment from the rseg slot if it is too big for reuse. */ @@ -119,8 +104,129 @@ purge_state_t trx_purge_state(void); /*=================*/ -// Forward declaration -struct TrxUndoRsegsIterator; +/** Rollback segements from a given transaction with trx-no +scheduled for purge. */ +class TrxUndoRsegs { +private: + typedef std::vector > + trx_rsegs_t; +public: + typedef trx_rsegs_t::iterator iterator; + + /** Default constructor */ + TrxUndoRsegs() : m_trx_no() { } + + explicit TrxUndoRsegs(trx_id_t trx_no) + : + m_trx_no(trx_no) + { + // Do nothing + } + + /** Get transaction number + @return trx_id_t - get transaction number. */ + trx_id_t get_trx_no() const + { + return(m_trx_no); + } + + /** Add rollback segment. + @param rseg rollback segment to add. */ + void push_back(trx_rseg_t* rseg) + { + m_rsegs.push_back(rseg); + } + + /** Erase the element pointed by given iterator. + @param[in] iterator iterator */ + void erase(iterator& it) + { + m_rsegs.erase(it); + } + + /** Number of registered rsegs. + @return size of rseg list. */ + ulint size() const + { + return(m_rsegs.size()); + } + + /** + @return an iterator to the first element */ + iterator begin() + { + return(m_rsegs.begin()); + } + + /** + @return an iterator to the end */ + iterator end() + { + return(m_rsegs.end()); + } + + /** Append rollback segments from referred instance to current + instance. */ + void append(const TrxUndoRsegs& append_from) + { + ut_ad(get_trx_no() == append_from.get_trx_no()); + + m_rsegs.insert(m_rsegs.end(), + append_from.m_rsegs.begin(), + append_from.m_rsegs.end()); + } + + /** Compare two TrxUndoRsegs based on trx_no. + @param elem1 first element to compare + @param elem2 second element to compare + @return true if elem1 > elem2 else false.*/ + bool operator()(const TrxUndoRsegs& lhs, const TrxUndoRsegs& rhs) + { + return(lhs.m_trx_no > rhs.m_trx_no); + } + + /** Compiler defined copy-constructor/assignment operator + should be fine given that there is no reference to a memory + object outside scope of class object.*/ + +private: + /** The rollback segments transaction number. */ + trx_id_t m_trx_no; + + /** Rollback segments of a transaction, scheduled for purge. */ + trx_rsegs_t m_rsegs; +}; + +typedef std::priority_queue< + TrxUndoRsegs, + std::vector >, + TrxUndoRsegs> purge_pq_t; + +/** +Chooses the rollback segment with the smallest trx_no. */ +struct TrxUndoRsegsIterator { + + /** Constructor */ + TrxUndoRsegsIterator(); + + /** Sets the next rseg to purge in purge_sys. + @return whether anything is to be purged */ + bool set_next(); + +private: + // Disable copying + TrxUndoRsegsIterator(const TrxUndoRsegsIterator&); + TrxUndoRsegsIterator& operator=(const TrxUndoRsegsIterator&); + + /** The current element to process */ + TrxUndoRsegs m_trx_undo_rsegs; + + /** Track the current element in m_trx_undo_rseg */ + TrxUndoRsegs::iterator m_iter; + + /** Sentinel value */ + static const TrxUndoRsegs NullElement; +}; /** This is the purge pointer/iterator. We need both the undo no and the transaction no up to which purge has parsed and applied the records. */ @@ -385,13 +491,16 @@ namespace undo { }; /* namespace undo */ /** The control structure used in the purge operation */ -struct trx_purge_t{ +class purge_sys_t +{ +public: + /** Construct the purge system. */ + purge_sys_t(); + /** Destruct the purge system. */ + ~purge_sys_t(); + sess_t* sess; /*!< System session running the purge query */ - trx_t* trx; /*!< System transaction running the - purge query: this trx is not in the - trx list of the trx system and it - never ends */ rw_lock_t latch; /*!< The latch protecting the purge view. A purge operation must acquire an x-latch here for the instant at which @@ -399,7 +508,10 @@ struct trx_purge_t{ log operation can prevent this by obtaining an s-latch here. It also protects state and running */ - os_event_t event; /*!< State signal event */ + os_event_t event; /*!< State signal event; + os_event_set() and os_event_reset() + are protected by purge_sys_t::latch + X-lock */ ulint n_stop; /*!< Counter to track number stops */ volatile bool running; /*!< true, if purge is active, we check this without the latch too */ @@ -410,7 +522,6 @@ struct trx_purge_t{ parallelized purge operation */ ReadView view; /*!< The purge will not remove undo logs which are >= this view (purge view) */ - bool view_active; /*!< true if view is active */ volatile ulint n_submitted; /*!< Count of total tasks submitted to the task queue */ volatile ulint n_completed; /*!< Count of total tasks completed */ @@ -433,11 +544,8 @@ struct trx_purge_t{ purged already accurately. */ #endif /* UNIV_DEBUG */ /*-----------------------------*/ - ibool next_stored; /*!< TRUE if the info of the next record - to purge is stored below: if yes, then - the transaction number and the undo - number of the record are stored in - purge_trx_no and purge_undo_no above */ + bool next_stored; /*!< whether rseg holds the next record + to purge */ trx_rseg_t* rseg; /*!< Rollback segment for the next undo record to purge */ ulint page_no; /*!< Page number for the next undo @@ -451,11 +559,11 @@ struct trx_purge_t{ ulint hdr_offset; /*!< Header byte offset on the page */ - TrxUndoRsegsIterator* + TrxUndoRsegsIterator rseg_iter; /*!< Iterator to get the next rseg to process */ - purge_pq_t* purge_queue; /*!< Binary min-heap, ordered on + purge_pq_t purge_queue; /*!< Binary min-heap, ordered on TrxUndoRsegs::trx_no. It is protected by the pq_mutex */ PQMutex pq_mutex; /*!< Mutex protecting purge_queue */ @@ -464,44 +572,15 @@ struct trx_purge_t{ for truncate. */ }; +/** The global data structure coordinating a purge */ +extern purge_sys_t* purge_sys; + /** Info required to purge a record */ struct trx_purge_rec_t { trx_undo_rec_t* undo_rec; /*!< Record to purge */ roll_ptr_t roll_ptr; /*!< File pointr to UNDO record */ }; -/** -Chooses the rollback segment with the smallest trx_no. */ -struct TrxUndoRsegsIterator { - - /** Constructor */ - TrxUndoRsegsIterator(trx_purge_t* purge_sys); - - /** Sets the next rseg to purge in m_purge_sys. - @return page size of the table for which the log is. - NOTE: if rseg is NULL when this function returns this means that - there are no rollback segments to purge and then the returned page - size object should not be used. */ - const page_size_t set_next(); - -private: - // Disable copying - TrxUndoRsegsIterator(const TrxUndoRsegsIterator&); - TrxUndoRsegsIterator& operator=(const TrxUndoRsegsIterator&); - - /** The purge system pointer */ - trx_purge_t* m_purge_sys; - - /** The current element to process */ - TrxUndoRsegs m_trx_undo_rsegs; - - /** Track the current element in m_trx_undo_rseg */ - TrxUndoRsegs::iterator m_iter; - - /** Sentinel value */ - static const TrxUndoRsegs NullElement; -}; - #ifndef UNIV_NONINL #include "trx0purge.ic" #endif /* UNIV_NOINL */ diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h index 90f4604043b..5fc9da9d445 100644 --- a/storage/innobase/include/trx0rec.h +++ b/storage/innobase/include/trx0rec.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -218,17 +219,6 @@ trx_undo_report_row_operation( 0 if BTR_NO_UNDO_LOG flag was specified */ MY_ATTRIBUTE((nonnull(3,4,10), warn_unused_result)); -/******************************************************************//** -Copies an undo record to heap. This function can be called if we know that -the undo log record exists. -@return own: copy of the record */ -trx_undo_rec_t* -trx_undo_get_undo_rec_low( -/*======================*/ - roll_ptr_t roll_ptr, /*!< in: roll pointer to record */ - mem_heap_t* heap, /*!< in: memory heap where copied */ - bool is_redo_rseg) /*!< in: true if redo rseg. */ - MY_ATTRIBUTE((nonnull, warn_unused_result)); /** status bit used for trx_undo_prev_version_build() */ @@ -353,16 +343,16 @@ record */ fields of the record can change */ #define TRX_UNDO_DEL_MARK_REC 14 /* delete marking of a record; fields do not change */ -#define TRX_UNDO_CMPL_INFO_MULT 16 /* compilation info is multiplied by +#define TRX_UNDO_CMPL_INFO_MULT 16U /* compilation info is multiplied by this and ORed to the type above */ -#define TRX_UNDO_UPD_EXTERN 128 /* This bit can be ORed to type_cmpl +#define TRX_UNDO_UPD_EXTERN 128U /* This bit can be ORed to type_cmpl to denote that we updated external storage fields: used by purge to free the external storage */ /* Operation type flags used in trx_undo_report_row_operation */ -#define TRX_UNDO_INSERT_OP 1 -#define TRX_UNDO_MODIFY_OP 2 +#define TRX_UNDO_INSERT_OP 1U +#define TRX_UNDO_MODIFY_OP 2U #ifndef UNIV_NONINL #include "trx0rec.ic" diff --git a/storage/innobase/include/trx0rseg.h b/storage/innobase/include/trx0rseg.h index b9cbd387a62..a3e770b4f21 100644 --- a/storage/innobase/include/trx0rseg.h +++ b/storage/innobase/include/trx0rseg.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,7 +27,6 @@ Created 3/26/1996 Heikki Tuuri #ifndef trx0rseg_h #define trx0rseg_h -#include "univ.i" #include "trx0types.h" #include "trx0sys.h" #include "fut0lst.h" @@ -35,7 +35,6 @@ Created 3/26/1996 Heikki Tuuri /** Gets a rollback segment header. @param[in] space space where placed @param[in] page_no page number of the header -@param[in] page_size page size @param[in,out] mtr mini-transaction @return rollback segment header, page x-latched */ UNIV_INLINE @@ -43,13 +42,11 @@ trx_rsegf_t* trx_rsegf_get( ulint space, ulint page_no, - const page_size_t& page_size, mtr_t* mtr); /** Gets a newly created rollback segment header. @param[in] space space where placed @param[in] page_no page number of the header -@param[in] page_size page size @param[in,out] mtr mini-transaction @return rollback segment header, page x-latched */ UNIV_INLINE @@ -57,7 +54,6 @@ trx_rsegf_t* trx_rsegf_get_new( ulint space, ulint page_no, - const page_size_t& page_size, mtr_t* mtr); /***************************************************************//** @@ -89,21 +85,21 @@ trx_rsegf_undo_find_free( /*=====================*/ trx_rsegf_t* rsegf, /*!< in: rollback segment header */ mtr_t* mtr); /*!< in: mtr */ -/******************************************************************//** -Looks for a rollback segment, based on the rollback segment id. +/** Get a rollback segment. +@param[in] id rollback segment id @return rollback segment */ UNIV_INLINE trx_rseg_t* -trx_rseg_get_on_id( -/*===============*/ - ulint id, /*!< in: rollback segment id */ - bool is_redo_rseg); /*!< in: true if redo rseg else false. */ +trx_rseg_get_on_id(ulint id) +{ + ut_a(id < TRX_SYS_N_RSEGS); + return(trx_sys->rseg_array[id]); +} /** Creates a rollback segment header. This function is called only when a new rollback segment is created in the database. @param[in] space space id -@param[in] page_size page size @param[in] max_size max size in pages @param[in] rseg_slot_no rseg id == slot number in trx sys @param[in,out] mtr mini-transaction @@ -111,27 +107,18 @@ the database. ulint trx_rseg_header_create( ulint space, - const page_size_t& page_size, ulint max_size, ulint rseg_slot_no, mtr_t* mtr); -/*********************************************************************//** -Creates the memory copies for rollback segments and initializes the -rseg array in trx_sys at a database startup. */ +/** Initialize the rollback segments in memory at database startup. */ void -trx_rseg_array_init( -/*================*/ - purge_pq_t* purge_queue); /*!< in: rseg queue */ +trx_rseg_array_init(); -/*************************************************************************** -Free's an instance of the rollback segment in memory. */ +/** Free a rollback segment in memory. */ void -trx_rseg_mem_free( -/*==============*/ - trx_rseg_t* rseg, /*!< in, own: instance to free */ - trx_rseg_t** rseg_array); /*!< out: add rseg reference to this - central array. */ +trx_rseg_mem_free(trx_rseg_t* rseg); + /********************************************************************* Creates a rollback segment. */ trx_rseg_t* @@ -175,9 +162,6 @@ struct trx_rseg_t { /** page number of the rollback segment header */ ulint page_no; - /** page size of the relevant tablespace */ - page_size_t page_size; - /** maximum allowed size in pages */ ulint max_size; diff --git a/storage/innobase/include/trx0rseg.ic b/storage/innobase/include/trx0rseg.ic index 9574be67ff8..0a33c747668 100644 --- a/storage/innobase/include/trx0rseg.ic +++ b/storage/innobase/include/trx0rseg.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -25,12 +26,10 @@ Created 3/26/1996 Heikki Tuuri #include "srv0srv.h" #include "mtr0log.h" -#include "trx0sys.h" /** Gets a rollback segment header. @param[in] space space where placed @param[in] page_no page number of the header -@param[in] page_size page size @param[in,out] mtr mini-transaction @return rollback segment header, page x-latched */ UNIV_INLINE @@ -38,14 +37,15 @@ trx_rsegf_t* trx_rsegf_get( ulint space, ulint page_no, - const page_size_t& page_size, mtr_t* mtr) { buf_block_t* block; trx_rsegf_t* header; + ut_ad(space <= srv_undo_tablespaces || space == SRV_TMP_SPACE_ID); + block = buf_page_get( - page_id_t(space, page_no), page_size, RW_X_LATCH, mtr); + page_id_t(space, page_no), univ_page_size, RW_X_LATCH, mtr); buf_block_dbg_add_level(block, SYNC_RSEG_HEADER); @@ -57,7 +57,6 @@ trx_rsegf_get( /** Gets a newly created rollback segment header. @param[in] space space where placed @param[in] page_no page number of the header -@param[in] page_size page size @param[in,out] mtr mini-transaction @return rollback segment header, page x-latched */ UNIV_INLINE @@ -65,14 +64,15 @@ trx_rsegf_t* trx_rsegf_get_new( ulint space, ulint page_no, - const page_size_t& page_size, mtr_t* mtr) { buf_block_t* block; trx_rsegf_t* header; + ut_ad(space <= srv_undo_tablespaces || space == SRV_TMP_SPACE_ID); + block = buf_page_get( - page_id_t(space, page_no), page_size, RW_X_LATCH, mtr); + page_id_t(space, page_no), univ_page_size, RW_X_LATCH, mtr); buf_block_dbg_add_level(block, SYNC_RSEG_HEADER_NEW); @@ -146,28 +146,3 @@ trx_rsegf_undo_find_free( return(ULINT_UNDEFINED); } - -/******************************************************************//** -Looks for a rollback segment, based on the rollback segment id. -@return rollback segment */ -UNIV_INLINE -trx_rseg_t* -trx_rseg_get_on_id( -/*===============*/ - ulint id, /*!< in: rollback segment id */ - bool is_redo_rseg) /*!< in: true if redo rseg else false. */ -{ - ut_a(id < TRX_SYS_N_RSEGS); - - /* If redo rseg is being requested and id falls in range of - non-redo rseg that is from slot-1....slot-srv_tmp_undo_logs then - server is being upgraded from pre-5.7.2. In such case return - rseg from pending_purge_rseg_array array. */ - if (is_redo_rseg && trx_sys_is_noredo_rseg_slot(id)) { - ut_ad(trx_sys->pending_purge_rseg_array[id] != NULL); - return(trx_sys->pending_purge_rseg_array[id]); - } - - return(trx_sys->rseg_array[id]); -} - diff --git a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sys.h index ae46d2abae9..bde1bf39627 100644 --- a/storage/innobase/include/trx0sys.h +++ b/storage/innobase/include/trx0sys.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,13 +62,9 @@ bool trx_sys_hdr_page( const page_id_t& page_id); -/*****************************************************************//** -Creates and initializes the central memory structures for the transaction -system. This is called when the database is started. -@return min binary heap of rsegs to purge */ -purge_pq_t* -trx_sys_init_at_db_start(void); -/*==========================*/ +/** Initialize the transaction system main-memory data structures. */ +void trx_sys_init_at_db_start(); + /*****************************************************************//** Creates the trx_sys instance and initializes purge_queue and mutex. */ void @@ -89,16 +86,6 @@ trx_sysf_rseg_find_free( for temp-tablespace as free slots. */ ulint nth_free_slots); /*!< in: allocate nth free slot. 0 means next free slot. */ -/***************************************************************//** -Gets the pointer in the nth slot of the rseg array. -@return pointer to rseg object, NULL if slot not in use */ -UNIV_INLINE -trx_rseg_t* -trx_sys_get_nth_rseg( -/*=================*/ - trx_sys_t* sys, /*!< in: trx system */ - ulint n, /*!< in: index of slot */ - bool is_redo_rseg); /*!< in: true if redo rseg. */ /**********************************************************************//** Gets a pointer to the transaction system file copy and x-locks its page. @return pointer to system file copy, page x-locked */ @@ -619,14 +606,6 @@ struct trx_sys_t { transactions), protected by rseg->mutex */ - trx_rseg_t* const pending_purge_rseg_array[TRX_SYS_N_RSEGS]; - /*!< Pointer array to rollback segments - between slot-1..slot-srv_tmp_undo_logs - that are now replaced by non-redo - rollback segments. We need them for - scheduling purge if any of the rollback - segment has pending records to purge. */ - TrxIdSet rw_trx_set; /*!< Mapping from transaction id to transaction instance */ diff --git a/storage/innobase/include/trx0sys.ic b/storage/innobase/include/trx0sys.ic index b07f487984c..f03535c53b3 100644 --- a/storage/innobase/include/trx0sys.ic +++ b/storage/innobase/include/trx0sys.ic @@ -62,31 +62,6 @@ trx_sys_hdr_page( && page_id.page_no() == TRX_SYS_PAGE_NO); } -/***************************************************************//** -Gets the pointer in the nth slot of the rseg array. -@return pointer to rseg object, NULL if slot not in use */ -UNIV_INLINE -trx_rseg_t* -trx_sys_get_nth_rseg( -/*=================*/ - trx_sys_t* sys, /*!< in: trx system */ - ulint n, /*!< in: index of slot */ - bool is_redo_rseg) /*!< in: true if redo rseg. */ -{ - ut_ad(n < TRX_SYS_N_RSEGS); - - /* If redo rseg is being requested and id falls in range of - non-redo rseg that is from slot-1....slot-srv_tmp_undo_logs then - server is being upgraded from pre-5.7.2. In such case return - rseg from pending_purge_rseg_array array. */ - if (is_redo_rseg && trx_sys_is_noredo_rseg_slot(n)) { - ut_ad(trx_sys->pending_purge_rseg_array[n] != NULL); - return(trx_sys->pending_purge_rseg_array[n]); - } - - return(sys->rseg_array[n]); -} - /**********************************************************************//** Gets a pointer to the transaction system header and x-latches its page. @return pointer to system header, page x-latched. */ diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 2159fc76548..c6011c13d12 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2016, 2017, MariaDB Corporation. This 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,12 +58,14 @@ class FlushObserver; /** Dummy session used currently in MySQL interface */ extern sess_t* trx_dummy_sess; -/** -Releases the search latch if trx has reserved it. -@param[in,out] trx Transaction that may own the AHI latch */ -UNIV_INLINE -void -trx_search_latch_release_if_reserved(trx_t* trx); +#ifdef BTR_CUR_HASH_ADAPT +/** Assert that the transaction is not holding the adaptive hash index latch. +@param[in] trx transaction */ +# define trx_assert_no_search_latch(trx) \ + ut_ad(!trx->has_search_latch) +#else /* BTR_CUR_HASH_ADAPT */ +# define trx_assert_no_search_latch(trx) +#endif /** Set flush observer for the transaction @param[in/out] trx transaction struct @@ -141,15 +143,9 @@ trx_disconnect_plain(trx_t* trx); void trx_disconnect_prepared(trx_t* trx); -/****************************************************************//** -Creates trx objects for transactions and initializes the trx list of -trx_sys at database start. Rollback segment and undo log lists must -already exist when this function is called, because the lists of -transactions to be rolled back or cleaned up are built based on the -undo log lists. */ +/** Initialize (resurrect) transactions at startup. */ void -trx_lists_init_at_db_start(void); -/*============================*/ +trx_lists_init_at_db_start(); /*************************************************************//** Starts the transaction if it is not yet started. */ @@ -1075,9 +1071,11 @@ struct trx_t { flush the log in trx_commit_complete_for_mysql() */ ulint duplicates; /*!< TRX_DUP_IGNORE | TRX_DUP_REPLACE */ +#ifdef BTR_CUR_HASH_ADAPT bool has_search_latch; /*!< TRUE if this trx has latched the search system latch in S-mode */ +#endif /* BTR_CUR_HASH_ADAPT */ trx_dict_op_t dict_operation; /**< @see enum trx_dict_op_t */ /* Fields protected by the srv_conc_mutex. */ @@ -1238,7 +1236,7 @@ struct trx_t { read-write. */ /*------------------------------*/ #ifdef UNIV_DEBUG - ulint start_line; /*!< Track where it was started from */ + unsigned start_line; /*!< Track where it was started from */ const char* start_file; /*!< Filename where it was started */ #endif /* UNIV_DEBUG */ @@ -1261,11 +1259,6 @@ struct trx_t { transaction branch */ trx_mod_tables_t mod_tables; /*!< List of tables that were modified by this transaction */ - /*------------------------------*/ - bool api_trx; /*!< trx started by InnoDB API */ - bool api_auto_commit;/*!< automatic commit */ - bool read_write; /*!< if read and write operation */ - /*------------------------------*/ char* detailed_error; /*!< detailed error message for last error, or empty. */ @@ -1348,8 +1341,8 @@ trx_is_started( /* Treatment of duplicate values (trx->duplicates; for example, in inserts). Multiple flags can be combined with bitwise OR. */ -#define TRX_DUP_IGNORE 1 /* duplicate rows are to be updated */ -#define TRX_DUP_REPLACE 2 /* duplicate rows are to be replaced */ +#define TRX_DUP_IGNORE 1U /* duplicate rows are to be updated */ +#define TRX_DUP_REPLACE 2U /* duplicate rows are to be replaced */ /** Commit node states */ @@ -1483,7 +1476,7 @@ private: /* Only the owning thread should release the latch. */ - trx_search_latch_release_if_reserved(trx); + trx_assert_no_search_latch(trx); trx_mutex_enter(trx); @@ -1536,7 +1529,7 @@ private: /* Only the owning thread should release the latch. */ - trx_search_latch_release_if_reserved(trx); + trx_assert_no_search_latch(trx); trx_mutex_enter(trx); diff --git a/storage/innobase/include/trx0trx.ic b/storage/innobase/include/trx0trx.ic index f0ed9b61c5a..14d519351e4 100644 --- a/storage/innobase/include/trx0trx.ic +++ b/storage/innobase/include/trx0trx.ic @@ -213,16 +213,6 @@ ok: trx->dict_operation = op; } -/** -Releases the search latch if trx has reserved it. -@param[in,out] trx Transaction that may own the AHI latch */ -UNIV_INLINE -void -trx_search_latch_release_if_reserved(trx_t* trx) -{ - ut_a(!trx->has_search_latch); -} - /********************************************************************//** Check if redo rseg is modified for insert/update. */ UNIV_INLINE diff --git a/storage/innobase/include/trx0types.h b/storage/innobase/include/trx0types.h index 37a53f900eb..8092246c7fa 100644 --- a/storage/innobase/include/trx0types.h +++ b/storage/innobase/include/trx0types.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,7 +63,7 @@ is set. */ static const ib_uint32_t TRX_FORCE_ROLLBACK_ASYNC = 1 << 30; /** Mark the transaction for forced rollback */ -static const ib_uint32_t TRX_FORCE_ROLLBACK = 1 << 31; +static const ib_uint32_t TRX_FORCE_ROLLBACK = 1U << 31; /** For masking out the above four flags */ static const ib_uint32_t TRX_FORCE_ROLLBACK_MASK = 0x1FFFFFFF; @@ -122,8 +123,6 @@ struct trx_sig_t; struct trx_rseg_t; /** Transaction undo log */ struct trx_undo_t; -/** The control structure used in the purge operation */ -struct trx_purge_t; /** Rollback command node in a query graph */ struct roll_node_t; /** Commit command node in a query graph */ @@ -173,104 +172,6 @@ typedef ib_mutex_t UndoMutex; typedef ib_mutex_t PQMutex; typedef ib_mutex_t TrxSysMutex; -/** Rollback segements from a given transaction with trx-no -scheduled for purge. */ -class TrxUndoRsegs { -private: - typedef std::vector > - trx_rsegs_t; -public: - typedef trx_rsegs_t::iterator iterator; - - /** Default constructor */ - TrxUndoRsegs() : m_trx_no() { } - - explicit TrxUndoRsegs(trx_id_t trx_no) - : - m_trx_no(trx_no) - { - // Do nothing - } - - /** Get transaction number - @return trx_id_t - get transaction number. */ - trx_id_t get_trx_no() const - { - return(m_trx_no); - } - - /** Add rollback segment. - @param rseg rollback segment to add. */ - void push_back(trx_rseg_t* rseg) - { - m_rsegs.push_back(rseg); - } - - /** Erase the element pointed by given iterator. - @param[in] iterator iterator */ - void erase(iterator& it) - { - m_rsegs.erase(it); - } - - /** Number of registered rsegs. - @return size of rseg list. */ - ulint size() const - { - return(m_rsegs.size()); - } - - /** - @return an iterator to the first element */ - iterator begin() - { - return(m_rsegs.begin()); - } - - /** - @return an iterator to the end */ - iterator end() - { - return(m_rsegs.end()); - } - - /** Append rollback segments from referred instance to current - instance. */ - void append(const TrxUndoRsegs& append_from) - { - ut_ad(get_trx_no() == append_from.get_trx_no()); - - m_rsegs.insert(m_rsegs.end(), - append_from.m_rsegs.begin(), - append_from.m_rsegs.end()); - } - - /** Compare two TrxUndoRsegs based on trx_no. - @param elem1 first element to compare - @param elem2 second element to compare - @return true if elem1 > elem2 else false.*/ - bool operator()(const TrxUndoRsegs& lhs, const TrxUndoRsegs& rhs) - { - return(lhs.m_trx_no > rhs.m_trx_no); - } - - /** Compiler defined copy-constructor/assignment operator - should be fine given that there is no reference to a memory - object outside scope of class object.*/ - -private: - /** The rollback segments transaction number. */ - trx_id_t m_trx_no; - - /** Rollback segments of a transaction, scheduled for purge. */ - trx_rsegs_t m_rsegs; -}; - -typedef std::priority_queue< - TrxUndoRsegs, - std::vector >, - TrxUndoRsegs> purge_pq_t; - typedef std::vector > trx_ids_t; /** Mapping read-write transactions from id to transaction instance, for diff --git a/storage/innobase/include/trx0undo.h b/storage/innobase/include/trx0undo.h index 1acb5b7c1ad..043d1dda22f 100644 --- a/storage/innobase/include/trx0undo.h +++ b/storage/innobase/include/trx0undo.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -98,27 +99,19 @@ trx_read_roll_ptr( /** Gets an undo log page and x-latches it. @param[in] page_id page id -@param[in] page_size page size @param[in,out] mtr mini-transaction @return pointer to page x-latched */ UNIV_INLINE page_t* -trx_undo_page_get( - const page_id_t& page_id, - const page_size_t& page_size, - mtr_t* mtr); +trx_undo_page_get(const page_id_t& page_id, mtr_t* mtr); /** Gets an undo log page and s-latches it. @param[in] page_id page id -@param[in] page_size page size @param[in,out] mtr mini-transaction @return pointer to page s-latched */ UNIV_INLINE page_t* -trx_undo_page_get_s_latched( - const page_id_t& page_id, - const page_size_t& page_size, - mtr_t* mtr); +trx_undo_page_get_s_latched(const page_id_t& page_id, mtr_t* mtr); /******************************************************************//** Returns the previous undo record on the page in the specified log, or @@ -188,7 +181,6 @@ trx_undo_get_next_rec( /** Gets the first record in an undo log. @param[in] space undo log header space -@param[in] page_size page size @param[in] page_no undo log header page number @param[in] offset undo log header offset on page @param[in] mode latching mode: RW_S_LATCH or RW_X_LATCH @@ -197,7 +189,6 @@ trx_undo_get_next_rec( trx_undo_rec_t* trx_undo_get_first_rec( ulint space, - const page_size_t& page_size, ulint page_no, ulint offset, ulint mode, @@ -455,7 +446,6 @@ struct trx_undo_t { /*-----------------------------*/ ulint space; /*!< space id where the undo log placed */ - page_size_t page_size; ulint hdr_page_no; /*!< page number of the header page in the undo log */ ulint hdr_offset; /*!< header offset of the undo log on diff --git a/storage/innobase/include/trx0undo.ic b/storage/innobase/include/trx0undo.ic index 62d9e64b13f..a0790022d7f 100644 --- a/storage/innobase/include/trx0undo.ic +++ b/storage/innobase/include/trx0undo.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -153,17 +154,13 @@ trx_read_roll_ptr( /** Gets an undo log page and x-latches it. @param[in] page_id page id -@param[in] page_size page size @param[in,out] mtr mini-transaction @return pointer to page x-latched */ UNIV_INLINE page_t* -trx_undo_page_get( - const page_id_t& page_id, - const page_size_t& page_size, - mtr_t* mtr) +trx_undo_page_get(const page_id_t& page_id, mtr_t* mtr) { - buf_block_t* block = buf_page_get(page_id, page_size, + buf_block_t* block = buf_page_get(page_id, univ_page_size, RW_X_LATCH, mtr); buf_block_dbg_add_level(block, SYNC_TRX_UNDO_PAGE); @@ -173,17 +170,13 @@ trx_undo_page_get( /** Gets an undo log page and s-latches it. @param[in] page_id page id -@param[in] page_size page size @param[in,out] mtr mini-transaction @return pointer to page s-latched */ UNIV_INLINE page_t* -trx_undo_page_get_s_latched( - const page_id_t& page_id, - const page_size_t& page_size, - mtr_t* mtr) +trx_undo_page_get_s_latched(const page_id_t& page_id, mtr_t* mtr) { - buf_block_t* block = buf_page_get(page_id, page_size, + buf_block_t* block = buf_page_get(page_id, univ_page_size, RW_S_LATCH, mtr); buf_block_dbg_add_level(block, SYNC_TRX_UNDO_PAGE); diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index f877eedf551..edb018c46e2 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -1,8 +1,8 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. Copyright (c) 2008, Google Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -184,7 +184,7 @@ command. */ #define UNIV_ENABLE_UNIT_TEST_ROW_RAW_FORMAT_INT */ -#if defined HAVE_VALGRIND +#if defined HAVE_valgrind && defined HAVE_VALGRIND # define UNIV_DEBUG_VALGRIND #endif /* HAVE_VALGRIND */ #if 0 @@ -302,7 +302,7 @@ definitions: */ /** The following alignment is used in memory allocations in memory heap management to ensure correct alignment for doubles etc. */ -#define UNIV_MEM_ALIGNMENT 8 +#define UNIV_MEM_ALIGNMENT 8U /* DATABASE VERSION CONTROL @@ -366,6 +366,12 @@ typedef enum innodb_file_formats_enum innodb_file_formats_t; #define IF_SNAPPY(A,B) B #endif +#if defined (HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE) || defined(_WIN32) +#define IF_PUNCH_HOLE(A,B) A +#else +#define IF_PUNCH_HOLE(A,B) B +#endif + /** The universal page size of the database */ #define UNIV_PAGE_SIZE ((ulint) srv_page_size) @@ -394,19 +400,19 @@ and 2 bits for flags. This limits the uncompressed page size to 16k. #define UNIV_PAGE_SSIZE_ORIG (UNIV_PAGE_SIZE_SHIFT_ORIG - 9) /** Minimum page size InnoDB currently supports. */ -#define UNIV_PAGE_SIZE_MIN (1 << UNIV_PAGE_SIZE_SHIFT_MIN) +#define UNIV_PAGE_SIZE_MIN (1U << UNIV_PAGE_SIZE_SHIFT_MIN) /** Maximum page size InnoDB currently supports. */ -#define UNIV_PAGE_SIZE_MAX (1 << UNIV_PAGE_SIZE_SHIFT_MAX) +#define UNIV_PAGE_SIZE_MAX (1U << UNIV_PAGE_SIZE_SHIFT_MAX) /** Default page size for InnoDB tablespaces. */ -#define UNIV_PAGE_SIZE_DEF (1 << UNIV_PAGE_SIZE_SHIFT_DEF) +#define UNIV_PAGE_SIZE_DEF (1U << UNIV_PAGE_SIZE_SHIFT_DEF) /** Original 16k page size for InnoDB tablespaces. */ -#define UNIV_PAGE_SIZE_ORIG (1 << UNIV_PAGE_SIZE_SHIFT_ORIG) +#define UNIV_PAGE_SIZE_ORIG (1U << UNIV_PAGE_SIZE_SHIFT_ORIG) /** Smallest compressed page size */ -#define UNIV_ZIP_SIZE_MIN (1 << UNIV_ZIP_SIZE_SHIFT_MIN) +#define UNIV_ZIP_SIZE_MIN (1U << UNIV_ZIP_SIZE_SHIFT_MIN) /** Largest compressed page size */ -#define UNIV_ZIP_SIZE_MAX (1 << UNIV_ZIP_SIZE_SHIFT_MAX) +#define UNIV_ZIP_SIZE_MAX (1U << UNIV_ZIP_SIZE_SHIFT_MAX) /** Largest possible ssize for an uncompressed page. (The convention 'ssize' is used for 'log2 minus 9' or the number of @@ -578,7 +584,7 @@ contains the sum of the following flag and the locally stored len. */ /* Tell the compiler that 'expr' probably evaluates to 'constant'. */ # define UNIV_EXPECT(expr,constant) __builtin_expect(expr, constant) /* Tell the compiler that a pointer is likely to be NULL */ -# define UNIV_LIKELY_NULL(ptr) __builtin_expect((ulint) ptr, 0) +# define UNIV_LIKELY_NULL(ptr) __builtin_expect((ptr) != 0, 0) /* Minimize cache-miss latency by moving data at addr into a cache before it is read. */ # define UNIV_PREFETCH_R(addr) __builtin_prefetch(addr, 0, 3) diff --git a/storage/innobase/include/ut0dbg.h b/storage/innobase/include/ut0dbg.h index 1a61ed84a38..7d212dfcff4 100644 --- a/storage/innobase/include/ut0dbg.h +++ b/storage/innobase/include/ut0dbg.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -43,7 +44,7 @@ ut_dbg_assertion_failed( /*====================*/ const char* expr, /*!< in: the failed assertion */ const char* file, /*!< in: source file containing the assertion */ - ulint line) /*!< in: line number of the assertion */ + unsigned line) /*!< in: line number of the assertion */ UNIV_COLD MY_ATTRIBUTE((nonnull(2), noreturn)); /** Abort execution if EXPR does not evaluate to nonzero. @@ -51,13 +52,13 @@ ut_dbg_assertion_failed( #define ut_a(EXPR) do { \ if (UNIV_UNLIKELY(!(ulint) (EXPR))) { \ ut_dbg_assertion_failed(#EXPR, \ - __FILE__, (ulint) __LINE__); \ + __FILE__, __LINE__); \ } \ } while (0) /** Abort execution. */ #define ut_error \ - ut_dbg_assertion_failed(0, __FILE__, (ulint) __LINE__) + ut_dbg_assertion_failed(0, __FILE__, __LINE__) #ifdef UNIV_DEBUG /** Debug assertion. Does nothing unless UNIV_DEBUG is defined. */ diff --git a/storage/innobase/include/ut0mem.ic b/storage/innobase/include/ut0mem.ic index 224ff98b0f4..df04449bcb9 100644 --- a/storage/innobase/include/ut0mem.ic +++ b/storage/innobase/include/ut0mem.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -118,15 +119,15 @@ ut_raw_to_hex( #define MK_UINT16(a, b) (((uint16) (a)) << 8 | (uint16) (b)) -#define UINT16_GET_A(u) ((unsigned char) ((u) >> 8)) -#define UINT16_GET_B(u) ((unsigned char) ((u) & 0xFF)) +#define UINT16_GET_A(u) ((char) ((u) >> 8)) +#define UINT16_GET_B(u) ((char) ((u) & 0xFF)) #else /* WORDS_BIGENDIAN */ #define MK_UINT16(a, b) (((uint16) (b)) << 8 | (uint16) (a)) -#define UINT16_GET_A(u) ((unsigned char) ((u) & 0xFF)) -#define UINT16_GET_B(u) ((unsigned char) ((u) >> 8)) +#define UINT16_GET_A(u) ((char) ((u) & 0xFF)) +#define UINT16_GET_B(u) ((char) ((u) >> 8)) #endif /* WORDS_BIGENDIAN */ diff --git a/storage/innobase/include/ut0mutex.h b/storage/innobase/include/ut0mutex.h index e4ab671eece..bd3603ad4d0 100644 --- a/storage/innobase/include/ut0mutex.h +++ b/storage/innobase/include/ut0mutex.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2012, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,9 +29,8 @@ Created 2012-03-24 Sunny Bains. #ifndef ut0mutex_h #define ut0mutex_h -extern ulong srv_spin_wait_delay; +extern uint srv_spin_wait_delay; extern ulong srv_n_spin_wait_rounds; -extern ulong srv_force_recovery_crash; #include "sync0policy.h" #include "ib0mutex.h" @@ -75,22 +75,25 @@ typedef BlockSyncArrayMutex ib_bpmutex_t; #error "ib_mutex_t type is unknown" #endif /* MUTEX_FUTEX */ -extern ulong srv_spin_wait_delay; +extern uint srv_spin_wait_delay; extern ulong srv_n_spin_wait_rounds; -#define mutex_create(I, M) mutex_init((M), (I), __FILE__, __LINE__) +#define mutex_create(I, M) mutex_init((M), (I), \ + __FILE__, __LINE__) -#define mutex_enter(M) (M)->enter( \ - srv_n_spin_wait_rounds, \ - srv_spin_wait_delay, \ - __FILE__, __LINE__) +#define mutex_enter_loc(M,file,line) (M)->enter( \ + uint32_t(srv_n_spin_wait_rounds), \ + uint32_t(srv_spin_wait_delay), \ + file, line) +#define mutex_enter(M) mutex_enter_loc(M, __FILE__, __LINE__) #define mutex_enter_nospin(M) (M)->enter( \ 0, \ 0, \ - __FILE__, __LINE__) + __FILE__, uint32_t(__LINE__)) -#define mutex_enter_nowait(M) (M)->trylock(__FILE__, __LINE__) +#define mutex_enter_nowait(M) (M)->trylock(__FILE__, \ + uint32_t(__LINE__)) #define mutex_exit(M) (M)->exit() diff --git a/storage/innobase/include/ut0new.h b/storage/innobase/include/ut0new.h index 6f3c06cf978..5a9022e8a77 100644 --- a/storage/innobase/include/ut0new.h +++ b/storage/innobase/include/ut0new.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2014, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -389,25 +390,21 @@ public: } /** Free a memory allocated by allocate() and trace the deallocation. - @param[in,out] ptr pointer to memory to free - @param[in] n_elements number of elements allocated (unused) */ - void - deallocate( - pointer ptr, - size_type n_elements = 0) + @param[in,out] ptr pointer to memory to free */ + void deallocate(pointer ptr, size_type) { +#ifdef UNIV_PFS_MEMORY if (ptr == NULL) { return; } -#ifdef UNIV_PFS_MEMORY ut_new_pfx_t* pfx = reinterpret_cast(ptr) - 1; deallocate_trace(pfx); free(pfx); #else - // free(ptr); + free(ptr); #endif /* UNIV_PFS_MEMORY */ } diff --git a/storage/innobase/include/ut0stage.h b/storage/innobase/include/ut0stage.h index 1cccb0b8f84..baad5cd77b4 100644 --- a/storage/innobase/include/ut0stage.h +++ b/storage/innobase/include/ut0stage.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2014, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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/ut0timer.ic b/storage/innobase/include/ut0timer.ic index 027e89c6279..46dcd0cb718 100644 --- a/storage/innobase/include/ut0timer.ic +++ b/storage/innobase/include/ut0timer.ic @@ -106,7 +106,7 @@ ut_microseconds_to_timer( /*=====================*/ ulonglong when) /*!< in: time where to calculate */ { - double ret = when; + double ret = (double)when; ret *= (double)(ut_timer.frequency); ret /= 1000000.0; return (ulonglong)ret; diff --git a/storage/innobase/innodb.cmake b/storage/innobase/innodb.cmake index 15b0f7c9c9a..880389edbf1 100644 --- a/storage/innobase/innodb.cmake +++ b/storage/innobase/innodb.cmake @@ -1,4 +1,5 @@ # Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, MariaDB Corporation. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -109,6 +110,17 @@ ENDIF() # Enable InnoDB's UNIV_DEBUG in debug builds SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DUNIV_DEBUG -DUNIV_SYNC_DEBUG") +OPTION(WITH_INNODB_AHI "Include innodb_adaptive_hash_index" ON) +OPTION(WITH_INNODB_ROOT_GUESS "Cache index root block descriptors" ON) +IF(WITH_INNODB_AHI) + ADD_DEFINITIONS(-DBTR_CUR_HASH_ADAPT -DBTR_CUR_ADAPT) + IF(NOT WITH_INNODB_ROOT_GUESS) + MESSAGE(WARNING "WITH_INNODB_AHI implies WITH_INNODB_ROOT_GUESS") + ENDIF() +ELSEIF(WITH_INNODB_ROOT_GUESS) + ADD_DEFINITIONS(-DBTR_CUR_ADAPT) +ENDIF() + OPTION(WITH_INNODB_EXTRA_DEBUG "Enable extra InnoDB debug checks" OFF) IF(WITH_INNODB_EXTRA_DEBUG) IF(NOT WITH_DEBUG) @@ -116,7 +128,9 @@ IF(WITH_INNODB_EXTRA_DEBUG) ENDIF() SET(EXTRA_DEBUG_FLAGS "") - SET(EXTRA_DEBUG_FLAGS "${EXTRA_DEBUG_FLAGS} -DUNIV_AHI_DEBUG") + IF(WITH_INNODB_AHI) + SET(EXTRA_DEBUG_FLAGS "${EXTRA_DEBUG_FLAGS} -DUNIV_AHI_DEBUG") + ENDIF() SET(EXTRA_DEBUG_FLAGS "${EXTRA_DEBUG_FLAGS} -DUNIV_DDL_DEBUG") SET(EXTRA_DEBUG_FLAGS "${EXTRA_DEBUG_FLAGS} -DUNIV_DEBUG_FILE_ACCESSES") SET(EXTRA_DEBUG_FLAGS "${EXTRA_DEBUG_FLAGS} -DUNIV_ZIP_DEBUG") @@ -135,24 +149,6 @@ IF(HAVE_NANOSLEEP) ADD_DEFINITIONS(-DHAVE_NANOSLEEP=1) ENDIF() -IF(NOT MSVC) - CHECK_C_SOURCE_RUNS( - " - #define _GNU_SOURCE - #include - #include - int main() - { - /* Ignore the return value for now. Check if the flags exist. - The return value is checked at runtime. */ - fallocate(0, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 0); - - return(0); - }" - HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE - ) -ENDIF() - IF(HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE) ADD_DEFINITIONS(-DHAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE=1) ENDIF() @@ -206,7 +202,6 @@ ENDIF() ENDIF(NOT MSVC) -CHECK_FUNCTION_EXISTS(asprintf HAVE_ASPRINTF) CHECK_FUNCTION_EXISTS(vasprintf HAVE_VASPRINTF) CHECK_CXX_SOURCE_COMPILES("struct t1{ int a; char *b; }; struct t1 c= { .a=1, .b=0 }; main() { }" HAVE_C99_INITIALIZERS) @@ -214,18 +209,6 @@ IF(HAVE_C99_INITIALIZERS) ADD_DEFINITIONS(-DHAVE_C99_INITIALIZERS) ENDIF() -IF(UNIX) -# this is needed to know which one of atomic_cas_32() or atomic_cas_64() -# to use in the source -SET(CMAKE_EXTRA_INCLUDE_FILES pthread.h) -CHECK_TYPE_SIZE(pthread_t SIZEOF_PTHREAD_T) -SET(CMAKE_EXTRA_INCLUDE_FILES) -ENDIF() - -IF(SIZEOF_PTHREAD_T) - ADD_DEFINITIONS(-DSIZEOF_PTHREAD_T=${SIZEOF_PTHREAD_T}) -ENDIF() - SET(MUTEXTYPE "event" CACHE STRING "Mutex type: event, sys or futex") IF(MUTEXTYPE MATCHES "event") @@ -235,7 +218,7 @@ ELSEIF(MUTEXTYPE MATCHES "futex" AND DEFINED HAVE_IB_LINUX_FUTEX) ELSE() ADD_DEFINITIONS(-DMUTEX_SYS) ENDIF() - + # Include directories under innobase INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/innobase/include ${CMAKE_SOURCE_DIR}/storage/innobase/handler) diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 0a178abde37..11c1bedd39a 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2014, 2016, MariaDB Corporation +Copyright (c) 2014, 2017, MariaDB Corporation. This 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 @@ -1109,7 +1109,7 @@ lock_rec_reset_nth_bit( ut_ad(i < lock->un_member.rec_lock.n_bits); byte* b = reinterpret_cast(&lock[1]) + (i >> 3); - byte mask = 1 << (i & 7); + byte mask = static_cast(1U << (i & 7)); byte bit = *b & mask; *b &= ~mask; @@ -1717,7 +1717,7 @@ RecLock::lock_alloc( /* Setup the lock attributes */ - lock->type_mode = LOCK_REC | (mode & ~LOCK_TYPE_MASK); + lock->type_mode = uint32_t(LOCK_REC | (mode & ~LOCK_TYPE_MASK)); lock_rec_t& rec_lock = lock->un_member.rec_lock; @@ -2780,12 +2780,10 @@ RecLock::jump_queue( ut_ad(conflict_lock->trx->lock.que_state == TRX_QUE_LOCK_WAIT); ut_ad(conflict_lock->trx->lock.wait_lock == conflict_lock); -#ifdef UNIV_DEBUG - ib::info() << "Granting High Priority Transaction (ID): " - << lock->trx->id << " the lock jumping over" - << " waiting Transaction (ID): " - << conflict_lock->trx->id; -#endif /* UNIV_DEBUG */ + DBUG_LOG("trx", + "Granting High Priority Transaction " + << lock->trx->id << " a lock jumping over" + << " waiting Transaction " << conflict_lock->trx->id); lock_reset_lock_and_trx_wait(lock); return(true); @@ -2954,11 +2952,12 @@ RecLock::make_trx_hit_list( /* Assert that it is not waiting for current record. */ ut_ad(trx->lock.wait_lock != next); -#ifdef UNIV_DEBUG - ib::info() << "High Priority Transaction (ID): " - << lock->trx->id << " waking up blocking" - << " transaction (ID): " << trx->id; -#endif /* UNIV_DEBUG */ + + DBUG_LOG("trx", "High Priority Transaction " + << lock->trx->id + << " waking up blocking transaction " + << trx->id); + trx->lock.was_chosen_as_deadlock_victim = true; lock_cancel_waiting_and_release(trx->lock.wait_lock); trx_mutex_exit(trx); @@ -4790,7 +4789,7 @@ lock_table( lock_mutex_enter(); DBUG_EXECUTE_IF("fatal-semaphore-timeout", - { os_thread_sleep(3600000000); }); + { os_thread_sleep(3600000000LL); }); /* We have to check if the new lock is compatible with any locks other transactions have in the table lock queue. */ @@ -7771,6 +7770,9 @@ lock_trx_handle_wait( trx_mutex_exit(trx); } + ut_ad(err == DB_SUCCESS || err == DB_LOCK_WAIT + || err == DB_DEADLOCK); + return(err); } diff --git a/storage/innobase/lock/lock0wait.cc b/storage/innobase/lock/lock0wait.cc index 1330658626e..867e596bca2 100644 --- a/storage/innobase/lock/lock0wait.cc +++ b/storage/innobase/lock/lock0wait.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2014, 2016, MariaDB Corporation. +Copyright (c) 2014, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -509,11 +509,7 @@ A thread which wakes up threads whose lock wait may have lasted too long. @return a dummy parameter */ extern "C" os_thread_ret_t -DECLARE_THREAD(lock_wait_timeout_thread)( -/*=====================================*/ - void* arg MY_ATTRIBUTE((unused))) - /* in: a dummy parameter required by - os_thread_create */ +DECLARE_THREAD(lock_wait_timeout_thread)(void*) { int64_t sig_count = 0; os_event_t event = lock_sys->timeout_event; @@ -524,8 +520,6 @@ DECLARE_THREAD(lock_wait_timeout_thread)( pfs_register_thread(srv_lock_timeout_thread_key); #endif /* UNIV_PFS_THREAD */ - lock_sys->timeout_thread_active = true; - do { srv_slot_t* slot; diff --git a/storage/innobase/log/log0crypt.cc b/storage/innobase/log/log0crypt.cc index 3a4447d2b85..dbfda8ab7c4 100644 --- a/storage/innobase/log/log0crypt.cc +++ b/storage/innobase/log/log0crypt.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (C) 2013, 2015, Google Inc. All Rights Reserved. -Copyright (C) 2014, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (C) 2014, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -22,55 +22,46 @@ Innodb log encrypt/decrypt Created 11/25/2013 Minli Zhu Google Modified Jan Lindström jan.lindstrom@mariadb.com +MDEV-11782: Rewritten for MariaDB 10.2 by Marko Mäkelä, MariaDB Corporation. *******************************************************/ #include "m_string.h" #include "log0crypt.h" -#include -#include +#include "my_crypt.h" -#include "log0log.h" +#include "log0crypt.h" #include "srv0start.h" // for srv_start_lsn #include "log0recv.h" // for recv_sys -#include "ha_prototypes.h" // IB_LOG_ - -#include "my_crypt.h" - -/* Used for debugging */ -// #define DEBUG_CRYPT 1 -#define UNENCRYPTED_KEY_VER 0 - -/* If true, enable redo log encryption. */ -extern my_bool srv_encrypt_log; - - -#include // std::sort -#include - -/* If true, enable redo log encryption. */ -UNIV_INTERN my_bool srv_encrypt_log = FALSE; -/* - Sub system type for InnoDB redo log crypto. - Set and used to validate crypto msg. -*/ -static const byte redo_log_purpose_byte = 0x02; +/** innodb_encrypt_log: whether to encrypt the redo log */ +my_bool srv_encrypt_log; +/** Redo log encryption key ID */ #define LOG_DEFAULT_ENCRYPTION_KEY 1 -/* - Store this many keys into each checkpoint info -*/ -static const size_t kMaxSavedKeys = LOG_CRYPT_MAX_ENTRIES; +typedef union { + uint32_t words[MY_AES_BLOCK_SIZE / sizeof(uint32_t)]; + byte bytes[MY_AES_BLOCK_SIZE]; +} aes_block_t; struct crypt_info_t { - ib_uint64_t checkpoint_no; /*!< checkpoint no */ + ulint checkpoint_no; /*!< checkpoint no; 32 bits */ uint key_version; /*!< mysqld key version */ - byte crypt_msg[MY_AES_BLOCK_SIZE]; - byte crypt_key[MY_AES_BLOCK_SIZE]; - byte crypt_nonce[MY_AES_BLOCK_SIZE]; + /** random string for encrypting the key */ + aes_block_t crypt_msg; + /** the secret key */ + aes_block_t crypt_key; + /** a random string for the per-block initialization vector */ + union { + uint32_t word; + byte bytes[4]; + } crypt_nonce; }; -static std::deque crypt_info; +/** The crypt info */ +static crypt_info_t info; + +/** Crypt info when upgrading from 10.1 */ +static crypt_info_t infos[5]; /*********************************************************************//** Get a log block's start lsn. @@ -93,547 +84,292 @@ Get crypt info from checkpoint. @return a crypt info or NULL if not present. */ static const crypt_info_t* -get_crypt_info( -/*===========*/ - ib_uint64_t checkpoint_no) +get_crypt_info(ulint checkpoint_no) { - size_t items = crypt_info.size(); - /* a log block only stores 4-bytes of checkpoint no */ checkpoint_no &= 0xFFFFFFFF; - for (size_t i = 0; i < items; i++) { - struct crypt_info_t* it = &crypt_info[i]; + for (unsigned i = 0; i < 5; i++) { + const crypt_info_t* it = &infos[i]; - if (it->checkpoint_no == checkpoint_no) { + if (it->key_version && it->checkpoint_no == checkpoint_no) { return it; } } /* If checkpoint contains more than one key and we did not find the correct one use the first one. */ - if (items) { - return (&crypt_info[0]); - } - - return NULL; + return infos; } -/*********************************************************************//** -Get crypt info from log block -@return a crypt info or NULL if not present. */ -static -const crypt_info_t* -get_crypt_info( -/*===========*/ - const byte* log_block) -{ - ib_uint64_t checkpoint_no = log_block_get_checkpoint_no(log_block); - return get_crypt_info(checkpoint_no); -} - -/*********************************************************************//** -Print checkpoint no from log block and all encryption keys from -checkpoints if they are present. Used for problem analysis. */ +/** Encrypt or decrypt log blocks. +@param[in,out] buf log blocks to encrypt or decrypt +@param[in] size size of the buffer, in bytes +@param[in] decrypt whether to decrypt instead of encrypting */ +UNIV_INTERN void -log_crypt_print_checkpoint_keys( -/*============================*/ - const byte* log_block) +log_crypt(byte* buf, ulint size, bool decrypt) { - ib_uint64_t checkpoint_no = log_block_get_checkpoint_no(log_block); + ut_ad(size % OS_FILE_LOG_BLOCK_SIZE == 0); + ut_a(info.key_version); - if (crypt_info.size()) { - fprintf(stderr, "InnoDB: redo log checkpoint: %lu [ chk key ]: ", (ulong) checkpoint_no); - for (size_t i = 0; i < crypt_info.size(); i++) { - struct crypt_info_t* it = &crypt_info[i]; - fprintf(stderr, "[ %lu %u ] ", - (ulong) it->checkpoint_no, - it->key_version); - } - fprintf(stderr, "\n"); - } -} - -/*********************************************************************//** -Call AES CTR to encrypt/decrypt log blocks. */ -static -Crypt_result -log_blocks_crypt( -/*=============*/ - const byte* block, /*!< in: blocks before encrypt/decrypt*/ - ulint size, /*!< in: size of block */ - byte* dst_block, /*!< out: blocks after encrypt/decrypt */ - int what, /*!< in: encrypt or decrypt*/ - const crypt_info_t* crypt_info) /*!< in: crypt info or NULL */ -{ - byte *log_block = (byte*)block; - Crypt_result rc = MY_AES_OK; uint dst_len; - byte aes_ctr_counter[MY_AES_BLOCK_SIZE]; - byte is_encrypt= what == ENCRYPTION_FLAG_ENCRYPT; - lsn_t lsn = is_encrypt ? log_sys->lsn : srv_start_lsn; + uint32_t aes_ctr_iv[MY_AES_BLOCK_SIZE / sizeof(uint32_t)]; + compile_time_assert(sizeof(uint32_t) == 4); - const uint src_len = OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_HDR_SIZE; - for (ulint i = 0; i < size ; i += OS_FILE_LOG_BLOCK_SIZE) { - ulint log_block_no = log_block_get_hdr_no(log_block); - lsn_t log_block_start_lsn = log_block_get_start_lsn( - lsn, log_block_no); +#define LOG_CRYPT_HDR_SIZE 4 - const crypt_info_t* info = crypt_info == NULL ? get_crypt_info(log_block) : - crypt_info; -#ifdef DEBUG_CRYPT - fprintf(stderr, - "%s %lu chkpt: %lu key: %u lsn: %lu\n", - is_encrypt ? "crypt" : "decrypt", - log_block_no, - log_block_get_checkpoint_no(log_block), - info ? info->key_version : 0, - log_block_start_lsn); + for (const byte* const end = buf + size; buf != end; + buf += OS_FILE_LOG_BLOCK_SIZE) { + byte dst[OS_FILE_LOG_BLOCK_SIZE - LOG_CRYPT_HDR_SIZE]; + const ulint log_block_no = log_block_get_hdr_no(buf); + + /* The log block number is not encrypted. */ + *aes_ctr_iv = +#ifdef WORDS_BIGENDIAN + ~LOG_BLOCK_FLUSH_BIT_MASK +#else + ~(LOG_BLOCK_FLUSH_BIT_MASK >> 24) #endif - /* If no key is found from checkpoint assume the log_block - to be unencrypted. If checkpoint contains the encryption key - compare log_block current checksum, if checksum matches, - block can't be encrypted. */ - if (info == NULL || - info->key_version == UNENCRYPTED_KEY_VER || - (log_block_checksum_is_ok(log_block, false) && - what == ENCRYPTION_FLAG_DECRYPT)) { - memcpy(dst_block, log_block, OS_FILE_LOG_BLOCK_SIZE); - goto next; - } + & (*reinterpret_cast(dst) + = *reinterpret_cast( + buf + LOG_BLOCK_HDR_NO)); +#if LOG_BLOCK_HDR_NO + 4 != LOG_CRYPT_HDR_SIZE +# error "LOG_BLOCK_HDR_NO has been moved; redo log format affected!" +#endif + aes_ctr_iv[1] = info.crypt_nonce.word; + mach_write_to_8(reinterpret_cast(aes_ctr_iv + 2), + log_block_get_start_lsn( + decrypt ? srv_start_lsn : log_sys->lsn, + log_block_no)); - ut_ad(what == ENCRYPTION_FLAG_DECRYPT ? !log_block_checksum_is_ok(log_block, false) : - log_block_checksum_is_ok(log_block, false)); - - // Assume log block header is not encrypted - memcpy(dst_block, log_block, LOG_BLOCK_HDR_SIZE); - - // aes_ctr_counter = nonce(3-byte) + start lsn to a log block - // (8-byte) + lbn (4-byte) + abn - // (1-byte, only 5 bits are used). "+" means concatenate. - bzero(aes_ctr_counter, MY_AES_BLOCK_SIZE); - memcpy(aes_ctr_counter, info->crypt_nonce, 3); - mach_write_to_8(aes_ctr_counter + 3, log_block_start_lsn); - mach_write_to_4(aes_ctr_counter + 11, log_block_no); - bzero(aes_ctr_counter + 15, 1); - - int rc; - rc = encryption_crypt(log_block + LOG_BLOCK_HDR_SIZE, src_len, - dst_block + LOG_BLOCK_HDR_SIZE, &dst_len, - (unsigned char*)(info->crypt_key), 16, - aes_ctr_counter, MY_AES_BLOCK_SIZE, - what | ENCRYPTION_FLAG_NOPAD, - LOG_DEFAULT_ENCRYPTION_KEY, - info->key_version); + int rc = encryption_crypt( + buf + LOG_CRYPT_HDR_SIZE, sizeof dst, dst, &dst_len, + const_cast(info.crypt_key.bytes), + sizeof info.crypt_key, + reinterpret_cast(aes_ctr_iv), sizeof aes_ctr_iv, + decrypt + ? ENCRYPTION_FLAG_DECRYPT | ENCRYPTION_FLAG_NOPAD + : ENCRYPTION_FLAG_ENCRYPT | ENCRYPTION_FLAG_NOPAD, + LOG_DEFAULT_ENCRYPTION_KEY, + info.key_version); ut_a(rc == MY_AES_OK); - ut_a(dst_len == src_len); -next: - log_block += OS_FILE_LOG_BLOCK_SIZE; - dst_block += OS_FILE_LOG_BLOCK_SIZE; - } + ut_a(dst_len == sizeof dst); + if (decrypt) { + std::ostringstream s; + ut_print_buf_hex(s, buf + LOG_CRYPT_HDR_SIZE, + OS_FILE_LOG_BLOCK_SIZE + - LOG_CRYPT_HDR_SIZE); + ib::info() << "S: " << s.str(); + std::ostringstream d; + ut_print_buf_hex(d, dst, + OS_FILE_LOG_BLOCK_SIZE + - LOG_CRYPT_HDR_SIZE); + ib::info() << "c: " << d.str(); + } - return rc; + memcpy(buf + LOG_CRYPT_HDR_SIZE, dst, sizeof dst); + } } -/*********************************************************************//** -Generate crypt key from crypt msg. -@return true if successfull, false if not. */ +/** Generate crypt key from crypt msg. +@param[in,out] info encryption key +@param[in] upgrade whether to use the key in MariaDB 10.1 format +@return whether the operation was successful */ static bool -init_crypt_key( -/*===========*/ - crypt_info_t* info) /*< in/out: crypt info */ +init_crypt_key(crypt_info_t* info, bool upgrade = false) { - if (info->key_version == UNENCRYPTED_KEY_VER) { - memset(info->crypt_key, 0, sizeof(info->crypt_key)); - memset(info->crypt_msg, 0, sizeof(info->crypt_msg)); - memset(info->crypt_nonce, 0, sizeof(info->crypt_nonce)); - return true; + byte mysqld_key[MY_AES_MAX_KEY_LENGTH]; + uint keylen = sizeof mysqld_key; + + compile_time_assert(16 == sizeof info->crypt_key); + + if (uint rc = encryption_key_get(LOG_DEFAULT_ENCRYPTION_KEY, + info->key_version, mysqld_key, + &keylen)) { + ib::error() + << "Obtaining redo log encryption key version " + << info->key_version << " failed (" << rc + << "). Maybe the key or the required encryption " + << " key management plugin was not found."; + return false; } - byte mysqld_key[MY_AES_MAX_KEY_LENGTH] = {0}; - uint keylen= sizeof(mysqld_key); - uint rc; - - rc = encryption_key_get(LOG_DEFAULT_ENCRYPTION_KEY, info->key_version, mysqld_key, &keylen); - - if (rc) { - ib::error() - << "Redo log crypto: getting mysqld crypto key " - << "from key version failed err = " << rc - << " Reason could be that requested key_version " - << info->key_version - << "is not found or required encryption " - << " key management is not found."; - return false; + if (upgrade) { + while (keylen < sizeof mysqld_key) { + mysqld_key[keylen++] = 0; + } } uint dst_len; - int err= my_aes_crypt(MY_AES_ECB, ENCRYPTION_FLAG_NOPAD|ENCRYPTION_FLAG_ENCRYPT, - info->crypt_msg, sizeof(info->crypt_msg), //src, srclen - info->crypt_key, &dst_len, //dst, &dstlen - (unsigned char*)&mysqld_key, sizeof(mysqld_key), - NULL, 0); + int err= my_aes_crypt(MY_AES_ECB, + ENCRYPTION_FLAG_NOPAD | ENCRYPTION_FLAG_ENCRYPT, + info->crypt_msg.bytes, sizeof info->crypt_msg, + info->crypt_key.bytes, &dst_len, + mysqld_key, keylen, NULL, 0); if (err != MY_AES_OK || dst_len != MY_AES_BLOCK_SIZE) { - fprintf(stderr, - "\nInnodb redo log crypto: getting redo log crypto key " - "failed err = %d len = %u.\n", err, dst_len); + ib::error() << "Getting redo log crypto key failed: err = " + << err << ", len = " << dst_len; return false; } return true; } -/*********************************************************************//** -Compare function for checkpoint numbers -@return true if first checkpoint is larger than second one */ -static +/** Initialize the redo log encryption key. +@return whether the operation succeeded */ +UNIV_INTERN bool -mysort(const crypt_info_t& i, - const crypt_info_t& j) +log_crypt_init() { - return i.checkpoint_no > j.checkpoint_no; -} + ut_ad(log_mutex_own()); + ut_ad(log_sys->is_encrypted()); -/*********************************************************************//** -Add crypt info to set if it is not already present -@return true if successfull, false if not- */ -static -bool -add_crypt_info( -/*===========*/ - crypt_info_t* info, /*!< in: crypt info */ - bool checkpoint_read)/*!< in: do we read checkpoint */ -{ - const crypt_info_t* found=NULL; - /* so that no one is searching array while we modify it */ - ut_ad(mutex_own(&(log_sys->mutex))); + info.key_version = encryption_key_get_latest_version( + LOG_DEFAULT_ENCRYPTION_KEY); - found = get_crypt_info(info->checkpoint_no); - - /* If one crypt info is found then we add a new one only if we - are reading checkpoint from the log. New checkpoints will always - use the first created crypt info. */ - if (found != NULL && - ( found->checkpoint_no == info->checkpoint_no || !checkpoint_read)) { - // already present... - return true; - } - - if (!init_crypt_key(info)) { + if (info.key_version == ENCRYPTION_KEY_VERSION_INVALID) { + ib::error() << "innodb_encrypt_log: cannot get key version"; + info.key_version = 0; return false; } - crypt_info.push_back(*info); + if (my_random_bytes(info.crypt_msg.bytes, sizeof info.crypt_msg) + != MY_AES_OK + || my_random_bytes(info.crypt_nonce.bytes, sizeof info.crypt_nonce) + != MY_AES_OK) { + ib::error() << "innodb_encrypt_log: my_random_bytes() failed"; + return false; + } - /* a log block only stores 4-bytes of checkpoint no */ - crypt_info.back().checkpoint_no &= 0xFFFFFFFF; - - // keep keys sorted, assuming that last added key will be used most - std::sort(crypt_info.begin(), crypt_info.end(), mysort); - - return true; + return init_crypt_key(&info); } -/*********************************************************************//** -Encrypt log blocks. */ -UNIV_INTERN -Crypt_result -log_blocks_encrypt( -/*===============*/ - const byte* block, /*!< in: blocks before encryption */ - const ulint size, /*!< in: size of blocks, must be multiple of a log block */ - byte* dst_block) /*!< out: blocks after encryption */ -{ - return log_blocks_crypt(block, size, dst_block, ENCRYPTION_FLAG_ENCRYPT, NULL); -} - -/*********************************************************************//** -Set next checkpoint's key version to latest one, and generate current -key. Key version 0 means no encryption. */ -UNIV_INTERN -void -log_crypt_set_ver_and_key( -/*======================*/ - ib_uint64_t next_checkpoint_no) -{ - crypt_info_t info; - info.checkpoint_no = next_checkpoint_no; - - if (!srv_encrypt_log) { - info.key_version = UNENCRYPTED_KEY_VER; - } else { - info.key_version = encryption_key_get_latest_version(LOG_DEFAULT_ENCRYPTION_KEY); - } - - if (info.key_version == UNENCRYPTED_KEY_VER) { - memset(info.crypt_msg, 0, sizeof(info.crypt_msg)); - memset(info.crypt_nonce, 0, sizeof(info.crypt_nonce)); - } else { - if (my_random_bytes(info.crypt_msg, MY_AES_BLOCK_SIZE) != MY_AES_OK) { - ib::error() - << "Redo log crypto: generate " - << MY_AES_BLOCK_SIZE - << "-byte random number as crypto msg failed."; - ut_error; - } - - if (my_random_bytes(info.crypt_nonce, MY_AES_BLOCK_SIZE) != MY_AES_OK) { - ib::error() - << "Redo log crypto: generate " - << MY_AES_BLOCK_SIZE - << "-byte random number as AES_CTR nonce failed."; - ut_error; - } - - } - - add_crypt_info(&info, false); -} - -/******************************************************** -Encrypt one or more log block before it is flushed to disk */ -UNIV_INTERN -void -log_encrypt_before_write( -/*=====================*/ - ib_uint64_t next_checkpoint_no, /*!< in: log group to be flushed */ - byte* block, /*!< in/out: pointer to a log block */ - const ulint size) /*!< in: size of log blocks */ -{ - ut_ad(size % OS_FILE_LOG_BLOCK_SIZE == 0); - - const crypt_info_t* info = get_crypt_info(next_checkpoint_no); - if (info == NULL) { - return; - } - - /* If the key is not encrypted or user has requested not to - encrypt, do not change log block. */ - if (info->key_version == UNENCRYPTED_KEY_VER || !srv_encrypt_log) { - return; - } - - byte* dst_frame = (byte*)malloc(size); - - //encrypt log blocks content - Crypt_result result = log_blocks_crypt(block, size, dst_frame, ENCRYPTION_FLAG_ENCRYPT, NULL); - - if (result == MY_AES_OK) { - ut_ad(block[0] == dst_frame[0]); - memcpy(block, dst_frame, size); - } - free(dst_frame); - - if (unlikely(result != MY_AES_OK)) { - ut_error; - } -} - -/******************************************************** -Decrypt a specified log segment after they are read from a log file to a buffer. -*/ -void -log_decrypt_after_read( -/*===================*/ - byte* frame, /*!< in/out: log segment */ - const ulint size) /*!< in: log segment size */ -{ - ut_ad(size % OS_FILE_LOG_BLOCK_SIZE == 0); - byte* dst_frame = (byte*)malloc(size); - - // decrypt log blocks content - Crypt_result result = log_blocks_crypt(frame, size, dst_frame, ENCRYPTION_FLAG_DECRYPT, NULL); - - if (result == MY_AES_OK) { - memcpy(frame, dst_frame, size); - } - free(dst_frame); - - if (unlikely(result != MY_AES_OK)) { - ut_error; - } -} - -/*********************************************************************//** -Writes the crypto (version, msg and iv) info, which has been used for -log blocks with lsn <= this checkpoint's lsn, to a log header's -checkpoint buf. */ -UNIV_INTERN -void -log_crypt_write_checkpoint_buf( -/*===========================*/ - byte* buf) /*!< in/out: checkpoint buffer */ -{ - byte *save = buf; - - // Only write kMaxSavedKeys (sort keys to remove oldest) - std::sort(crypt_info.begin(), crypt_info.end(), mysort); - while (crypt_info.size() > kMaxSavedKeys) { - crypt_info.pop_back(); - } - - bool encrypted = false; - for (size_t i = 0; i < crypt_info.size(); i++) { - const crypt_info_t & it = crypt_info[i]; - if (it.key_version != UNENCRYPTED_KEY_VER) { - encrypted = true; - break; - } - } - - if (encrypted == false) { - // if no encryption is inuse then zero out - // crypt data for upward/downward compability - memset(buf + LOG_CRYPT_VER, 0, LOG_CRYPT_SIZE); - return; - } - - ib_uint64_t checkpoint_no = mach_read_from_8(buf + LOG_CHECKPOINT_NO); - buf += LOG_CRYPT_VER; - - mach_write_to_1(buf + 0, redo_log_purpose_byte); - mach_write_to_1(buf + 1, crypt_info.size()); - buf += 2; - for (size_t i = 0; i < crypt_info.size(); i++) { - struct crypt_info_t* it = &crypt_info[i]; - mach_write_to_4(buf + 0, it->checkpoint_no); - mach_write_to_4(buf + 4, it->key_version); - memcpy(buf + 8, it->crypt_msg, MY_AES_BLOCK_SIZE); - memcpy(buf + 24, it->crypt_nonce, MY_AES_BLOCK_SIZE); - buf += LOG_CRYPT_ENTRY_SIZE; - } - -#ifdef DEBUG_CRYPT - fprintf(stderr, "write chk: %lu [ chk key ]: ", checkpoint_no); - for (size_t i = 0; i < crypt_info.size(); i++) { - struct crypt_info_t* it = &crypt_info[i]; - fprintf(stderr, "[ %lu %u ] ", - it->checkpoint_no, - it->key_version); - } - fprintf(stderr, "\n"); -#else - (void)checkpoint_no; // unused variable -#endif - ut_a((ulint)(buf - save) <= OS_FILE_LOG_BLOCK_SIZE); -} - -/*********************************************************************//** -Read the crypto (version, msg and iv) info, which has been used for -log blocks with lsn <= this checkpoint's lsn, from a log header's -checkpoint buf. */ +/** Read the MariaDB 10.1 checkpoint crypto (version, msg and iv) info. +@param[in] buf checkpoint buffer +@return whether the operation was successful */ UNIV_INTERN bool -log_crypt_read_checkpoint_buf( -/*===========================*/ - const byte* buf) { /*!< in: checkpoint buffer */ +log_crypt_101_read_checkpoint(const byte* buf) +{ + buf += 20 + 32 * 9; - buf += LOG_CRYPT_VER; - - byte scheme = buf[0]; - if (scheme != redo_log_purpose_byte) { - return true; - } - buf++; - size_t n = buf[0]; - buf++; + const size_t n = *buf++ == 2 ? std::min(unsigned(*buf++), 5U) : 0; for (size_t i = 0; i < n; i++) { - struct crypt_info_t info; - info.checkpoint_no = mach_read_from_4(buf + 0); + struct crypt_info_t& info = infos[i]; + info.checkpoint_no = mach_read_from_4(buf); info.key_version = mach_read_from_4(buf + 4); - memcpy(info.crypt_msg, buf + 8, MY_AES_BLOCK_SIZE); - memcpy(info.crypt_nonce, buf + 24, MY_AES_BLOCK_SIZE); + memcpy(info.crypt_msg.bytes, buf + 8, sizeof info.crypt_msg); + memcpy(info.crypt_nonce.bytes, buf + 24, + sizeof info.crypt_nonce); - if (!add_crypt_info(&info, true)) { + if (!init_crypt_key(&info, true)) { return false; } - buf += LOG_CRYPT_ENTRY_SIZE; + buf += 4 + 4 + 2 * MY_AES_BLOCK_SIZE; } -#ifdef DEBUG_CRYPT - fprintf(stderr, "read [ chk key ]: "); - for (size_t i = 0; i < crypt_info.size(); i++) { - struct crypt_info_t* it = &crypt_info[i]; - fprintf(stderr, "[ %lu %u ] ", - it->checkpoint_no, - it->key_version); - } - fprintf(stderr, "\n"); -#endif return true; } -/******************************************************** -Check is the checkpoint information encrypted. This check -is based on fact has log group crypt info and based -on this crypt info was the key version different from -unencrypted key version. There is no realible way to -distinguish encrypted log block from corrupted log block, -but if log block corruption is found this function is -used to find out if log block is maybe encrypted but -encryption key, key management plugin or encryption -algorithm does not match. -@return TRUE, if log block may be encrypted */ +/** Decrypt a MariaDB 10.1 redo log block. +@param[in,out] buf log block +@return whether the decryption was successful */ UNIV_INTERN -ibool -log_crypt_block_maybe_encrypted( -/*============================*/ - const byte* log_block, /*!< in: log block */ - log_crypt_err_t* err_info) /*!< out: error info */ +bool +log_crypt_101_read_block(byte* buf) { - ibool maybe_encrypted = FALSE; - const crypt_info_t* crypt_info; + ut_ad(log_block_calc_checksum_format_0(buf) + != log_block_get_checksum(buf)); + const crypt_info_t* info = get_crypt_info( + log_block_get_checkpoint_no(buf)); - *err_info = LOG_UNENCRYPTED; - crypt_info = get_crypt_info(log_block); - - if (crypt_info && - crypt_info->key_version != UNENCRYPTED_KEY_VER) { - byte mysqld_key[MY_AES_BLOCK_SIZE] = {0}; - uint keylen= sizeof(mysqld_key); - - /* Log block contains crypt info and based on key - version block could be encrypted. */ - *err_info = LOG_DECRYPT_MAYBE_FAILED; - maybe_encrypted = TRUE; - - if (encryption_key_get(LOG_DEFAULT_ENCRYPTION_KEY, - crypt_info->key_version, mysqld_key, &keylen)) { - *err_info = LOG_CRYPT_KEY_NOT_FOUND; - } + if (!info || info->key_version == 0) { + return false; } - return (maybe_encrypted); + byte dst[OS_FILE_LOG_BLOCK_SIZE]; + uint dst_len; + byte aes_ctr_iv[MY_AES_BLOCK_SIZE]; + + const uint src_len = OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_HDR_SIZE; + + ulint log_block_no = log_block_get_hdr_no(buf); + + /* The log block header is not encrypted. */ + memcpy(dst, buf, LOG_BLOCK_HDR_SIZE); + + memcpy(aes_ctr_iv, info->crypt_nonce.bytes, 3); + mach_write_to_8(aes_ctr_iv + 3, + log_block_get_start_lsn(srv_start_lsn, log_block_no)); + memcpy(aes_ctr_iv + 11, buf, 4); + aes_ctr_iv[11] &= ~(LOG_BLOCK_FLUSH_BIT_MASK >> 24); + aes_ctr_iv[15] = 0; + + int rc = encryption_crypt(buf + LOG_BLOCK_HDR_SIZE, src_len, + dst + LOG_BLOCK_HDR_SIZE, &dst_len, + const_cast(info->crypt_key.bytes), + MY_AES_BLOCK_SIZE, + aes_ctr_iv, MY_AES_BLOCK_SIZE, + ENCRYPTION_FLAG_DECRYPT + | ENCRYPTION_FLAG_NOPAD, + LOG_DEFAULT_ENCRYPTION_KEY, + info->key_version); + + if (rc != MY_AES_OK || dst_len != src_len + || log_block_calc_checksum_format_0(dst) + != log_block_get_checksum(dst)) { + return false; + } + + memcpy(buf, dst, sizeof dst); + return true; } -/******************************************************** -Print crypt error message to error log */ +/** Add the encryption information to a redo log checkpoint buffer. +@param[in,out] buf checkpoint buffer */ UNIV_INTERN void -log_crypt_print_error( -/*==================*/ - log_crypt_err_t err_info) /*!< out: error info */ +log_crypt_write_checkpoint_buf(byte* buf) { - switch(err_info) { - case LOG_CRYPT_KEY_NOT_FOUND: - ib::error() - << "Redo log crypto: getting mysqld crypto key " - << "from key version failed. Reason could be that " - << "requested key version is not found or required " - << "encryption key management plugin is not found."; - break; - case LOG_DECRYPT_MAYBE_FAILED: - ib::error() - << "Redo log crypto: failed to decrypt log block. " - << "Reason could be that requested key version is " - << "not found, required encryption key management " - << "plugin is not found or configured encryption " - << "algorithm and/or method does not match."; - break; - default: - ut_error; /* Real bug */ - } + ut_ad(info.key_version); + compile_time_assert(16 == sizeof info.crypt_msg); + compile_time_assert(LOG_CHECKPOINT_CRYPT_MESSAGE + - LOG_CHECKPOINT_CRYPT_NONCE + == sizeof info.crypt_nonce); + + memcpy(buf + LOG_CHECKPOINT_CRYPT_MESSAGE, info.crypt_msg.bytes, + sizeof info.crypt_msg); + memcpy(buf + LOG_CHECKPOINT_CRYPT_NONCE, info.crypt_nonce.bytes, + sizeof info.crypt_nonce); + mach_write_to_4(buf + LOG_CHECKPOINT_CRYPT_KEY, info.key_version); +} + +/** Read the checkpoint crypto (version, msg and iv) info. +@param[in] buf checkpoint buffer +@return whether the operation was successful */ +UNIV_INTERN +bool +log_crypt_read_checkpoint_buf(const byte* buf) +{ + info.checkpoint_no = mach_read_from_4(buf + (LOG_CHECKPOINT_NO + 4)); + info.key_version = mach_read_from_4(buf + LOG_CHECKPOINT_CRYPT_KEY); + +#if MY_AES_BLOCK_SIZE != 16 +# error "MY_AES_BLOCK_SIZE != 16; redo log checkpoint format affected" +#endif + compile_time_assert(16 == sizeof info.crypt_msg); + compile_time_assert(LOG_CHECKPOINT_CRYPT_MESSAGE + - LOG_CHECKPOINT_CRYPT_NONCE + == sizeof info.crypt_nonce); + + memcpy(info.crypt_msg.bytes, buf + LOG_CHECKPOINT_CRYPT_MESSAGE, + sizeof info.crypt_msg); + memcpy(info.crypt_nonce.bytes, buf + LOG_CHECKPOINT_CRYPT_NONCE, + sizeof info.crypt_nonce); + + return init_crypt_key(&info); } diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc index 979a40e22fe..1a122b815a6 100644 --- a/storage/innobase/log/log0log.cc +++ b/storage/innobase/log/log0log.cc @@ -2,7 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Google Inc. -Copyright (C) 2014, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2014, 2017, MariaDB Corporation. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -40,10 +40,11 @@ Created 12/9/1995 Heikki Tuuri #include "log0log.ic" #endif +#include "log0crypt.h" #include "mem0mem.h" #include "buf0buf.h" #include "buf0flu.h" -#include "srv0srv.h" +#include "lock0lock.h" #include "log0recv.h" #include "fil0fil.h" #include "dict0boot.h" @@ -56,9 +57,6 @@ Created 12/9/1995 Heikki Tuuri #include "srv0mon.h" #include "sync0sync.h" -/* Used for debugging */ -// #define DEBUG_CRYPT 1 - /* General philosophy of InnoDB redo-logs: @@ -135,6 +133,15 @@ the previous */ #define LOG_UNLOCK_NONE_FLUSHED_LOCK 1 #define LOG_UNLOCK_FLUSH_LOCK 2 +/** Event to wake up log_scrub_thread */ +os_event_t log_scrub_event; +/** Whether log_scrub_thread is active */ +bool log_scrub_thread_active; + +extern "C" UNIV_INTERN +os_thread_ret_t +DECLARE_THREAD(log_scrub_thread)(void*); + /******************************************************//** Completes a checkpoint write i/o to a log file. */ static @@ -860,6 +867,12 @@ log_init(void) MONITOR_SET(MONITOR_LSN_CHECKPOINT_AGE, log_sys->lsn - log_sys->last_checkpoint_lsn); + + log_scrub_thread_active = !srv_read_only_mode && srv_scrub_log; + if (log_scrub_thread_active) { + log_scrub_event = os_event_create("log_scrub_event"); + os_thread_create(log_scrub_thread, NULL, NULL); + } } /******************************************************************//** @@ -883,7 +896,9 @@ log_group_init( group->id = id; group->n_files = n_files; - group->format = LOG_HEADER_FORMAT_CURRENT; + group->format = srv_encrypt_log + ? LOG_HEADER_FORMAT_CURRENT | LOG_HEADER_FORMAT_ENCRYPTED + : LOG_HEADER_FORMAT_CURRENT; group->file_size = file_size; group->space_id = space_id; group->state = LOG_GROUP_OK; @@ -927,20 +942,18 @@ log_io_complete( /* It was a checkpoint write */ group = (log_group_t*)((ulint) group - 1); -#ifdef _WIN32 - fil_flush(group->space_id); -#else - switch (srv_unix_file_flush_method) { - case SRV_UNIX_O_DSYNC: - case SRV_UNIX_NOSYNC: + switch (srv_file_flush_method) { + case SRV_O_DSYNC: + case SRV_NOSYNC: break; - case SRV_UNIX_FSYNC: - case SRV_UNIX_LITTLESYNC: - case SRV_UNIX_O_DIRECT: - case SRV_UNIX_O_DIRECT_NO_FSYNC: + case SRV_FSYNC: + case SRV_LITTLESYNC: + case SRV_O_DIRECT: + case SRV_O_DIRECT_NO_FSYNC: + case SRV_ALL_O_DIRECT_FSYNC: fil_flush(group->space_id); } -#endif /* _WIN32 */ + DBUG_PRINT("ib_log", ("checkpoint info written to group %u", unsigned(group->id))); @@ -972,11 +985,13 @@ log_group_file_header_flush( ut_ad(!recv_no_log_write); ut_ad(group->id == 0); ut_a(nth_file < group->n_files); + ut_ad((group->format & ~LOG_HEADER_FORMAT_ENCRYPTED) + == LOG_HEADER_FORMAT_CURRENT); buf = *(group->file_header_bufs + nth_file); memset(buf, 0, OS_FILE_LOG_BLOCK_SIZE); - mach_write_to_4(buf + LOG_HEADER_FORMAT, LOG_HEADER_FORMAT_CURRENT); + mach_write_to_4(buf + LOG_HEADER_FORMAT, group->format); mach_write_to_8(buf + LOG_HEADER_START_LSN, start_lsn); strcpy(reinterpret_cast(buf) + LOG_HEADER_CREATOR, LOG_HEADER_CREATOR_CURRENT); @@ -1004,7 +1019,7 @@ log_group_file_header_flush( page_id_t(group->space_id, page_no), univ_page_size, (ulint) (dest_offset % univ_page_size.physical()), - OS_FILE_LOG_BLOCK_SIZE, buf, group, NULL); + OS_FILE_LOG_BLOCK_SIZE, buf, group); srv_stats.os_log_pending_writes.dec(); } @@ -1100,6 +1115,10 @@ loop: || log_block_get_hdr_no(buf) == log_block_convert_lsn_to_no(start_lsn)); + if (log_sys->is_encrypted()) { + log_crypt(buf, write_len); + } + /* Calculate the checksums for each log block and write them to the trailer fields of the log blocks */ @@ -1120,8 +1139,6 @@ loop: ut_a(next_offset / UNIV_PAGE_SIZE <= ULINT_MAX); - log_encrypt_before_write(log_sys->next_checkpoint_no, - buf, write_len); const ulint page_no = (ulint) (next_offset / univ_page_size.physical()); @@ -1129,7 +1146,7 @@ loop: page_id_t(group->space_id, page_no), univ_page_size, (ulint) (next_offset % UNIV_PAGE_SIZE), write_len, buf, - group, NULL); + group); srv_stats.os_log_pending_writes.dec(); @@ -1147,26 +1164,30 @@ loop: } } -/** Flush the log has been written to the log file. */ +/** Flush the recently written changes to the log file. +and invoke log_mutex_enter(). */ static void log_write_flush_to_disk_low() { + /* FIXME: This is not holding log_sys->mutex while + calling os_event_set()! */ ut_a(log_sys->n_pending_flushes == 1); /* No other threads here */ -#ifndef _WIN32 - bool do_flush = srv_unix_file_flush_method != SRV_UNIX_O_DSYNC; -#else - bool do_flush = true; -#endif + bool do_flush = srv_file_flush_method != SRV_O_DSYNC; + + if (do_flush) { + fil_flush(SRV_LOG_SPACE_FIRST_ID); + } + + MONITOR_DEC(MONITOR_PENDING_LOG_FLUSH); + + log_mutex_enter(); if (do_flush) { - log_group_t* group = UT_LIST_GET_FIRST(log_sys->log_groups); - fil_flush(group->space_id); log_sys->flushed_to_disk_lsn = log_sys->current_flush_lsn; } log_sys->n_pending_flushes--; - MONITOR_DEC(MONITOR_PENDING_LOG_FLUSH); os_event_set(log_sys->flush_event); } @@ -1259,16 +1280,6 @@ loop: return; } -#ifdef _WIN32 - /* write requests during fil_flush() might not be good for Windows */ - if (log_sys->n_pending_flushes > 0 - || !os_event_is_set(log_sys->flush_event)) { - log_write_mutex_exit(); - os_event_wait(log_sys->flush_event); - goto loop; - } -#endif /* _WIN32 */ - /* If it is a write call we should just go ahead and do it as we checked that write_lsn is not where we'd like it to be. If we have to flush as well then we check if there is a @@ -1321,6 +1332,7 @@ loop: /* Nothing to write, flush only */ log_mutex_exit_all(); log_write_flush_to_disk_low(); + log_mutex_exit(); return; } } @@ -1386,13 +1398,12 @@ loop: srv_stats.log_padded.add(pad_size); log_sys->write_lsn = write_lsn; -#ifndef _WIN32 - if (srv_unix_file_flush_method == SRV_UNIX_O_DSYNC) { + + if (srv_file_flush_method == SRV_O_DSYNC) { /* O_SYNC means the OS did not buffer the log file at all: so we have also flushed to disk what we have written */ log_sys->flushed_to_disk_lsn = log_sys->write_lsn; } -#endif /* !_WIN32 */ log_write_mutex_exit(); @@ -1400,6 +1411,7 @@ loop: log_write_flush_to_disk_low(); ib_uint64_t write_lsn = log_sys->write_lsn; ib_uint64_t flush_lsn = log_sys->flushed_to_disk_lsn; + log_mutex_exit(); innobase_mysql_log_notify(write_lsn, flush_lsn); } @@ -1487,7 +1499,6 @@ log_preflush_pool_modified_pages( bool success; if (recv_recovery_on) { - dberr_t err = DB_SUCCESS; /* If the recovery is running, we must first apply all log records to their respective file pages to get the right modify lsn values to these pages: otherwise, there @@ -1496,13 +1507,7 @@ log_preflush_pool_modified_pages( not know how up-to-date the disk version of the database is, and we could not make a new checkpoint on the basis of the info on the buffer pool only. */ - - err = recv_apply_hashed_log_recs(TRUE); - - if (err != DB_SUCCESS) { - ib::warn() << "recv_apply_hashed_log_recs failed err: " - << err << " file: " << __FILE__ << " line: " << __LINE__; - } + recv_apply_hashed_log_recs(true); } if (new_oldest == LSN_MAX @@ -1584,22 +1589,22 @@ log_io_complete_checkpoint(void) log_mutex_exit(); } -/******************************************************//** -Writes the checkpoint info to a log group header. */ +/** Write checkpoint info to the log header. +@param[in,out] group redo log +@param[in] end_lsn start LSN of the MLOG_CHECKPOINT mini-transaction */ static void -log_group_checkpoint( -/*=================*/ - log_group_t* group) /*!< in: log group */ +log_group_checkpoint(log_group_t* group, lsn_t end_lsn) { lsn_t lsn_offset; byte* buf; ut_ad(!srv_read_only_mode); ut_ad(log_mutex_own()); -#if LOG_CHECKPOINT_SIZE > OS_FILE_LOG_BLOCK_SIZE -# error "LOG_CHECKPOINT_SIZE > OS_FILE_LOG_BLOCK_SIZE" -#endif + ut_ad(end_lsn == 0 || end_lsn >= log_sys->next_checkpoint_lsn); + ut_ad(end_lsn <= log_sys->lsn); + ut_ad(end_lsn + SIZE_OF_MLOG_CHECKPOINT <= log_sys->lsn + || srv_shutdown_state != SRV_SHUTDOWN_NONE); DBUG_PRINT("ib_log", ("checkpoint " UINT64PF " at " LSN_PF " written to group " ULINTPF, @@ -1613,12 +1618,15 @@ log_group_checkpoint( mach_write_to_8(buf + LOG_CHECKPOINT_NO, log_sys->next_checkpoint_no); mach_write_to_8(buf + LOG_CHECKPOINT_LSN, log_sys->next_checkpoint_lsn); - log_crypt_write_checkpoint_buf(buf); + if (log_sys->is_encrypted()) { + log_crypt_write_checkpoint_buf(buf); + } lsn_offset = log_group_calc_lsn_offset(log_sys->next_checkpoint_lsn, group); mach_write_to_8(buf + LOG_CHECKPOINT_OFFSET, lsn_offset); mach_write_to_8(buf + LOG_CHECKPOINT_LOG_BUF_SIZE, log_sys->buf_size); + mach_write_to_8(buf + LOG_CHECKPOINT_END_LSN, end_lsn); log_block_set_checksum(buf, log_block_calc_checksum_crc32(buf)); @@ -1649,7 +1657,7 @@ log_group_checkpoint( (log_sys->next_checkpoint_no & 1) ? LOG_CHECKPOINT_2 : LOG_CHECKPOINT_1, OS_FILE_LOG_BLOCK_SIZE, - buf, (byte*) group + 1, NULL); + buf, (byte*) group + 1); ut_ad(((ulint) group & 0x1UL) == 0); } @@ -1671,36 +1679,23 @@ log_group_header_read( fil_io(IORequestLogRead, true, page_id_t(group->space_id, header / univ_page_size.physical()), univ_page_size, header % univ_page_size.physical(), - OS_FILE_LOG_BLOCK_SIZE, log_sys->checkpoint_buf, NULL, NULL); + OS_FILE_LOG_BLOCK_SIZE, log_sys->checkpoint_buf, NULL); } /** Write checkpoint info to the log header and invoke log_mutex_exit(). -@param[in] sync whether to wait for the write to complete */ +@param[in] sync whether to wait for the write to complete +@param[in] end_lsn start LSN of the MLOG_CHECKPOINT mini-transaction */ void -log_write_checkpoint_info( - bool sync) +log_write_checkpoint_info(bool sync, lsn_t end_lsn) { - log_group_t* group; - ut_ad(log_mutex_own()); + ut_ad(!srv_read_only_mode); - if (!srv_read_only_mode) { - for (group = UT_LIST_GET_FIRST(log_sys->log_groups); - group; - group = UT_LIST_GET_NEXT(log_groups, group)) { + for (log_group_t* group = UT_LIST_GET_FIRST(log_sys->log_groups); + group; + group = UT_LIST_GET_NEXT(log_groups, group)) { - log_group_checkpoint(group); - } - } - - /* generate key version and key used to encrypt future blocks, - * - * NOTE: the +1 is as the next_checkpoint_no will be updated once - * the checkpoint info has been written and THEN blocks will be encrypted - * with new key - */ - if (srv_encrypt_log) { - log_crypt_set_ver_and_key(log_sys->next_checkpoint_no + 1); + log_group_checkpoint(group, end_lsn); } log_mutex_exit(); @@ -1757,28 +1752,20 @@ log_checkpoint( os_thread_sleep(360000000);); if (recv_recovery_is_on()) { - dberr_t err = DB_SUCCESS; - - err = recv_apply_hashed_log_recs(TRUE); - - if (err != DB_SUCCESS) { - ib::warn() << "recv_apply_hashed_log_recs failed err: " - << err << " file: " << __FILE__ << " line: " << __LINE__; - } + recv_apply_hashed_log_recs(true); } -#ifndef _WIN32 - switch (srv_unix_file_flush_method) { - case SRV_UNIX_NOSYNC: + switch (srv_file_flush_method) { + case SRV_NOSYNC: break; - case SRV_UNIX_O_DSYNC: - case SRV_UNIX_FSYNC: - case SRV_UNIX_LITTLESYNC: - case SRV_UNIX_O_DIRECT: - case SRV_UNIX_O_DIRECT_NO_FSYNC: + case SRV_O_DSYNC: + case SRV_FSYNC: + case SRV_LITTLESYNC: + case SRV_O_DIRECT: + case SRV_O_DIRECT_NO_FSYNC: + case SRV_ALL_O_DIRECT_FSYNC: fil_flush_file_spaces(FIL_TYPE_TABLESPACE); } -#endif /* !_WIN32 */ log_mutex_enter(); @@ -1814,12 +1801,13 @@ log_checkpoint( threads will be blocked, and no pages can be added to the flush lists. */ lsn_t flush_lsn = oldest_lsn; + const lsn_t end_lsn = log_sys->lsn; const bool do_write = srv_shutdown_state == SRV_SHUTDOWN_NONE - || flush_lsn != log_sys->lsn; + || flush_lsn != end_lsn; if (fil_names_clear(flush_lsn, do_write)) { - ut_ad(log_sys->lsn >= flush_lsn + SIZE_OF_MLOG_CHECKPOINT); + ut_ad(log_sys->lsn >= end_lsn + SIZE_OF_MLOG_CHECKPOINT); flush_lsn = log_sys->lsn; } @@ -1865,7 +1853,7 @@ log_checkpoint( } log_sys->next_checkpoint_lsn = oldest_lsn; - log_write_checkpoint_info(sync); + log_write_checkpoint_info(sync, end_lsn); ut_ad(!log_mutex_own()); return(true); @@ -1979,78 +1967,6 @@ loop: } } -/******************************************************//** -Reads a specified log segment to a buffer. */ -void -log_group_read_log_seg( -/*===================*/ - byte* buf, /*!< in: buffer where to read */ - log_group_t* group, /*!< in: log group */ - lsn_t start_lsn, /*!< in: read area start */ - lsn_t end_lsn) /*!< in: read area end */ -{ - ulint len; - lsn_t source_offset; - - ut_ad(log_mutex_own()); - -loop: - source_offset = log_group_calc_lsn_offset(start_lsn, group); - - ut_a(end_lsn - start_lsn <= ULINT_MAX); - len = (ulint) (end_lsn - start_lsn); - - ut_ad(len != 0); - - if ((source_offset % group->file_size) + len > group->file_size) { - - /* If the above condition is true then len (which is ulint) - is > the expression below, so the typecast is ok */ - len = (ulint) (group->file_size - - (source_offset % group->file_size)); - } - - log_sys->n_log_ios++; - - MONITOR_INC(MONITOR_LOG_IO); - - ut_a(source_offset / UNIV_PAGE_SIZE <= ULINT_MAX); - - const ulint page_no - = (ulint) (source_offset / univ_page_size.physical()); - - fil_io(IORequestLogRead, true, - page_id_t(group->space_id, page_no), - univ_page_size, - (ulint) (source_offset % univ_page_size.physical()), - len, buf, NULL, NULL); - -#ifdef DEBUG_CRYPT - fprintf(stderr, "BEFORE DECRYPT: block: %lu checkpoint: %lu %.8lx %.8lx offset %lu\n", - log_block_get_hdr_no(buf), - log_block_get_checkpoint_no(buf), - log_block_calc_checksum(buf), - log_block_get_checksum(buf), source_offset); -#endif - - log_decrypt_after_read(buf, len); - -#ifdef DEBUG_CRYPT - fprintf(stderr, "AFTER DECRYPT: block: %lu checkpoint: %lu %.8lx %.8lx\n", - log_block_get_hdr_no(buf), - log_block_get_checkpoint_no(buf), - log_block_calc_checksum(buf), - log_block_get_checksum(buf)); -#endif - start_lsn += len; - buf += len; - - if (start_lsn != end_lsn) { - - goto loop; - } -} - /** Checks that there is enough free space in the log to start a new query step. Flushes the log buffer or makes a new checkpoint if necessary. NOTE: this @@ -2082,11 +1998,6 @@ logs_empty_and_mark_files_at_shutdown(void) { lsn_t lsn; ulint count = 0; - ulint total_trx; - ulint pending_io; - enum srv_thread_type active_thd; - const char* thread_name; - dberr_t err = DB_SUCCESS; ib::info() << "Starting shutdown..."; @@ -2101,37 +2012,36 @@ logs_empty_and_mark_files_at_shutdown(void) srv_shutdown_state = SRV_SHUTDOWN_CLEANUP; loop: + ut_ad(lock_sys || !srv_was_started); + ut_ad(log_sys || !srv_was_started); + ut_ad(fil_system || !srv_was_started); + os_event_set(srv_buf_resize_event); + + if (!srv_read_only_mode) { + os_event_set(srv_error_event); + os_event_set(srv_monitor_event); + os_event_set(srv_buf_dump_event); + if (lock_sys) { + os_event_set(lock_sys->timeout_event); + } + if (dict_stats_event) { + os_event_set(dict_stats_event); + } else { + ut_ad(!srv_dict_stats_thread_active); + } + } os_thread_sleep(100000); count++; - /* We need the monitor threads to stop before we proceed with - a shutdown. */ - - thread_name = srv_any_background_threads_are_active(); - - if (thread_name != NULL) { - /* Print a message every 60 seconds if we are waiting - for the monitor thread to exit. Master and worker - threads check will be done later. */ - - if (srv_print_verbose_log && count > 600) { - ib::info() << "Waiting for " << thread_name - << " to exit"; - count = 0; - } - - goto loop; - } - /* Check that there are no longer transactions, except for PREPARED ones. We need this wait even for the 'very fast' shutdown, because the InnoDB layer may have committed or prepared transactions and we don't want to lose them. */ - total_trx = trx_sys_any_active_transactions(); - - if (total_trx > 0) { + if (ulint total_trx = srv_was_started && !srv_read_only_mode + && srv_force_recovery < SRV_FORCE_NO_TRX_UNDO + ? trx_sys_any_active_transactions() : 0) { if (srv_print_verbose_log && count > 600) { ib::info() << "Waiting for " << total_trx << " active" @@ -2140,65 +2050,64 @@ loop: count = 0; } - /* Wake up purge threads to die - they have MYSQL_THD's and - thus might keep open transactions. In particular, this is - needed in embedded server and when one uses UNINSTALL PLUGIN. - In the normal server shutdown purge threads should've been - already notified by the thd_destructor_proxy thread. */ - srv_purge_wakeup(); + goto loop; + } + /* We need these threads to stop early in shutdown. */ + const char* thread_name; + + if (srv_error_monitor_active) { + thread_name = "srv_error_monitor_thread"; + } else if (srv_monitor_active) { + thread_name = "srv_monitor_thread"; + } else if (srv_buf_resize_thread_active) { + thread_name = "buf_resize_thread"; + } else if (srv_dict_stats_thread_active) { + thread_name = "dict_stats_thread"; + } else if (lock_sys && lock_sys->timeout_thread_active) { + thread_name = "lock_wait_timeout_thread"; + } else if (srv_buf_dump_thread_active) { + thread_name = "buf_dump_thread"; + } else { + thread_name = NULL; + } + + if (thread_name) { + ut_ad(!srv_read_only_mode); +wait_suspend_loop: + if (srv_print_verbose_log && count > 600) { + ib::info() << "Waiting for " << thread_name + << "to exit"; + count = 0; + } goto loop; } /* Check that the background threads are suspended */ - active_thd = srv_get_active_thread_type(); - - if (active_thd != SRV_NONE) { - - if (active_thd == SRV_PURGE) { - srv_purge_wakeup(); + switch (srv_get_active_thread_type()) { + case SRV_NONE: + srv_shutdown_state = SRV_SHUTDOWN_FLUSH_PHASE; + if (!srv_n_fil_crypt_threads_started) { + break; } - - /* The srv_lock_timeout_thread, srv_error_monitor_thread - and srv_monitor_thread should already exit by now. The - only threads to be suspended are the master threads - and worker threads (purge threads). Print the thread - type if any of such threads not in suspended mode */ - if (srv_print_verbose_log && count > 600) { - const char* thread_type = ""; - - switch (active_thd) { - case SRV_NONE: - /* This shouldn't happen because we've - already checked for this case before - entering the if(). We handle it here - to avoid a compiler warning. */ - ut_error; - case SRV_WORKER: - thread_type = "worker threads"; - break; - case SRV_MASTER: - thread_type = "master thread"; - break; - case SRV_PURGE: - thread_type = "purge thread"; - break; - } - - ib::info() << "Waiting for " << thread_type - << " to be suspended"; - - count = 0; - } - - goto loop; + os_event_set(fil_crypt_threads_event); + thread_name = "fil_crypt_thread"; + goto wait_suspend_loop; + case SRV_PURGE: + case SRV_WORKER: + srv_purge_wakeup(); + thread_name = "purge thread"; + goto wait_suspend_loop; + case SRV_MASTER: + thread_name = "master thread"; + goto wait_suspend_loop; } /* At this point only page_cleaner should be active. We wait here to let it complete the flushing of the buffer pools before proceeding further. */ - srv_shutdown_state = SRV_SHUTDOWN_FLUSH_PHASE; + count = 0; while (buf_page_cleaner_is_active) { ++count; @@ -2210,23 +2119,34 @@ loop: } } - log_mutex_enter(); - const ulint n_write = log_sys->n_pending_checkpoint_writes; - const ulint n_flush = log_sys->n_pending_flushes; - log_mutex_exit(); - - if (n_write != 0 || n_flush != 0) { - if (srv_print_verbose_log && count > 600) { - ib::info() << "Pending checkpoint_writes: " << n_write - << ". Pending log flush writes: " << n_flush; - count = 0; - } - goto loop; + if (log_scrub_thread_active) { + ut_ad(!srv_read_only_mode); + os_event_set(log_scrub_event); } - pending_io = buf_pool_check_no_pending_io(); + if (log_sys) { + log_mutex_enter(); + const ulint n_write = log_sys->n_pending_checkpoint_writes; + const ulint n_flush = log_sys->n_pending_flushes; + log_mutex_exit(); - if (pending_io) { + if (log_scrub_thread_active || n_write || n_flush) { + if (srv_print_verbose_log && count > 600) { + ib::info() << "Pending checkpoint_writes: " + << n_write + << ". Pending log flush writes: " + << n_flush; + count = 0; + } + goto loop; + } + } + + ut_ad(!log_scrub_thread_active); + + if (!buf_pool_ptr) { + ut_ad(!srv_was_started); + } else if (ulint pending_io = buf_pool_check_no_pending_io()) { if (srv_print_verbose_log && count > 600) { ib::info() << "Waiting for " << pending_io << " buffer" " page I/Os to complete"; @@ -2236,8 +2156,8 @@ loop: goto loop; } - if (srv_fast_shutdown == 2) { - if (!srv_read_only_mode) { + if (srv_fast_shutdown == 2 || !srv_was_started) { + if (!srv_read_only_mode && srv_was_started) { ib::info() << "MySQL has requested a very fast" " shutdown without flushing the InnoDB buffer" " pool to data files. At the next mysqld" @@ -2254,80 +2174,56 @@ loop: from the stamps if the previous shutdown was clean. */ log_buffer_flush_to_disk(); - - /* Check that the background threads stay suspended */ - thread_name = srv_any_background_threads_are_active(); - - if (thread_name != NULL) { - ib::warn() << "Background thread " - << thread_name << " woke up during" - " shutdown"; - goto loop; - } } srv_shutdown_state = SRV_SHUTDOWN_LAST_PHASE; - fil_close_all_files(); - - thread_name = srv_any_background_threads_are_active(); - - ut_a(!thread_name); - + if (fil_system) { + fil_close_all_files(); + } return; } if (!srv_read_only_mode) { log_make_checkpoint_at(LSN_MAX, TRUE); - } - log_mutex_enter(); + log_mutex_enter(); - lsn = log_sys->lsn; + lsn = log_sys->lsn; - ut_ad(lsn >= log_sys->last_checkpoint_lsn); + const bool lsn_changed = lsn != log_sys->last_checkpoint_lsn; + ut_ad(lsn >= log_sys->last_checkpoint_lsn); - log_mutex_exit(); + log_mutex_exit(); - if (lsn != log_sys->last_checkpoint_lsn) { - goto loop; - } - - /* Check that the background threads stay suspended */ - thread_name = srv_any_background_threads_are_active(); - if (thread_name != NULL) { - ib::warn() << "Background thread " << thread_name << " woke up" - " during shutdown"; - - goto loop; - } - - if (!srv_read_only_mode) { - fil_flush_file_spaces(FIL_TYPE_TABLESPACE); - fil_flush_file_spaces(FIL_TYPE_LOG); - } - - /* The call fil_write_flushed_lsn() will bypass the buffer - pool: therefore it is essential that the buffer pool has been - completely flushed to disk! (We do not call fil_write... if the - 'very fast' shutdown is enabled.) */ - - if (!buf_all_freed()) { - - if (srv_print_verbose_log && count > 600) { - ib::info() << "Waiting for dirty buffer pages to be" - " flushed"; - count = 0; + if (lsn_changed) { + goto loop; } - goto loop; + fil_flush_file_spaces(FIL_TYPE_TABLESPACE); + fil_flush_file_spaces(FIL_TYPE_LOG); + + /* The call fil_write_flushed_lsn_to_data_files() will + bypass the buffer pool: therefore it is essential that + the buffer pool has been completely flushed to disk! */ + + if (!buf_all_freed()) { + if (srv_print_verbose_log && count > 600) { + ib::info() << "Waiting for dirty buffer pages" + " to be flushed"; + count = 0; + } + + goto loop; + } + } else { + lsn = srv_start_lsn; } srv_shutdown_state = SRV_SHUTDOWN_LAST_PHASE; /* Make some checks that the server really is quiet */ - srv_thread_type type = srv_get_active_thread_type(); - ut_a(type == SRV_NONE); + ut_a(srv_get_active_thread_type() == SRV_NONE); bool freed = buf_all_freed(); ut_a(freed); @@ -2335,27 +2231,25 @@ loop: ut_a(lsn == log_sys->lsn); if (lsn < srv_start_lsn) { - ib::error() << "Log sequence number at shutdown " << lsn - << " is lower than at startup " << srv_start_lsn - << "!"; + ib::error() << "Shutdown LSN=" << lsn + << " is less than start LSN=" << srv_start_lsn; } srv_shutdown_lsn = lsn; if (!srv_read_only_mode) { - err = fil_write_flushed_lsn(lsn); + dberr_t err = fil_write_flushed_lsn(lsn); if (err != DB_SUCCESS) { ib::error() << "Writing flushed lsn " << lsn - << " failed at shutdown error " << err; + << " failed; error=" << err; } } fil_close_all_files(); /* Make some checks that the server really is quiet */ - type = srv_get_active_thread_type(); - ut_a(type == SRV_NONE); + ut_a(srv_get_active_thread_type() == SRV_NONE); freed = buf_all_freed(); ut_a(freed); @@ -2504,6 +2398,10 @@ log_shutdown(void) mutex_free(&log_sys->write_mutex); mutex_free(&log_sys->log_flush_order_mutex); + if (!srv_read_only_mode && srv_scrub_log) { + os_event_destroy(log_scrub_event); + } + recv_sys_close(); } @@ -2521,11 +2419,6 @@ log_mem_free(void) } } -/** Event to wake up the log scrub thread */ -UNIV_INTERN os_event_t log_scrub_event = NULL; - -UNIV_INTERN ibool srv_log_scrub_thread_active = FALSE; - /******************************************************//** Pads the current log block full with dummy log records. Used in producing consistent archived log files and scrubbing redo log. */ @@ -2552,6 +2445,10 @@ log_pad_current_log_block(void) pad_length = 0; } + if (pad_length) { + srv_stats.n_log_scrubs.inc(); + } + for (i = 0; i < pad_length; i++) { log_write_low(&b, 1); } @@ -2571,6 +2468,7 @@ void log_scrub() /*=========*/ { + log_mutex_enter(); ulint cur_lbn = log_block_convert_lsn_to_no(log_sys->lsn); if (next_lbn_to_pad == cur_lbn) @@ -2579,6 +2477,7 @@ log_scrub() } next_lbn_to_pad = log_block_convert_lsn_to_no(log_sys->lsn); + log_mutex_exit(); } /* log scrubbing speed, in bytes/sec */ @@ -2591,28 +2490,22 @@ sleeps again. @return this function does not return, it calls os_thread_exit() */ extern "C" UNIV_INTERN os_thread_ret_t -DECLARE_THREAD(log_scrub_thread)( -/*===============================*/ - void* arg __attribute__((unused))) /*!< in: a dummy parameter - required by os_thread_create */ +DECLARE_THREAD(log_scrub_thread)(void*) { ut_ad(!srv_read_only_mode); - srv_log_scrub_thread_active = TRUE; - - while(srv_shutdown_state == SRV_SHUTDOWN_NONE) - { + while (srv_shutdown_state < SRV_SHUTDOWN_FLUSH_PHASE) { /* log scrubbing interval in µs. */ ulonglong interval = 1000*1000*512/innodb_scrub_log_speed; - os_event_wait_time(log_scrub_event, interval); + os_event_wait_time(log_scrub_event, static_cast(interval)); log_scrub(); os_event_reset(log_scrub_event); } - srv_log_scrub_thread_active = FALSE; + log_scrub_thread_active = false; /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit and not use return() to exit. */ diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index 1ecebe098bd..1ab1341bbdc 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -2,7 +2,7 @@ Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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 @@ -69,7 +69,7 @@ this must be less than UNIV_PAGE_SIZE as it is stored in the buffer pool */ #define RECV_READ_AHEAD_AREA 32 /** The recovery system */ -recv_sys_t* recv_sys = NULL; +recv_sys_t* recv_sys; /** TRUE when applying redo log records during crash recovery; FALSE otherwise. Note that this is FALSE while a background thread is rolling back incomplete transactions. */ @@ -98,9 +98,6 @@ buffer pool before the pages have been recovered to the up-to-date state. TRUE means that recovery is running and no operations on the log files are allowed yet: the variable name is misleading. */ bool recv_no_ibuf_operations; -/** The following counter is used to decide when to print info on -log scan */ -static ulint recv_scan_print_counter; /** The type of the previous parsed redo log record */ static mlog_id_t recv_previous_parsed_rec_type; @@ -128,7 +125,7 @@ mysql_pfs_key_t recv_writer_thread_key; #endif /* UNIV_PFS_THREAD */ /** Flag indicating if recv_writer thread is active. */ -volatile bool recv_writer_thread_active = false; +static volatile bool recv_writer_thread_active; #ifndef DBUG_OFF /** Return string name of the redo log record type. @@ -138,16 +135,6 @@ const char* get_mlog_string(mlog_id_t type); #endif /* !DBUG_OFF */ -/* prototypes */ - -/*******************************************************//** -Initialize crash recovery environment. Can be called iff -recv_needed_recovery == false. */ -static -void -recv_init_crash_recovery(void); -/*===========================*/ - /** Tablespace item during recovery */ struct file_name_t { /** Tablespace file name (MLOG_FILE_NAME) */ @@ -224,42 +211,6 @@ fil_name_process( case FIL_LOAD_OK: ut_ad(space != NULL); -#ifdef MYSQL_ENCRYPTION - /* For encrypted tablespace, set key and iv. */ - if (FSP_FLAGS_GET_ENCRYPTION(space->flags) - && recv_sys->encryption_list != NULL) { - dberr_t err; - encryption_list_t::iterator it; - - for (it = recv_sys->encryption_list->begin(); - it != recv_sys->encryption_list->end(); - it++) { - if (it->space_id == space->id) { - err = fil_set_encryption( - space->id, - Encryption::AES, - it->key, - it->iv); - if (err != DB_SUCCESS) { - ib::error() - << "Can't set" - " encryption" - " information" - " for" - " tablespace" - << space->name - << "!"; - } - ut_free(it->key); - ut_free(it->iv); - it->key = NULL; - it->iv = NULL; - it->space_id = 0; - } - } - } -#endif /* MYSQL_ENCRYPTION */ - if (f.space == NULL || f.space == space) { f.name = fname.name; f.space = space; @@ -491,6 +442,8 @@ recv_sys_close(void) /*================*/ { if (recv_sys != NULL) { + recv_sys->dblwr.pages.clear(); + if (recv_sys->addr_hash != NULL) { hash_table_free(recv_sys->addr_hash); } @@ -508,7 +461,6 @@ recv_sys_close(void) } ut_free(recv_sys->buf); - ut_free(recv_sys->last_block_buf_start); ut_ad(!recv_writer_thread_active); mutex_free(&recv_sys->writer_mutex); @@ -546,7 +498,6 @@ recv_sys_mem_free(void) } ut_free(recv_sys->buf); - ut_free(recv_sys->last_block_buf_start); ut_free(recv_sys); recv_sys = NULL; } @@ -562,7 +513,6 @@ recv_sys_var_init(void) recv_needed_recovery = false; recv_lsn_checks_on = false; recv_no_ibuf_operations = false; - recv_scan_print_counter = 0; recv_previous_parsed_rec_type = MLOG_SINGLE_REC_FLAG; recv_previous_parsed_rec_offset = 0; recv_previous_parsed_rec_is_multi = 0; @@ -593,8 +543,6 @@ DECLARE_THREAD(recv_writer_thread)( << os_thread_pf(os_thread_get_curr_id()); #endif /* UNIV_DEBUG_THREAD_CREATION */ - recv_writer_thread_active = true; - while (srv_shutdown_state == SRV_SHUTDOWN_NONE) { /* Wait till we get a signal to clean the LRU list. @@ -667,38 +615,26 @@ recv_sys_init( recv_sys->apply_log_recs = FALSE; recv_sys->apply_batch_on = FALSE; - recv_sys->last_block_buf_start = static_cast( - ut_malloc_nokey(2 * OS_FILE_LOG_BLOCK_SIZE)); - - recv_sys->last_block = static_cast(ut_align( - recv_sys->last_block_buf_start, OS_FILE_LOG_BLOCK_SIZE)); - recv_sys->found_corrupt_log = false; recv_sys->found_corrupt_fs = false; recv_sys->mlog_checkpoint_lsn = 0; + recv_sys->progress_time = ut_time(); recv_max_page_lsn = 0; /* Call the constructor for recv_sys_t::dblwr member */ new (&recv_sys->dblwr) recv_dblwr_t(); - recv_sys->encryption_list = NULL; mutex_exit(&(recv_sys->mutex)); } -/********************************************************//** -Empties the hash table when it has been fully processed.*/ +/** Empty a fully processed hash table. */ static void -recv_sys_empty_hash(void) -/*=====================*/ +recv_sys_empty_hash() { ut_ad(mutex_own(&(recv_sys->mutex))); - - if (recv_sys->n_addrs != 0) { - ib::fatal() << recv_sys->n_addrs << " pages with log records" - " were left unprocessed!"; - } + ut_a(recv_sys->n_addrs == 0); hash_table_free(recv_sys->addr_hash); mem_heap_empty(recv_sys->heap); @@ -717,12 +653,10 @@ recv_sys_debug_free(void) hash_table_free(recv_sys->addr_hash); mem_heap_free(recv_sys->heap); ut_free(recv_sys->buf); - ut_free(recv_sys->last_block_buf_start); recv_sys->buf = NULL; recv_sys->heap = NULL; recv_sys->addr_hash = NULL; - recv_sys->last_block_buf_start = NULL; /* wake page cleaner up to progress */ if (!srv_read_only_mode) { @@ -732,29 +666,107 @@ recv_sys_debug_free(void) os_event_set(recv_sys->flush_start); } - if (recv_sys->encryption_list != NULL) { - encryption_list_t::iterator it; + mutex_exit(&(recv_sys->mutex)); +} - for (it = recv_sys->encryption_list->begin(); - it != recv_sys->encryption_list->end(); - it++) { - if (it->key != NULL) { - ut_free(it->key); - it->key = NULL; - } - if (it->iv != NULL) { - ut_free(it->iv); - it->iv = NULL; - } - } +/** Read a log segment to a buffer. +@param[out] buf buffer +@param[in] group redo log files +@param[in] start_lsn read area start +@param[in] end_lsn read area end +@return valid end_lsn */ +static +lsn_t +log_group_read_log_seg( + byte* buf, + const log_group_t* group, + lsn_t start_lsn, + lsn_t end_lsn) +{ + ulint len; + lsn_t source_offset; - recv_sys->encryption_list->swap(*recv_sys->encryption_list); + ut_ad(log_mutex_own()); - UT_DELETE(recv_sys->encryption_list); - recv_sys->encryption_list = NULL; +loop: + source_offset = log_group_calc_lsn_offset(start_lsn, group); + + ut_a(end_lsn - start_lsn <= ULINT_MAX); + len = (ulint) (end_lsn - start_lsn); + + ut_ad(len != 0); + + const bool at_eof = (source_offset % group->file_size) + len + > group->file_size; + if (at_eof) { + /* If the above condition is true then len (which is ulint) + is > the expression below, so the typecast is ok */ + len = (ulint) (group->file_size - + (source_offset % group->file_size)); } - mutex_exit(&(recv_sys->mutex)); + log_sys->n_log_ios++; + + MONITOR_INC(MONITOR_LOG_IO); + + ut_a(source_offset / UNIV_PAGE_SIZE <= ULINT_MAX); + + const ulint page_no + = (ulint) (source_offset / univ_page_size.physical()); + + fil_io(IORequestLogRead, true, + page_id_t(group->space_id, page_no), + univ_page_size, + (ulint) (source_offset % univ_page_size.physical()), + len, buf, NULL); + + for (ulint l = 0; l < len; l += OS_FILE_LOG_BLOCK_SIZE, + buf += OS_FILE_LOG_BLOCK_SIZE, + start_lsn += OS_FILE_LOG_BLOCK_SIZE) { + const ulint block_number = log_block_get_hdr_no(buf); + + if (block_number != log_block_convert_lsn_to_no(start_lsn)) { + /* Garbage or an incompletely written log block. + We will not report any error, because this can + happen when InnoDB was killed while it was + writing redo log. We simply treat this as an + abrupt end of the redo log. */ + end_lsn = start_lsn; + break; + } + + if (innodb_log_checksums || group->is_encrypted()) { + ulint crc = log_block_calc_checksum_crc32(buf); + ulint cksum = log_block_get_checksum(buf); + + if (crc != cksum) { + ib::error() << "Invalid log block checksum." + << " block: " << block_number + << " checkpoint no: " + << log_block_get_checkpoint_no(buf) + << " expected: " << crc + << " found: " << cksum; + end_lsn = start_lsn; + break; + } + + if (group->is_encrypted()) { + log_crypt(buf, OS_FILE_LOG_BLOCK_SIZE, true); + } + } + } + + if (recv_sys->report(ut_time())) { + ib::info() << "Read redo log up to LSN=" << start_lsn; + sd_notifyf(0, "STATUS=Read redo log up to LSN=" LSN_PF, + start_lsn); + } + + if (start_lsn != end_lsn) { + goto loop; + } + + return(start_lsn); } /********************************************************//** @@ -764,27 +776,20 @@ about the latest checkpoint to the groups, and inits the fields in the group memory structs to up-to-date values. */ static void -recv_synchronize_groups(void) -/*=========================*/ +recv_synchronize_groups() { - lsn_t start_lsn; - lsn_t end_lsn; - lsn_t recovered_lsn; - - recovered_lsn = recv_sys->recovered_lsn; + const lsn_t recovered_lsn = recv_sys->recovered_lsn; /* Read the last recovered log block to the recovery system buffer: the block is always incomplete */ - start_lsn = ut_uint64_align_down(recovered_lsn, - OS_FILE_LOG_BLOCK_SIZE); - end_lsn = ut_uint64_align_up(recovered_lsn, OS_FILE_LOG_BLOCK_SIZE); - - ut_a(start_lsn != end_lsn); - - log_group_read_log_seg(recv_sys->last_block, + const lsn_t start_lsn = ut_uint64_align_down(recovered_lsn, + OS_FILE_LOG_BLOCK_SIZE); + log_group_read_log_seg(log_sys->buf, UT_LIST_GET_FIRST(log_sys->log_groups), - start_lsn, end_lsn); + start_lsn, start_lsn + OS_FILE_LOG_BLOCK_SIZE); + + ut_ad(UT_LIST_GET_LEN(log_sys->log_groups) == 1); for (log_group_t* group = UT_LIST_GET_FIRST(log_sys->log_groups); group; @@ -800,8 +805,10 @@ recv_synchronize_groups(void) over the max checkpoint info, thus making the preservation of max checkpoint info on disk certain */ - log_write_checkpoint_info(true); - log_mutex_enter(); + if (!srv_read_only_mode) { + log_write_checkpoint_info(true, 0); + log_mutex_enter(); + } } /** Check the consistency of a log header block. @@ -853,9 +860,8 @@ recv_find_max_checkpoint_0( ut_fold_binary(buf + LOG_CHECKPOINT_LSN, CHECKSUM_2 - LOG_CHECKPOINT_LSN)) != mach_read_from_4(buf + CHECKSUM_2)) { - DBUG_PRINT("ib_log", - ("invalid pre-5.7.9 checkpoint " ULINTPF, - field)); + DBUG_LOG("ib_log", + "invalid pre-10.2.2 checkpoint " << field); continue; } @@ -869,9 +875,9 @@ recv_find_max_checkpoint_0( checkpoint_no = mach_read_from_8( buf + LOG_CHECKPOINT_NO); - if (!log_crypt_read_checkpoint_buf(buf)) { - ib::error() << "Reading checkpoint encryption info failed."; - return DB_ERROR; + if (!log_crypt_101_read_checkpoint(buf)) { + ib::error() << "Decrypting checkpoint failed"; + continue; } DBUG_PRINT("ib_log", @@ -891,14 +897,14 @@ recv_find_max_checkpoint_0( } ib::error() << "Upgrade after a crash is not supported." - " This redo log was created before MySQL 5.7.9," + " This redo log was created before MariaDB 10.2.2," " and we did not find a valid checkpoint." " Please follow the instructions at" " " REFMAN "upgrading.html"; return(DB_ERROR); } -/** Determine if a pre-5.7.9 redo log is clean. +/** Determine if a pre-MySQL 5.7.9/MariaDB 10.2.2 redo log is clean. @param[in] lsn checkpoint LSN @return error code @retval DB_SUCCESS if the redo log is clean @@ -918,7 +924,7 @@ recv_log_format_0_recover(lsn_t lsn) static const char* NO_UPGRADE_RECOVERY_MSG = "Upgrade after a crash is not supported." - " This redo log was created before MySQL 5.7.9"; + " This redo log was created before MariaDB 10.2.2"; static const char* NO_UPGRADE_RTFM_MSG = ". Please follow the instructions at " REFMAN "upgrading.html"; @@ -928,10 +934,11 @@ recv_log_format_0_recover(lsn_t lsn) univ_page_size, (ulint) ((source_offset & ~(OS_FILE_LOG_BLOCK_SIZE - 1)) % univ_page_size.physical()), - OS_FILE_LOG_BLOCK_SIZE, buf, NULL, NULL); + OS_FILE_LOG_BLOCK_SIZE, buf, NULL); if (log_block_calc_checksum_format_0(buf) - != log_block_get_checksum(buf)) { + != log_block_get_checksum(buf) + && !log_crypt_101_read_block(buf)) { ib::error() << NO_UPGRADE_RECOVERY_MSG << ", and it appears corrupted" << NO_UPGRADE_RTFM_MSG; @@ -1000,6 +1007,7 @@ recv_find_max_checkpoint( return(recv_find_max_checkpoint_0( max_group, max_field)); case LOG_HEADER_FORMAT_CURRENT: + case LOG_HEADER_FORMAT_CURRENT | LOG_HEADER_FORMAT_ENCRYPTED: break; default: /* Ensure that the string is NUL-terminated. */ @@ -1022,14 +1030,24 @@ recv_find_max_checkpoint( log_group_header_read(group, field); - if (!recv_check_log_header_checksum(buf)) { + const ulint crc32 = log_block_calc_checksum_crc32(buf); + const ulint cksum = log_block_get_checksum(buf); + + if (crc32 != cksum) { DBUG_PRINT("ib_log", ("invalid checkpoint," " group " ULINTPF " at " ULINTPF - ", checksum %x", + ", checksum %x expected %x", group->id, field, - (unsigned) log_block_get_checksum( - buf))); + (unsigned) cksum, + (unsigned) crc32)); + continue; + } + + if (group->is_encrypted() + && !log_crypt_read_checkpoint_buf(buf)) { + ib::error() << "Reading checkpoint" + " encryption info failed."; continue; } @@ -1042,11 +1060,6 @@ recv_find_max_checkpoint( checkpoint_no = mach_read_from_8( buf + LOG_CHECKPOINT_NO); - if (!log_crypt_read_checkpoint_buf(buf)) { - ib::error() << "Reading checkpoint encryption info failed."; - return DB_ERROR; - } - DBUG_PRINT("ib_log", ("checkpoint " UINT64PF " at " LSN_PF " found in group " ULINTPF, @@ -1078,139 +1091,6 @@ recv_find_max_checkpoint( return(DB_SUCCESS); } -/** Check the 4-byte checksum to the trailer checksum field of a log -block. -@param[in] log block -@return whether the checksum matches */ -bool -log_block_checksum_is_ok( - const byte* block, /*!< in: pointer to a log block */ - bool print_err) /*!< in print error ? */ -{ - if (log_block_get_checksum(block) != log_block_calc_checksum(block) && - print_err) { - ib::error() << " Log block checkpoint not correct." - << " block: " << log_block_get_hdr_no(block) - << " checkpoint no: " << log_block_get_checkpoint_no(block) - << " calc checkpoint: " << log_block_calc_checksum(block) - << " stored checkpoint: " << log_block_get_checksum(block); - } - - return(!innodb_log_checksums - || log_block_get_checksum(block) - == log_block_calc_checksum(block)); -} - -#ifdef MYSQL_ENCRYPTION - -/** Parse or process a write encryption info record. -@param[in] ptr redo log record -@param[in] end end of the redo log buffer -@param[in] space_id the tablespace ID -@return log record end, NULL if not a complete record */ -static -byte* -fil_write_encryption_parse( - byte* ptr, - const byte* end, - ulint space_id) -{ - fil_space_t* space; - ulint offset; - ulint len; - byte* key = NULL; - byte* iv = NULL; - bool is_new = false; - - space = fil_space_get(space_id); - if (space == NULL) { - encryption_list_t::iterator it; - - if (recv_sys->encryption_list == NULL) { - recv_sys->encryption_list = - UT_NEW_NOKEY(encryption_list_t()); - } - - for (it = recv_sys->encryption_list->begin(); - it != recv_sys->encryption_list->end(); - it++) { - if (it->space_id == space_id) { - key = it->key; - iv = it->iv; - } - } - - if (key == NULL) { - key = static_cast(ut_malloc_nokey( - ENCRYPTION_KEY_LEN)); - iv = static_cast(ut_malloc_nokey( - ENCRYPTION_KEY_LEN)); - is_new = true; - } - } else { - key = space->encryption_key; - iv = space->encryption_iv; - } - - offset = mach_read_from_2(ptr); - ptr += 2; - len = mach_read_from_2(ptr); - - ptr += 2; - if (end < ptr + len) { - return(NULL); - } - - if (offset >= UNIV_PAGE_SIZE - || len + offset > UNIV_PAGE_SIZE - || (len != ENCRYPTION_INFO_SIZE_V1 - && len != ENCRYPTION_INFO_SIZE_V2)) { - recv_sys->found_corrupt_log = TRUE; - return(NULL); - } - -#ifdef UNIV_ENCRYPT_DEBUG - if (space) { - fprintf(stderr, "Got %lu from redo log:", space->id); - } -#endif - - if (!fsp_header_decode_encryption_info(key, - iv, - ptr)) { - recv_sys->found_corrupt_log = TRUE; - ib::warn() << "Encryption information" - << " in the redo log of space " - << space_id << " is invalid"; - } - - ut_ad(len == ENCRYPTION_INFO_SIZE_V1 - || len == ENCRYPTION_INFO_SIZE_V2); - - ptr += len; - - if (space == NULL) { - if (is_new) { - recv_encryption_t info; - - /* Add key and iv to list */ - info.space_id = space_id; - info.key = key; - info.iv = iv; - - recv_sys->encryption_list->push_back(info); - } - } else { - ut_ad(FSP_FLAGS_GET_ENCRYPTION(space->flags)); - - space->encryption_type = Encryption::AES; - space->encryption_klen = ENCRYPTION_KEY_LEN; - } - - return(ptr); -} -#endif /* MYSQL_ENCRYPTION */ - /** Try to parse a single log record body and also applies it if specified. @param[in] type redo log entry type @@ -1257,20 +1137,6 @@ recv_parse_or_apply_log_rec_body( return(ptr + 8); case MLOG_TRUNCATE: return(truncate_t::parse_redo_entry(ptr, end_ptr, space_id)); - case MLOG_WRITE_STRING: - /* For encrypted tablespace, we need to get the - encryption key information before the page 0 is recovered. - Otherwise, redo will not find the key to decrypt - the data pages. */ -#ifdef MYSQL_ENCRYPTION - if (page_no == 0 && !is_system_tablespace(space_id) - && !apply) { - return(fil_write_encryption_parse(ptr, - end_ptr, - space_id)); - } -#endif - break; default: break; @@ -1292,12 +1158,24 @@ recv_parse_or_apply_log_rec_body( } else if (apply && !is_predefined_tablespace(space_id) && recv_spaces.find(space_id) == recv_spaces.end()) { - ib::fatal() << "Missing MLOG_FILE_NAME or MLOG_FILE_DELETE" + if (recv_sys->recovered_lsn < recv_sys->mlog_checkpoint_lsn) { + /* We have not seen all records between the + checkpoint and MLOG_CHECKPOINT. There should be + a MLOG_FILE_DELETE for this tablespace later. */ + recv_spaces.insert( + std::make_pair(space_id, + file_name_t("", false))); + goto parse_log; + } + + ib::error() << "Missing MLOG_FILE_NAME or MLOG_FILE_DELETE" " for redo log record " << type << " (page " - << space_id << ":" << page_no << ") at " - << recv_sys->recovered_lsn << "."; + << space_id << ":" << page_no << ") at " + << recv_sys->recovered_lsn << "."; + recv_sys->found_corrupt_log = true; return(NULL); } else { +parse_log: /* Parsing a page log record. */ page = NULL; page_zip = NULL; @@ -1451,17 +1329,6 @@ recv_parse_or_apply_log_rec_body( ptr, end_ptr, page, page_zip, index); } break; - case MLOG_COMP_REC_SEC_DELETE_MARK: - ut_ad(!page || fil_page_type_is_index(page_type)); - /* This log record type is obsolete, but we process it for - backward compatibility with MySQL 5.0.3 and 5.0.4. */ - ut_a(!page || page_is_comp(page)); - ut_a(!page_zip); - ptr = mlog_parse_index(ptr, end_ptr, TRUE, &index); - if (!ptr) { - break; - } - /* Fall through */ case MLOG_REC_SEC_DELETE_MARK: ut_ad(!page || fil_page_type_is_index(page_type)); ptr = btr_cur_parse_del_mark_set_sec_rec(ptr, end_ptr, @@ -2042,6 +1909,8 @@ recv_recover_page(bool just_read_in, buf_block_t* block) mtr_commit(&mtr); + ib_time_t time = ut_time(); + mutex_enter(&(recv_sys->mutex)); if (recv_max_page_lsn < page_lsn) { @@ -2050,11 +1919,16 @@ recv_recover_page(bool just_read_in, buf_block_t* block) recv_addr->state = RECV_PROCESSED; - ut_a(recv_sys->n_addrs); - recv_sys->n_addrs--; - - mutex_exit(&(recv_sys->mutex)); + ut_a(recv_sys->n_addrs > 0); + if (ulint n = --recv_sys->n_addrs) { + if (recv_sys->report(time)) { + ib::info() << "To recover: " << n << " pages from log"; + sd_notifyf(0, "STATUS=To recover: " ULINTPF + " pages from log", n); + } + } + mutex_exit(&recv_sys->mutex); } /** Reads in pages which have hashed log records, from an area around a given @@ -2101,61 +1975,48 @@ recv_read_in_area( } buf_read_recv_pages(FALSE, page_id.space(), page_nos, n); - /* - fprintf(stderr, "Recv pages at %lu n %lu\n", page_nos[0], n); - */ return(n); } -/*******************************************************************//** -Empties the hash table of stored log records, applying them to appropriate -pages. -@return DB_SUCCESS when successfull or DB_ERROR when fails. */ -dberr_t -recv_apply_hashed_log_recs( -/*=======================*/ - ibool allow_ibuf) /*!< in: if TRUE, also ibuf operations are - allowed during the application; if FALSE, - no ibuf operations are allowed, and after - the application all file pages are flushed to - disk and invalidated in buffer pool: this - alternative means that no new log records - can be generated during the application; - the caller must in this case own the log - mutex */ +/** Apply the hash table of stored log records to persistent data pages. +@param[in] last_batch whether the change buffer merge will be + performed as part of the operation */ +void +recv_apply_hashed_log_recs(bool last_batch) { - recv_addr_t* recv_addr; - ulint i; - ibool has_printed = FALSE; - mtr_t mtr; - ulint progress = 0; - dberr_t err = DB_SUCCESS; -loop: - mutex_enter(&(recv_sys->mutex)); + for (;;) { + mutex_enter(&recv_sys->mutex); - if (recv_sys->apply_batch_on) { - - mutex_exit(&(recv_sys->mutex)); + if (!recv_sys->apply_batch_on) { + break; + } + mutex_exit(&recv_sys->mutex); os_thread_sleep(500000); - - goto loop; } - ut_ad(!allow_ibuf == log_mutex_own()); + ut_ad(!last_batch == log_mutex_own()); - if (!allow_ibuf) { + if (!last_batch) { recv_no_ibuf_operations = true; } + if (ulint n = recv_sys->n_addrs) { + const char* msg = last_batch + ? "Starting final batch to recover " + : "Starting a batch to recover "; + ib::info() << msg << n << " pages from redo log."; + sd_notifyf(0, "STATUS=%s" ULINTPF " pages from redo log", + msg, n); + } recv_sys->apply_log_recs = TRUE; recv_sys->apply_batch_on = TRUE; - for (i = 0; i < hash_get_n_cells(recv_sys->addr_hash); i++) { + for (ulint i = 0; i < hash_get_n_cells(recv_sys->addr_hash); i++) { - for (recv_addr = static_cast( + for (recv_addr_t* recv_addr = static_cast( HASH_GET_FIRST(recv_sys->addr_hash, i)); - recv_addr != 0; + recv_addr; recv_addr = static_cast( HASH_GET_NEXT(addr_hash, recv_addr))) { @@ -2184,23 +2045,13 @@ loop: ut_ad(found); if (recv_addr->state == RECV_NOT_PROCESSED) { - if (!has_printed) { - ib::info() << "Starting an apply batch" - " of log records" - " to the database..."; - fputs("InnoDB: Progress in percent: ", - stderr); - has_printed = TRUE; - } - - mutex_exit(&(recv_sys->mutex)); + mutex_exit(&recv_sys->mutex); if (buf_page_peek(page_id)) { - buf_block_t* block; + mtr_t mtr; + mtr.start(); - mtr_start(&mtr); - - block = buf_page_get( + buf_block_t* block = buf_page_get( page_id, page_size, RW_X_LATCH, &mtr); @@ -2208,7 +2059,7 @@ loop: block, SYNC_NO_ORDER_CHECK); recv_recover_page(FALSE, block); - mtr_commit(&mtr); + mtr.commit(); } else { recv_read_in_area(page_id); } @@ -2216,19 +2067,6 @@ loop: mutex_enter(&(recv_sys->mutex)); } } - - progress = (ulint) ((i * 100) / hash_get_n_cells(recv_sys->addr_hash)); - - if (has_printed - && progress - && (i * 100) / hash_get_n_cells(recv_sys->addr_hash) - != ((i + 1) * 100) - / hash_get_n_cells(recv_sys->addr_hash)) { - - fprintf(stderr, "%lu ", progress); - sd_notifyf(0, "STATUS=Applying batch of log records for" - " InnoDB: Progress %lu", progress); - } } /* Wait until all the pages have been processed */ @@ -2242,13 +2080,7 @@ loop: mutex_enter(&(recv_sys->mutex)); } - if (has_printed) { - - fprintf(stderr, "\n"); - } - - if (!allow_ibuf) { - + if (!last_batch) { /* Flush all the file pages to disk and invalidate them in the buffer pool */ @@ -2285,14 +2117,7 @@ loop: recv_sys_empty_hash(); - if (has_printed) { - ib::info() << "Apply batch completed"; - sd_notify(0, "STATUS=InnoDB: Apply batch completed"); - } - - mutex_exit(&(recv_sys->mutex)); - - return err; + mutex_exit(&recv_sys->mutex); } /** Tries to parse a single log record. @@ -2495,8 +2320,7 @@ bool recv_parse_log_recs( lsn_t checkpoint_lsn, store_t store, - bool apply, - dberr_t* err) + bool apply) { byte* ptr; byte* end_ptr; @@ -2611,15 +2435,6 @@ loop: return(true); } break; - case MLOG_FILE_NAME: - case MLOG_FILE_DELETE: - case MLOG_FILE_CREATE2: - case MLOG_FILE_RENAME2: - case MLOG_TRUNCATE: - /* These were already handled by - recv_parse_log_rec() and - recv_parse_or_apply_log_rec_body(). */ - break; #ifdef UNIV_LOG_LSN_DEBUG case MLOG_LSN: /* Do not add these records to the hash table. @@ -2644,6 +2459,14 @@ loop: recv_sys->recovered_lsn); } /* fall through */ + case MLOG_FILE_NAME: + case MLOG_FILE_DELETE: + case MLOG_FILE_CREATE2: + case MLOG_FILE_RENAME2: + case MLOG_TRUNCATE: + /* These were already handled by + recv_parse_log_rec() and + recv_parse_or_apply_log_rec_body(). */ case MLOG_INDEX_LOAD: DBUG_PRINT("ib_log", ("scan " LSN_PF ": log rec %s" @@ -2911,68 +2734,22 @@ recv_scan_log_recs( lsn_t* contiguous_lsn, /*!< in/out: it is known that all log groups contain contiguous log data up to this lsn */ - lsn_t* group_scanned_lsn,/*!< out: scanning succeeded up to + lsn_t* group_scanned_lsn)/*!< out: scanning succeeded up to this lsn */ - dberr_t* err) /*!< out: error code or DB_SUCCESS */ { const byte* log_block = buf; - ulint no; lsn_t scanned_lsn = start_lsn; bool finished = false; ulint data_len; bool more_data = false; bool apply = recv_sys->mlog_checkpoint_lsn != 0; - bool maybe_encrypted = false; ut_ad(start_lsn % OS_FILE_LOG_BLOCK_SIZE == 0); ut_ad(len % OS_FILE_LOG_BLOCK_SIZE == 0); ut_ad(len >= OS_FILE_LOG_BLOCK_SIZE); - *err = DB_SUCCESS; do { ut_ad(!finished); - no = log_block_get_hdr_no(log_block); - ulint expected_no = log_block_convert_lsn_to_no(scanned_lsn); - if (no != expected_no) { - /* Garbage or an incompletely written log block. - - We will not report any error, because this can - happen when InnoDB was killed while it was - writing redo log. We simply treat this as an - abrupt end of the redo log. */ - finished = true; - break; - } - - if (!log_block_checksum_is_ok(log_block, true)) { - log_crypt_err_t log_crypt_err; - - maybe_encrypted = log_crypt_block_maybe_encrypted(log_block, - &log_crypt_err); - - /* Print checkpoint encryption keys if present */ - log_crypt_print_checkpoint_keys(log_block); - if (maybe_encrypted) { - /* Log block maybe encrypted finish processing*/ - log_crypt_print_error(log_crypt_err); - *err = DB_ERROR; - return (TRUE); - } - - ib::error() << "Log block " << no << - " at lsn " << scanned_lsn << " has valid" - " header, but checksum field contains " - << log_block_get_checksum(log_block) - << ", should be " - << log_block_calc_checksum(log_block); - /* Garbage or an incompletely written log block. - - This could be the result of killing the server - while it was writing this log block. We treat - this as an abrupt end of the redo log. */ - finished = true; - break; - } if (log_block_get_flush_bit(log_block)) { /* This block was a start of a log flush operation: @@ -3017,26 +2794,18 @@ recv_scan_log_recs( scanned_lsn += data_len; if (scanned_lsn > recv_sys->scanned_lsn) { - - /* We have found more entries. If this scan is - of startup type, we must initiate crash recovery - environment before parsing these log records. */ - if (!recv_needed_recovery) { + recv_needed_recovery = true; - if (!srv_read_only_mode) { - ib::info() << "Log scan progressed" - " past the checkpoint lsn " - << recv_sys->scanned_lsn; - - recv_init_crash_recovery(); - } else { - - ib::warn() << "Recovery skipped," - " --innodb-read-only set!"; - + if (srv_read_only_mode) { + ib::warn() << "innodb_read_only" + " prevents crash recovery"; return(true); } + + ib::info() << "Starting crash recovery from" + " checkpoint LSN=" + << recv_sys->scanned_lsn; } /* We were able to find more log data: add it to the @@ -3054,7 +2823,6 @@ recv_scan_log_recs( ib::error() << "Set innodb_force_recovery" " to ignore this error."; - *err = DB_ERROR; return(true); } } else if (!recv_sys->found_corrupt_log) { @@ -3078,37 +2846,15 @@ recv_scan_log_recs( *group_scanned_lsn = scanned_lsn; - if (recv_needed_recovery) { - recv_scan_print_counter++; - - if (finished || (recv_scan_print_counter % 80 == 0)) { - - ib::info() << "Doing recovery: scanned up to" - " log sequence number " << scanned_lsn; - } - } - if (more_data && !recv_sys->found_corrupt_log) { /* Try to parse more log records */ - bool parse_finished = false; - dberr_t parse_err = DB_SUCCESS; - parse_finished = recv_parse_log_recs(checkpoint_lsn, - *store_to_hash, apply, - &parse_err); - - if (parse_err != DB_SUCCESS) { - ib::info() << "Parsing more log records failed checkpoint_lsn " - << checkpoint_lsn << " error " << parse_err; - parse_finished = true; - } - - if (parse_finished) { + if (recv_parse_log_recs(checkpoint_lsn, + *store_to_hash, apply)) { ut_ad(recv_sys->found_corrupt_log || recv_sys->found_corrupt_fs || recv_sys->mlog_checkpoint_lsn == recv_sys->recovered_lsn); - *err = parse_err; return(true); } @@ -3130,19 +2876,19 @@ recv_scan_log_recs( /** Scans log from a buffer and stores new log data to the parsing buffer. Parses and hashes the log records if new data found. @param[in,out] group log group +@param[in] checkpoint_lsn latest checkpoint log sequence number @param[in,out] contiguous_lsn log sequence number until which all redo log has been scanned @param[in] last_phase whether changes can be applied to the tablespaces -@param[out] err DB_SUCCESS or error code @return whether rescan is needed (not everything was stored) */ static bool recv_group_scan_log_recs( log_group_t* group, + lsn_t checkpoint_lsn, lsn_t* contiguous_lsn, - bool last_phase, - dberr_t* err) + bool last_phase) { DBUG_ENTER("recv_group_scan_log_recs"); DBUG_ASSERT(!last_phase || recv_sys->mlog_checkpoint_lsn > 0); @@ -3164,7 +2910,6 @@ recv_group_scan_log_recs( ut_ad(last_phase || !recv_writer_thread_active); mutex_exit(&recv_sys->mutex); - lsn_t checkpoint_lsn = *contiguous_lsn; lsn_t start_lsn; lsn_t end_lsn; store_t store_to_hash = recv_sys->mlog_checkpoint_lsn == 0 @@ -3173,38 +2918,31 @@ recv_group_scan_log_recs( * (buf_pool_get_n_pages() - (recv_n_pool_free_frames * srv_buf_pool_instances)); - *err = DB_SUCCESS; - end_lsn = *contiguous_lsn = ut_uint64_align_down( + group->scanned_lsn = end_lsn = *contiguous_lsn = ut_uint64_align_down( *contiguous_lsn, OS_FILE_LOG_BLOCK_SIZE); do { - if (*err != DB_SUCCESS) { - DBUG_RETURN(false); - } - if (last_phase && store_to_hash == STORE_NO) { store_to_hash = STORE_IF_EXISTS; /* We must not allow change buffer merge here, because it would generate redo log records before we have finished the redo log scan. */ - *err = recv_apply_hashed_log_recs(FALSE); + recv_apply_hashed_log_recs(false); } start_lsn = end_lsn; - end_lsn += RECV_SCAN_SIZE; - - log_group_read_log_seg( - log_sys->buf, group, start_lsn, end_lsn); - } while (!recv_scan_log_recs( + end_lsn = log_group_read_log_seg( + log_sys->buf, group, start_lsn, + start_lsn + RECV_SCAN_SIZE); + } while (end_lsn != start_lsn + && !recv_scan_log_recs( available_mem, &store_to_hash, log_sys->buf, - RECV_SCAN_SIZE, + end_lsn - start_lsn, checkpoint_lsn, - start_lsn, contiguous_lsn, &group->scanned_lsn, err)); + start_lsn, contiguous_lsn, &group->scanned_lsn)); if (recv_sys->found_corrupt_log || recv_sys->found_corrupt_fs) { - ib::error() << "Found corrupted log when looking checkpoint lsn: " - << contiguous_lsn << " error = " << *err; DBUG_RETURN(false); } @@ -3216,19 +2954,6 @@ recv_group_scan_log_recs( DBUG_RETURN(store_to_hash == STORE_NO); } -/*******************************************************//** -Initialize crash recovery environment. Can be called iff -recv_needed_recovery == false. */ -static -void -recv_init_crash_recovery(void) -{ - ut_ad(!srv_read_only_mode); - ut_a(!recv_needed_recovery); - - recv_needed_recovery = true; -} - /** Report a missing tablespace for which page-redo log exists. @param[in] err previous error code @param[in] i tablespace descriptor @@ -3270,12 +2995,10 @@ recv_init_crash_recovery_spaces(void) ut_ad(!srv_read_only_mode); ut_ad(recv_needed_recovery); - ib::info() << "Database was not shutdown normally!"; - ib::info() << "Starting crash recovery."; - for (recv_spaces_t::iterator i = recv_spaces.begin(); i != recv_spaces.end(); i++) { ut_ad(!is_predefined_tablespace(i->first)); + ut_ad(!i->second.deleted || !i->second.space); if (i->second.deleted) { /* The tablespace was deleted, @@ -3285,10 +3008,19 @@ recv_init_crash_recovery_spaces(void) /* The tablespace was found, and there are some redo log records for it. */ fil_names_dirty(i->second.space); + } else if (i->second.name == "") { + ib::error() << "Missing MLOG_FILE_NAME" + " or MLOG_FILE_DELETE" + " before MLOG_CHECKPOINT for tablespace " + << i->first; + recv_sys->found_corrupt_log = true; + return(DB_CORRUPTION); } else { missing_spaces.insert(i->first); flag_deleted = true; } + + ut_ad(i->second.deleted || i->second.name != ""); } if (flag_deleted) { @@ -3355,6 +3087,7 @@ recv_init_crash_recovery_spaces(void) if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { /* Spawn the background thread to flush dirty pages from the buffer pools. */ + recv_writer_thread_active = true; os_thread_create(recv_writer_thread, 0, 0); } @@ -3386,8 +3119,7 @@ recv_recovery_from_checkpoint_start( if (srv_force_recovery >= SRV_FORCE_NO_LOG_REDO) { - ib::info() << "The user has set SRV_FORCE_NO_LOG_REDO on," - " skipping log redo"; + ib::info() << "innodb_force_recovery=6 skips redo log apply"; return(DB_SUCCESS); } @@ -3401,9 +3133,7 @@ recv_recovery_from_checkpoint_start( err = recv_find_max_checkpoint(&max_cp_group, &max_cp_field); if (err != DB_SUCCESS) { - log_mutex_exit(); - return(err); } @@ -3424,6 +3154,8 @@ recv_recovery_from_checkpoint_start( ut_ad(UT_LIST_GET_LEN(log_sys->log_groups) == 1); group = UT_LIST_GET_FIRST(log_sys->log_groups); + const lsn_t end_lsn = mach_read_from_8( + buf + LOG_CHECKPOINT_END_LSN); ut_ad(recv_sys->n_addrs == 0); contiguous_lsn = checkpoint_lsn; @@ -3432,38 +3164,51 @@ recv_recovery_from_checkpoint_start( log_mutex_exit(); return(recv_log_format_0_recover(checkpoint_lsn)); case LOG_HEADER_FORMAT_CURRENT: - break; + case LOG_HEADER_FORMAT_CURRENT | LOG_HEADER_FORMAT_ENCRYPTED: + if (end_lsn == 0) { + break; + } + if (end_lsn >= checkpoint_lsn) { + contiguous_lsn = end_lsn; + break; + } + /* fall through */ default: - ut_ad(0); recv_sys->found_corrupt_log = true; log_mutex_exit(); return(DB_ERROR); } /* Look for MLOG_CHECKPOINT. */ - recv_group_scan_log_recs(group, &contiguous_lsn, false, &err); + recv_group_scan_log_recs(group, checkpoint_lsn, &contiguous_lsn, + false); /* The first scan should not have stored or applied any records. */ ut_ad(recv_sys->n_addrs == 0); ut_ad(!recv_sys->found_corrupt_fs); + if (srv_read_only_mode && recv_needed_recovery) { + log_mutex_exit(); + return(DB_READ_ONLY); + } + if (recv_sys->found_corrupt_log && !srv_force_recovery) { log_mutex_exit(); - ib::error() << "Found corrupted log when looking checkpoint lsn: " - << contiguous_lsn << " error = " << err; + ib::warn() << "Log scan aborted at LSN " << contiguous_lsn; return(DB_ERROR); } if (recv_sys->mlog_checkpoint_lsn == 0) { - if (!srv_read_only_mode - && group->scanned_lsn != checkpoint_lsn) { - ib::error() << "Ignoring the redo log due to missing" - " MLOG_CHECKPOINT between the checkpoint " - << checkpoint_lsn << " and the end " - << group->scanned_lsn << "."; - if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { - log_mutex_exit(); - return(DB_ERROR); + lsn_t scan_lsn = group->scanned_lsn; + if (!srv_read_only_mode && scan_lsn != checkpoint_lsn) { + log_mutex_exit(); + ib::error err; + err << "Missing MLOG_CHECKPOINT"; + if (end_lsn) { + err << " at " << end_lsn; } + err << " between the checkpoint " << checkpoint_lsn + << " and the end " << scan_lsn << "."; + return(DB_ERROR); } group->scanned_lsn = checkpoint_lsn; @@ -3471,13 +3216,11 @@ recv_recovery_from_checkpoint_start( } else { contiguous_lsn = checkpoint_lsn; rescan = recv_group_scan_log_recs( - group, &contiguous_lsn, false, &err); + group, checkpoint_lsn, &contiguous_lsn, false); if ((recv_sys->found_corrupt_log && !srv_force_recovery) || recv_sys->found_corrupt_fs) { log_mutex_exit(); - ib::error() << "Found corrupted log in lsn:" - << contiguous_lsn << " err = " << err; return(DB_ERROR); } } @@ -3505,13 +3248,13 @@ recv_recovery_from_checkpoint_start( << " in the ib_logfiles!"; if (srv_read_only_mode) { - ib::error() << "Can't initiate database" - " recovery, running in read-only-mode."; + ib::error() << "innodb_read_only" + " prevents crash recovery"; log_mutex_exit(); return(DB_READ_ONLY); } - recv_init_crash_recovery(); + recv_needed_recovery = true; } } @@ -3528,15 +3271,13 @@ recv_recovery_from_checkpoint_start( if (rescan) { contiguous_lsn = checkpoint_lsn; - recv_group_scan_log_recs(group, &contiguous_lsn, true, &err); + recv_group_scan_log_recs(group, checkpoint_lsn, + &contiguous_lsn, true); if ((recv_sys->found_corrupt_log && !srv_force_recovery) || recv_sys->found_corrupt_fs) { log_mutex_exit(); - ib::error() << "Found corrupted log in lsn:" - << contiguous_lsn << " err = " << err; - return(DB_ERROR); } } @@ -3562,11 +3303,6 @@ recv_recovery_from_checkpoint_start( ib::error() << "Recovered only to lsn:" << recv_sys->recovered_lsn << " checkpoint_lsn: " << checkpoint_lsn; - /* No harm in trying to do RO access. */ - if (!srv_read_only_mode) { - ut_error; - } - return(DB_ERROR); } @@ -3576,10 +3312,6 @@ recv_recovery_from_checkpoint_start( log_sys->next_checkpoint_lsn = checkpoint_lsn; log_sys->next_checkpoint_no = checkpoint_no + 1; - /* here the checkpoint info is written without any redo logging ongoing - * and next_checkpoint_no is updated directly hence no +1 */ - log_crypt_set_ver_and_key(log_sys->next_checkpoint_no); - recv_synchronize_groups(); if (!recv_needed_recovery) { @@ -3588,8 +3320,6 @@ recv_recovery_from_checkpoint_start( srv_start_lsn = recv_sys->recovered_lsn; } - ut_memcpy(log_sys->buf, recv_sys->last_block, OS_FILE_LOG_BLOCK_SIZE); - log_sys->buf_free = (ulint) log_sys->lsn % OS_FILE_LOG_BLOCK_SIZE; log_sys->buf_next_to_write = log_sys->buf_free; log_sys->write_lsn = log_sys->lsn; @@ -3605,8 +3335,7 @@ recv_recovery_from_checkpoint_start( MONITOR_SET(MONITOR_LSN_CHECKPOINT_AGE, log_sys->lsn - log_sys->last_checkpoint_lsn); - log_sys->next_checkpoint_no = checkpoint_no + 1; - log_crypt_set_ver_and_key(log_sys->next_checkpoint_no); + log_sys->next_checkpoint_no = ++checkpoint_no; mutex_enter(&recv_sys->mutex); @@ -3660,42 +3389,6 @@ recv_recovery_from_checkpoint_finish(void) /* Free up the flush_rbt. */ buf_flush_free_flush_rbt(); - - /* Validate a few system page types that were left uninitialized - by older versions of MySQL. */ - mtr_t mtr; - buf_block_t* block; - mtr.start(); - mtr.set_sys_modified(); - /* Bitmap page types will be reset in buf_dblwr_check_block() - without redo logging. */ - block = buf_page_get( - page_id_t(IBUF_SPACE_ID, FSP_IBUF_HEADER_PAGE_NO), - univ_page_size, RW_X_LATCH, &mtr); - fil_block_check_type(block, FIL_PAGE_TYPE_SYS, &mtr); - /* Already MySQL 3.23.53 initialized FSP_IBUF_TREE_ROOT_PAGE_NO - to FIL_PAGE_INDEX. No need to reset that one. */ - block = buf_page_get( - page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO), - univ_page_size, RW_X_LATCH, &mtr); - fil_block_check_type(block, FIL_PAGE_TYPE_TRX_SYS, &mtr); - block = buf_page_get( - page_id_t(TRX_SYS_SPACE, FSP_FIRST_RSEG_PAGE_NO), - univ_page_size, RW_X_LATCH, &mtr); - fil_block_check_type(block, FIL_PAGE_TYPE_SYS, &mtr); - block = buf_page_get( - page_id_t(TRX_SYS_SPACE, FSP_DICT_HDR_PAGE_NO), - univ_page_size, RW_X_LATCH, &mtr); - fil_block_check_type(block, FIL_PAGE_TYPE_SYS, &mtr); - mtr.commit(); - - /* Roll back any recovered data dictionary transactions, so - that the data dictionary tables will be free of any locks. - The data dictionary latch should guarantee that there is at - most one data dictionary transaction active at a time. */ - if (srv_force_recovery < SRV_FORCE_NO_TRX_UNDO) { - trx_rollback_or_clean_recovered(FALSE); - } } /********************************************************//** @@ -3718,8 +3411,6 @@ recv_recovery_rollback_active(void) /* Drop partially created indexes. */ row_merge_drop_temp_indexes(); - /* Drop temporary tables. */ - row_mysql_drop_temp_tables(); /* Drop any auxiliary tables that were not dropped when the parent table was dropped. This can happen if the parent table @@ -3746,18 +3437,14 @@ recv_reset_logs( which we add LOG_BLOCK_HDR_SIZE */ { - log_group_t* group; - ut_ad(log_mutex_own()); log_sys->lsn = ut_uint64_align_up(lsn, OS_FILE_LOG_BLOCK_SIZE); - group = UT_LIST_GET_FIRST(log_sys->log_groups); - - while (group) { + for (log_group_t* group = UT_LIST_GET_FIRST(log_sys->log_groups); + group; group = UT_LIST_GET_NEXT(log_groups, group)) { group->lsn = log_sys->lsn; group->lsn_offset = LOG_FILE_HDR_SIZE; - group = UT_LIST_GET_NEXT(log_groups, group); } log_sys->buf_next_to_write = 0; @@ -3938,9 +3625,6 @@ get_mlog_string(mlog_id_t type) case MLOG_COMP_REC_CLUST_DELETE_MARK: return("MLOG_COMP_REC_CLUST_DELETE_MARK"); - case MLOG_COMP_REC_SEC_DELETE_MARK: - return("MLOG_COMP_REC_SEC_DELETE_MARK"); - case MLOG_COMP_REC_UPDATE_IN_PLACE: return("MLOG_COMP_REC_UPDATE_IN_PLACE"); diff --git a/storage/innobase/mem/mem0mem.cc b/storage/innobase/mem/mem0mem.cc index ff793821895..d067bbaa803 100644 --- a/storage/innobase/mem/mem0mem.cc +++ b/storage/innobase/mem/mem0mem.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -272,7 +273,7 @@ mem_heap_create_block_func( ulint n, /*!< in: number of bytes needed for user data */ #ifdef UNIV_DEBUG const char* file_name,/*!< in: file name where created */ - ulint line, /*!< in: line where created */ + unsigned line, /*!< in: line where created */ #endif /* UNIV_DEBUG */ ulint type) /*!< in: type of heap: MEM_HEAP_DYNAMIC or MEM_HEAP_BUFFER */ diff --git a/storage/innobase/mtr/mtr0log.cc b/storage/innobase/mtr/mtr0log.cc index a63ad40a3b0..783fdcd05ac 100644 --- a/storage/innobase/mtr/mtr0log.cc +++ b/storage/innobase/mtr/mtr0log.cc @@ -101,7 +101,7 @@ mlog_parse_initial_log_record( return(NULL); } - *type = (mlog_id_t)((ulint)*ptr & ~MLOG_SINGLE_REC_FLAG); + *type = mlog_id_t(*ptr & ~MLOG_SINGLE_REC_FLAG); ut_ad(*type <= MLOG_BIGGEST_TYPE || EXTRA_CHECK_MLOG_NUMBER(*type)); ptr++; diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc index 736933bdaed..c19d2131d1e 100644 --- a/storage/innobase/mtr/mtr0mtr.cc +++ b/storage/innobase/mtr/mtr0mtr.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -120,12 +121,14 @@ struct FindPage FindPage(const void* ptr, ulint flags) : m_ptr(ptr), m_flags(flags), m_slot(NULL) { + /* There must be some flags to look for. */ + ut_ad(flags); /* We can only look for page-related flags. */ - ut_ad(!(flags & ~(MTR_MEMO_PAGE_S_FIX - | MTR_MEMO_PAGE_X_FIX - | MTR_MEMO_PAGE_SX_FIX - | MTR_MEMO_BUF_FIX - | MTR_MEMO_MODIFY))); + ut_ad(!(flags & ulint(~(MTR_MEMO_PAGE_S_FIX + | MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_SX_FIX + | MTR_MEMO_BUF_FIX + | MTR_MEMO_MODIFY)))); } /** Visit a memo entry. @@ -148,6 +151,11 @@ struct FindPage return(true); } + ut_ad(!(m_flags & (MTR_MEMO_PAGE_S_FIX + | MTR_MEMO_PAGE_SX_FIX + | MTR_MEMO_PAGE_X_FIX)) + || rw_lock_own_flagged(&block->lock, m_flags)); + m_slot = slot; return(false); } @@ -672,7 +680,7 @@ NOTE: use mtr_x_lock_space(). @param[in] line line number in file @return the tablespace object (never NULL) */ fil_space_t* -mtr_t::x_lock_space(ulint space_id, const char* file, ulint line) +mtr_t::x_lock_space(ulint space_id, const char* file, unsigned line) { fil_space_t* space; @@ -1009,14 +1017,30 @@ mtr_t::release_free_extents(ulint n_reserved) @return true if contains */ bool mtr_t::memo_contains( - mtr_buf_t* memo, - const void* object, - ulint type) + const mtr_buf_t* memo, + const void* object, + ulint type) { Find find(object, type); Iterate iterator(find); - return(!memo->for_each_block_in_reverse(iterator)); + if (memo->for_each_block_in_reverse(iterator)) { + return(false); + } + + switch (type) { + case MTR_MEMO_X_LOCK: + ut_ad(rw_lock_own((rw_lock_t*) object, RW_LOCK_X)); + break; + case MTR_MEMO_SX_LOCK: + ut_ad(rw_lock_own((rw_lock_t*) object, RW_LOCK_SX)); + break; + case MTR_MEMO_S_LOCK: + ut_ad(rw_lock_own((rw_lock_t*) object, RW_LOCK_S)); + break; + } + + return(true); } /** Debug check for flags */ @@ -1026,20 +1050,56 @@ struct FlaggedCheck { m_ptr(ptr), m_flags(flags) { - // Do nothing + /* There must be some flags to look for. */ + ut_ad(flags); + /* Look for rw-lock-related and page-related flags. */ + ut_ad(!(flags & ulint(~(MTR_MEMO_PAGE_S_FIX + | MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_SX_FIX + | MTR_MEMO_BUF_FIX + | MTR_MEMO_MODIFY + | MTR_MEMO_X_LOCK + | MTR_MEMO_SX_LOCK + | MTR_MEMO_S_LOCK)))); + /* Either some rw-lock-related or page-related flags + must be specified, but not both at the same time. */ + ut_ad(!(flags & (MTR_MEMO_PAGE_S_FIX + | MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_SX_FIX + | MTR_MEMO_BUF_FIX + | MTR_MEMO_MODIFY)) + == !!(flags & (MTR_MEMO_X_LOCK + | MTR_MEMO_SX_LOCK + | MTR_MEMO_S_LOCK))); } + /** Visit a memo entry. + @param[in] slot memo entry to visit + @retval false if m_ptr was found + @retval true if the iteration should continue */ bool operator()(const mtr_memo_slot_t* slot) const { - if (m_ptr == slot->object && (m_flags & slot->type)) { - return(false); + if (m_ptr != slot->object || !(m_flags & slot->type)) { + return(true); } - return(true); + if (ulint flags = m_flags & (MTR_MEMO_PAGE_S_FIX + | MTR_MEMO_PAGE_SX_FIX + | MTR_MEMO_PAGE_X_FIX)) { + rw_lock_t* lock = &static_cast( + const_cast(m_ptr))->lock; + ut_ad(rw_lock_own_flagged(lock, flags)); + } else { + rw_lock_t* lock = static_cast( + const_cast(m_ptr)); + ut_ad(rw_lock_own_flagged(lock, m_flags >> 5)); + } + + return(false); } - const void* m_ptr; - ulint m_flags; + const void*const m_ptr; + const ulint m_flags; }; /** Check if memo contains the given item. diff --git a/storage/innobase/mysql-test/storage_engine/define_engine.inc b/storage/innobase/mysql-test/storage_engine/define_engine.inc index 77e384d2351..7d7b0c7407a 100644 --- a/storage/innobase/mysql-test/storage_engine/define_engine.inc +++ b/storage/innobase/mysql-test/storage_engine/define_engine.inc @@ -41,9 +41,5 @@ let $default_char_type = CHAR(8); # e.g. creation of an additional schema or table, etc. # The cleanup part should be defined in cleanup_engine.inc -CALL mtr.add_suppression("InnoDB: Resizing redo log from .* to .* pages, LSN=.*"); -CALL mtr.add_suppression("InnoDB: Starting to delete and rewrite log files."); -CALL mtr.add_suppression("InnoDB: New log files created, LSN=.*"); - --enable_query_log --enable_result_log diff --git a/storage/innobase/mysql-test/storage_engine/tbl_opt_key_block_size.opt b/storage/innobase/mysql-test/storage_engine/tbl_opt_key_block_size.opt deleted file mode 100644 index 7cd737b2b87..00000000000 --- a/storage/innobase/mysql-test/storage_engine/tbl_opt_key_block_size.opt +++ /dev/null @@ -1,3 +0,0 @@ ---innodb-file-per-table=1 ---innodb-file-format=Barracuda - diff --git a/storage/innobase/mysql-test/storage_engine/tbl_opt_row_format.opt b/storage/innobase/mysql-test/storage_engine/tbl_opt_row_format.opt deleted file mode 100644 index 7cd737b2b87..00000000000 --- a/storage/innobase/mysql-test/storage_engine/tbl_opt_row_format.opt +++ /dev/null @@ -1,3 +0,0 @@ ---innodb-file-per-table=1 ---innodb-file-format=Barracuda - diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 5755707d710..d08ddb4583d 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -2,7 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Percona Inc.. Those modifications are @@ -44,6 +44,11 @@ Created 10/21/1995 Heikki Tuuri #include "os0file.ic" #endif +#ifdef UNIV_LINUX +#include +#include +#endif + #include "srv0srv.h" #include "srv0start.h" #include "fil0fil.h" @@ -68,17 +73,6 @@ Created 10/21/1995 Heikki Tuuri # include #endif /* HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE */ -#ifdef HAVE_LZ4 -#include -#endif - -#include - -#ifdef UNIV_DEBUG -/** Set when InnoDB has invoked exit(). */ -bool innodb_calling_exit; -#endif /* UNIV_DEBUG */ - #if defined(UNIV_LINUX) && defined(HAVE_SYS_IOCTL_H) # include # ifndef DFS_IOCTL_ATOMIC_WRITE_SET @@ -94,17 +88,8 @@ bool innodb_calling_exit; #include #endif -#ifdef HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE -# include -# include -#endif /* HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE */ - -#ifdef HAVE_LZO -#include "lzo/lzo1x.h" -#endif - -#ifdef HAVE_SNAPPY -#include "snappy-c.h" +#ifdef _WIN32 +#include #endif /** Insert buffer segment id */ @@ -116,30 +101,6 @@ static const ulint IO_LOG_SEGMENT = 1; /** Number of retries for partial I/O's */ static const ulint NUM_RETRIES_ON_PARTIAL_IO = 10; -/** Blocks for doing IO, used in the transparent compression -and encryption code. */ -struct Block { - /** Default constructor */ - Block() : m_ptr(), m_in_use() { } - - byte* m_ptr; - - byte pad[CACHE_LINE_SIZE - sizeof(ulint)]; - int32 m_in_use; -}; - -/** For storing the allocated blocks */ -typedef std::vector Blocks; - -/** Block collection */ -static Blocks* block_cache; - -/** Number of blocks to allocate for sync read/writes */ -static const size_t MAX_BLOCKS = 128; - -/** Block buffer size */ -#define BUFFER_BLOCK_SIZE ((ulint)(UNIV_PAGE_SIZE * 1.3)) - /* This specifies the file permissions InnoDB uses when it creates files in Unix; the value of os_innodb_umask is initialized in ha_innodb.cc to my_umask */ @@ -257,8 +218,6 @@ struct Slot { /** buffer used in i/o */ byte* buf; - ulint is_log; /*!< 1 if OS_FILE_LOG or 0 */ - ulint page_size; /*!< UNIV_PAGE_SIZE or zip_size */ /** Buffer pointer used for actual IO. We advance this when partial IO is required and not buf */ @@ -327,19 +286,6 @@ struct Slot { /** Length of the block before it was compressed */ uint32 original_len; - /** Buffer block for compressed pages or encrypted pages */ - Block* buf_block; - - /** Unaligned buffer for compressed pages */ - byte* compressed_ptr; - - /** Compressed data page, aligned and derived from compressed_ptr */ - byte* compressed_page; - - /** true, if we shouldn't punch a hole after writing the page */ - bool skip_punch_hole; - - ulint* write_size; }; /** The asynchronous i/o array structure */ @@ -381,8 +327,7 @@ public: const char* name, void* buf, os_offset_t offset, - ulint len, - ulint* write_size) + ulint len) MY_ATTRIBUTE((warn_unused_result)); /** @return number of reserved slots */ @@ -421,7 +366,7 @@ public: void print(FILE* file); /** @return the number of slots per segment */ - ulint slots_per_segment() const + unsigned slots_per_segment() const MY_ATTRIBUTE((warn_unused_result)) { return(m_slots.size() / m_n_segments); @@ -492,7 +437,7 @@ public: @param[in] max_events number of events @param[out] io_ctx io_ctx to initialize. @return true on success. */ - static bool linux_create_io_ctx(ulint max_events, io_context_t* io_ctx) + static bool linux_create_io_ctx(unsigned max_events, io_context_t* io_ctx) MY_ATTRIBUTE((warn_unused_result)); /** Checks if the system supports native linux aio. On some kernel @@ -519,8 +464,6 @@ public: must call os_aio_simulated_wake_handler_threads later to ensure the threads are not left sleeping! */ static void simulated_put_read_threads_to_sleep(); - - #endif /* _WIN32 */ /** Create an instance using new(std::nothrow) @@ -666,11 +609,13 @@ private: ulint m_n_segments; /** The event which is set to the signaled state when - there is space in the aio outside the ibuf segment */ + there is space in the aio outside the ibuf segment; + os_event_set() and os_event_reset() are protected by AIO::m_mutex */ os_event_t m_not_full; /** The event which is set to the signaled state when - there are no pending i/os in this array */ + there are no pending i/os in this array; + os_event_set() and os_event_reset() are protected by AIO::m_mutex */ os_event_t m_is_empty; /** Number of reserved slots in the AIO array outside @@ -730,7 +675,7 @@ static const int OS_AIO_IO_SETUP_RETRY_ATTEMPTS = 5; #endif /* LINUX_NATIVE_AIO */ /** Array of events used in simulated AIO */ -static os_event_t* os_aio_segment_wait_events = NULL; +static os_event_t* os_aio_segment_wait_events; /** Number of asynchronous I/O segments. Set by os_aio_init(). */ static ulint os_aio_n_segments = ULINT_UNDEFINED; @@ -790,26 +735,6 @@ os_file_handle_error_no_exit( const char* operation, bool silent); -/** Decompress after a read and punch a hole in the file if it was a write -@param[in] type IO context -@param[in] fh Open file handle -@param[in,out] buf Buffer to transform -@param[in,out] scratch Scratch area for read decompression -@param[in] src_len Length of the buffer before compression -@param[in] len Compressed buffer length for write and size - of buf len for read -@return DB_SUCCESS or error code */ -static -dberr_t -os_file_io_complete( - const IORequest&type, - os_file_t fh, - byte* buf, - byte* scratch, - ulint src_len, - ulint offset, - ulint len); - /** Does simulated AIO. This function should be called by an i/o-handler thread. @@ -832,6 +757,142 @@ os_aio_simulated_handler( void** m2, IORequest* type); +#ifdef _WIN32 +static HANDLE win_get_syncio_event(); +#endif + +#ifdef _WIN32 +/** + Wrapper around Windows DeviceIoControl() function. + + Works synchronously, also in case for handle opened + for async access (i.e with FILE_FLAG_OVERLAPPED). + + Accepts the same parameters as DeviceIoControl(),except + last parameter (OVERLAPPED). +*/ +static +BOOL +os_win32_device_io_control( + HANDLE handle, + DWORD code, + LPVOID inbuf, + DWORD inbuf_size, + LPVOID outbuf, + DWORD outbuf_size, + LPDWORD bytes_returned +) +{ + OVERLAPPED overlapped = { 0 }; + overlapped.hEvent = win_get_syncio_event(); + BOOL result = DeviceIoControl(handle, code, inbuf, inbuf_size, outbuf, + outbuf_size, bytes_returned, &overlapped); + + if (!result && (GetLastError() == ERROR_IO_PENDING)) { + /* Wait for async io to complete */ + result = GetOverlappedResult(handle, &overlapped, bytes_returned, TRUE); + } + + return result; +} + +#endif + +/***********************************************************************//** +Try to get number of bytes per sector from file system. +@return file block size */ +UNIV_INTERN +ulint +os_file_get_block_size( +/*===================*/ + os_file_t file, /*!< in: handle to a file */ + const char* name) /*!< in: file name */ +{ + ulint fblock_size = 512; + +#if defined(UNIV_LINUX) + struct stat local_stat; + int err; + + err = fstat((int)file, &local_stat); + + if (err != 0) { + os_file_handle_error_no_exit(name, "fstat()", FALSE); + } else { + fblock_size = local_stat.st_blksize; + } +#endif /* UNIV_LINUX */ +#ifdef _WIN32 + + fblock_size = 0; + + // Open volume for this file, find out it "physical bytes per sector" + + HANDLE volume_handle = INVALID_HANDLE_VALUE; + char volume[MAX_PATH + 4]="\\\\.\\"; // Special prefix required for volume names. + if (!GetVolumePathName(name , volume + 4, MAX_PATH)) { + os_file_handle_error_no_exit(name, + "GetVolumePathName()", FALSE); + goto end; + } + + size_t len = strlen(volume); + if (volume[len - 1] == '\\') { + // Trim trailing backslash from volume name. + volume[len - 1] = 0; + } + + volume_handle = CreateFile(volume, FILE_READ_ATTRIBUTES, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + 0, OPEN_EXISTING, 0, 0); + + if (volume_handle == INVALID_HANDLE_VALUE) { + os_file_handle_error_no_exit(volume, + "CreateFile()", FALSE); + goto end; + } + + DWORD tmp; + STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR disk_alignment; + + STORAGE_PROPERTY_QUERY storage_query; + memset(&storage_query, 0, sizeof(storage_query)); + storage_query.PropertyId = StorageAccessAlignmentProperty; + storage_query.QueryType = PropertyStandardQuery; + + BOOL result = os_win32_device_io_control(volume_handle, + IOCTL_STORAGE_QUERY_PROPERTY, + &storage_query, + sizeof(storage_query), + &disk_alignment, + sizeof(disk_alignment), + &tmp); + + CloseHandle(volume_handle); + + if (!result) { + os_file_handle_error_no_exit(volume, + "DeviceIoControl(IOCTL_STORAGE_QUERY_PROPERTY)", FALSE); + goto end; + } + + fblock_size = disk_alignment.BytesPerPhysicalSector; + +end: +#endif /* _WIN32 */ + + /* Currently we support file block size up to 4Kb */ + if (fblock_size > 4096 || fblock_size < 512) { + if (fblock_size < 512) { + fblock_size = 512; + } else { + fblock_size = 4096; + } + } + + return fblock_size; +} + #ifdef WIN_ASYNC_IO /** This function is only used in Windows asynchronous i/o. Waits for an aio operation to complete. This function is used to wait the @@ -866,166 +927,12 @@ os_aio_windows_handler( IORequest* type); #endif /* WIN_ASYNC_IO */ -#ifdef MYSQL_COMPRESSION -/** Allocate a page for sync IO -@return pointer to page */ -static -Block* -os_alloc_block() -{ - size_t pos; - Blocks& blocks = *block_cache; - size_t i = static_cast(my_timer_cycles()); - const size_t size = blocks.size(); - ulint retry = 0; - Block* block; - - DBUG_EXECUTE_IF("os_block_cache_busy", retry = MAX_BLOCKS * 3;); - - for (;;) { - - /* After go through the block cache for 3 times, - allocate a new temporary block. */ - if (retry == MAX_BLOCKS * 3) { - byte* ptr; - - ptr = static_cast( - ut_malloc_nokey(sizeof(*block) - + BUFFER_BLOCK_SIZE)); - - block = new (ptr) Block(); - block->m_ptr = static_cast( - ptr + sizeof(*block)); - block->m_in_use = 1; - - break; - } - - pos = i++ % size; - - if (my_atomic_fas32_explicit(&blocks[pos].m_in_use, 1, - MY_MEMORY_ORDER_ACQUIRE) == 0) { - block = &blocks[pos]; - break; - } - - os_thread_yield(); - - ++retry; - } - - ut_a(block->m_in_use != 0); - - return(block); -} - -/** Free a page after sync IO -@param[in,own] block The block to free/release */ -static -void -os_free_block(Block* block) -{ - ut_ad(block->m_in_use == 1); - - my_atomic_store32_explicit(&block->m_in_use, 0, MY_MEMORY_ORDER_RELEASE); - - /* When this block is not in the block cache, and it's - a temporary block, we need to free it directly. */ - if (std::less()(block, &block_cache->front()) - || std::greater()(block, &block_cache->back())) { - ut_free(block); - } -} -#endif /* MYSQL_COMPRESSION */ - /** Generic AIO Handler methods. Currently handles IO post processing. */ class AIOHandler { public: /** Do any post processing after a read/write @return DB_SUCCESS or error code. */ static dberr_t post_io_processing(Slot* slot); - - /** Decompress after a read and punch a hole in the file if - it was a write */ - static dberr_t io_complete(const Slot* slot) - { - ut_a(slot->offset > 0); - ut_a(slot->type.is_read() || !slot->skip_punch_hole); - - return(os_file_io_complete( - slot->type, slot->file, slot->buf, - slot->compressed_page, slot->original_len, - static_cast(slot->offset), - slot->len)); - } - -private: - /** Check whether the page was encrypted. - @param[in] slot The slot that contains the IO request - @return true if it was an encyrpted page */ - static bool is_encrypted_page(const Slot* slot) - { -#ifdef MYSQL_ENCRYPTION - return(Encryption::is_encrypted_page(slot->buf)); -#else - return (false); -#endif - } - - /** Check whether the page was compressed. - @param[in] slot The slot that contains the IO request - @return true if it was a compressed page */ - static bool is_compressed_page(const Slot* slot) - { - const byte* src = slot->buf; - - ulint page_type = mach_read_from_2(src + FIL_PAGE_TYPE); - - return(page_type == FIL_PAGE_COMPRESSED); - } - - /** Get the compressed page size. - @param[in] slot The slot that contains the IO request - @return number of bytes to read for a successful decompress */ - static ulint compressed_page_size(const Slot* slot) - { - ut_ad(slot->type.is_read()); - ut_ad(is_compressed_page(slot)); - - ulint size; - const byte* src = slot->buf; - - size = mach_read_from_2(src + FIL_PAGE_COMPRESS_SIZE_V1); - - return(size + FIL_PAGE_DATA); - } - - /** Check if the page contents can be decompressed. - @param[in] slot The slot that contains the IO request - @return true if the data read has all the compressed data */ - static bool can_decompress(const Slot* slot) - { - ut_ad(slot->type.is_read()); - ut_ad(is_compressed_page(slot)); - - ulint version; - const byte* src = slot->buf; - - version = mach_read_from_1(src + FIL_PAGE_VERSION); - - ut_a(version == 1); - - /* Includes the page header size too */ - ulint size = compressed_page_size(slot); - - return(size <= (slot->ptr - slot->buf) + (ulint) slot->n_bytes); - } - - /** Check if we need to read some more data. - @param[in] slot The slot that contains the IO request - @param[in] n_bytes Total bytes read so far - @return DB_SUCCESS or error code */ - static dberr_t check_read(Slot* slot, ulint n_bytes); }; /** Helper class for doing synchronous file IO. Currently, the objective @@ -1091,171 +998,17 @@ private: os_offset_t m_offset; }; -/** If it is a compressed page return the compressed page data + footer size -@param[in] buf Buffer to check, must include header + 10 bytes -@return ULINT_UNDEFINED if the page is not a compressed page or length - of the compressed data (including footer) if it is a compressed page */ -ulint -os_file_compressed_page_size(const byte* buf) -{ - ulint type = mach_read_from_2(buf + FIL_PAGE_TYPE); - - if (type == FIL_PAGE_COMPRESSED) { - ulint version = mach_read_from_1(buf + FIL_PAGE_VERSION); - ut_a(version == 1); - return(mach_read_from_2(buf + FIL_PAGE_COMPRESS_SIZE_V1)); - } - - return(ULINT_UNDEFINED); -} - -/** If it is a compressed page return the original page data + footer size -@param[in] buf Buffer to check, must include header + 10 bytes -@return ULINT_UNDEFINED if the page is not a compressed page or length - of the original data + footer if it is a compressed page */ -ulint -os_file_original_page_size(const byte* buf) -{ - ulint type = mach_read_from_2(buf + FIL_PAGE_TYPE); - - if (type == FIL_PAGE_COMPRESSED) { - - ulint version = mach_read_from_1(buf + FIL_PAGE_VERSION); - ut_a(version == 1); - - return(mach_read_from_2(buf + FIL_PAGE_ORIGINAL_SIZE_V1)); - } - - return(ULINT_UNDEFINED); -} - -/** Check if we need to read some more data. -@param[in] slot The slot that contains the IO request -@param[in] n_bytes Total bytes read so far -@return DB_SUCCESS or error code */ -dberr_t -AIOHandler::check_read(Slot* slot, ulint n_bytes) -{ - dberr_t err=DB_SUCCESS; - - ut_ad(slot->type.is_read()); - ut_ad(slot->original_len > slot->len); - - if (is_compressed_page(slot)) { - - if (can_decompress(slot)) { - - ut_a(slot->offset > 0); - - slot->len = slot->original_len; -#ifdef _WIN32 - slot->n_bytes = static_cast(n_bytes); -#else - slot->n_bytes = static_cast(n_bytes); -#endif /* _WIN32 */ - - err = io_complete(slot); - ut_a(err == DB_SUCCESS); - - } else { - /* Read the next block in */ - ut_ad(compressed_page_size(slot) >= n_bytes); - - err = DB_FAIL; - } - } else if (is_encrypted_page(slot)) { - ut_a(slot->offset > 0); - - slot->len = slot->original_len; -#ifdef _WIN32 - slot->n_bytes = static_cast(n_bytes); -#else - slot->n_bytes = static_cast(n_bytes); -#endif /* _WIN32 */ - - err = io_complete(slot); - ut_a(err == DB_SUCCESS); - - } else { - err = DB_FAIL; - } - -#ifdef MYSQL_COMPRESSION - if (slot->buf_block != NULL) { - os_free_block(slot->buf_block); - slot->buf_block = NULL; - } -#endif - return(err); -} - /** Do any post processing after a read/write @return DB_SUCCESS or error code. */ dberr_t AIOHandler::post_io_processing(Slot* slot) { - dberr_t err=DB_SUCCESS; - ut_ad(slot->is_reserved); /* Total bytes read so far */ ulint n_bytes = (slot->ptr - slot->buf) + slot->n_bytes; - /* Compressed writes can be smaller than the original length. - Therefore they can be processed without further IO. */ - if (n_bytes == slot->original_len - || (slot->type.is_write() - && slot->type.is_compressed() - && slot->len == static_cast(slot->n_bytes))) { - -#ifdef MYSQL_COMPRESSION - if (!slot->type.is_log() - && (is_compressed_page(slot) - || is_encrypted_page(slot))) { - - ut_a(slot->offset > 0); - - if (slot->type.is_read()) { - slot->len = slot->original_len; - } - - /* The punch hole has been done on collect() */ - - if (slot->type.is_read()) { - err = io_complete(slot); - } else { - err = DB_SUCCESS; - } - - ut_ad(err == DB_SUCCESS - || err == DB_UNSUPPORTED - || err == DB_CORRUPTION - || err == DB_IO_DECOMPRESS_FAIL); - } else { - - err = DB_SUCCESS; - } - - if (slot->buf_block != NULL) { - os_free_block(slot->buf_block); - slot->buf_block = NULL; - } -#endif /* MYSQL_COMPRESSION */ - } else if ((ulint) slot->n_bytes == (ulint) slot->len) { - - /* It *must* be a partial read. */ - ut_ad(slot->len < slot->original_len); - - /* Has to be a read request, if it is less than - the original length. */ - ut_ad(slot->type.is_read()); - err = check_read(slot, n_bytes); - - } else { - err = DB_FAIL; - } - - return(err); + return(n_bytes == slot->original_len ? DB_SUCCESS : DB_FAIL); } /** Count the number of free slots @@ -1291,155 +1044,6 @@ AIO::pending_io_count() const return(reserved); } -#ifdef MYSQL_COMPRESSION -/** Compress a data page -#param[in] block_size File system block size -@param[in] src Source contents to compress -@param[in] src_len Length in bytes of the source -@param[out] dst Compressed page contents -@param[out] dst_len Length in bytes of dst contents -@return buffer data, dst_len will have the length of the data */ -static -byte* -os_file_compress_page( - Compression compression, - ulint block_size, - byte* src, - ulint src_len, - byte* dst, - ulint* dst_len) -{ - ulint len = 0; - ulint compression_level = page_zip_level; - ulint page_type = mach_read_from_2(src + FIL_PAGE_TYPE); - - /* The page size must be a multiple of the OS punch hole size. */ - ut_ad(!(src_len % block_size)); - - /* Shouldn't compress an already compressed page. */ - ut_ad(page_type != FIL_PAGE_COMPRESSED); - - /* The page must be at least twice as large as the file system - block size if we are to save any space. Ignore R-Tree pages for now, - they repurpose the same 8 bytes in the page header. No point in - compressing if the file system block size >= our page size. */ - - if (page_type == FIL_PAGE_RTREE - || block_size == ULINT_UNDEFINED - || compression.m_type == Compression::NONE - || src_len < block_size * 2) { - - *dst_len = src_len; - - return(src); - } - - /* Leave the header alone when compressing. */ - ut_ad(block_size >= FIL_PAGE_DATA * 2); - - ut_ad(src_len > FIL_PAGE_DATA + block_size); - - /* Must compress to <= N-1 FS blocks. */ - ulint out_len = src_len - (FIL_PAGE_DATA + block_size); - - /* This is the original data page size - the page header. */ - ulint content_len = src_len - FIL_PAGE_DATA; - - ut_ad(out_len >= block_size - FIL_PAGE_DATA); - ut_ad(out_len <= src_len - (block_size + FIL_PAGE_DATA)); - - /* Only compress the data + trailer, leave the header alone */ - - switch (compression.m_type) { - case Compression::NONE: - ut_error; - - case Compression::ZLIB: { - - uLongf zlen = static_cast(out_len); - - if (compress2( - dst + FIL_PAGE_DATA, - &zlen, - src + FIL_PAGE_DATA, - static_cast(content_len), - static_cast(compression_level)) != Z_OK) { - - *dst_len = src_len; - - return(src); - } - - len = static_cast(zlen); - - break; - } - -#ifdef HAVE_LZ4 - case Compression::LZ4: - - len = LZ4_compress_limitedOutput( - reinterpret_cast(src) + FIL_PAGE_DATA, - reinterpret_cast(dst) + FIL_PAGE_DATA, - static_cast(content_len), - static_cast(out_len)); - - ut_a(len <= src_len - FIL_PAGE_DATA); - - if (len == 0 || len >= out_len) { - - *dst_len = src_len; - - return(src); - } - - break; -#endif - - default: - *dst_len = src_len; - return(src); - } - - ut_a(len <= out_len); - - ut_ad(memcmp(src + FIL_PAGE_LSN + 4, - src + src_len - FIL_PAGE_END_LSN_OLD_CHKSUM + 4, 4) - == 0); - - /* Copy the header as is. */ - memmove(dst, src, FIL_PAGE_DATA); - - /* Add compression control information. Required for decompressing. */ - mach_write_to_2(dst + FIL_PAGE_TYPE, FIL_PAGE_COMPRESSED); - - mach_write_to_1(dst + FIL_PAGE_VERSION, 1); - - mach_write_to_1(dst + FIL_PAGE_ALGORITHM_V1, compression.m_type); - - mach_write_to_2(dst + FIL_PAGE_ORIGINAL_TYPE_V1, page_type); - - mach_write_to_2(dst + FIL_PAGE_ORIGINAL_SIZE_V1, content_len); - - mach_write_to_2(dst + FIL_PAGE_COMPRESS_SIZE_V1, len); - - /* Round to the next full block size */ - - len += FIL_PAGE_DATA; - - *dst_len = ut_calc_align(len, block_size); - - ut_ad(*dst_len >= len && *dst_len <= out_len + FIL_PAGE_DATA); - - /* Clear out the unused portion of the page. */ - if (len % block_size) { - memset(dst + len, 0x0, block_size - (len % block_size)); - } - - return(dst); -} -#endif /* MYSQL_COMPRESSION */ - #ifdef UNIV_DEBUG /** Validates the consistency the aio system some of the time. @return true if ok or the check was skipped */ @@ -1618,6 +1222,7 @@ os_file_create_tmpfile( const char* path) { FILE* file = NULL; + WAIT_ALLOW_WRITES(); int fd = innobase_mysql_tmpfile(path); if (fd >= 0) { @@ -1659,87 +1264,6 @@ os_file_read_string( } } -/** Decompress after a read and punch a hole in the file if it was a write -@param[in] type IO context -@param[in] fh Open file handle -@param[in,out] buf Buffer to transform -@param[in,out] scratch Scratch area for read decompression -@param[in] src_len Length of the buffer before compression -@param[in] len Used buffer length for write and output - buf len for read -@return DB_SUCCESS or error code */ -static -dberr_t -os_file_io_complete( - const IORequest&type, - os_file_t fh, - byte* buf, - byte* scratch, - ulint src_len, - ulint offset, - ulint len) -{ -#ifdef MYSQL_ENCRYPTION - /* We never compress/decompress the first page */ - ut_a(offset > 0); - ut_ad(type.validate()); - - if (!type.is_compression_enabled()) { - - return(DB_SUCCESS); - - } else if (type.is_read()) { - dberr_t ret = DB_SUCCESS; - Encryption encryption(type.encryption_algorithm()); - - ut_ad(!type.is_log()); - - ret = encryption.decrypt(type, buf, src_len, scratch, len); - if (ret == DB_SUCCESS) { - return(os_file_decompress_page( - type.is_dblwr_recover(), - buf, scratch, len)); - } else { - return(ret); - } - - } else if (type.punch_hole()) { - - ut_ad(len <= src_len); - ut_ad(!type.is_log()); - ut_ad(type.is_write()); - ut_ad(type.is_compressed()); - - /* Nothing to do. */ - if (len == src_len) { - return(DB_SUCCESS); - } - -#ifdef UNIV_DEBUG - const ulint block_size = type.block_size(); -#endif /* UNIV_DEBUG */ - - /* We don't support multiple page sizes in the server - at the moment. */ - ut_ad(src_len == srv_page_size); - - /* Must be a multiple of the compression unit size. */ - ut_ad((len % block_size) == 0); - ut_ad((offset % block_size) == 0); - - ut_ad(len + block_size <= src_len); - - offset += len; - - return(os_file_punch_hole(fh, offset, src_len - len)); - } - - ut_ad(!type.is_log()); -#endif /* MYSQL_ENCRYPTION */ - - return(DB_SUCCESS); -} - /** This function returns a new path name after replacing the basename in an old path with a new basename. The old_path is a full path name including the extension. The tablename is in the normal @@ -2035,132 +1559,6 @@ os_file_create_subdirs_if_needed( return(success ? DB_SUCCESS : DB_ERROR); } -#ifdef MYSQL_COMPRESSION -/** Allocate the buffer for IO on a transparently compressed table. -@param[in] type IO flags -@param[out] buf buffer to read or write -@param[in,out] n number of bytes to read/write, starting from - offset -@return pointer to allocated page, compressed data is written to the offset - that is aligned on UNIV_SECTOR_SIZE of Block.m_ptr */ -static -Block* -os_file_compress_page( - IORequest& type, - void*& buf, - ulint* n) -{ - ut_ad(!type.is_log()); - ut_ad(type.is_write()); - ut_ad(type.is_compressed()); - - ulint n_alloc = *n * 2; - - ut_a(n_alloc <= UNIV_PAGE_SIZE_MAX * 2); -#ifdef HAVE_LZ4 - ut_a(type.compression_algorithm().m_type != Compression::LZ4 - || static_cast(LZ4_COMPRESSBOUND(*n)) < n_alloc); -#endif - - Block* ptr = reinterpret_cast(ut_malloc_nokey(n_alloc)); - - if (ptr == NULL) { - return(NULL); - } - - ulint old_compressed_len; - ulint compressed_len = *n; - - old_compressed_len = mach_read_from_2( - reinterpret_cast(buf) - + FIL_PAGE_COMPRESS_SIZE_V1); - - if (old_compressed_len > 0) { - old_compressed_len = ut_calc_align( - old_compressed_len + FIL_PAGE_DATA, - type.block_size()); - } - - byte* compressed_page; - - compressed_page = static_cast( - ut_align(block->m_ptr, UNIV_SECTOR_SIZE)); - - byte* buf_ptr; - - buf_ptr = os_file_compress_page( - type.compression_algorithm(), - type.block_size(), - reinterpret_cast(buf), - *n, - compressed_page, - &compressed_len); - - if (buf_ptr != buf) { - /* Set new compressed size to uncompressed page. */ - memcpy(reinterpret_cast(buf) + FIL_PAGE_COMPRESS_SIZE_V1, - buf_ptr + FIL_PAGE_COMPRESS_SIZE_V1, 2); - - buf = buf_ptr; - *n = compressed_len; - - if (compressed_len >= old_compressed_len) { - - ut_ad(old_compressed_len <= UNIV_PAGE_SIZE); - - type.clear_punch_hole(); - } - } - - return(block); -} -#endif /* MYSQL_COMPRESSION */ - -#ifdef MYSQL_ENCRYPTION -/** Encrypt a page content when write it to disk. -@param[in] type IO flags -@param[out] buf buffer to read or write -@param[in,out] n number of bytes to read/write, starting from - offset -@return pointer to the encrypted page */ -static -Block* -os_file_encrypt_page( - const IORequest& type, - void*& buf, - ulint* n) -{ - - byte* encrypted_page; - ulint encrypted_len = *n; - byte* buf_ptr; - Encryption encryption(type.encryption_algorithm()); - - ut_ad(!type.is_log()); - ut_ad(type.is_write()); - ut_ad(type.is_encrypted()); - - Block* block = os_alloc_block(); - - encrypted_page = static_cast( - ut_align(block->m_ptr, UNIV_SECTOR_SIZE)); - - buf_ptr = encryption.encrypt(type, - reinterpret_cast(buf), *n, - encrypted_page, &encrypted_len); - - bool encrypted = buf_ptr != buf; - - if (encrypted) { - - buf = buf_ptr; - *n = encrypted_len; - } - - return(block); -} -#endif /* MYSQL_ENCRYPTION */ - #ifndef _WIN32 /** Do the read/write @@ -2180,7 +1578,6 @@ SyncFileIO::execute(const IORequest& request) return(n_bytes); } - /** Free storage space associated with a section of the file. @param[in] fh Open file handle @param[in] off Starting offset (SEEK_SET) @@ -2203,14 +1600,12 @@ os_file_punch_hole_posix( return(DB_SUCCESS); } - ut_a(ret == -1); - if (errno == ENOTSUP) { return(DB_IO_NO_PUNCH_HOLE); } ib::warn() - << "fallocate(" << fh + << "fallocate(" <<", FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, " << off << ", " << len << ") returned errno: " << errno; @@ -2516,17 +1911,17 @@ LinuxAIOHandler::collect() /* We have not overstepped to next segment. */ ut_a(slot->pos < end_pos); - /* We never compress/decompress the first page */ - + /* Deallocate unused blocks from file system. + This is newer done to page 0 or to log files.*/ if (slot->offset > 0 - && !slot->skip_punch_hole - && slot->type.is_compression_enabled() && !slot->type.is_log() && slot->type.is_write() - && slot->type.is_compressed() && slot->type.punch_hole()) { - slot->err = AIOHandler::io_complete(slot); + slot->err = slot->type.punch_hole( + slot->file, + slot->offset, + static_cast(slot->len)); } else { slot->err = DB_SUCCESS; } @@ -2695,16 +2090,7 @@ os_aio_linux_handler( void** m2, IORequest* request) { - LinuxAIOHandler handler(global_segment); - - dberr_t err = handler.poll(m1, m2, request); - - if (err == DB_IO_NO_PUNCH_HOLE) { - fil_no_punch_hole(*m1); - err = DB_SUCCESS; - } - - return(err); + return LinuxAIOHandler(global_segment).poll(m1, m2, request); } /** Dispatch an AIO request to the kernel. @@ -2743,7 +2129,7 @@ AIO::linux_dispatch(Slot* slot) @return true on success. */ bool AIO::linux_create_io_ctx( - ulint max_events, + unsigned max_events, io_context_t* io_ctx) { ssize_t n_retries = 0; @@ -3162,6 +2548,7 @@ os_file_flush_func( { int ret; + WAIT_ALLOW_WRITES(); ret = os_file_fsync_posix(file); if (ret == 0) { @@ -3213,6 +2600,10 @@ os_file_create_simple_func( int create_flag; const char* mode_str = NULL; + if (create_mode != OS_FILE_OPEN && create_mode != OS_FILE_OPEN_RAW) { + WAIT_ALLOW_WRITES(); + } + ut_a(!(create_mode & OS_FILE_ON_ERROR_SILENT)); ut_a(!(create_mode & OS_FILE_ON_ERROR_NO_EXIT)); @@ -3292,8 +2683,8 @@ os_file_create_simple_func( we open the same file in the same mode, see man page of open(2). */ if (!srv_read_only_mode && *success - && (srv_unix_file_flush_method == SRV_UNIX_O_DIRECT - || srv_unix_file_flush_method == SRV_UNIX_O_DIRECT_NO_FSYNC)) { + && (srv_file_flush_method == SRV_O_DIRECT + || srv_file_flush_method == SRV_O_DIRECT_NO_FSYNC)) { os_file_set_nocache(file, name, mode_str); } @@ -3310,26 +2701,6 @@ os_file_create_simple_func( } #endif /* USE_FILE_LOCK */ - /* If we have proper file handle and atomic writes should be used, - try to set atomic writes and if that fails when creating a new - table, produce a error. If atomic writes are used on existing - file, ignore error and use traditional writes for that file */ - /* JAN: TODO: ATOMIC WRITES - if (file != -1 - && (awrites == ATOMIC_WRITES_ON || - (srv_use_atomic_writes && awrites == ATOMIC_WRITES_DEFAULT)) - && !os_file_set_atomic_writes(name, file)) { - if (create_mode == OS_FILE_CREATE) { - fprintf(stderr, "InnoDB: Error: Can't create file using atomic writes\n"); - close(file); - os_file_delete_if_exists_func(name); - *success = FALSE; - file = -1; - } - } - */ - - return(file); } @@ -3348,7 +2719,10 @@ os_file_create_directory( const char* pathname, bool fail_if_exists) { - int rcode = mkdir(pathname, 0770); + int rcode; + + WAIT_ALLOW_WRITES(); + rcode = mkdir(pathname, 0770); if (!(rcode == 0 || (errno == EEXIST && !fail_if_exists))) { /* failure */ @@ -3420,43 +2794,15 @@ os_file_readdir_next_file( int ret; struct stat statinfo; -#ifdef HAVE_READDIR_R - char dirent_buf[sizeof(struct dirent) - + _POSIX_PATH_MAX + 100]; - /* In /mysys/my_lib.c, _POSIX_PATH_MAX + 1 is used as - the max file name len; but in most standards, the - length is NAME_MAX; we add 100 to be even safer */ -#endif /* HAVE_READDIR_R */ - next_file: -#ifdef HAVE_READDIR_R - ret = readdir_r(dir, (struct dirent*) dirent_buf, &ent); - - if (ret != 0) { - - ib::error() - << "Cannot read directory " << dirname - << " error: " << ret; - - return(-1); - } - - if (ent == NULL) { - /* End of directory */ - - return(1); - } - - ut_a(strlen(ent->d_name) < _POSIX_PATH_MAX + 100 - 1); -#else ent = readdir(dir); if (ent == NULL) { return(1); } -#endif /* HAVE_READDIR_R */ + ut_a(strlen(ent->d_name) < OS_FILE_MAX_PATH); if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) { @@ -3561,8 +2907,8 @@ os_file_create_func( on_error_silent = create_mode & OS_FILE_ON_ERROR_SILENT ? true : false; - create_mode &= ~OS_FILE_ON_ERROR_NO_EXIT; - create_mode &= ~OS_FILE_ON_ERROR_SILENT; + create_mode &= ulint(~(OS_FILE_ON_ERROR_NO_EXIT + | OS_FILE_ON_ERROR_SILENT)); if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW @@ -3609,7 +2955,7 @@ os_file_create_func( if (!read_only && type == OS_LOG_FILE - && srv_unix_file_flush_method == SRV_UNIX_O_DSYNC) { + && srv_file_flush_method == SRV_O_DSYNC) { create_flag |= O_SYNC; } @@ -3646,8 +2992,8 @@ os_file_create_func( if (!read_only && *success && (type != OS_LOG_FILE && type != OS_DATA_TEMP_FILE) - && (srv_unix_file_flush_method == SRV_UNIX_O_DIRECT - || srv_unix_file_flush_method == SRV_UNIX_O_DIRECT_NO_FSYNC)) { + && (srv_file_flush_method == SRV_O_DIRECT + || srv_file_flush_method == SRV_O_DIRECT_NO_FSYNC)) { os_file_set_nocache(file, name, mode_str); } @@ -3682,24 +3028,6 @@ os_file_create_func( } #endif /* USE_FILE_LOCK */ - /* If we have proper file handle and atomic writes should be used, - try to set atomic writes and if that fails when creating a new - table, produce a error. If atomic writes are used on existing - file, ignore error and use traditional writes for that file */ - /* JAN: TODO: ATOMIC WRITES - if (file != -1 && type == OS_DATA_FILE - && (awrites == ATOMIC_WRITES_ON || - (srv_use_atomic_writes && awrites == ATOMIC_WRITES_DEFAULT)) - && !os_file_set_atomic_writes(name, file)) { - if (create_mode == OS_FILE_CREATE) { - fprintf(stderr, "InnoDB: Error: Can't create file using atomic writes\n"); - close(file); - os_file_delete_if_exists_func(name); - *success = FALSE; - file = -1; - } - } - */ return(file); } @@ -3727,6 +3055,10 @@ os_file_create_simple_no_error_handling_func( os_file_t file; int create_flag; + if (create_mode != OS_FILE_OPEN && create_mode != OS_FILE_OPEN_RAW) { + WAIT_ALLOW_WRITES(); + } + ut_a(!(create_mode & OS_FILE_ON_ERROR_SILENT)); ut_a(!(create_mode & OS_FILE_ON_ERROR_NO_EXIT)); @@ -3800,7 +3132,10 @@ os_file_delete_if_exists_func( *exist = true; } - int ret = unlink(name); + int ret; + WAIT_ALLOW_WRITES(); + + ret = unlink(name); if (ret != 0 && errno == ENOENT) { if (exist != NULL) { @@ -3822,7 +3157,10 @@ bool os_file_delete_func( const char* name) { - int ret = unlink(name); + int ret; + WAIT_ALLOW_WRITES(); + + ret = unlink(name); if (ret != 0) { os_file_handle_error_no_exit(name, "delete", FALSE); @@ -3858,7 +3196,10 @@ os_file_rename_func( ut_ad(exists); #endif /* UNIV_DEBUG */ - int ret = rename(oldpath, newpath); + int ret; + WAIT_ALLOW_WRITES(); + + ret = rename(oldpath, newpath); if (ret != 0) { os_file_handle_error_no_exit(oldpath, "rename", FALSE); @@ -4043,19 +3384,10 @@ bool os_file_set_eof( FILE* file) /*!< in: file to be truncated */ { + WAIT_ALLOW_WRITES(); return(!ftruncate(fileno(file), ftell(file))); } -/** This function can be called if one wants to post a batch of reads and -prefers an i/o-handler thread to handle them all at once later. You must -call os_aio_simulated_wake_handler_threads later to ensure the threads -are not left sleeping! */ -void -os_aio_simulated_put_read_threads_to_sleep() -{ - /* No op on non Windows */ -} - #else /* !_WIN32 */ #include @@ -4218,10 +3550,21 @@ os_is_sparse_file_supported_win32(const char* filename) DWORD flags; - GetVolumeInformation( + result = GetVolumeInformation( volname, NULL, MAX_PATH, NULL, NULL, &flags, NULL, MAX_PATH); + + if (!result) { + ib::error() + << "os_is_sparse_file_supported: " + << "Failed to get the volume info for: " + << volname + << "- OS error number " << GetLastError(); + + return(false); + } + return(flags & FILE_SUPPORTS_SPARSE_FILES) ? true : false; } @@ -4247,12 +3590,11 @@ os_file_punch_hole_win32( /* If lpOverlapped is NULL, lpBytesReturned cannot be NULL, therefore we pass a dummy parameter. */ DWORD temp; - - BOOL result = DeviceIoControl( + BOOL success = os_win32_device_io_control( fh, FSCTL_SET_ZERO_DATA, &punch, sizeof(punch), - NULL, 0, &temp, NULL); + NULL, 0, &temp); - return(!result ? DB_IO_NO_PUNCH_HOLE : DB_SUCCESS); + return(success ? DB_SUCCESS: DB_IO_NO_PUNCH_HOLE); } /** Check the existence and type of the given file. @@ -4563,9 +3905,9 @@ os_file_create_simple_func( /* This is a best effort use case, if it fails then we will find out when we try and punch the hole. */ - DeviceIoControl( + os_win32_device_io_control( file, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, - &temp, NULL); + &temp); } } while (retry); @@ -4794,6 +4136,10 @@ os_file_create_func( DWORD create_flag; DWORD share_mode = FILE_SHARE_READ; + if (create_mode != OS_FILE_OPEN && create_mode != OS_FILE_OPEN_RAW) { + WAIT_ALLOW_WRITES(); + } + on_error_no_exit = create_mode & OS_FILE_ON_ERROR_NO_EXIT ? true : false; @@ -4866,20 +4212,55 @@ os_file_create_func( return(OS_FILE_CLOSED); } -#ifdef UNIV_NON_BUFFERED_IO + if (type == OS_LOG_FILE) { + /* There is not reason to use buffered write to logs.*/ + attributes |= FILE_FLAG_NO_BUFFERING; + } + + switch (srv_file_flush_method) + { + case SRV_O_DSYNC: + if (type == OS_LOG_FILE) { + /* Map O_SYNC to FILE_WRITE_THROUGH */ + attributes |= FILE_FLAG_WRITE_THROUGH; + } + break; + + case SRV_O_DIRECT_NO_FSYNC: + case SRV_O_DIRECT: + if (type == OS_DATA_FILE) { + attributes |= FILE_FLAG_NO_BUFFERING; + } + break; + + case SRV_ALL_O_DIRECT_FSYNC: + /*Traditional Windows behavior, no buffering for any files.*/ + attributes |= FILE_FLAG_NO_BUFFERING; + break; + + case SRV_FSYNC: + case SRV_LITTLESYNC: + break; + + case SRV_NOSYNC: + /* Let Windows cache manager handle all writes.*/ + attributes &= ~(FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING); + break; + + default: + ut_a(false); /* unknown flush mode.*/ + } + + // TODO: Create a bug, this looks wrong. The flush log // parameter is dynamic. if (type == OS_LOG_FILE && srv_flush_log_at_trx_commit == 2) { - /* Do not use unbuffered i/o for the log files because value 2 denotes that we do not flush the log at every commit, but only once per second */ - - } else if (srv_win_file_flush_method == SRV_WIN_IO_UNBUFFERED) { - - attributes |= FILE_FLAG_NO_BUFFERING; + attributes &= ~(FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING); } -#endif /* UNIV_NON_BUFFERED_IO */ + DWORD access = GENERIC_READ; @@ -4922,9 +4303,9 @@ os_file_create_func( /* This is a best effort use case, if it fails then we will find out when we try and punch the hole. */ - DeviceIoControl( + os_win32_device_io_control( file, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, - &temp, NULL); + &temp); } } while (retry); @@ -5361,28 +4742,6 @@ os_file_get_status_win32( } stat_info->block_size = bytesPerSector * sectorsPerCluster; - - /* On Windows the block size is not used as the allocation - unit for sparse files. The underlying infra-structure for - sparse files is based on NTFS compression. The punch hole - is done on a "compression unit". This compression unit - is based on the cluster size. You cannot punch a hole if - the cluster size >= 8K. For smaller sizes the table is - as follows: - - Cluster Size Compression Unit - 512 Bytes 8 KB - 1 KB 16 KB - 2 KB 32 KB - 4 KB 64 KB - - Default NTFS cluster size is 4K, compression unit size of 64K. - Therefore unless the user has created the file system with - a smaller cluster size and used larger page sizes there is - little benefit from compression out of the box. */ - - stat_info->block_size = (stat_info->block_size <= 4096) - ? stat_info->block_size * 16 : ULINT_UNDEFINED; } else { stat_info->type = OS_FILE_TYPE_UNKNOWN; } @@ -5479,30 +4838,6 @@ AIO::simulated_put_read_threads_to_sleep() #endif /* !_WIN32*/ -#ifdef MYSQL_COMPRESSION -/** Validate the type, offset and number of bytes to read * -@param[in] type IO flags -@param[in] offset Offset from start of the file -@param[in] n Number of bytes to read from offset */ -static -void -os_file_check_args(const IORequest& type, os_offset_t offset, ulint n) -{ - ut_ad(type.validate()); - - ut_ad(n > 0); - - /* If off_t is > 4 bytes in size, then we assume we can pass a - 64-bit address */ - off_t offs = static_cast(offset); - - if (sizeof(off_t) <= 4 && offset != (os_offset_t) offs) { - - ib::error() << "file write at offset > 4 GB."; - } -} -#endif /* MYSQL_COMPRESSION */ - /** Does a syncronous read or write depending upon the type specified In case of partial reads/writes the function tries NUM_RETRIES_ON_PARTIAL_IO times to read/write the complete data. @@ -5525,44 +4860,8 @@ os_file_io( { ulint original_n = n; IORequest type = in_type; - byte* compressed_page=NULL; ssize_t bytes_returned = 0; -#ifdef MYSQL_COMPRESSION - Block* block=NULL; - if (type.is_compressed()) { - - /* We don't compress the first page of any file. */ - ut_ad(offset > 0); - - block = os_file_compress_page(type, buf, &n); - - compressed_page = static_cast( - ut_align(block->m_ptr, UNIV_SECTOR_SIZE)); - - } else { - block = NULL; - compressed_page = NULL; - } -#endif /* MYSQL_COMPRESSION */ - -#ifdef MYSQL_ENCRYPTION - /* We do encryption after compression, since if we do encryption - before compression, the encrypted data will cause compression fail - or low compression rate. */ - if (type.is_encrypted() && type.is_write()) { - /* We don't encrypt the first page of any file. */ - Block* compressed_block = block; - ut_ad(offset > 0); - - block = os_file_encrypt_page(type, buf, &n); - - if (compressed_block != NULL) { - os_free_block(compressed_block); - } - } -#endif /* MYSQL_ENCRYPTION */ - SyncFileIO sync_file_io(file, buf, n, offset); for (ulint i = 0; i < NUM_RETRIES_ON_PARTIAL_IO; ++i) { @@ -5579,23 +4878,16 @@ os_file_io( bytes_returned += n_bytes; if (offset > 0 - && (type.is_compressed() || type.is_read())) { - - *err = os_file_io_complete( - type, file, - reinterpret_cast(buf), - compressed_page, original_n, - static_cast(offset), n); + && !type.is_log() + && type.is_write() + && type.punch_hole()) { + *err = type.punch_hole(file, + offset, + static_cast(n)); } else { - *err = DB_SUCCESS; } -#ifdef MYSQL_COMPRESSION - if (block != NULL) { - os_free_block(block); - } -#endif return(original_n); } @@ -5623,12 +4915,6 @@ os_file_io( sync_file_io.advance(n_bytes); } -#ifdef MYSQL_COMPRESSION - if (block != NULL) { - os_free_block(block); - } -#endif - *err = DB_IO_ERROR; if (!type.is_partial_io_warning_disabled()) { @@ -5666,7 +4952,8 @@ os_file_pwrite( (void) my_atomic_addlint(&os_n_pending_writes, 1); MONITOR_ATOMIC_INC(MONITOR_OS_PENDING_WRITES); - ssize_t n_bytes = os_file_io(type, file, (void*) buf, n, offset, err); + ssize_t n_bytes = os_file_io(type, file, const_cast(buf), + n, offset, err); (void) my_atomic_addlint(&os_n_pending_writes, -1); MONITOR_ATOMIC_DEC(MONITOR_OS_PENDING_WRITES); @@ -5687,16 +4974,19 @@ os_file_write_page( IORequest& type, const char* name, os_file_t file, - const byte* buf, + const void* buf, os_offset_t offset, ulint n) { dberr_t err; + ut_ad(type.is_write()); ut_ad(type.validate()); ut_ad(n > 0); - - ssize_t n_bytes = os_file_pwrite(type, file, buf, n, offset, &err); + + WAIT_ALLOW_WRITES(); + + ssize_t n_bytes = os_file_pwrite(type, file, (byte*)buf, n, offset, &err); if ((ulint) n_bytes != n && !os_has_said_disk_full) { @@ -5799,23 +5089,7 @@ os_file_read_page( return(err); } else if ((ulint) n_bytes == n) { - -#ifdef MYSQL_COMPRESSION - /** The read will succeed but decompress can fail - for various reasons. */ - - if (type.is_compression_enabled() - && !Compression::is_compressed_page( - static_cast(buf))) { - - return(DB_SUCCESS); - - } else { - return(err); - } -#else return(DB_SUCCESS); -#endif /* MYSQL_COMPRESSION */ } ib::error() << "Tried to read " << n @@ -6216,12 +5490,6 @@ os_file_write_func( ut_ad(type.validate()); ut_ad(type.is_write()); - /* We never compress the first page. - Note: This assumes we always do block IO. */ - if (offset == 0) { - type.clear_compressed(); - } - const byte* ptr = reinterpret_cast(buf); return(os_file_write_page(type, name, file, ptr, offset, n)); @@ -6255,6 +5523,28 @@ os_file_punch_hole( os_file_t fh, os_offset_t off, os_offset_t len) +{ + dberr_t err; + +#ifdef _WIN32 + err = os_file_punch_hole_win32(fh, off, len); +#else + err = os_file_punch_hole_posix(fh, off, len); +#endif /* _WIN32 */ + + return (err); +} + +/** Free storage space associated with a section of the file. +@param[in] fh Open file handle +@param[in] off Starting offset (SEEK_SET) +@param[in] len Size of the hole +@return DB_SUCCESS or error code */ +dberr_t +IORequest::punch_hole( + os_file_t fh, + os_offset_t off, + os_offset_t len) { /* In this debugging mode, we act as if punch hole is supported, and then skip any calls to actually punch a hole here. @@ -6263,11 +5553,34 @@ os_file_punch_hole( return(DB_SUCCESS); ); -#ifdef _WIN32 - return(os_file_punch_hole_win32(fh, off, len)); -#else - return(os_file_punch_hole_posix(fh, off, len)); -#endif /* _WIN32 */ + os_offset_t trim_len = static_cast(get_trim_length(len)); + + if (trim_len == 0) { + return(DB_SUCCESS); + } + + off += len; + + /* Check does file system support punching holes for this + tablespace. */ + if (!should_punch_hole() || !srv_use_trim) { + return DB_IO_NO_PUNCH_HOLE; + } + + dberr_t err = os_file_punch_hole(fh, off, trim_len); + + if (err == DB_SUCCESS) { + srv_stats.page_compressed_trim_op.inc(); + } else { + /* If punch hole is not supported, + set space so that it is not used. */ + if (err == DB_IO_NO_PUNCH_HOLE) { + space_no_punch_hole(); + err = DB_SUCCESS; + } + } + + return (err); } /** Check if the file system supports sparse files. @@ -6298,7 +5611,7 @@ os_is_sparse_file_supported(const char* path, os_file_t fh) /* We don't know the FS block size, use the sector size. The FS will do the magic. */ - err = os_file_punch_hole(fh, 0, UNIV_PAGE_SIZE); + err = os_file_punch_hole_posix(fh, 0, UNIV_PAGE_SIZE); return(err == DB_SUCCESS); #endif /* _WIN32 */ @@ -6458,16 +5771,6 @@ AIO::init_slots() memset(&slot.control, 0x0, sizeof(slot.control)); #endif /* WIN_ASYNC_IO */ - - slot.compressed_ptr = reinterpret_cast( - ut_zalloc_nokey(UNIV_PAGE_SIZE_MAX * 2)); - - if (slot.compressed_ptr == NULL) { - return(DB_OUT_OF_MEMORY); - } - - slot.compressed_page = static_cast( - ut_align(slot.compressed_ptr, UNIV_PAGE_SIZE)); } return(DB_SUCCESS); @@ -6491,7 +5794,7 @@ AIO::init_linux_native_aio() } io_context** ctx = m_aio_ctx; - ulint max_events = slots_per_segment(); + unsigned max_events = slots_per_segment(); for (ulint i = 0; i < m_n_segments; ++i, ++ctx) { @@ -6594,16 +5897,6 @@ AIO::~AIO() } #endif /* LINUX_NATIVE_AIO */ - for (ulint i = 0; i < m_slots.size(); ++i) { - Slot& slot = m_slots[i]; - - if (slot.compressed_ptr != NULL) { - ut_free(slot.compressed_ptr); - slot.compressed_ptr = NULL; - slot.compressed_page = NULL; - } - } - m_slots.clear(); } @@ -6709,6 +6002,12 @@ AIO::start( os_aio_validate(); + os_last_printout = ut_time(); + + if (srv_use_native_aio) { + return(true); + } + os_aio_segment_wait_events = static_cast( ut_zalloc_nokey( n_segments * sizeof *os_aio_segment_wait_events)); @@ -6722,8 +6021,6 @@ AIO::start( os_aio_segment_wait_events[i] = os_event_create(0); } - os_last_printout = ut_time(); - return(true); } @@ -6765,27 +6062,6 @@ os_aio_init( /* Maximum number of pending aio operations allowed per segment */ ulint limit = 8 * OS_AIO_N_PENDING_IOS_PER_THREAD; - - ut_a(block_cache == NULL); - - block_cache = UT_NEW_NOKEY(Blocks(MAX_BLOCKS)); - - for (Blocks::iterator it = block_cache->begin(); - it != block_cache->end(); - ++it) { - - ut_a(it->m_in_use == 0); - ut_a(it->m_ptr == NULL); - - /* Allocate double of max page size memory, since - compress could generate more bytes than orgininal - data. */ - it->m_ptr = static_cast( - ut_malloc_nokey(BUFFER_BLOCK_SIZE)); - - ut_a(it->m_ptr != NULL); - } - return(AIO::start(limit, n_readers, n_writers, n_slots_sync)); } @@ -6795,25 +6071,19 @@ os_aio_free() { AIO::shutdown(); - for (ulint i = 0; i < os_aio_n_segments; i++) { - os_event_destroy(os_aio_segment_wait_events[i]); - } + ut_ad(!os_aio_segment_wait_events || !srv_use_native_aio); + ut_ad(srv_use_native_aio || os_aio_segment_wait_events + || !srv_was_started); - ut_free(os_aio_segment_wait_events); - os_aio_segment_wait_events = 0; + if (!srv_use_native_aio && os_aio_segment_wait_events) { + for (ulint i = 0; i < os_aio_n_segments; i++) { + os_event_destroy(os_aio_segment_wait_events[i]); + } + + ut_free(os_aio_segment_wait_events); + os_aio_segment_wait_events = 0; + } os_aio_n_segments = 0; - - for (Blocks::iterator it = block_cache->begin(); - it != block_cache->end(); - ++it) { - - ut_a(it->m_in_use == 0); - ut_free(it->m_ptr); - } - - UT_DELETE(block_cache); - - block_cache = NULL; } /** Wakes up all async i/o threads so that they know to exit themselves in @@ -6826,21 +6096,16 @@ os_aio_wake_all_threads_at_shutdown() AIO::wake_at_shutdown(); #elif defined(LINUX_NATIVE_AIO) - /* When using native AIO interface the io helper threads wait on io_getevents with a timeout value of 500ms. At each wake up these threads check the server status. No need to do anything to wake them up. */ +#endif /* !WIN_ASYNC_AIO */ if (srv_use_native_aio) { return; } -#endif /* !WIN_ASYNC_AIO */ - - /* Fall through to simulated AIO handler wakeup if we are - not using native AIO. */ - /* This loop wakes up all simulated ai/o threads */ for (ulint i = 0; i < os_aio_n_segments; ++i) { @@ -6920,12 +6185,7 @@ AIO::reserve_slot( const char* name, void* buf, os_offset_t offset, - ulint len, - ulint* write_size)/*!< in/out: Actual write size initialized - after fist successfull trim - operation for this page and if - initialized we do not trim again if - actual page size does not decrease. */ + ulint len) { #ifdef WIN_ASYNC_IO ut_a((len & 0xFFFFFFFFUL) == len); @@ -7015,83 +6275,10 @@ AIO::reserve_slot( slot->ptr = slot->buf; slot->offset = offset; slot->err = DB_SUCCESS; - slot->write_size = write_size; - slot->is_log = type.is_log(); slot->original_len = static_cast(len); slot->io_already_done = false; - slot->buf_block = NULL; slot->buf = static_cast(buf); -#ifdef MYSQL_COMPRESSION - if (srv_use_native_aio - && offset > 0 - && type.is_write() - && type.is_compressed()) { - ulint compressed_len = len; - - ut_ad(!type.is_log()); - - release(); - - void* src_buf = slot->buf; - - slot->buf_block = os_file_compress_page( - type, - src_buf, - &compressed_len); - - slot->buf = static_cast(src_buf); - slot->ptr = slot->buf; -#ifdef _WIN32 - slot->len = static_cast(compressed_len); -#else - slot->len = static_cast(compressed_len); -#endif /* _WIN32 */ - slot->skip_punch_hole = type.punch_hole(); - - acquire(); - } -#endif /* MYSQL_COMPRESSION */ - -#ifdef MYSQL_ENCRYPTION - /* We do encryption after compression, since if we do encryption - before compression, the encrypted data will cause compression fail - or low compression rate. */ - if (srv_use_native_aio - && offset > 0 - && type.is_write() - && type.is_encrypted()) { - ulint encrypted_len = slot->len; - Block* encrypted_block; - - ut_ad(!type.is_log()); - - release(); - - void* src_buf = slot->buf; - encrypted_block = os_file_encrypt_page( - type, - src_buf, - &encrypted_len); - - if (slot->buf_block != NULL) { - os_free_block(slot->buf_block); - } - - slot->buf_block = encrypted_block; - slot->buf = static_cast(src_buf); - slot->ptr = slot->buf; - -#ifdef _WIN32 - slot->len = static_cast(encrypted_len); -#else - slot->len = static_cast(encrypted_len); -#endif /* _WIN32 */ - - acquire(); - } -#endif /* MYSQL_ENCRYPTION */ - #ifdef WIN_ASYNC_IO { OVERLAPPED* control; @@ -7440,6 +6627,7 @@ Requests an asynchronous i/o operation. @param[in,out] m2 message for the AIO handler (can be used to identify a completed AIO operation); ignored if mode is OS_AIO_SYNC + @return DB_SUCCESS or error code */ dberr_t os_aio_func( @@ -7452,12 +6640,7 @@ os_aio_func( ulint n, bool read_only, fil_node_t* m1, - void* m2, - ulint* write_size)/*!< in/out: Actual write size initialized - after fist successfull trim - operation for this page and if - initialized we do not trim again if - actual page size does not decrease. */ + void* m2) { #ifdef WIN_ASYNC_IO BOOL ret = TRUE; @@ -7493,7 +6676,7 @@ try_again: Slot* slot; - slot = array->reserve_slot(type, m1, m2, file, name, buf, offset, n, write_size); + slot = array->reserve_slot(type, m1, m2, file, name, buf, offset, n); if (type.is_read()) { @@ -7758,13 +6941,6 @@ public: } } - /** Do the decompression of the pages read in */ - void io_complete() - { - // Note: For non-compressed tables. Not required - // for correctness. - } - /** Mark the i/os done in slots */ void done() { @@ -7818,7 +6994,7 @@ private: slot->offset, slot->len); - ut_a(err == DB_SUCCESS || err == DB_IO_NO_PUNCH_HOLE); + ut_a(err == DB_SUCCESS); } /** @return true if the slots are adjacent and can be merged */ @@ -8109,8 +7285,6 @@ os_aio_simulated_handler( srv_set_io_thread_op_info(global_segment, "file i/o done"); - handler.io_complete(); - array->acquire(); handler.done(); @@ -8284,7 +7458,8 @@ os_aio_print(FILE* file) srv_io_thread_function[i]); #ifndef _WIN32 - if (os_event_is_set(os_aio_segment_wait_events[i])) { + if (!srv_use_native_aio + && os_event_is_set(os_aio_segment_wait_events[i])) { fprintf(file, " ev set"); } #endif /* _WIN32 */ @@ -8448,920 +7623,9 @@ os_file_set_umask(ulint umask) } #else - #include "univ.i" -#include "db0err.h" -#include "mach0data.h" -#include "fil0fil.h" -#include "os0file.h" - -#ifdef HAVE_LZ4 -#include -#endif - -#include -#ifndef UNIV_INNOCHECKSUM -#include -#include -#include -#include -#endif - -typedef byte Block; - -#ifdef MYSQL_COMPRESSION -/** Allocate a page for sync IO -@return pointer to page */ -static -Block* -os_alloc_block() -{ - return(reinterpret_cast(malloc(UNIV_PAGE_SIZE_MAX * 2))); -} - -/** Free a page after sync IO -@param[in,own] block The block to free/release */ -static -void -os_free_block(Block* block) -{ - ut_free(block); -} -#endif #endif /* !UNIV_INNOCHECKSUM */ -#ifdef MYSQL_COMPRESSION - -/** -@param[in] type The compression type -@return the string representation */ -const char* -Compression::to_string(Type type) -{ - switch(type) { - case NONE: - return("None"); - case ZLIB: - return("Zlib"); - case LZ4: - return("LZ4"); - } - - ut_ad(0); - - return(""); -} - -/** -@param[in] meta Page Meta data -@return the string representation */ -std::string Compression::to_string(const Compression::meta_t& meta) -{ - std::ostringstream stream; - - stream << "version: " << int(meta.m_version) << " " - << "algorithm: " << meta.m_algorithm << " " - << "(" << to_string(meta.m_algorithm) << ") " - << "orginal_type: " << meta.m_original_type << " " - << "original_size: " << meta.m_original_size << " " - << "compressed_size: " << meta.m_compressed_size; - - return(stream.str()); -} - -/** @return true if it is a compressed page */ -bool -Compression::is_compressed_page(const byte* page) -{ - return(mach_read_from_2(page + FIL_PAGE_TYPE) == FIL_PAGE_COMPRESSED); -} - -/** Deserizlise the page header compression meta-data -@param[in] page Pointer to the page header -@param[out] control Deserialised data */ -void -Compression::deserialize_header( - const byte* page, - Compression::meta_t* control) -{ - ut_ad(is_compressed_page(page)); - - control->m_version = static_cast( - mach_read_from_1(page + FIL_PAGE_VERSION)); - - control->m_original_type = static_cast( - mach_read_from_2(page + FIL_PAGE_ORIGINAL_TYPE_V1)); - - control->m_compressed_size = static_cast( - mach_read_from_2(page + FIL_PAGE_COMPRESS_SIZE_V1)); - - control->m_original_size = static_cast( - mach_read_from_2(page + FIL_PAGE_ORIGINAL_SIZE_V1)); - - control->m_algorithm = static_cast( - mach_read_from_1(page + FIL_PAGE_ALGORITHM_V1)); -} - -/** Decompress the page data contents. Page type must be FIL_PAGE_COMPRESSED, if -not then the source contents are left unchanged and DB_SUCCESS is returned. -@param[in] dblwr_recover true of double write recovery in progress -@param[in,out] src Data read from disk, decompressed data will be - copied to this page -@param[in,out] dst Scratch area to use for decompression -@param[in] dst_len Size of the scratch area in bytes -@return DB_SUCCESS or error code */ -dberr_t -Compression::deserialize( - bool dblwr_recover, - byte* src, - byte* dst, - ulint dst_len) -{ - if (!is_compressed_page(src)) { - /* There is nothing we can do. */ - return(DB_SUCCESS); - } - - meta_t header; - - deserialize_header(src, &header); - - byte* ptr = src + FIL_PAGE_DATA; - - ut_ad(header.m_version == 1); - - if (header.m_version != 1 - || header.m_original_size < UNIV_PAGE_SIZE_MIN - (FIL_PAGE_DATA + 8) - || header.m_original_size > UNIV_PAGE_SIZE_MAX - FIL_PAGE_DATA - || dst_len < header.m_original_size + FIL_PAGE_DATA) { - - /* The last check could potentially return DB_OVERFLOW, - the caller should be able to retry with a larger buffer. */ - - return(DB_CORRUPTION); - } - - Block* block; - - /* The caller doesn't know what to expect */ - if (dst == NULL) { - - block = os_alloc_block(); - -#ifdef UNIV_INNOCHECKSUM - dst = block; -#else - dst = block->m_ptr; -#endif /* UNIV_INNOCHECKSUM */ - - } else { - block = NULL; - } - - int ret; - Compression compression; - ulint len = header.m_original_size; - - compression.m_type = static_cast(header.m_algorithm); - - switch(compression.m_type) { - case Compression::ZLIB: { - - uLongf zlen = header.m_original_size; - - if (uncompress(dst, &zlen, ptr, header.m_compressed_size) - != Z_OK) { - - if (block != NULL) { - os_free_block(block); - } - - return(DB_IO_DECOMPRESS_FAIL); - } - - len = static_cast(zlen); - - break; - } -#ifdef HAVE_LZ4 - case Compression::LZ4: { - int ret; - - if (dblwr_recover) { - - ret = LZ4_decompress_safe( - reinterpret_cast(ptr), - reinterpret_cast(dst), - header.m_compressed_size, - header.m_original_size); - - } else { - - /* This can potentially read beyond the input - buffer if the data is malformed. According to - the LZ4 documentation it is a little faster - than the above function. When recovering from - the double write buffer we can afford to us the - slower function above. */ - - ret = LZ4_decompress_fast( - reinterpret_cast(ptr), - reinterpret_cast(dst), - header.m_original_size); - } - - if (ret < 0) { - - if (block != NULL) { - os_free_block(block); - } - - return(DB_IO_DECOMPRESS_FAIL); - } - - break; - } -#endif - default: -#if !defined(UNIV_INNOCHECKSUM) - ib::error() - << "Compression algorithm support missing: " - << Compression::to_string(compression.m_type); -#else - fprintf(stderr, "Compression algorithm support missing: %s\n", - Compression::to_string(compression.m_type)); -#endif /* !UNIV_INNOCHECKSUM */ - - if (block != NULL) { - os_free_block(block); - } - - return(DB_UNSUPPORTED); - } - /* Leave the header alone */ - memmove(src + FIL_PAGE_DATA, dst, len); - - mach_write_to_2(src + FIL_PAGE_TYPE, header.m_original_type); - - ut_ad(dblwr_recover - || memcmp(src + FIL_PAGE_LSN + 4, - src + (header.m_original_size + FIL_PAGE_DATA) - - FIL_PAGE_END_LSN_OLD_CHKSUM + 4, 4) == 0); - - if (block != NULL) { - os_free_block(block); - } - - return(DB_SUCCESS); -} - -/** Decompress the page data contents. Page type must be FIL_PAGE_COMPRESSED, if -not then the source contents are left unchanged and DB_SUCCESS is returned. -@param[in] dblwr_recover true of double write recovery in progress -@param[in,out] src Data read from disk, decompressed data will be - copied to this page -@param[in,out] dst Scratch area to use for decompression -@param[in] dst_len Size of the scratch area in bytes -@return DB_SUCCESS or error code */ -dberr_t -os_file_decompress_page( - bool dblwr_recover, - byte* src, - byte* dst, - ulint dst_len) -{ - return(Compression::deserialize(dblwr_recover, src, dst, dst_len)); -} -#endif /* MYSQL_COMPRESSION */ - -#ifdef MYSQL_ENCRYPTION - -/** -@param[in] type The encryption type -@return the string representation */ -const char* -Encryption::to_string(Type type) -{ - switch(type) { - case NONE: - return("N"); - case AES: - return("Y"); - } - - ut_ad(0); - - return(""); -} - -/** Generate random encryption value for key and iv. -@param[in,out] value Encryption value */ -void Encryption::random_value(byte* value) -{ - ut_ad(value != NULL); - - my_rand_buffer(value, ENCRYPTION_KEY_LEN); -} - -/** Create new master key for key rotation. -@param[in,out] master_key master key */ -void -Encryption::create_master_key(byte** master_key) -{ -#ifndef UNIV_INNOCHECKSUM - char* key_type = NULL; - size_t key_len; - char key_name[ENCRYPTION_MASTER_KEY_NAME_MAX_LEN]; - int ret; - - /* If uuid does not match with current server uuid, - set uuid as current server uuid. */ - if (strcmp(uuid, server_uuid) != 0) { - memcpy(uuid, server_uuid, ENCRYPTION_SERVER_UUID_LEN); - } - memset(key_name, 0, ENCRYPTION_MASTER_KEY_NAME_MAX_LEN); - - /* Generate new master key */ - ut_snprintf(key_name, ENCRYPTION_MASTER_KEY_NAME_MAX_LEN, - "%s-%s-%lu", ENCRYPTION_MASTER_KEY_PRIFIX, - uuid, master_key_id + 1); - - /* We call key ring API to generate master key here. */ - ret = my_key_generate(key_name, "AES", - NULL, ENCRYPTION_KEY_LEN); - - /* We call key ring API to get master key here. */ - ret = my_key_fetch(key_name, &key_type, NULL, - reinterpret_cast(master_key), - &key_len); - - if (ret || *master_key == NULL) { - ib::error() << "Encryption can't find master key, please check" - " the keyring plugin is loaded."; - *master_key = NULL; - } else { - master_key_id++; - } - - if (key_type) { - my_free(key_type); - } -#endif -} - -/** Get master key by key id. -@param[in] master_key_id master key id -@param[in] srv_uuid uuid of server instance -@param[in,out] master_key master key */ -void -Encryption::get_master_key(ulint master_key_id, - char* srv_uuid, - byte** master_key) -{ -#ifndef UNIV_INNOCHECKSUM - char* key_type = NULL; - size_t key_len; - char key_name[ENCRYPTION_MASTER_KEY_NAME_MAX_LEN]; - int ret; - - memset(key_name, 0, ENCRYPTION_MASTER_KEY_NAME_MAX_LEN); - - if (srv_uuid != NULL) { - ut_snprintf(key_name, ENCRYPTION_MASTER_KEY_NAME_MAX_LEN, - "%s-%s-%lu", ENCRYPTION_MASTER_KEY_PRIFIX, - srv_uuid, master_key_id); - } else { - /* For compitable with 5.7.11, we need to get master key with - server id. */ - memset(key_name, 0, ENCRYPTION_MASTER_KEY_NAME_MAX_LEN); - ut_snprintf(key_name, ENCRYPTION_MASTER_KEY_NAME_MAX_LEN, - "%s-%lu-%lu", ENCRYPTION_MASTER_KEY_PRIFIX, - server_id, master_key_id); - } - - /* We call key ring API to get master key here. */ - ret = my_key_fetch(key_name, &key_type, NULL, - reinterpret_cast(master_key), &key_len); - - if (key_type) { - my_free(key_type); - } - - if (ret) { - *master_key = NULL; - ib::error() << "Encryption can't find master key, please check" - " the keyring plugin is loaded."; - } - -#ifdef UNIV_ENCRYPT_DEBUG - if (!ret && *master_key) { - fprintf(stderr, "Fetched master key:%lu ", master_key_id); - ut_print_buf(stderr, *master_key, key_len); - fprintf(stderr, "\n"); - } -#endif /* DEBUG_TDE */ - -#endif -} - -/** Current master key id */ -ulint Encryption::master_key_id = 0; - -/** Current uuid of server instance */ -char Encryption::uuid[ENCRYPTION_SERVER_UUID_LEN + 1] = {0}; - -/** Get current master key and master key id -@param[in,out] master_key_id master key id -@param[in,out] master_key master key -@param[in,out] version encryption information version */ -void -Encryption::get_master_key(ulint* master_key_id, - byte** master_key, - Encryption::Version* version) -{ -#ifndef UNIV_INNOCHECKSUM - char* key_type = NULL; - size_t key_len; - char key_name[ENCRYPTION_MASTER_KEY_NAME_MAX_LEN]; - int ret; - - memset(key_name, 0, ENCRYPTION_KEY_LEN); - *version = Encryption::ENCRYPTION_VERSION_2; - - if (Encryption::master_key_id == 0) { - /* If m_master_key is 0, means there's no encrypted - tablespace, we need to generate the first master key, - and store it to key ring. */ - memset(uuid, 0, ENCRYPTION_SERVER_UUID_LEN + 1); - memcpy(uuid, server_uuid, ENCRYPTION_SERVER_UUID_LEN); - - /* Prepare the server uuid. */ - ut_snprintf(key_name, ENCRYPTION_MASTER_KEY_NAME_MAX_LEN, - "%s-%s-1", ENCRYPTION_MASTER_KEY_PRIFIX, - uuid); - - /* We call key ring API to generate master key here. */ - ret = my_key_generate(key_name, "AES", - NULL, ENCRYPTION_KEY_LEN); - - /* We call key ring API to get master key here. */ - ret = my_key_fetch(key_name, &key_type, NULL, - reinterpret_cast(master_key), - &key_len); - - if (!ret && *master_key != NULL) { - Encryption::master_key_id++; - *master_key_id = Encryption::master_key_id; - } -#ifdef UNIV_ENCRYPT_DEBUG - if (!ret && *master_key) { - fprintf(stderr, "Generated new master key:"); - ut_print_buf(stderr, *master_key, key_len); - fprintf(stderr, "\n"); - } -#endif - } else { - *master_key_id = Encryption::master_key_id; - - ut_snprintf(key_name, ENCRYPTION_MASTER_KEY_NAME_MAX_LEN, - "%s-%s-%lu", ENCRYPTION_MASTER_KEY_PRIFIX, - uuid, *master_key_id); - - /* We call key ring API to get master key here. */ - ret = my_key_fetch(key_name, &key_type, NULL, - reinterpret_cast(master_key), - &key_len); - - /* For compitable with 5.7.11, we need to try to get master key with - server id when get master key with server uuid failure. */ - if (ret || *master_key == NULL) { - if (key_type) { - my_free(key_type); - } - - memset(key_name, 0, - ENCRYPTION_MASTER_KEY_NAME_MAX_LEN); - ut_snprintf(key_name, ENCRYPTION_MASTER_KEY_NAME_MAX_LEN, - "%s-%lu-%lu", ENCRYPTION_MASTER_KEY_PRIFIX, - server_id, *master_key_id); - - ret = my_key_fetch(key_name, &key_type, NULL, - reinterpret_cast(master_key), - &key_len); - *version = Encryption::ENCRYPTION_VERSION_1; - } -#ifdef UNIV_ENCRYPT_DEBUG - if (!ret && *master_key) { - fprintf(stderr, "Fetched master key:%lu ", - *master_key_id); - ut_print_buf(stderr, *master_key, key_len); - fprintf(stderr, "\n"); - } -#endif - } - - if (ret) { - *master_key = NULL; - ib::error() << "Encryption can't find master key, please check" - " the keyring plugin is loaded."; - } - - if (key_type) { - my_free(key_type); - } -#endif -} - -/** Check if page is encrypted page or not -@param[in] page page which need to check -@return true if it is a encrypted page */ -bool -Encryption::is_encrypted_page(const byte* page) -{ - ulint page_type = mach_read_from_2(page + FIL_PAGE_TYPE); - - return(page_type == FIL_PAGE_ENCRYPTED - || page_type == FIL_PAGE_COMPRESSED_AND_ENCRYPTED - || page_type == FIL_PAGE_ENCRYPTED_RTREE); -} - -/** Encrypt the page data contents. Page type can't be -FIL_PAGE_ENCRYPTED, FIL_PAGE_COMPRESSED_AND_ENCRYPTED, -FIL_PAGE_ENCRYPTED_RTREE. -@param[in] type IORequest -@param[in,out] src page data which need to encrypt -@param[in] src_len Size of the source in bytes -@param[in,out] dst destination area -@param[in,out] dst_len Size of the destination in bytes -@return buffer data, dst_len will have the length of the data */ -byte* -Encryption::encrypt( - const IORequest& type, - byte* src, - ulint src_len, - byte* dst, - ulint* dst_len) -{ - ulint len = 0; - ulint page_type = mach_read_from_2(src + FIL_PAGE_TYPE); - ulint data_len; - ulint main_len; - ulint remain_len; - byte remain_buf[MY_AES_BLOCK_SIZE * 2]; - -#ifdef UNIV_ENCRYPT_DEBUG - ulint space_id = - mach_read_from_4(src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); - ulint page_no = mach_read_from_4(src + FIL_PAGE_OFFSET); - - fprintf(stderr, "Encrypting page:%lu.%lu len:%lu\n", - space_id, page_no, src_len); -#endif - - /* Shouldn't encrypte an already encrypted page. */ - ut_ad(page_type != FIL_PAGE_ENCRYPTED - && page_type != FIL_PAGE_COMPRESSED_AND_ENCRYPTED - && page_type != FIL_PAGE_ENCRYPTED_RTREE); - - ut_ad(m_type != Encryption::NONE); - - /* This is data size which need to encrypt. */ - data_len = src_len - FIL_PAGE_DATA; - main_len = (data_len / MY_AES_BLOCK_SIZE) * MY_AES_BLOCK_SIZE; - remain_len = data_len - main_len; - - /* Only encrypt the data + trailer, leave the header alone */ - - switch (m_type) { - case Encryption::NONE: - ut_error; - - case Encryption::AES: { - lint elen; - - ut_ad(m_klen == ENCRYPTION_KEY_LEN); - - elen = my_aes_encrypt( - src + FIL_PAGE_DATA, - static_cast(main_len), - dst + FIL_PAGE_DATA, - reinterpret_cast(m_key), - static_cast(m_klen), - my_aes_256_cbc, - reinterpret_cast(m_iv), - false); - - if (elen == MY_AES_BAD_DATA) { - ulint page_no =mach_read_from_4( - src + FIL_PAGE_OFFSET); - ulint space_id = mach_read_from_4( - src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); - *dst_len = src_len; -#ifndef UNIV_INNOCHECKSUM - ib::warn() - << " Can't encrypt data of page," - << " page no:" << page_no - << " space id:" << space_id; -#else - fprintf(stderr, " Can't encrypt data of page," - " page no:" ULINTPF - " space id:" ULINTPF, - page_no, space_id); -#endif /* !UNIV_INNOCHECKSUM */ - return(src); - } - - len = static_cast(elen); - ut_ad(len == main_len); - - /* Copy remain bytes and page tailer. */ - memcpy(dst + FIL_PAGE_DATA + len, - src + FIL_PAGE_DATA + len, - src_len - FIL_PAGE_DATA - len); - - /* Encrypt the remain bytes. */ - if (remain_len != 0) { - remain_len = MY_AES_BLOCK_SIZE * 2; - - elen = my_aes_encrypt( - dst + FIL_PAGE_DATA + data_len - remain_len, - static_cast(remain_len), - remain_buf, - reinterpret_cast(m_key), - static_cast(m_klen), - my_aes_256_cbc, - reinterpret_cast(m_iv), - false); - - if (elen == MY_AES_BAD_DATA) { - ulint page_no =mach_read_from_4( - src + FIL_PAGE_OFFSET); - ulint space_id = mach_read_from_4( - src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); -#ifndef UNIV_INNOCHECKSUM - ib::warn() - << " Can't encrypt data of page," - << " page no:" << page_no - << " space id:" << space_id; -#else - fprintf(stderr, " Can't encrypt data of page," - " page no:" ULINTPF - " space id:" ULINTPF, - page_no, space_id); -#endif /* !UNIV_INNOCHECKSUM */ - *dst_len = src_len; - return(src); - } - - memcpy(dst + FIL_PAGE_DATA + data_len - remain_len, - remain_buf, remain_len); - } - - - break; - } - - default: - ut_error; - } - - /* Copy the header as is. */ - memmove(dst, src, FIL_PAGE_DATA); - ut_ad(memcmp(src, dst, FIL_PAGE_DATA) == 0); - - /* Add encryption control information. Required for decrypting. */ - if (page_type == FIL_PAGE_COMPRESSED) { - /* If the page is compressed, we don't need to save the - original type, since it is done in compression already. */ - mach_write_to_2(dst + FIL_PAGE_TYPE, - FIL_PAGE_COMPRESSED_AND_ENCRYPTED); - ut_ad(memcmp(src+FIL_PAGE_TYPE+2, - dst+FIL_PAGE_TYPE+2, - FIL_PAGE_DATA-FIL_PAGE_TYPE-2) == 0); - } else if (page_type == FIL_PAGE_RTREE) { - /* If the page is R-tree page, we need to save original - type. */ - mach_write_to_2(dst + FIL_PAGE_TYPE, FIL_PAGE_ENCRYPTED_RTREE); - } else{ - mach_write_to_2(dst + FIL_PAGE_TYPE, FIL_PAGE_ENCRYPTED); - mach_write_to_2(dst + FIL_PAGE_ORIGINAL_TYPE_V1, page_type); - } - -#ifdef UNIV_ENCRYPT_DEBUG -#ifndef UNIV_INNOCHECKSUM -#if 0 - byte* check_buf = static_cast(ut_malloc_nokey(src_len)); - byte* buf2 = static_cast(ut_malloc_nokey(src_len)); - - memcpy(check_buf, dst, src_len); - - dberr_t err = decrypt(type, check_buf, src_len, buf2, src_len); - if (err != DB_SUCCESS || memcmp(src + FIL_PAGE_DATA, - check_buf + FIL_PAGE_DATA, - src_len - FIL_PAGE_DATA) != 0) { - ut_print_buf(stderr, src, src_len); - ut_print_buf(stderr, check_buf, src_len); - ut_ad(0); - } - ut_free(buf2); - ut_free(check_buf); -#endif - fprintf(stderr, "Encrypted page:%lu.%lu\n", space_id, page_no); -#endif -#endif - *dst_len = src_len; - - - return(dst); -} - -/** Decrypt the page data contents. Page type must be FIL_PAGE_ENCRYPTED, -if not then the source contents are left unchanged and DB_SUCCESS is returned. -@param[in] type IORequest -@param[in,out] src Data read from disk, decrypted data will be - copied to this page -@param[in] src_len source data length -@param[in,out] dst Scratch area to use for decryption -@param[in] dst_len Size of the scratch area in bytes -@return DB_SUCCESS or error code */ -dberr_t -Encryption::decrypt( - const IORequest& type, - byte* src, - ulint src_len, - byte* dst, - ulint dst_len) -{ - ulint data_len; - ulint main_len; - ulint remain_len; - ulint original_type; - ulint page_type; - byte remain_buf[MY_AES_BLOCK_SIZE * 2]; - Block* block; - - /* Do nothing if it's not an encrypted table. */ - if (!is_encrypted_page(src)) { - return(DB_SUCCESS); - } - - /* For compressed page, we need to get the compressed size - for decryption */ - page_type = mach_read_from_2(src + FIL_PAGE_TYPE); - if (page_type == FIL_PAGE_COMPRESSED_AND_ENCRYPTED) { - src_len = static_cast( - mach_read_from_2(src + FIL_PAGE_COMPRESS_SIZE_V1)) - + FIL_PAGE_DATA; -#ifndef UNIV_INNOCHECKSUM - src_len = ut_calc_align(src_len, type.block_size()); -#endif - } -#ifdef UNIV_ENCRYPT_DEBUG - ulint space_id = - mach_read_from_4(src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); - ulint page_no = mach_read_from_4(src + FIL_PAGE_OFFSET); - - fprintf(stderr, "Decrypting page:%lu.%lu len:%lu\n", - space_id, page_no, src_len); -#endif - - original_type = static_cast( - mach_read_from_2(src + FIL_PAGE_ORIGINAL_TYPE_V1)); - - byte* ptr = src + FIL_PAGE_DATA; - - /* The caller doesn't know what to expect */ - if (dst == NULL) { - - block = os_alloc_block(); -#ifdef UNIV_INNOCHECKSUM - dst = block; -#else - dst = block->m_ptr; -#endif /* UNIV_INNOCHECKSUM */ - - } else { - block = NULL; - } - - data_len = src_len - FIL_PAGE_DATA; - main_len = (data_len / MY_AES_BLOCK_SIZE) * MY_AES_BLOCK_SIZE; - remain_len = data_len - main_len; - - switch(m_type) { - case Encryption::AES: { - lint elen; - - /* First decrypt the last 2 blocks data of data, since - data is no block aligned. */ - if (remain_len != 0) { - ut_ad(m_klen == ENCRYPTION_KEY_LEN); - - remain_len = MY_AES_BLOCK_SIZE * 2; - - /* Copy the last 2 blocks. */ - memcpy(remain_buf, - ptr + data_len - remain_len, - remain_len); - - elen = my_aes_decrypt( - remain_buf, - static_cast(remain_len), - dst + data_len - remain_len, - reinterpret_cast(m_key), - static_cast(m_klen), - my_aes_256_cbc, - reinterpret_cast(m_iv), - false); - if (elen == MY_AES_BAD_DATA) { - if (block != NULL) { - os_free_block(block); - } - - return(DB_IO_DECRYPT_FAIL); - } - - /* Copy the other data bytes to temp area. */ - memcpy(dst, ptr, data_len - remain_len); - } else { - ut_ad(data_len == main_len); - - /* Copy the data bytes to temp area. */ - memcpy(dst, ptr, data_len); - } - - /* Then decrypt the main data */ - elen = my_aes_decrypt( - dst, - static_cast(main_len), - ptr, - reinterpret_cast(m_key), - static_cast(m_klen), - my_aes_256_cbc, - reinterpret_cast(m_iv), - false); - if (elen == MY_AES_BAD_DATA) { - - if (block != NULL) { - os_free_block(block); - } - - return(DB_IO_DECRYPT_FAIL); - } - - ut_ad(static_cast(elen) == main_len); - - /* Copy the remain bytes. */ - memcpy(ptr + main_len, dst + main_len, data_len - main_len); - - break; - } - - default: -#if !defined(UNIV_INNOCHECKSUM) - ib::error() - << "Encryption algorithm support missing: " - << Encryption::to_string(m_type); -#else - fprintf(stderr, "Encryption algorithm support missing: %s\n", - Encryption::to_string(m_type)); -#endif /* !UNIV_INNOCHECKSUM */ - - if (block != NULL) { - os_free_block(block); - } - - return(DB_UNSUPPORTED); - } - - /* Restore the original page type. If it's a compressed and - encrypted page, just reset it as compressed page type, since - we will do uncompress later. */ - - if (page_type == FIL_PAGE_ENCRYPTED) { - mach_write_to_2(src + FIL_PAGE_TYPE, original_type); - mach_write_to_2(src + FIL_PAGE_ORIGINAL_TYPE_V1, 0); - } else if (page_type == FIL_PAGE_ENCRYPTED_RTREE) { - mach_write_to_2(src + FIL_PAGE_TYPE, FIL_PAGE_RTREE); - } else { - ut_ad(page_type == FIL_PAGE_COMPRESSED_AND_ENCRYPTED); - mach_write_to_2(src + FIL_PAGE_TYPE, FIL_PAGE_COMPRESSED); - } - - if (block != NULL) { - os_free_block(block); - } - -#ifdef UNIV_ENCRYPT_DEBUG - fprintf(stderr, "Decrypted page:%lu.%lu\n", space_id, page_no); -#endif - - DBUG_EXECUTE_IF("ib_crash_during_decrypt_page", DBUG_SUICIDE();); - - return(DB_SUCCESS); -} -#endif /* MYSQL_ENCRYPTION */ - /** Normalizes a directory path for the current OS: On Windows, we convert '/' to '\', else we convert '\' to '/'. @param[in,out] str A null-terminated directory and file path */ diff --git a/storage/innobase/os/os0thread.cc b/storage/innobase/os/os0thread.cc index fd88fafa69d..8039c2e4f46 100644 --- a/storage/innobase/os/os0thread.cc +++ b/storage/innobase/os/os0thread.cc @@ -279,4 +279,3 @@ os_thread_free() mutex_destroy(&thread_mutex); } - diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc index b32e8deb6e6..16bdf602e81 100644 --- a/storage/innobase/page/page0cur.cc +++ b/storage/innobase/page/page0cur.cc @@ -40,11 +40,6 @@ Created 10/4/1994 Heikki Tuuri #include -#ifdef PAGE_CUR_ADAPT -# ifdef UNIV_SEARCH_PERF_STAT -static ulint page_cur_short_succ = 0; -# endif /* UNIV_SEARCH_PERF_STAT */ - /*******************************************************************//** This is a linear congruential generator PRNG. Returns a pseudo random number between 0 and 2^64-1 inclusive. The formula and the constants @@ -79,6 +74,11 @@ page_cur_lcg_prng(void) return(lcg_current); } +#ifdef BTR_CUR_HASH_ADAPT +# ifdef UNIV_SEARCH_PERF_STAT +static ulint page_cur_short_succ; +# endif /* UNIV_SEARCH_PERF_STAT */ + /** Try a search shortcut based on the last insert. @param[in] block index page @param[in] index index tree @@ -246,7 +246,7 @@ exit_func: } return(success); } -#endif +#endif /* BTR_CUR_HASH_ADAPT */ #ifdef PAGE_CUR_LE_OR_EXTENDS /****************************************************************//** @@ -359,7 +359,7 @@ page_cur_search_with_match( ut_d(page_check_dir(page)); -#ifdef PAGE_CUR_ADAPT +#ifdef BTR_CUR_HASH_ADAPT if (page_is_leaf(page) && (mode == PAGE_CUR_LE) && !dict_index_is_spatial(index) @@ -380,7 +380,7 @@ page_cur_search_with_match( mode = PAGE_CUR_LE; } # endif -#endif +#endif /* BTR_CUR_HASH_ADAPT */ /* If the mode is for R-tree indexes, use the special MBR related compare functions */ @@ -552,6 +552,7 @@ up_rec_match: } } +#ifdef BTR_CUR_HASH_ADAPT /** Search the right position for a page cursor. @param[in] block buffer block @param[in] index index tree @@ -619,7 +620,7 @@ page_cur_search_with_match_bytes( ut_d(page_check_dir(page)); -#ifdef PAGE_CUR_ADAPT +#ifdef BTR_CUR_HASH_ADAPT if (page_is_leaf(page) && (mode == PAGE_CUR_LE) && (page_header_get_field(page, PAGE_N_DIRECTION) > 3) @@ -639,7 +640,7 @@ page_cur_search_with_match_bytes( mode = PAGE_CUR_LE; } # endif -#endif +#endif /* BTR_CUR_HASH_ADAPT */ /* The following flag does not work for non-latin1 char sets because cmp_full_field does not tell how many bytes matched */ @@ -805,6 +806,7 @@ up_rec_match: mem_heap_free(heap); } } +#endif /* BTR_CUR_HASH_ADAPT */ /***********************************************************//** Positions a page cursor on a randomly chosen user record on a page. If there diff --git a/storage/innobase/page/page0page.cc b/storage/innobase/page/page0page.cc index 5f330b9e071..d38b426b0d4 100644 --- a/storage/innobase/page/page0page.cc +++ b/storage/innobase/page/page0page.cc @@ -2,6 +2,7 @@ Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -480,7 +481,7 @@ page_create_zip( /* PAGE_MAX_TRX_ID or PAGE_ROOT_AUTO_INC are always 0 for temporary tables. */ - ut_ad(!dict_table_is_temporary(index->table) || max_trx_id == 0); + ut_ad(max_trx_id == 0 || !dict_table_is_temporary(index->table)); /* In secondary indexes and the change buffer, PAGE_MAX_TRX_ID must be zero on non-leaf pages. max_trx_id can be 0 when the index consists of an empty root (leaf) page. */ @@ -550,6 +551,7 @@ page_create_empty( } if (page_zip) { + ut_ad(!dict_table_is_temporary(index->table)); page_create_zip(block, index, page_header_get_field(page, PAGE_LEVEL), max_trx_id, NULL, mtr); @@ -1161,8 +1163,7 @@ delete_all: if (scrub) { /* scrub record */ - uint recsize = rec_offs_data_size(offsets); - memset(rec2, 0, recsize); + memset(rec2, 0, rec_offs_data_size(offsets)); } rec2 = page_rec_get_next(rec2); diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc index c47a1905b4b..c0746bd9d5f 100644 --- a/storage/innobase/page/page0zip.cc +++ b/storage/innobase/page/page0zip.cc @@ -2,6 +2,7 @@ Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -1388,9 +1389,8 @@ page_zip_compress( #ifdef UNIV_DEBUG ib::error() - << "InnoDB: Simulating a compression failure" - << " for table " - << (index->table->name.m_name) + << "Simulating a compression failure" + << " for table " << index->table->name << " index " << index->name() << " page " @@ -1596,9 +1596,9 @@ err_exit: #ifdef UNIV_DEBUG page_zip->m_start = #endif /* UNIV_DEBUG */ - page_zip->m_end = PAGE_DATA + c_stream.total_out; + page_zip->m_end = unsigned(PAGE_DATA + c_stream.total_out); page_zip->m_nonempty = FALSE; - page_zip->n_blobs = n_blobs; + page_zip->n_blobs = unsigned(n_blobs); /* Copy those header fields that will not be written in buf_flush_init_for_writing() */ memcpy(page_zip->data + FIL_PAGE_PREV, page + FIL_PAGE_PREV, @@ -1715,7 +1715,7 @@ page_zip_fields_decode( index = dict_mem_index_create("ZIP_DUMMY", "ZIP_DUMMY", DICT_HDR_SPACE, 0, n); index->table = table; - index->n_uniq = n; + index->n_uniq = unsigned(n); /* avoid ut_ad(index->cached) in dict_index_get_n_unique_in_tree */ index->cached = TRUE; @@ -1774,7 +1774,7 @@ page_zip_fields_decode( page_zip_fields_free(index); index = NULL; } else { - index->n_nullable = val; + index->n_nullable = unsigned(val); } } @@ -2430,7 +2430,7 @@ zlib_done: } #ifdef UNIV_DEBUG - page_zip->m_start = PAGE_DATA + d_stream->total_in; + page_zip->m_start = unsigned(PAGE_DATA + d_stream->total_in); #endif /* UNIV_DEBUG */ /* Apply the modification log. */ @@ -2445,7 +2445,7 @@ zlib_done: if (UNIV_UNLIKELY(!mod_log_ptr)) { return(FALSE); } - page_zip->m_end = mod_log_ptr - page_zip->data; + page_zip->m_end = unsigned(mod_log_ptr - page_zip->data); page_zip->m_nonempty = mod_log_ptr != d_stream->next_in; } @@ -2583,9 +2583,7 @@ zlib_done: - d_stream->next_out); } -#ifdef UNIV_DEBUG - page_zip->m_start = PAGE_DATA + d_stream->total_in; -#endif /* UNIV_DEBUG */ + ut_d(page_zip->m_start = unsigned(PAGE_DATA + d_stream->total_in)); /* Apply the modification log. */ { @@ -2599,7 +2597,7 @@ zlib_done: if (UNIV_UNLIKELY(!mod_log_ptr)) { return(FALSE); } - page_zip->m_end = mod_log_ptr - page_zip->data; + page_zip->m_end = unsigned(mod_log_ptr - page_zip->data); page_zip->m_nonempty = mod_log_ptr != d_stream->next_in; } @@ -2914,9 +2912,7 @@ zlib_done: - d_stream->next_out); } -#ifdef UNIV_DEBUG - page_zip->m_start = PAGE_DATA + d_stream->total_in; -#endif /* UNIV_DEBUG */ + ut_d(page_zip->m_start = unsigned(PAGE_DATA + d_stream->total_in)); /* Apply the modification log. */ { @@ -2930,7 +2926,7 @@ zlib_done: if (UNIV_UNLIKELY(!mod_log_ptr)) { return(FALSE); } - page_zip->m_end = mod_log_ptr - page_zip->data; + page_zip->m_end = unsigned(mod_log_ptr - page_zip->data); page_zip->m_nonempty = mod_log_ptr != d_stream->next_in; } @@ -3133,7 +3129,7 @@ zlib_error: d_stream.avail_in = static_cast( page_zip_get_size(page_zip) - (PAGE_DATA + 1)); d_stream.next_out = page + PAGE_ZIP_START; - d_stream.avail_out = UNIV_PAGE_SIZE - PAGE_ZIP_START; + d_stream.avail_out = uInt(UNIV_PAGE_SIZE - PAGE_ZIP_START); if (UNIV_UNLIKELY(inflateInit2(&d_stream, UNIV_PAGE_SIZE_SHIFT) != Z_OK)) { @@ -3854,7 +3850,7 @@ page_zip_write_rec( ut_a(!*data); ut_ad((ulint) (data - page_zip->data) < page_zip_get_size(page_zip)); - page_zip->m_end = data - page_zip->data; + page_zip->m_end = unsigned(data - page_zip->data); page_zip->m_nonempty = TRUE; #ifdef UNIV_ZIP_DEBUG @@ -4688,6 +4684,7 @@ page_zip_reorganize( ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); ut_ad(page_is_comp(page)); ut_ad(!dict_index_is_ibuf(index)); + ut_ad(!dict_table_is_temporary(index->table)); /* Note that page_zip_validate(page_zip, page, index) may fail here. */ UNIV_MEM_ASSERT_RW(page, UNIV_PAGE_SIZE); UNIV_MEM_ASSERT_RW(page_zip->data, page_zip_get_size(page_zip)); @@ -4719,7 +4716,6 @@ page_zip_reorganize( temp_page + (PAGE_HEADER + PAGE_MAX_TRX_ID), 8); /* PAGE_MAX_TRX_ID must be set on secondary index leaf pages. */ ut_ad(dict_index_is_clust(index) || !page_is_leaf(temp_page) - || dict_table_is_temporary(index->table) || page_get_max_trx_id(page) != 0); /* PAGE_MAX_TRX_ID must be zero on non-leaf pages other than clustered index root pages. */ @@ -4764,6 +4760,7 @@ page_zip_copy_recs( ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX)); ut_ad(mtr_memo_contains_page(mtr, src, MTR_MEMO_PAGE_X_FIX)); ut_ad(!dict_index_is_ibuf(index)); + ut_ad(!dict_table_is_temporary(index->table)); #ifdef UNIV_ZIP_DEBUG /* The B-tree operations that call this function may set FIL_PAGE_PREV or PAGE_LEVEL, causing a temporary min_rec_flag @@ -4807,8 +4804,7 @@ page_zip_copy_recs( } else { /* The PAGE_MAX_TRX_ID must be nonzero on leaf pages of secondary indexes, and 0 on others. */ - ut_ad(dict_table_is_temporary(index->table) - || !page_is_leaf(src) == !page_get_max_trx_id(src)); + ut_ad(!page_is_leaf(src) == !page_get_max_trx_id(src)); } /* Copy all fields of src_zip to page_zip, except the pointer @@ -4920,7 +4916,7 @@ page_zip_calc_checksum( srv_checksum_algorithm_t algo, bool use_legacy_big_endian /* = false */) { - uint32_t adler; + uLong adler; const Bytef* s = static_cast(data); /* Exclude FIL_PAGE_SPACE_OR_CHKSUM, FIL_PAGE_LSN, @@ -4960,7 +4956,7 @@ page_zip_calc_checksum( static_cast(size) - FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); - return(adler); + return(uint32_t(adler)); case SRV_CHECKSUM_ALGORITHM_NONE: case SRV_CHECKSUM_ALGORITHM_STRICT_NONE: return(BUF_NO_CHECKSUM_MAGIC); diff --git a/storage/innobase/que/que0que.cc b/storage/innobase/que/que0que.cc index 8d3e8cfa115..9fd12686f57 100644 --- a/storage/innobase/que/que0que.cc +++ b/storage/innobase/que/que0que.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -1248,21 +1249,3 @@ que_eval_sql( DBUG_RETURN(trx->error_state); } - -/*********************************************************************//** -Initialise the query sub-system. */ -void -que_init(void) -/*==========*/ -{ - /* No op */ -} - -/*********************************************************************//** -Close the query sub-system. */ -void -que_close(void) -/*===========*/ -{ - /* No op */ -} diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc index 920fdb62079..d79b25a35a7 100644 --- a/storage/innobase/rem/rem0rec.cc +++ b/storage/innobase/rem/rem0rec.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -549,7 +550,7 @@ rec_get_offsets_func( (ULINT_UNDEFINED if all fields) */ #ifdef UNIV_DEBUG const char* file, /*!< in: file name where called */ - ulint line, /*!< in: line number where called */ + unsigned line, /*!< in: line number where called */ #endif /* UNIV_DEBUG */ mem_heap_t** heap) /*!< in/out: memory heap */ { diff --git a/storage/innobase/row/row0ftsort.cc b/storage/innobase/row/row0ftsort.cc index 3f2255d4644..3179c63f162 100644 --- a/storage/innobase/row/row0ftsort.cc +++ b/storage/innobase/row/row0ftsort.cc @@ -524,7 +524,6 @@ row_merge_fts_doc_tokenize( while (t_ctx->processed_len < doc->text.f_len) { ulint idx = 0; ib_uint32_t position; - ulint offset = 0; ulint cur_len; doc_id_t write_doc_id; row_fts_token_t* fts_token = NULL; @@ -794,7 +793,6 @@ fts_parallel_tokenization( mem_heap_t* blob_heap = NULL; fts_doc_t doc; dict_table_t* table = psort_info->psort_common->new_table; - dict_field_t* idx_field; fts_tokenize_ctx_t t_ctx; ulint retried = 0; dberr_t error = DB_SUCCESS; @@ -823,9 +821,6 @@ fts_parallel_tokenization( doc.charset = fts_index_get_charset( psort_info->psort_common->dup->index); - idx_field = dict_index_get_nth_field( - psort_info->psort_common->dup->index, 0); - block = psort_info->merge_block; crypt_block = psort_info->crypt_block; crypt_data = psort_info->psort_common->crypt_data; diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index 1054e4db1ef..a6f4b221302 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2016, MariaDB Corporation. +Copyright (c) 2015, 2017, MariaDB Corporation. This 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 @@ -124,8 +124,7 @@ struct row_import { m_col_names(), m_n_indexes(), m_indexes(), - m_missing(true), - m_cfp_missing(true) { } + m_missing(true) {} ~row_import() UNIV_NOTHROW; @@ -220,9 +219,6 @@ struct row_import { bool m_missing; /*!< true if a .cfg file was found and was readable */ - - bool m_cfp_missing; /*!< true if a .cfp file was - found and was readable */ }; /** Use the page cursor to iterate over records in a block. */ @@ -365,8 +361,7 @@ public: m_space(ULINT_UNDEFINED), m_xdes(), m_xdes_page_no(ULINT_UNDEFINED), - m_space_flags(ULINT_UNDEFINED), - m_table_flags(ULINT_UNDEFINED) UNIV_NOTHROW { } + m_space_flags(ULINT_UNDEFINED) UNIV_NOTHROW { } /** Free any extent descriptor instance */ virtual ~AbstractCallback() @@ -388,6 +383,12 @@ public: return(get_page_size().is_compressed()); } + /** @return the tablespace flags */ + ulint get_space_flags() const + { + return(m_space_flags); + } + protected: /** Get the data page depending on the table type, compressed or not. @param block block read from disk @@ -527,10 +528,6 @@ protected: /** Flags value read from the header page */ ulint m_space_flags; - - /** Derived from m_space_flags and row format type, the row format - type is determined from the page header. */ - ulint m_table_flags; }; /** Determine the page size to use for traversing the tablespace @@ -545,13 +542,19 @@ AbstractCallback::init( const page_t* page = block->frame; m_space_flags = fsp_header_get_flags(page); + if (!fsp_flags_is_valid(m_space_flags)) { + ulint cflags = fsp_flags_convert_from_101(m_space_flags); + if (cflags == ULINT_UNDEFINED) { + ib::error() << "Invalid FSP_SPACE_FLAGS=" + << ib::hex(m_space_flags); + return(DB_CORRUPTION); + } + m_space_flags = cflags; + } - /* Since we don't know whether it is a compressed table - or not, the data is always read into the block->frame. */ - - set_page_size(block->frame); - - /* Set the page size used to traverse the tablespace. */ + /* Clear the DATA_DIR flag, which is basically garbage. */ + m_space_flags &= ~(1U << FSP_FLAGS_POS_RESERVED); + m_page_size.copy_from(page_size_t(m_space_flags)); if (!is_compressed_table() && !m_page_size.equals_to(univ_page_size)) { @@ -618,52 +621,6 @@ struct FetchIndexRootPages : public AbstractCallback { return(m_space); } - /** - @retval the space flags of the tablespace being iterated over */ - virtual ulint get_space_flags() const UNIV_NOTHROW - { - return(m_space_flags); - } - - /** Check if the .ibd file row format is the same as the table's. - @param ibd_table_flags determined from space and page. - @return DB_SUCCESS or error code. */ - dberr_t check_row_format(ulint ibd_table_flags) UNIV_NOTHROW - { - dberr_t err; - rec_format_t ibd_rec_format; - rec_format_t table_rec_format; - - if (!dict_tf_is_valid(ibd_table_flags)) { - - ib_errf(m_trx->mysql_thd, IB_LOG_LEVEL_ERROR, - ER_TABLE_SCHEMA_MISMATCH, - ".ibd file has invalid table flags: %lx", - ibd_table_flags); - - return(DB_CORRUPTION); - } - - ibd_rec_format = dict_tf_get_rec_format(ibd_table_flags); - table_rec_format = dict_tf_get_rec_format(m_table->flags); - - if (table_rec_format != ibd_rec_format) { - - ib_errf(m_trx->mysql_thd, IB_LOG_LEVEL_ERROR, - ER_TABLE_SCHEMA_MISMATCH, - "Table has %s row format, .ibd" - " file has %s row format.", - dict_tf_to_row_format_string(m_table->flags), - dict_tf_to_row_format_string(ibd_table_flags)); - - err = DB_CORRUPTION; - } else { - err = DB_SUCCESS; - } - - return(err); - } - /** Called for each block as it is read from the file. @param offset physical offset in the file @param block block to convert, it is not from the buffer pool. @@ -724,12 +681,17 @@ FetchIndexRootPages::operator() ( m_indexes.push_back(Index(id, block->page.id.page_no())); if (m_indexes.size() == 1) { - - m_table_flags = fsp_flags_to_dict_tf( - m_space_flags, - page_is_comp(page) ? true : false); - - err = check_row_format(m_table_flags); + /* Check that the tablespace flags match the table flags. */ + ulint expected = dict_tf_to_fsp_flags(m_table->flags); + if (!fsp_flags_match(expected, m_space_flags)) { + ib_errf(m_trx->mysql_thd, IB_LOG_LEVEL_ERROR, + ER_TABLE_SCHEMA_MISMATCH, + "Expected FSP_SPACE_FLAGS=0x%x, .ibd " + "file contains 0x%x.", + unsigned(expected), + unsigned(m_space_flags)); + return(DB_CORRUPTION); + } } } @@ -853,13 +815,6 @@ public: return(m_cfg->m_table->space); } - /** - @retval the space flags of the tablespace being iterated over */ - virtual ulint get_space_flags() const UNIV_NOTHROW - { - return(m_space_flags); - } - /** Called for each block as it is read from the file. @param offset physical offset in the file @param block block to convert, it is not from the buffer pool. @@ -1914,19 +1869,14 @@ PageConverter::update_header( ib::warn() << "Space id check in the header failed: ignored"; } - ulint space_flags = fsp_header_get_flags(get_frame(block)); - - if (!fsp_flags_is_valid(space_flags)) { - - ib::error() << "Unsupported tablespace format " - << space_flags; - - return(DB_UNSUPPORTED); - } - mach_write_to_8( get_frame(block) + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, m_current_lsn); + + /* Write back the adjusted flags. */ + mach_write_to_4(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + + get_frame(block), m_space_flags); + /* Write space_id to the tablespace header, page 0. */ mach_write_to_4( get_frame(block) + FSP_HEADER_OFFSET + FSP_SPACE_ID, @@ -2182,9 +2132,6 @@ row_import_cleanup( trx_commit_for_mysql(trx); - prebuilt->table->encryption_key = NULL; - prebuilt->table->encryption_iv = NULL; - row_mysql_unlock_data_dictionary(trx); trx_free_for_mysql(trx); @@ -3168,170 +3115,6 @@ row_import_read_cfg( return(err); } -#ifdef MYSQL_ENCRYPTION -/** Read the contents of the .cfp file. -@param[in] table table -@param[in] file file to read from -@param[in] thd session -@param[in] cfp contents of the .cfp file -@return DB_SUCCESS or error code. */ -static -dberr_t -row_import_read_encryption_data( - dict_table_t* table, - FILE* file, - THD* thd, - row_import& import) -{ - byte row[sizeof(ib_uint32_t)]; - ulint key_size; - byte transfer_key[ENCRYPTION_KEY_LEN]; - byte encryption_key[ENCRYPTION_KEY_LEN]; - byte encryption_iv[ENCRYPTION_KEY_LEN]; - lint elen; - - if (fread(&row, 1, sizeof(row), file) != sizeof(row)) { - ib_senderrf( - thd, IB_LOG_LEVEL_ERROR, ER_IO_READ_ERROR, - errno, strerror(errno), - "while reading encrypton key size."); - - return(DB_IO_ERROR); - } - - key_size = mach_read_from_4(row); - if (key_size != ENCRYPTION_KEY_LEN) { - ib_senderrf( - thd, IB_LOG_LEVEL_ERROR, ER_IO_READ_ERROR, - errno, strerror(errno), - "while parsing encryption key size."); - - return(DB_IO_ERROR); - } - - /* Read the transfer key. */ - if (fread(transfer_key, 1, ENCRYPTION_KEY_LEN, file) - != ENCRYPTION_KEY_LEN) { - ib_senderrf( - thd, IB_LOG_LEVEL_WARN, ER_IO_WRITE_ERROR, - errno, strerror(errno), - "while reading tranfer key."); - - return(DB_IO_ERROR); - } - - /* Read the encrypted key. */ - if (fread(encryption_key, 1, ENCRYPTION_KEY_LEN, file) - != ENCRYPTION_KEY_LEN) { - ib_senderrf( - thd, IB_LOG_LEVEL_WARN, ER_IO_WRITE_ERROR, - errno, strerror(errno), - "while reading encryption key."); - - return(DB_IO_ERROR); - } - - /* Read the encrypted iv. */ - if (fread(encryption_iv, 1, ENCRYPTION_KEY_LEN, file) - != ENCRYPTION_KEY_LEN) { - ib_senderrf( - thd, IB_LOG_LEVEL_WARN, ER_IO_WRITE_ERROR, - errno, strerror(errno), - "while reading encryption iv."); - - return(DB_IO_ERROR); - } - - table->encryption_key = - static_cast(mem_heap_alloc(table->heap, - ENCRYPTION_KEY_LEN)); - - table->encryption_iv = - static_cast(mem_heap_alloc(table->heap, - ENCRYPTION_KEY_LEN)); - /* Decrypt tablespace key and iv. */ - elen = my_aes_decrypt( - encryption_key, - ENCRYPTION_KEY_LEN, - table->encryption_key, - transfer_key, - ENCRYPTION_KEY_LEN, - my_aes_256_ecb, NULL, false); - - if (elen == MY_AES_BAD_DATA) { - ib_senderrf( - thd, IB_LOG_LEVEL_ERROR, ER_IO_READ_ERROR, - errno, strerror(errno), - "while decrypt encryption key."); - - return(DB_IO_ERROR); - } - - elen = my_aes_decrypt( - encryption_iv, - ENCRYPTION_KEY_LEN, - table->encryption_iv, - transfer_key, - ENCRYPTION_KEY_LEN, - my_aes_256_ecb, NULL, false); - - if (elen == MY_AES_BAD_DATA) { - ib_senderrf( - thd, IB_LOG_LEVEL_ERROR, ER_IO_READ_ERROR, - errno, strerror(errno), - "while decrypt encryption iv."); - - return(DB_IO_ERROR); - } - - return(DB_SUCCESS); -} - -/** Read the contents of the .cfp file. -@param[in] table table -@param[in] thd session -@param[in] cfp contents of the .cfp file -@return DB_SUCCESS or error code. */ -static -dberr_t -row_import_read_cfp( - dict_table_t* table, - THD* thd, - row_import& import) -{ - dberr_t err; - char name[OS_FILE_MAX_PATH]; - - /* Clear table encryption information. */ - table->encryption_key = NULL; - table->encryption_iv = NULL; - - srv_get_encryption_data_filename(table, name, sizeof(name)); - - FILE* file = fopen(name, "rb"); - - if (file == NULL) { - import.m_cfp_missing = true; - - /* If there's no cfp file, we assume it's not an - encrpyted table. return directly. */ - - import.m_cfp_missing = true; - - err = DB_SUCCESS; - } else { - - import.m_cfp_missing = false; - - err = row_import_read_encryption_data(table, file, - thd, import); - fclose(file); - } - - return(err); -} -#endif /* MYSQL_ENCRYPTION */ - /*****************************************************************//** Update the of a table's indexes from the values in the data dictionary. @@ -3699,42 +3482,7 @@ row_import_for_mysql( rw_lock_s_unlock_gen(dict_operation_lock, 0); } - /* Try to read encryption information. */ - if (err == DB_SUCCESS) { -#ifdef MYSQL_ENCRYPTION - err = row_import_read_cfp(table, trx->mysql_thd, cfg); - - /* If table is not set to encrypted, but the fsp flag - is not, then return error. */ - if (!dict_table_is_encrypted(table) - && space_flags != 0 - && FSP_FLAGS_GET_ENCRYPTION(space_flags)) { - - ib_errf(trx->mysql_thd, IB_LOG_LEVEL_ERROR, - ER_TABLE_SCHEMA_MISMATCH, - "Table is not marked as encrypted, but" - " the tablespace is marked as encrypted"); - - err = DB_ERROR; - return(row_import_error(prebuilt, trx, err)); - } - - /* If table is set to encrypted, but can't find - cfp file, then return error. */ - if (cfg.m_cfp_missing== true - && ((space_flags != 0 - && FSP_FLAGS_GET_ENCRYPTION(space_flags)) - || dict_table_is_encrypted(table))) { - ib_errf(trx->mysql_thd, IB_LOG_LEVEL_ERROR, - ER_TABLE_SCHEMA_MISMATCH, - "Table is in an encrypted tablespace, but" - " can't find the encryption meta-data file" - " in importing"); - err = DB_ERROR; - return(row_import_error(prebuilt, trx, err)); - } -#endif /* MYSQL_ENCRYPTION */ - } else { + if (err != DB_SUCCESS) { return(row_import_error(prebuilt, trx, err)); } @@ -3757,22 +3505,6 @@ row_import_for_mysql( DBUG_EXECUTE_IF("ib_import_reset_space_and_lsn_failure", err = DB_TOO_MANY_CONCURRENT_TRXS;); -#ifdef MYSQL_ENCRYPTION - if (err == DB_IO_NO_ENCRYPT_TABLESPACE) { - char table_name[MAX_FULL_NAME_LEN + 1]; - - innobase_format_name( - table_name, sizeof(table_name), - table->name.m_name); - - ib_errf(trx->mysql_thd, IB_LOG_LEVEL_ERROR, - ER_TABLE_SCHEMA_MISMATCH, - "Encryption attribute is no matched"); - - return(row_import_cleanup(prebuilt, trx, err)); - } -#endif /* MYSQL_ENCRYPTION */ - if (err != DB_SUCCESS) { char table_name[MAX_FULL_NAME_LEN + 1]; @@ -3826,13 +3558,7 @@ row_import_for_mysql( we will not be writing any redo log for it before we have invoked fil_space_set_imported() to declare it a persistent tablespace. */ - ulint fsp_flags = dict_tf_to_fsp_flags(table->flags, false); - -#ifdef MYSQL_ENCRYPTION - if (table->encryption_key != NULL) { - fsp_flags |= FSP_FLAGS_MASK_ENCRYPTION; - } -#endif /* MYSQL_ENCRYPTION */ + ulint fsp_flags = dict_tf_to_fsp_flags(table->flags); err = fil_ibd_open( true, true, FIL_TYPE_IMPORT, table->space, @@ -3853,17 +3579,6 @@ row_import_for_mysql( return(row_import_cleanup(prebuilt, trx, err)); } -#ifdef MYSQL_ENCRYPTION - /* For encrypted table, set encryption information. */ - if (dict_table_is_encrypted(table)) { - - err = fil_set_encryption(table->space, - Encryption::AES, - table->encryption_key, - table->encryption_iv); - } -#endif /* MYSQL_ENCRYPTION */ - row_mysql_unlock_data_dictionary(trx); ut_free(filepath); @@ -3961,37 +3676,6 @@ row_import_for_mysql( ib::info() << "Phase IV - Flush complete"; fil_space_set_imported(prebuilt->table->space); -#ifdef MYSQL_ENCRYPTION - if (dict_table_is_encrypted(table)) { - fil_space_t* space; - mtr_t mtr; - byte encrypt_info[ENCRYPTION_INFO_SIZE_V2]; - - mtr_start(&mtr); - - mtr.set_named_space(table->space); - space = mtr_x_lock_space(table->space, &mtr); - - memset(encrypt_info, 0, ENCRYPTION_INFO_SIZE_V2); - - if (!fsp_header_rotate_encryption(space, - encrypt_info, - &mtr)) { - mtr_commit(&mtr); - ib_senderrf(trx->mysql_thd, IB_LOG_LEVEL_ERROR, - ER_FILE_NOT_FOUND, - filepath, err, ut_strerr(err)); - - ut_free(filepath); - row_mysql_unlock_data_dictionary(trx); - - return(row_import_cleanup(prebuilt, trx, err)); - } - - mtr_commit(&mtr); - } -#endif /* MYSQL_ENCRYPTION */ - /* The dictionary latches will be released in in row_import_cleanup() after the transaction commit, for both success and error. */ diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index 1f884017dd3..bd776815abd 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. +Copyright (c) 2016, 2017, MariaDB Corporation. This 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 @@ -2087,7 +2087,7 @@ row_ins_scan_sec_index_for_duplicate( btr_pcur_open(index, entry, PAGE_CUR_GE, s_latch - ? BTR_SEARCH_LEAF | BTR_ALREADY_S_LATCHED + ? BTR_SEARCH_LEAF_ALREADY_S_LATCHED : BTR_SEARCH_LEAF, &pcur, mtr); @@ -2505,7 +2505,7 @@ row_ins_clust_index_entry_low( if (mode == BTR_MODIFY_LEAF && dict_index_is_online_ddl(index)) { - mode = BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED; + mode = BTR_MODIFY_LEAF_ALREADY_S_LATCHED; mtr_s_lock(dict_index_get_lock(index), &mtr); } @@ -2836,7 +2836,7 @@ row_ins_sec_index_entry_low( rtr_info_update_btr(&cursor, &rtr_info); mtr_start(&mtr); mtr.set_named_space(index->space); - search_mode &= ~BTR_MODIFY_LEAF; + search_mode &= ulint(~BTR_MODIFY_LEAF); search_mode |= BTR_MODIFY_TREE; err = btr_cur_search_to_nth_level( index, 0, entry, PAGE_CUR_RTREE_INSERT, @@ -3086,7 +3086,7 @@ row_ins_index_entry_big_rec_func( #ifndef DBUG_OFF const void* thd, /*!< in: connection, or NULL */ #endif /* DBUG_OFF */ - ulint line) /*!< in: line number of caller */ + unsigned line) /*!< in: line number of caller */ { mtr_t mtr; btr_pcur_t pcur; diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc index 9de1277e712..0fc1dd097cc 100644 --- a/storage/innobase/row/row0log.cc +++ b/storage/innobase/row/row0log.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -526,7 +527,7 @@ err_exit: my_atomic_addlint(&onlineddl_rowlog_rows, 1); /* 10000 means 100.00%, 4525 means 45.25% */ - onlineddl_rowlog_pct_used = (log->tail.total * 10000) / srv_online_max_size; + onlineddl_rowlog_pct_used = static_cast((log->tail.total * 10000) / srv_online_max_size); } #ifdef UNIV_DEBUG @@ -1641,15 +1642,9 @@ row_log_table_apply_insert_low( ut_ad(dtuple_validate(row)); ut_ad(trx_id); -#ifdef UNIV_DEBUG - { - rec_printer p(row); - DBUG_PRINT("ib_alter_table", - ("insert table " IB_ID_FMT " (index " IB_ID_FMT "): %s", - index->table->id, index->id, - p.str().c_str())); - } -#endif + DBUG_LOG("ib_alter_table", + "insert table " << index->table->id << " (index " + << index->id << "): " << rec_printer(row).str()); static const ulint flags = (BTR_CREATE_FLAG @@ -1777,15 +1772,10 @@ row_log_table_apply_delete_low( ut_ad(dict_index_is_clust(index)); -#ifdef UNIV_DEBUG - { - rec_printer p(btr_pcur_get_rec(pcur), offsets); - DBUG_PRINT("ib_alter_table", - ("delete table " IB_ID_FMT " (index " IB_ID_FMT "): %s", - index->table->id, index->id, - p.str().c_str())); - } -#endif + DBUG_LOG("ib_alter_table", + "delete table " << index->table->id << " (index " + << index->id << "): " + << rec_printer(btr_pcur_get_rec(pcur), offsets).str()); if (dict_table_get_next_index(index)) { /* Build a row template for purging secondary index entries. */ @@ -2266,17 +2256,11 @@ func_exit_committed: cur_offsets, NULL, NULL, NULL, &old_ext, heap); ut_ad(old_row); -#ifdef UNIV_DEBUG - { - rec_printer old(old_row); - rec_printer new_row(row); - DBUG_PRINT("ib_alter_table", - ("update table " IB_ID_FMT " (index " IB_ID_FMT "): %s to %s", - index->table->id, index->id, - old.str().c_str(), - new_row.str().c_str())); - } -#endif + DBUG_LOG("ib_alter_table", + "update table " << index->table->id + << " (index " << index->id + << ": " << rec_printer(old_row).str() + << " to " << rec_printer(row).str()); } else { old_row = NULL; old_ext = NULL; @@ -3298,17 +3282,11 @@ row_log_apply_op_low( ut_ad(!dict_index_is_corrupted(index)); ut_ad(trx_id != 0 || op == ROW_OP_DELETE); -#ifdef UNIV_DEBUG - { - rec_printer p(entry); - DBUG_PRINT("ib_create_index", - ("%s %s index " IB_ID_FMT "," IB_ID_FMT ": %s", - op == ROW_OP_INSERT ? "insert" : "delete", - has_index_lock ? "locked" : "unlocked", - index->id, trx_id, - p.str().c_str())); - } -#endif + DBUG_LOG("ib_create_index", + (op == ROW_OP_INSERT ? "insert " : "delete ") + << (has_index_lock ? "locked index " : "unlocked index ") + << index->id << ',' << ib::hex(trx_id) << ": " + << rec_printer(entry).str()); mtr_start(&mtr); mtr.set_named_space(index->space); diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index a5cd0064ddd..ef832c38b95 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -378,9 +379,9 @@ row_merge_insert_index_tuples( const row_merge_buf_t* row_buf, BtrBulk* btr_bulk, const ib_uint64_t table_total_rows, /*!< in: total rows of old table */ - const float pct_progress, /*!< in: total progress + const double pct_progress, /*!< in: total progress percent until now */ - const float pct_cost, /*!< in: current progress percent + const double pct_cost, /*!< in: current progress percent */ fil_space_crypt_t* crypt_data,/*!< in: table crypt data */ row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ @@ -1100,16 +1101,11 @@ row_merge_buf_write( row_merge_buf_encode(&b, index, entry, n_fields); ut_ad(b < &block[srv_sort_buf_size]); -#ifdef UNIV_DEBUG - { - rec_printer p(entry->fields, n_fields); - DBUG_PRINT("ib_merge_sort", - ("%p,fd=%d,%lu %lu: %s", - reinterpret_cast(b), of->fd, - (ulint)of->offset, (ulint)i, - p.str().c_str())); - } -#endif + DBUG_LOG("ib_merge_sort", + reinterpret_cast(b) << ',' + << of->fd << ',' << of->offset << ' ' << + i << ": " << + rec_printer(entry->fields, n_fields).str()); } /* Write an "end-of-chunk" marker. */ @@ -1121,10 +1117,9 @@ row_merge_buf_write( to avoid bogus warnings. */ memset(b, 0xff, &block[srv_sort_buf_size] - b); #endif /* UNIV_DEBUG_VALGRIND */ - DBUG_PRINT("ib_merge_sort", - ("write %p,%d,%lu EOF", - reinterpret_cast(b), of->fd, - (ulint)of->offset)); + DBUG_LOG("ib_merge_sort", + "write " << reinterpret_cast(b) << ',' + << of->fd << ',' << of->offset << " EOF"); DBUG_VOID_RETURN; } @@ -1177,14 +1172,11 @@ row_merge_read( os_offset_t ofs = ((os_offset_t) offset) * srv_sort_buf_size; DBUG_ENTER("row_merge_read"); - DBUG_PRINT("ib_merge_sort", ("fd=%d ofs=" UINT64PF, fd, ofs)); + DBUG_LOG("ib_merge_sort", "fd=" << fd << " ofs=" << ofs); DBUG_EXECUTE_IF("row_merge_read_failure", DBUG_RETURN(FALSE);); IORequest request; - /* Merge sort pages are never compressed. */ - request.disable_compression(); - dberr_t err = os_file_read_no_error_handling( request, OS_FILE_FROM_FD(fd), buf, ofs, srv_sort_buf_size, NULL); @@ -1227,7 +1219,7 @@ row_merge_write( void* out_buf = (void *)buf; DBUG_ENTER("row_merge_write"); - DBUG_PRINT("ib_merge_sort", ("fd=%d ofs=" UINT64PF, fd, ofs)); + DBUG_LOG("ib_merge_sort", "fd=" << fd << " ofs=" << ofs); DBUG_EXECUTE_IF("row_merge_write_failure", DBUG_RETURN(FALSE);); IORequest request(IORequest::WRITE); @@ -1239,8 +1231,6 @@ row_merge_write( mach_write_to_4((byte *)out_buf, 0); } - request.disable_compression(); - dberr_t err = os_file_write( request, "(merge)", OS_FILE_FROM_FD(fd), out_buf, ofs, buf_len); @@ -1301,11 +1291,10 @@ row_merge_read_rec( if (UNIV_UNLIKELY(!extra_size)) { /* End of list */ *mrec = NULL; - DBUG_PRINT("ib_merge_sort", - ("read %p,%p,%d,%lu EOF\n", - reinterpret_cast(b), - reinterpret_cast(block), - fd, ulint(*foffs))); + DBUG_LOG("ib_merge_sort", + "read " << reinterpret_cast(b) << ',' << + reinterpret_cast(block) << ',' << + fd << ',' << *foffs << " EOF"); DBUG_RETURN(NULL); } @@ -1418,18 +1407,11 @@ err_exit: b += extra_size + data_size - avail_size; func_exit: - -#ifdef UNIV_DEBUG - { - rec_printer p(*mrec, 0, offsets); - DBUG_PRINT("ib_merge_sort", - ("%p,%p,fd=%d,%lu: %s", - reinterpret_cast(b), - reinterpret_cast(block), - fd, ulint(*foffs), - p.str().c_str())); - } -#endif + DBUG_LOG("ib_merge_sort", + reinterpret_cast(b) << ',' << + reinterpret_cast(block) + << ",fd=" << fd << ',' << *foffs << ": " + << rec_printer(*mrec, 0, offsets).str()); DBUG_RETURN(b); } @@ -1460,15 +1442,9 @@ row_merge_write_rec_low( #endif /* DBUG_OFF */ DBUG_ASSERT(e == rec_offs_extra_size(offsets) + 1); -#ifdef UNIV_DEBUG - { - rec_printer p(mrec, 0, offsets); - DBUG_PRINT("ib_merge_sort", - ("%p,fd=%d,%lu: %s", - reinterpret_cast(b), fd, ulint(foffs), - p.str().c_str())); - } -#endif + DBUG_LOG("ib_merge_sort", + reinterpret_cast(b) << ",fd=" << fd << ',' + << foffs << ": " << rec_printer(mrec, 0, offsets).str()); if (e < 0x80) { *b++ = (byte) e; @@ -1578,11 +1554,10 @@ row_merge_write_eof( ut_ad(foffs); DBUG_ENTER("row_merge_write_eof"); - DBUG_PRINT("ib_merge_sort", - ("%p,%p,fd=%d,%lu", - reinterpret_cast(b), - reinterpret_cast(block), - fd, ulint(*foffs))); + DBUG_LOG("ib_merge_sort", + reinterpret_cast(b) << ',' << + reinterpret_cast(block) << + ",fd=" << fd << ',' << *foffs); if (b == &block[0]) { b+= ROW_MERGE_RESERVE_SIZE; @@ -1825,7 +1800,7 @@ row_merge_read_clustered_index( bool skip_pk_sort, int* tmpfd, ut_stage_alter_t* stage, - float pct_cost, + double pct_cost, fil_space_crypt_t* crypt_data, row_merge_block_t* crypt_block, struct TABLE* eval_table) @@ -1860,7 +1835,7 @@ row_merge_read_clustered_index( mtuple_t prev_mtuple; mem_heap_t* conv_heap = NULL; FlushObserver* observer = trx->flush_observer; - float curr_progress = 0.0; + double curr_progress = 0.0; ib_uint64_t read_rows = 0; ib_uint64_t table_total_rows = 0; @@ -2942,10 +2917,9 @@ row_merge_blocks( ulint* offsets1;/* offsets of mrec1 */ DBUG_ENTER("row_merge_blocks"); - DBUG_PRINT("ib_merge_sort", - ("fd=%d,%lu+%lu to fd=%d,%lu", - file->fd, ulint(*foffs0), ulint(*foffs1), - of->fd, ulint(of->offset))); + DBUG_LOG("ib_merge_sort", + "fd=" << file->fd << ',' << *foffs0 << '+' << *foffs1 + << " to fd=" << of->fd << ',' << of->offset); heap = row_merge_heap_create(dup->index, &buf, &offsets0, &offsets1); @@ -3055,10 +3029,9 @@ row_merge_blocks_copy( ulint* offsets1;/* dummy offsets */ DBUG_ENTER("row_merge_blocks_copy"); - DBUG_PRINT("ib_merge_sort", - ("fd=%d,%lu to fd=%d,%lu", - file->fd, ulint(foffs0), - of->fd, ulint(of->offset))); + DBUG_LOG("ib_merge_sort", + "fd=" << file->fd << ',' << foffs0 + << " to fd=" << of->fd << ',' << of->offset); heap = row_merge_heap_create(index, &buf, &offsets0, &offsets1); @@ -3273,10 +3246,10 @@ row_merge_sort( const bool update_progress, /*!< in: update progress status variable or not */ - const float pct_progress, + const double pct_progress, /*!< in: total progress percent until now */ - const float pct_cost, /*!< in: current progress percent */ + const double pct_cost, /*!< in: current progress percent */ fil_space_crypt_t* crypt_data,/*!< in: table crypt data */ row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ ulint space, /*!< in: space id */ @@ -3288,7 +3261,7 @@ row_merge_sort( dberr_t error = DB_SUCCESS; ulint merge_count = 0; ulint total_merge_sort_count; - float curr_progress = 0; + double curr_progress = 0; DBUG_ENTER("row_merge_sort"); @@ -3301,7 +3274,7 @@ row_merge_sort( /* Find the number N which 2^N is greater or equal than num_runs */ /* N is merge sort running count */ - total_merge_sort_count = (ulint) ceil(my_log2f(num_runs)); + total_merge_sort_count = (ulint) ceil(my_log2f((float)num_runs)); if(total_merge_sort_count <= 0) { total_merge_sort_count=1; } @@ -3487,9 +3460,9 @@ row_merge_insert_index_tuples( const row_merge_buf_t* row_buf, BtrBulk* btr_bulk, const ib_uint64_t table_total_rows, /*!< in: total rows of old table */ - const float pct_progress, /*!< in: total progress + const double pct_progress, /*!< in: total progress percent until now */ - const float pct_cost, /*!< in: current progress percent + const double pct_cost, /*!< in: current progress percent */ fil_space_crypt_t* crypt_data,/*!< in: table crypt data */ row_merge_block_t* crypt_block, /*!< in: crypt buf or NULL */ @@ -3506,7 +3479,7 @@ row_merge_insert_index_tuples( ulint n_rows = 0; dtuple_t* dtuple; ib_uint64_t inserted_rows = 0; - float curr_progress = 0; + double curr_progress = 0; dict_index_t* old_index = NULL; const mrec_t* mrec = NULL; ulint n_ext = 0; @@ -4538,7 +4511,7 @@ row_merge_create_index( /*********************************************************************//** Check if a transaction can use an index. */ -ibool +bool row_merge_is_index_usable( /*======================*/ const trx_t* trx, /*!< in: transaction */ @@ -4547,7 +4520,7 @@ row_merge_is_index_usable( if (!dict_index_is_clust(index) && dict_index_is_online_ddl(index)) { /* Indexes that are being created are not useable. */ - return(FALSE); + return(false); } return(!dict_index_is_corrupted(index) @@ -4666,11 +4639,11 @@ row_merge_build_indexes( bool fts_psort_initiated = false; fil_space_crypt_t * crypt_data = NULL; - float total_static_cost = 0; - float total_dynamic_cost = 0; + double total_static_cost = 0; + double total_dynamic_cost = 0; uint total_index_blocks = 0; - float pct_cost=0; - float pct_progress=0; + double pct_cost=0; + double pct_progress=0; DBUG_ENTER("row_merge_build_indexes"); diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index 269291bd517..ab5736f88d7 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -102,8 +103,6 @@ static ib_mutex_t row_drop_list_mutex; /** Flag: has row_mysql_drop_list been initialized? */ static ibool row_mysql_drop_list_inited = FALSE; -extern ib_mutex_t master_key_id_mutex; - /** Magic table names for invoking various monitor threads */ /* @{ */ static const char S_innodb_monitor[] = "innodb_monitor"; @@ -2345,7 +2344,7 @@ row_mysql_freeze_data_dictionary_func( /*==================================*/ trx_t* trx, /*!< in/out: transaction */ const char* file, /*!< in: file name */ - ulint line) /*!< in: line number */ + unsigned line) /*!< in: line number */ { ut_a(trx->dict_operation_lock_mode == 0); @@ -2378,7 +2377,7 @@ row_mysql_lock_data_dictionary_func( /*================================*/ trx_t* trx, /*!< in/out: transaction */ const char* file, /*!< in: file name */ - ulint line) /*!< in: line number */ + unsigned line) /*!< in: line number */ { ut_a(trx->dict_operation_lock_mode == 0 || trx->dict_operation_lock_mode == RW_X_LATCH); @@ -2422,9 +2421,6 @@ row_create_table_for_mysql( dict_table_t* table, /*!< in, own: table definition (will be freed, or on DB_SUCCESS added to the data dictionary cache) */ - const char* compression, - /*!< in: compression algorithm to use, - can be NULL */ trx_t* trx, /*!< in/out: transaction */ bool commit, /*!< in: if true, commit the transaction */ fil_encryption_t mode, /*!< in: encryption mode */ @@ -2512,46 +2508,11 @@ err_exit: /* We must delete the link file. */ RemoteDatafile::delete_link_file(table->name.m_name); - - } else if (compression != NULL && compression[0] != '\0') { -#ifdef MYSQL_COMPRESSION - ut_ad(!dict_table_in_shared_tablespace(table)); - - ut_ad(Compression::validate(compression) == DB_SUCCESS); - - err = fil_set_compression(table, compression); - - switch (err) { - case DB_SUCCESS: - break; - case DB_NOT_FOUND: - case DB_UNSUPPORTED: - case DB_IO_NO_PUNCH_HOLE_FS: - /* Return these errors */ - break; - case DB_IO_NO_PUNCH_HOLE_TABLESPACE: - /* Page Compression will not be used. */ - err = DB_SUCCESS; - break; - default: - ut_error; - } - - /* We can check for file system punch hole support - only after creating the tablespace. On Windows - we can query that information but not on Linux. */ - ut_ad(err == DB_SUCCESS - || err == DB_IO_NO_PUNCH_HOLE_FS); -#endif /* MYSQL_COMPRESSION */ - - /* In non-strict mode we ignore dodgy compression - settings. */ } } switch (err) { case DB_SUCCESS: - case DB_IO_NO_PUNCH_HOLE_FS: break; case DB_OUT_OF_FILE_SPACE: trx->error_state = DB_SUCCESS; @@ -3275,33 +3236,6 @@ row_discard_tablespace( return(err); } - /* For encrypted table, before we discard the tablespace, - we need save the encryption information into table, otherwise, - this information will be lost in fil_discard_tablespace along - with fil_space_free(). */ - if (dict_table_is_encrypted(table)) { - ut_ad(table->encryption_key == NULL - && table->encryption_iv == NULL); - - table->encryption_key = - static_cast(mem_heap_alloc(table->heap, - ENCRYPTION_KEY_LEN)); - - table->encryption_iv = - static_cast(mem_heap_alloc(table->heap, - ENCRYPTION_KEY_LEN)); - - fil_space_t* space = fil_space_get(table->space); - ut_ad(FSP_FLAGS_GET_ENCRYPTION(space->flags)); - - memcpy(table->encryption_key, - space->encryption_key, - ENCRYPTION_KEY_LEN); - memcpy(table->encryption_iv, - space->encryption_iv, - ENCRYPTION_KEY_LEN); - } - /* Discard the physical file that is used for the tablespace. */ err = fil_discard_tablespace(table->space); @@ -3502,8 +3436,8 @@ void fil_wait_crypt_bg_threads( dict_table_t* table) { - uint start = time(0); - uint last = start; + time_t start = time(0); + time_t last = start; if (table->space != 0) { fil_space_crypt_mark_space_closing(table->space, table->crypt_data); } @@ -3512,7 +3446,8 @@ fil_wait_crypt_bg_threads( dict_mutex_exit_for_mysql(); os_thread_sleep(20000); dict_mutex_enter_for_mysql(); - uint now = time(0); + time_t now = time(0); + if (now >= last + 30) { ib::warn() << "Waited " << now - start @@ -3613,9 +3548,7 @@ This deletes the fil_space_t if found and the file on disk. @param[in] space_id Tablespace ID @param[in] tablename Table name, same as the tablespace name @param[in] filepath File path of tablespace to delete -@param[in] is_temp Is this a temporary table/tablespace -@param[in] is_encrypted Is this an encrypted table/tablespace -@param[in] trx Transaction handle +@param[in] table_flags table flags @return error code or DB_SUCCESS */ UNIV_INLINE dberr_t @@ -3623,28 +3556,20 @@ row_drop_single_table_tablespace( ulint space_id, const char* tablename, const char* filepath, - bool is_temp, - bool is_encrypted, - trx_t* trx) + ulint table_flags) { dberr_t err = DB_SUCCESS; - /* This might be a temporary single-table tablespace if the table - is compressed and temporary. If so, don't spam the log when we - delete one of these or if we can't find the tablespace. */ - bool print_msg = !is_temp && !is_encrypted; - /* If the tablespace is not in the cache, just delete the file. */ if (!fil_space_for_table_exists_in_mem( - space_id, tablename, print_msg, false, NULL, 0, NULL)) { + space_id, tablename, true, false, NULL, 0, NULL, + table_flags)) { /* Force a delete of any discarded or temporary files. */ fil_delete_file(filepath); - if (print_msg) { - ib::info() << "Removed datafile " << filepath - << " for table " << tablename; - } + ib::info() << "Removed datafile " << filepath + << " for table " << tablename; } else if (fil_delete_tablespace(space_id, BUF_REMOVE_FLUSH_NO_WRITE) != DB_SUCCESS) { @@ -4111,35 +4036,22 @@ row_drop_table_for_mysql( /* remove the index object associated. */ dict_drop_index_tree_in_mem(index, *page_no++); } - err = DB_SUCCESS; + err = row_drop_table_from_cache(tablename, table, trx); + goto funct_exit; } switch (err) { ulint space_id; - bool is_temp; - bool is_encrypted; bool ibd_file_missing; bool is_discarded; - bool shared_tablespace; + ulint table_flags; case DB_SUCCESS: space_id = table->space; ibd_file_missing = table->ibd_file_missing; is_discarded = dict_table_is_discarded(table); - is_temp = dict_table_is_temporary(table); - is_encrypted = dict_table_is_encrypted(table); - shared_tablespace = DICT_TF_HAS_SHARED_SPACE(table->flags); - - /* If there is a temp path then the temp flag is set. - However, during recovery, we might have a temp flag but - not know the temp path */ - ut_a(table->dir_path_of_temp_table == NULL || is_temp); - - /* We do not allow temporary tables with a remote path. */ - ut_a(!(is_temp && DICT_TF_HAS_DATA_DIR(table->flags))); - - /* Make sure the data_dir_path is set if needed. */ - dict_get_and_save_data_dir_path(table, true); + table_flags = table->flags; + ut_ad(!dict_table_is_temporary(table)); err = row_drop_ancillary_fts_tables(table, trx); if (err != DB_SUCCESS) { @@ -4149,15 +4061,12 @@ row_drop_table_for_mysql( /* Determine the tablespace filename before we drop dict_table_t. Free this memory before returning. */ if (DICT_TF_HAS_DATA_DIR(table->flags)) { + dict_get_and_save_data_dir_path(table, true); ut_a(table->data_dir_path); filepath = fil_make_filepath( table->data_dir_path, table->name.m_name, IBD, true); - } else if (table->dir_path_of_temp_table) { - filepath = fil_make_filepath( - table->dir_path_of_temp_table, - NULL, IBD, false); - } else if (!shared_tablespace) { + } else { filepath = fil_make_filepath( NULL, table->name.m_name, IBD, false); } @@ -4169,35 +4078,15 @@ row_drop_table_for_mysql( } /* Do not attempt to drop known-to-be-missing tablespaces, - nor system or shared general tablespaces. */ - if (is_discarded || ibd_file_missing || shared_tablespace + nor the system tablespace. */ + if (is_discarded || ibd_file_missing || is_system_tablespace(space_id)) { - /* For encrypted table, if ibd file can not be decrypt, - we also set ibd_file_missing. We still need to try to - remove the ibd file for this. */ - if (is_discarded || !is_encrypted - || !ibd_file_missing) { - break; - } + break; } -#ifdef MYSQL_ENCRYPTION - if (is_encrypted) { - /* Require the mutex to block key rotation. */ - mutex_enter(&master_key_id_mutex); - } -#endif /* MYSQL_ENCRYPTION */ - /* We can now drop the single-table tablespace. */ err = row_drop_single_table_tablespace( - space_id, tablename, filepath, - is_temp, is_encrypted, trx); - -#ifdef MYSQL_ENCRYPTION - if (is_encrypted) { - mutex_exit(&master_key_id_mutex); - } -#endif /* MYSQL_ENCRYPTION */ + space_id, tablename, filepath, table_flags); break; case DB_OUT_OF_FILE_SPACE: @@ -4279,99 +4168,6 @@ funct_exit: DBUG_RETURN(err); } -/*********************************************************************//** -Drop all temporary tables during crash recovery. */ -void -row_mysql_drop_temp_tables(void) -/*============================*/ -{ - trx_t* trx; - btr_pcur_t pcur; - mtr_t mtr; - mem_heap_t* heap; - - trx = trx_allocate_for_background(); - trx->op_info = "dropping temporary tables"; - row_mysql_lock_data_dictionary(trx); - - heap = mem_heap_create(200); - - mtr_start(&mtr); - - btr_pcur_open_at_index_side( - true, - dict_table_get_first_index(dict_sys->sys_tables), - BTR_SEARCH_LEAF, &pcur, true, 0, &mtr); - - for (;;) { - const rec_t* rec; - const byte* field; - ulint len; - const char* table_name; - dict_table_t* table; - - btr_pcur_move_to_next_user_rec(&pcur, &mtr); - - if (!btr_pcur_is_on_user_rec(&pcur)) { - break; - } - - /* The high order bit of N_COLS is set unless - ROW_FORMAT=REDUNDANT. */ - rec = btr_pcur_get_rec(&pcur); - field = rec_get_nth_field_old( - rec, DICT_FLD__SYS_TABLES__NAME, &len); - field = rec_get_nth_field_old( - rec, DICT_FLD__SYS_TABLES__N_COLS, &len); - if (len != 4 - || !(mach_read_from_4(field) & DICT_N_COLS_COMPACT)) { - continue; - } - - /* Older versions of InnoDB, which only supported tables - in ROW_FORMAT=REDUNDANT could write garbage to - SYS_TABLES.MIX_LEN, where we now store the is_temp flag. - Above, we assumed is_temp=0 if ROW_FORMAT=REDUNDANT. */ - field = rec_get_nth_field_old( - rec, DICT_FLD__SYS_TABLES__MIX_LEN, &len); - if (len != 4 - || !(mach_read_from_4(field) & DICT_TF2_TEMPORARY)) { - continue; - } - - /* This is a temporary table. */ - field = rec_get_nth_field_old( - rec, DICT_FLD__SYS_TABLES__NAME, &len); - if (len == UNIV_SQL_NULL || len == 0) { - /* Corrupted SYS_TABLES.NAME */ - continue; - } - - table_name = mem_heap_strdupl(heap, (const char*) field, len); - - btr_pcur_store_position(&pcur, &mtr); - btr_pcur_commit_specify_mtr(&pcur, &mtr); - - table = dict_load_table(table_name, true, - DICT_ERR_IGNORE_NONE); - - if (table) { - row_drop_table_for_mysql(table_name, trx, FALSE, FALSE); - trx_commit_for_mysql(trx); - } - - mtr_start(&mtr); - btr_pcur_restore_position(BTR_SEARCH_LEAF, - &pcur, &mtr); - } - - btr_pcur_close(&pcur); - mtr_commit(&mtr); - mem_heap_free(heap); - row_mysql_unlock_data_dictionary(trx); - trx_free_for_background(trx); -} - /*******************************************************************//** Drop all foreign keys in a database, see Bug#18942. Called at the end of row_drop_database_for_mysql(). @@ -5438,7 +5234,8 @@ row_mysql_close(void) { ut_a(UT_LIST_GET_LEN(row_mysql_drop_list) == 0); - mutex_free(&row_drop_list_mutex); - - row_mysql_drop_list_inited = FALSE; + if (row_mysql_drop_list_inited) { + mutex_free(&row_drop_list_mutex); + row_mysql_drop_list_inited = FALSE; + } } diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc index 23e08c38cdd..074bb3edbc1 100644 --- a/storage/innobase/row/row0purge.cc +++ b/storage/innobase/row/row0purge.cc @@ -407,12 +407,12 @@ row_purge_remove_sec_if_poss_leaf( { mtr_t mtr; btr_pcur_t pcur; - ulint mode; + enum btr_latch_mode mode; enum row_search_result search_result; bool success = true; log_free_check(); - + ut_ad(!dict_table_is_temporary(index->table)); mtr_start(&mtr); mtr.set_named_space(index->space); @@ -436,23 +436,17 @@ row_purge_remove_sec_if_poss_leaf( goto func_exit_no_pcur; } - /* Change buffering is disabled for temporary tables. */ - mode = (dict_table_is_temporary(index->table)) - ? BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED - : BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED - | BTR_DELETE; + mode = BTR_PURGE_LEAF_ALREADY_S_LATCHED; } else { /* For secondary indexes, index->online_status==ONLINE_INDEX_COMPLETE if index->is_committed(). */ ut_ad(!dict_index_is_online_ddl(index)); - /* Change buffering is disabled for temporary tables - and spatial index. */ - mode = (dict_table_is_temporary(index->table) - || dict_index_is_spatial(index)) + /* Change buffering is disabled for spatial index. */ + mode = dict_index_is_spatial(index) ? BTR_MODIFY_LEAF - : BTR_MODIFY_LEAF | BTR_DELETE; + : BTR_PURGE_LEAF; } /* Set the purge node for the call to row_purge_poss_sec(). */ @@ -515,22 +509,22 @@ row_purge_remove_sec_if_poss_leaf( page = btr_cur_get_page(btr_cur); if (!lock_test_prdt_page_lock( - trx, - page_get_space_id(page), - page_get_page_no(page)) - && page_get_n_recs(page) < 2 - && page_get_page_no(page) != - dict_index_get_page(index)) { + trx, + page_get_space_id(page), + page_get_page_no(page)) + && page_get_n_recs(page) < 2 + && btr_cur_get_block(btr_cur) + ->page.id.page_no() != + dict_index_get_page(index)) { /* this is the last record on page, and it has a "page" lock on it, which mean search is still depending on it, so do not delete */ -#ifdef UNIV_DEBUG - ib::info() << "skip purging last" - " record on page " - << page_get_page_no(page) - << "."; -#endif /* UNIV_DEBUG */ + DBUG_LOG("purge", + "skip purging last" + " record on page " + << btr_cur_get_block(btr_cur) + ->page.id); btr_pcur_close(&pcur); mtr_commit(&mtr); @@ -751,13 +745,7 @@ skip_secondaries: &is_insert, &rseg_id, &page_no, &offset); - /* If table is temp then it can't have its undo log - residing in rollback segment with REDO log enabled. */ - bool is_redo_rseg = - dict_table_is_temporary(node->table) - ? false : true; - rseg = trx_sys_get_nth_rseg( - trx_sys, rseg_id, is_redo_rseg); + rseg = trx_rseg_get_on_id(rseg_id); ut_a(rseg != NULL); ut_a(rseg->id == rseg_id); diff --git a/storage/innobase/row/row0quiesce.cc b/storage/innobase/row/row0quiesce.cc index 08d119768a9..d26d81c9239 100644 --- a/storage/innobase/row/row0quiesce.cc +++ b/storage/innobase/row/row0quiesce.cc @@ -480,210 +480,6 @@ row_quiesce_write_cfg( return(err); } -#ifdef MYSQL_ENCRYPTION - -/** Write the transfer key to CFP file. -@param[in] table write the data for this table -@param[in] file file to write to -@param[in] thd session -@return DB_SUCCESS or error code. */ -static MY_ATTRIBUTE((nonnull, warn_unused_result)) -dberr_t -row_quiesce_write_transfer_key( - const dict_table_t* table, - FILE* file, - THD* thd) -{ - byte key_size[sizeof(ib_uint32_t)]; - byte row[ENCRYPTION_KEY_LEN * 3]; - byte* ptr = row; - byte* transfer_key = ptr; - lint elen; - - ut_ad(table->encryption_key != NULL - && table->encryption_iv != NULL); - - /* Write the encryption key size. */ - mach_write_to_4(key_size, ENCRYPTION_KEY_LEN); - - if (fwrite(&key_size, 1, sizeof(key_size), file) - != sizeof(key_size)) { - ib_senderrf( - thd, IB_LOG_LEVEL_WARN, ER_IO_WRITE_ERROR, - errno, strerror(errno), - "while writing key size."); - - return(DB_IO_ERROR); - } - - /* Generate and write the transfer key. */ - Encryption::random_value(transfer_key); - if (fwrite(transfer_key, 1, ENCRYPTION_KEY_LEN, file) - != ENCRYPTION_KEY_LEN) { - ib_senderrf( - thd, IB_LOG_LEVEL_WARN, ER_IO_WRITE_ERROR, - errno, strerror(errno), - "while writing transfer key."); - - return(DB_IO_ERROR); - } - - ptr += ENCRYPTION_KEY_LEN; - - /* Encrypt tablespace key. */ - elen = my_aes_encrypt( - reinterpret_cast(table->encryption_key), - ENCRYPTION_KEY_LEN, - ptr, - reinterpret_cast(transfer_key), - ENCRYPTION_KEY_LEN, - my_aes_256_ecb, - NULL, false); - - if (elen == MY_AES_BAD_DATA) { - ib_senderrf( - thd, IB_LOG_LEVEL_WARN, ER_IO_WRITE_ERROR, - errno, strerror(errno), - "while encrypt tablespace key."); - return(DB_ERROR); - } - - /* Write encrypted tablespace key */ - if (fwrite(ptr, 1, ENCRYPTION_KEY_LEN, file) - != ENCRYPTION_KEY_LEN) { - ib_senderrf( - thd, IB_LOG_LEVEL_WARN, ER_IO_WRITE_ERROR, - errno, strerror(errno), - "while writing encrypted tablespace key."); - - return(DB_IO_ERROR); - } - ptr += ENCRYPTION_KEY_LEN; - - /* Encrypt tablespace iv. */ - elen = my_aes_encrypt( - reinterpret_cast(table->encryption_iv), - ENCRYPTION_KEY_LEN, - ptr, - reinterpret_cast(transfer_key), - ENCRYPTION_KEY_LEN, - my_aes_256_ecb, - NULL, false); - - if (elen == MY_AES_BAD_DATA) { - ib_senderrf( - thd, IB_LOG_LEVEL_WARN, ER_IO_WRITE_ERROR, - errno, strerror(errno), - "while encrypt tablespace iv."); - return(DB_ERROR); - } - - /* Write encrypted tablespace iv */ - if (fwrite(ptr, 1, ENCRYPTION_KEY_LEN, file) - != ENCRYPTION_KEY_LEN) { - ib_senderrf( - thd, IB_LOG_LEVEL_WARN, ER_IO_WRITE_ERROR, - errno, strerror(errno), - "while writing encrypted tablespace iv."); - - return(DB_IO_ERROR); - } - - return(DB_SUCCESS); -} - -/** Write the encryption data after quiesce. -@param[in] table write the data for this table -@param[in] thd session -@return DB_SUCCESS or error code */ -static MY_ATTRIBUTE((nonnull, warn_unused_result)) -dberr_t -row_quiesce_write_cfp( - dict_table_t* table, - THD* thd) -{ - dberr_t err; - char name[OS_FILE_MAX_PATH]; - - /* If table is not encrypted, return. */ - if (!dict_table_is_encrypted(table)) { - return(DB_SUCCESS); - } - - /* Get the encryption key and iv from space */ - /* For encrypted table, before we discard the tablespace, - we need save the encryption information into table, otherwise, - this information will be lost in fil_discard_tablespace along - with fil_space_free(). */ - if (table->encryption_key == NULL) { - table->encryption_key = - static_cast(mem_heap_alloc(table->heap, - ENCRYPTION_KEY_LEN)); - - table->encryption_iv = - static_cast(mem_heap_alloc(table->heap, - ENCRYPTION_KEY_LEN)); - - fil_space_t* space = fil_space_get(table->space); - ut_ad(space != NULL && FSP_FLAGS_GET_ENCRYPTION(space->flags)); - - memcpy(table->encryption_key, - space->encryption_key, - ENCRYPTION_KEY_LEN); - memcpy(table->encryption_iv, - space->encryption_iv, - ENCRYPTION_KEY_LEN); - } - - srv_get_encryption_data_filename(table, name, sizeof(name)); - - ib::info() << "Writing table encryption data to '" << name << "'"; - - FILE* file = fopen(name, "w+b"); - - if (file == NULL) { - ib_errf(thd, IB_LOG_LEVEL_WARN, ER_CANT_CREATE_FILE, - name, errno, strerror(errno)); - - err = DB_IO_ERROR; - } else { - err = row_quiesce_write_transfer_key(table, file, thd); - - if (fflush(file) != 0) { - - char msg[BUFSIZ]; - - ut_snprintf(msg, sizeof(msg), "%s flush() failed", - name); - - ib_senderrf( - thd, IB_LOG_LEVEL_WARN, ER_IO_WRITE_ERROR, - errno, strerror(errno), msg); - - err = DB_IO_ERROR; - } - - if (fclose(file) != 0) { - char msg[BUFSIZ]; - - ut_snprintf(msg, sizeof(msg), "%s flose() failed", - name); - - ib_senderrf( - thd, IB_LOG_LEVEL_WARN, ER_IO_WRITE_ERROR, - errno, strerror(errno), msg); - err = DB_IO_ERROR; - } - } - - /* Clean the encryption information */ - table->encryption_key = NULL; - table->encryption_iv = NULL; - - return(err); -} -#endif /* MYSQL_ENCRYPTION */ - /*********************************************************************//** Check whether a table has an FTS index defined on it. @return true if an FTS index exists on the table */ @@ -744,24 +540,9 @@ row_quiesce_table_start( } if (!trx_is_interrupted(trx)) { - extern ib_mutex_t master_key_id_mutex; - -#ifdef MYSQL_ENCRYPTION - if (dict_table_is_encrypted(table)) { - /* Require the mutex to block key rotation. */ - mutex_enter(&master_key_id_mutex); - } -#endif /* MYSQL_ENCRYPTION */ - buf_LRU_flush_or_remove_pages( table->space, BUF_REMOVE_FLUSH_WRITE, trx); -#ifdef MYSQL_ENCRYPTION - if (dict_table_is_encrypted(table)) { - mutex_exit(&master_key_id_mutex); - } -#endif /* MYSQL_ENCRYPTION */ - if (trx_is_interrupted(trx)) { ib::warn() << "Quiesce aborted!"; @@ -771,12 +552,6 @@ row_quiesce_table_start( ib::warn() << "There was an error writing to the" " meta data file"; -#ifdef MYSQL_ENCRYPTION - } else if (row_quiesce_write_cfp(table, trx->mysql_thd) - != DB_SUCCESS) { - ib::warn() << "There was an error writing to the" - " encryption info file"; -#endif /* MYSQL_ENCRYPTION */ } else { ib::info() << "Table " << table->name << " flushed to disk"; @@ -829,19 +604,6 @@ row_quiesce_table_complete( ib::info() << "Deleting the meta-data file '" << cfg_name << "'"; - if (dict_table_is_encrypted(table)) { - char cfp_name[OS_FILE_MAX_PATH]; - - srv_get_encryption_data_filename(table, - cfp_name, - sizeof(cfp_name)); - - os_file_delete_if_exists(innodb_data_file_key, cfp_name, NULL); - - ib::info() << "Deleting the meta-data file '" - << cfp_name << "'"; - } - if (trx_purge_state() != PURGE_STATE_DISABLED) { trx_purge_run(); } @@ -887,15 +649,6 @@ row_quiesce_set_state( ER_TABLE_IN_SYSTEM_TABLESPACE, table_name); return(DB_UNSUPPORTED); - - } else if (DICT_TF_HAS_SHARED_SPACE(table->flags)) { - std::ostringstream err_msg; - err_msg << "FLUSH TABLES FOR EXPORT on table " << table->name - << " in a general tablespace."; - ib_senderrf(trx->mysql_thd, IB_LOG_LEVEL_WARN, - ER_NOT_SUPPORTED_YET, err_msg.str().c_str()); - - return(DB_UNSUPPORTED); } else if (row_quiesce_table_has_fts_index(table)) { ib_senderrf(trx->mysql_thd, IB_LOG_LEVEL_WARN, diff --git a/storage/innobase/row/row0row.cc b/storage/innobase/row/row0row.cc index 5c71e6e98bc..0f15299e71a 100644 --- a/storage/innobase/row/row0row.cc +++ b/storage/innobase/row/row0row.cc @@ -129,7 +129,8 @@ row_build_index_entry_low( ut_ad(v_col->v_pos < dtuple_get_n_v_fields(row)); dfield2 = dtuple_get_nth_v_field(row, v_col->v_pos); - ut_ad(dfield_is_null(dfield2) || dfield2->data); + ut_ad(dfield_is_null(dfield2) || + dfield_get_len(dfield2) == 0 || dfield2->data); } else { dfield2 = dtuple_get_nth_field(row, col_no); ut_ad(dfield_get_type(dfield2)->mtype == DATA_MISSING diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc index 967d0ac98cd..e3d61531728 100644 --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@ -1456,6 +1456,7 @@ plan_reset_cursor( plan->n_rows_prefetched = 0; } +#ifdef BTR_CUR_HASH_ADAPT /*********************************************************************//** Tries to do a shortcut to fetch a clustered index record with a unique key, using the hash index if possible (not always). @@ -1485,11 +1486,8 @@ row_sel_try_search_shortcut( ut_ad(node->read_view); ut_ad(plan->unique_search); ut_ad(!plan->must_get_clust); -#ifdef UNIV_DEBUG - if (search_latch_locked) { - ut_ad(rw_lock_own(btr_get_search_latch(index), RW_LOCK_S)); - } -#endif /* UNIV_DEBUG */ + ut_ad(!search_latch_locked + || rw_lock_own(btr_get_search_latch(index), RW_LOCK_S)); row_sel_open_pcur(plan, search_latch_locked, mtr); @@ -1564,6 +1562,7 @@ func_exit: } return(ret); } +#endif /* BTR_CUR_HASH_ADAPT */ /*********************************************************************//** Performs a select step. @@ -1582,7 +1581,6 @@ row_sel( rec_t* rec; rec_t* old_vers; rec_t* clust_rec; - ibool search_latch_locked; ibool consistent_read; /* The following flag becomes TRUE when we are doing a @@ -1601,7 +1599,6 @@ row_sel( contains a clustered index latch, and &mtr must be committed before we move to the next non-clustered record */ - ulint found_flag; dberr_t err; mem_heap_t* heap = NULL; ulint offsets_[REC_OFFS_NORMAL_SIZE]; @@ -1610,7 +1607,11 @@ row_sel( ut_ad(thr->run_node == node); - search_latch_locked = FALSE; +#ifdef BTR_CUR_HASH_ADAPT + ibool search_latch_locked = FALSE; +#else /* BTR_CUR_HASH_ADAPT */ +# define search_latch_locked false +#endif /* BTR_CUR_HASH_ADAPT */ if (node->read_view) { /* In consistent reads, we try to do with the hash index and @@ -1657,11 +1658,12 @@ table_loop: mtr_start(&mtr); +#ifdef BTR_CUR_HASH_ADAPT if (consistent_read && plan->unique_search && !plan->pcur_is_open && !plan->must_get_clust && !plan->table->big_rows) { if (!search_latch_locked) { - rw_lock_s_lock(btr_get_search_latch(index)); + btr_search_s_lock(index); search_latch_locked = TRUE; } else if (rw_lock_get_writer(btr_get_search_latch(index)) @@ -1674,25 +1676,23 @@ table_loop: from acquiring an s-latch for a long time, lowering performance significantly in multiprocessors. */ - rw_lock_s_unlock(btr_get_search_latch(index)); - rw_lock_s_lock(btr_get_search_latch(index)); + btr_search_s_unlock(index); + btr_search_s_lock(index); } - found_flag = row_sel_try_search_shortcut(node, plan, - search_latch_locked, - &mtr); - - if (found_flag == SEL_FOUND) { - + switch (row_sel_try_search_shortcut(node, plan, + search_latch_locked, + &mtr)) { + case SEL_FOUND: goto next_table; - - } else if (found_flag == SEL_EXHAUSTED) { - + case SEL_EXHAUSTED: goto table_exhausted; + default: + ut_ad(0); + case SEL_RETRY: + break; } - ut_ad(found_flag == SEL_RETRY); - plan_reset_cursor(plan); mtr_commit(&mtr); @@ -1700,10 +1700,11 @@ table_loop: } if (search_latch_locked) { - rw_lock_s_unlock(btr_get_search_latch(index)); + btr_search_s_unlock(index); search_latch_locked = FALSE; } +#endif /* BTR_CUR_HASH_ADAPT */ if (!plan->pcur_is_open) { /* Evaluate the expressions to build the search tuple and @@ -2236,13 +2237,15 @@ stop_for_a_while: mtr_commit(&mtr); -#ifdef UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# ifdef UNIV_DEBUG { btrsea_sync_check check(true); ut_ad(!sync_check_iterate(check)); } -#endif /* UNIV_DEBUG */ +# endif /* UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ err = DB_SUCCESS; goto func_exit; @@ -2291,9 +2294,11 @@ lock_wait_or_error: #endif /* UNIV_DEBUG */ func_exit: +#ifdef BTR_CUR_HASH_ADAPT if (search_latch_locked) { - rw_lock_s_unlock(btr_get_search_latch(index)); + btr_search_s_unlock(index); } +#endif /* BTR_CUR_HASH_ADAPT */ if (heap != NULL) { mem_heap_free(heap); @@ -3077,7 +3082,7 @@ row_sel_store_mysql_field_func( mem_heap_t* heap; /* Copy an externally stored field to a temporary heap */ - ut_a(!prebuilt->trx->has_search_latch); + trx_assert_no_search_latch(prebuilt->trx); ut_ad(field_no == templ->clust_rec_field_no); ut_ad(templ->type != DATA_POINT); @@ -3615,10 +3620,7 @@ row_sel_get_clust_rec_for_mysql( func_exit: *out_rec = clust_rec; - /* Store the current position if select_lock_type is not - LOCK_NONE or if we are scanning using InnoDB APIs */ - if (prebuilt->select_lock_type != LOCK_NONE - || prebuilt->innodb_api) { + if (prebuilt->select_lock_type != LOCK_NONE) { /* We may use the cursor in update or in unlock_row(): store its position */ @@ -3932,6 +3934,7 @@ row_sel_enqueue_cache_row_for_mysql( ++prebuilt->n_fetch_cached; } +#ifdef BTR_CUR_HASH_ADAPT /*********************************************************************//** Tries to do a shortcut to fetch a clustered index record with a unique key, using the hash index if possible (not always). We assume that the search @@ -4000,6 +4003,7 @@ row_sel_try_search_shortcut_for_mysql( return(SEL_FOUND); } +#endif /* BTR_CUR_HASH_ADAPT */ /*********************************************************************//** Check a pushed-down index condition. @@ -4218,12 +4222,14 @@ row_search_mvcc( DBUG_RETURN(DB_END_OF_INDEX); } -#ifdef UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# ifdef UNIV_DEBUG { btrsea_sync_check check(trx->has_search_latch); ut_ad(!sync_check_iterate(check)); } -#endif /* UNIV_DEBUG */ +# endif /* UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ if (dict_table_is_discarded(prebuilt->table)) { @@ -4251,19 +4257,7 @@ row_search_mvcc( && (prebuilt->read_just_key || prebuilt->m_read_virtual_key); - /*-------------------------------------------------------------*/ - /* PHASE 0: Release a possible s-latch we are holding on the - adaptive hash index latch if there is someone waiting behind */ - - if (trx->has_search_latch) { - - /* There is an x-latch request on the adaptive hash index: - release the s-latch to reduce starvation and wait for - BTR_SEA_TIMEOUT rounds before trying to keep it again over - calls from MySQL */ - - trx_search_latch_release_if_reserved(trx); - } + trx_assert_no_search_latch(trx); /* Reset the new record lock info if srv_locks_unsafe_for_binlog is set or session is using a READ COMMITED isolation level. Then @@ -4382,6 +4376,7 @@ row_search_mvcc( mtr_start(&mtr); +#ifdef BTR_CUR_HASH_ADAPT /*-------------------------------------------------------------*/ /* PHASE 2: Try fast adaptive hash index search if possible */ @@ -4397,8 +4392,7 @@ row_search_mvcc( && dict_index_is_clust(index) && !prebuilt->templ_contains_blob && !prebuilt->used_in_HANDLER - && (prebuilt->mysql_row_len < UNIV_PAGE_SIZE / 8) - && !prebuilt->innodb_api) { + && (prebuilt->mysql_row_len < UNIV_PAGE_SIZE / 8)) { mode = PAGE_CUR_GE; @@ -4419,7 +4413,7 @@ row_search_mvcc( and if we try that, we can deadlock on the adaptive hash index semaphore! */ - ut_a(!trx->has_search_latch); + trx_assert_no_search_latch(trx); rw_lock_s_lock(btr_get_search_latch(index)); trx->has_search_latch = true; @@ -4507,11 +4501,12 @@ row_search_mvcc( trx->has_search_latch = false; } } +#endif /* BTR_CUR_HASH_ADAPT */ /*-------------------------------------------------------------*/ /* PHASE 3: Open or restore index cursor position */ - trx_search_latch_release_if_reserved(trx); + trx_assert_no_search_latch(trx); spatial_search = dict_index_is_spatial(index) && mode >= PAGE_CUR_CONTAIN; @@ -5273,7 +5268,7 @@ locks_ok: This optimization can avoid many IOs for certain schemas. */ ibool row_contains_all_values = TRUE; - int i; + uint i; for (i = 0; i < prebuilt->n_template; i++) { /* Condition (1) from above: is the field in the index (prefix or not)? */ @@ -5441,7 +5436,6 @@ requires_clust_rec: && !prebuilt->templ_contains_fixed_point && !prebuilt->clust_index_was_generated && !prebuilt->used_in_HANDLER - && !prebuilt->innodb_api && prebuilt->template_type != ROW_MYSQL_DUMMY_TEMPLATE && !prebuilt->in_fts_query) { @@ -5531,7 +5525,7 @@ requires_clust_rec: rec_offs_size(offsets)); mach_write_to_4(buf, rec_offs_extra_size(offsets) + 4); - } else if (!prebuilt->idx_cond && !prebuilt->innodb_api) { + } else if (!prebuilt->idx_cond) { /* The record was not yet converted to MySQL format. */ if (!row_sel_store_mysql_rec( buf, prebuilt, result_rec, vrow, @@ -5574,18 +5568,13 @@ idx_cond_failed: || !dict_index_is_clust(index) || direction != 0 || prebuilt->select_lock_type != LOCK_NONE - || prebuilt->used_in_HANDLER - || prebuilt->innodb_api) { + || prebuilt->used_in_HANDLER) { /* Inside an update always store the cursor position */ if (!spatial_search) { btr_pcur_store_position(pcur, &mtr); } - - if (prebuilt->innodb_api) { - prebuilt->innodb_api_rec = result_rec; - } } goto normal_return; @@ -5823,13 +5812,15 @@ func_exit: } } -#ifdef UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# ifdef UNIV_DEBUG { btrsea_sync_check check(trx->has_search_latch); ut_ad(!sync_check_iterate(check)); } -#endif /* UNIV_DEBUG */ +# endif /* UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ DEBUG_SYNC_C("innodb_row_search_for_mysql_exit"); diff --git a/storage/innobase/row/row0trunc.cc b/storage/innobase/row/row0trunc.cc index 1c118dabc61..2402b4807ba 100644 --- a/storage/innobase/row/row0trunc.cc +++ b/storage/innobase/row/row0trunc.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2013, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -395,8 +396,6 @@ public: IORequest request(IORequest::WRITE); - request.disable_compression(); - io_err = os_file_write( request, m_log_file_name, handle, log_buf, 0, sz); @@ -488,8 +487,6 @@ public: IORequest request(IORequest::WRITE); - request.disable_compression(); - err = os_file_write( request, m_log_file_name, handle, buffer, 0, sizeof(buffer)); @@ -671,8 +668,6 @@ TruncateLogParser::parse( IORequest request(IORequest::READ); - request.disable_compression(); - /* Align the memory for file i/o if we might have O_DIRECT set*/ byte* log_buf = static_cast(ut_align(buf, UNIV_PAGE_SIZE)); @@ -909,7 +904,7 @@ TruncateLogger::operator()(mtr_t* mtr, btr_pcur_t* pcur) /* For compressed tables we need to store extra meta-data required during btr_create(). */ - if (fsp_flags_is_compressed(m_flags)) { + if (FSP_FLAGS_GET_ZIP_SSIZE(m_flags)) { const dict_index_t* dict_index = find(index.m_id); @@ -1229,12 +1224,6 @@ row_truncate_complete( { bool is_file_per_table = dict_table_is_file_per_table(table); - if (table->memcached_sync_count == DICT_TABLE_IN_DDL) { - /* We need to set the memcached sync back to 0, unblock - memcached operations. */ - table->memcached_sync_count = 0; - } - row_mysql_unlock_data_dictionary(trx); DEBUG_SYNC_C("ib_trunc_table_trunc_completing"); @@ -1315,7 +1304,6 @@ row_truncate_fts( fts_table.name = table->name; fts_table.flags2 = table->flags2; fts_table.flags = table->flags; - fts_table.tablespace = table->tablespace; fts_table.space = table->space; /* table->data_dir_path is used for FTS AUX table @@ -1326,20 +1314,6 @@ row_truncate_fts( ut_ad(table->data_dir_path != NULL); } - /* table->tablespace() may not be always populated or - if table->tablespace() uses "innodb_general" name, - fetch the real name. */ - if (DICT_TF_HAS_SHARED_SPACE(table->flags) - && (table->tablespace() == NULL - || dict_table_has_temp_general_tablespace_name( - table->tablespace()))) { - dict_get_and_save_space_name(table, true); - ut_ad(table->tablespace() != NULL); - ut_ad(!dict_table_has_temp_general_tablespace_name( - table->tablespace())); - } - - fts_table.tablespace = table->tablespace(); fts_table.data_dir_path = table->data_dir_path; dberr_t err; @@ -1584,7 +1558,7 @@ row_truncate_update_system_tables( fts_update_next_doc_id(trx, table, NULL, 0); fts_cache_clear(table->fts->cache); fts_cache_init(table->fts->cache); - table->fts->fts_status &= ~TABLE_DICT_LOCKED; + table->fts->fts_status &= uint(~TABLE_DICT_LOCKED); } } @@ -1610,8 +1584,6 @@ row_truncate_prepare(dict_table_t* table, ulint* flags) dict_get_and_save_data_dir_path(table, true); - dict_get_and_save_space_name(table, true); - if (*flags != ULINT_UNDEFINED) { dberr_t err = fil_prepare_for_truncate(table->space); @@ -1850,23 +1822,6 @@ row_truncate_table_for_mysql( table, trx, fsp_flags, logger, err)); } - /* Check if memcached DML is running on this table. if is, we don't - allow truncate this table. */ - if (table->memcached_sync_count != 0) { - ib::error() << "Cannot truncate table " - << table->name - << " by DROP+CREATE because there are memcached" - " operations running on it."; - err = DB_ERROR; - trx_rollback_to_savepoint(trx, NULL); - return(row_truncate_complete( - table, trx, fsp_flags, logger, err)); - } else { - /* We need to set this counter to -1 for blocking - memcached operations. */ - table->memcached_sync_count = DICT_TABLE_IN_DDL; - } - /* Remove all locks except the table-level X lock. */ lock_remove_all_on_table(table, FALSE); trx->table_id = table->id; @@ -2015,9 +1970,9 @@ row_truncate_table_for_mysql( return(row_truncate_complete( table, trx, fsp_flags, logger, err)); } - } else { /* For temporary tables we don't have entries in SYSTEM TABLES*/ + ut_ad(fsp_is_system_temporary(table->space)); for (dict_index_t* index = UT_LIST_GET_FIRST(table->indexes); index != NULL; index = UT_LIST_GET_NEXT(indexes, index)) { @@ -2040,10 +1995,7 @@ row_truncate_table_for_mysql( } } - if (is_file_per_table - && !dict_table_is_temporary(table) - && fsp_flags != ULINT_UNDEFINED) { - + if (is_file_per_table && fsp_flags != ULINT_UNDEFINED) { fil_reinit_space_header( table->space, table->indexes.count + FIL_IBD_FILE_INITIAL_SIZE + 1); @@ -2218,76 +2170,52 @@ truncate_t::fixup_tables_in_non_system_tablespace() done and erased from this list. */ ut_a((*it)->m_space_id != TRX_SYS_SPACE); - /* Step-1: Drop tablespace (only for single-tablespace), - drop indexes and re-create indexes. */ + /* Drop tablespace, drop indexes and re-create indexes. */ - if (fsp_is_file_per_table((*it)->m_space_id, - (*it)->m_tablespace_flags)) { - /* The table is file_per_table */ + ib::info() << "Completing truncate for table with " + "id (" << (*it)->m_old_table_id << ") " + "residing in file-per-table tablespace with " + "id (" << (*it)->m_space_id << ")"; - ib::info() << "Completing truncate for table with " - "id (" << (*it)->m_old_table_id << ") " - "residing in file-per-table tablespace with " - "id (" << (*it)->m_space_id << ")"; + if (!fil_space_get((*it)->m_space_id)) { - if (!fil_space_get((*it)->m_space_id)) { + /* Create the database directory for name, + if it does not exist yet */ + fil_create_directory_for_tablename( + (*it)->m_tablename); - /* Create the database directory for name, - if it does not exist yet */ - fil_create_directory_for_tablename( - (*it)->m_tablename); + err = fil_ibd_create( + (*it)->m_space_id, + (*it)->m_tablename, + (*it)->m_dir_path, + (*it)->m_tablespace_flags, + FIL_IBD_FILE_INITIAL_SIZE, + (*it)->m_encryption, + (*it)->m_key_id); - err = fil_ibd_create( - (*it)->m_space_id, - (*it)->m_tablename, - (*it)->m_dir_path, - (*it)->m_tablespace_flags, - FIL_IBD_FILE_INITIAL_SIZE, - (*it)->m_encryption, - (*it)->m_key_id); - - if (err != DB_SUCCESS) { - /* If checkpoint is not yet done - and table is dropped and then we might - still have REDO entries for this table - which are INVALID. Ignore them. */ - ib::warn() << "Failed to create" - " tablespace for " - << (*it)->m_space_id - << " space-id"; - err = DB_ERROR; - break; - } + if (err != DB_SUCCESS) { + /* If checkpoint is not yet done + and table is dropped and then we might + still have REDO entries for this table + which are INVALID. Ignore them. */ + ib::warn() << "Failed to create" + " tablespace for " + << (*it)->m_space_id + << " space-id"; + err = DB_ERROR; + break; } - - ut_ad(fil_space_get((*it)->m_space_id)); - - err = fil_recreate_tablespace( - (*it)->m_space_id, - (*it)->m_format_flags, - (*it)->m_tablespace_flags, - (*it)->m_tablename, - **it, log_get_lsn()); - - } else { - /* Table is in a shared tablespace */ - - ib::info() << "Completing truncate for table with " - "id (" << (*it)->m_old_table_id << ") " - "residing in shared tablespace with " - "id (" << (*it)->m_space_id << ")"; - - /* Temp-tables in temp-tablespace are never restored.*/ - ut_ad((*it)->m_space_id != SRV_TMP_SPACE_ID); - - err = fil_recreate_table( - (*it)->m_space_id, - (*it)->m_format_flags, - (*it)->m_tablespace_flags, - (*it)->m_tablename, - **it); } + ut_ad(fil_space_get((*it)->m_space_id)); + + err = fil_recreate_tablespace( + (*it)->m_space_id, + (*it)->m_format_flags, + (*it)->m_tablespace_flags, + (*it)->m_tablename, + **it, log_get_lsn()); + /* Step-2: Update the SYS_XXXX tables to reflect new table-id and root_page_no. */ table_id_t new_id; @@ -2630,7 +2558,7 @@ truncate_t::parse( ut_ad(!m_indexes.empty()); - if (fsp_flags_is_compressed(m_tablespace_flags)) { + if (FSP_FLAGS_GET_ZIP_SSIZE(m_tablespace_flags)) { /* Parse the number of index fields from TRUNCATE log record */ for (ulint i = 0; i < m_indexes.size(); ++i) { @@ -2929,12 +2857,12 @@ truncate_t::create_indexes( ++it) { btr_create_t btr_redo_create_info( - fsp_flags_is_compressed(flags) + FSP_FLAGS_GET_ZIP_SSIZE(flags) ? &it->m_fields[0] : NULL); btr_redo_create_info.format_flags = format_flags; - if (fsp_flags_is_compressed(flags)) { + if (FSP_FLAGS_GET_ZIP_SSIZE(flags)) { btr_redo_create_info.n_fields = it->m_n_fields; /* Skip the NUL appended field */ @@ -3069,7 +2997,7 @@ truncate_t::write( } /* If tablespace compressed then field info of each index. */ - if (fsp_flags_is_compressed(flags)) { + if (FSP_FLAGS_GET_ZIP_SSIZE(flags)) { for (ulint i = 0; i < m_indexes.size(); ++i) { diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index 3f7c795230a..72271598a6c 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -2309,9 +2309,8 @@ row_upd_sec_index_entry( spatial index. */ mode = (referenced || dict_table_is_temporary(index->table) || dict_index_is_spatial(index)) - ? BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED - : BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED - | BTR_DELETE_MARK; + ? BTR_MODIFY_LEAF_ALREADY_S_LATCHED + : BTR_DELETE_MARK_LEAF_ALREADY_S_LATCHED; } else { /* For secondary indexes, index->online_status==ONLINE_INDEX_COMPLETE if @@ -2325,7 +2324,7 @@ row_upd_sec_index_entry( mode = (referenced || dict_table_is_temporary(index->table) || dict_index_is_spatial(index)) ? BTR_MODIFY_LEAF - : BTR_MODIFY_LEAF | BTR_DELETE_MARK; + : BTR_DELETE_MARK_LEAF; } if (dict_index_is_spatial(index)) { @@ -3473,26 +3472,14 @@ void upd_node_t::dbug_trace() for (upd_cascade_t::const_iterator i = cascade_upd_nodes->begin(); i != cascade_upd_nodes->end(); ++i) { - - const upd_node_t* update_node = *i; - ib::info() << "cascade_upd_nodes: Cascade to table: " << - update_node->table->name; - /* JAN: TODO: MySQL 5.7 DBUG_LOG("upd_node_t", "cascade_upd_nodes: Cascade to table: " - << update_node->table->name); - */ + << (*i)->table->name); } for (upd_cascade_t::const_iterator j = new_upd_nodes->begin(); j != new_upd_nodes->end(); ++j) { - - const upd_node_t* update_node = *j; - ib::info() << "cascade_upd_nodes: Cascade to table: " << - update_node->table->name; - /* JAN: TODO: MySQL 5.7 DBUG_LOG("upd_node_t", "new_upd_nodes: Cascade to table: " - << update_node->table->name); - */ + << (*j)->table->name); } DBUG_VOID_RETURN; diff --git a/storage/innobase/row/row0vers.cc b/storage/innobase/row/row0vers.cc index f21b1ebbb85..69e7a889de9 100644 --- a/storage/innobase/row/row0vers.cc +++ b/storage/innobase/row/row0vers.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation This 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 @@ -876,8 +877,8 @@ row_vers_old_has_index_entry( mem_heap_t* v_heap = NULL; const dtuple_t* cur_vrow = NULL; - ut_ad(mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_S_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, rec, MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_S_FIX)); ut_ad(!rw_lock_own(&(purge_sys->latch), RW_LOCK_S)); clust_index = dict_table_get_first_index(index->table); @@ -1134,8 +1135,8 @@ row_vers_build_for_consistent_read( dberr_t err; ut_ad(dict_index_is_clust(index)); - ut_ad(mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_S_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, rec, MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_S_FIX)); ut_ad(!rw_lock_own(&(purge_sys->latch), RW_LOCK_S)); ut_ad(rec_offs_validate(rec, index, *offsets)); @@ -1246,8 +1247,8 @@ row_vers_build_for_semi_consistent_read( trx_id_t rec_trx_id = 0; ut_ad(dict_index_is_clust(index)); - ut_ad(mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains_page(mtr, rec, MTR_MEMO_PAGE_S_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, rec, MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_S_FIX)); ut_ad(!rw_lock_own(&(purge_sys->latch), RW_LOCK_S)); ut_ad(rec_offs_validate(rec, index, *offsets)); diff --git a/storage/innobase/srv/srv0conc.cc b/storage/innobase/srv/srv0conc.cc index 018866451f6..bf8a326a633 100644 --- a/storage/innobase/srv/srv0conc.cc +++ b/storage/innobase/srv/srv0conc.cc @@ -200,9 +200,7 @@ srv_conc_enter_innodb_with_atomics( /* Release possible search system latch this thread has */ - if (trx->has_search_latch) { - trx_search_latch_release_if_reserved(trx); - } + trx_assert_no_search_latch(trx); thd_wait_begin(trx->mysql_thd, THD_WAIT_USER_LOCK); @@ -259,13 +257,15 @@ srv_conc_enter_innodb( { trx_t* trx = prebuilt->trx; -#ifdef UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# ifdef UNIV_DEBUG { btrsea_sync_check check(trx->has_search_latch); ut_ad(!sync_check_iterate(check)); } -#endif /* UNIV_DEBUG */ +# endif /* UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ srv_conc_enter_innodb_with_atomics(trx); } @@ -279,13 +279,15 @@ srv_conc_force_enter_innodb( trx_t* trx) /*!< in: transaction object associated with the thread */ { -#ifdef UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# ifdef UNIV_DEBUG { btrsea_sync_check check(trx->has_search_latch); ut_ad(!sync_check_iterate(check)); } -#endif /* UNIV_DEBUG */ +# endif /* UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ if (!srv_thread_concurrency) { @@ -318,13 +320,15 @@ srv_conc_force_exit_innodb( srv_conc_exit_innodb_with_atomics(trx); -#ifdef UNIV_DEBUG +#ifdef BTR_CUR_HASH_ADAPT +# ifdef UNIV_DEBUG { btrsea_sync_check check(trx->has_search_latch); ut_ad(!sync_check_iterate(check)); } -#endif /* UNIV_DEBUG */ +# endif /* UNIV_DEBUG */ +#endif /* BTR_CUR_HASH_ADAPT */ } /*********************************************************************//** diff --git a/storage/innobase/srv/srv0mon.cc b/storage/innobase/srv/srv0mon.cc index 00b7bd14c98..f42e640f4f3 100644 --- a/storage/innobase/srv/srv0mon.cc +++ b/storage/innobase/srv/srv0mon.cc @@ -989,41 +989,6 @@ static monitor_info_t innodb_counter_info[] = MONITOR_NONE, MONITOR_DEFAULT_START, MONITOR_OVLD_PAGE_COMPRESS_SAVED}, - {"compress_trim_sect512", "compression", - "Number of sect-512 TRIMed by page compression", - MONITOR_NONE, - MONITOR_DEFAULT_START, MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT512}, - - {"compress_trim_sect1024", "compression", - "Number of sect-1024 TRIMed by page compression", - MONITOR_NONE, - MONITOR_DEFAULT_START, MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT1024}, - - {"compress_trim_sect2048", "compression", - "Number of sect-2048 TRIMed by page compression", - MONITOR_NONE, - MONITOR_DEFAULT_START, MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT2048}, - - {"compress_trim_sect4096", "compression", - "Number of sect-4K TRIMed by page compression", - MONITOR_NONE, - MONITOR_DEFAULT_START, MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT4096}, - - {"compress_trim_sect8192", "compression", - "Number of sect-8K TRIMed by page compression", - MONITOR_NONE, - MONITOR_DEFAULT_START, MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT8192}, - - {"compress_trim_sect16384", "compression", - "Number of sect-16K TRIMed by page compression", - MONITOR_NONE, - MONITOR_DEFAULT_START, MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT16384}, - - {"compress_trim_sect32768", "compression", - "Number of sect-32K TRIMed by page compression", - MONITOR_NONE, - MONITOR_DEFAULT_START, MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT32768}, - {"compress_pages_page_compressed", "compression", "Number of pages compressed by page compression", MONITOR_NONE, @@ -1034,11 +999,6 @@ static monitor_info_t innodb_counter_info[] = MONITOR_NONE, MONITOR_DEFAULT_START, MONITOR_OVLD_PAGE_COMPRESSED_TRIM_OP}, - {"compress_page_compressed_trim_op_saved", "compression", - "Number of TRIM operation saved by page compression", - MONITOR_NONE, - MONITOR_DEFAULT_START, MONITOR_OVLD_PAGE_COMPRESSED_TRIM_OP_SAVED}, - {"compress_pages_page_decompressed", "compression", "Number of pages decompressed by page compression", MONITOR_NONE, @@ -1092,8 +1052,9 @@ static monitor_info_t innodb_counter_info[] = MONITOR_NONE, MONITOR_DEFAULT_START, MONITOR_INDEX_DISCARD}, +#ifdef BTR_CUR_HASH_ADAPT /* ========== Counters for Adaptive Hash Index ========== */ - {"module_adaptive_hash", "adaptive_hash_index", "Adpative Hash Index", + {"module_adaptive_hash", "adaptive_hash_index", "Adaptive Hash Index", MONITOR_MODULE, MONITOR_DEFAULT_START, MONITOR_MODULE_ADAPTIVE_HASH}, @@ -1102,6 +1063,7 @@ static monitor_info_t innodb_counter_info[] = static_cast( MONITOR_EXISTING | MONITOR_DEFAULT_ON), MONITOR_DEFAULT_START, MONITOR_OVLD_ADAPTIVE_HASH_SEARCH}, +#endif /* BTR_CUR_HASH_ADAPT */ {"adaptive_hash_searches_btree", "adaptive_hash_index", "Number of searches using B-tree on an index search", @@ -1109,6 +1071,7 @@ static monitor_info_t innodb_counter_info[] = MONITOR_EXISTING | MONITOR_DEFAULT_ON), MONITOR_DEFAULT_START, MONITOR_OVLD_ADAPTIVE_HASH_SEARCH_BTREE}, +#ifdef BTR_CUR_HASH_ADAPT {"adaptive_hash_pages_added", "adaptive_hash_index", "Number of index pages on which the Adaptive Hash Index is built", MONITOR_NONE, @@ -1140,6 +1103,7 @@ static monitor_info_t innodb_counter_info[] = "Number of Adaptive Hash Index rows updated", MONITOR_NONE, MONITOR_DEFAULT_START, MONITOR_ADAPTIVE_HASH_ROW_UPDATED}, +#endif /* BTR_CUR_HASH_ADAPT */ /* ========== Counters for tablespace ========== */ {"module_file", "file_system", "Tablespace and File System Manager", @@ -2062,9 +2026,11 @@ srv_mon_process_existing_counter( value = log_sys->max_modified_age_sync; break; +#ifdef BTR_CUR_HASH_ADAPT case MONITOR_OVLD_ADAPTIVE_HASH_SEARCH: value = btr_cur_n_sea; break; +#endif /* BTR_CUR_HASH_ADAPT */ case MONITOR_OVLD_ADAPTIVE_HASH_SEARCH_BTREE: value = btr_cur_n_non_sea; @@ -2073,36 +2039,12 @@ srv_mon_process_existing_counter( case MONITOR_OVLD_PAGE_COMPRESS_SAVED: value = srv_stats.page_compression_saved; break; - case MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT512: - value = srv_stats.page_compression_trim_sect512; - break; - case MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT1024: - value = srv_stats.page_compression_trim_sect1024; - break; - case MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT2048: - value = srv_stats.page_compression_trim_sect2048; - break; - case MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT4096: - value = srv_stats.page_compression_trim_sect4096; - break; - case MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT8192: - value = srv_stats.page_compression_trim_sect8192; - break; - case MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT16384: - value = srv_stats.page_compression_trim_sect16384; - break; - case MONITOR_OVLD_PAGE_COMPRESS_TRIM_SECT32768: - value = srv_stats.page_compression_trim_sect32768; - break; case MONITOR_OVLD_PAGES_PAGE_COMPRESSED: value = srv_stats.pages_page_compressed; break; case MONITOR_OVLD_PAGE_COMPRESSED_TRIM_OP: value = srv_stats.page_compressed_trim_op; break; - case MONITOR_OVLD_PAGE_COMPRESSED_TRIM_OP_SAVED: - value = srv_stats.page_compressed_trim_op_saved; - break; case MONITOR_OVLD_PAGES_PAGE_DECOMPRESSED: value = srv_stats.pages_page_decompressed; break; diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 0eda03f7fd7..06495b01820 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -3,7 +3,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -53,7 +53,6 @@ Created 10/8/1995 Heikki Tuuri #include "buf0lru.h" #include "dict0boot.h" #include "dict0load.h" -#include "dict0stats_bg.h" #include "fsp0sysspace.h" #include "ibuf0ibuf.h" #include "lock0lock.h" @@ -90,17 +89,13 @@ UNIV_INTERN ulong srv_fatal_semaphore_wait_threshold = DEFAULT_SRV_FATAL_SEMAPH in microseconds, in order to reduce the lagging of the purge thread. */ ulint srv_dml_needed_delay = 0; -ibool srv_monitor_active = FALSE; -ibool srv_error_monitor_active = FALSE; +bool srv_monitor_active; +bool srv_error_monitor_active; +bool srv_buf_dump_thread_active; +bool srv_dict_stats_thread_active; +bool srv_buf_resize_thread_active; -ibool srv_buf_dump_thread_active = FALSE; - -bool srv_buf_resize_thread_active = false; - -UNIV_INTERN ibool srv_log_scrub_active = FALSE; -UNIV_INTERN my_bool srv_scrub_log = FALSE; - -ibool srv_dict_stats_thread_active = FALSE; +my_bool srv_scrub_log; const char* srv_main_thread_op_info = ""; @@ -189,7 +184,7 @@ my_bool srv_use_native_aio = TRUE; my_bool srv_numa_interleave = FALSE; /* If this flag is TRUE, then we will use fallocate(PUCH_HOLE) to the pages */ -UNIV_INTERN my_bool srv_use_trim = FALSE; +UNIV_INTERN my_bool srv_use_trim; /* If this flag is TRUE, then we disable doublewrite buffer */ UNIV_INTERN my_bool srv_use_atomic_writes = FALSE; /* If this flag IS TRUE, then we use this algorithm for page compressing the pages */ @@ -200,8 +195,6 @@ UNIV_INTERN long srv_mtflush_threads = MTFLUSH_DEFAULT_WORKER; UNIV_INTERN my_bool srv_use_mtflush = FALSE; #ifdef UNIV_DEBUG -/** Force all user tables to use page compression. */ -ulong srv_debug_compress; /** Used by SET GLOBAL innodb_master_thread_disabled_debug = X. */ my_bool srv_master_thread_disabled_debug; /** Event used to inform that master thread is disabled. */ @@ -212,9 +205,9 @@ extern bool trx_commit_disallowed; #endif /* UNIV_DEBUG */ /*------------------------- LOG FILES ------------------------ */ -char* srv_log_group_home_dir = NULL; +char* srv_log_group_home_dir; -ulong srv_n_log_files = SRV_N_LOG_FILES_MAX; +ulong srv_n_log_files; /** At startup, this is the current redo log file size. During startup, if this is different from srv_log_file_size_requested (innodb_log_file_size), the redo log will be rebuilt and this size @@ -315,11 +308,10 @@ a heavier load on the I/O sub system. */ ulong srv_insert_buffer_batch_size = 20; char* srv_file_flush_method_str = NULL; -#ifndef _WIN32 -enum srv_unix_flush_t srv_unix_file_flush_method = SRV_UNIX_FSYNC; -#else -enum srv_win_flush_t srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; -#endif /* _WIN32 */ + + +enum srv_flush_t srv_file_flush_method = IF_WIN(SRV_ALL_O_DIRECT_FSYNC,SRV_FSYNC); + ulint srv_max_n_open_files = 300; @@ -366,11 +358,6 @@ starting from SRV_FORCE_IGNORE_CORRUPT, so that data can be recovered by SELECT or mysqldump. When this is nonzero, we do not allow any user modifications to the data. */ ulong srv_force_recovery; -#ifndef DBUG_OFF -/** Inject a crash at different steps of the recovery process. -This is for testing and debugging only. */ -ulong srv_force_recovery_crash; -#endif /* !DBUG_OFF */ /** Print all user-level transactions deadlocks to mysqld stderr */ @@ -383,7 +370,7 @@ my_bool srv_cmp_per_index_enabled = FALSE; merge to completion before shutdown. If it is set to 2, do not even flush the buffer pool to data files at the shutdown: we effectively 'crash' InnoDB (but lose no committed transactions). */ -ulint srv_fast_shutdown = 0; +uint srv_fast_shutdown; /* Generate a innodb_status. file */ ibool srv_innodb_status = FALSE; @@ -423,7 +410,7 @@ ulong srv_replication_delay = 0; /*-------------------------------------------*/ UNIV_INTERN ulong srv_n_spin_wait_rounds = 15; -ulong srv_spin_wait_delay = 6; +uint srv_spin_wait_delay; ibool srv_priority_boost = TRUE; static ulint srv_n_rows_inserted_old = 0; @@ -519,9 +506,6 @@ thread ensures that we flush the log files at least once per second. */ static time_t srv_last_log_flush_time; -/** Enable semaphore request instrumentation */ -UNIV_INTERN my_bool srv_instrument_semaphores = FALSE; - /* Interval in seconds at which various tasks are performed by the master thread when server is active. In order to balance the workload, we should try to keep intervals such that they are not multiple of @@ -643,7 +627,11 @@ struct srv_sys_t{ ulint n_sys_threads; /*!< size of the sys_threads array */ - srv_slot_t* sys_threads; /*!< server thread table */ + srv_slot_t* sys_threads; /*!< server thread table; + os_event_set() and + os_event_reset() on + sys_threads[]->event are + covered by srv_sys_t::mutex */ ulint n_threads_active[SRV_MASTER + 1]; /*!< number of threads active @@ -656,13 +644,16 @@ struct srv_sys_t{ static srv_sys_t* srv_sys = NULL; -/** Event to signal the monitor thread. */ +/** Event to signal srv_monitor_thread. Not protected by a mutex. +Set after setting srv_print_innodb_monitor. */ os_event_t srv_monitor_event; -/** Event to signal the error thread */ +/** Event to signal the shutdown of srv_error_monitor_thread. +Not protected by a mutex. */ os_event_t srv_error_event; -/** Event to signal the buffer pool dump/load thread */ +/** Event for waking up buf_dump_thread. Not protected by a mutex. +Set on shutdown or by buf_dump_start() or buf_load_start(). */ os_event_t srv_buf_dump_event; /** Event to signal the buffer pool resize thread */ @@ -866,7 +857,6 @@ srv_suspend_thread_low( /*===================*/ srv_slot_t* slot) /*!< in/out: thread slot */ { - ut_ad(!srv_read_only_mode); ut_ad(srv_sys_mutex_own()); @@ -924,33 +914,73 @@ srv_suspend_thread( return(sig_count); } -/*********************************************************************//** -Releases threads of the type given from suspension in the thread table. -NOTE! The server mutex has to be reserved by the caller! -@return number of threads released: this may be less than n if not - enough threads were suspended at the moment. */ -ulint -srv_release_threads( -/*================*/ - srv_thread_type type, /*!< in: thread type */ - ulint n) /*!< in: number of threads to release */ +/** Resume the calling thread. +@param[in,out] slot thread slot +@param[in] sig_count signal count (if wait) +@param[in] wait whether to wait for the event +@param[in] timeout_usec timeout in microseconds (0=infinite) +@return whether the wait timed out */ +static +bool +srv_resume_thread(srv_slot_t* slot, int64_t sig_count = 0, bool wait = true, + ulint timeout_usec = 0) { - ulint i; - ulint count = 0; + bool timeout; + + ut_ad(!srv_read_only_mode); + ut_ad(slot->in_use); + ut_ad(slot->suspended); + + if (!wait) { + timeout = false; + } else if (timeout_usec) { + timeout = OS_SYNC_TIME_EXCEEDED == os_event_wait_time_low( + slot->event, timeout_usec, sig_count); + } else { + timeout = false; + os_event_wait_low(slot->event, sig_count); + } + + srv_sys_mutex_enter(); + ut_ad(slot->in_use); + ut_ad(slot->suspended); + + slot->suspended = FALSE; + ++srv_sys->n_threads_active[slot->type]; + srv_sys_mutex_exit(); + return(timeout); +} + +/** Ensure that a given number of threads of the type given are running +(or are already terminated). +@param[in] type thread type +@param[in] n number of threads that have to run */ +void +srv_release_threads(enum srv_thread_type type, ulint n) +{ + ulint running; ut_ad(srv_thread_type_validate(type)); ut_ad(n > 0); - srv_sys_mutex_enter(); + do { + srv_sys_mutex_enter(); - for (i = 0; i < srv_sys->n_sys_threads; i++) { - srv_slot_t* slot; + running = 0; - slot = &srv_sys->sys_threads[i]; + for (ulint i = 0; i < srv_sys->n_sys_threads; i++) { + srv_slot_t* slot; - if (slot->in_use - && srv_slot_get_type(slot) == type - && slot->suspended) { + slot = &srv_sys->sys_threads[i]; + + if (!slot->in_use || srv_slot_get_type(slot) != type) { + continue; + } else if (!slot->suspended) { + if (++running >= n) { + break; + } + continue; + } switch (type) { case SRV_NONE: @@ -980,21 +1010,11 @@ srv_release_threads( break; } - slot->suspended = FALSE; - - ++srv_sys->n_threads_active[type]; - os_event_set(slot->event); - - if (++count == n) { - break; - } } - } - srv_sys_mutex_exit(); - - return(count); + srv_sys_mutex_exit(); + } while (running && running < n); } /*********************************************************************//** @@ -1007,11 +1027,8 @@ srv_free_slot( { srv_sys_mutex_enter(); - if (!slot->suspended) { - /* Mark the thread as inactive. */ - srv_suspend_thread_low(slot); - } - + /* Mark the thread as inactive. */ + srv_suspend_thread_low(slot); /* Free the slot for reuse. */ ut_ad(slot->in_use); slot->in_use = FALSE; @@ -1019,11 +1036,10 @@ srv_free_slot( srv_sys_mutex_exit(); } -/*********************************************************************//** -Initializes the server. */ +/** Initialize the server. */ +static void -srv_init(void) -/*==========*/ +srv_init() { ulint n_sys_threads = 0; ulint srv_sys_sz = sizeof(*srv_sys); @@ -1109,6 +1125,10 @@ void srv_free(void) /*==========*/ { + if (!srv_sys) { + return; + } + mutex_free(&srv_innodb_monitor_mutex); mutex_free(&page_zip_stat_per_index_mutex); @@ -1135,6 +1155,8 @@ srv_free(void) srv_master_thread_disabled_event = NULL; #endif /* UNIV_DEBUG */ + dict_ind_free(); + trx_i_s_cache_free(trx_i_s_cache); ut_free(srv_sys); @@ -1142,22 +1164,6 @@ srv_free(void) srv_sys = 0; } -/*********************************************************************//** -Initializes the synchronization primitives, memory system, and the thread -local storage. */ -void -srv_general_init(void) -/*==================*/ -{ - sync_check_init(); - /* Reset the system variables in the recovery module. */ - recv_sys_var_init(); - os_thread_init(); - trx_pool_init(); - que_init(); - row_mysql_init(); -} - /*********************************************************************//** Normalizes init parameter values to use units we use inside InnoDB. */ static @@ -1187,10 +1193,12 @@ srv_boot(void) srv_normalize_init_values(); - /* Initialize synchronization primitives, memory management, and thread - local storage */ - - srv_general_init(); + sync_check_init(); + os_thread_init(); + /* Reset the system variables in the recovery module. */ + recv_sys_var_init(); + trx_pool_init(); + row_mysql_init(); /* Initialize this module */ @@ -1210,7 +1218,9 @@ srv_refresh_innodb_monitor_stats(void) os_aio_refresh_stats(); +#ifdef BTR_CUR_HASH_ADAPT btr_cur_n_sea_old = btr_cur_n_sea; +#endif /* BTR_CUR_HASH_ADAPT */ btr_cur_n_non_sea_old = btr_cur_n_non_sea; log_refresh_stats(); @@ -1341,6 +1351,7 @@ srv_printf_innodb_monitor( "-------------------------------------\n", file); ibuf_print(file); +#ifdef BTR_CUR_HASH_ADAPT for (ulint i = 0; i < btr_ahi_parts; ++i) { rw_lock_s_lock(btr_search_latches[i]); ha_print_info(file, btr_search_sys->hash_tables[i]); @@ -1354,6 +1365,12 @@ srv_printf_innodb_monitor( (btr_cur_n_non_sea - btr_cur_n_non_sea_old) / time_elapsed); btr_cur_n_sea_old = btr_cur_n_sea; +#else /* BTR_CUR_HASH_ADAPT */ + fprintf(file, + "%.2f non-hash searches/s\n", + (btr_cur_n_non_sea - btr_cur_n_non_sea_old) + / time_elapsed); +#endif /* BTR_CUR_HASH_ADAPT */ btr_cur_n_non_sea_old = btr_cur_n_non_sea; fputs("---\n" @@ -1624,13 +1641,10 @@ srv_export_innodb_status(void) export_vars.innodb_available_undo_logs = srv_available_undo_logs; export_vars.innodb_page_compression_saved = srv_stats.page_compression_saved; - export_vars.innodb_page_compression_trim_sect512 = srv_stats.page_compression_trim_sect512; - export_vars.innodb_page_compression_trim_sect4096 = srv_stats.page_compression_trim_sect4096; export_vars.innodb_index_pages_written = srv_stats.index_pages_written; export_vars.innodb_non_index_pages_written = srv_stats.non_index_pages_written; export_vars.innodb_pages_page_compressed = srv_stats.pages_page_compressed; export_vars.innodb_page_compressed_trim_op = srv_stats.page_compressed_trim_op; - export_vars.innodb_page_compressed_trim_op_saved = srv_stats.page_compressed_trim_op_saved; export_vars.innodb_pages_page_decompressed = srv_stats.pages_page_decompressed; export_vars.innodb_pages_page_compression_error = srv_stats.pages_page_compression_error; export_vars.innodb_pages_decrypted = srv_stats.pages_decrypted; @@ -1647,12 +1661,8 @@ srv_export_innodb_status(void) #ifdef UNIV_DEBUG rw_lock_s_lock(&purge_sys->latch); - trx_id_t up_limit_id; + trx_id_t up_limit_id = purge_sys->view.up_limit_id();; trx_id_t done_trx_no = purge_sys->done.trx_no; - - up_limit_id = purge_sys->view_active - ? purge_sys->view.up_limit_id() : 0; - rw_lock_s_unlock(&purge_sys->latch); mutex_enter(&trx_sys->mutex); @@ -1705,6 +1715,7 @@ srv_export_innodb_status(void) scrub_stat.page_split_failures_missing_index; export_vars.innodb_scrub_page_split_failures_unknown = scrub_stat.page_split_failures_unknown; + export_vars.innodb_scrub_log = srv_stats.n_log_scrubs; mutex_exit(&srv_innodb_monitor_mutex); } @@ -1714,11 +1725,7 @@ A thread which prints the info output by various InnoDB monitors. @return a dummy parameter */ extern "C" os_thread_ret_t -DECLARE_THREAD(srv_monitor_thread)( -/*===============================*/ - void* arg MY_ATTRIBUTE((unused))) - /*!< in: a dummy parameter required by - os_thread_create */ +DECLARE_THREAD(srv_monitor_thread)(void*) { int64_t sig_count; double time_elapsed; @@ -1739,9 +1746,7 @@ DECLARE_THREAD(srv_monitor_thread)( #ifdef UNIV_PFS_THREAD pfs_register_thread(srv_monitor_thread_key); #endif /* UNIV_PFS_THREAD */ - srv_monitor_active = TRUE; - UT_NOT_USED(arg); srv_last_monitor_time = ut_time(); last_table_monitor_time = ut_time(); last_tablespace_monitor_time = ut_time(); @@ -1874,7 +1879,7 @@ loop: goto loop; exit_func: - srv_monitor_active = FALSE; + srv_monitor_active = false; /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit and not use return() to exit. */ @@ -1890,11 +1895,7 @@ too long. These can be used to track bugs which cause hangs. @return a dummy parameter */ extern "C" os_thread_ret_t -DECLARE_THREAD(srv_error_monitor_thread)( -/*=====================================*/ - void* arg MY_ATTRIBUTE((unused))) - /*!< in: a dummy parameter required by - os_thread_create */ +DECLARE_THREAD(srv_error_monitor_thread)(void*) { /* number of successive fatal timeouts observed */ ulint fatal_cnt = 0; @@ -1920,7 +1921,6 @@ DECLARE_THREAD(srv_error_monitor_thread)( #ifdef UNIV_PFS_THREAD pfs_register_thread(srv_error_monitor_thread_key); #endif /* UNIV_PFS_THREAD */ - srv_error_monitor_active = TRUE; loop: /* Try to track a strange bug reported by Harald Fuchs and others, @@ -1952,9 +1952,7 @@ loop: if (sync_array_print_long_waits(&waiter, &sema) && sema == old_sema && os_thread_eq(waiter, old_waiter)) { #if defined(WITH_WSREP) && defined(WITH_INNODB_DISALLOW_WRITES) - if (true) { - // JAN: TODO: MySQL 5.7 - //if (srv_allow_writes_event->is_set) { + if (os_event_is_set(srv_allow_writes_event)) { #endif /* WITH_WSREP */ fatal_cnt++; #if defined(WITH_WSREP) && defined(WITH_INNODB_DISALLOW_WRITES) @@ -1993,7 +1991,7 @@ loop: goto loop; } - srv_error_monitor_active = FALSE; + srv_error_monitor_active = false; /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit and not use return() to exit. */ @@ -2038,64 +2036,24 @@ srv_get_active_thread_type(void) srv_sys_mutex_exit(); - /* Check only on shutdown. */ - if (ret == SRV_NONE - && srv_shutdown_state != SRV_SHUTDOWN_NONE - && trx_purge_state() != PURGE_STATE_DISABLED - && trx_purge_state() != PURGE_STATE_EXIT) { - - ret = SRV_PURGE; + if (ret == SRV_NONE && srv_shutdown_state != SRV_SHUTDOWN_NONE + && purge_sys != NULL) { + /* Check only on shutdown. */ + switch (trx_purge_state()) { + case PURGE_STATE_RUN: + case PURGE_STATE_STOP: + ret = SRV_PURGE; + break; + case PURGE_STATE_INIT: + case PURGE_STATE_DISABLED: + case PURGE_STATE_EXIT: + break; + } } return(ret); } -/**********************************************************************//** -Check whether any background thread are active. If so print which thread -is active. Send the threads wakeup signal. -@return name of thread that is active or NULL */ -const char* -srv_any_background_threads_are_active(void) -/*=======================================*/ -{ - const char* thread_active = NULL; - - if (srv_read_only_mode) { - if (srv_buf_resize_thread_active) { - thread_active = "buf_resize_thread"; - } - os_event_set(srv_buf_resize_event); - return(thread_active); - } else if (srv_error_monitor_active) { - thread_active = "srv_error_monitor_thread"; - } else if (lock_sys->timeout_thread_active) { - thread_active = "srv_lock_timeout thread"; - } else if (srv_monitor_active) { - thread_active = "srv_monitor_thread"; - } else if (srv_buf_dump_thread_active) { - thread_active = "buf_dump_thread"; - } else if (srv_buf_resize_thread_active) { - thread_active = "buf_resize_thread"; - } else if (srv_dict_stats_thread_active) { - thread_active = "dict_stats_thread"; - } else if (srv_scrub_log && srv_log_scrub_thread_active) { - thread_active = "log_scrub_thread"; - } - - os_event_set(srv_error_event); - os_event_set(srv_monitor_event); - os_event_set(srv_buf_dump_event); - os_event_set(lock_sys->timeout_event); - os_event_set(dict_stats_event); - os_event_set(srv_buf_resize_event); - - if (srv_scrub_log) { - os_event_set(log_scrub_event); - } - - return(thread_active); -} - /*******************************************************************//** Tells the InnoDB server that there has been activity in the database and wakes up the master thread if it is suspended (not sleeping). Used @@ -2122,15 +2080,7 @@ srv_active_wake_master_thread_low() if (slot->in_use) { ut_a(srv_slot_get_type(slot) == SRV_MASTER); - - if (slot->suspended) { - - slot->suspended = FALSE; - - ++srv_sys->n_threads_active[SRV_MASTER]; - - os_event_set(slot->event); - } + os_event_set(slot->event); } srv_sys_mutex_exit(); @@ -2648,7 +2598,7 @@ suspend_thread: manual also mentions this string in several places. */ srv_main_thread_op_info = "waiting for server activity"; - os_event_wait(slot->event); + srv_resume_thread(slot); if (srv_shutdown_state != SRV_SHUTDOWN_EXIT_THREADS) { goto loop; @@ -2668,15 +2618,14 @@ srv_purge_should_exit( MYSQL_THD thd, ulint n_purged) /*!< in: pages purged in last batch */ { - if (thd_kill_level(thd)) { - return(srv_fast_shutdown != 0 || n_purged == 0); - } - switch (srv_shutdown_state) { case SRV_SHUTDOWN_NONE: - /* Normal operation. */ - break; - + if ((!srv_was_started || srv_running) + && !thd_kill_level(thd)) { + /* Normal operation. */ + break; + } + /* close_connections() was called; fall through */ case SRV_SHUTDOWN_CLEANUP: case SRV_SHUTDOWN_EXIT_THREADS: /* Exit unless slow shutdown requested or all done. */ @@ -2765,8 +2714,7 @@ DECLARE_THREAD(srv_worker_thread)( do { srv_suspend_thread(slot); - - os_event_wait(slot->event); + srv_resume_thread(slot); if (srv_task_execute()) { @@ -2786,7 +2734,6 @@ DECLARE_THREAD(srv_worker_thread)( ut_a(!purge_sys->running); ut_a(purge_sys->state == PURGE_STATE_EXIT); - ut_a(srv_shutdown_state > SRV_SHUTDOWN_NONE || thd_kill_level(thd)); rw_lock_x_unlock(&purge_sys->latch); @@ -2912,8 +2859,6 @@ srv_purge_coordinator_suspend( int64_t sig_count = srv_suspend_thread(slot); do { - ulint ret; - rw_lock_x_lock(&purge_sys->latch); purge_sys->running = false; @@ -2922,32 +2867,11 @@ srv_purge_coordinator_suspend( /* We don't wait right away on the the non-timed wait because we want to signal the thread that wants to suspend purge. */ - - if (stop) { - os_event_wait_low(slot->event, sig_count); - ret = 0; - } else if (rseg_history_len <= trx_sys->rseg_history_len) { - ret = os_event_wait_time_low( - slot->event, SRV_PURGE_MAX_TIMEOUT, sig_count); - } else { - /* We don't want to waste time waiting, if the - history list increased by the time we got here, - unless purge has been stopped. */ - ret = 0; - } - - srv_sys_mutex_enter(); - - /* The thread can be in state !suspended after the timeout - but before this check if another thread sent a wakeup signal. */ - - 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(); + const bool wait = stop + || rseg_history_len <= trx_sys->rseg_history_len; + const bool timeout = srv_resume_thread( + slot, sig_count, wait, + stop ? 0 : SRV_PURGE_MAX_TIMEOUT); sig_count = srv_suspend_thread(slot); @@ -2959,6 +2883,19 @@ srv_purge_coordinator_suspend( if (!stop) { ut_a(purge_sys->n_stop == 0); purge_sys->running = true; + + if (timeout + && rseg_history_len == trx_sys->rseg_history_len + && trx_sys->rseg_history_len < 5000) { + /* No new records were added since the + wait started. Simply wait for new + records. The magic number 5000 is an + approximation for the case where we + have cached UNDO log records which + prevent truncate of the UNDO + segments. */ + stop = true; + } } else { ut_a(purge_sys->n_stop > 0); @@ -2967,33 +2904,9 @@ srv_purge_coordinator_suspend( } rw_lock_x_unlock(&purge_sys->latch); - - if (ret == OS_SYNC_TIME_EXCEEDED) { - - /* No new records added since wait started then simply - wait for new records. The magic number 5000 is an - approximation for the case where we have cached UNDO - log records which prevent truncate of the UNDO - segments. */ - - if (rseg_history_len == trx_sys->rseg_history_len - && trx_sys->rseg_history_len < 5000) { - - stop = true; - } - } - } while (stop && !thd_kill_level(thd)); - 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(); + srv_resume_thread(slot, 0, false); } /*********************************************************************//** @@ -3048,8 +2961,9 @@ DECLARE_THREAD(srv_purge_coordinator_thread)( srv_purge_coordinator_suspend(thd, slot, rseg_history_len); } + ut_ad(!slot->suspended); + if (srv_purge_should_exit(thd, n_total_purged)) { - ut_a(!slot->suspended); break; } @@ -3169,11 +3083,9 @@ srv_get_task_queue_length(void) return(n_tasks); } -/**********************************************************************//** -Wakeup the purge threads. */ +/** Wake up the purge threads. */ void -srv_purge_wakeup(void) -/*==================*/ +srv_purge_wakeup() { ut_ad(!srv_read_only_mode); @@ -3220,11 +3132,6 @@ srv_was_tablespace_truncated(const fil_space_t* space) return(false); } - bool has_shared_space = FSP_FLAGS_GET_SHARED(space->flags); - - if (is_system_tablespace(space->id) || has_shared_space) { - return(false); - } - - return(truncate_t::was_tablespace_truncated(space->id)); + return (!is_system_tablespace(space->id) + && truncate_t::was_tablespace_truncated(space->id)); } diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index e6bf117c673..adaa8448f21 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -3,7 +3,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2016, MariaDB Corporation +Copyright (c) 2013, 2017, MariaDB Corporation Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -63,7 +63,7 @@ Created 2/16/1996 Heikki Tuuri #include "fsp0fsp.h" #include "rem0rec.h" #include "mtr0mtr.h" -#include "log0log.h" +#include "log0crypt.h" #include "log0recv.h" #include "page0page.h" #include "page0cur.h" @@ -139,7 +139,7 @@ ibool srv_was_started = FALSE; static ibool srv_start_has_been_called = FALSE; #ifdef UNIV_DEBUG /** InnoDB system tablespace to set during recovery */ -UNIV_INTERN ulong srv_sys_space_size_debug; +UNIV_INTERN uint srv_sys_space_size_debug; #endif /* UNIV_DEBUG */ /** Bit flags for tracking background thread creation. They are used to @@ -418,12 +418,14 @@ create_log_files( file should be recoverable. The buffer pool was clean, and we can simply create all log files from the scratch. */ - RECOVERY_CRASH(6); + DBUG_EXECUTE_IF("innodb_log_abort_6", return(DB_ERROR);); } + DBUG_PRINT("ib_log", ("After innodb_log_abort_6")); ut_ad(!buf_pool_check_no_pending_io()); - RECOVERY_CRASH(7); + DBUG_EXECUTE_IF("innodb_log_abort_7", return(DB_ERROR);); + DBUG_PRINT("ib_log", ("After innodb_log_abort_7")); for (unsigned i = 0; i < srv_n_log_files; i++) { sprintf(logfilename + dirnamelen, @@ -436,20 +438,17 @@ create_log_files( } } - RECOVERY_CRASH(8); + DBUG_EXECUTE_IF("innodb_log_abort_8", return(DB_ERROR);); + DBUG_PRINT("ib_log", ("After innodb_log_abort_8")); /* We did not create the first log file initially as ib_logfile0, so that crash recovery cannot find it until it has been completed and renamed. */ sprintf(logfilename + dirnamelen, "ib_logfile%u", INIT_LOG_FILE0); - /* Disable the doublewrite buffer for log files, not required */ - fil_space_t* log_space = fil_space_create( - "innodb_redo_log", SRV_LOG_SPACE_FIRST_ID, - fsp_flags_set_page_size(0, univ_page_size), - FIL_TYPE_LOG, - NULL, /* No encryption yet */ + "innodb_redo_log", SRV_LOG_SPACE_FIRST_ID, 0, FIL_TYPE_LOG, + NULL, /* innodb_encrypt_log works at a different level */ true /* this is create */); ut_a(fil_validate()); ut_a(log_space != NULL); @@ -485,6 +484,9 @@ create_log_files( /* Create a log checkpoint. */ log_mutex_enter(); + if (log_sys->is_encrypted() && !log_crypt_init()) { + return(DB_ERROR); + } ut_d(recv_no_log_write = false); recv_reset_logs(lsn); log_mutex_exit(); @@ -492,10 +494,16 @@ create_log_files( return(DB_SUCCESS); } -/*********************************************************************//** -Renames the first log file. */ +/** Rename the first redo log file. +@param[in,out] logfilename buffer for the log file name +@param[in] dirnamelen length of the directory path +@param[in] lsn FIL_PAGE_FILE_FLUSH_LSN value +@param[in,out] logfile0 name of the first log file +@return error code +@retval DB_SUCCESS on successful operation */ +MY_ATTRIBUTE((warn_unused_result, nonnull)) static -void +dberr_t create_log_files_rename( /*====================*/ char* logfilename, /*!< in/out: buffer for log file name */ @@ -506,6 +514,10 @@ create_log_files_rename( /* If innodb_flush_method=O_DSYNC, we need to explicitly flush the log buffers. */ fil_flush(SRV_LOG_SPACE_FIRST_ID); + + DBUG_EXECUTE_IF("innodb_log_abort_9", return(DB_ERROR);); + DBUG_PRINT("ib_log", ("After innodb_log_abort_9")); + /* Close the log files, so that we can rename the first one. */ fil_close_log_files(false); @@ -514,26 +526,26 @@ create_log_files_rename( checkpoint has been created. */ sprintf(logfilename + dirnamelen, "ib_logfile%u", 0); - RECOVERY_CRASH(9); - ib::info() << "Renaming log file " << logfile0 << " to " << logfilename; log_mutex_enter(); ut_ad(strlen(logfile0) == 2 + strlen(logfilename)); - bool success = os_file_rename( - innodb_log_file_key, logfile0, logfilename); - ut_a(success); - - RECOVERY_CRASH(10); + dberr_t err = os_file_rename( + innodb_log_file_key, logfile0, logfilename) + ? DB_SUCCESS : DB_ERROR; /* Replace the first file with ib_logfile0. */ strcpy(logfile0, logfilename); log_mutex_exit(); + DBUG_EXECUTE_IF("innodb_log_abort_10", err = DB_ERROR;); + fil_open_log_and_system_tablespace_files(); - ib::warn() << "New log files created, LSN=" << lsn; + ib::info() << "New log files created, LSN=" << lsn; + + return(err); } /*********************************************************************//** @@ -645,7 +657,6 @@ srv_undo_tablespace_open( { os_file_t fh; bool ret; - ulint flags; dberr_t err = DB_ERROR; char undo_name[sizeof "innodb_undo000"]; @@ -675,13 +686,6 @@ srv_undo_tablespace_open( os_offset_t size; fil_space_t* space; -#ifdef UNIV_LINUX - const bool atomic_write = !srv_use_doublewrite_buf - && fil_fusionio_enable_atomic_write(fh); -#else - const bool atomic_write = false; -#endif - size = os_file_get_size(fh); ut_a(size != (os_offset_t) -1); @@ -697,11 +701,9 @@ srv_undo_tablespace_open( fil_set_max_space_id_if_bigger(space_id); - /* Set the compressed page size to 0 (non-compressed) */ - flags = fsp_flags_init( - univ_page_size, false, false, false, false, false, 0, ATOMIC_WRITES_DEFAULT); space = fil_space_create( - undo_name, space_id, flags, FIL_TYPE_TABLESPACE, NULL, true); + undo_name, space_id, FSP_FLAGS_PAGE_SSIZE(), + FIL_TYPE_TABLESPACE, NULL, true); ut_a(fil_validate()); ut_a(space); @@ -713,7 +715,7 @@ srv_undo_tablespace_open( the unit has been scaled to pages and page number is always 32 bits. */ if (fil_node_create( - name, (ulint) n_pages, space, false, atomic_write)) { + name, (ulint) n_pages, space, false, TRUE)) { err = DB_SUCCESS; } @@ -1045,8 +1047,7 @@ srv_undo_tablespaces_init( if (space_id == *it) { trx_rseg_header_create( - *it, univ_page_size, ULINT_MAX, - i, &mtr); + *it, ULINT_MAX, i, &mtr); } } @@ -1131,8 +1132,6 @@ srv_open_tmp_tablespace(bool create_new_db) srv_tmp_space.set_space_id(SRV_TMP_SPACE_ID); - RECOVERY_CRASH(100); - dberr_t err = srv_tmp_space.check_file_spec( &create_new_temp_space, 12 * 1024 * 1024); @@ -1209,13 +1208,11 @@ srv_start_state_is_set( /** Shutdown all background threads created by InnoDB. */ +static void srv_shutdown_all_bg_threads() { - ulint i; - srv_shutdown_state = SRV_SHUTDOWN_EXIT_THREADS; - fil_crypt_threads_end(); if (!srv_start_state) { return; @@ -1224,7 +1221,7 @@ srv_shutdown_all_bg_threads() /* All threads end up waiting for certain events. Put those events to the signaled state. Then the threads will exit themselves after os_event_wait(). */ - for (i = 0; i < 1000; i++) { + for (uint i = 0; i < 1000; ++i) { /* NOTE: IF YOU CREATE THREADS IN INNODB, YOU MUST EXIT THEM HERE OR EARLIER */ @@ -1247,6 +1244,14 @@ srv_shutdown_all_bg_threads() /* d. Wakeup purge threads. */ srv_purge_wakeup(); } + + if (srv_n_fil_crypt_threads_started) { + os_event_set(fil_crypt_threads_event); + } + + if (log_scrub_thread_active) { + os_event_set(log_scrub_event); + } } if (srv_start_state_is_set(SRV_START_STATE_IO)) { @@ -1277,26 +1282,19 @@ srv_shutdown_all_bg_threads() os_aio_wake_all_threads_at_shutdown(); } - bool active = os_thread_active(); + const bool active = os_thread_active(); os_thread_sleep(100000); if (!active) { - break; + return; } } - if (i == 1000) { - ib::warn() << os_thread_count << " threads created by InnoDB" - " had not exited at shutdown!"; -#ifdef UNIV_DEBUG - os_aio_print_pending_io(stderr); - ut_ad(0); -#endif /* UNIV_DEBUG */ - } else { - /* Reset the start state. */ - srv_start_state = SRV_START_STATE_NONE; - } + ib::warn() << os_thread_count << " threads created by InnoDB" + " had not exited at shutdown!"; + ut_d(os_aio_print_pending_io(stderr)); + ut_ad(0); } #ifdef UNIV_DEBUG @@ -1313,13 +1311,14 @@ srv_shutdown_all_bg_threads() @param[in] line Line number @param[in] err Reason for aborting InnoDB startup @return DB_SUCCESS or error code. */ +MY_ATTRIBUTE((warn_unused_result, nonnull)) static dberr_t srv_init_abort_low( bool create_new_db, #ifdef UNIV_DEBUG const char* file, - ulint line, + unsigned line, #endif /* UNIV_DEBUG */ dberr_t err) { @@ -1352,6 +1351,8 @@ lsn_t srv_prepare_to_delete_redo_log_files( ulint n_files) { + DBUG_ENTER("srv_prepare_to_delete_redo_log_files"); + lsn_t flushed_lsn; ulint pending_io = 0; ulint count = 0; @@ -1360,7 +1361,8 @@ srv_prepare_to_delete_redo_log_files( /* Clean the buffer pool. */ buf_flush_sync_all_buf_pools(); - RECOVERY_CRASH(1); + DBUG_EXECUTE_IF("innodb_log_abort_1", DBUG_RETURN(0);); + DBUG_PRINT("ib_log", ("After innodb_log_abort_1")); log_mutex_enter(); @@ -1369,17 +1371,35 @@ srv_prepare_to_delete_redo_log_files( flushed_lsn = log_sys->lsn; { - ib::warn warning; + ib::info info; if (srv_log_file_size == 0) { - warning << "Upgrading redo log: "; + info << "Upgrading redo log: "; + } else if (n_files != srv_n_log_files + || srv_log_file_size + != srv_log_file_size_requested) { + if (srv_encrypt_log + == log_sys->is_encrypted()) { + info << (srv_encrypt_log + ? "Resizing encrypted" + : "Resizing"); + } else if (srv_encrypt_log) { + info << "Encrypting and resizing"; + } else { + info << "Removing encryption" + " and resizing"; + } + + info << " redo log from " << n_files + << "*" << srv_log_file_size << " to "; + } else if (srv_encrypt_log) { + info << "Encrypting redo log: "; } else { - warning << "Resizing redo log from " - << n_files << "*" - << srv_log_file_size << " to "; + info << "Removing redo log encryption: "; } - warning << srv_n_log_files << "*" - << srv_log_file_size_requested - << " pages, LSN=" << flushed_lsn; + + info << srv_n_log_files << "*" + << srv_log_file_size_requested + << " pages; LSN=" << flushed_lsn; } /* Flush the old log files. */ @@ -1412,7 +1432,7 @@ srv_prepare_to_delete_redo_log_files( } while (buf_pool_check_no_pending_io()); - return(flushed_lsn); + DBUG_RETURN(flushed_lsn); } /******************************************************************** @@ -1425,23 +1445,20 @@ innobase_start_or_create_for_mysql(void) { bool create_new_db = false; lsn_t flushed_lsn; - ulint sum_of_data_file_sizes; - ulint tablespace_size_in_header; - dberr_t err; + dberr_t err = DB_SUCCESS; ulint srv_n_log_files_found = srv_n_log_files; mtr_t mtr; - purge_pq_t* purge_queue; char logfilename[10000]; char* logfile0 = NULL; size_t dirnamelen; unsigned i = 0; - /* Reset the start state. */ - srv_start_state = SRV_START_STATE_NONE; - high_level_read_only = srv_read_only_mode || srv_force_recovery > SRV_FORCE_NO_TRX_UNDO; + /* Reset the start state. */ + srv_start_state = SRV_START_STATE_NONE; + if (srv_read_only_mode) { ib::info() << "Started in read only mode"; @@ -1461,21 +1478,7 @@ innobase_start_or_create_for_mysql(void) } #endif /* HAVE_LZO1X */ -#ifdef UNIV_LINUX -# ifdef HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE - ib::info() << "PUNCH HOLE support available"; -# else - ib::info() << "PUNCH HOLE support not available"; -# endif /* HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE */ -#endif /* UNIV_LINUX */ - - if (sizeof(ulint) != sizeof(void*)) { - ib::error() << "Size of InnoDB's ulint is " << sizeof(ulint) - << ", but size of void* is " << sizeof(void*) - << ". The sizes should be the same so that on" - " a 64-bit platforms you can allocate more than 4 GB" - " of memory."; - } + compile_time_assert(sizeof(ulint) == sizeof(void*)); #ifdef UNIV_DEBUG ib::info() << "!!!!!!!! UNIV_DEBUG switched on !!!!!!!!!"; @@ -1551,44 +1554,36 @@ innobase_start_or_create_for_mysql(void) if (srv_file_flush_method_str == NULL) { /* These are the default options */ -#ifndef _WIN32 - srv_unix_file_flush_method = SRV_UNIX_FSYNC; + srv_file_flush_method = IF_WIN(SRV_ALL_O_DIRECT_FSYNC,SRV_FSYNC); } else if (0 == ut_strcmp(srv_file_flush_method_str, "fsync")) { - srv_unix_file_flush_method = SRV_UNIX_FSYNC; + srv_file_flush_method = SRV_FSYNC; } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DSYNC")) { - srv_unix_file_flush_method = SRV_UNIX_O_DSYNC; + srv_file_flush_method = SRV_O_DSYNC; } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) { - srv_unix_file_flush_method = SRV_UNIX_O_DIRECT; + srv_file_flush_method = SRV_O_DIRECT; } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT_NO_FSYNC")) { - srv_unix_file_flush_method = SRV_UNIX_O_DIRECT_NO_FSYNC; + srv_file_flush_method = SRV_O_DIRECT_NO_FSYNC; } else if (0 == ut_strcmp(srv_file_flush_method_str, "littlesync")) { - srv_unix_file_flush_method = SRV_UNIX_LITTLESYNC; + srv_file_flush_method = SRV_LITTLESYNC; } else if (0 == ut_strcmp(srv_file_flush_method_str, "nosync")) { - srv_unix_file_flush_method = SRV_UNIX_NOSYNC; -#else - srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; + srv_file_flush_method = SRV_NOSYNC; +#ifdef _WIN32 } else if (0 == ut_strcmp(srv_file_flush_method_str, "normal")) { - srv_win_file_flush_method = SRV_WIN_IO_NORMAL; - srv_use_native_aio = FALSE; - + srv_file_flush_method = SRV_FSYNC; } else if (0 == ut_strcmp(srv_file_flush_method_str, "unbuffered")) { - srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; - srv_use_native_aio = FALSE; - } else if (0 == ut_strcmp(srv_file_flush_method_str, "async_unbuffered")) { - srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; #endif /* _WIN32 */ } else { ib::error() << "Unrecognized value " << srv_file_flush_method_str << " for innodb_flush_method"; - return(srv_init_abort(DB_ERROR)); + err = DB_ERROR; } /* Note that the call srv_boot() also changes the values of @@ -1708,15 +1703,17 @@ innobase_start_or_create_for_mysql(void) ib::error() << "Unable to create " << srv_monitor_file_name << ": " << strerror(errno); - return(srv_init_abort(DB_ERROR)); + if (err == DB_SUCCESS) { + err = DB_ERROR; + } } } else { srv_monitor_file_name = NULL; srv_monitor_file = os_file_create_tmpfile(NULL); - if (!srv_monitor_file) { - return(srv_init_abort(DB_ERROR)); + if (!srv_monitor_file && err == DB_SUCCESS) { + err = DB_ERROR; } } @@ -1725,8 +1722,8 @@ innobase_start_or_create_for_mysql(void) srv_dict_tmpfile = os_file_create_tmpfile(NULL); - if (!srv_dict_tmpfile) { - return(srv_init_abort(DB_ERROR)); + if (!srv_dict_tmpfile && err == DB_SUCCESS) { + err = DB_ERROR; } mutex_create(LATCH_ID_SRV_MISC_TMPFILE, @@ -1734,11 +1731,15 @@ innobase_start_or_create_for_mysql(void) srv_misc_tmpfile = os_file_create_tmpfile(NULL); - if (!srv_misc_tmpfile) { - return(srv_init_abort(DB_ERROR)); + if (!srv_misc_tmpfile && err == DB_SUCCESS) { + err = DB_ERROR; } } + if (err != DB_SUCCESS) { + return(srv_init_abort(err)); + } + srv_n_file_io_threads = srv_n_read_io_threads; srv_n_file_io_threads += srv_n_write_io_threads; @@ -1981,23 +1982,21 @@ innobase_start_or_create_for_mysql(void) logfilename, dirnamelen, flushed_lsn, logfile0); + if (err == DB_SUCCESS) { + err = create_log_files_rename( + logfilename, + dirnamelen, + flushed_lsn, logfile0); + } + if (err != DB_SUCCESS) { return(srv_init_abort(err)); } - create_log_files_rename( - logfilename, dirnamelen, - flushed_lsn, logfile0); - /* Suppress the message about crash recovery. */ flushed_lsn = log_get_lsn(); goto files_checked; - } else if (i < 2) { - /* must have at least 2 log files */ - ib::error() << "Only one log file" - " found."; - return(srv_init_abort(err)); } /* opened all files */ @@ -2050,8 +2049,7 @@ innobase_start_or_create_for_mysql(void) /* Disable the doublewrite buffer for log files. */ fil_space_t* log_space = fil_space_create( "innodb_redo_log", - SRV_LOG_SPACE_FIRST_ID, - fsp_flags_set_page_size(0, univ_page_size), + SRV_LOG_SPACE_FIRST_ID, 0, FIL_TYPE_LOG, NULL /* no encryption yet */, true /* create */); @@ -2107,18 +2105,11 @@ files_checked: dict_stats_thread_init(); } - if (!srv_read_only_mode && srv_scrub_log) { - /* TODO(minliz): have/use log_scrub_thread_init() instead? */ - log_scrub_event = os_event_create(0); - } - trx_sys_file_format_init(); trx_sys_create(); if (create_new_db) { - dberr_t err = DB_SUCCESS; - ut_a(!srv_read_only_mode); mtr_start(&mtr); @@ -2136,13 +2127,7 @@ files_checked: All the remaining rollback segments will be created later, after the double write buffer has been created. */ trx_sys_create_sys_pages(); - - purge_queue = trx_sys_init_at_db_start(); - - /* The purge system needs to create the purge view and - therefore requires that the trx_sys is inited. */ - - trx_purge_sys_create(srv_n_purge_threads, purge_queue); + trx_sys_init_at_db_start(); err = dict_create(); @@ -2156,13 +2141,15 @@ files_checked: err = fil_write_flushed_lsn(flushed_lsn); + if (err == DB_SUCCESS) { + err = create_log_files_rename( + logfilename, dirnamelen, + flushed_lsn, logfile0); + } + if (err != DB_SUCCESS) { return(srv_init_abort(err)); } - - create_log_files_rename( - logfilename, dirnamelen, flushed_lsn, logfile0); - } else { /* Check if we support the max format that is stamped @@ -2207,28 +2194,34 @@ files_checked: recv_sys->dblwr.pages.clear(); + if (err == DB_SUCCESS && !srv_read_only_mode) { + log_mutex_enter(); + if (log_sys->is_encrypted() && !log_crypt_init()) { + err = DB_ERROR; + } + log_mutex_exit(); + } + if (err == DB_SUCCESS) { /* Initialize the change buffer. */ err = dict_boot(); - } else { + } + + if (err != DB_SUCCESS) { return(srv_init_abort(err)); } - purge_queue = trx_sys_init_at_db_start(); + /* This must precede recv_apply_hashed_log_recs(true). */ + trx_sys_init_at_db_start(); if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { /* Apply the hashed log records to the respective file pages, for the last batch of recv_group_scan_log_recs(). */ - dberr_t err = recv_apply_hashed_log_recs(TRUE); + recv_apply_hashed_log_recs(true); DBUG_PRINT("ib_log", ("apply completed")); - if (err != DB_SUCCESS) { - ib::warn() << "recv_apply_hashed_log_recs " - << " failed with error " << err; - } - if (recv_needed_recovery) { trx_sys_print_mysql_binlog_offset(); } @@ -2245,16 +2238,182 @@ files_checked: " InnoDB database from a backup!"; } - /* The purge system needs to create the purge view and - therefore requires that the trx_sys is inited. */ + if (!srv_read_only_mode) { + const ulint flags = FSP_FLAGS_PAGE_SSIZE(); + for (ulint id = 0; id <= srv_undo_tablespaces; id++) { + if (fil_space_get(id)) { + fsp_flags_try_adjust(id, flags); + } + } - trx_purge_sys_create(srv_n_purge_threads, purge_queue); + if (sum_of_new_sizes > 0) { + /* New data file(s) were added */ + mtr.start(); + fsp_header_inc_size(0, sum_of_new_sizes, &mtr); + mtr.commit(); + /* Immediately write the log record about + increased tablespace size to disk, so that it + is durable even if mysqld would crash + quickly */ + log_buffer_flush_to_disk(); + } + } + + const ulint tablespace_size_in_header + = fsp_header_get_tablespace_size(); + const ulint sum_of_data_file_sizes + = srv_sys_space.get_sum_of_sizes(); + /* Compare the system tablespace file size to what is + stored in FSP_SIZE. In open_or_create_data_files() + we already checked that the file sizes match the + innodb_data_file_path specification. */ + if (srv_read_only_mode + || sum_of_data_file_sizes == tablespace_size_in_header) { + /* Do not complain about the size. */ + } else if (!srv_sys_space.can_auto_extend_last_file() + || sum_of_data_file_sizes + < tablespace_size_in_header) { + ib::error() << "Tablespace size stored in header is " + << tablespace_size_in_header + << " pages, but the sum of data file sizes is " + << sum_of_data_file_sizes << " pages"; + + if (srv_force_recovery == 0 + && sum_of_data_file_sizes + < tablespace_size_in_header) { + ib::error() << + "Cannot start InnoDB. The tail of" + " the system tablespace is" + " missing. Have you edited" + " innodb_data_file_path in my.cnf" + " in an inappropriate way, removing" + " data files from there?" + " You can set innodb_force_recovery=1" + " in my.cnf to force" + " a startup if you are trying to" + " recover a badly corrupt database."; + + return(srv_init_abort(DB_ERROR)); + } + } /* recv_recovery_from_checkpoint_finish needs trx lists which are initialized in trx_sys_init_at_db_start(). */ recv_recovery_from_checkpoint_finish(); + /* Upgrade or resize or rebuild the redo logs before + generating any dirty pages, so that the old redo log + files will not be written to. */ + + if (srv_force_recovery == SRV_FORCE_NO_LOG_REDO) { + /* Completely ignore the redo log. */ + } else if (srv_read_only_mode) { + /* Leave the redo log alone. */ + } else if (srv_log_file_size_requested == srv_log_file_size + && srv_n_log_files_found == srv_n_log_files + && log_sys->is_encrypted() == srv_encrypt_log) { + /* No need to upgrade or resize the redo log. */ + } else { + /* Prepare to delete the old redo log files */ + flushed_lsn = srv_prepare_to_delete_redo_log_files(i); + + DBUG_EXECUTE_IF("innodb_log_abort_1", + return(srv_init_abort(DB_ERROR));); + /* Prohibit redo log writes from any other + threads until creating a log checkpoint at the + end of create_log_files(). */ + ut_d(recv_no_log_write = true); + ut_ad(!buf_pool_check_no_pending_io()); + + DBUG_EXECUTE_IF("innodb_log_abort_3", + return(srv_init_abort(DB_ERROR));); + DBUG_PRINT("ib_log", ("After innodb_log_abort_3")); + + /* Stamp the LSN to the data files. */ + err = fil_write_flushed_lsn(flushed_lsn); + + DBUG_EXECUTE_IF("innodb_log_abort_4", err = DB_ERROR;); + DBUG_PRINT("ib_log", ("After innodb_log_abort_4")); + + if (err != DB_SUCCESS) { + return(srv_init_abort(err)); + } + + /* Close and free the redo log files, so that + we can replace them. */ + fil_close_log_files(true); + + DBUG_EXECUTE_IF("innodb_log_abort_5", + return(srv_init_abort(DB_ERROR));); + DBUG_PRINT("ib_log", ("After innodb_log_abort_5")); + + /* Free the old log file space. */ + log_group_close_all(); + + ib::info() << "Starting to delete and rewrite log" + " files."; + + srv_log_file_size = srv_log_file_size_requested; + + err = create_log_files( + logfilename, dirnamelen, flushed_lsn, + logfile0); + + if (err == DB_SUCCESS) { + err = create_log_files_rename( + logfilename, dirnamelen, flushed_lsn, + logfile0); + } + + if (err != DB_SUCCESS) { + return(srv_init_abort(err)); + } + } + + + /* Validate a few system page types that were left + uninitialized by older versions of MySQL. */ + if (!high_level_read_only) { + mtr_t mtr; + buf_block_t* block; + mtr.start(); + mtr.set_sys_modified(); + /* Bitmap page types will be reset in + buf_dblwr_check_block() without redo logging. */ + block = buf_page_get( + page_id_t(IBUF_SPACE_ID, + FSP_IBUF_HEADER_PAGE_NO), + univ_page_size, RW_X_LATCH, &mtr); + fil_block_check_type(block, FIL_PAGE_TYPE_SYS, &mtr); + /* Already MySQL 3.23.53 initialized + FSP_IBUF_TREE_ROOT_PAGE_NO to + FIL_PAGE_INDEX. No need to reset that one. */ + block = buf_page_get( + page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO), + univ_page_size, RW_X_LATCH, &mtr); + fil_block_check_type(block, FIL_PAGE_TYPE_TRX_SYS, + &mtr); + block = buf_page_get( + page_id_t(TRX_SYS_SPACE, + FSP_FIRST_RSEG_PAGE_NO), + univ_page_size, RW_X_LATCH, &mtr); + fil_block_check_type(block, FIL_PAGE_TYPE_SYS, &mtr); + block = buf_page_get( + page_id_t(TRX_SYS_SPACE, FSP_DICT_HDR_PAGE_NO), + univ_page_size, RW_X_LATCH, &mtr); + fil_block_check_type(block, FIL_PAGE_TYPE_SYS, &mtr); + mtr.commit(); + } + + /* Roll back any recovered data dictionary transactions, so + that the data dictionary tables will be free of any locks. + The data dictionary latch should guarantee that there is at + most one data dictionary transaction active at a time. */ + if (srv_force_recovery < SRV_FORCE_NO_TRX_UNDO) { + trx_rollback_or_clean_recovered(FALSE); + } + /* Fix-up truncate of tables in the system tablespace if server crashed while truncate was active. The non- system tables are done after tablespace discovery. Do @@ -2267,7 +2426,6 @@ files_checked: /* Open or Create SYS_TABLESPACES and SYS_DATAFILES so that tablespace names and other metadata can be found. */ - srv_sys_tablespaces_open = true; err = dict_create_or_check_sys_tablespace(); if (err != DB_SUCCESS) { return(srv_init_abort(err)); @@ -2301,17 +2459,6 @@ files_checked: dict_check_tablespaces_and_store_max_id(validate); } -#ifdef MYSQL_ENCRYPTION - /* Rotate the encryption key for recovery. It's because - server could crash in middle of key rotation. Some tablespace - didn't complete key rotation. Here, we will resume the - rotation. */ - if (!srv_read_only_mode - && srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { - fil_encryption_rotate(); - } -#endif /* MYSQL_ENCRYPTION */ - /* Fix-up truncate of table if server crashed while truncate was active. */ err = truncate_t::fixup_tables_in_non_system_tablespace(); @@ -2320,67 +2467,6 @@ files_checked: return(srv_init_abort(err)); } - if (!srv_force_recovery - && !recv_sys->found_corrupt_log - && (srv_log_file_size_requested != srv_log_file_size - || srv_n_log_files_found != srv_n_log_files)) { - dberr_t err = DB_SUCCESS; - - /* Prepare to replace the redo log files. */ - - if (srv_read_only_mode) { - ib::error() << "Cannot resize log files" - " in read-only mode."; - return(srv_init_abort(DB_READ_ONLY)); - } - - /* Prepare to delete the old redo log files */ - flushed_lsn = srv_prepare_to_delete_redo_log_files(i); - - /* Prohibit redo log writes from any other - threads until creating a log checkpoint at the - end of create_log_files(). */ - ut_d(recv_no_log_write = true); - ut_ad(!buf_pool_check_no_pending_io()); - - RECOVERY_CRASH(3); - - /* Stamp the LSN to the data files. */ - err = fil_write_flushed_lsn(flushed_lsn); - - if (err != DB_SUCCESS) { - return(srv_init_abort(err)); - } - - RECOVERY_CRASH(4); - - /* Close and free the redo log files, so that - we can replace them. */ - fil_close_log_files(true); - - RECOVERY_CRASH(5); - - /* Free the old log file space. */ - log_group_close_all(); - - ib::warn() << "Starting to delete and rewrite log" - " files."; - - srv_log_file_size = srv_log_file_size_requested; - - err = create_log_files( - logfilename, dirnamelen, flushed_lsn, - logfile0); - - if (err != DB_SUCCESS) { - return(srv_init_abort(err)); - } - - create_log_files_rename( - logfilename, dirnamelen, flushed_lsn, - logfile0); - } - recv_recovery_rollback_active(); /* It is possible that file_format tag has never @@ -2391,20 +2477,8 @@ files_checked: trx_sys_file_format_tag_init(); } - if (!create_new_db && sum_of_new_sizes > 0) { - /* New data file(s) were added */ - mtr_start(&mtr); - - fsp_header_inc_size(0, sum_of_new_sizes, &mtr); - - mtr_commit(&mtr); - - /* Immediately write the log record about increased tablespace - size to disk, so that it is durable even if mysqld would crash - quickly */ - - log_buffer_flush_to_disk(); - } + ut_ad(err == DB_SUCCESS); + ut_a(sum_of_new_sizes != ULINT_UNDEFINED); /* Open temp-tablespace and keep it open until shutdown. */ @@ -2413,8 +2487,10 @@ files_checked: if (err != DB_SUCCESS) { return(srv_init_abort(err)); } + /* Create the doublewrite buffer to a new tablespace */ - if (buf_dblwr == NULL && !buf_dblwr_create()) { + if (!srv_read_only_mode && srv_force_recovery < SRV_FORCE_NO_TRX_UNDO + && !buf_dblwr_create()) { return(srv_init_abort(DB_ERROR)); } @@ -2462,14 +2538,17 @@ files_checked: lock_wait_timeout_thread, NULL, thread_ids + 2 + SRV_MAX_N_IO_THREADS); thread_started[2 + SRV_MAX_N_IO_THREADS] = true; + lock_sys->timeout_thread_active = true; /* Create the thread which warns of long semaphore waits */ + srv_error_monitor_active = true; thread_handles[3 + SRV_MAX_N_IO_THREADS] = os_thread_create( srv_error_monitor_thread, NULL, thread_ids + 3 + SRV_MAX_N_IO_THREADS); thread_started[3 + SRV_MAX_N_IO_THREADS] = true; /* Create the thread which prints InnoDB monitor info */ + srv_monitor_active = true; thread_handles[4 + SRV_MAX_N_IO_THREADS] = os_thread_create( srv_monitor_thread, NULL, thread_ids + 4 + SRV_MAX_N_IO_THREADS); @@ -2479,20 +2558,22 @@ files_checked: /* Create the SYS_FOREIGN and SYS_FOREIGN_COLS system tables */ err = dict_create_or_check_foreign_constraint_tables(); - if (err != DB_SUCCESS) { - return(srv_init_abort(err)); + if (err == DB_SUCCESS) { + err = dict_create_or_check_sys_tablespace(); + if (err == DB_SUCCESS) { + err = dict_create_or_check_sys_virtual(); + } } - - /* Create the SYS_TABLESPACES system table */ - err = dict_create_or_check_sys_tablespace(); - if (err != DB_SUCCESS) { - return(srv_init_abort(err)); - } - srv_sys_tablespaces_open = true; - - /* Create the SYS_VIRTUAL system table */ - err = dict_create_or_check_sys_virtual(); - if (err != DB_SUCCESS) { + switch (err) { + case DB_SUCCESS: + break; + case DB_READ_ONLY: + if (srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO) { + break; + } + ib::error() << "Cannot create system tables in read-only mode"; + /* fall through */ + default: return(srv_init_abort(err)); } @@ -2557,68 +2638,6 @@ files_checked: } } - sum_of_data_file_sizes = srv_sys_space.get_sum_of_sizes(); - ut_a(sum_of_new_sizes != ULINT_UNDEFINED); - - tablespace_size_in_header = fsp_header_get_tablespace_size(); - - if (!srv_read_only_mode - && !srv_sys_space.can_auto_extend_last_file() - && sum_of_data_file_sizes != tablespace_size_in_header) { - - ib::error() << "Tablespace size stored in header is " - << tablespace_size_in_header << " pages, but the sum" - " of data file sizes is " << sum_of_data_file_sizes - << " pages"; - - if (srv_force_recovery == 0 - && sum_of_data_file_sizes < tablespace_size_in_header) { - /* This is a fatal error, the tail of a tablespace is - missing */ - - ib::error() - << "Cannot start InnoDB." - " The tail of the system tablespace is" - " missing. Have you edited" - " innodb_data_file_path in my.cnf in an" - " inappropriate way, removing" - " ibdata files from there?" - " You can set innodb_force_recovery=1" - " in my.cnf to force" - " a startup if you are trying" - " to recover a badly corrupt database."; - - return(srv_init_abort(DB_ERROR)); - } - } - - if (!srv_read_only_mode - && srv_sys_space.can_auto_extend_last_file() - && sum_of_data_file_sizes < tablespace_size_in_header) { - - ib::error() << "Tablespace size stored in header is " - << tablespace_size_in_header << " pages, but the sum" - " of data file sizes is only " - << sum_of_data_file_sizes << " pages"; - - if (srv_force_recovery == 0) { - - ib::error() - << "Cannot start InnoDB. The tail of" - " the system tablespace is" - " missing. Have you edited" - " innodb_data_file_path in my.cnf in an" - " InnoDB: inappropriate way, removing" - " ibdata files from there?" - " You can set innodb_force_recovery=1" - " in my.cnf to force" - " InnoDB: a startup if you are trying to" - " recover a badly corrupt database."; - - return(srv_init_abort(DB_ERROR)); - } - } - if (srv_print_verbose_log) { ib::info() << INNODB_VERSION_STR << " started; log sequence number " @@ -2630,23 +2649,6 @@ files_checked: << srv_force_recovery << " !!!"; } - if (!srv_read_only_mode) { - /* Create thread(s) that handles key rotation. This is - needed already here as log_preflush_pool_modified_pages - will flush dirty pages and that might need e.g. - fil_crypt_threads_event. */ - fil_system_enter(); - fil_crypt_threads_init(); - fil_system_exit(); - - /* - Create a checkpoint before logging anything new, so that - the current encryption key in use is definitely logged - before any log blocks encrypted with that key. - */ - log_make_checkpoint_at(LSN_MAX, TRUE); - } - if (srv_force_recovery == 0) { /* In the insert buffer we may have even bigger tablespace id's, because we may have dropped those tablespaces, but @@ -2671,6 +2673,8 @@ files_checked: /* Create the buffer pool dump/load thread */ buf_dump_thread_handle= os_thread_create(buf_dump_thread, NULL, NULL); + + srv_buf_dump_thread_active = true; buf_dump_thread_started = true; #ifdef WITH_WSREP } else { @@ -2680,31 +2684,43 @@ files_checked: } #endif /* WITH_WSREP */ + /* Create thread(s) that handles key rotation. This is + needed already here as log_preflush_pool_modified_pages + will flush dirty pages and that might need e.g. + fil_crypt_threads_event. */ + fil_system_enter(); + fil_crypt_threads_init(); + fil_system_exit(); + + /* + Create a checkpoint before logging anything new, so that + the current encryption key in use is definitely logged + before any log blocks encrypted with that key. + */ + log_make_checkpoint_at(LSN_MAX, TRUE); + /* Create the dict stats gathering thread */ - dict_stats_thread_handle = os_thread_create(dict_stats_thread, NULL, NULL); + dict_stats_thread_handle = os_thread_create( + dict_stats_thread, NULL, NULL); + srv_dict_stats_thread_active = true; dict_stats_thread_started = true; /* Create the thread that will optimize the FTS sub-system. */ fts_optimize_init(); - srv_start_state_set(SRV_START_STATE_STAT); + /* Init data for datafile scrub threads */ + btr_scrub_init(); - /* Create the log scrub thread */ - if (srv_scrub_log) { - os_thread_create(log_scrub_thread, NULL, NULL); - } + /* Initialize online defragmentation. */ + btr_defragment_init(); + + srv_start_state_set(SRV_START_STATE_STAT); } /* Create the buffer pool resize thread */ + srv_buf_resize_thread_active = true; os_thread_create(buf_resize_thread, NULL, NULL); - /* Init data for datafile scrub threads */ - btr_scrub_init(); - - /* Initialize online defragmentation. */ - btr_defragment_init(); - - srv_was_started = TRUE; return(DB_SUCCESS); } @@ -2744,27 +2760,20 @@ void srv_shutdown_bg_undo_sources(void) /*===========================*/ { - fts_optimize_shutdown(); - dict_stats_shutdown(); + if (srv_start_state_is_set(SRV_START_STATE_STAT)) { + ut_ad(!srv_read_only_mode); + fts_optimize_shutdown(); + dict_stats_shutdown(); + } } -/****************************************************************//** -Shuts down the InnoDB database. -@return DB_SUCCESS or error code */ -dberr_t -innobase_shutdown_for_mysql(void) -/*=============================*/ +/** Shut down InnoDB. */ +void +innodb_shutdown() { - if (!srv_was_started) { - if (srv_is_being_started) { - ib::warn() << "Shutting down an improperly started," - " or created database!"; - } + ut_ad(!srv_running); - return(DB_SUCCESS); - } - - if (!srv_read_only_mode && srv_fast_shutdown) { + if (srv_fast_shutdown) { srv_shutdown_bg_undo_sources(); } @@ -2803,29 +2812,58 @@ innobase_shutdown_for_mysql(void) srv_misc_tmpfile = 0; } - if (!srv_read_only_mode) { + ut_ad(dict_stats_event || !srv_was_started || srv_read_only_mode); + ut_ad(dict_sys || !srv_was_started); + ut_ad(trx_sys || !srv_was_started); + ut_ad(buf_dblwr || !srv_was_started || srv_read_only_mode + || srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO); + ut_ad(lock_sys || !srv_was_started); +#ifdef BTR_CUR_HASH_ADAPT + ut_ad(btr_search_sys || !srv_was_started); +#endif /* BTR_CUR_HASH_ADAPT */ + ut_ad(ibuf || !srv_was_started); + ut_ad(log_sys || !srv_was_started); + + if (dict_stats_event) { dict_stats_thread_deinit(); - if (srv_scrub_log) { - /* TODO(minliz): have/use log_scrub_thread_deinit() instead? */ - os_event_destroy(log_scrub_event); - log_scrub_event = NULL; - } } - fil_crypt_threads_cleanup(); + if (srv_start_state_is_set(SRV_START_STATE_STAT)) { + ut_ad(!srv_read_only_mode); + /* srv_shutdown_bg_undo_sources() already invoked + fts_optimize_shutdown(); dict_stats_shutdown(); */ - /* Cleanup data for datafile scrubbing */ - btr_scrub_cleanup(); + fil_crypt_threads_cleanup(); + btr_scrub_cleanup(); + /* FIXME: call btr_defragment_shutdown(); */ + } /* This must be disabled before closing the buffer pool and closing the data dictionary. */ - btr_search_disable(true); - ibuf_close(); - log_shutdown(); - trx_sys_file_format_close(); - trx_sys_close(); - lock_sys_close(); +#ifdef BTR_CUR_HASH_ADAPT + if (dict_sys) { + btr_search_disable(true); + } +#endif /* BTR_CUR_HASH_ADAPT */ + if (ibuf) { + ibuf_close(); + } + if (log_sys) { + log_shutdown(); + } + if (trx_sys) { + trx_sys_file_format_close(); + trx_sys_close(); + } + UT_DELETE(purge_sys); + purge_sys = NULL; + if (buf_dblwr) { + buf_dblwr_free(); + } + if (lock_sys) { + lock_sys_close(); + } trx_pool_close(); @@ -2837,13 +2875,19 @@ innobase_shutdown_for_mysql(void) mutex_free(&srv_misc_tmpfile_mutex); } - dict_close(); - btr_search_sys_free(); + if (dict_sys) { + dict_close(); + } + +#ifdef BTR_CUR_HASH_ADAPT + if (btr_search_sys) { + btr_search_sys_free(); + } +#endif /* BTR_CUR_HASH_ADAPT */ /* 3. Free all InnoDB's own mutexes and the os_fast_mutexes inside them */ os_aio_free(); - que_close(); row_mysql_close(); srv_free(); fil_close(); @@ -2852,7 +2896,10 @@ innobase_shutdown_for_mysql(void) pars_lexer_close(); log_mem_free(); - buf_pool_free(srv_buf_pool_instances); + ut_ad(buf_pool_ptr || !srv_was_started); + if (buf_pool_ptr) { + buf_pool_free(srv_buf_pool_instances); + } /* 6. Free the thread management resoruces. */ os_thread_free(); @@ -2864,15 +2911,14 @@ innobase_shutdown_for_mysql(void) fclose(dict_foreign_err_file); } - if (srv_print_verbose_log) { + if (srv_was_started && srv_print_verbose_log) { ib::info() << "Shutdown completed; log sequence number " << srv_shutdown_lsn; } + srv_start_state = SRV_START_STATE_NONE; srv_was_started = FALSE; srv_start_has_been_called = FALSE; - - return(DB_SUCCESS); } /******************************************************************** @@ -2985,36 +3031,3 @@ srv_get_meta_data_filename( ut_free(path); } -/** Get the encryption-data filename from the table name for a -single-table tablespace. -@param[in] table table object -@param[out] filename filename -@param[in] max_len filename max length */ -void -srv_get_encryption_data_filename( - dict_table_t* table, - char* filename, - ulint max_len) -{ - ulint len; - char* path; - /* Make sure the data_dir_path is set. */ - dict_get_and_save_data_dir_path(table, false); - - if (DICT_TF_HAS_DATA_DIR(table->flags)) { - ut_a(table->data_dir_path); - - path = fil_make_filepath( - table->data_dir_path, table->name.m_name, CFP, true); - } else { - path = fil_make_filepath(NULL, table->name.m_name, CFP, false); - } - - ut_a(path); - len = ut_strlen(path); - ut_a(max_len >= len); - - strcpy(filename, path); - - ut_free(path); -} diff --git a/storage/innobase/sync/sync0arr.cc b/storage/innobase/sync/sync0arr.cc index f01149f8a8d..1b561dc3297 100644 --- a/storage/innobase/sync/sync0arr.cc +++ b/storage/innobase/sync/sync0arr.cc @@ -2,7 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. -Copyright (c) 2013, 2015, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -117,7 +117,7 @@ struct sync_cell_t { const char* file; /*!< in debug version file where requested */ ulint line; /*!< in debug version line where - requested */ + requested, or ULINT_UNDEFINED */ os_thread_id_t thread_id; /*!< thread id of this waiting thread */ bool waiting; /*!< TRUE if the thread has already @@ -213,24 +213,16 @@ sync_array_t::sync_array_t(ulint num_cells) UNIV_NOTHROW : n_reserved(), - n_cells(), - array(), + n_cells(num_cells), + array(UT_NEW_ARRAY_NOKEY(sync_cell_t, num_cells)), mutex(), res_count(), next_free_slot(), - first_free_slot() + first_free_slot(ULINT_UNDEFINED) { ut_a(num_cells > 0); - array = UT_NEW_ARRAY_NOKEY(sync_cell_t, num_cells); - - ulint sz = sizeof(sync_cell_t) * num_cells; - - memset(array, 0x0, sz); - - n_cells = num_cells; - - first_free_slot = ULINT_UNDEFINED; + memset(array, 0x0, sizeof(sync_cell_t) * n_cells); /* Then create the mutex to protect the wait array */ mutex_create(LATCH_ID_SYNC_ARRAY_MUTEX, &mutex); @@ -344,7 +336,7 @@ sync_array_reserve_cell( void* object, /*!< in: pointer to the object to wait for */ ulint type, /*!< in: lock request type */ const char* file, /*!< in: file where requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { sync_cell_t* cell; @@ -604,15 +596,15 @@ sync_array_cell_print( fprintf(file, "number of readers %lu, waiters flag %lu," " lock_word: %lx\n" - "Last time read locked in file %s line %lu\n" - "Last time write locked in file %s line %lu\n", + "Last time read locked in file %s line %u\n" + "Last time write locked in file %s line %u\n", (ulint) rw_lock_get_reader_count(rwlock), (ulint) rwlock->waiters, rwlock->lock_word, innobase_basename(rwlock->last_s_file_name), - (ulint) rwlock->last_s_line, + rwlock->last_s_line, rwlock->last_x_file_name, - (ulint) rwlock->last_x_line); + rwlock->last_x_line); /* JAN: TODO: FIX LATER fprintf(file, @@ -1339,8 +1331,9 @@ sync_arr_fill_sys_semphore_waits_table( (longlong)os_thread_pf(cell->thread))); */ OK(field_store_string(fields[SYS_SEMAPHORE_WAITS_FILE], innobase_basename(cell->file))); - OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_LINE], cell->line)); - OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_WAIT_TIME], (longlong)difftime(time(NULL), cell->reservation_time))); + OK(fields[SYS_SEMAPHORE_WAITS_LINE]->store(cell->line, true)); + fields[SYS_SEMAPHORE_WAITS_LINE]->set_notnull(); + OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_WAIT_TIME], (ulint)difftime(time(NULL), cell->reservation_time))); if (type == SYNC_MUTEX) { mutex = static_cast(cell->latch.mutex); @@ -1352,13 +1345,16 @@ sync_arr_fill_sys_semphore_waits_table( OK(field_store_string(fields[SYS_SEMAPHORE_WAITS_WAIT_TYPE], "MUTEX")); //OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_HOLDER_THREAD_ID], (longlong)mutex->thread_id)); //OK(field_store_string(fields[SYS_SEMAPHORE_WAITS_HOLDER_FILE], innobase_basename(mutex->file_name))); - //OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_HOLDER_LINE], mutex->line)); + //OK(fields[SYS_SEMAPHORE_WAITS_HOLDER_LINE]->store(mutex->line, true)); + //fields[SYS_SEMAPHORE_WAITS_HOLDER_LINE]->set_notnull(); //OK(field_store_string(fields[SYS_SEMAPHORE_WAITS_CREATED_FILE], innobase_basename(mutex->cfile_name))); - //OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_CREATED_LINE], mutex->cline)); + //OK(fields[SYS_SEMAPHORE_WAITS_CREATED_LINE]->store(mutex->cline, true)); + //fields[SYS_SEMAPHORE_WAITS_CREATED_LINE]->set_notnull(); //OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_WAITERS_FLAG], (longlong)mutex->waiters)); //OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_LOCK_WORD], (longlong)mutex->lock_word)); //OK(field_store_string(fields[SYS_SEMAPHORE_WAITS_LAST_WRITER_FILE], innobase_basename(mutex->file_name))); - //OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_LAST_WRITER_LINE], mutex->line)); + //OK(fields[SYS_SEMAPHORE_WAITS_LAST_WRITER_LINE]->store(mutex->line, true)); + //fields[SYS_SEMAPHORE_WAITS_LAST_WRITER_LINE]->set_notnull(); //OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_OS_WAIT_COUNT], mutex->count_os_wait)); } } else if (type == RW_LOCK_X_WAIT @@ -1398,14 +1394,17 @@ sync_arr_fill_sys_semphore_waits_table( //OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_HOLDER_THREAD_ID], (longlong)rwlock->thread_id)); //OK(field_store_string(fields[SYS_SEMAPHORE_WAITS_HOLDER_FILE], innobase_basename(rwlock->file_name))); - //OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_HOLDER_LINE], rwlock->line)); + //OK(fields[SYS_SEMAPHORE_WAITS_HOLDER_LINE]->store(rwlock->line, true)); + //fields[SYS_SEMAPHORE_WAITS_HOLDER_LINE]->set_notnull(); OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_READERS], rw_lock_get_reader_count(rwlock))); OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_WAITERS_FLAG], (longlong)rwlock->waiters)); OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_LOCK_WORD], (longlong)rwlock->lock_word)); OK(field_store_string(fields[SYS_SEMAPHORE_WAITS_LAST_READER_FILE], innobase_basename(rwlock->last_s_file_name))); - OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_LAST_READER_LINE], rwlock->last_s_line)); + OK(fields[SYS_SEMAPHORE_WAITS_LAST_READER_LINE]->store(rwlock->last_s_line, true)); + fields[SYS_SEMAPHORE_WAITS_LAST_READER_LINE]->set_notnull(); OK(field_store_string(fields[SYS_SEMAPHORE_WAITS_LAST_WRITER_FILE], innobase_basename(rwlock->last_x_file_name))); - OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_LAST_WRITER_LINE], rwlock->last_x_line)); + OK(fields[SYS_SEMAPHORE_WAITS_LAST_WRITER_LINE]->store(rwlock->last_x_line, true)); + fields[SYS_SEMAPHORE_WAITS_LAST_WRITER_LINE]->set_notnull(); OK(field_store_ulint(fields[SYS_SEMAPHORE_WAITS_OS_WAIT_COUNT], rwlock->count_os_wait)); } } diff --git a/storage/innobase/sync/sync0debug.cc b/storage/innobase/sync/sync0debug.cc index c9b37cbbb09..1d9e8933185 100644 --- a/storage/innobase/sync/sync0debug.cc +++ b/storage/innobase/sync/sync0debug.cc @@ -1544,8 +1544,6 @@ sync_latch_meta_init() LATCH_ADD(SYNC_DEBUG_MUTEX, SYNC_NO_ORDER_CHECK, PFS_NOT_INSTRUMENTED); - LATCH_ADD(MASTER_KEY_ID_MUTEX, SYNC_NO_ORDER_CHECK, master_key_id_mutex_key); - /* JAN: TODO: Add PFS instrumentation */ LATCH_ADD(SCRUB_STAT_MUTEX, SYNC_NO_ORDER_CHECK, PFS_NOT_INSTRUMENTED); LATCH_ADD(DEFRAGMENT_MUTEX, SYNC_NO_ORDER_CHECK, PFS_NOT_INSTRUMENTED); diff --git a/storage/innobase/sync/sync0rw.cc b/storage/innobase/sync/sync0rw.cc index 5f617ae22f5..497f7f3f9e9 100644 --- a/storage/innobase/sync/sync0rw.cc +++ b/storage/innobase/sync/sync0rw.cc @@ -2,6 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. +Copyright (c) 2017, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -202,9 +203,8 @@ rw_lock_create_func( #ifdef UNIV_DEBUG latch_level_t level, /*!< in: level */ #endif /* UNIV_DEBUG */ - const char* cmutex_name, /*!< in: mutex name */ const char* cfile_name, /*!< in: file name where created */ - ulint cline) /*!< in: file line where created */ + unsigned cline) /*!< in: file line where created */ { #if defined(UNIV_DEBUG) && !defined(UNIV_PFS_RWLOCK) /* It should have been created in pfs_rw_lock_create_func() */ @@ -237,11 +237,8 @@ rw_lock_create_func( split the source file anyway. Or create the locks on lines less than 8192. cline is unsigned:13. */ ut_ad(cline <= 8192); - lock->cline = (unsigned int) cline; - lock->lock_name = cmutex_name; + lock->cline = cline; lock->count_os_wait = 0; - lock->file_name = "not yet reserved"; - lock->line = 0; lock->last_s_file_name = "not yet reserved"; lock->last_x_file_name = "not yet reserved"; lock->last_s_line = 0; @@ -299,7 +296,7 @@ rw_lock_s_lock_spin( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name, /*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { ulint i = 0; /* spin round count */ sync_array_t* sync_arr; @@ -429,7 +426,7 @@ rw_lock_x_lock_wait_func( #endif lint threshold,/*!< in: threshold to wait for */ const char* file_name,/*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { ulint i = 0; ulint n_spins = 0; @@ -479,12 +476,6 @@ rw_lock_x_lock_wait_func( ut_d(rw_lock_remove_debug_info( lock, pass, RW_LOCK_X_WAIT)); - if (srv_instrument_semaphores) { - lock->thread_id = os_thread_get_curr_id(); - lock->file_name = file_name; - lock->line = line; - } - /* It is possible to wake when lock_word < 0. We must pass the while-loop check to proceed.*/ @@ -498,7 +489,7 @@ rw_lock_x_lock_wait_func( rw_lock_stats.rw_x_spin_round_count.add(n_spins); if (count_os_wait > 0) { - lock->count_os_wait += count_os_wait; + lock->count_os_wait += static_cast(count_os_wait); rw_lock_stats.rw_x_os_wait_count.add(count_os_wait); } @@ -530,7 +521,7 @@ rw_lock_x_lock_low( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { if (rw_lock_lock_word_decr(lock, X_LOCK_DECR, X_LOCK_HALF_DECR)) { @@ -587,15 +578,8 @@ rw_lock_x_lock_low( ut_d(rw_lock_add_debug_info(lock, pass, RW_LOCK_X, file_name, line)); - - if (srv_instrument_semaphores) { - lock->thread_id = os_thread_get_curr_id(); - lock->file_name = file_name; - lock->line = line; - } - lock->last_x_file_name = file_name; - lock->last_x_line = (unsigned int) line; + lock->last_x_line = line; return(TRUE); } @@ -610,7 +594,7 @@ rw_lock_sx_lock_low( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { if (rw_lock_lock_word_decr(lock, X_LOCK_HALF_DECR, X_LOCK_HALF_DECR)) { @@ -669,7 +653,7 @@ rw_lock_sx_lock_low( ut_d(rw_lock_add_debug_info(lock, pass, RW_LOCK_SX, file_name, line)); lock->last_x_file_name = file_name; - lock->last_x_line = (unsigned int) line; + lock->last_x_line = line; return(TRUE); } @@ -690,7 +674,7 @@ rw_lock_x_lock_func( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { ulint i = 0; sync_array_t* sync_arr; @@ -792,7 +776,7 @@ rw_lock_sx_lock_func( ulint pass, /*!< in: pass value; != 0, if the lock will be passed to another thread to unlock */ const char* file_name,/*!< in: file name where lock requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { ulint i = 0; @@ -945,7 +929,7 @@ rw_lock_add_debug_info( ulint pass, /*!< in: pass value */ ulint lock_type, /*!< in: lock type */ const char* file_name, /*!< in: file where requested */ - ulint line) /*!< in: line where requested */ + unsigned line) /*!< in: line where requested */ { ut_ad(file_name != NULL); diff --git a/storage/innobase/sync/sync0sync.cc b/storage/innobase/sync/sync0sync.cc index 9aba075caa6..099a56c5457 100644 --- a/storage/innobase/sync/sync0sync.cc +++ b/storage/innobase/sync/sync0sync.cc @@ -98,7 +98,6 @@ mysql_pfs_key_t sync_array_mutex_key; mysql_pfs_key_t thread_mutex_key; mysql_pfs_key_t zip_pad_mutex_key; mysql_pfs_key_t row_drop_list_mutex_key; -mysql_pfs_key_t master_key_id_mutex_key; #endif /* UNIV_PFS_MUTEX */ #ifdef UNIV_PFS_RWLOCK mysql_pfs_key_t btr_search_latch_key; diff --git a/storage/innobase/trx/trx0i_s.cc b/storage/innobase/trx/trx0i_s.cc index cf3109c265e..9c5ae4d02da 100644 --- a/storage/innobase/trx/trx0i_s.cc +++ b/storage/innobase/trx/trx0i_s.cc @@ -588,7 +588,9 @@ thd_done: row->trx_foreign_key_error = NULL; } +#ifdef BTR_CUR_HASH_ADAPT row->trx_has_search_latch = (ibool) trx->has_search_latch; +#endif /* BTR_CUR_HASH_ADAPT */ row->trx_is_read_only = trx->read_only; diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index 49c3889c2f1..c522af5d67a 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This 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,7 +58,7 @@ ulong srv_max_purge_lag = 0; ulong srv_max_purge_lag_delay = 0; /** The global data structure coordinating a purge */ -trx_purge_t* purge_sys = NULL; +purge_sys_t* purge_sys; /** A dummy undo record used as a return value when we have a whole undo log which needs no purge */ @@ -72,23 +73,20 @@ bool trx_commit_disallowed = false; const TrxUndoRsegs TrxUndoRsegsIterator::NullElement(UINT64_UNDEFINED); /** Constructor */ -TrxUndoRsegsIterator::TrxUndoRsegsIterator(trx_purge_t* purge_sys) +TrxUndoRsegsIterator::TrxUndoRsegsIterator() : - m_purge_sys(purge_sys), m_trx_undo_rsegs(NullElement), m_iter(m_trx_undo_rsegs.end()) { } -/** Sets the next rseg to purge in m_purge_sys. -@return page size of the table for which the log is. -NOTE: if rseg is NULL when this function returns this means that -there are no rollback segments to purge and then the returned page -size object should not be used. */ -const page_size_t +/** Sets the next rseg to purge in purge_sys. +@return whether anything is to be purged */ +inline +bool TrxUndoRsegsIterator::set_next() { - mutex_enter(&m_purge_sys->pq_mutex); + mutex_enter(&purge_sys->pq_mutex); /* Only purge consumes events from the priority queue, user threads only produce the events. */ @@ -102,9 +100,9 @@ TrxUndoRsegsIterator::set_next() number shouldn't increase. Undo increment of expected trx_no done by caller assuming rollback segments from given transaction are done. */ - m_purge_sys->iter.trx_no = (*m_iter)->last_trx_no; + purge_sys->iter.trx_no = (*m_iter)->last_trx_no; - } else if (!m_purge_sys->purge_queue->empty()) { + } else if (!purge_sys->purge_queue.empty()) { /* Read the next element from the queue. Combine elements if they have same transaction number. @@ -114,20 +112,21 @@ TrxUndoRsegsIterator::set_next() rollback segment for purge. */ m_trx_undo_rsegs = NullElement; - while (!m_purge_sys->purge_queue->empty()) { + purge_pq_t& purge_queue = purge_sys->purge_queue; + + while (!purge_queue.empty()) { if (m_trx_undo_rsegs.get_trx_no() == UINT64_UNDEFINED) { - m_trx_undo_rsegs = - purge_sys->purge_queue->top(); - } else if (purge_sys->purge_queue->top().get_trx_no() == + m_trx_undo_rsegs = purge_queue.top(); + } else if (purge_queue.top().get_trx_no() == m_trx_undo_rsegs.get_trx_no()) { m_trx_undo_rsegs.append( - purge_sys->purge_queue->top()); + purge_queue.top()); } else { break; } - m_purge_sys->purge_queue->pop(); + purge_queue.pop(); } m_iter = m_trx_undo_rsegs.begin(); @@ -137,173 +136,111 @@ TrxUndoRsegsIterator::set_next() m_trx_undo_rsegs = NullElement; m_iter = m_trx_undo_rsegs.end(); - mutex_exit(&m_purge_sys->pq_mutex); + mutex_exit(&purge_sys->pq_mutex); - m_purge_sys->rseg = NULL; - - /* return a dummy object, not going to be used by the caller */ - return(univ_page_size); + purge_sys->rseg = NULL; + return false; } - m_purge_sys->rseg = *m_iter++; + purge_sys->rseg = *m_iter++; - mutex_exit(&m_purge_sys->pq_mutex); + mutex_exit(&purge_sys->pq_mutex); - ut_a(m_purge_sys->rseg != NULL); + ut_a(purge_sys->rseg != NULL); - mutex_enter(&m_purge_sys->rseg->mutex); + mutex_enter(&purge_sys->rseg->mutex); - ut_a(m_purge_sys->rseg->last_page_no != FIL_NULL); - ut_ad(m_purge_sys->rseg->last_trx_no == m_trx_undo_rsegs.get_trx_no()); + ut_a(purge_sys->rseg->last_page_no != FIL_NULL); + ut_ad(purge_sys->rseg->last_trx_no == m_trx_undo_rsegs.get_trx_no()); /* We assume in purge of externally stored fields that space id is in the range of UNDO tablespace space ids unless space is system tablespace */ - ut_a(m_purge_sys->rseg->space <= srv_undo_tablespaces_open + ut_a(purge_sys->rseg->space <= srv_undo_tablespaces_open || is_system_tablespace( - m_purge_sys->rseg->space)); - - const page_size_t page_size(m_purge_sys->rseg->page_size); + purge_sys->rseg->space)); ut_a(purge_sys->iter.trx_no <= purge_sys->rseg->last_trx_no); - m_purge_sys->iter.trx_no = m_purge_sys->rseg->last_trx_no; - m_purge_sys->hdr_offset = m_purge_sys->rseg->last_offset; - m_purge_sys->hdr_page_no = m_purge_sys->rseg->last_page_no; + purge_sys->iter.trx_no = purge_sys->rseg->last_trx_no; + purge_sys->hdr_offset = purge_sys->rseg->last_offset; + purge_sys->hdr_page_no = purge_sys->rseg->last_page_no; - mutex_exit(&m_purge_sys->rseg->mutex); + mutex_exit(&purge_sys->rseg->mutex); - return(page_size); + return(true); } -/****************************************************************//** -Builds a purge 'query' graph. The actual purge is performed by executing +/** Build a purge 'query' graph. The actual purge is performed by executing this query graph. +@param[in,out] sess the purge session @return own: the query graph */ static que_t* -trx_purge_graph_build( -/*==================*/ - trx_t* trx, /*!< in: transaction */ - ulint n_purge_threads) /*!< in: number of purge - threads */ +trx_purge_graph_build(sess_t* sess) { - ulint i; - mem_heap_t* heap; - que_fork_t* fork; + ut_a(srv_n_purge_threads > 0); + /* A purge transaction is not a real transaction, we use a transaction + here only because the query threads code requires it. It is otherwise + quite unnecessary. We should get rid of it eventually. */ + trx_t* trx = sess->trx; - heap = mem_heap_create(512); - fork = que_fork_create(NULL, NULL, QUE_FORK_PURGE, heap); + ut_ad(trx->sess == sess); + + trx->id = 0; + trx->start_time = ut_time(); + trx->state = TRX_STATE_ACTIVE; + trx->op_info = "purge trx"; + + mem_heap_t* heap = mem_heap_create(512); + que_fork_t* fork = que_fork_create( + NULL, NULL, QUE_FORK_PURGE, heap); fork->trx = trx; - for (i = 0; i < n_purge_threads; ++i) { - que_thr_t* thr; - - thr = que_thr_create(fork, heap, NULL); - + for (ulint i = 0; i < srv_n_purge_threads; ++i) { + que_thr_t* thr = que_thr_create(fork, heap, NULL); thr->child = row_purge_node_create(thr, heap); } return(fork); } -/********************************************************************//** -Creates the global purge system control structure and inits the history -mutex. */ -void -trx_purge_sys_create( -/*=================*/ - ulint n_purge_threads, /*!< in: number of purge - threads */ - purge_pq_t* purge_queue) /*!< in, own: UNDO log min - binary heap */ -{ - purge_sys = static_cast( - ut_zalloc_nokey(sizeof(*purge_sys))); - - purge_sys->state = PURGE_STATE_INIT; - purge_sys->event = os_event_create(0); - - new (&purge_sys->iter) purge_iter_t; - new (&purge_sys->limit) purge_iter_t; - new (&purge_sys->undo_trunc) undo::Truncate; +/** Construct the purge system. */ +purge_sys_t::purge_sys_t() + : sess(sess_open()), latch(), event(os_event_create(0)), + n_stop(0), running(false), state(PURGE_STATE_INIT), + query(trx_purge_graph_build(sess)), + view(), n_submitted(0), n_completed(0), + iter(), limit(), #ifdef UNIV_DEBUG - new (&purge_sys->done) purge_iter_t; + done(), #endif /* UNIV_DEBUG */ - - /* Take ownership of purge_queue, we are responsible for freeing it. */ - purge_sys->purge_queue = purge_queue; - - rw_lock_create(trx_purge_latch_key, - &purge_sys->latch, SYNC_PURGE_LATCH); - - mutex_create(LATCH_ID_PURGE_SYS_PQ, &purge_sys->pq_mutex); - - ut_a(n_purge_threads > 0); - - purge_sys->sess = sess_open(); - - purge_sys->trx = purge_sys->sess->trx; - - ut_a(purge_sys->trx->sess == purge_sys->sess); - - /* A purge transaction is not a real transaction, we use a transaction - here only because the query threads code requires it. It is otherwise - quite unnecessary. We should get rid of it eventually. */ - purge_sys->trx->id = 0; - purge_sys->trx->start_time = ut_time(); - purge_sys->trx->state = TRX_STATE_ACTIVE; - purge_sys->trx->op_info = "purge trx"; - - purge_sys->query = trx_purge_graph_build( - purge_sys->trx, n_purge_threads); - - new(&purge_sys->view) ReadView(); - - trx_sys->mvcc->clone_oldest_view(&purge_sys->view); - - purge_sys->view_active = true; - - purge_sys->rseg_iter = UT_NEW_NOKEY(TrxUndoRsegsIterator(purge_sys)); + next_stored(false), rseg(NULL), + page_no(0), offset(0), hdr_page_no(0), hdr_offset(0), + rseg_iter(), purge_queue(), pq_mutex(), undo_trunc() +{ + ut_ad(!purge_sys); + rw_lock_create(trx_purge_latch_key, &latch, SYNC_PURGE_LATCH); + mutex_create(LATCH_ID_PURGE_SYS_PQ, &pq_mutex); } -/************************************************************************ -Frees the global purge system control structure. */ -void -trx_purge_sys_close(void) -/*======================*/ +/** Destruct the purge system. */ +purge_sys_t::~purge_sys_t() { - que_graph_free(purge_sys->query); + ut_ad(this == purge_sys); - ut_a(purge_sys->trx->id == 0); - ut_a(purge_sys->sess->trx == purge_sys->trx); - - purge_sys->trx->state = TRX_STATE_NOT_STARTED; - - sess_close(purge_sys->sess); - - purge_sys->sess = NULL; - - purge_sys->view.close(); - purge_sys->view.~ReadView(); - - rw_lock_free(&purge_sys->latch); - mutex_free(&purge_sys->pq_mutex); - - if (purge_sys->purge_queue != NULL) { - UT_DELETE(purge_sys->purge_queue); - purge_sys->purge_queue = NULL; - } - - os_event_destroy(purge_sys->event); - - purge_sys->event = NULL; - - UT_DELETE(purge_sys->rseg_iter); - - ut_free(purge_sys); - - purge_sys = NULL; + que_graph_free(query); + ut_a(sess->trx->id == 0); + sess->trx->state = TRX_STATE_NOT_STARTED; + sess_close(sess); + view.close(); + rw_lock_free(&latch); + /* rw_lock_free() already called latch.~rw_lock_t(); tame the + debug assertions when the destructor will be called once more. */ + ut_ad(latch.magic_n == 0); + ut_d(latch.magic_n = RW_LOCK_MAGIC_N); + mutex_free(&pq_mutex); + os_event_destroy(event); } /*================ UNDO LOG HISTORY LIST =============================*/ @@ -332,9 +269,7 @@ trx_purge_add_update_undo_to_history( undo = undo_ptr->update_undo; rseg = undo->rseg; - rseg_header = trx_rsegf_get( - undo->rseg->space, undo->rseg->page_no, undo->rseg->page_size, - mtr); + rseg_header = trx_rsegf_get(rseg->space, rseg->page_no, mtr); undo_header = undo_page + undo->hdr_offset; @@ -395,19 +330,33 @@ trx_purge_add_update_undo_to_history( } } -/**********************************************************************//** -Frees an undo log segment which is in the history list. Cuts the end of the -history list at the youngest undo log in this segment. */ +/** Remove undo log header from the history list. +@param[in,out] rseg_hdr rollback segment header +@param[in] log_hdr undo log segment header +@param[in,out] mtr mini transaction. */ +static +void +trx_purge_remove_log_hdr( + trx_rsegf_t* rseg_hdr, + trx_ulogf_t* log_hdr, + mtr_t* mtr) +{ + flst_remove(rseg_hdr + TRX_RSEG_HISTORY, + log_hdr + TRX_UNDO_HISTORY_NODE, mtr); + my_atomic_addlint(&trx_sys->rseg_history_len, -1); +} + +/** Frees an undo log segment which is in the history list. Removes the +undo log hdr from the history list. +@param[in,out] rseg rollback segment +@param[in] hdr_addr file address of log_hdr +@param[in] noredo skip redo logging. */ static void trx_purge_free_segment( -/*===================*/ - trx_rseg_t* rseg, /*!< in: rollback segment */ - fil_addr_t hdr_addr, /*!< in: the file address of log_hdr */ - ulint n_removed_logs, /*!< in: count of how many undo logs we - will cut off from the end of the - history list */ - bool noredo) /*!< in: skip redo logging */ + trx_rseg_t* rseg, + fil_addr_t hdr_addr, + bool noredo) { mtr_t mtr; trx_rsegf_t* rseg_hdr; @@ -428,12 +377,10 @@ trx_purge_free_segment( mutex_enter(&rseg->mutex); - rseg_hdr = trx_rsegf_get( - rseg->space, rseg->page_no, rseg->page_size, &mtr); + rseg_hdr = trx_rsegf_get(rseg->space, rseg->page_no, &mtr); undo_page = trx_undo_page_get( - page_id_t(rseg->space, hdr_addr.page), rseg->page_size, - &mtr); + page_id_t(rseg->space, hdr_addr.page), &mtr); seg_hdr = undo_page + TRX_UNDO_SEG_HDR; log_hdr = undo_page + hdr_addr.boffset; @@ -473,10 +420,7 @@ trx_purge_free_segment( history list: otherwise, in case of a database crash, the segment could become inaccessible garbage in the file space. */ - flst_cut_end(rseg_hdr + TRX_RSEG_HISTORY, - log_hdr + TRX_UNDO_HISTORY_NODE, n_removed_logs, &mtr); - - my_atomic_addlint(&trx_sys->rseg_history_len, -n_removed_logs); + trx_purge_remove_log_hdr(rseg_hdr, log_hdr, &mtr); do { @@ -518,7 +462,6 @@ trx_purge_truncate_rseg_history( page_t* undo_page; trx_ulogf_t* log_hdr; trx_usegf_t* seg_hdr; - ulint n_removed_logs = 0; mtr_t mtr; trx_id_t undo_trx_no; const bool noredo = trx_sys_is_noredo_rseg_slot( @@ -530,8 +473,7 @@ trx_purge_truncate_rseg_history( } mutex_enter(&(rseg->mutex)); - rseg_hdr = trx_rsegf_get(rseg->space, rseg->page_no, - rseg->page_size, &mtr); + rseg_hdr = trx_rsegf_get(rseg->space, rseg->page_no, &mtr); hdr_addr = trx_purge_get_log_from_hist( flst_get_last(rseg_hdr + TRX_RSEG_HISTORY, &mtr)); @@ -546,7 +488,7 @@ loop: } undo_page = trx_undo_page_get(page_id_t(rseg->space, hdr_addr.page), - rseg->page_size, &mtr); + &mtr); log_hdr = undo_page + hdr_addr.boffset; @@ -565,13 +507,6 @@ loop: hdr_addr.boffset, limit->undo_no); } - my_atomic_addlint( - &trx_sys->rseg_history_len, -n_removed_logs); - - flst_truncate_end(rseg_hdr + TRX_RSEG_HISTORY, - log_hdr + TRX_UNDO_HISTORY_NODE, - n_removed_logs, &mtr); - mutex_exit(&(rseg->mutex)); mtr_commit(&mtr); @@ -580,7 +515,6 @@ loop: prev_hdr_addr = trx_purge_get_log_from_hist( flst_get_prev_addr(log_hdr + TRX_UNDO_HISTORY_NODE, &mtr)); - n_removed_logs++; seg_hdr = undo_page + TRX_UNDO_SEG_HDR; @@ -592,10 +526,13 @@ loop: mutex_exit(&(rseg->mutex)); mtr_commit(&mtr); - trx_purge_free_segment(rseg, hdr_addr, n_removed_logs, noredo); - - n_removed_logs = 0; + /* calls the trx_purge_remove_log_hdr() + inside trx_purge_free_segment(). */ + trx_purge_free_segment(rseg, hdr_addr, noredo); } else { + /* Remove the log hdr from the rseg history. */ + trx_purge_remove_log_hdr(rseg_hdr, log_hdr, &mtr); + mutex_exit(&(rseg->mutex)); mtr_commit(&mtr); } @@ -606,8 +543,7 @@ loop: } mutex_enter(&(rseg->mutex)); - rseg_hdr = trx_rsegf_get(rseg->space, rseg->page_no, - rseg->page_size, &mtr); + rseg_hdr = trx_rsegf_get(rseg->space, rseg->page_no, &mtr); hdr_addr = prev_hdr_addr; @@ -698,8 +634,6 @@ namespace undo { IORequest request(IORequest::WRITE); - request.disable_compression(); - err = os_file_write( request, log_file_name, handle, log_buf, 0, sz); @@ -763,8 +697,6 @@ namespace undo { IORequest request(IORequest::WRITE); - request.disable_compression(); - err = os_file_write( request, log_file_name, handle, log_buf, 0, sz); @@ -832,8 +764,6 @@ namespace undo { IORequest request(IORequest::READ); - request.disable_compression(); - dberr_t err; err = os_file_read(request, handle, log_buf, 0, sz); @@ -928,10 +858,9 @@ trx_purge_mark_undo_for_truncate( return; } -#ifdef UNIV_DEBUG - ib::info() << "UNDO tablespace with space identifier " - << undo_trunc->get_marked_space_id() << " marked for truncate"; -#endif /* UNIV_DEBUG */ + DBUG_LOG("undo", + "marking for truncate UNDO tablespace " + << undo_trunc->get_marked_space_id()); /* Step-3: Iterate over all the rsegs of selected UNDO tablespace and mark them temporarily unavailable for allocation.*/ @@ -968,11 +897,11 @@ trx_purge_cleanse_purge_queue( /* Remove rseg instances that are in the purge queue before we start truncate of corresponding UNDO truncate. */ - while (!purge_sys->purge_queue->empty()) { - purge_elem_list.push_back(purge_sys->purge_queue->top()); - purge_sys->purge_queue->pop(); + while (!purge_sys->purge_queue.empty()) { + purge_elem_list.push_back(purge_sys->purge_queue.top()); + purge_sys->purge_queue.pop(); } - ut_ad(purge_sys->purge_queue->empty()); + ut_ad(purge_sys->purge_queue.empty()); for (purge_elem_list_t::iterator it = purge_elem_list.begin(); it != purge_elem_list.end(); @@ -989,12 +918,11 @@ trx_purge_cleanse_purge_queue( } } - const ulint size = it->size(); - if (size != 0) { + if (it->size()) { /* size != 0 suggest that there exist other rsegs that needs processing so add this element to purge queue. Note: Other rseg could be non-redo rsegs. */ - purge_sys->purge_queue->push(*it); + purge_sys->purge_queue.push(*it); } } mutex_exit(&purge_sys->pq_mutex); @@ -1148,7 +1076,7 @@ trx_purge_initiate_truncate( purge_batch_size that can force the purge loop to exit before all the records are purged and in this case purge_sys->rseg could point to a valid rseg waiting for next purge cycle. */ - purge_sys->next_stored = FALSE; + purge_sys->next_stored = false; purge_sys->rseg = NULL; } @@ -1209,15 +1137,6 @@ trx_purge_truncate_history( } } - for (i = 0; i < TRX_SYS_N_RSEGS; ++i) { - trx_rseg_t* rseg = trx_sys->pending_purge_rseg_array[i]; - - if (rseg != NULL) { - ut_a(rseg->id == i); - trx_purge_truncate_rseg_history(rseg, limit); - } - } - /* UNDO tablespace truncate. We will try to truncate as much as we can (greedy approach). This will ensure when the server is idle we try and truncate all the UNDO tablespaces. */ @@ -1253,13 +1172,12 @@ trx_purge_rseg_get_next_history_log( purge_sys->iter.trx_no = rseg->last_trx_no + 1; purge_sys->iter.undo_no = 0; purge_sys->iter.undo_rseg_space = ULINT_UNDEFINED; - purge_sys->next_stored = FALSE; + purge_sys->next_stored = false; mtr_start(&mtr); undo_page = trx_undo_page_get_s_latched( - page_id_t(rseg->space, rseg->last_page_no), - rseg->page_size, &mtr); + page_id_t(rseg->space, rseg->last_page_no), &mtr); log_hdr = undo_page + rseg->last_offset; @@ -1311,7 +1229,7 @@ trx_purge_rseg_get_next_history_log( log_hdr = trx_undo_page_get_s_latched(page_id_t(rseg->space, prev_log_addr.page), - rseg->page_size, &mtr) + &mtr) + prev_log_addr.boffset; trx_no = mach_read_from_8(log_hdr + TRX_UNDO_TRX_NO); @@ -1337,21 +1255,17 @@ trx_purge_rseg_get_next_history_log( mutex_enter(&purge_sys->pq_mutex); - purge_sys->purge_queue->push(elem); + purge_sys->purge_queue.push(elem); mutex_exit(&purge_sys->pq_mutex); mutex_exit(&rseg->mutex); } -/** Position the purge sys "iterator" on the undo record to use for purging. -@param[in,out] purge_sys purge instance -@param[in] page_size page size */ +/** Position the purge sys "iterator" on the undo record to use for purging. */ static void -trx_purge_read_undo_rec( - trx_purge_t* purge_sys, - const page_size_t& page_size) +trx_purge_read_undo_rec() { ulint offset; ulint page_no; @@ -1369,7 +1283,6 @@ trx_purge_read_undo_rec( undo_rec = trx_undo_get_first_rec( purge_sys->rseg->space, - page_size, purge_sys->hdr_page_no, purge_sys->hdr_offset, RW_S_LATCH, &mtr); @@ -1396,7 +1309,7 @@ trx_purge_read_undo_rec( purge_sys->iter.undo_no = undo_no; purge_sys->iter.undo_rseg_space = undo_rseg_space; - purge_sys->next_stored = TRUE; + purge_sys->next_stored = true; } /***********************************************************************//** @@ -1409,12 +1322,10 @@ void trx_purge_choose_next_log(void) /*===========================*/ { - ut_ad(purge_sys->next_stored == FALSE); + ut_ad(!purge_sys->next_stored); - const page_size_t& page_size = purge_sys->rseg_iter->set_next(); - - if (purge_sys->rseg != NULL) { - trx_purge_read_undo_rec(purge_sys, page_size); + if (purge_sys->rseg_iter.set_next()) { + trx_purge_read_undo_rec(); } else { /* There is nothing to do yet. */ os_thread_yield(); @@ -1449,8 +1360,6 @@ trx_purge_get_next_rec( page_no = purge_sys->page_no; offset = purge_sys->offset; - const page_size_t page_size(purge_sys->rseg->page_size); - if (offset == 0) { /* It is the dummy undo log record, which means that there is no need to purge this undo log */ @@ -1468,7 +1377,7 @@ trx_purge_get_next_rec( mtr_start(&mtr); undo_page = trx_undo_page_get_s_latched(page_id_t(space, page_no), - page_size, &mtr); + &mtr); rec = undo_page + offset; @@ -1526,7 +1435,7 @@ trx_purge_get_next_rec( mtr_start(&mtr); undo_page = trx_undo_page_get_s_latched( - page_id_t(space, page_no), page_size, &mtr); + page_id_t(space, page_no), &mtr); rec = undo_page + offset; } else { @@ -1600,7 +1509,7 @@ ulint trx_purge_attach_undo_recs( /*=======================*/ ulint n_purge_threads,/*!< in: number of purge threads */ - trx_purge_t* purge_sys, /*!< in/out: purge instance */ + purge_sys_t* purge_sys, /*!< in/out: purge instance */ ulint batch_size) /*!< in: no. of pages to purge */ { que_thr_t* thr; @@ -1747,7 +1656,7 @@ static void trx_purge_wait_for_workers_to_complete( /*===================================*/ - trx_purge_t* purge_sys) /*!< in: purge instance */ + purge_sys_t* purge_sys) /*!< in: purge instance */ { ulint n_submitted = purge_sys->n_submitted; @@ -1808,13 +1717,7 @@ trx_purge( ut_a(purge_sys->n_submitted == purge_sys->n_completed); rw_lock_x_lock(&purge_sys->latch); - - purge_sys->view_active = false; - trx_sys->mvcc->clone_oldest_view(&purge_sys->view); - - purge_sys->view_active = true; - rw_lock_x_unlock(&purge_sys->latch); #ifdef UNIV_DEBUG @@ -1912,21 +1815,17 @@ void trx_purge_stop(void) /*================*/ { - purge_state_t state; - int64_t sig_count = os_event_reset(purge_sys->event); - ut_a(srv_n_purge_threads > 0); rw_lock_x_lock(&purge_sys->latch); - ut_a(purge_sys->state != PURGE_STATE_INIT); - ut_a(purge_sys->state != PURGE_STATE_EXIT); - ut_a(purge_sys->state != PURGE_STATE_DISABLED); + const int64_t sig_count = os_event_reset(purge_sys->event); + const purge_state_t state = purge_sys->state; + + ut_a(state == PURGE_STATE_RUN || state == PURGE_STATE_STOP); ++purge_sys->n_stop; - state = purge_sys->state; - if (state == PURGE_STATE_RUN) { ib::info() << "Stopping purge"; @@ -1938,18 +1837,14 @@ trx_purge_stop(void) purge_sys->state = PURGE_STATE_STOP; - rw_lock_x_unlock(&purge_sys->latch); - if (state != PURGE_STATE_STOP) { - + rw_lock_x_unlock(&purge_sys->latch); /* Wait for purge coordinator to signal that it is suspended. */ os_event_wait_low(purge_sys->event, sig_count); } else { bool once = true; - rw_lock_x_lock(&purge_sys->latch); - /* Wait for purge to signal that it has actually stopped. */ while (purge_sys->running) { @@ -1986,17 +1881,11 @@ trx_purge_run(void) ut_error; case PURGE_STATE_RUN: - case PURGE_STATE_STOP: + ut_a(!purge_sys->n_stop); break; - } - - if (purge_sys->n_stop > 0) { - - ut_a(purge_sys->state == PURGE_STATE_STOP); - - --purge_sys->n_stop; - - if (purge_sys->n_stop == 0) { + case PURGE_STATE_STOP: + ut_a(purge_sys->n_stop); + if (--purge_sys->n_stop == 0) { ib::info() << "Resuming purge"; @@ -2004,8 +1893,6 @@ trx_purge_run(void) } MONITOR_INC_VALUE(MONITOR_PURGE_RESUME_COUNT, 1); - } else { - ut_a(purge_sys->state == PURGE_STATE_RUN); } rw_lock_x_unlock(&purge_sys->latch); diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc index 25807e7f825..42bd6ce5136 100644 --- a/storage/innobase/trx/trx0rec.cc +++ b/storage/innobase/trx/trx0rec.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation This 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 @@ -1971,7 +1972,7 @@ trx_undo_report_row_operation( page_no = undo->last_page_no; undo_block = buf_page_get_gen( - page_id_t(undo->space, page_no), undo->page_size, RW_X_LATCH, + page_id_t(undo->space, page_no), univ_page_size, RW_X_LATCH, buf_pool_is_obsolete(undo->withdraw_clock) ? NULL : undo->guess_block, BUF_GET, __FILE__, __LINE__, &mtr, &err); @@ -2103,12 +2104,12 @@ err_exit: Copies an undo record to heap. This function can be called if we know that the undo log record exists. @return own: copy of the record */ +static trx_undo_rec_t* trx_undo_get_undo_rec_low( /*======================*/ roll_ptr_t roll_ptr, /*!< in: roll pointer to record */ - mem_heap_t* heap, /*!< in: memory heap where copied */ - bool is_redo_rseg) /*!< in: true if redo rseg. */ + mem_heap_t* heap) /*!< in: memory heap where copied */ { trx_undo_rec_t* undo_rec; ulint rseg_id; @@ -2121,13 +2122,12 @@ trx_undo_get_undo_rec_low( trx_undo_decode_roll_ptr(roll_ptr, &is_insert, &rseg_id, &page_no, &offset); - rseg = trx_rseg_get_on_id(rseg_id, is_redo_rseg); + rseg = trx_rseg_get_on_id(rseg_id); mtr_start(&mtr); undo_page = trx_undo_page_get_s_latched( - page_id_t(rseg->space, page_no), rseg->page_size, - &mtr); + page_id_t(rseg->space, page_no), &mtr); undo_rec = trx_undo_rec_copy(undo_page + offset, heap); @@ -2143,7 +2143,6 @@ Copies an undo record to heap. the roll pointer: it points to an undo log of this transaction @param[in] heap memory heap where copied -@param[in] is_redo_rseg true if redo rseg. @param[in] name table name @param[out] undo_rec own: copy of the record @retval true if the undo log has been @@ -2157,7 +2156,6 @@ trx_undo_get_undo_rec( roll_ptr_t roll_ptr, trx_id_t trx_id, mem_heap_t* heap, - bool is_redo_rseg, const table_name_t& name, trx_undo_rec_t** undo_rec) { @@ -2167,8 +2165,7 @@ trx_undo_get_undo_rec( missing_history = purge_sys->view.changes_visible(trx_id, name); if (!missing_history) { - *undo_rec = trx_undo_get_undo_rec_low( - roll_ptr, heap, is_redo_rseg); + *undo_rec = trx_undo_get_undo_rec_low(roll_ptr, heap); } rw_lock_s_unlock(&purge_sys->latch); @@ -2234,9 +2231,9 @@ trx_undo_prev_version_build( byte* buf; ut_ad(!rw_lock_own(&purge_sys->latch, RW_LOCK_S)); - ut_ad(mtr_memo_contains_page(index_mtr, index_rec, MTR_MEMO_PAGE_S_FIX) - || mtr_memo_contains_page(index_mtr, index_rec, - MTR_MEMO_PAGE_X_FIX)); + ut_ad(mtr_memo_contains_page_flagged(index_mtr, index_rec, + MTR_MEMO_PAGE_S_FIX + | MTR_MEMO_PAGE_X_FIX)); ut_ad(rec_offs_validate(rec, index, offsets)); ut_a(dict_index_is_clust(index)); @@ -2251,17 +2248,11 @@ trx_undo_prev_version_build( rec_trx_id = row_get_rec_trx_id(rec, index, offsets); - /* REDO rollback segment are used only for non-temporary objects. - For temporary objects NON-REDO rollback segments are used. */ - bool is_redo_rseg = - dict_table_is_temporary(index->table) ? false : true; if (trx_undo_get_undo_rec( - roll_ptr, rec_trx_id, heap, is_redo_rseg, - index->table->name, &undo_rec)) { + roll_ptr, rec_trx_id, heap, index->table->name, &undo_rec)) { if (v_status & TRX_UNDO_PREV_IN_PURGE) { /* We are fetching the record being purged */ - undo_rec = trx_undo_get_undo_rec_low( - roll_ptr, heap, is_redo_rseg); + undo_rec = trx_undo_get_undo_rec_low(roll_ptr, heap); } else { /* The undo record may already have been purged, during purge or semi-consistent read. */ diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc index dc779fefc58..838eb8e7835 100644 --- a/storage/innobase/trx/trx0roll.cc +++ b/storage/innobase/trx/trx0roll.cc @@ -930,8 +930,7 @@ trx_roll_pop_top_rec( ut_ad(mutex_own(&trx->undo_mutex)); page_t* undo_page = trx_undo_page_get_s_latched( - page_id_t(undo->space, undo->top_page_no), - undo->page_size, mtr); + page_id_t(undo->space, undo->top_page_no), mtr); ulint offset = undo->top_offset; diff --git a/storage/innobase/trx/trx0rseg.cc b/storage/innobase/trx/trx0rseg.cc index d5520b783b1..9fcc10ec975 100644 --- a/storage/innobase/trx/trx0rseg.cc +++ b/storage/innobase/trx/trx0rseg.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,7 +43,6 @@ Created 3/26/1996 Heikki Tuuri This function is called only when a new rollback segment is created in the database. @param[in] space space id -@param[in] page_size page size @param[in] max_size max size in pages @param[in] rseg_slot_no rseg id == slot number in trx sys @param[in,out] mtr mini-transaction @@ -50,7 +50,6 @@ the database. ulint trx_rseg_header_create( ulint space, - const page_size_t& page_size, ulint max_size, ulint rseg_slot_no, mtr_t* mtr) @@ -79,7 +78,7 @@ trx_rseg_header_create( page_no = block->page.id.page_no(); /* Get the rollback segment file page */ - rsegf = trx_rsegf_get_new(space, page_no, page_size, mtr); + rsegf = trx_rsegf_get_new(space, page_no, mtr); /* Initialize max size field */ mlog_write_ulint(rsegf + TRX_RSEG_MAX_SIZE, max_size, @@ -116,14 +115,9 @@ trx_rseg_header_create( return(page_no); } -/***********************************************************************//** -Free's an instance of the rollback segment in memory. */ +/** Free a rollback segment in memory. */ void -trx_rseg_mem_free( -/*==============*/ - trx_rseg_t* rseg, /* in, own: instance to free */ - trx_rseg_t** rseg_array) /*!< out: add rseg reference to this - central array. */ +trx_rseg_mem_free(trx_rseg_t* rseg) { trx_undo_t* undo; trx_undo_t* next_undo; @@ -160,9 +154,6 @@ trx_rseg_mem_free( trx_undo_mem_free(undo); } - ut_a(*((trx_rseg_t**) rseg_array + rseg->id) == rseg); - *((trx_rseg_t**) rseg_array + rseg->id) = NULL; - ut_free(rseg); } @@ -173,20 +164,13 @@ array in the trx system object. @param[in] id rollback segment id @param[in] space space where the segment is placed @param[in] page_no page number of the segment header -@param[in] page_size page size -@param[in,out] purge_queue rseg queue -@param[out] rseg_array add rseg reference to this central array -@param[in,out] mtr mini-transaction -@return own: rollback segment object */ +@param[in,out] mtr mini-transaction */ static -trx_rseg_t* +void trx_rseg_mem_create( ulint id, ulint space, ulint page_no, - const page_size_t& page_size, - purge_pq_t* purge_queue, - trx_rseg_t** rseg_array, mtr_t* mtr) { ulint len; @@ -200,7 +184,6 @@ trx_rseg_mem_create( rseg->id = id; rseg->space = space; - rseg->page_size.copy_from(page_size); rseg->page_no = page_no; rseg->trx_ref_count = 0; rseg->skip_allocation = false; @@ -216,9 +199,9 @@ trx_rseg_mem_create( UT_LIST_INIT(rseg->insert_undo_list, &trx_undo_t::undo_list); UT_LIST_INIT(rseg->insert_undo_cached, &trx_undo_t::undo_list); - *((trx_rseg_t**) rseg_array + rseg->id) = rseg; + trx_sys->rseg_array[id] = rseg; - rseg_header = trx_rsegf_get_new(space, page_no, page_size, mtr); + rseg_header = trx_rsegf_get_new(space, page_no, mtr); rseg->max_size = mtr_read_ulint( rseg_header + TRX_RSEG_MAX_SIZE, MLOG_4BYTES, mtr); @@ -243,8 +226,8 @@ trx_rseg_mem_create( rseg->last_offset = node_addr.boffset; undo_log_hdr = trx_undo_page_get( - page_id_t(rseg->space, node_addr.page), - rseg->page_size, mtr) + node_addr.boffset; + page_id_t(rseg->space, node_addr.page), mtr) + + node_addr.boffset; rseg->last_trx_no = mach_read_from_8( undo_log_hdr + TRX_UNDO_TRX_NO); @@ -260,116 +243,33 @@ trx_rseg_mem_create( /* There is no need to cover this operation by the purge mutex because we are still bootstrapping. */ - purge_queue->push(elem); + purge_sys->purge_queue.push(elem); } } else { rseg->last_page_no = FIL_NULL; } - - return(rseg); } -/******************************************************************** -Check if rseg in given slot needs to be scheduled for purge. */ -static +/** Initialize the rollback segments in memory at database startup. */ void -trx_rseg_schedule_pending_purge( -/*============================*/ - trx_sysf_t* sys_header, /*!< in: trx system header */ - purge_pq_t* purge_queue, /*!< in/out: rseg queue */ - ulint slot, /*!< in: check rseg from given slot. */ - mtr_t* mtr) /*!< in: mtr */ +trx_rseg_array_init() { - ulint page_no; - ulint space; + mtr_t mtr; - page_no = trx_sysf_rseg_get_page_no(sys_header, slot, mtr); - space = trx_sysf_rseg_get_space(sys_header, slot, mtr); - - if (page_no != FIL_NULL - && is_system_or_undo_tablespace(space)) { - - /* rseg resides in system or undo tablespace and so - this is an upgrade scenario. trx_rseg_mem_create - will add rseg to purge queue if needed. */ - - trx_rseg_t* rseg = NULL; - bool found = true; - const page_size_t& page_size - = is_system_tablespace(space) - ? univ_page_size - : fil_space_get_page_size(space, &found); - - ut_ad(found); - - trx_rseg_t** rseg_array = - ((trx_rseg_t**) trx_sys->pending_purge_rseg_array); - rseg = trx_rseg_mem_create( - slot, space, page_no, page_size, - purge_queue, rseg_array, mtr); - - ut_a(rseg->id == slot); - } -} - -/******************************************************************** -Creates the memory copies for the rollback segments and initializes the -rseg array in trx_sys at a database startup. */ -static -void -trx_rseg_create_instance( -/*=====================*/ - purge_pq_t* purge_queue) /*!< in/out: rseg queue */ -{ - ulint i; - - for (i = 0; i < TRX_SYS_N_RSEGS; i++) { - ulint page_no; - - mtr_t mtr; + for (ulint i = 0; i < TRX_SYS_N_RSEGS; i++) { + ut_ad(!trx_rseg_get_on_id(i)); mtr.start(); - trx_sysf_t* sys_header = trx_sysf_get(&mtr); + trx_sysf_t* sys_header = trx_sysf_get(&mtr); + ulint page_no = trx_sysf_rseg_get_page_no( + sys_header, i, &mtr); - page_no = trx_sysf_rseg_get_page_no(sys_header, i, &mtr); - - /* Slot-1....Slot-n are reserved for non-redo rsegs. - Non-redo rsegs are recreated on server re-start so - avoid initializing the existing non-redo rsegs. */ - if (trx_sys_is_noredo_rseg_slot(i)) { - - /* If this is an upgrade scenario then existing rsegs - in range from slot-1....slot-n needs to be scheduled - for purge if there are pending purge operation. */ - trx_rseg_schedule_pending_purge( - sys_header, purge_queue, i, &mtr); - - } else if (page_no != FIL_NULL) { - ulint space; - trx_rseg_t* rseg = NULL; - - ut_a(!trx_rseg_get_on_id(i, true)); - - space = trx_sysf_rseg_get_space(sys_header, i, &mtr); - - bool found = true; - const page_size_t& page_size - = is_system_tablespace(space) - ? univ_page_size - : fil_space_get_page_size(space, &found); - - ut_ad(found); - - trx_rseg_t** rseg_array = - static_cast(trx_sys->rseg_array); - - rseg = trx_rseg_mem_create( - i, space, page_no, page_size, - purge_queue, rseg_array, &mtr); - - ut_a(rseg->id == i); - } else { - ut_a(trx_sys->rseg_array[i] == NULL); + if (page_no != FIL_NULL) { + trx_rseg_mem_create( + i, + trx_sysf_rseg_get_space(sys_header, i, &mtr), + page_no, &mtr); } + mtr.commit(); } } @@ -385,10 +285,8 @@ trx_rseg_create( 0 means next free slots. */ { mtr_t mtr; - ulint slot_no; - trx_rseg_t* rseg = NULL; - mtr_start(&mtr); + mtr.start(); /* To obey the latching order, acquire the file space x-latch before the trx_sys->mutex. */ @@ -399,59 +297,31 @@ trx_rseg_create( case FIL_TYPE_IMPORT: ut_ad(0); case FIL_TYPE_TEMPORARY: - mtr_set_log_mode(&mtr, MTR_LOG_NO_REDO); + mtr.set_log_mode(MTR_LOG_NO_REDO); break; case FIL_TYPE_TABLESPACE: break; } - slot_no = trx_sysf_rseg_find_free( + ulint slot_no = trx_sysf_rseg_find_free( &mtr, space->purpose == FIL_TYPE_TEMPORARY, nth_free_slot); + ulint page_no = slot_no == ULINT_UNDEFINED + ? FIL_NULL + : trx_rseg_header_create(space_id, ULINT_MAX, slot_no, &mtr); - if (slot_no != ULINT_UNDEFINED) { - ulint id; - ulint page_no; - trx_sysf_t* sys_header; - page_size_t page_size(space->flags); + if (page_no != FIL_NULL) { + trx_sysf_t* sys_header = trx_sysf_get(&mtr); - page_no = trx_rseg_header_create( - space_id, page_size, ULINT_MAX, slot_no, &mtr); - - if (page_no == FIL_NULL) { - mtr_commit(&mtr); - - return(rseg); - } - - sys_header = trx_sysf_get(&mtr); - - id = trx_sysf_rseg_get_space(sys_header, slot_no, &mtr); + ulint id = trx_sysf_rseg_get_space( + sys_header, slot_no, &mtr); ut_a(id == space_id || trx_sys_is_noredo_rseg_slot(slot_no)); - trx_rseg_t** rseg_array = - ((trx_rseg_t**) trx_sys->rseg_array); - - rseg = trx_rseg_mem_create( - slot_no, space_id, page_no, page_size, - purge_sys->purge_queue, rseg_array, &mtr); + trx_rseg_mem_create(slot_no, space_id, page_no, &mtr); } - mtr_commit(&mtr); + mtr.commit(); - return(rseg); -} - -/*********************************************************************//** -Creates the memory copies for rollback segments and initializes the -rseg array in trx_sys at a database startup. */ -void -trx_rseg_array_init( -/*================*/ - purge_pq_t* purge_queue) /*!< in: rseg queue */ -{ - trx_sys->rseg_history_len = 0; - - trx_rseg_create_instance(purge_queue); + return(page_no == FIL_NULL ? NULL : trx_sys->rseg_array[slot_no]); } /******************************************************************** diff --git a/storage/innobase/trx/trx0sys.cc b/storage/innobase/trx/trx0sys.cc index 724139461d3..ffee282d498 100644 --- a/storage/innobase/trx/trx0sys.cc +++ b/storage/innobase/trx/trx0sys.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -59,7 +60,7 @@ struct file_format_t { }; /** The transaction system */ -trx_sys_t* trx_sys = NULL; +trx_sys_t* trx_sys; /** List of animal names representing file format. */ static const char* file_format_name_map[] = { @@ -223,10 +224,6 @@ trx_sys_update_mysql_binlog_offset( return; } - if (sys_header == NULL) { - sys_header = trx_sysf_get(mtr); - } - if (mach_read_from_4(sys_header + field + TRX_SYS_MYSQL_LOG_MAGIC_N_FLD) != TRX_SYS_MYSQL_LOG_MAGIC_N) { @@ -570,36 +567,21 @@ trx_sysf_create( /* Create the first rollback segment in the SYSTEM tablespace */ slot_no = trx_sysf_rseg_find_free(mtr, false, 0); - page_no = trx_rseg_header_create(TRX_SYS_SPACE, univ_page_size, + page_no = trx_rseg_header_create(TRX_SYS_SPACE, ULINT_MAX, slot_no, mtr); ut_a(slot_no == TRX_SYS_SYSTEM_RSEG_ID); ut_a(page_no == FSP_FIRST_RSEG_PAGE_NO); } -/*****************************************************************//** -Creates and initializes the central memory structures for the transaction -system. This is called when the database is started. -@return min binary heap of rsegs to purge */ -purge_pq_t* -trx_sys_init_at_db_start(void) -/*==========================*/ +/** Initialize the transaction system main-memory data structures. */ +void +trx_sys_init_at_db_start() { - purge_pq_t* purge_queue; trx_sysf_t* sys_header; ib_uint64_t rows_to_undo = 0; const char* unit = ""; - /* We create the min binary heap here and pass ownership to - purge when we init the purge sub-system. Purge is responsible - for freeing the binary heap. */ - purge_queue = UT_NEW_NOKEY(purge_pq_t()); - ut_a(purge_queue != NULL); - - if (srv_force_recovery < SRV_FORCE_NO_UNDO_LOG_SCAN) { - trx_rseg_array_init(purge_queue); - } - /* VERY important: after the database is started, max_trx_id value is divisible by TRX_SYS_TRX_ID_WRITE_MARGIN, and the 'if' in trx_sys_get_new_trx_id will evaluate to TRUE when the function @@ -660,7 +642,7 @@ trx_sys_init_at_db_start(void) trx_sys_mutex_exit(); - return(purge_queue); + trx_sys->mvcc->clone_oldest_view(&purge_sys->view); } /*****************************************************************//** @@ -1086,16 +1068,16 @@ trx_sys_close(void) " shutdown: " << size << " read views open"; } - sess_close(trx_dummy_sess); - trx_dummy_sess = NULL; - - trx_purge_sys_close(); - - /* Free the double write data structures. */ - buf_dblwr_free(); + if (trx_dummy_sess) { + sess_close(trx_dummy_sess); + trx_dummy_sess = NULL; + } /* Only prepared transactions may be left in the system. Free them. */ - ut_a(UT_LIST_GET_LEN(trx_sys->rw_trx_list) == trx_sys->n_prepared_trx); + ut_a(UT_LIST_GET_LEN(trx_sys->rw_trx_list) == trx_sys->n_prepared_trx + || !srv_was_started + || srv_read_only_mode + || srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO); for (trx_t* trx = UT_LIST_GET_FIRST(trx_sys->rw_trx_list); trx != NULL; @@ -1107,28 +1089,10 @@ trx_sys_close(void) } /* There can't be any active transactions. */ - trx_rseg_t** rseg_array = static_cast( - trx_sys->rseg_array); for (ulint i = 0; i < TRX_SYS_N_RSEGS; ++i) { - trx_rseg_t* rseg; - - rseg = trx_sys->rseg_array[i]; - - if (rseg != NULL) { - trx_rseg_mem_free(rseg, rseg_array); - } - } - - rseg_array = ((trx_rseg_t**) trx_sys->pending_purge_rseg_array); - - for (ulint i = 0; i < TRX_SYS_N_RSEGS; ++i) { - trx_rseg_t* rseg; - - rseg = trx_sys->pending_purge_rseg_array[i]; - - if (rseg != NULL) { - trx_rseg_mem_free(rseg, rseg_array); + if (trx_rseg_t* rseg = trx_sys->rseg_array[i]) { + trx_rseg_mem_free(rseg); } } @@ -1150,33 +1114,6 @@ trx_sys_close(void) trx_sys = NULL; } -/** @brief Convert an undo log to TRX_UNDO_PREPARED state on shutdown. - -If any prepared ACTIVE transactions exist, and their rollback was -prevented by innodb_force_recovery, we convert these transactions to -XA PREPARE state in the main-memory data structures, so that shutdown -will proceed normally. These transactions will again recover as ACTIVE -on the next restart, and they will be rolled back unless -innodb_force_recovery prevents it again. - -@param[in] trx transaction -@param[in,out] undo undo log to convert to TRX_UNDO_PREPARED */ -static -void -trx_undo_fake_prepared( - const trx_t* trx, - trx_undo_t* undo) -{ - ut_ad(srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO); - ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE)); - ut_ad(trx->is_recovered); - - if (undo != NULL) { - ut_ad(undo->state == TRX_UNDO_ACTIVE); - undo->state = TRX_UNDO_PREPARED; - } -} - /********************************************************************* Check if there are any active (non-prepared) transactions. @return total number of active transactions or 0 if none */ @@ -1184,46 +1121,15 @@ ulint trx_sys_any_active_transactions(void) /*=================================*/ { + ulint total_trx = 0; + trx_sys_mutex_enter(); - ulint total_trx = UT_LIST_GET_LEN(trx_sys->mysql_trx_list); + total_trx = UT_LIST_GET_LEN(trx_sys->rw_trx_list) + + UT_LIST_GET_LEN(trx_sys->mysql_trx_list); - if (total_trx == 0) { - total_trx = UT_LIST_GET_LEN(trx_sys->rw_trx_list); - ut_a(total_trx >= trx_sys->n_prepared_trx); - - if (total_trx > trx_sys->n_prepared_trx - && srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO) { - for (trx_t* trx = UT_LIST_GET_FIRST( - trx_sys->rw_trx_list); - trx != NULL; - trx = UT_LIST_GET_NEXT(trx_list, trx)) { - if (!trx_state_eq(trx, TRX_STATE_ACTIVE) - || !trx->is_recovered) { - continue; - } - /* This was a recovered transaction - whose rollback was disabled by - the innodb_force_recovery setting. - Pretend that it is in XA PREPARE - state so that shutdown will work. */ - trx_undo_fake_prepared( - trx, trx->rsegs.m_redo.insert_undo); - trx_undo_fake_prepared( - trx, trx->rsegs.m_redo.update_undo); - trx_undo_fake_prepared( - trx, trx->rsegs.m_noredo.insert_undo); - trx_undo_fake_prepared( - trx, trx->rsegs.m_noredo.update_undo); - trx->state = TRX_STATE_PREPARED; - trx_sys->n_prepared_trx++; - trx_sys->n_prepared_recovered_trx++; - } - } - - ut_a(total_trx >= trx_sys->n_prepared_trx); - total_trx -= trx_sys->n_prepared_trx; - } + ut_a(total_trx >= trx_sys->n_prepared_trx); + total_trx -= trx_sys->n_prepared_trx; trx_sys_mutex_exit(); diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index db9aa7fde96..b7a934e363d 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2016, MariaDB Corporation. +Copyright (c) 2015, 2017, MariaDB Corporation. This 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 @@ -283,8 +283,7 @@ struct TrxFactory { ut_a(trx->lock.wait_lock == NULL); ut_a(trx->lock.wait_thr == NULL); - ut_a(!trx->has_search_latch); - + trx_assert_no_search_latch(trx); ut_a(trx->dict_operation_lock_mode == 0); if (trx->lock.lock_heap != NULL) { @@ -353,7 +352,7 @@ struct TrxFactory { ut_a(trx->lock.wait_thr == NULL); ut_a(trx->lock.wait_lock == NULL); - ut_a(!trx->has_search_latch); + trx_assert_no_search_latch(trx); ut_a(trx->dict_operation_lock_mode == 0); @@ -462,12 +461,6 @@ trx_create_low() /* We just got trx from pool, it should be non locking */ ut_ad(trx->will_lock == 0); - trx->api_trx = false; - - trx->api_auto_commit = false; - - trx->read_write = true; - /* Background trx should not be forced to rollback, we will unset the flag for user trx. */ trx->in_innodb |= TRX_FORCE_ROLLBACK_DISABLE; @@ -632,7 +625,12 @@ trx_free_prepared( /*==============*/ trx_t* trx) /*!< in, own: trx object */ { - ut_a(trx_state_eq(trx, TRX_STATE_PREPARED)); + ut_a(trx_state_eq(trx, TRX_STATE_PREPARED) + || (trx_state_eq(trx, TRX_STATE_ACTIVE) + && trx->is_recovered + && (!srv_was_started + || srv_read_only_mode + || srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO))); ut_a(trx->magic_n == TRX_MAGIC_N); lock_trx_release_locks(trx); @@ -752,8 +750,7 @@ trx_resurrect_table_locks( /* 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( - page_id_t(undo->space, undo->top_page_no), undo->page_size, - &mtr); + page_id_t(undo->space, undo->top_page_no), &mtr); undo_rec = undo_page + undo->top_offset; @@ -1009,21 +1006,21 @@ trx_resurrect_update( } } -/****************************************************************//** -Creates trx objects for transactions and initializes the trx list of -trx_sys at database start. Rollback segment and undo log lists must -already exist when this function is called, because the lists of -transactions to be rolled back or cleaned up are built based on the -undo log lists. */ +/** Initialize (resurrect) transactions at startup. */ void -trx_lists_init_at_db_start(void) -/*============================*/ +trx_lists_init_at_db_start() { ut_a(srv_is_being_started); + ut_ad(!srv_was_started); + ut_ad(!purge_sys); + + purge_sys = UT_NEW_NOKEY(purge_sys_t()); + + if (srv_force_recovery < SRV_FORCE_NO_UNDO_LOG_SCAN) { + trx_rseg_array_init(); + } /* Look from the rollback segments if there exist undo logs for - transactions. Upgrade demands clean shutdown and so there is - not need to look at pending_purge_rseg_array for rollbacking transactions. */ for (ulint i = 0; i < TRX_SYS_N_RSEGS; ++i) { @@ -1354,14 +1351,11 @@ trx_start_low( ++trx->version; /* Check whether it is an AUTOCOMMIT SELECT */ - trx->auto_commit = (trx->api_trx && trx->api_auto_commit) - || thd_trx_is_auto_commit(trx->mysql_thd); + trx->auto_commit = thd_trx_is_auto_commit(trx->mysql_thd); - trx->read_only = - (trx->api_trx && !trx->read_write) + trx->read_only = srv_read_only_mode || (!trx->ddl && !trx->internal - && thd_trx_is_read_only(trx->mysql_thd)) - || srv_read_only_mode; + && thd_trx_is_read_only(trx->mysql_thd)); if (!trx->auto_commit) { ++trx->will_lock; @@ -1562,7 +1556,7 @@ trx_serialisation_number_get( trx_sys_mutex_exit(); - purge_sys->purge_queue->push(elem); + purge_sys->purge_queue.push(elem); mutex_exit(&purge_sys->pq_mutex); } else { @@ -1582,8 +1576,6 @@ trx_write_serialisation_history( trx_t* trx, /*!< in/out: transaction */ mtr_t* mtr) /*!< in/out: mini-transaction */ { - trx_sysf_t* sys_header = NULL; - /* 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 based domain, at the @@ -1703,8 +1695,8 @@ trx_write_serialisation_history( MONITOR_INC(MONITOR_TRX_COMMIT_UNDO); + trx_sysf_t* sys_header = trx_sysf_get(mtr); #ifdef WITH_WSREP - sys_header = trx_sysf_get(mtr); /* Update latest MySQL wsrep XID in trx sys header. */ if (wsrep_is_wsrep_xid(trx->xid)) { trx_sys_update_wsrep_checkpoint(trx->xid, sys_header, mtr); @@ -1811,11 +1803,7 @@ trx_flush_log_if_needed_low( lsn_t lsn) /*!< in: lsn up to which logs are to be flushed. */ { -#ifdef _WIN32 - bool flush = true; -#else - bool flush = srv_unix_file_flush_method != SRV_UNIX_NOSYNC; -#endif /* _WIN32 */ + bool flush = srv_file_flush_method != SRV_NOSYNC; switch (srv_flush_log_at_trx_commit) { case 3: @@ -2099,7 +2087,7 @@ trx_commit_in_memory( trx->dict_operation = TRX_DICT_OP_NONE; #ifdef WITH_WSREP - if (wsrep_on(trx->mysql_thd)) { + if (trx->mysql_thd && wsrep_on(trx->mysql_thd)) { trx->lock.was_chosen_as_deadlock_victim = FALSE; } #endif @@ -2631,10 +2619,12 @@ state_ok: (ulong) n_rec_locks); } +#ifdef BTR_CUR_HASH_ADAPT if (trx->has_search_latch) { newline = TRUE; fputs(", holds adaptive hash latch", f); } +#endif /* BTR_CUR_HASH_ADAPT */ if (trx->undo_no != 0) { newline = TRUE; @@ -3379,24 +3369,20 @@ trx_kill_blocking(trx_t* trx) trx_mutex_exit(victim_trx); -#ifdef UNIV_DEBUG +#ifndef DBUG_OFF char buffer[1024]; - char* thr_text; - trx_id_t id; +#endif /* !DBUG_OFF */ + + DBUG_LOG("trx", + "High Priority Transaction " + << trx->id << " killed transaction " + << victim_trx->id << " in hit list" + << " - " + << thd_get_error_context_description( + victim_trx->mysql_thd, + buffer, sizeof(buffer), 512)); - thr_text = thd_get_error_context_description(victim_trx->mysql_thd, - buffer, sizeof(buffer), - 512); - id = victim_trx->id; -#endif /* UNIV_DEBUG */ trx_rollback_for_mysql(victim_trx); - -#ifdef UNIV_DEBUG - ib::info() << "High Priority Transaction (ID): " - << trx->id << " killed transaction (ID): " - << id << " in hit list" - << " - " << thr_text; -#endif /* UNIV_DEBUG */ trx_mutex_enter(victim_trx); version++; diff --git a/storage/innobase/trx/trx0undo.cc b/storage/innobase/trx/trx0undo.cc index be60b9b4aaa..26c8c4471e2 100644 --- a/storage/innobase/trx/trx0undo.cc +++ b/storage/innobase/trx/trx0undo.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -177,14 +178,8 @@ trx_undo_get_prev_rec_from_prev_page( space = page_get_space_id(undo_page); - bool found; - const page_size_t& page_size = fil_space_get_page_size(space, - &found); - - ut_ad(found); - buf_block_t* block = buf_page_get( - page_id_t(space, prev_page_no), page_size, + page_id_t(space, prev_page_no), univ_page_size, shared ? RW_S_LATCH : RW_X_LATCH, mtr); buf_block_dbg_add_level(block, SYNC_TRX_UNDO_PAGE); @@ -224,7 +219,6 @@ trx_undo_get_prev_rec( /** Gets the next record in an undo log from the next page. @param[in] space undo log header space -@param[in] page_size page size @param[in] undo_page undo log page @param[in] page_no undo log header page number @param[in] offset undo log header offset on page @@ -235,7 +229,6 @@ static trx_undo_rec_t* trx_undo_get_next_rec_from_next_page( ulint space, - const page_size_t& page_size, const page_t* undo_page, ulint page_no, ulint offset, @@ -270,10 +263,10 @@ trx_undo_get_next_rec_from_next_page( if (mode == RW_S_LATCH) { next_page = trx_undo_page_get_s_latched( - next_page_id, page_size, mtr); + next_page_id, mtr); } else { ut_ad(mode == RW_X_LATCH); - next_page = trx_undo_page_get(next_page_id, page_size, mtr); + next_page = trx_undo_page_get(next_page_id, mtr); } return(trx_undo_page_get_first_rec(next_page, page_no, offset)); @@ -301,13 +294,7 @@ trx_undo_get_next_rec( space = page_get_space_id(page_align(rec)); - bool found; - const page_size_t& page_size = fil_space_get_page_size(space, - &found); - - ut_ad(found); - - return(trx_undo_get_next_rec_from_next_page(space, page_size, + return(trx_undo_get_next_rec_from_next_page(space, page_align(rec), page_no, offset, RW_S_LATCH, mtr)); @@ -315,7 +302,6 @@ trx_undo_get_next_rec( /** Gets the first record in an undo log. @param[in] space undo log header space -@param[in] page_size page size @param[in] page_no undo log header page number @param[in] offset undo log header offset on page @param[in] mode latching mode: RW_S_LATCH or RW_X_LATCH @@ -324,7 +310,6 @@ trx_undo_get_next_rec( trx_undo_rec_t* trx_undo_get_first_rec( ulint space, - const page_size_t& page_size, ulint page_no, ulint offset, ulint mode, @@ -336,10 +321,9 @@ trx_undo_get_first_rec( const page_id_t page_id(space, page_no); if (mode == RW_S_LATCH) { - undo_page = trx_undo_page_get_s_latched( - page_id, page_size, mtr); + undo_page = trx_undo_page_get_s_latched(page_id, mtr); } else { - undo_page = trx_undo_page_get(page_id, page_size, mtr); + undo_page = trx_undo_page_get(page_id, mtr); } rec = trx_undo_page_get_first_rec(undo_page, page_no, offset); @@ -348,7 +332,7 @@ trx_undo_get_first_rec( return(rec); } - return(trx_undo_get_next_rec_from_next_page(space, page_size, + return(trx_undo_get_next_rec_from_next_page(space, undo_page, page_no, offset, mode, mtr)); } @@ -910,8 +894,7 @@ trx_undo_add_page( } header_page = trx_undo_page_get( - page_id_t(undo->space, undo->hdr_page_no), - undo->page_size, mtr); + page_id_t(undo->space, undo->hdr_page_no), mtr); if (!fsp_reserve_free_extents(&n_reserved, undo->space, 1, FSP_UNDO, mtr)) { @@ -976,11 +959,9 @@ trx_undo_free_page( ut_a(hdr_page_no != page_no); ut_ad(mutex_own(&(rseg->mutex))); - undo_page = trx_undo_page_get( - page_id_t(space, page_no), rseg->page_size, mtr); + undo_page = trx_undo_page_get(page_id_t(space, page_no), mtr); - header_page = trx_undo_page_get( - page_id_t(space, hdr_page_no), rseg->page_size, mtr); + header_page = trx_undo_page_get(page_id_t(space, hdr_page_no), mtr); flst_remove(header_page + TRX_UNDO_SEG_HDR + TRX_UNDO_PAGE_LIST, undo_page + TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE, mtr); @@ -993,8 +974,7 @@ trx_undo_free_page( rseg->curr_size--; if (in_history) { - rseg_header = trx_rsegf_get(space, rseg->page_no, - rseg->page_size, mtr); + rseg_header = trx_rsegf_get(space, rseg->page_no, mtr); hist_size = mtr_read_ulint(rseg_header + TRX_RSEG_HISTORY_SIZE, MLOG_4BYTES, mtr); @@ -1035,7 +1015,6 @@ trx_undo_free_last_page_func( Other undo logs may still have records on that page, if it is an update undo log. @param[in] space space -@param[in] page_size page size @param[in] hdr_page_no header page number @param[in] hdr_offset header offset @param[in,out] mtr mini-transaction */ @@ -1043,7 +1022,6 @@ static void trx_undo_empty_header_page( ulint space, - const page_size_t& page_size, ulint hdr_page_no, ulint hdr_offset, mtr_t* mtr) @@ -1052,8 +1030,7 @@ trx_undo_empty_header_page( trx_ulogf_t* log_hdr; ulint end; - header_page = trx_undo_page_get( - page_id_t(space, hdr_page_no), page_size, mtr); + header_page = trx_undo_page_get(page_id_t(space, hdr_page_no), mtr); log_hdr = header_page + hdr_offset; @@ -1098,8 +1075,7 @@ trx_undo_truncate_end_func( last_page_no = undo->last_page_no; undo_page = trx_undo_page_get( - page_id_t(undo->space, last_page_no), - undo->page_size, &mtr); + page_id_t(undo->space, last_page_no), &mtr); rec = trx_undo_page_get_last_rec(undo_page, undo->hdr_page_no, undo->hdr_offset); @@ -1171,8 +1147,7 @@ loop: mtr.set_log_mode(MTR_LOG_NO_REDO); } - rec = trx_undo_get_first_rec(rseg->space, rseg->page_size, - hdr_page_no, hdr_offset, + rec = trx_undo_get_first_rec(rseg->space, hdr_page_no, hdr_offset, RW_X_LATCH, &mtr); if (rec == NULL) { /* Already empty */ @@ -1196,7 +1171,7 @@ loop: page_no = page_get_page_no(undo_page); if (page_no == hdr_page_no) { - trx_undo_empty_header_page(rseg->space, rseg->page_size, + trx_undo_empty_header_page(rseg->space, hdr_page_no, hdr_offset, &mtr); } else { @@ -1239,7 +1214,7 @@ trx_undo_seg_free( seg_header = trx_undo_page_get(page_id_t(undo->space, undo->hdr_page_no), - undo->page_size, &mtr) + &mtr) + TRX_UNDO_SEG_HDR; file_seg = seg_header + TRX_UNDO_FSEG_HEADER; @@ -1249,8 +1224,7 @@ trx_undo_seg_free( if (finished) { /* Update the rseg header */ rseg_header = trx_rsegf_get( - rseg->space, rseg->page_no, rseg->page_size, - &mtr); + rseg->space, rseg->page_no, &mtr); trx_rsegf_set_nth_undo(rseg_header, undo->id, FIL_NULL, &mtr); @@ -1295,8 +1269,7 @@ trx_undo_mem_create_at_db_start( ut_a(id < TRX_RSEG_N_SLOTS); - undo_page = trx_undo_page_get( - page_id_t(rseg->space, page_no), rseg->page_size, mtr); + undo_page = trx_undo_page_get(page_id_t(rseg->space, page_no), mtr); page_header = undo_page + TRX_UNDO_PAGE_HDR; @@ -1348,8 +1321,7 @@ trx_undo_mem_create_at_db_start( undo->top_page_no = last_addr.page; last_page = trx_undo_page_get( - page_id_t(rseg->space, undo->last_page_no), - rseg->page_size, mtr); + page_id_t(rseg->space, undo->last_page_no), mtr); rec = trx_undo_page_get_last_rec(last_page, page_no, offset); @@ -1404,8 +1376,7 @@ trx_undo_lists_init( mtr_start(&mtr); - rseg_header = trx_rsegf_get_new( - rseg->space, rseg->page_no, rseg->page_size, &mtr); + rseg_header = trx_rsegf_get_new(rseg->space, rseg->page_no, &mtr); for (i = 0; i < TRX_RSEG_N_SLOTS; i++) { ulint page_no; @@ -1432,8 +1403,7 @@ trx_undo_lists_init( mtr_start(&mtr); rseg_header = trx_rsegf_get( - rseg->space, rseg->page_no, rseg->page_size, - &mtr); + rseg->space, rseg->page_no, &mtr); /* Found a used slot */ MONITOR_INC(MONITOR_NUM_UNDO_SLOT_USED); @@ -1487,7 +1457,6 @@ trx_undo_mem_create( undo->rseg = rseg; undo->space = rseg->space; - undo->page_size.copy_from(rseg->page_size); undo->hdr_page_no = page_no; undo->hdr_offset = offset; undo->last_page_no = page_no; @@ -1576,8 +1545,7 @@ trx_undo_create( rseg->curr_size++; - rseg_header = trx_rsegf_get(rseg->space, rseg->page_no, - rseg->page_size, mtr); + rseg_header = trx_rsegf_get(rseg->space, rseg->page_no, mtr); err = trx_undo_seg_create(rseg, rseg_header, type, &id, &undo_page, mtr); @@ -1659,8 +1627,7 @@ trx_undo_reuse_cached( ut_a(undo->id < TRX_RSEG_N_SLOTS); undo_page = trx_undo_page_get( - page_id_t(undo->space, undo->hdr_page_no), - undo->page_size, mtr); + page_id_t(undo->space, undo->hdr_page_no), mtr); if (type == TRX_UNDO_INSERT) { offset = trx_undo_insert_header_reuse(undo_page, trx_id, mtr); @@ -1697,8 +1664,7 @@ trx_undo_mark_as_dict_operation( page_t* hdr_page; hdr_page = trx_undo_page_get( - page_id_t(undo->space, undo->hdr_page_no), - undo->page_size, mtr); + page_id_t(undo->space, undo->hdr_page_no), mtr); switch (trx_get_dict_operation(trx)) { case TRX_DICT_OP_NONE: @@ -1827,8 +1793,7 @@ trx_undo_set_state_at_finish( ut_a(undo->id < TRX_RSEG_N_SLOTS); undo_page = trx_undo_page_get( - page_id_t(undo->space, undo->hdr_page_no), - undo->page_size, mtr); + page_id_t(undo->space, undo->hdr_page_no), mtr); seg_hdr = undo_page + TRX_UNDO_SEG_HDR; page_hdr = undo_page + TRX_UNDO_PAGE_HDR; @@ -1876,8 +1841,7 @@ trx_undo_set_state_at_prepare( ut_a(undo->id < TRX_RSEG_N_SLOTS); undo_page = trx_undo_page_get( - page_id_t(undo->space, undo->hdr_page_no), - undo->page_size, mtr); + page_id_t(undo->space, undo->hdr_page_no), mtr); seg_hdr = undo_page + TRX_UNDO_SEG_HDR; @@ -2015,7 +1979,20 @@ trx_undo_free_prepared( ut_ad(srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS); if (trx->rsegs.m_redo.update_undo) { - ut_a(trx->rsegs.m_redo.update_undo->state == TRX_UNDO_PREPARED); + switch (trx->rsegs.m_redo.update_undo->state) { + case TRX_UNDO_PREPARED: + break; + case TRX_UNDO_ACTIVE: + /* lock_trx_release_locks() assigns + trx->is_recovered=false */ + ut_a(!srv_was_started + || srv_read_only_mode + || srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO); + break; + default: + ut_error; + } + UT_LIST_REMOVE(trx->rsegs.m_redo.rseg->update_undo_list, trx->rsegs.m_redo.update_undo); trx_undo_mem_free(trx->rsegs.m_redo.update_undo); @@ -2024,7 +2001,20 @@ trx_undo_free_prepared( } if (trx->rsegs.m_redo.insert_undo) { - ut_a(trx->rsegs.m_redo.insert_undo->state == TRX_UNDO_PREPARED); + switch (trx->rsegs.m_redo.insert_undo->state) { + case TRX_UNDO_PREPARED: + break; + case TRX_UNDO_ACTIVE: + /* lock_trx_release_locks() assigns + trx->is_recovered=false */ + ut_a(!srv_was_started + || srv_read_only_mode + || srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO); + break; + default: + ut_error; + } + UT_LIST_REMOVE(trx->rsegs.m_redo.rseg->insert_undo_list, trx->rsegs.m_redo.insert_undo); trx_undo_mem_free(trx->rsegs.m_redo.insert_undo); @@ -2096,10 +2086,9 @@ trx_undo_truncate_tablespace( trx_rseg_t* rseg = undo_trunc->get_ith_rseg(i); rseg->page_no = trx_rseg_header_create( - space_id, univ_page_size, ULINT_MAX, rseg->id, &mtr); + space_id, ULINT_MAX, rseg->id, &mtr); - rseg_header = trx_rsegf_get_new( - space_id, rseg->page_no, rseg->page_size, &mtr); + rseg_header = trx_rsegf_get_new(space_id, rseg->page_no, &mtr); /* Before re-initialization ensure that we free the existing structure. There can't be any active transactions. */ diff --git a/storage/innobase/ut/ut0dbg.cc b/storage/innobase/ut/ut0dbg.cc index ed4a7778afa..fff1f0e6687 100644 --- a/storage/innobase/ut/ut0dbg.cc +++ b/storage/innobase/ut/ut0dbg.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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,10 +35,10 @@ ut_dbg_assertion_failed( /*====================*/ const char* expr, /*!< in: the failed assertion (optional) */ const char* file, /*!< in: source file containing the assertion */ - ulint line) /*!< in: line number of the assertion */ + unsigned line) /*!< in: line number of the assertion */ { ut_print_timestamp(stderr); - fprintf(stderr, " InnoDB: Assertion failure in file %s line %lu\n", + fprintf(stderr, " InnoDB: Assertion failure in file %s line %u\n", file, line); if (expr) { fprintf(stderr, diff --git a/storage/innobase/ut/ut0new.cc b/storage/innobase/ut/ut0new.cc index c2e3eb813af..bf5515f4de0 100644 --- a/storage/innobase/ut/ut0new.cc +++ b/storage/innobase/ut/ut0new.cc @@ -32,7 +32,9 @@ const size_t alloc_max_retries = 60; /** Keys for registering allocations with performance schema. Keep this list alphabetically sorted. */ +#ifdef BTR_CUR_HASH_ADAPT PSI_memory_key mem_key_ahi; +#endif /* BTR_CUR_HASH_ADAPT */ PSI_memory_key mem_key_buf_buf_pool; PSI_memory_key mem_key_dict_stats_bg_recalc_pool_t; PSI_memory_key mem_key_dict_stats_index_map_t; @@ -59,7 +61,9 @@ the list below: (in ut_new_boot()) then mem_key_other is used. Keep this list alphabetically sorted. */ static PSI_memory_info pfs_info[] = { +#ifdef BTR_CUR_HASH_ADAPT {&mem_key_ahi, "adaptive hash index", 0}, +#endif /* BTR_CUR_HASH_ADAPT */ {&mem_key_buf_buf_pool, "buf_buf_pool", 0}, {&mem_key_dict_stats_bg_recalc_pool_t, "dict_stats_bg_recalc_pool_t", 0}, {&mem_key_dict_stats_index_map_t, "dict_stats_index_map_t", 0}, @@ -97,7 +101,6 @@ ut_new_boot() #ifdef UNIV_PFS_MEMORY static const char* auto_event_names[] = { /* Keep this list alphabetically sorted. */ - "api0api", "btr0btr", "btr0bulk", "btr0cur", diff --git a/storage/innobase/ut/ut0ut.cc b/storage/innobase/ut/ut0ut.cc index 8dc6fb0bbe6..2b9e3115a03 100644 --- a/storage/innobase/ut/ut0ut.cc +++ b/storage/innobase/ut/ut0ut.cc @@ -727,10 +727,6 @@ ut_strerr( return("I/O error"); case DB_TABLE_IN_FK_CHECK: return("Table is being used in foreign key check"); - case DB_DATA_MISMATCH: - return("data mismatch"); - case DB_SCHEMA_NOT_LOCKED: - return("schema not locked"); case DB_NOT_FOUND: return("not found"); case DB_ONLINE_LOG_TOO_BIG: @@ -749,33 +745,20 @@ ut_strerr( return("Table is corrupted"); case DB_FTS_TOO_MANY_WORDS_IN_PHRASE: return("Too many words in a FTS phrase or proximity search"); - case DB_IO_DECOMPRESS_FAIL: - return("Page decompress failed after reading from disk"); case DB_DECRYPTION_FAILED: return("Table is encrypted but decrypt failed."); - case DB_IO_NO_PUNCH_HOLE: - return("No punch hole support"); - case DB_IO_NO_PUNCH_HOLE_FS: - return("Punch hole not supported by the file system"); - case DB_IO_NO_PUNCH_HOLE_TABLESPACE: - return("Punch hole not supported by the tablespace"); - case DB_IO_NO_ENCRYPT_TABLESPACE: - return("Page encryption not supported by the tablespace"); - case DB_IO_DECRYPT_FAIL: - return("Page decryption failed after reading from disk"); case DB_IO_PARTIAL_FAILED: return("Partial IO failed"); case DB_FORCED_ABORT: return("Transaction aborted by another higher priority " "transaction"); - case DB_WRONG_FILE_NAME: - return("Invalid Filename"); - case DB_COMPUTE_VALUE_FAILED: return("Compute generated column failed"); case DB_NO_FK_ON_S_BASE_COL: return("Cannot add foreign key on the base column " "of stored column"); + case DB_IO_NO_PUNCH_HOLE: + return ("File system does not support punch hole (trim) operation."); /* 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/innobase/ut/ut0wqueue.cc b/storage/innobase/ut/ut0wqueue.cc index cee30925375..ccd5c10555c 100644 --- a/storage/innobase/ut/ut0wqueue.cc +++ b/storage/innobase/ut/ut0wqueue.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2006, 2015, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -31,7 +32,9 @@ Created 4/26/2006 Osku Salerma struct ib_wqueue_t { ib_mutex_t mutex; /*!< mutex protecting everything */ ib_list_t* items; /*!< work item list */ - os_event_t event; /*!< event we use to signal additions to list */ + os_event_t event; /*!< event we use to signal additions to list; + os_event_set() and os_event_reset() are + protected by ib_wqueue_t::mutex */ }; /****************************************************************//** diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 5ed836ddb63..41d9ac840f9 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -257,7 +257,7 @@ static MYSQL_SYSVAR_ULONG(pagecache_file_hash_size, pagecache_file_hash_size, static MYSQL_SYSVAR_SET(recover_options, maria_recover_options, PLUGIN_VAR_OPCMDARG, "Specifies how corrupted tables should be automatically repaired", - NULL, NULL, HA_RECOVER_DEFAULT, &maria_recover_typelib); + NULL, NULL, HA_RECOVER_BACKUP|HA_RECOVER_QUICK, &maria_recover_typelib); static MYSQL_THDVAR_ULONG(repair_threads, PLUGIN_VAR_RQCMDARG, "Number of threads to use when repairing Aria tables. The value of 1 " diff --git a/storage/maria/ma_blockrec.h b/storage/maria/ma_blockrec.h index 3ea1fedf237..c33dfa0d5ea 100644 --- a/storage/maria/ma_blockrec.h +++ b/storage/maria/ma_blockrec.h @@ -50,8 +50,8 @@ #define SUB_RANGE_SIZE 2 #define BLOCK_FILLER_SIZE 2 #define ROW_EXTENT_SIZE (ROW_EXTENT_PAGE_SIZE + ROW_EXTENT_COUNT_SIZE) -#define TAIL_BIT 0x8000 /* Bit in page_count to signify tail */ -#define START_EXTENT_BIT 0x4000 /* Bit in page_count to signify start*/ +#define TAIL_BIT 0x8000U /* Bit in page_count to signify tail */ +#define START_EXTENT_BIT 0x4000U /* Bit in page_count to signify start*/ /* page_count set by bitmap code for tail pages */ #define TAIL_PAGE_COUNT_MARKER 0xffff /* Number of extents reserved MARIA_BITMAP_BLOCKS to store head part */ @@ -75,7 +75,7 @@ #define PAGE_TYPE_MASK 7 enum en_page_type { UNALLOCATED_PAGE, HEAD_PAGE, TAIL_PAGE, BLOB_PAGE, MAX_PAGE_TYPE }; -#define PAGE_CAN_BE_COMPACTED 128 /* Bit in PAGE_TYPE */ +#define PAGE_CAN_BE_COMPACTED 128U /* Bit in PAGE_TYPE */ #define PAGE_TYPE_OFFSET LSN_SIZE #define DIR_COUNT_OFFSET (LSN_SIZE+PAGE_TYPE_SIZE) @@ -86,12 +86,12 @@ enum en_page_type { UNALLOCATED_PAGE, HEAD_PAGE, TAIL_PAGE, BLOB_PAGE, MAX_PAGE_ #define FULL_PAGE_KEY_VERSION_OFFSET (PAGE_TYPE_OFFSET + PAGE_TYPE_SIZE) /* Bits used for flag uchar (one byte, first in record) */ -#define ROW_FLAG_TRANSID 1 -#define ROW_FLAG_VER_PTR 2 -#define ROW_FLAG_DELETE_TRANSID 4 -#define ROW_FLAG_NULLS_EXTENDED 8 -#define ROW_FLAG_EXTENTS 128 -#define ROW_FLAG_ALL (1+2+4+8+128) +#define ROW_FLAG_TRANSID 1U +#define ROW_FLAG_VER_PTR 2U +#define ROW_FLAG_DELETE_TRANSID 4U +#define ROW_FLAG_NULLS_EXTENDED 8U +#define ROW_FLAG_EXTENTS 128U +#define ROW_FLAG_ALL (1U+2U+4U+8U+128U) /* Size for buffer to hold information about bitmap */ #define MAX_BITMAP_INFO_LENGTH ((MARIA_MAX_KEY_BLOCK_LENGTH*8/3)*(61*11/60)+10) @@ -99,8 +99,8 @@ enum en_page_type { UNALLOCATED_PAGE, HEAD_PAGE, TAIL_PAGE, BLOB_PAGE, MAX_PAGE_ /******** Variables that affects how data pages are utilized ********/ -/* Minium size of tail segment */ -#define MIN_TAIL_SIZE 32 +/* Minimum size of tail segment */ +#define MIN_TAIL_SIZE 32U /* Fixed length part of Max possible header size; See row data structure diff --git a/storage/maria/ma_loghandler.h b/storage/maria/ma_loghandler.h index 5ac6d67413a..3719ec5e666 100644 --- a/storage/maria/ma_loghandler.h +++ b/storage/maria/ma_loghandler.h @@ -33,9 +33,9 @@ We allow all kind protections to be switched on together for people who really unsure in their hardware/OS. */ -#define TRANSLOG_PAGE_CRC 1 -#define TRANSLOG_SECTOR_PROTECTION (1<<1) -#define TRANSLOG_RECORD_CRC (1<<2) +#define TRANSLOG_PAGE_CRC 1U +#define TRANSLOG_SECTOR_PROTECTION (1U<<1) +#define TRANSLOG_RECORD_CRC (1U<<2) #define TRANSLOG_FLAGS_NUM ((TRANSLOG_PAGE_CRC | TRANSLOG_SECTOR_PROTECTION | \ TRANSLOG_RECORD_CRC) + 1) diff --git a/storage/maria/maria_chk.c b/storage/maria/maria_chk.c index 0c1c56dfa94..0e347cbbd47 100644 --- a/storage/maria/maria_chk.c +++ b/storage/maria/maria_chk.c @@ -384,13 +384,13 @@ static struct my_option my_long_options[] = &check_param.read_buffer_length, &check_param.read_buffer_length, 0, GET_ULONG, REQUIRED_ARG, (long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD, - (long) ~0L, (long) MALLOC_OVERHEAD, (long) 1L, 0}, + ~0ULL, (long) MALLOC_OVERHEAD, (long) 1L, 0}, { "write_buffer_size", OPT_WRITE_BUFFER_SIZE, "Write buffer size for sequential writes during repair of fixed size or dynamic size rows", &check_param.write_buffer_length, &check_param.write_buffer_length, 0, GET_ULONG, REQUIRED_ARG, (long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD, - (long) ~0L, (long) MALLOC_OVERHEAD, (long) 1L, 0}, + ~0UL, (long) MALLOC_OVERHEAD, (long) 1L, 0}, { "sort_buffer_size", OPT_SORT_BUFFER_SIZE, "Size of sort buffer. Used by --recover", &check_param.sort_buffer_length, diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h index 19910f4288d..f3c66e87c46 100644 --- a/storage/maria/maria_def.h +++ b/storage/maria/maria_def.h @@ -710,49 +710,49 @@ struct st_maria_handler #define F_EXTRA_LCK -1 /* bits in opt_flag */ -#define MEMMAP_USED 32 -#define REMEMBER_OLD_POS 64 +#define MEMMAP_USED 32U +#define REMEMBER_OLD_POS 64U -#define WRITEINFO_UPDATE_KEYFILE 1 -#define WRITEINFO_NO_UNLOCK 2 +#define WRITEINFO_UPDATE_KEYFILE 1U +#define WRITEINFO_NO_UNLOCK 2U /* once_flags */ -#define USE_PACKED_KEYS 1 -#define RRND_PRESERVE_LASTINX 2 +#define USE_PACKED_KEYS 1U +#define RRND_PRESERVE_LASTINX 2U /* bits in state.changed */ -#define STATE_CHANGED 1 -#define STATE_CRASHED 2 -#define STATE_CRASHED_ON_REPAIR 4 -#define STATE_NOT_ANALYZED 8 -#define STATE_NOT_OPTIMIZED_KEYS 16 -#define STATE_NOT_SORTED_PAGES 32 -#define STATE_NOT_OPTIMIZED_ROWS 64 -#define STATE_NOT_ZEROFILLED 128 -#define STATE_NOT_MOVABLE 256 -#define STATE_MOVED 512 /* set if base->uuid != maria_uuid */ -#define STATE_IN_REPAIR 1024 /* We are running repair on table */ -#define STATE_CRASHED_PRINTED 2048 +#define STATE_CHANGED 1U +#define STATE_CRASHED 2U +#define STATE_CRASHED_ON_REPAIR 4U +#define STATE_NOT_ANALYZED 8U +#define STATE_NOT_OPTIMIZED_KEYS 16U +#define STATE_NOT_SORTED_PAGES 32U +#define STATE_NOT_OPTIMIZED_ROWS 64U +#define STATE_NOT_ZEROFILLED 128U +#define STATE_NOT_MOVABLE 256U +#define STATE_MOVED 512U /* set if base->uuid != maria_uuid */ +#define STATE_IN_REPAIR 1024U /* We are running repair on table */ +#define STATE_CRASHED_PRINTED 2048U #define STATE_CRASHED_FLAGS (STATE_CRASHED | STATE_CRASHED_ON_REPAIR | STATE_CRASHED_PRINTED) /* options to maria_read_cache */ -#define READING_NEXT 1 -#define READING_HEADER 2 +#define READING_NEXT 1U +#define READING_HEADER 2U /* Number of bytes on key pages to indicate used size */ -#define KEYPAGE_USED_SIZE 2 -#define KEYPAGE_KEYID_SIZE 1 -#define KEYPAGE_FLAG_SIZE 1 -#define KEYPAGE_KEY_VERSION_SIZE 4 /* encryption */ -#define KEYPAGE_CHECKSUM_SIZE 4 +#define KEYPAGE_USED_SIZE 2U +#define KEYPAGE_KEYID_SIZE 1U +#define KEYPAGE_FLAG_SIZE 1U +#define KEYPAGE_KEY_VERSION_SIZE 4U /* encryption */ +#define KEYPAGE_CHECKSUM_SIZE 4U #define MAX_KEYPAGE_HEADER_SIZE (LSN_STORE_SIZE + KEYPAGE_USED_SIZE + \ KEYPAGE_KEYID_SIZE + KEYPAGE_FLAG_SIZE + \ TRANSID_SIZE + KEYPAGE_KEY_VERSION_SIZE) -#define KEYPAGE_FLAG_ISNOD 1 -#define KEYPAGE_FLAG_HAS_TRANSID 2 +#define KEYPAGE_FLAG_ISNOD 1U +#define KEYPAGE_FLAG_HAS_TRANSID 2U #define _ma_get_page_used(share,x) \ ((uint) mi_uint2korr((x) + (share)->keypage_header - KEYPAGE_USED_SIZE)) @@ -886,9 +886,9 @@ struct st_maria_handler #define MEMMAP_EXTRA_MARGIN 7 /* Write this as a suffix for file */ -#define PACK_TYPE_SELECTED 1 /* Bits in field->pack_type */ -#define PACK_TYPE_SPACE_FIELDS 2 -#define PACK_TYPE_ZERO_FILL 4 +#define PACK_TYPE_SELECTED 1U /* Bits in field->pack_type */ +#define PACK_TYPE_SPACE_FIELDS 2U +#define PACK_TYPE_ZERO_FILL 4U #define MARIA_FOUND_WRONG_KEY 32738 /* Impossible value from ha_key_cmp */ #define MARIA_BLOCK_SIZE(key_length,data_pointer,key_pointer,block_size) (((((key_length)+(data_pointer)+(key_pointer))*4+(key_pointer)+2)/(block_size)+1)*(block_size)) @@ -911,12 +911,12 @@ extern mysql_mutex_t THR_LOCK_maria; /* Some tuning parameters */ #define MARIA_MIN_KEYBLOCK_LENGTH 50 /* When to split delete blocks */ -#define MARIA_MIN_SIZE_BULK_INSERT_TREE 16384 /* this is per key */ +#define MARIA_MIN_SIZE_BULK_INSERT_TREE 16384U /* this is per key */ #define MARIA_MIN_ROWS_TO_USE_BULK_INSERT 100 #define MARIA_MIN_ROWS_TO_DISABLE_INDEXES 100 #define MARIA_MIN_ROWS_TO_USE_WRITE_CACHE 10 /* Keep a small buffer for tables only using small blobs */ -#define MARIA_SMALL_BLOB_BUFFER 1024 +#define MARIA_SMALL_BLOB_BUFFER 1024U #define MARIA_MAX_CONTROL_FILE_LOCK_RETRY 30 /* Retry this many times */ /* Some extern variables */ @@ -1247,12 +1247,12 @@ typedef struct st_maria_block_info /* bits in return from _ma_get_block_info */ -#define BLOCK_FIRST 1 -#define BLOCK_LAST 2 -#define BLOCK_DELETED 4 -#define BLOCK_ERROR 8 /* Wrong data */ -#define BLOCK_SYNC_ERROR 16 /* Right data at wrong place */ -#define BLOCK_FATAL_ERROR 32 /* hardware-error */ +#define BLOCK_FIRST 1U +#define BLOCK_LAST 2U +#define BLOCK_DELETED 4U +#define BLOCK_ERROR 8U /* Wrong data */ +#define BLOCK_SYNC_ERROR 16U /* Right data at wrong place */ +#define BLOCK_FATAL_ERROR 32U /* hardware-error */ #define NEED_MEM ((uint) 10*4*(IO_SIZE+32)+32) /* Nead for recursion */ #define MAXERR 20 @@ -1261,17 +1261,17 @@ typedef struct st_maria_block_info #define INDEX_TMP_EXT ".TMM" #define DATA_TMP_EXT ".TMD" -#define UPDATE_TIME 1 -#define UPDATE_STAT 2 -#define UPDATE_SORT 4 -#define UPDATE_AUTO_INC 8 -#define UPDATE_OPEN_COUNT 16 +#define UPDATE_TIME 1U +#define UPDATE_STAT 2U +#define UPDATE_SORT 4U +#define UPDATE_AUTO_INC 8U +#define UPDATE_OPEN_COUNT 16U /* We use MY_ALIGN_DOWN here mainly to ensure that we get stable values for mysqld --help ) */ #define PAGE_BUFFER_INIT MY_ALIGN_DOWN(1024L*1024L*256L-MALLOC_OVERHEAD, 8192) #define READ_BUFFER_INIT MY_ALIGN_DOWN(1024L*256L-MALLOC_OVERHEAD, 1024) #define SORT_BUFFER_INIT MY_ALIGN_DOWN(1024L*1024L*256L-MALLOC_OVERHEAD, 1024) -#define MIN_SORT_BUFFER 4096 +#define MIN_SORT_BUFFER 4096U #define fast_ma_writeinfo(INFO) if (!(INFO)->s->tot_locks) (void) _ma_writeinfo((INFO),0) #define fast_ma_readinfo(INFO) ((INFO)->lock_type == F_UNLCK) && _ma_readinfo((INFO),F_RDLCK,1) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result index 31906776bf4..c8360f2fbfa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result @@ -24,7 +24,7 @@ diaries CREATE TABLE `diaries` ( `subject` text DEFAULT NULL, PRIMARY KEY (`internal_id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -INSERT INTO diaries (subject, description) +INSERT IGNORE INTO diaries (subject, description) VALUES ("groonga (1)", "starting groonga."); Warnings: Warning 1364 Field 'internal_id' doesn't have a default value diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_zero_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_zero_date.result index b2364e1158e..022d6c00715 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_zero_date.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_zero_date.result @@ -10,12 +10,14 @@ timestamps CREATE TABLE `timestamps` ( `create_dt` date DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 +SET sql_mode = ''; INSERT INTO timestamps (create_dt) VALUES ("2012-00-01"); Warnings: Warning 1265 Data truncated for column 'create_dt' at row 1 INSERT INTO timestamps (create_dt) VALUES ("2012-01-00"); Warnings: Warning 1265 Data truncated for column 'create_dt' at row 1 +SET sql_mode = DEFAULT; SELECT * FROM timestamps; id create_dt 1 2012-01-01 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result index f7e0c7ed4e6..c5764cc110c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result @@ -14,7 +14,7 @@ diaries CREATE TABLE `diaries` ( ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('2038-01-18 03:14:07', '2038-01-18 03:14:07'); -INSERT INTO diaries (title, created_at) +INSERT IGNORE INTO diaries (title, created_at) VALUES ('2038-01-20 03:14:08', '2038-01-20 03:14:08'); Warnings: Warning 1265 Data truncated for column 'created_at' at row 1 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result index fa0c74686a4..a85d60af383 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result @@ -12,7 +12,7 @@ diaries CREATE TABLE `diaries` ( `created_at` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -INSERT INTO diaries (title, created_at) +INSERT IGNORE INTO diaries (title, created_at) VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); Warnings: Warning 1265 Data truncated for column 'created_at' at row 1 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result index 45af052b8d4..71dfa08c762 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result @@ -12,7 +12,7 @@ diaries CREATE TABLE `diaries` ( `created_at` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -INSERT INTO diaries (title, created_at) +INSERT IGNORE INTO diaries (title, created_at) VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); Warnings: Warning 1265 Data truncated for column 'created_at' at row 1 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result index bc91116f150..6044e24ad61 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result @@ -12,7 +12,7 @@ diaries CREATE TABLE `diaries` ( `created_at` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -INSERT INTO diaries (title, created_at) +INSERT IGNORE INTO diaries (title, created_at) VALUES ('2012', '2012'); Warnings: Warning 1265 Data truncated for column 'created_at' at row 1 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result index 7cca8d2f83e..db22d3d4c7c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result @@ -12,11 +12,13 @@ diaries CREATE TABLE `diaries` ( `created_at` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -INSERT INTO diaries (title, created_at) -VALUES ('2012', '2012'); +SET STATEMENT sql_mode = '' FOR +INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); Warnings: Warning 1265 Data truncated for column 'created_at' at row 1 Warning 1265 Data truncated for column 'created_at' at row 1 +INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); +ERROR 22007: Incorrect datetime value: '2012' for column 'created_at' at row 1 SELECT * FROM diaries; id title created_at 1 2012 0000-01-01 00:00:00 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result index c22a63f9744..4e05f0a2c52 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result @@ -10,12 +10,14 @@ timestamps CREATE TABLE `timestamps` ( `create_dt` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 +SET sql_mode=''; INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); Warnings: Warning 1265 Data truncated for column 'create_dt' at row 1 INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); Warnings: Warning 1265 Data truncated for column 'create_dt' at row 1 +SET sql_mode = DEFAULT; SELECT * FROM timestamps; id create_dt 1 2012-01-01 00:00:00 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result index 5e831860c5e..fc16c590dc0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result @@ -2,7 +2,7 @@ DROP TABLE IF EXISTS shops; CREATE TABLE shops ( location GEOMETRY NOT NULL ); -INSERT INTO shops VALUES (NULL), (NULL); +INSERT IGNORE INTO shops VALUES (NULL), (NULL); Warnings: Warning 1048 Column 'location' cannot be null Warning 1048 Column 'location' cannot be null diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result index 508ee135ef2..b27c0ee028c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result @@ -2,16 +2,16 @@ drop table if exists t1, t2, t3; create table t1 (_id int, a int, primary key (_id) using hash); insert into t1 values(null, 100); ERROR 23000: Column '_id' cannot be null -insert into t1 values(1,100); +insert ignore into t1 values(1,100); Warnings: Warning 1265 Data truncated for column '_id' at row 1 -insert into t1 values(1,100); +insert ignore into t1 values(1,100); Warnings: Warning 1265 Data truncated for column '_id' at row 1 -insert into t1 values(1,100); +insert ignore into t1 values(1,100); Warnings: Warning 1265 Data truncated for column '_id' at row 1 -insert into t1 values(1,100); +insert ignore into t1 values(1,100); Warnings: Warning 1265 Data truncated for column '_id' at row 1 select * from t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result index 86b06bc94dd..ff2f975f94f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result @@ -22,7 +22,7 @@ Jiro Yamada 27 Taro Yamada -12 Taro Yamada 10 Taro Yamada 29 -update scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27; +update ignore scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27; Warnings: Warning 1265 data truncated for primary key column: select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_32bit_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_32bit_equal.result index 2174efc1b4f..61ce4406987 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_32bit_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_32bit_equal.result @@ -5,17 +5,17 @@ start DATE, end DATE, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); +INSERT IGNORE INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); Warnings: Warning 1265 Data truncated for column 'start' at row 1 -INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT IGNORE INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); Warnings: Warning 1265 Data truncated for column 'start' at row 1 Warning 1265 Data truncated for column 'end' at row 1 -INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); +INSERT IGNORE INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); Warnings: Warning 1265 Data truncated for column 'end' at row 1 -INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +INSERT IGNORE INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); Warnings: Warning 1265 Data truncated for column 'start' at row 1 Warning 1265 Data truncated for column 'end' at row 1 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_asc.result index 0a64a822fb5..bc1c3c57daa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_asc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_asc.result @@ -5,17 +5,17 @@ start DATE, end DATE, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); +INSERT IGNORE INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); Warnings: Warning 1265 Data truncated for column 'end' at row 1 -INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); +INSERT IGNORE INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); Warnings: Warning 1265 Data truncated for column 'start' at row 1 -INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); +INSERT IGNORE INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); Warnings: Warning 1265 Data truncated for column 'start' at row 1 Warning 1265 Data truncated for column 'end' at row 1 -INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +INSERT IGNORE INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); Warnings: Warning 1265 Data truncated for column 'start' at row 1 Warning 1265 Data truncated for column 'end' at row 1 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_desc.result index 24439fdf5fa..820ee4f4465 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_desc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_32bit_desc.result @@ -5,17 +5,17 @@ start DATE, end DATE, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); +INSERT IGNORE INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); Warnings: Warning 1265 Data truncated for column 'end' at row 1 -INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); +INSERT IGNORE INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); Warnings: Warning 1265 Data truncated for column 'start' at row 1 -INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); +INSERT IGNORE INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); Warnings: Warning 1265 Data truncated for column 'start' at row 1 Warning 1265 Data truncated for column 'end' at row 1 -INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +INSERT IGNORE INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); Warnings: Warning 1265 Data truncated for column 'start' at row 1 Warning 1265 Data truncated for column 'end' at row 1 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.result index 155faf85510..130c03edd44 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.result @@ -5,14 +5,14 @@ start datetime, end datetime, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59"); +INSERT IGNORE INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59"); Warnings: Warning 1265 Data truncated for column 'start' at row 1 SELECT * FROM ranges; id start end 1 1990-01-01 00:00:00 2012-10-05 23:59:59 DELETE FROM ranges WHERE id = 1; -INSERT INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59"); +INSERT IGNORE INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59"); Warnings: Warning 1265 Data truncated for column 'start' at row 1 SELECT * FROM ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_32bit_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_32bit_equal.result index 04b3ba38395..ad936268b46 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_32bit_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_32bit_equal.result @@ -5,17 +5,17 @@ start YEAR, end YEAR, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, 1901, 2012); +INSERT IGNORE INTO ranges VALUES (1, 1901, 2012); Warnings: Warning 1265 Data truncated for column 'start' at row 1 -INSERT INTO ranges VALUES (2, 1901, 2155); +INSERT IGNORE INTO ranges VALUES (2, 1901, 2155); Warnings: Warning 1265 Data truncated for column 'start' at row 1 Warning 1265 Data truncated for column 'end' at row 1 -INSERT INTO ranges VALUES (3, 2012, 2155); +INSERT IGNORE INTO ranges VALUES (3, 2012, 2155); Warnings: Warning 1265 Data truncated for column 'end' at row 1 -INSERT INTO ranges VALUES (4, 2155, 1901); +INSERT IGNORE INTO ranges VALUES (4, 2155, 1901); Warnings: Warning 1265 Data truncated for column 'start' at row 1 Warning 1265 Data truncated for column 'end' at row 1 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_asc.result index 9a84d115a87..8200263a93c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_asc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_asc.result @@ -5,17 +5,17 @@ start YEAR, end YEAR, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, 2012, 2155); +INSERT IGNORE INTO ranges VALUES (1, 2012, 2155); Warnings: Warning 1265 Data truncated for column 'end' at row 1 -INSERT INTO ranges VALUES (2, 1901, 2012); +INSERT IGNORE INTO ranges VALUES (2, 1901, 2012); Warnings: Warning 1265 Data truncated for column 'start' at row 1 -INSERT INTO ranges VALUES (3, 2155, 1901); +INSERT IGNORE INTO ranges VALUES (3, 2155, 1901); Warnings: Warning 1265 Data truncated for column 'start' at row 1 Warning 1265 Data truncated for column 'end' at row 1 -INSERT INTO ranges VALUES (4, 1901, 2155); +INSERT IGNORE INTO ranges VALUES (4, 1901, 2155); Warnings: Warning 1265 Data truncated for column 'start' at row 1 Warning 1265 Data truncated for column 'end' at row 1 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_desc.result index 3deb7435030..fc85d2a98a1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_desc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_year_order_32bit_desc.result @@ -5,17 +5,17 @@ start YEAR, end YEAR, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, 2012, 2155); +INSERT IGNORE INTO ranges VALUES (1, 2012, 2155); Warnings: Warning 1265 Data truncated for column 'end' at row 1 -INSERT INTO ranges VALUES (2, 1901, 2012); +INSERT IGNORE INTO ranges VALUES (2, 1901, 2012); Warnings: Warning 1265 Data truncated for column 'start' at row 1 -INSERT INTO ranges VALUES (3, 2155, 1901); +INSERT IGNORE INTO ranges VALUES (3, 2155, 1901); Warnings: Warning 1265 Data truncated for column 'start' at row 1 Warning 1265 Data truncated for column 'end' at row 1 -INSERT INTO ranges VALUES (4, 1901, 2155); +INSERT IGNORE INTO ranges VALUES (4, 1901, 2155); Warnings: Warning 1265 Data truncated for column 'start' at row 1 Warning 1265 Data truncated for column 'end' at row 1 diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test index a9bbe403da1..ee25b482daa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test @@ -34,7 +34,7 @@ ALTER TABLE diaries CHANGE id internal_id INT; SHOW CREATE TABLE diaries; -INSERT INTO diaries (subject, description) +INSERT IGNORE INTO diaries (subject, description) VALUES ("groonga (1)", "starting groonga."); SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test index b6225075959..3442abca805 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test @@ -26,8 +26,10 @@ CREATE TABLE timestamps ( ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE timestamps; +SET sql_mode = ''; INSERT INTO timestamps (create_dt) VALUES ("2012-00-01"); INSERT INTO timestamps (create_dt) VALUES ("2012-01-00"); +SET sql_mode = DEFAULT; SELECT * FROM timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test index 9c3344cbe98..023f4e8b0b7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test @@ -30,7 +30,7 @@ SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('2038-01-18 03:14:07', '2038-01-18 03:14:07'); -INSERT INTO diaries (title, created_at) +INSERT IGNORE INTO diaries (title, created_at) VALUES ('2038-01-20 03:14:08', '2038-01-20 03:14:08'); SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test index 61eecbb2ac8..7e357067b54 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test @@ -28,7 +28,7 @@ CREATE TABLE diaries ( ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -INSERT INTO diaries (title, created_at) +INSERT IGNORE INTO diaries (title, created_at) VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test index 7bbfcbe7a3a..863bae8ecf1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test @@ -28,7 +28,7 @@ CREATE TABLE diaries ( ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -INSERT INTO diaries (title, created_at) +INSERT IGNORE INTO diaries (title, created_at) VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test index 2cc99562231..68ff4b664fa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test @@ -28,7 +28,7 @@ CREATE TABLE diaries ( ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -INSERT INTO diaries (title, created_at) +INSERT IGNORE INTO diaries (title, created_at) VALUES ('2012', '2012'); SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test index 18b501178bc..a4ab4da20a6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test @@ -32,8 +32,10 @@ CREATE TABLE diaries ( ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -INSERT INTO diaries (title, created_at) - VALUES ('2012', '2012'); +SET STATEMENT sql_mode = '' FOR +INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test index 5c39086d452..c41344cf655 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test @@ -26,8 +26,10 @@ CREATE TABLE timestamps ( ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE timestamps; +SET sql_mode=''; INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); +SET sql_mode = DEFAULT; SELECT * FROM timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test index a5f42e2c9f3..dc9ac4319ce 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test @@ -27,7 +27,7 @@ CREATE TABLE shops ( location GEOMETRY NOT NULL ); -INSERT INTO shops VALUES (NULL), (NULL); +INSERT IGNORE INTO shops VALUES (NULL), (NULL); SELECT ST_AsText(location) FROM shops; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test index 60ca970aa45..6aa4e04f7c8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test @@ -23,10 +23,10 @@ drop table if exists t1, t2, t3; create table t1 (_id int, a int, primary key (_id) using hash); --error ER_BAD_NULL_ERROR insert into t1 values(null, 100); -insert into t1 values(1,100); -insert into t1 values(1,100); -insert into t1 values(1,100); -insert into t1 values(1,100); +insert ignore into t1 values(1,100); +insert ignore into t1 values(1,100); +insert ignore into t1 values(1,100); +insert ignore into t1 values(1,100); select * from t1; select * from t1 where _id = 2; select * from t1 where _id = 20; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test index 26c76dd5207..c0f1e78552a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test @@ -32,7 +32,7 @@ insert into scores (name, score) values("Taro Yamada", -12); insert into scores (name, score) values("Jiro Yamada", 27); insert into scores (name, score) values("Taro Yamada", 10); select * from scores; -update scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27; +update ignore scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27; select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); drop table scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test index b206333d28d..66a0c463a34 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test @@ -29,10 +29,10 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); -INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +INSERT IGNORE INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); +INSERT IGNORE INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT IGNORE INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); +INSERT IGNORE INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); SELECT * FROM ranges FORCE INDEX(range_key) WHERE start = "1000-01-01" AND end = "9999-12-31"; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test index b877ed2f01a..09306536da9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test @@ -29,10 +29,10 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); -INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +INSERT IGNORE INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); +INSERT IGNORE INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); +INSERT IGNORE INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); +INSERT IGNORE INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start, end; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test index c3185bb0fdc..a3306fc776f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test @@ -29,10 +29,10 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); -INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +INSERT IGNORE INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); +INSERT IGNORE INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); +INSERT IGNORE INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); +INSERT IGNORE INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start DESC, end DESC; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test index 2782fc15363..65e639181fe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test @@ -27,11 +27,11 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59"); +INSERT IGNORE INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59"); SELECT * FROM ranges; DELETE FROM ranges WHERE id = 1; -INSERT INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59"); +INSERT IGNORE INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59"); SELECT * FROM ranges; DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test index 3daf3fa4153..b09214d0037 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test @@ -29,10 +29,10 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, 1901, 2012); -INSERT INTO ranges VALUES (2, 1901, 2155); -INSERT INTO ranges VALUES (3, 2012, 2155); -INSERT INTO ranges VALUES (4, 2155, 1901); +INSERT IGNORE INTO ranges VALUES (1, 1901, 2012); +INSERT IGNORE INTO ranges VALUES (2, 1901, 2155); +INSERT IGNORE INTO ranges VALUES (3, 2012, 2155); +INSERT IGNORE INTO ranges VALUES (4, 2155, 1901); SELECT * FROM ranges FORCE INDEX(range_key) WHERE start = 1901 AND end = 2155; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test index 774c06772a7..ffc00ddf1c1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test @@ -29,10 +29,10 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, 2012, 2155); -INSERT INTO ranges VALUES (2, 1901, 2012); -INSERT INTO ranges VALUES (3, 2155, 1901); -INSERT INTO ranges VALUES (4, 1901, 2155); +INSERT IGNORE INTO ranges VALUES (1, 2012, 2155); +INSERT IGNORE INTO ranges VALUES (2, 1901, 2012); +INSERT IGNORE INTO ranges VALUES (3, 2155, 1901); +INSERT IGNORE INTO ranges VALUES (4, 1901, 2155); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start, end; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test index bd0d20fe973..c714f4424d6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test @@ -29,10 +29,10 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, 2012, 2155); -INSERT INTO ranges VALUES (2, 1901, 2012); -INSERT INTO ranges VALUES (3, 2155, 1901); -INSERT INTO ranges VALUES (4, 1901, 2155); +INSERT IGNORE INTO ranges VALUES (1, 2012, 2155); +INSERT IGNORE INTO ranges VALUES (2, 1901, 2012); +INSERT IGNORE INTO ranges VALUES (3, 2155, 1901); +INSERT IGNORE INTO ranges VALUES (4, 1901, 2155); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start DESC, end DESC; diff --git a/storage/mroonga/vendor/groonga/lib/proc.c b/storage/mroonga/vendor/groonga/lib/proc.c index 86b0fd58c02..ba858de6f2a 100644 --- a/storage/mroonga/vendor/groonga/lib/proc.c +++ b/storage/mroonga/vendor/groonga/lib/proc.c @@ -713,7 +713,7 @@ grn_select_drilldown(grn_ctx *ctx, grn_obj *table, { uint32_t i; for (i = 0; i < n_keys; i++) { - grn_table_group_result g = {NULL, 0, 0, 1, GRN_TABLE_GROUP_CALC_COUNT, 0}; + grn_table_group_result g = {NULL, 0, 0, 1, GRN_TABLE_GROUP_CALC_COUNT, 0, 0 ,0}; uint32_t n_hits; int offset; int limit; diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 9e09853871d..46a7734ef22 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -67,7 +67,7 @@ static MYSQL_SYSVAR_ULONGLONG(max_sort_file_size, myisam_max_temp_length, static MYSQL_SYSVAR_SET(recover_options, myisam_recover_options, PLUGIN_VAR_OPCMDARG|PLUGIN_VAR_READONLY, "Specifies how corrupted tables should be automatically repaired", - NULL, NULL, 1, &myisam_recover_typelib); + NULL, NULL, HA_RECOVER_BACKUP|HA_RECOVER_QUICK, &myisam_recover_typelib); static MYSQL_THDVAR_ULONG(repair_threads, PLUGIN_VAR_RQCMDARG, "If larger than 1, when repairing a MyISAM table all indexes will be " @@ -664,8 +664,12 @@ static int compute_vcols(MI_INFO *info, uchar *record, int keynum) TABLE *table= (TABLE*)(info->external_ref); table->move_fields(table->field, record, table->field[0]->record_ptr()); if (keynum == -1) // update all vcols - return table->update_virtual_fields(VCOL_UPDATE_INDEXED); - + { + int error= table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_READ); + if (table->update_virtual_fields(table->file, VCOL_UPDATE_INDEXED)) + error= 1; + return error; + } // update only one key KEY *key= table->key_info + keynum; KEY_PART_INFO *kp= key->key_part, *end= kp + key->ext_key_parts; diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index 8de200f5e72..8711b9ff9aa 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -2781,7 +2781,7 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info, del=info->state->del; param->glob_crc=0; /* for compressed tables */ - max_pack_reclength= share->base.pack_reclength; + max_pack_reclength= MY_MAX(share->base.pack_reclength, share->vreclength); if (share->options & HA_OPTION_COMPRESS_RECORD) set_if_bigger(max_pack_reclength, share->max_pack_length); if (!(sort_param=(MI_SORT_PARAM *) diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c index 01a13a6225c..5bd5554db51 100644 --- a/storage/myisam/mi_open.c +++ b/storage/myisam/mi_open.c @@ -376,6 +376,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) { uint real_length= pos->flag & HA_BLOB_PART ? pos->bit_start : pos->length; + if (pos->type == HA_KEYTYPE_BIT && pos->bit_length) + real_length--; set_if_bigger(share->vreclength, pos->start + real_length); } } @@ -740,6 +742,7 @@ uchar *mi_alloc_rec_buff(MI_INFO *info, ulong length, uchar **buf) else length= info->s->base.pack_reclength; length= MY_MAX(length, info->s->base.max_key_length); + length= MY_MAX(length, info->s->vreclength); /* Avoid unnecessary realloc */ if (newptr && length == old_length) return newptr; diff --git a/storage/myisam/myisamdef.h b/storage/myisam/myisamdef.h index f467d44bcb9..8467daaafc3 100644 --- a/storage/myisam/myisamdef.h +++ b/storage/myisam/myisamdef.h @@ -1,5 +1,6 @@ /* Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -92,16 +93,16 @@ typedef struct st_mi_state_info } MI_STATE_INFO; #define MI_STATE_INFO_SIZE (24+14*8+7*4+2*2+8) -#define MI_STATE_KEY_SIZE 8 -#define MI_STATE_KEYBLOCK_SIZE 8 -#define MI_STATE_KEYSEG_SIZE 4 +#define MI_STATE_KEY_SIZE 8U +#define MI_STATE_KEYBLOCK_SIZE 8U +#define MI_STATE_KEYSEG_SIZE 4U #define MI_STATE_EXTRA_SIZE ((MI_MAX_KEY+MI_MAX_KEY_BLOCK_SIZE)*MI_STATE_KEY_SIZE + MI_MAX_KEY*HA_MAX_KEY_SEG*MI_STATE_KEYSEG_SIZE) #define MI_KEYDEF_SIZE (2+ 5*2) #define MI_UNIQUEDEF_SIZE (2+1+1) #define HA_KEYSEG_SIZE (6+ 2*2 + 4*2) #define MI_COLUMNDEF_SIZE (2*3+1) #define MI_BASE_INFO_SIZE (5*8 + 8*4 + 4 + 4*2 + 16) -#define MI_INDEX_BLOCK_MARGIN 16 /* Safety margin for .MYI tables */ +#define MI_INDEX_BLOCK_MARGIN 16U /* Safety margin for .MYI tables */ typedef struct st_mi_base_info { @@ -311,27 +312,27 @@ struct st_myisam_info #define USE_WHOLE_KEY (HA_MAX_KEY_BUFF*2) /* Use whole key in _mi_search() */ #define F_EXTRA_LCK -1 /* bits in opt_flag */ -#define MEMMAP_USED 32 -#define REMEMBER_OLD_POS 64 +#define MEMMAP_USED 32U +#define REMEMBER_OLD_POS 64U -#define WRITEINFO_UPDATE_KEYFILE 1 -#define WRITEINFO_NO_UNLOCK 2 +#define WRITEINFO_UPDATE_KEYFILE 1U +#define WRITEINFO_NO_UNLOCK 2U /* once_flags */ -#define USE_PACKED_KEYS 1 -#define RRND_PRESERVE_LASTINX 2 +#define USE_PACKED_KEYS 1U +#define RRND_PRESERVE_LASTINX 2U /* bits in state.changed */ -#define STATE_CHANGED 1 -#define STATE_CRASHED 2 -#define STATE_CRASHED_ON_REPAIR 4 -#define STATE_NOT_ANALYZED 8 -#define STATE_NOT_OPTIMIZED_KEYS 16 -#define STATE_NOT_SORTED_PAGES 32 +#define STATE_CHANGED 1U +#define STATE_CRASHED 2U +#define STATE_CRASHED_ON_REPAIR 4U +#define STATE_NOT_ANALYZED 8U +#define STATE_NOT_OPTIMIZED_KEYS 16U +#define STATE_NOT_SORTED_PAGES 32U /* options to mi_read_cache */ -#define READING_NEXT 1 -#define READING_HEADER 2 +#define READING_NEXT 1U +#define READING_HEADER 2U #define mi_getint(x) ((uint) mi_uint2korr(x) & 32767) #define mi_putint(x,y,nod) { uint16 boh=(nod ? (uint16) 32768 : 0) + (uint16) (y);\ @@ -384,17 +385,17 @@ struct st_myisam_info #define MI_MAX_DYN_BLOCK_HEADER 20 /* Max prefix of record-block */ #define MI_BLOCK_INFO_HEADER_LENGTH 20 #define MI_DYN_DELETE_BLOCK_HEADER 20 /* length of delete-block-header */ -#define MI_DYN_MAX_BLOCK_LENGTH ((1L << 24)-4L) +#define MI_DYN_MAX_BLOCK_LENGTH ((1UL << 24)-4UL) #define MI_DYN_MAX_ROW_LENGTH (MI_DYN_MAX_BLOCK_LENGTH - MI_SPLIT_LENGTH) -#define MI_DYN_ALIGN_SIZE 4 /* Align blocks on this */ +#define MI_DYN_ALIGN_SIZE 4U /* Align blocks on this */ #define MI_MAX_DYN_HEADER_BYTE 13 /* max header byte for dynamic rows */ -#define MI_MAX_BLOCK_LENGTH ((((ulong) 1 << 24)-1) & (~ (ulong) (MI_DYN_ALIGN_SIZE-1))) +#define MI_MAX_BLOCK_LENGTH (((1U << 24)-1) & (~(MI_DYN_ALIGN_SIZE-1))) #define MI_REC_BUFF_OFFSET ALIGN_SIZE(MI_DYN_DELETE_BLOCK_HEADER+sizeof(uint32)) -#define PACK_TYPE_SELECTED 1 /* Bits in field->pack_type */ -#define PACK_TYPE_SPACE_FIELDS 2 -#define PACK_TYPE_ZERO_FILL 4 +#define PACK_TYPE_SELECTED 1U /* Bits in field->pack_type */ +#define PACK_TYPE_SPACE_FIELDS 2U +#define PACK_TYPE_ZERO_FILL 4U #define MI_FOUND_WRONG_KEY 0x7FFFFFFF /* Impossible value from ha_key_cmp */ #define MI_MAX_KEY_BLOCK_SIZE (MI_MAX_KEY_BLOCK_LENGTH/MI_MIN_KEY_BLOCK_LENGTH) @@ -402,7 +403,7 @@ struct st_myisam_info #define MI_MAX_KEYPTR_SIZE 5 /* For calculating block lengths */ #define MI_MIN_KEYBLOCK_LENGTH 50 /* When to split delete blocks */ -#define MI_MIN_SIZE_BULK_INSERT_TREE 16384 /* this is per key */ +#define MI_MIN_SIZE_BULK_INSERT_TREE 16384U /* this is per key */ #define MI_MIN_ROWS_TO_USE_BULK_INSERT 100 #define MI_MIN_ROWS_TO_DISABLE_INDEXES 100 #define MI_MIN_ROWS_TO_USE_WRITE_CACHE 10 @@ -609,12 +610,12 @@ typedef struct st_mi_block_info /* Parameter to _mi_get_block_info */ /* bits in return from _mi_get_block_info */ -#define BLOCK_FIRST 1 -#define BLOCK_LAST 2 -#define BLOCK_DELETED 4 -#define BLOCK_ERROR 8 /* Wrong data */ -#define BLOCK_SYNC_ERROR 16 /* Right data at wrong place */ -#define BLOCK_FATAL_ERROR 32 /* hardware-error */ +#define BLOCK_FIRST 1U +#define BLOCK_LAST 2U +#define BLOCK_DELETED 4U +#define BLOCK_ERROR 8U /* Wrong data */ +#define BLOCK_SYNC_ERROR 16U /* Right data at wrong place */ +#define BLOCK_FATAL_ERROR 32U /* hardware-error */ #define NEED_MEM ((uint) 10*4*(IO_SIZE+32)+32) /* Nead for recursion */ #define MAXERR 20 @@ -623,17 +624,17 @@ typedef struct st_mi_block_info /* Parameter to _mi_get_block_info */ #define INDEX_TMP_EXT ".TMM" #define DATA_TMP_EXT ".TMD" -#define UPDATE_TIME 1 -#define UPDATE_STAT 2 -#define UPDATE_SORT 4 -#define UPDATE_AUTO_INC 8 -#define UPDATE_OPEN_COUNT 16 +#define UPDATE_TIME 1U +#define UPDATE_STAT 2U +#define UPDATE_SORT 4U +#define UPDATE_AUTO_INC 8U +#define UPDATE_OPEN_COUNT 16U /* We use MY_ALIGN_DOWN here mainly to ensure that we get stable values for mysqld --help ) */ #define KEY_BUFFER_INIT MY_ALIGN_DOWN(1024L*1024L-MALLOC_OVERHEAD, IO_SIZE) #define READ_BUFFER_INIT MY_ALIGN_DOWN(1024L*256L-MALLOC_OVERHEAD, 1024) #define SORT_BUFFER_INIT MY_ALIGN_DOWN(1024L*1024L*128L-MALLOC_OVERHEAD, 1024) -#define MIN_SORT_BUFFER 4096 +#define MIN_SORT_BUFFER 4096U enum myisam_log_commands { diff --git a/storage/myisam/sort.c b/storage/myisam/sort.c index d411272c273..0d177072ec7 100644 --- a/storage/myisam/sort.c +++ b/storage/myisam/sort.c @@ -869,13 +869,13 @@ static my_off_t read_to_buffer(IO_CACHE *fromfile, BUFFPEK *buffpek, uint sort_length) { register ha_keys count; - my_off_t length; + size_t length; if ((count= (ha_keys) MY_MIN((ha_rows) buffpek->max_keys, (ha_rows) buffpek->count))) { if (my_b_pread(fromfile, (uchar*) buffpek->base, - (length= (my_off_t) (sort_length * count)), + (length= (size_t) (sort_length * count)), buffpek->file_pos)) return(HA_OFFSET_ERROR); buffpek->key=buffpek->base; diff --git a/storage/oqgraph/oqgraph_thunk.cc b/storage/oqgraph/oqgraph_thunk.cc index 128e6191d98..19a709a1c59 100644 --- a/storage/oqgraph/oqgraph_thunk.cc +++ b/storage/oqgraph/oqgraph_thunk.cc @@ -193,9 +193,6 @@ int oqgraph3::cursor::restore_position() return rc; } - if (table.vfield) - table.update_virtual_fields(VCOL_UPDATE_FOR_READ); - table.file->position(table.record[0]); while (memcmp(table.file->ref, _position.data(), table.file->ref_length)) @@ -206,9 +203,6 @@ int oqgraph3::cursor::restore_position() return rc; } - if (table.vfield) - table.update_virtual_fields(VCOL_UPDATE_FOR_READ); - if ((_origid && vertex_id(_graph->_source->val_int()) != *_origid) || (_destid && vertex_id(_graph->_target->val_int()) != *_destid)) { @@ -230,9 +224,6 @@ int oqgraph3::cursor::restore_position() table.file->ha_rnd_end(); return rc; } - - if (table.vfield) - table.update_virtual_fields(VCOL_UPDATE_FOR_READ); } _graph->_cursor= this; @@ -310,8 +301,6 @@ int oqgraph3::cursor::seek_next() return clear_position(rc); } - if (table.vfield) - table.update_virtual_fields(VCOL_UPDATE_FOR_READ); _graph->_stale= true; if ((_origid && vertex_id(_graph->_source->val_int()) != *_origid) || @@ -345,8 +334,6 @@ int oqgraph3::cursor::seek_prev() return clear_position(rc); } - if (table.vfield) - table.update_virtual_fields(VCOL_UPDATE_FOR_READ); _graph->_stale= true; if ((_origid && vertex_id(_graph->_source->val_int()) != *_origid) || @@ -507,9 +494,6 @@ int oqgraph3::cursor::seek_to( return clear_position(rc); } - if (table.vfield) - table.update_virtual_fields(VCOL_UPDATE_FOR_READ); - if ((_origid && vertex_id(_graph->_source->val_int()) != *_origid) || (_destid && vertex_id(_graph->_target->val_int()) != *_destid)) { diff --git a/storage/perfschema/pfs.cc b/storage/perfschema/pfs.cc index 4cd1a35fd77..b58862d4824 100644 --- a/storage/perfschema/pfs.cc +++ b/storage/perfschema/pfs.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2562,10 +2562,7 @@ start_table_io_wait_v1(PSI_table_locker_state *state, if (! pfs_table->m_io_enabled) return NULL; - PFS_thread *pfs_thread= pfs_table->m_thread_owner; - - DBUG_ASSERT(pfs_thread == - my_pthread_getspecific_ptr(PFS_thread*, THR_PFS)); + PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS); register uint flags; ulonglong timer_start= 0; @@ -2668,7 +2665,7 @@ start_table_lock_wait_v1(PSI_table_locker_state *state, if (! pfs_table->m_lock_enabled) return NULL; - PFS_thread *pfs_thread= pfs_table->m_thread_owner; + PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS); PFS_TL_LOCK_TYPE lock_type; @@ -3070,7 +3067,12 @@ start_socket_wait_v1(PSI_socket_locker_state *state, if (flag_thread_instrumentation) { - PFS_thread *pfs_thread= pfs_socket->m_thread_owner; + /* + Do not use pfs_socket->m_thread_owner here, + as different threads may use concurrently the same socket, + for example during a KILL. + */ + PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS); if (unlikely(pfs_thread == NULL)) return NULL; @@ -3438,6 +3440,8 @@ static void end_idle_wait_v1(PSI_idle_locker* locker) if (flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } @@ -3519,6 +3523,8 @@ static void end_mutex_wait_v1(PSI_mutex_locker* locker, int rc) if (flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } } @@ -3598,6 +3604,8 @@ static void end_rwlock_rdwait_v1(PSI_rwlock_locker* locker, int rc) if (flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } } @@ -3670,6 +3678,8 @@ static void end_rwlock_wrwait_v1(PSI_rwlock_locker* locker, int rc) if (flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } } @@ -3734,6 +3744,8 @@ static void end_cond_wait_v1(PSI_cond_locker* locker, int rc) if (flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } } @@ -3828,6 +3840,8 @@ static void end_table_io_wait_v1(PSI_table_locker* locker) if (flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } @@ -3897,6 +3911,8 @@ static void end_table_lock_wait_v1(PSI_table_locker* locker) if (flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } @@ -4145,6 +4161,8 @@ static void end_file_wait_v1(PSI_file_locker *locker, if (flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } } @@ -5074,6 +5092,8 @@ static void end_socket_wait_v1(PSI_socket_locker *locker, size_t byte_count) if (flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; + + DBUG_ASSERT(wait == thread->m_events_waits_current); } } diff --git a/storage/perfschema/pfs_autosize.cc b/storage/perfschema/pfs_autosize.cc index 9bf70ceb216..6f267cb4599 100644 --- a/storage/perfschema/pfs_autosize.cc +++ b/storage/perfschema/pfs_autosize.cc @@ -132,7 +132,7 @@ PFS_sizing_data small_data= /* Min tables */ 200, /* Load factors */ - 0.90, 0.90, 0.90 + 0.90f, 0.90f, 0.90f }; PFS_sizing_data medium_data= @@ -148,7 +148,7 @@ PFS_sizing_data medium_data= /* Min tables */ 500, /* Load factors */ - 0.70, 0.80, 0.90 + 0.70f, 0.80f, 0.90f }; PFS_sizing_data large_data= @@ -164,7 +164,7 @@ PFS_sizing_data large_data= /* Min tables */ 10000, /* Load factors */ - 0.50, 0.65, 0.80 + 0.50f, 0.65f, 0.80f }; static inline ulong apply_load_factor(ulong raw_value, float factor) diff --git a/storage/perfschema/pfs_digest.cc b/storage/perfschema/pfs_digest.cc index 0a01ee08993..3330c29795f 100644 --- a/storage/perfschema/pfs_digest.cc +++ b/storage/perfschema/pfs_digest.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ bool flag_statements_digest= true; Current index in Stat array where new record is to be inserted. index 0 is reserved for "all else" case when entire array is full. */ -volatile uint32 digest_index; +volatile uint32 PFS_ALIGNED digest_monotonic_index; bool digest_full= false; LF_HASH digest_hash; @@ -65,7 +65,7 @@ int init_digest(const PFS_global_param *param) */ digest_max= param->m_digest_sizing; digest_lost= 0; - digest_index= 1; + PFS_atomic::store_u32(& digest_monotonic_index, 1); digest_full= false; if (digest_max == 0) @@ -107,6 +107,9 @@ int init_digest(const PFS_global_param *param) + index * pfs_max_digest_length, pfs_max_digest_length); } + /* Set record[0] as allocated. */ + statements_digest_stat_array[0].m_lock.set_allocated(); + return 0; } @@ -209,9 +212,10 @@ find_or_create_digest(PFS_thread *thread, memcpy(hash_key.m_schema_name, schema_name, schema_name_length); int res; - ulong safe_index; uint retry_count= 0; const uint retry_max= 3; + size_t safe_index; + size_t attempts= 0; PFS_statements_digest_stat **entry; PFS_statements_digest_stat *pfs= NULL; @@ -247,55 +251,70 @@ search: return & pfs->m_stat; } - safe_index= PFS_atomic::add_u32(& digest_index, 1); - if (safe_index >= digest_max) + while (++attempts <= digest_max) { - /* The digest array is now full. */ - digest_full= true; - pfs= &statements_digest_stat_array[0]; - - if (pfs->m_first_seen == 0) - pfs->m_first_seen= now; - pfs->m_last_seen= now; - return & pfs->m_stat; - } - - /* Add a new record in digest stat array. */ - pfs= &statements_digest_stat_array[safe_index]; - - /* Copy digest hash/LF Hash search key. */ - memcpy(& pfs->m_digest_key, &hash_key, sizeof(PFS_digest_key)); - - /* - Copy digest storage to statement_digest_stat_array so that it could be - used later to generate digest text. - */ - pfs->m_digest_storage.copy(digest_storage); - - pfs->m_first_seen= now; - pfs->m_last_seen= now; - - res= lf_hash_insert(&digest_hash, pins, &pfs); - if (likely(res == 0)) - { - return & pfs->m_stat; - } - - if (res > 0) - { - /* Duplicate insert by another thread */ - if (++retry_count > retry_max) + safe_index= PFS_atomic::add_u32(& digest_monotonic_index, 1) % digest_max; + if (safe_index == 0) { - /* Avoid infinite loops */ - digest_lost++; - return NULL; + /* Record [0] is reserved. */ + safe_index= 1; + } + + /* Add a new record in digest stat array. */ + pfs= &statements_digest_stat_array[safe_index]; + + if (pfs->m_lock.is_free()) + { + if (pfs->m_lock.free_to_dirty()) + { + /* Copy digest hash/LF Hash search key. */ + memcpy(& pfs->m_digest_key, &hash_key, sizeof(PFS_digest_key)); + + /* + Copy digest storage to statement_digest_stat_array so that it could be + used later to generate digest text. + */ + pfs->m_digest_storage.copy(digest_storage); + + pfs->m_first_seen= now; + pfs->m_last_seen= now; + + res= lf_hash_insert(&digest_hash, pins, &pfs); + if (likely(res == 0)) + { + pfs->m_lock.dirty_to_allocated(); + return & pfs->m_stat; + } + + pfs->m_lock.dirty_to_free(); + + if (res > 0) + { + /* Duplicate insert by another thread */ + if (++retry_count > retry_max) + { + /* Avoid infinite loops */ + digest_lost++; + return NULL; + } + goto search; + } + + /* OOM in lf_hash_insert */ + digest_lost++; + return NULL; + } } - goto search; } - /* OOM in lf_hash_insert */ - digest_lost++; - return NULL; + /* The digest array is now full. */ + digest_full= true; + pfs= &statements_digest_stat_array[0]; + + if (pfs->m_first_seen == 0) + pfs->m_first_seen= now; + pfs->m_last_seen= now; + return & pfs->m_stat; } void purge_digest(PFS_thread* thread, PFS_digest_key *hash_key) @@ -322,10 +341,12 @@ void purge_digest(PFS_thread* thread, PFS_digest_key *hash_key) void PFS_statements_digest_stat::reset_data(unsigned char *token_array, uint length) { + m_lock.set_dirty(); m_digest_storage.reset(token_array, length); m_stat.reset(); m_first_seen= 0; m_last_seen= 0; + m_lock.dirty_to_free(); } void PFS_statements_digest_stat::reset_index(PFS_thread *thread) @@ -353,11 +374,14 @@ void reset_esms_by_digest() statements_digest_stat_array[index].reset_data(statements_digest_token_array + index * pfs_max_digest_length, pfs_max_digest_length); } + /* Mark record[0] as allocated again. */ + statements_digest_stat_array[0].m_lock.set_allocated(); + /* Reset index which indicates where the next calculated digest information to be inserted in statements_digest_stat_array. */ - digest_index= 1; + PFS_atomic::store_u32(& digest_monotonic_index, 1); digest_full= false; } diff --git a/storage/perfschema/pfs_digest.h b/storage/perfschema/pfs_digest.h index 76d6c33d984..429a9f4250a 100644 --- a/storage/perfschema/pfs_digest.h +++ b/storage/perfschema/pfs_digest.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,6 +44,9 @@ struct PFS_digest_key /** A statement digest stat record. */ struct PFS_ALIGNED PFS_statements_digest_stat { + /** Internal lock. */ + pfs_lock m_lock; + /** Digest Schema + MD5 Hash. */ PFS_digest_key m_digest_key; diff --git a/storage/perfschema/pfs_events_waits.h b/storage/perfschema/pfs_events_waits.h index a7f7a095b9f..6a50134ad44 100644 --- a/storage/perfschema/pfs_events_waits.h +++ b/storage/perfschema/pfs_events_waits.h @@ -1,4 +1,5 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -97,13 +98,13 @@ struct PFS_events_waits : public PFS_events }; /** TIMED bit in the state flags bitfield. */ -#define STATE_FLAG_TIMED (1<<0) +#define STATE_FLAG_TIMED (1U<<0) /** THREAD bit in the state flags bitfield. */ -#define STATE_FLAG_THREAD (1<<1) +#define STATE_FLAG_THREAD (1U<<1) /** EVENT bit in the state flags bitfield. */ -#define STATE_FLAG_EVENT (1<<2) +#define STATE_FLAG_EVENT (1U<<2) /** DIGEST bit in the state flags bitfield. */ -#define STATE_FLAG_DIGEST (1<<3) +#define STATE_FLAG_DIGEST (1U<<3) void insert_events_waits_history(PFS_thread *thread, PFS_events_waits *wait); diff --git a/storage/perfschema/pfs_lock.h b/storage/perfschema/pfs_lock.h index 09efecd1c5f..be84d0f7fb4 100644 --- a/storage/perfschema/pfs_lock.h +++ b/storage/perfschema/pfs_lock.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -155,6 +155,18 @@ struct pfs_lock PFS_atomic::store_u32(&m_version_state, new_val); } + /** + Initialize a lock to dirty. + */ + void set_dirty(void) + { + /* Do not set the version to 0, read the previous value. */ + uint32 copy= PFS_atomic::load_u32(&m_version_state); + /* Increment the version, set the DIRTY state */ + uint32 new_val= (copy & VERSION_MASK) + VERSION_INC + PFS_LOCK_DIRTY; + PFS_atomic::store_u32(&m_version_state, new_val); + } + /** Execute a dirty to free transition. This transition should be executed by the writer that owns the record. diff --git a/storage/perfschema/table_esms_by_digest.cc b/storage/perfschema/table_esms_by_digest.cc index 88860a77c5d..6c2b173d000 100644 --- a/storage/perfschema/table_esms_by_digest.cc +++ b/storage/perfschema/table_esms_by_digest.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -113,11 +113,14 @@ int table_esms_by_digest::rnd_next(void) m_pos.next()) { digest_stat= &statements_digest_stat_array[m_pos.m_index]; - if (digest_stat->m_first_seen != 0) + if (digest_stat->m_lock.is_populated()) { - make_row(digest_stat); - m_next_pos.set_after(&m_pos); - return 0; + if (digest_stat->m_first_seen != 0) + { + make_row(digest_stat); + m_next_pos.set_after(&m_pos); + return 0; + } } } @@ -135,10 +138,13 @@ table_esms_by_digest::rnd_pos(const void *pos) set_position(pos); digest_stat= &statements_digest_stat_array[m_pos.m_index]; - if (digest_stat->m_first_seen != 0) + if (digest_stat->m_lock.is_populated()) { - make_row(digest_stat); - return 0; + if (digest_stat->m_first_seen != 0) + { + make_row(digest_stat); + return 0; + } } return HA_ERR_RECORD_DELETED; diff --git a/storage/perfschema/unittest/pfs-t.cc b/storage/perfschema/unittest/pfs-t.cc index 6121fac098f..f76b1aa2e75 100644 --- a/storage/perfschema/unittest/pfs-t.cc +++ b/storage/perfschema/unittest/pfs-t.cc @@ -1316,6 +1316,7 @@ void test_locker_disabled() /* Pretend the socket does not have a thread owner */ /* ---------------------------------------------- */ + psi->delete_current_thread(); socket_class_A->m_enabled= true; socket_A1= psi->init_socket(socket_key_A, NULL, NULL, 0); ok(socket_A1 != NULL, "instrumented"); diff --git a/storage/sphinx/mysql-test/sphinx/suite.pm b/storage/sphinx/mysql-test/sphinx/suite.pm index 06680cc087f..24c377d7665 100644 --- a/storage/sphinx/mysql-test/sphinx/suite.pm +++ b/storage/sphinx/mysql-test/sphinx/suite.pm @@ -16,13 +16,16 @@ sub locate_sphinx_binary { for (@list) { return $_ if -x $_; } } -# Look for Sphinx binaries. +# Look for Sphinx binaries my $exe_sphinx_indexer = &locate_sphinx_binary('indexer'); -my $exe_sphinx_searchd = &locate_sphinx_binary('searchd'); +return "'indexer' binary not found" unless $exe_sphinx_indexer; -return "No Sphinx" unless $exe_sphinx_indexer and $exe_sphinx_searchd; -return "No SphinxSE" unless $ENV{HA_SPHINX_SO} or - $::mysqld_variables{'sphinx'} eq "ON"; +my $exe_sphinx_searchd = &locate_sphinx_binary('searchd'); +return "'searchd' binary not found" unless $exe_sphinx_searchd; + +# Check for Sphinx engine + +return "SphinxSE not found" unless $ENV{HA_SPHINX_SO} or $::mysqld_variables{'sphinx'} eq "ON"; { local $_ = `"$exe_sphinx_searchd" --help`; diff --git a/storage/spider/spd_db_include.h b/storage/spider/spd_db_include.h index 56dbc9ce0dc..929b9778556 100644 --- a/storage/spider/spd_db_include.h +++ b/storage/spider/spd_db_include.h @@ -182,32 +182,32 @@ typedef st_spider_result SPIDER_RESULT; #define SPIDER_SQL_LCL_NAME_QUOTE_STR "`" #define SPIDER_SQL_LCL_NAME_QUOTE_LEN (sizeof(SPIDER_SQL_LCL_NAME_QUOTE_STR) - 1) -#define SPIDER_CONN_KIND_MYSQL (1 << 0) +#define SPIDER_CONN_KIND_MYSQL (1U << 0) #if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) -#define SPIDER_CONN_KIND_HS_READ (1 << 2) -#define SPIDER_CONN_KIND_HS_WRITE (1 << 3) +#define SPIDER_CONN_KIND_HS_READ (1U << 2) +#define SPIDER_CONN_KIND_HS_WRITE (1U << 3) #endif -#define SPIDER_SQL_KIND_SQL (1 << 0) -#define SPIDER_SQL_KIND_HANDLER (1 << 1) +#define SPIDER_SQL_KIND_SQL (1U << 0) +#define SPIDER_SQL_KIND_HANDLER (1U << 1) #if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) -#define SPIDER_SQL_KIND_HS (1 << 2) +#define SPIDER_SQL_KIND_HS (1U << 2) #endif -#define SPIDER_SQL_TYPE_SELECT_SQL (1 << 0) -#define SPIDER_SQL_TYPE_INSERT_SQL (1 << 1) -#define SPIDER_SQL_TYPE_UPDATE_SQL (1 << 2) -#define SPIDER_SQL_TYPE_DELETE_SQL (1 << 3) -#define SPIDER_SQL_TYPE_BULK_UPDATE_SQL (1 << 4) -#define SPIDER_SQL_TYPE_TMP_SQL (1 << 5) -#define SPIDER_SQL_TYPE_DROP_TMP_TABLE_SQL (1 << 6) -#define SPIDER_SQL_TYPE_OTHER_SQL (1 << 7) -#define SPIDER_SQL_TYPE_HANDLER (1 << 8) -#define SPIDER_SQL_TYPE_SELECT_HS (1 << 9) -#define SPIDER_SQL_TYPE_INSERT_HS (1 << 10) -#define SPIDER_SQL_TYPE_UPDATE_HS (1 << 11) -#define SPIDER_SQL_TYPE_DELETE_HS (1 << 12) -#define SPIDER_SQL_TYPE_OTHER_HS (1 << 13) +#define SPIDER_SQL_TYPE_SELECT_SQL (1U << 0) +#define SPIDER_SQL_TYPE_INSERT_SQL (1U << 1) +#define SPIDER_SQL_TYPE_UPDATE_SQL (1U << 2) +#define SPIDER_SQL_TYPE_DELETE_SQL (1U << 3) +#define SPIDER_SQL_TYPE_BULK_UPDATE_SQL (1U << 4) +#define SPIDER_SQL_TYPE_TMP_SQL (1U << 5) +#define SPIDER_SQL_TYPE_DROP_TMP_TABLE_SQL (1U << 6) +#define SPIDER_SQL_TYPE_OTHER_SQL (1U << 7) +#define SPIDER_SQL_TYPE_HANDLER (1U << 8) +#define SPIDER_SQL_TYPE_SELECT_HS (1U << 9) +#define SPIDER_SQL_TYPE_INSERT_HS (1U << 10) +#define SPIDER_SQL_TYPE_UPDATE_HS (1U << 11) +#define SPIDER_SQL_TYPE_DELETE_HS (1U << 12) +#define SPIDER_SQL_TYPE_OTHER_HS (1U << 13) enum spider_bulk_upd_start { SPD_BU_NOT_START, diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_master_tokudb.result b/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_master_tokudb.result index 58291bc7fd1..6ee39039985 100644 --- a/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_master_tokudb.result +++ b/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_master_tokudb.result @@ -191,11 +191,11 @@ INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: binary data'; INSERT into t31 set f1=1, f2=1, f3=1, f4='first'; -INSERT into t31 set f1=1, f2=1, f3=2, f4='second', +insert ignore into t31 set f1=1, f2=1, f3=2, f4='second', f9=2.2, f10='seven samurai', f28=222.222, f35='222'; Warnings: Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1 -INSERT into t31 values (1, 1, 3, 'third', +insert ignore into t31 values (1, 1, 3, 'third', /* f5 BIGINT, */ 333333333333333333333333, /* f6 BLOB, */ '3333333333333333333333', /* f7 DATE, */ '2007-07-18', @@ -231,7 +231,7 @@ INSERT into t31 values (1, 1, 3, 'third', Warnings: Warning 1264 Out of range value for column 'f5' at row 1 Warning 1264 Out of range value for column 'f24' at row 1 -INSERT into t31 values (1, 1, 4, 'fourth', +insert ignore into t31 values (1, 1, 4, 'fourth', /* f5 BIGINT, */ 333333333333333333333333, /* f6 BLOB, */ '3333333333333333333333', /* f7 DATE, */ '2007-07-18', @@ -409,7 +409,7 @@ connection master; update t31 set f5=555555555555555 where f3=6; update t31 set f2=2 where f3=2; update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; +update ignore t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; Warnings: Warning 1048 Column 'f3' cannot be null diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_row_basic_3tokudb.result b/storage/tokudb/mysql-test/rpl/r/rpl_row_basic_3tokudb.result index 9785ad7ebdf..32a42143180 100644 --- a/storage/tokudb/mysql-test/rpl/r/rpl_row_basic_3tokudb.result +++ b/storage/tokudb/mysql-test/rpl/r/rpl_row_basic_3tokudb.result @@ -551,6 +551,7 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* error.* 1535"); call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* error.* 1032"); call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, error.* 1677"); +call mtr.add_suppression("Can't find record in 't1'"); include/rpl_reset.inc [expecting slave to replicate correctly] connection master; @@ -680,33 +681,33 @@ CREATE TABLE t1 (a bit) ENGINE='TokuDB'; INSERT IGNORE INTO t1 VALUES (NULL); INSERT INTO t1 ( a ) VALUES ( 0 ); UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3; -INSERT INTO t1 ( a ) VALUES ( 5 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); DELETE FROM t1 WHERE a < 2 LIMIT 4; DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 9 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 9 ); UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 8 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 8 ); UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0; -INSERT INTO t1 ( a ) VALUES ( 4 ); -INSERT INTO t1 ( a ) VALUES ( 3 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 4 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6; DELETE FROM t1 WHERE a = 4 LIMIT 7; -UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9; +UPDATE IGNORE t1 SET a = 9 WHERE a < 2 LIMIT 9; UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2; DELETE FROM t1 WHERE a < 0 LIMIT 5; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 5 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8; +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); +UPDATE IGNORE t1 SET a = 4 WHERE a < 6 LIMIT 4; +INSERT IGNORE INTO t1 ( a ) VALUES ( 5 ); +UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 8; DELETE FROM t1 WHERE a < 8 LIMIT 8; -INSERT INTO t1 ( a ) VALUES ( 6 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 6 ); DELETE FROM t1 WHERE a < 6 LIMIT 7; UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7; UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; -INSERT INTO t1 ( a ) VALUES ( 7 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 7 ); DELETE FROM t1 WHERE a < 9 LIMIT 4; -INSERT INTO t1 ( a ) VALUES ( 7 ); -INSERT INTO t1 ( a ) VALUES ( 6 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 7 ); +INSERT IGNORE INTO t1 ( a ) VALUES ( 6 ); UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4; DELETE FROM t1 WHERE a = 2 LIMIT 9; DELETE FROM t1 WHERE a = 1 LIMIT 4; @@ -715,7 +716,7 @@ INSERT INTO t1 ( a ) VALUES ( 0 ); DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); -UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; +UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 3; connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; include/diff_tables.inc [master:t1, slave:t1] diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_row_log_tokudb.result b/storage/tokudb/mysql-test/rpl/r/rpl_row_log_tokudb.result index 372d1eb4c51..73c010c6eb7 100644 --- a/storage/tokudb/mysql-test/rpl/r/rpl_row_log_tokudb.result +++ b/storage/tokudb/mysql-test/rpl/r/rpl_row_log_tokudb.result @@ -24,6 +24,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -32,6 +33,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # load data infile '../../std_data/words.dat' into table t1 ignore 1 lines master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -47,6 +49,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -207,6 +210,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -215,6 +219,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # load data infile '../../std_data/words.dat' into table t1 ignore 1 lines master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -227,6 +232,7 @@ master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=TokuDB master-bin.000002 # Gtid # # GTID #-#-# master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=TokuDB master-bin.000002 # Gtid # # BEGIN GTID #-#-# +master-bin.000002 # Annotate_rows # # insert into t2 values (1) master-bin.000002 # Table_map # # table_id: # (test.t2) master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000002 # Xid # # COMMIT /* XID */ @@ -244,6 +250,7 @@ Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # insert into t1 values (NULL) slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Xid # # COMMIT /* XID */ @@ -252,6 +259,7 @@ slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server slave-bin.000001 # Gtid # # GTID #-#-# slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Annotate_rows # # load data infile '../../std_data/words.dat' into table t1 ignore 1 lines slave-bin.000001 # Table_map # # table_id: # (test.t1) slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000001 # Xid # # COMMIT /* XID */ @@ -264,6 +272,7 @@ slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002 slave-bin.000002 # Gtid # # GTID #-#-# slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=TokuDB slave-bin.000002 # Gtid # # BEGIN GTID #-#-# +slave-bin.000002 # Annotate_rows # # insert into t2 values (1) slave-bin.000002 # Table_map # # table_id: # (test.t2) slave-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-bin.000002 # Xid # # COMMIT /* XID */ @@ -285,10 +294,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL, 1) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_row_rec_comp_tokudb.result b/storage/tokudb/mysql-test/rpl/r/rpl_row_rec_comp_tokudb.result index b4b3fffc696..df1fe125aa4 100644 --- a/storage/tokudb/mysql-test/rpl/r/rpl_row_rec_comp_tokudb.result +++ b/storage/tokudb/mysql-test/rpl/r/rpl_row_rec_comp_tokudb.result @@ -6,7 +6,7 @@ connection master; CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=TokuDB DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); -UPDATE t1 SET c5 = 'a'; +UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] connection master; @@ -19,7 +19,7 @@ connection master; CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=TokuDB DEFAULT CHARSET=latin1; INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); -UPDATE t1 SET c5 = 'a'; +UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] connection master; diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result index 8dd200cecb6..7f8b9dd5104 100644 --- a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result +++ b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result @@ -851,6 +851,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 1 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # DELETE FROM t2 WHERE b <> UUID() master-bin.000001 # Table_map # # table_id: # (test_rpl.t2) master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -864,10 +865,12 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES(2, UUID()) master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1 master-bin.000001 # Table_map # # table_id: # (test_rpl.t2) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -887,6 +890,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -909,6 +913,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; REPLACE INTO t1 VALUES(1, 't1, text 11') master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # REPLACE INTO t1 VALUES(2, UUID()) master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1003,6 +1008,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (5, 'before savepoint s2') master-bin.000001 # Query # # SAVEPOINT `s2` master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (6, 'after savepoint s2') +master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (7, CONCAT('with UUID() ',UUID())) master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1056,6 +1062,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(202, 'test 202') master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # UPDATE t1 SET b = UUID() WHERE a = 202 master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ @@ -1080,6 +1087,7 @@ FOR EACH ROW BEGIN INSERT INTO t2 SET a = NEW.a, b = NEW.b; END master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # INSERT INTO t2 SET a = NEW.a, b = NEW.b master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Table_map # # table_id: # (test_rpl.t2) master-bin.000001 # Write_rows_v1 # # table_id: # diff --git a/storage/tokudb/mysql-test/tokudb/r/ctype_cp1250_ch.result b/storage/tokudb/mysql-test/tokudb/r/ctype_cp1250_ch.result index 3efeb757b61..2dae25d4aa4 100644 --- a/storage/tokudb/mysql-test/tokudb/r/ctype_cp1250_ch.result +++ b/storage/tokudb/mysql-test/tokudb/r/ctype_cp1250_ch.result @@ -60,7 +60,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; @@ -162,7 +162,7 @@ want1result location DROP TABLE t1; create table t1 (a set('a') not null); -insert into t1 values (),(); +insert ignore into t1 values (),(); Warnings: Warning 1364 Field 'a' doesn't have a default value select cast(a as char(1)) from t1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/mod_enum.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/mod_enum.result index 21bfb990ba9..4ab905cfa71 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/mod_enum.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/mod_enum.result @@ -49,6 +49,7 @@ ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value4'); ERROR 42000: Table 'test_enum' uses an extension that doesn't exist in this XYZ version set tokudb_disable_hot_alter=1; set tokudb_disable_slow_alter=0; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value4'); Warnings: Warning 1265 Data truncated for column 'col2' at row 3 diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_add_key.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_add_key.result index 9e1504a9d89..82373ac318e 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_add_key.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_add_key.result @@ -38,6 +38,7 @@ c31 date, key(c31)) ENGINE=tokudb; INSERT INTO t (c25) VALUES (NULL); UPDATE t SET c27=0; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH; Warnings: Warning 1265 Data truncated for column 'c19' at row 1 diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_col_rename.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_col_rename.result index 45a12fba8d2..95a869add10 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_col_rename.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_col_rename.result @@ -38,6 +38,7 @@ c31 date, key(c31)) ENGINE=tokudb; INSERT INTO t (c25) VALUES (NULL); UPDATE t SET c27=0; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH; Warnings: Warning 1265 Data truncated for column 'c19' at row 1 diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_default.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_default.result index d5ff7e092fe..4cb323d0161 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_default.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_default.result @@ -38,6 +38,7 @@ c31 date, key(c31)) ENGINE=tokudb; INSERT INTO t (c25) VALUES (NULL); UPDATE t SET c27=0; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH; Warnings: Warning 1265 Data truncated for column 'c19' at row 1 diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_key.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_key.result index 09b0deaf990..59ca690adc4 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_key.result +++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_key.result @@ -38,6 +38,7 @@ c31 date, key(c31)) ENGINE=tokudb; INSERT INTO t (c25) VALUES (NULL); UPDATE t SET c27=0; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH; Warnings: Warning 1265 Data truncated for column 'c19' at row 1 diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/mod_enum.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/mod_enum.test index 4efa3afd96e..5166c6cc10e 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/mod_enum.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/mod_enum.test @@ -50,6 +50,7 @@ ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value4'); set tokudb_disable_hot_alter=1; set tokudb_disable_slow_alter=0; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value4'); SELECT * FROM test_enum; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_add_key.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_add_key.test index 70e2a07e4cc..28870a86bdc 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_add_key.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_add_key.test @@ -47,6 +47,7 @@ c31 date, key(c31)) ENGINE=tokudb; INSERT INTO t (c25) VALUES (NULL); UPDATE t SET c27=0; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH; UPDATE t SET c27=0; ALTER TABLE t ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_col_rename.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_col_rename.test index 048e39dc757..fe7b4ec1544 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_col_rename.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_col_rename.test @@ -47,6 +47,7 @@ c31 date, key(c31)) ENGINE=tokudb; INSERT INTO t (c25) VALUES (NULL); UPDATE t SET c27=0; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH; UPDATE t SET c27=0; ALTER TABLE t ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_default.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_default.test index a5695e8a4c6..ef2b83a3d31 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_default.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_default.test @@ -47,6 +47,7 @@ c31 date, key(c31)) ENGINE=tokudb; INSERT INTO t (c25) VALUES (NULL); UPDATE t SET c27=0; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH; UPDATE t SET c27=0; ALTER TABLE t ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_key.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_key.test index d2726c30ddd..41ea0e2fd2e 100644 --- a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_key.test +++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_key.test @@ -47,6 +47,7 @@ c31 date, key(c31)) ENGINE=tokudb; INSERT INTO t (c25) VALUES (NULL); UPDATE t SET c27=0; +SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH; UPDATE t SET c27=0; ALTER TABLE t ADD KEY (c25); diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/alter_table_copy_table.result b/storage/tokudb/mysql-test/tokudb_bugs/r/alter_table_copy_table.result index e8765ec7ab9..25e181d90cc 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/r/alter_table_copy_table.result +++ b/storage/tokudb/mysql-test/tokudb_bugs/r/alter_table_copy_table.result @@ -3,6 +3,7 @@ set tokudb_disable_hot_alter=ON; set default_storage_engine=tokudb; create table t (id int, x char(2), primary key (id), unique key (x)); insert into t values (1,'aa'),(2,'ab'); +set statement sql_mode = '' for alter table t modify x char(1); ERROR 23000: Duplicate entry 'a' for key 'x' drop table t; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/db397_delete_trigger.result b/storage/tokudb/mysql-test/tokudb_bugs/r/db397_delete_trigger.result index c8565fb4b2b..dce79487f51 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/r/db397_delete_trigger.result +++ b/storage/tokudb/mysql-test/tokudb_bugs/r/db397_delete_trigger.result @@ -12,6 +12,7 @@ ts timestamp not null default now()); insert into t1 (col1,col2) values (0,0); insert into t1_audit (col1,action) values (0,'DUMMY'); set local tokudb_prelock_empty=0; +set statement sql_mode = '' for create trigger t1_trigger before delete on t1 for each row insert into t1_audit (col1, action) values (old.col1, 'BEFORE DELETE'); @@ -32,6 +33,7 @@ locks_dname locks_key_left locks_key_right ./test/t1_audit-main 0200000000000000 0200000000000000 commit; drop trigger t1_trigger; +set statement sql_mode = '' for create trigger t1_trigger after delete on t1 for each row insert into t1_audit (col1, action) values (old.col1, 'AFTER DELETE'); diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/db945.result b/storage/tokudb/mysql-test/tokudb_bugs/r/db945.result index 6b3c239d602..edebae3b9e0 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/r/db945.result +++ b/storage/tokudb/mysql-test/tokudb_bugs/r/db945.result @@ -7,7 +7,7 @@ set session tokudb_analyze_throttle = 0; set session tokudb_analyze_time = 0; create table t1(a int, b text(1), c text(1), filler text(1), primary key(a, b(1)), unique key (a, c(1))); lock tables t1 write, t1 as a read, t1 as b read; -insert into t1(a) values(1); +insert ignore into t1(a) values(1); Warnings: Warning 1364 Field 'b' doesn't have a default value alter table t1 drop key a; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/xa.result b/storage/tokudb/mysql-test/tokudb_bugs/r/xa.result index 93193dd9b43..7dd7bb625cf 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/r/xa.result +++ b/storage/tokudb/mysql-test/tokudb_bugs/r/xa.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); drop table if exists t1, t2; create table t1 (a int) engine=tokudb; xa start 'test1'; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/alter_table_copy_table.test b/storage/tokudb/mysql-test/tokudb_bugs/t/alter_table_copy_table.test index 6e4433183b0..0c85115bd20 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/t/alter_table_copy_table.test +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/alter_table_copy_table.test @@ -8,5 +8,6 @@ set default_storage_engine=tokudb; create table t (id int, x char(2), primary key (id), unique key (x)); insert into t values (1,'aa'),(2,'ab'); --error 1062 +set statement sql_mode = '' for alter table t modify x char(1); drop table t; \ No newline at end of file diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/db397_delete_trigger.test b/storage/tokudb/mysql-test/tokudb_bugs/t/db397_delete_trigger.test index 79043664607..dfd935b17ff 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/t/db397_delete_trigger.test +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/db397_delete_trigger.test @@ -20,6 +20,7 @@ insert into t1 (col1,col2) values (0,0); insert into t1_audit (col1,action) values (0,'DUMMY'); set local tokudb_prelock_empty=0; +set statement sql_mode = '' for create trigger t1_trigger before delete on t1 for each row insert into t1_audit (col1, action) values (old.col1, 'BEFORE DELETE'); @@ -33,6 +34,7 @@ select locks_dname,locks_key_left,locks_key_right from information_schema.tokudb commit; drop trigger t1_trigger; +set statement sql_mode = '' for create trigger t1_trigger after delete on t1 for each row insert into t1_audit (col1, action) values (old.col1, 'AFTER DELETE'); diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/db945.test b/storage/tokudb/mysql-test/tokudb_bugs/t/db945.test index 27b0d284484..c7774877291 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/t/db945.test +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/db945.test @@ -12,7 +12,7 @@ set session tokudb_analyze_time = 0; create table t1(a int, b text(1), c text(1), filler text(1), primary key(a, b(1)), unique key (a, c(1))); lock tables t1 write, t1 as a read, t1 as b read; -insert into t1(a) values(1); +insert ignore into t1(a) values(1); alter table t1 drop key a; unlock tables; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/xa.test b/storage/tokudb/mysql-test/tokudb_bugs/t/xa.test index 3d3d558c0c9..96ccf04fb02 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/t/xa.test +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/xa.test @@ -6,6 +6,8 @@ # Save the initial number of concurrent sessions --source include/count_sessions.inc +call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); + --disable_warnings drop table if exists t1, t2; --enable_warnings diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/part_supported_sql_func_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/part_supported_sql_func_tokudb.result index 5b860845490..370359327c1 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/part_supported_sql_func_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/part_supported_sql_func_tokudb.result @@ -620,7 +620,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` int(11) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (abs(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -628,7 +628,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 15 @@ -2317,7 +2317,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` int(11) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (mod(col1,10)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -2325,7 +2325,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 15 @@ -3667,7 +3667,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` date DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (day(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -3675,7 +3675,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 2006-02-05 @@ -4184,7 +4184,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` date DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (dayofmonth(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -4192,7 +4192,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 2006-02-05 @@ -4701,7 +4701,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` date DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (dayofweek(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -4709,7 +4709,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 2006-02-03 @@ -5230,7 +5230,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` date DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (dayofyear(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -5238,7 +5238,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 2006-02-03 @@ -5749,7 +5749,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` date DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (extract(month from col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -5757,7 +5757,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 2006-02-03 @@ -6268,7 +6268,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` time DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (hour(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -6276,7 +6276,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 09:09:15 @@ -6793,7 +6793,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` time(6) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (microsecond(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -6801,7 +6801,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 05:30:34.000037 @@ -7314,7 +7314,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` time DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (minute(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -7322,7 +7322,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 10:24:23 @@ -7845,7 +7845,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` time DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (second(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -7853,7 +7853,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 09:09:15 @@ -8376,7 +8376,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` date DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (month(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -8384,7 +8384,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 2006-02-03 @@ -8901,7 +8901,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` date DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (quarter(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -8909,7 +8909,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 2006-02-03 @@ -9424,7 +9424,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` date DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (weekday(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -9432,7 +9432,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 2006-02-03 @@ -9945,7 +9945,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` date DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (year(col1)-1990) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -9953,7 +9953,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 2006-02-03 @@ -10470,7 +10470,7 @@ t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, `col1` date DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (colint) + PARTITION BY LIST (colint) SUBPARTITION BY HASH (yearweek(col1)-200600) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = TokuDB, @@ -10478,7 +10478,7 @@ SUBPARTITIONS 5 PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = TokuDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = TokuDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = TokuDB, - PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) */ + PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = TokuDB) select * from t55 order by colint; colint col1 1 2006-02-03 diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result index 5707edf3485..5ee7ced4487 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result @@ -75,8 +75,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -567,8 +567,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1067,7 +1067,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -1075,7 +1075,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1572,13 +1572,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2071,13 +2071,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2574,7 +2574,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -2587,7 +2587,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3084,7 +3084,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -3097,7 +3097,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3592,12 +3592,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4089,8 +4089,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4581,8 +4581,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5081,7 +5081,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -5089,7 +5089,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5586,13 +5586,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6085,13 +6085,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6588,7 +6588,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -6601,7 +6601,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7098,7 +7098,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -7111,7 +7111,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7606,12 +7606,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8104,8 +8104,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8612,8 +8612,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9128,7 +9128,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -9136,7 +9136,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9649,13 +9649,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10164,13 +10164,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10683,7 +10683,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -10696,7 +10696,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11209,7 +11209,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -11222,7 +11222,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11733,12 +11733,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12246,8 +12246,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12754,8 +12754,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13270,7 +13270,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -13278,7 +13278,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13791,13 +13791,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14306,13 +14306,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14825,7 +14825,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -14838,7 +14838,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15351,7 +15351,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -15364,7 +15364,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15875,12 +15875,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16390,8 +16390,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16883,8 +16883,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17384,7 +17384,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -17392,7 +17392,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17890,13 +17890,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18390,13 +18390,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18894,7 +18894,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -18907,7 +18907,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19405,7 +19405,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -19418,7 +19418,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19914,12 +19914,12 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20412,8 +20412,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20905,8 +20905,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -21406,7 +21406,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -21414,7 +21414,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -21912,13 +21912,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -22412,13 +22412,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -22916,7 +22916,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -22929,7 +22929,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -23427,7 +23427,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -23440,7 +23440,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -23936,12 +23936,12 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -24434,8 +24434,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -24927,8 +24927,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -25428,7 +25428,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -25436,7 +25436,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -25934,13 +25934,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -26434,13 +26434,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -26938,7 +26938,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -26951,7 +26951,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -27449,7 +27449,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -27462,7 +27462,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -27958,12 +27958,12 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result index 6d478dd29fc..17f4c83cd97 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result @@ -393,8 +393,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -885,8 +885,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1385,7 +1385,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -1393,7 +1393,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1890,13 +1890,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2389,13 +2389,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2894,7 +2894,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -2907,7 +2907,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3404,7 +3404,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -3417,7 +3417,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3912,12 +3912,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4409,8 +4409,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4901,8 +4901,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5401,7 +5401,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -5409,7 +5409,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5906,13 +5906,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6405,13 +6405,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6910,7 +6910,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -6923,7 +6923,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7420,7 +7420,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -7433,7 +7433,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7928,12 +7928,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8426,8 +8426,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8934,8 +8934,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9450,7 +9450,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -9458,7 +9458,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9971,13 +9971,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10486,13 +10486,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11007,7 +11007,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -11020,7 +11020,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11533,7 +11533,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -11546,7 +11546,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12057,12 +12057,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12570,8 +12570,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13078,8 +13078,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13594,7 +13594,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -13602,7 +13602,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14115,13 +14115,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14630,13 +14630,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15151,7 +15151,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -15164,7 +15164,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15677,7 +15677,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -15690,7 +15690,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16201,12 +16201,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result index 9efe0ac34f5..3cedec4c908 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result @@ -73,8 +73,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -513,8 +513,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -961,7 +961,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -969,7 +969,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1414,13 +1414,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1861,13 +1861,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2314,7 +2314,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -2327,7 +2327,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2772,7 +2772,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -2785,7 +2785,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3228,12 +3228,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3673,8 +3673,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4113,8 +4113,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4561,7 +4561,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -4569,7 +4569,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5014,13 +5014,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5461,13 +5461,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5914,7 +5914,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -5927,7 +5927,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6372,7 +6372,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -6385,7 +6385,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6828,12 +6828,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7273,8 +7273,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7729,8 +7729,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8193,7 +8193,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -8201,7 +8201,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8662,13 +8662,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9125,13 +9125,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9594,7 +9594,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -9607,7 +9607,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10068,7 +10068,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -10081,7 +10081,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10540,12 +10540,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11005,8 +11005,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11445,8 +11445,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11893,7 +11893,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -11901,7 +11901,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12346,13 +12346,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12793,13 +12793,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13244,7 +13244,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -13257,7 +13257,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13702,7 +13702,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -13715,7 +13715,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14158,12 +14158,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14603,8 +14603,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15043,8 +15043,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15491,7 +15491,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -15499,7 +15499,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15944,13 +15944,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16391,13 +16391,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16842,7 +16842,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -16855,7 +16855,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17300,7 +17300,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -17313,7 +17313,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17756,12 +17756,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18202,8 +18202,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18658,8 +18658,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19122,7 +19122,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -19130,7 +19130,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19591,13 +19591,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20054,13 +20054,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20521,7 +20521,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -20534,7 +20534,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20995,7 +20995,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -21008,7 +21008,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -21467,12 +21467,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -21928,8 +21928,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -22384,8 +22384,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -22848,7 +22848,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -22856,7 +22856,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -23317,13 +23317,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -23780,13 +23780,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -24247,7 +24247,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -24260,7 +24260,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -24721,7 +24721,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -24734,7 +24734,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -25193,12 +25193,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -25655,8 +25655,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -26095,8 +26095,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -26543,7 +26543,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -26551,7 +26551,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -26996,13 +26996,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -27443,13 +27443,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -27894,7 +27894,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -27907,7 +27907,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -28352,7 +28352,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -28365,7 +28365,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -28808,12 +28808,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -29253,8 +29253,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -29693,8 +29693,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -30141,7 +30141,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -30149,7 +30149,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -30594,13 +30594,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -31041,13 +31041,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -31492,7 +31492,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -31505,7 +31505,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -31950,7 +31950,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -31963,7 +31963,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -32406,12 +32406,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -32851,8 +32851,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -33307,8 +33307,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -33771,7 +33771,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -33779,7 +33779,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -34240,13 +34240,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -34703,13 +34703,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -35170,7 +35170,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -35183,7 +35183,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -35644,7 +35644,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -35657,7 +35657,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -36116,12 +36116,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result index 188e7c3653d..030e3e2204d 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result @@ -74,8 +74,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -530,8 +530,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -994,7 +994,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -1002,7 +1002,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1463,13 +1463,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1926,13 +1926,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2395,7 +2395,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -2408,7 +2408,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2869,7 +2869,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -2882,7 +2882,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3341,12 +3341,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3804,8 +3804,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4298,8 +4298,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4800,7 +4800,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -4808,7 +4808,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5307,13 +5307,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5808,13 +5808,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6315,7 +6315,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -6328,7 +6328,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6827,7 +6827,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -6840,7 +6840,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7337,12 +7337,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7836,8 +7836,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8330,8 +8330,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8832,7 +8832,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -8840,7 +8840,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9339,13 +9339,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9840,13 +9840,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10347,7 +10347,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -10360,7 +10360,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10859,7 +10859,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -10872,7 +10872,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11369,12 +11369,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11869,8 +11869,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12377,8 +12377,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12893,7 +12893,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -12901,7 +12901,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13414,13 +13414,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13929,13 +13929,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14450,7 +14450,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -14463,7 +14463,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14976,7 +14976,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -14989,7 +14989,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15500,12 +15500,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16013,8 +16013,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16521,8 +16521,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17037,7 +17037,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -17045,7 +17045,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17558,13 +17558,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18073,13 +18073,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18594,7 +18594,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -18607,7 +18607,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19120,7 +19120,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -19133,7 +19133,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19644,12 +19644,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_2_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_2_tokudb.result index f6e98be3c98..f252760e0a5 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_2_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_2_tokudb.result @@ -70,8 +70,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -526,8 +526,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -990,7 +990,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -998,7 +998,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1459,13 +1459,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1922,13 +1922,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2389,7 +2389,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -2402,7 +2402,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2863,7 +2863,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -2876,7 +2876,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3335,12 +3335,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3798,8 +3798,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4293,8 +4293,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4796,7 +4796,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -4804,7 +4804,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5304,13 +5304,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5806,13 +5806,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6312,7 +6312,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -6325,7 +6325,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6825,7 +6825,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -6838,7 +6838,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7336,12 +7336,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7836,8 +7836,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8331,8 +8331,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8834,7 +8834,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -8842,7 +8842,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9342,13 +9342,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9844,13 +9844,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10350,7 +10350,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -10363,7 +10363,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10863,7 +10863,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -10876,7 +10876,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11374,12 +11374,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11875,8 +11875,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12383,8 +12383,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12899,7 +12899,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -12907,7 +12907,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13420,13 +13420,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13935,13 +13935,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14454,7 +14454,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -14467,7 +14467,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14980,7 +14980,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -14993,7 +14993,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15504,12 +15504,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16017,8 +16017,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16525,8 +16525,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17041,7 +17041,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -17049,7 +17049,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17562,13 +17562,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18077,13 +18077,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18596,7 +18596,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -18609,7 +18609,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19122,7 +19122,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -19135,7 +19135,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19646,12 +19646,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result index 7ecc5db4b10..32dab941bf1 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result @@ -74,8 +74,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -532,8 +532,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -998,7 +998,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -1006,7 +1006,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1469,13 +1469,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1932,13 +1932,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2403,7 +2403,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -2416,7 +2416,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2877,7 +2877,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -2890,7 +2890,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3351,12 +3351,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3815,8 +3815,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4311,8 +4311,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4815,7 +4815,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -4823,7 +4823,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5324,13 +5324,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5825,13 +5825,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6334,7 +6334,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -6347,7 +6347,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6846,7 +6846,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -6859,7 +6859,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7358,12 +7358,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7859,8 +7859,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8355,8 +8355,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8859,7 +8859,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -8867,7 +8867,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9368,13 +9368,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9869,13 +9869,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10378,7 +10378,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -10391,7 +10391,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10890,7 +10890,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -10903,7 +10903,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11402,12 +11402,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11904,8 +11904,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12414,8 +12414,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12932,7 +12932,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -12940,7 +12940,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13455,13 +13455,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13970,13 +13970,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14493,7 +14493,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -14506,7 +14506,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15019,7 +15019,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -15032,7 +15032,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15545,12 +15545,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16060,8 +16060,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16570,8 +16570,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17088,7 +17088,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -17096,7 +17096,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17611,13 +17611,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18126,13 +18126,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18649,7 +18649,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -18662,7 +18662,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19175,7 +19175,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -19188,7 +19188,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19701,12 +19701,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_2_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_2_tokudb.result index 993025c9fb2..4200c75867f 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_2_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_2_tokudb.result @@ -69,8 +69,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -528,8 +528,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -995,7 +995,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -1003,7 +1003,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1467,13 +1467,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1935,13 +1935,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2407,7 +2407,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -2420,7 +2420,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2886,7 +2886,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -2899,7 +2899,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3361,12 +3361,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3827,8 +3827,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4325,8 +4325,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4831,7 +4831,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -4839,7 +4839,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5342,13 +5342,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5849,13 +5849,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6360,7 +6360,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -6373,7 +6373,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6878,7 +6878,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -6891,7 +6891,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7392,12 +7392,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7895,8 +7895,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8393,8 +8393,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8899,7 +8899,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -8907,7 +8907,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9410,13 +9410,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9917,13 +9917,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10428,7 +10428,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -10441,7 +10441,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10946,7 +10946,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -10959,7 +10959,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11460,12 +11460,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11964,8 +11964,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12475,8 +12475,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12994,7 +12994,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -13002,7 +13002,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13518,13 +13518,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14038,13 +14038,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14562,7 +14562,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -14575,7 +14575,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15093,7 +15093,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -15106,7 +15106,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15620,12 +15620,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16136,8 +16136,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16647,8 +16647,8 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17166,7 +17166,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -17174,7 +17174,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17690,13 +17690,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18210,13 +18210,13 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18734,7 +18734,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -18747,7 +18747,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19265,7 +19265,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -19278,7 +19278,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19792,12 +19792,12 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result index 973ed19ef39..07b9770d3ca 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result @@ -75,9 +75,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -534,12 +534,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1004,7 +1004,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -1012,7 +1012,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1475,13 +1475,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -1940,13 +1940,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2411,7 +2411,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -2424,7 +2424,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -2887,7 +2887,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -2900,7 +2900,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3361,12 +3361,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3825,9 +3825,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4284,12 +4284,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4754,7 +4754,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -4762,7 +4762,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5225,13 +5225,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5690,13 +5690,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6161,7 +6161,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -6174,7 +6174,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6637,7 +6637,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -6650,7 +6650,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7111,12 +7111,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7575,9 +7575,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8034,12 +8034,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8504,7 +8504,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -8512,7 +8512,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8975,13 +8975,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9440,13 +9440,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9911,7 +9911,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -9924,7 +9924,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10387,7 +10387,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -10400,7 +10400,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10861,12 +10861,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11325,9 +11325,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11784,12 +11784,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12254,7 +12254,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -12262,7 +12262,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12725,13 +12725,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13190,13 +13190,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13661,7 +13661,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -13674,7 +13674,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14137,7 +14137,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -14150,7 +14150,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14611,12 +14611,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15075,9 +15075,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15534,12 +15534,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16004,7 +16004,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -16012,7 +16012,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16475,13 +16475,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16940,13 +16940,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17411,7 +17411,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -17424,7 +17424,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17887,7 +17887,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -17900,7 +17900,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18361,12 +18361,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18828,9 +18828,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19287,12 +19287,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19757,7 +19757,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -19765,7 +19765,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20228,13 +20228,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20693,13 +20693,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -21164,7 +21164,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -21177,7 +21177,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -21640,7 +21640,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -21653,7 +21653,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -22114,12 +22114,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -22578,9 +22578,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -23037,12 +23037,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -23507,7 +23507,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -23515,7 +23515,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -23978,13 +23978,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -24443,13 +24443,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -24914,7 +24914,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -24927,7 +24927,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -25390,7 +25390,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -25403,7 +25403,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -25864,12 +25864,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -26328,9 +26328,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -26787,12 +26787,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -27257,7 +27257,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -27265,7 +27265,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -27728,13 +27728,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -28193,13 +28193,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -28664,7 +28664,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -28677,7 +28677,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -29140,7 +29140,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -29153,7 +29153,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -29614,12 +29614,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -30078,9 +30078,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -30537,12 +30537,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -31007,7 +31007,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -31015,7 +31015,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -31478,13 +31478,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -31943,13 +31943,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -32414,7 +32414,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -32427,7 +32427,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -32890,7 +32890,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -32903,7 +32903,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -33364,12 +33364,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -33828,9 +33828,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -34287,12 +34287,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -34757,7 +34757,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -34765,7 +34765,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -35228,13 +35228,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -35693,13 +35693,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -36164,7 +36164,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -36177,7 +36177,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -36640,7 +36640,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -36653,7 +36653,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -37114,12 +37114,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -37582,9 +37582,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -38042,12 +38042,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -38513,7 +38513,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -38521,7 +38521,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -38985,13 +38985,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -39451,13 +39451,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -39923,7 +39923,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -39936,7 +39936,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -40400,7 +40400,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -40413,7 +40413,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -40875,12 +40875,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -41340,9 +41340,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -41800,12 +41800,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -42271,7 +42271,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -42279,7 +42279,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -42743,13 +42743,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -43209,13 +43209,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -43681,7 +43681,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -43694,7 +43694,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -44158,7 +44158,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -44171,7 +44171,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -44633,12 +44633,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -45097,9 +45097,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -45556,12 +45556,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -46026,7 +46026,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -46034,7 +46034,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -46497,13 +46497,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -46962,13 +46962,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -47433,7 +47433,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -47446,7 +47446,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -47909,7 +47909,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -47922,7 +47922,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -48383,12 +48383,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -48847,9 +48847,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -49306,12 +49306,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -49776,7 +49776,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -49784,7 +49784,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -50247,13 +50247,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -50712,13 +50712,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -51183,7 +51183,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -51196,7 +51196,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -51659,7 +51659,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -51672,7 +51672,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -52133,12 +52133,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -52598,9 +52598,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -53058,12 +53058,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -53529,7 +53529,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -53537,7 +53537,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -54001,13 +54001,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -54467,13 +54467,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -54939,7 +54939,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -54952,7 +54952,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -55416,7 +55416,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -55429,7 +55429,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -55891,12 +55891,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -56356,9 +56356,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -56813,12 +56813,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -57281,7 +57281,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -57289,7 +57289,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -57750,13 +57750,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -58213,13 +58213,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -58682,7 +58682,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -58695,7 +58695,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -59156,7 +59156,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -59169,7 +59169,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -59628,12 +59628,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -60090,9 +60090,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -60547,12 +60547,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -61015,7 +61015,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -61023,7 +61023,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -61484,13 +61484,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -61947,13 +61947,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -62416,7 +62416,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -62429,7 +62429,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -62890,7 +62890,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -62903,7 +62903,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -63362,12 +63362,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -64144,9 +64144,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -64601,12 +64601,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -65069,7 +65069,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -65077,7 +65077,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -65538,13 +65538,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -66001,13 +66001,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -66470,7 +66470,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -66483,7 +66483,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -66944,7 +66944,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -66957,7 +66957,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -67416,12 +67416,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -67883,9 +67883,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -68342,12 +68342,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -68812,7 +68812,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -68820,7 +68820,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -69283,13 +69283,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -69748,13 +69748,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -70219,7 +70219,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -70232,7 +70232,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -70695,7 +70695,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -70708,7 +70708,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -71169,12 +71169,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -71633,9 +71633,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -72092,12 +72092,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -72562,7 +72562,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -72570,7 +72570,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -73033,13 +73033,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -73498,13 +73498,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -73969,7 +73969,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -73982,7 +73982,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -74445,7 +74445,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -74458,7 +74458,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -74919,12 +74919,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -75383,9 +75383,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -75842,12 +75842,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -76312,7 +76312,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -76320,7 +76320,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -76783,13 +76783,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -77248,13 +77248,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -77719,7 +77719,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -77732,7 +77732,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -78195,7 +78195,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -78208,7 +78208,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -78669,12 +78669,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -79133,9 +79133,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -79592,12 +79592,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -80062,7 +80062,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -80070,7 +80070,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -80533,13 +80533,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -80998,13 +80998,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -81469,7 +81469,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -81482,7 +81482,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -81945,7 +81945,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -81958,7 +81958,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -82419,12 +82419,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -82883,9 +82883,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) + PARTITION BY HASH (f_int1) (PARTITION part_1 ENGINE = TokuDB, - PARTITION part_2 ENGINE = TokuDB) */ + PARTITION part_2 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -83342,12 +83342,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) + PARTITION BY KEY (f_int1) (PARTITION part_1 ENGINE = TokuDB, PARTITION part_2 ENGINE = TokuDB, PARTITION part_3 ENGINE = TokuDB, PARTITION part_4 ENGINE = TokuDB, - PARTITION part_5 ENGINE = TokuDB) */ + PARTITION part_5 ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -83812,7 +83812,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -83820,7 +83820,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -84283,13 +84283,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_1 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION part_4 VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_5 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -84748,13 +84748,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION part_1 VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION part_2 VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION part_3 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION part_4 VALUES LESS THAN (2147483646) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -85219,7 +85219,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part_1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -85232,7 +85232,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part_4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -85695,7 +85695,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part_1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -85708,7 +85708,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part_4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -86169,12 +86169,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part_1 VALUES IN (0) ENGINE = TokuDB, PARTITION part_2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part_3 VALUES IN (NULL) ENGINE = TokuDB) # check prerequisites-1 success: 1 # check COUNT(*) success: 1 diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result index fe289260ffc..ca85132d982 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result @@ -73,8 +73,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 unified filelist t1.frm @@ -528,8 +528,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 unified filelist t1.frm @@ -991,7 +991,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -999,7 +999,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) unified filelist t1.frm @@ -1459,13 +1459,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -1921,13 +1921,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -2389,7 +2389,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -2402,7 +2402,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) unified filelist t1.frm @@ -2866,7 +2866,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -2879,7 +2879,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) unified filelist t1.frm @@ -3337,12 +3337,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) unified filelist t1.frm @@ -3798,8 +3798,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 unified filelist t1.frm @@ -4253,8 +4253,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 unified filelist t1.frm @@ -4716,7 +4716,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -4724,7 +4724,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) unified filelist t1.frm @@ -5184,13 +5184,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -5646,13 +5646,13 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -6112,7 +6112,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -6125,7 +6125,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) unified filelist t1.frm @@ -6585,7 +6585,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -6598,7 +6598,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) unified filelist t1.frm @@ -7056,12 +7056,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) unified filelist t1.frm @@ -7523,8 +7523,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 unified filelist t1.frm @@ -8015,8 +8015,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 unified filelist t1.frm @@ -8515,7 +8515,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -8523,7 +8523,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) unified filelist t1.frm @@ -9020,13 +9020,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -9519,13 +9519,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -10024,7 +10024,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -10037,7 +10037,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) unified filelist t1.frm @@ -10538,7 +10538,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -10551,7 +10551,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) unified filelist t1.frm @@ -11046,12 +11046,12 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) unified filelist t1.frm @@ -11543,8 +11543,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 unified filelist t1.frm @@ -12035,8 +12035,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 unified filelist t1.frm @@ -12535,7 +12535,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -12543,7 +12543,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) unified filelist t1.frm @@ -13040,13 +13040,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -13539,13 +13539,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -14044,7 +14044,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -14057,7 +14057,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) unified filelist t1.frm @@ -14558,7 +14558,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -14571,7 +14571,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) unified filelist t1.frm @@ -15066,12 +15066,12 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) unified filelist t1.frm @@ -15563,8 +15563,8 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1) +PARTITIONS 2 unified filelist t1.frm @@ -16071,8 +16071,8 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1) +PARTITIONS 5 unified filelist t1.frm @@ -16587,7 +16587,7 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1,4)) + PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -16595,7 +16595,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) unified filelist t1.frm @@ -17108,13 +17108,13 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -17623,13 +17623,13 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1 DIV 2) + PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -18144,7 +18144,7 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -18157,7 +18157,7 @@ SUBPARTITION BY KEY (f_int1) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) unified filelist t1.frm @@ -18674,7 +18674,7 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -18687,7 +18687,7 @@ SUBPARTITION BY HASH (f_int1 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) unified filelist t1.frm @@ -19198,12 +19198,12 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) unified filelist t1.frm @@ -19716,8 +19716,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 unified filelist t1.frm @@ -20208,8 +20208,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 unified filelist t1.frm @@ -20708,7 +20708,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -20716,7 +20716,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) unified filelist t1.frm @@ -21213,13 +21213,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -21712,13 +21712,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -22215,7 +22215,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -22228,7 +22228,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) unified filelist t1.frm @@ -22725,7 +22725,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -22738,7 +22738,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) unified filelist t1.frm @@ -23233,12 +23233,12 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) unified filelist t1.frm @@ -23730,8 +23730,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 unified filelist t1.frm @@ -24222,8 +24222,8 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 unified filelist t1.frm @@ -24722,7 +24722,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -24730,7 +24730,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) unified filelist t1.frm @@ -25227,13 +25227,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -25726,13 +25726,13 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -26229,7 +26229,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -26242,7 +26242,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) unified filelist t1.frm @@ -26739,7 +26739,7 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -26752,7 +26752,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) unified filelist t1.frm @@ -27247,12 +27247,12 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) unified filelist t1.frm @@ -27744,8 +27744,8 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (f_int1 + f_int2) -PARTITIONS 2 */ + PARTITION BY HASH (f_int1 + f_int2) +PARTITIONS 2 unified filelist t1.frm @@ -28252,8 +28252,8 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY KEY (f_int1,f_int2) -PARTITIONS 5 */ + PARTITION BY KEY (f_int1,f_int2) +PARTITIONS 5 unified filelist t1.frm @@ -28768,7 +28768,7 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) + PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = TokuDB, PARTITION part_2 VALUES IN (-2) ENGINE = TokuDB, PARTITION part_1 VALUES IN (-1) ENGINE = TokuDB, @@ -28776,7 +28776,7 @@ t1 CREATE TABLE `t1` ( PARTITION part0 VALUES IN (0) ENGINE = TokuDB, PARTITION part1 VALUES IN (1) ENGINE = TokuDB, PARTITION part2 VALUES IN (2) ENGINE = TokuDB, - PARTITION part3 VALUES IN (3) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (3) ENGINE = TokuDB) unified filelist t1.frm @@ -29289,13 +29289,13 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) + PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, PARTITION partd VALUES LESS THAN (15) ENGINE = TokuDB, PARTITION parte VALUES LESS THAN (20) ENGINE = TokuDB, - PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partf VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -29804,13 +29804,13 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = TokuDB, PARTITION partb VALUES LESS THAN (5) ENGINE = TokuDB, PARTITION partc VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) */ + PARTITION partd VALUES LESS THAN (2147483646) ENGINE = TokuDB) unified filelist t1.frm @@ -30323,7 +30323,7 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (f_int1) + PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = TokuDB, @@ -30336,7 +30336,7 @@ SUBPARTITION BY KEY (f_int2) SUBPARTITION subpart32 ENGINE = TokuDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = TokuDB, - SUBPARTITION subpart42 ENGINE = TokuDB)) */ + SUBPARTITION subpart42 ENGINE = TokuDB)) unified filelist t1.frm @@ -30849,7 +30849,7 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) + PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = TokuDB, @@ -30862,7 +30862,7 @@ SUBPARTITION BY HASH (f_int2 + 1) SUBPARTITION sp32 ENGINE = TokuDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = TokuDB, - SUBPARTITION sp42 ENGINE = TokuDB)) */ + SUBPARTITION sp42 ENGINE = TokuDB)) unified filelist t1.frm @@ -31373,12 +31373,12 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) + PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = TokuDB, PARTITION part2 VALUES IN (1) ENGINE = TokuDB, - PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) */ + PARTITION part3 VALUES IN (NULL) ENGINE = TokuDB) unified filelist t1.frm diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result index 9155661d6d9..5031af92fbe 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result @@ -28,9 +28,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -56,9 +56,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -87,9 +87,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -117,9 +117,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -148,9 +148,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -178,9 +178,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -209,9 +209,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -239,9 +239,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -270,9 +270,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -300,9 +300,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -331,9 +331,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -361,9 +361,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -392,9 +392,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -422,9 +422,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -453,9 +453,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -483,10 +483,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -515,9 +515,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -543,10 +543,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -575,9 +575,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -603,10 +603,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -636,9 +636,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -661,9 +661,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -691,9 +691,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -717,9 +717,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -749,9 +749,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -774,9 +774,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -804,9 +804,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -830,9 +830,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -862,9 +862,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -887,9 +887,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -917,9 +917,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -943,9 +943,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -975,9 +975,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1000,9 +1000,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1030,9 +1030,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1056,9 +1056,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1088,9 +1088,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1113,9 +1113,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1143,9 +1143,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1169,9 +1169,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1201,9 +1201,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1226,9 +1226,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1256,9 +1256,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1282,9 +1282,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1314,9 +1314,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1339,9 +1339,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1369,9 +1369,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1395,9 +1395,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1427,9 +1427,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1452,10 +1452,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1483,9 +1483,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1509,10 +1509,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1542,9 +1542,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1567,10 +1567,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1598,9 +1598,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1624,10 +1624,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1657,9 +1657,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1682,10 +1682,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1713,9 +1713,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1739,10 +1739,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1773,9 +1773,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1800,9 +1800,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1831,9 +1831,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1860,9 +1860,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1891,9 +1891,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1920,9 +1920,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1951,9 +1951,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -1980,8 +1980,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2006,9 +2006,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2035,8 +2035,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2061,9 +2061,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2090,8 +2090,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2116,9 +2116,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2143,8 +2143,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2169,9 +2169,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2196,8 +2196,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2222,9 +2222,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2249,8 +2249,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2276,9 +2276,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2300,9 +2300,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2330,9 +2330,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2355,9 +2355,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2387,9 +2387,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2411,9 +2411,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2441,9 +2441,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2466,9 +2466,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2498,9 +2498,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2522,9 +2522,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2552,9 +2552,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2577,9 +2577,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2609,9 +2609,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2633,8 +2633,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2658,9 +2658,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2683,8 +2683,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2710,9 +2710,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2734,8 +2734,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2759,9 +2759,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2784,8 +2784,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2811,9 +2811,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2835,8 +2835,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2860,9 +2860,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2885,8 +2885,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2912,9 +2912,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2936,8 +2936,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2961,9 +2961,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -2986,8 +2986,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3013,9 +3013,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3037,8 +3037,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3062,9 +3062,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3087,8 +3087,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3114,9 +3114,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3138,8 +3138,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3163,9 +3163,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3188,8 +3188,8 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) */ + PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3217,9 +3217,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3246,9 +3246,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3277,9 +3277,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3308,9 +3308,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3339,9 +3339,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3370,9 +3370,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3401,9 +3401,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3432,9 +3432,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3463,9 +3463,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3494,9 +3494,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3525,9 +3525,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3556,9 +3556,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3587,9 +3587,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3618,10 +3618,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3650,9 +3650,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3681,10 +3681,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3713,9 +3713,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3742,10 +3742,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3774,9 +3774,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3803,10 +3803,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3835,9 +3835,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3864,10 +3864,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3896,9 +3896,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3925,10 +3925,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3959,9 +3959,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -3985,9 +3985,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4015,9 +4015,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4042,9 +4042,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4074,9 +4074,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4100,9 +4100,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4130,9 +4130,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4157,9 +4157,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4189,9 +4189,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4215,9 +4215,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4245,9 +4245,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4272,9 +4272,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4304,9 +4304,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4330,9 +4330,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4360,9 +4360,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4387,9 +4387,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4419,9 +4419,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4445,9 +4445,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4475,9 +4475,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4502,9 +4502,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4534,9 +4534,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4560,9 +4560,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4590,9 +4590,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4617,9 +4617,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4649,9 +4649,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4675,10 +4675,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4706,9 +4706,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4733,10 +4733,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4766,9 +4766,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4792,10 +4792,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4823,9 +4823,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4850,10 +4850,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4883,9 +4883,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4909,10 +4909,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4940,9 +4940,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -4967,10 +4967,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5000,9 +5000,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5026,10 +5026,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5057,9 +5057,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5084,10 +5084,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5117,9 +5117,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5143,10 +5143,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5174,9 +5174,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5201,10 +5201,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5234,9 +5234,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5260,10 +5260,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5291,9 +5291,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, - PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) */ + PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5318,10 +5318,10 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST (a) + PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = TokuDB, PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = TokuDB, - PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) */ + PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5372,9 +5372,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5405,9 +5405,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5468,9 +5468,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5501,9 +5501,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5564,9 +5564,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5597,9 +5597,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5660,9 +5660,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5693,9 +5693,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5756,9 +5756,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5789,9 +5789,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5852,9 +5852,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5885,9 +5885,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5948,9 +5948,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -5981,9 +5981,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6044,9 +6044,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6077,9 +6077,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6140,9 +6140,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6173,9 +6173,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 11 Original from partition p1 @@ -6236,9 +6236,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6265,9 +6265,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6328,9 +6328,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6357,9 +6357,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6420,9 +6420,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6449,9 +6449,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6512,9 +6512,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6541,9 +6541,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6604,9 +6604,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6633,9 +6633,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6696,9 +6696,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6725,9 +6725,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6788,9 +6788,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6817,9 +6817,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6880,9 +6880,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6909,9 +6909,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -6972,9 +6972,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 1 Original from partition p0 @@ -7001,9 +7001,9 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` varchar(64) DEFAULT NULL ) ENGINE=TokuDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (a) + PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = TokuDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ + PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = TokuDB) SELECT * FROM t1; a b 11 Original from partition p1 diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc index 84b64622c78..6d5776dc726 100644 --- a/storage/xtradb/buf/buf0buf.cc +++ b/storage/xtradb/buf/buf0buf.cc @@ -2,7 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -707,8 +707,12 @@ buf_page_is_corrupted( ulint checksum_field2; ulint space_id = mach_read_from_4( read_buf + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); + ulint page_type = mach_read_from_4( + read_buf + FIL_PAGE_TYPE); + bool no_checksum = (page_type == FIL_PAGE_PAGE_COMPRESSED || + page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED); fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space_id); - bool page_encrypted = false; + /* Page is encrypted if encryption information is found from tablespace and page contains used key_version. This is true @@ -716,10 +720,15 @@ buf_page_is_corrupted( if (crypt_data && crypt_data->type != CRYPT_SCHEME_UNENCRYPTED && fil_page_is_encrypted(read_buf)) { - page_encrypted = true; + no_checksum = true; } - if (!page_encrypted && !zip_size + /* Return early if there is no checksum or END_LSN */ + if (no_checksum) { + return (FALSE); + } + + if (!no_checksum && !zip_size && memcmp(read_buf + FIL_PAGE_LSN + 4, read_buf + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM + 4, 4)) { @@ -778,10 +787,6 @@ buf_page_is_corrupted( return(!page_zip_verify_checksum(read_buf, zip_size)); } - if (page_encrypted) { - return (FALSE); - } - checksum_field1 = mach_read_from_4( read_buf + FIL_PAGE_SPACE_OR_CHKSUM); @@ -1572,7 +1577,7 @@ buf_pool_init_instance( /* Initialize the temporal memory array and slots */ buf_pool->tmp_arr = (buf_tmp_array_t *)mem_zalloc(sizeof(buf_tmp_array_t)); - ulint n_slots = srv_n_read_io_threads * srv_n_write_io_threads * (8 * OS_AIO_N_PENDING_IOS_PER_THREAD); + ulint n_slots = (srv_n_read_io_threads + srv_n_write_io_threads) * (8 * OS_AIO_N_PENDING_IOS_PER_THREAD); buf_pool->tmp_arr->n_slots = n_slots; buf_pool->tmp_arr->slots = (buf_tmp_buffer_t*)mem_zalloc(sizeof(buf_tmp_buffer_t) * n_slots); diff --git a/storage/xtradb/buf/buf0dblwr.cc b/storage/xtradb/buf/buf0dblwr.cc index 62ed17296f5..68bb83e4903 100644 --- a/storage/xtradb/buf/buf0dblwr.cc +++ b/storage/xtradb/buf/buf0dblwr.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -455,8 +455,11 @@ buf_dblwr_init_or_load_pages( os_file_write(path, file, page, source_page_no * UNIV_PAGE_SIZE, UNIV_PAGE_SIZE); - } else if (load_corrupt_pages) { - + } else if (load_corrupt_pages + && !buf_page_is_zeroes(page, FIL_PAGE_DATA)) { + /* Each valid page header must contain some + nonzero bytes, such as FIL_PAGE_OFFSET + or FIL_PAGE_LSN. */ recv_dblwr.add(page); } @@ -492,8 +495,6 @@ buf_dblwr_process() for (std::list::iterator i = recv_dblwr.pages.begin(); i != recv_dblwr.pages.end(); ++i, ++page_no_dblwr ) { - bool is_compressed = false; - page = *i; page_no = mach_read_from_4(page + FIL_PAGE_OFFSET); space_id = mach_read_from_4(page + FIL_PAGE_SPACE_ID); @@ -501,140 +502,122 @@ buf_dblwr_process() if (!fil_tablespace_exists_in_mem(space_id)) { /* Maybe we have dropped the single-table tablespace and this page once belonged to it: do nothing */ - - } else if (!fil_check_adress_in_tablespace(space_id, - page_no)) { - ib_logf(IB_LOG_LEVEL_WARN, - "A page in the doublewrite buffer is not " - "within space bounds; space id %lu " - "page number %lu, page %lu in " - "doublewrite buf.", - (ulong) space_id, (ulong) page_no, - page_no_dblwr); - } else { - 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, - page_no, - 0, - zip_size ? zip_size : UNIV_PAGE_SIZE, - read_buf, - NULL, - 0); - - /* Is page compressed ? */ - is_compressed = fil_page_is_compressed_encrypted(read_buf) | - fil_page_is_compressed(read_buf); - - /* If page was compressed, decompress it before we - check checksum. */ - if (is_compressed) { - fil_decompress_page(NULL, read_buf, UNIV_PAGE_SIZE, NULL, true); - } - - if (fil_space_verify_crypt_checksum(read_buf, zip_size)) { - /* page is encrypted and checksum is OK */ - } else if (buf_page_is_corrupted(true, read_buf, zip_size)) { - - fprintf(stderr, - "InnoDB: Database page" - " corruption or a failed\n" - "InnoDB: file read of" - " space %lu page %lu.\n" - "InnoDB: Trying to recover it from" - " the doublewrite buffer.\n", - (ulong) space_id, (ulong) page_no); - - /* Is page compressed ? */ - is_compressed = fil_page_is_compressed_encrypted(page) | - fil_page_is_compressed(page); - - /* If page was compressed, decompress it before we - check checksum. */ - if (is_compressed) { - fil_decompress_page(NULL, page, UNIV_PAGE_SIZE, NULL, true); - } - - if (fil_space_verify_crypt_checksum(page, zip_size)) { - /* the doublewrite buffer page is encrypted and OK */ - } else if (buf_page_is_corrupted(true, - page, - zip_size)) { - fprintf(stderr, - "InnoDB: Dump of the page:\n"); - buf_page_print( - read_buf, zip_size, - BUF_PAGE_PRINT_NO_CRASH); - fprintf(stderr, - "InnoDB: Dump of" - " corresponding page" - " in doublewrite buffer:\n"); - buf_page_print( - page, zip_size, - BUF_PAGE_PRINT_NO_CRASH); - - fprintf(stderr, - "InnoDB: Also the page in the" - " doublewrite buffer" - " is corrupt.\n" - "InnoDB: Cannot continue" - " operation.\n" - "InnoDB: You can try to" - " recover the database" - " with the my.cnf\n" - "InnoDB: option:\n" - "InnoDB:" - " innodb_force_recovery=6\n"); - ut_error; - } - - /* Write the good page from the - doublewrite buffer to the intended - position */ - - fil_io(OS_FILE_WRITE, - true, - space_id, - zip_size, - page_no, - 0, - zip_size ? zip_size : UNIV_PAGE_SIZE, - page, - NULL, - 0); - - ib_logf(IB_LOG_LEVEL_INFO, - "Recovered the page from" - " the doublewrite buffer."); - - } else if (buf_page_is_zeroes(read_buf, zip_size)) { - - if (!buf_page_is_zeroes(page, zip_size) - && !buf_page_is_corrupted(true, page, - zip_size)) { - - /* Database page contained only - zeroes, while a valid copy is - available in dblwr buffer. */ - - fil_io(OS_FILE_WRITE, - true, - space_id, - zip_size, - page_no, 0, - zip_size ? zip_size : UNIV_PAGE_SIZE, - page, - NULL, - 0); - } - } + continue; } + + if (!fil_check_adress_in_tablespace(space_id, page_no)) { + ib_logf(IB_LOG_LEVEL_WARN, + "A copy of page " ULINTPF ":" ULINTPF + " in the doublewrite buffer slot " ULINTPF + " is not within space bounds", + space_id, page_no, page_no_dblwr); + continue; + } + + ulint zip_size = fil_space_get_zip_size(space_id); + ut_ad(!buf_page_is_zeroes(page, zip_size)); + + /* Read in the actual page from the file */ + fil_io(OS_FILE_READ, + true, + space_id, + zip_size, + page_no, + 0, + zip_size ? zip_size : UNIV_PAGE_SIZE, + read_buf, + NULL, + 0); + + const bool is_all_zero = buf_page_is_zeroes( + read_buf, zip_size); + + if (is_all_zero) { + /* We will check if the copy in the + doublewrite buffer is valid. If not, we will + ignore this page (there should be redo log + records to initialize it). */ + } else { + if (fil_page_is_compressed_encrypted(read_buf) || + fil_page_is_compressed(read_buf)) { + /* Decompress the page before + validating the checksum. */ + fil_decompress_page( + NULL, read_buf, UNIV_PAGE_SIZE, + NULL, true); + } + + if (fil_space_verify_crypt_checksum( + read_buf, zip_size) + || !buf_page_is_corrupted( + true, read_buf, zip_size)) { + /* The page is good; there is no need + to consult the doublewrite buffer. */ + continue; + } + + /* We intentionally skip this message for + is_all_zero pages. */ + ib_logf(IB_LOG_LEVEL_INFO, + "Trying to recover page " ULINTPF ":" ULINTPF + " from the doublewrite buffer.", + space_id, page_no); + } + + /* Next, validate the doublewrite page. */ + if (fil_page_is_compressed_encrypted(page) || + fil_page_is_compressed(page)) { + /* Decompress the page before + validating the checksum. */ + fil_decompress_page( + NULL, page, UNIV_PAGE_SIZE, NULL, true); + } + + if (!fil_space_verify_crypt_checksum(page, zip_size) + && buf_page_is_corrupted(true, page, zip_size)) { + if (!is_all_zero) { + ib_logf(IB_LOG_LEVEL_WARN, + "A doublewrite copy of page " + ULINTPF ":" ULINTPF " is corrupted.", + space_id, page_no); + } + /* Theoretically we could have another good + copy for this page in the doublewrite + buffer. If not, we will report a fatal error + for a corrupted page somewhere else if that + page was truly needed. */ + continue; + } + + if (page_no == 0) { + /* Check the FSP_SPACE_FLAGS. */ + ulint flags = fsp_header_get_flags(page); + if (!fsp_flags_is_valid(flags) + && fsp_flags_convert_from_101(flags) + == ULINT_UNDEFINED) { + ib_logf(IB_LOG_LEVEL_WARN, + "Ignoring a doublewrite copy of page " + ULINTPF ":0 due to invalid flags 0x%x", + space_id, int(flags)); + continue; + } + /* The flags on the page should be converted later. */ + } + + /* Write the good page from the doublewrite buffer to + the intended position. */ + + fil_io(OS_FILE_WRITE, true, space_id, zip_size, page_no, 0, + zip_size ? zip_size : UNIV_PAGE_SIZE, + page, NULL, 0); + + ib_logf(IB_LOG_LEVEL_INFO, + "Recovered page " ULINTPF ":" ULINTPF " from" + " the doublewrite buffer.", + space_id, page_no); } + ut_free(unaligned_read_buf); fil_flush_file_spaces(FIL_TABLESPACE); { diff --git a/storage/xtradb/buf/buf0dump.cc b/storage/xtradb/buf/buf0dump.cc index 114c96cec98..6abf7375775 100644 --- a/storage/xtradb/buf/buf0dump.cc +++ b/storage/xtradb/buf/buf0dump.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -682,15 +683,10 @@ again. @return this function does not return, it calls os_thread_exit() */ extern "C" UNIV_INTERN os_thread_ret_t -DECLARE_THREAD(buf_dump_thread)( -/*============================*/ - void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter - required by os_thread_create */ +DECLARE_THREAD(buf_dump_thread)(void*) { ut_ad(!srv_read_only_mode); - srv_buf_dump_thread_active = TRUE; - buf_dump_status(STATUS_INFO, "Dumping buffer pool(s) not yet started"); buf_load_status(STATUS_INFO, "Loading buffer pool(s) not yet started"); @@ -720,7 +716,7 @@ DECLARE_THREAD(buf_dump_thread)( keep going even if we are in a shutdown state */); } - srv_buf_dump_thread_active = FALSE; + srv_buf_dump_thread_active = false; /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit and not use return() to exit. */ diff --git a/storage/xtradb/dict/dict0boot.cc b/storage/xtradb/dict/dict0boot.cc index 7162a7f4c87..9731211ff5f 100644 --- a/storage/xtradb/dict/dict0boot.cc +++ b/storage/xtradb/dict/dict0boot.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. +Copyright (c) 2016, 2017, MariaDB Corporation. This 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 @@ -273,10 +273,6 @@ dict_boot(void) ut_ad(DICT_NUM_FIELDS__SYS_FOREIGN_FOR_NAME == 2); ut_ad(DICT_NUM_COLS__SYS_FOREIGN_COLS == 4); ut_ad(DICT_NUM_FIELDS__SYS_FOREIGN_COLS == 6); - ut_ad(DICT_NUM_COLS__SYS_ZIP_DICT == 3); - ut_ad(DICT_NUM_FIELDS__SYS_ZIP_DICT == 5); - ut_ad(DICT_NUM_COLS__SYS_ZIP_DICT_COLS == 3); - ut_ad(DICT_NUM_FIELDS__SYS_ZIP_DICT_COLS == 5); mtr_start(&mtr); diff --git a/storage/xtradb/dict/dict0crea.cc b/storage/xtradb/dict/dict0crea.cc index 4a7bd2e8a4e..1ada35a89a2 100644 --- a/storage/xtradb/dict/dict0crea.cc +++ b/storage/xtradb/dict/dict0crea.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -1936,135 +1937,6 @@ dict_create_or_check_sys_tablespace(void) return(err); } -/** Creates the zip_dict system table inside InnoDB -at server bootstrap or server start if it is not found or is -not of the right form. -@return DB_SUCCESS or error code */ -UNIV_INTERN -dberr_t -dict_create_or_check_sys_zip_dict(void) -{ - trx_t* trx; - my_bool srv_file_per_table_backup; - dberr_t err; - dberr_t sys_zip_dict_err; - dberr_t sys_zip_dict_cols_err; - - ut_a(srv_get_active_thread_type() == SRV_NONE); - - /* Note: The master thread has not been started at this point. */ - - sys_zip_dict_err = dict_check_if_system_table_exists( - "SYS_ZIP_DICT", DICT_NUM_FIELDS__SYS_ZIP_DICT + 1, 2); - sys_zip_dict_cols_err = dict_check_if_system_table_exists( - "SYS_ZIP_DICT_COLS", DICT_NUM_FIELDS__SYS_ZIP_DICT_COLS + 1, - 1); - - if (sys_zip_dict_err == DB_SUCCESS && - sys_zip_dict_cols_err == DB_SUCCESS) - return (DB_SUCCESS); - - trx = trx_allocate_for_mysql(); - - trx_set_dict_operation(trx, TRX_DICT_OP_TABLE); - - trx->op_info = "creating zip_dict and zip_dict_cols sys tables"; - - row_mysql_lock_data_dictionary(trx); - - /* Check which incomplete table definition to drop. */ - - if (sys_zip_dict_err == DB_CORRUPTION) { - ib_logf(IB_LOG_LEVEL_WARN, - "Dropping incompletely created " - "SYS_ZIP_DICT table."); - row_drop_table_for_mysql("SYS_ZIP_DICT", trx, TRUE, TRUE); - } - if (sys_zip_dict_cols_err == DB_CORRUPTION) { - ib_logf(IB_LOG_LEVEL_WARN, - "Dropping incompletely created " - "SYS_ZIP_DICT_COLS table."); - row_drop_table_for_mysql("SYS_ZIP_DICT_COLS", trx, TRUE, TRUE); - } - - ib_logf(IB_LOG_LEVEL_INFO, - "Creating zip_dict and zip_dict_cols system tables."); - - /* We always want SYSTEM tables to be created inside the system - tablespace. */ - srv_file_per_table_backup = srv_file_per_table; - srv_file_per_table = 0; - - err = que_eval_sql( - NULL, - "PROCEDURE CREATE_SYS_ZIP_DICT_PROC () IS\n" - "BEGIN\n" - "CREATE TABLE SYS_ZIP_DICT(\n" - " ID INT UNSIGNED NOT NULL,\n" - " NAME CHAR(" - STRINGIFY_ARG(ZIP_DICT_MAX_NAME_LENGTH) - ") NOT NULL,\n" - " DATA BLOB NOT NULL\n" - ");\n" - "CREATE UNIQUE CLUSTERED INDEX SYS_ZIP_DICT_ID" - " ON SYS_ZIP_DICT (ID);\n" - "CREATE UNIQUE INDEX SYS_ZIP_DICT_NAME" - " ON SYS_ZIP_DICT (NAME);\n" - "CREATE TABLE SYS_ZIP_DICT_COLS(\n" - " TABLE_ID INT UNSIGNED NOT NULL,\n" - " COLUMN_POS INT UNSIGNED NOT NULL,\n" - " DICT_ID INT UNSIGNED NOT NULL\n" - ");\n" - "CREATE UNIQUE CLUSTERED INDEX SYS_ZIP_DICT_COLS_COMPOSITE" - " ON SYS_ZIP_DICT_COLS (TABLE_ID, COLUMN_POS);\n" - "END;\n", - FALSE, trx); - - if (err != DB_SUCCESS) { - ib_logf(IB_LOG_LEVEL_ERROR, - "Creation of SYS_ZIP_DICT and SYS_ZIP_DICT_COLS" - "has failed with error %lu. Tablespace is full. " - "Dropping incompletely created tables.", - (ulong) err); - - ut_a(err == DB_OUT_OF_FILE_SPACE - || err == DB_TOO_MANY_CONCURRENT_TRXS); - - row_drop_table_for_mysql("SYS_ZIP_DICT", trx, TRUE, TRUE); - row_drop_table_for_mysql("SYS_ZIP_DICT_COLS", trx, TRUE, TRUE); - - if (err == DB_OUT_OF_FILE_SPACE) { - err = DB_MUST_GET_MORE_FILE_SPACE; - } - } - - trx_commit_for_mysql(trx); - - row_mysql_unlock_data_dictionary(trx); - - trx_free_for_mysql(trx); - - srv_file_per_table = srv_file_per_table_backup; - - if (err == DB_SUCCESS) { - ib_logf(IB_LOG_LEVEL_INFO, - "zip_dict and zip_dict_cols system tables created."); - } - - /* Note: The master thread has not been started at this point. */ - /* Confirm and move to the non-LRU part of the table LRU list. */ - - sys_zip_dict_err = dict_check_if_system_table_exists( - "SYS_ZIP_DICT", DICT_NUM_FIELDS__SYS_ZIP_DICT + 1, 2); - ut_a(sys_zip_dict_err == DB_SUCCESS); - sys_zip_dict_cols_err = dict_check_if_system_table_exists( - "SYS_ZIP_DICT_COLS", - DICT_NUM_FIELDS__SYS_ZIP_DICT_COLS + 1, 1); - ut_a(sys_zip_dict_cols_err == DB_SUCCESS); - - return(err); -} - /********************************************************************//** Add a single tablespace definition to the data dictionary tables in the database. @@ -2118,456 +1990,3 @@ dict_create_add_tablespace_to_dictionary( return(error); } - -/** Add a single compression dictionary definition to the SYS_ZIP_DICT -InnoDB system table. -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_add_zip_dict( - const char* name, /*!< in: dict name */ - ulint name_len, /*!< in: dict name length */ - const char* data, /*!< in: dict data */ - ulint data_len, /*!< in: dict data length */ - trx_t* trx) /*!< in/out: transaction */ -{ - ut_ad(name); - ut_ad(data); - - pars_info_t* info = pars_info_create(); - - pars_info_add_literal(info, "name", name, name_len, - DATA_VARCHAR, DATA_ENGLISH); - pars_info_add_literal(info, "data", data, data_len, - DATA_BLOB, DATA_BINARY_TYPE | DATA_NOT_NULL); - - dberr_t error = que_eval_sql(info, - "PROCEDURE P () IS\n" - " max_id INT;\n" - "DECLARE CURSOR cur IS\n" - " SELECT ID FROM SYS_ZIP_DICT\n" - " ORDER BY ID DESC;\n" - "BEGIN\n" - " max_id := 0;\n" - " OPEN cur;\n" - " FETCH cur INTO max_id;\n" - " IF (cur % NOTFOUND) THEN\n" - " max_id := 0;\n" - " END IF;\n" - " CLOSE cur;\n" - " INSERT INTO SYS_ZIP_DICT VALUES" - " (max_id + 1, :name, :data);\n" - "END;\n", - FALSE, trx); - - return error; -} - -/** Fetch callback, just stores extracted zip_dict id in the external -variable. -@return TRUE if all OK */ -static -ibool -dict_create_extract_int_aux( - void* row, /*!< in: sel_node_t* */ - void* user_arg) /*!< in: int32 id */ -{ - sel_node_t* node = static_cast(row); - dfield_t* dfield = que_node_get_val(node->select_list); - dtype_t* type = dfield_get_type(dfield); - ulint len = dfield_get_len(dfield); - - ut_a(dtype_get_mtype(type) == DATA_INT); - ut_a(len == sizeof(ib_uint32_t)); - - memcpy(user_arg, dfield_get_data(dfield), sizeof(ib_uint32_t)); - - return(TRUE); -} - -/** Add a single compression dictionary reference to the SYS_ZIP_DICT_COLS -InnoDB system table. -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_add_zip_dict_reference( - ulint table_id, /*!< in: table id */ - ulint column_pos, /*!< in: column position */ - ulint dict_id, /*!< in: dict id */ - trx_t* trx) /*!< in/out: transaction */ -{ - pars_info_t* info = pars_info_create(); - - pars_info_add_int4_literal(info, "table_id", table_id); - pars_info_add_int4_literal(info, "column_pos", column_pos); - pars_info_add_int4_literal(info, "dict_id", dict_id); - - dberr_t error = que_eval_sql(info, - "PROCEDURE P () IS\n" - "BEGIN\n" - " INSERT INTO SYS_ZIP_DICT_COLS VALUES" - " (:table_id, :column_pos, :dict_id);\n" - "END;\n", - FALSE, trx); - return error; -} - -/** Get a single compression dictionary id for the given -(table id, column pos) pair. -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_get_zip_dict_id_by_reference( - ulint table_id, /*!< in: table id */ - ulint column_pos, /*!< in: column position */ - ulint* dict_id, /*!< out: dict id */ - trx_t* trx) /*!< in/out: transaction */ -{ - ut_ad(dict_id); - - pars_info_t* info = pars_info_create(); - - ib_uint32_t dict_id_buf; - mach_write_to_4(reinterpret_cast(&dict_id_buf ), - ULINT32_UNDEFINED); - - pars_info_add_int4_literal(info, "table_id", table_id); - pars_info_add_int4_literal(info, "column_pos", column_pos); - pars_info_bind_function( - info, "my_func", dict_create_extract_int_aux, &dict_id_buf); - - dberr_t error = que_eval_sql(info, - "PROCEDURE P () IS\n" - "DECLARE FUNCTION my_func;\n" - "DECLARE CURSOR cur IS\n" - " SELECT DICT_ID FROM SYS_ZIP_DICT_COLS\n" - " WHERE TABLE_ID = :table_id AND\n" - " COLUMN_POS = :column_pos;\n" - "BEGIN\n" - " OPEN cur;\n" - " FETCH cur INTO my_func();\n" - " CLOSE cur;\n" - "END;\n", - FALSE, trx); - if (error == DB_SUCCESS) { - ib_uint32_t local_dict_id = mach_read_from_4( - reinterpret_cast(&dict_id_buf)); - if (local_dict_id == ULINT32_UNDEFINED) - error = DB_RECORD_NOT_FOUND; - else - *dict_id = local_dict_id; - } - return error; -} - -/** Get compression dictionary id for the given name. -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_get_zip_dict_id_by_name( - const char* dict_name, /*!< in: dict name */ - ulint dict_name_len, /*!< in: dict name length */ - ulint* dict_id, /*!< out: dict id */ - trx_t* trx) /*!< in/out: transaction */ -{ - ut_ad(dict_name); - ut_ad(dict_name_len); - ut_ad(dict_id); - - pars_info_t* info = pars_info_create(); - - pars_info_add_literal(info, "dict_name", dict_name, dict_name_len, - DATA_VARCHAR, DATA_ENGLISH); - - ib_uint32_t dict_id_buf; - mach_write_to_4(reinterpret_cast(&dict_id_buf), - ULINT32_UNDEFINED); - pars_info_bind_function( - info, "my_func", dict_create_extract_int_aux, &dict_id_buf); - - dberr_t error = que_eval_sql(info, - "PROCEDURE P () IS\n" - "DECLARE FUNCTION my_func;\n" - "DECLARE CURSOR cur IS\n" - " SELECT ID FROM SYS_ZIP_DICT\n" - " WHERE NAME = :dict_name;\n" - "BEGIN\n" - " OPEN cur;\n" - " FETCH cur INTO my_func();\n" - " CLOSE cur;\n" - "END;\n", - FALSE, trx); - if (error == DB_SUCCESS) { - ib_uint32_t local_dict_id = mach_read_from_4( - reinterpret_cast(&dict_id_buf)); - if (local_dict_id == ULINT32_UNDEFINED) - error = DB_RECORD_NOT_FOUND; - else - *dict_id = local_dict_id; - } - return error; -} - -/** Auxiliary enum used to indicate zip dict data extraction result code */ -enum zip_dict_info_aux_code { - zip_dict_info_success, /*!< success */ - zip_dict_info_not_found, /*!< zip dict record not found */ - zip_dict_info_oom, /*!< out of memory */ - zip_dict_info_corrupted_name, /*!< corrupted zip dict name */ - zip_dict_info_corrupted_data /*!< corrupted zip dict data */ -}; - -/** Auxiliary struct used to return zip dict info aling with result code */ -struct zip_dict_info_aux { - LEX_STRING name; /*!< zip dict name */ - LEX_STRING data; /*!< zip dict data */ - int code; /*!< result code (0 - success) */ -}; - -/** Fetch callback, just stores extracted zip_dict data in the external -variable. -@return always returns TRUE */ -static -ibool -dict_create_get_zip_dict_info_by_id_aux( - void* row, /*!< in: sel_node_t* */ - void* user_arg) /*!< in: pointer to zip_dict_info_aux* */ -{ - sel_node_t* node = static_cast(row); - zip_dict_info_aux* result = - static_cast(user_arg); - - result->code = zip_dict_info_success; - result->name.str = 0; - result->name.length = 0; - result->data.str = 0; - result->data.length = 0; - - /* NAME field */ - que_node_t* exp = node->select_list; - ut_a(exp != 0); - - dfield_t* dfield = que_node_get_val(exp); - dtype_t* type = dfield_get_type(dfield); - ut_a(dtype_get_mtype(type) == DATA_VARCHAR); - - ulint len = dfield_get_len(dfield); - void* data = dfield_get_data(dfield); - - - if (len == UNIV_SQL_NULL) { - result->code = zip_dict_info_corrupted_name; - } - else { - result->name.str = - static_cast(my_malloc(len + 1, MYF(0))); - if (result->name.str == 0) { - result->code = zip_dict_info_oom; - } - else { - memcpy(result->name.str, data, len); - result->name.str[len] = '\0'; - result->name.length = len; - } - } - - /* DATA field */ - exp = que_node_get_next(exp); - ut_a(exp != 0); - - dfield = que_node_get_val(exp); - type = dfield_get_type(dfield); - ut_a(dtype_get_mtype(type) == DATA_BLOB); - - len = dfield_get_len(dfield); - data = dfield_get_data(dfield); - - if (len == UNIV_SQL_NULL) { - result->code = zip_dict_info_corrupted_data; - } - else { - result->data.str = - static_cast(my_malloc( - len == 0 ? 1 : len, MYF(0))); - if (result->data.str == 0) { - result->code = zip_dict_info_oom; - } - else { - memcpy(result->data.str, data, len); - result->data.length = len; - } - } - - ut_ad(que_node_get_next(exp) == 0); - - if (result->code != zip_dict_info_success) { - if (result->name.str == 0) { - mem_free(result->name.str); - result->name.str = 0; - result->name.length = 0; - } - if (result->data.str == 0) { - mem_free(result->data.str); - result->data.str = 0; - result->data.length = 0; - } - } - - return TRUE; -} - -/** Get compression dictionary info (name and data) for the given id. -Allocates memory for name and data on success. -Must be freed with mem_free(). -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_get_zip_dict_info_by_id( - ulint dict_id, /*!< in: dict id */ - char** name, /*!< out: dict name */ - ulint* name_len, /*!< out: dict name length*/ - char** data, /*!< out: dict data */ - ulint* data_len, /*!< out: dict data length*/ - trx_t* trx) /*!< in/out: transaction */ -{ - ut_ad(name); - ut_ad(data); - - zip_dict_info_aux rec; - rec.code = zip_dict_info_not_found; - pars_info_t* info = pars_info_create(); - - pars_info_add_int4_literal(info, "id", dict_id); - pars_info_bind_function( - info, "my_func", dict_create_get_zip_dict_info_by_id_aux, - &rec); - - dberr_t error = que_eval_sql(info, - "PROCEDURE P () IS\n" - "DECLARE FUNCTION my_func;\n" - "DECLARE CURSOR cur IS\n" - " SELECT NAME, DATA FROM SYS_ZIP_DICT\n" - " WHERE ID = :id;\n" - "BEGIN\n" - " OPEN cur;\n" - " FETCH cur INTO my_func();\n" - " CLOSE cur;\n" - "END;\n", - FALSE, trx); - if (error == DB_SUCCESS) { - switch (rec.code) { - case zip_dict_info_success: - *name = rec.name.str; - *name_len = rec.name.length; - *data = rec.data.str; - *data_len = rec.data.length; - break; - case zip_dict_info_not_found: - error = DB_RECORD_NOT_FOUND; - break; - case zip_dict_info_oom: - error = DB_OUT_OF_MEMORY; - break; - case zip_dict_info_corrupted_name: - case zip_dict_info_corrupted_data: - error = DB_INVALID_NULL; - break; - default: - ut_error; - } - } - return error; -} - -/** Remove a single compression dictionary from the data dictionary -tables in the database. -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_remove_zip_dict( - const char* name, /*!< in: dict name */ - ulint name_len, /*!< in: dict name length */ - trx_t* trx) /*!< in/out: transaction */ -{ - ut_ad(name); - - pars_info_t* info = pars_info_create(); - - ib_uint32_t dict_id_buf; - mach_write_to_4(reinterpret_cast(&dict_id_buf), - ULINT32_UNDEFINED); - ib_uint32_t counter_buf; - mach_write_to_4(reinterpret_cast(&counter_buf), - ULINT32_UNDEFINED); - - pars_info_add_literal(info, "name", name, name_len, - DATA_VARCHAR, DATA_ENGLISH); - pars_info_bind_int4_literal(info, "dict_id", &dict_id_buf); - pars_info_bind_function(info, "find_dict_func", - dict_create_extract_int_aux, &dict_id_buf); - pars_info_bind_function(info, "count_func", - dict_create_extract_int_aux, &counter_buf); - - dberr_t error = que_eval_sql(info, - "PROCEDURE P () IS\n" - "DECLARE FUNCTION find_dict_func;\n" - "DECLARE FUNCTION count_func;\n" - "DECLARE CURSOR dict_cur IS\n" - " SELECT ID FROM SYS_ZIP_DICT\n" - " WHERE NAME = :name\n" - " FOR UPDATE;\n" - "DECLARE CURSOR ref_cur IS\n" - " SELECT 1 FROM SYS_ZIP_DICT_COLS\n" - " WHERE DICT_ID = :dict_id;\n" - "BEGIN\n" - " OPEN dict_cur;\n" - " FETCH dict_cur INTO find_dict_func();\n" - " IF NOT (SQL % NOTFOUND) THEN\n" - " OPEN ref_cur;\n" - " FETCH ref_cur INTO count_func();\n" - " IF SQL % NOTFOUND THEN\n" - " DELETE FROM SYS_ZIP_DICT WHERE CURRENT OF dict_cur;\n" - " END IF;\n" - " CLOSE ref_cur;\n" - " END IF;\n" - " CLOSE dict_cur;\n" - "END;\n", - FALSE, trx); - if (error == DB_SUCCESS) { - ib_uint32_t local_dict_id = mach_read_from_4( - reinterpret_cast(&dict_id_buf)); - if (local_dict_id == ULINT32_UNDEFINED) { - error = DB_RECORD_NOT_FOUND; - } - else { - ib_uint32_t local_counter = mach_read_from_4( - reinterpret_cast(&counter_buf)); - if (local_counter != ULINT32_UNDEFINED) - error = DB_ROW_IS_REFERENCED; - } - } - return error; -} - -/** Remove all compression dictionary references for the given table ID from -the data dictionary tables in the database. -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_remove_zip_dict_references_for_table( - ulint table_id, /*!< in: table id */ - trx_t* trx) /*!< in/out: transaction */ -{ - pars_info_t* info = pars_info_create(); - - pars_info_add_int4_literal(info, "table_id", table_id); - - dberr_t error = que_eval_sql(info, - "PROCEDURE P () IS\n" - "BEGIN\n" - " DELETE FROM SYS_ZIP_DICT_COLS\n" - " WHERE TABLE_ID = :table_id;\n" - "END;\n", - FALSE, trx); - return error; -} diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc index dc75996ac7b..90936f6667b 100644 --- a/storage/xtradb/dict/dict0dict.cc +++ b/storage/xtradb/dict/dict0dict.cc @@ -2,7 +2,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2015, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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 @@ -7341,161 +7341,3 @@ dict_tf_to_row_format_string( return(0); } #endif /* !UNIV_HOTBACKUP */ - -/** Insert a records into SYS_ZIP_DICT. -@retval DB_SUCCESS if OK -@retval dberr_t if the insert failed */ -UNIV_INTERN -dberr_t -dict_create_zip_dict( - const char* name, /*!< in: zip_dict name */ - ulint name_len, /*!< in: zip_dict name length*/ - const char* data, /*!< in: zip_dict data */ - ulint data_len) /*!< in: zip_dict data length */ -{ - dberr_t err = DB_SUCCESS; - trx_t* trx; - - ut_ad(name); - ut_ad(data); - - rw_lock_x_lock(&dict_operation_lock); - dict_mutex_enter_for_mysql(); - - trx = trx_allocate_for_background(); - trx->op_info = "insert zip_dict"; - trx->dict_operation_lock_mode = RW_X_LATCH; - trx_start_if_not_started(trx); - - err = dict_create_add_zip_dict(name, name_len, data, data_len, trx); - - if (err == DB_SUCCESS) { - trx_commit_for_mysql(trx); - } - else { - trx->op_info = "rollback of internal trx on zip_dict table"; - trx_rollback_to_savepoint(trx, NULL); - ut_a(trx->error_state == DB_SUCCESS); - } - trx->op_info = ""; - trx->dict_operation_lock_mode = 0; - trx_free_for_background(trx); - - dict_mutex_exit_for_mysql(); - rw_lock_x_unlock(&dict_operation_lock); - - return err; -} -/** Get single compression dictionary id for the given -(table id, column pos) pair. -@retval DB_SUCCESS if OK -@retval DB_RECORD_NOT_FOUND if not found */ -UNIV_INTERN -dberr_t -dict_get_dictionary_id_by_key( - ulint table_id, /*!< in: table id */ - ulint column_pos, /*!< in: column position */ - ulint* dict_id) /*!< out: zip_dict id */ -{ - dberr_t err = DB_SUCCESS; - trx_t* trx; - - rw_lock_s_lock(&dict_operation_lock); - dict_mutex_enter_for_mysql(); - - trx = trx_allocate_for_background(); - trx->op_info = "get zip dict id by composite key"; - trx->dict_operation_lock_mode = RW_S_LATCH; - trx_start_if_not_started(trx); - - err = dict_create_get_zip_dict_id_by_reference(table_id, column_pos, - dict_id, trx); - - trx_commit_for_mysql(trx); - trx->dict_operation_lock_mode = 0; - trx_free_for_background(trx); - - dict_mutex_exit_for_mysql(); - rw_lock_s_unlock(&dict_operation_lock); - - return err; -} -/** Get compression dictionary info (name and data) for the given id. -Allocates memory in name->str and data->str on success. -Must be freed with mem_free(). -@retval DB_SUCCESS if OK -@retval DB_RECORD_NOT_FOUND if not found */ -UNIV_INTERN -dberr_t -dict_get_dictionary_info_by_id( - ulint dict_id, /*!< in: table name */ - char** name, /*!< out: dictionary name */ - ulint* name_len, /*!< out: dictionary name length*/ - char** data, /*!< out: dictionary data */ - ulint* data_len) /*!< out: dictionary data length*/ -{ - dberr_t err = DB_SUCCESS; - trx_t* trx; - - rw_lock_s_lock(&dict_operation_lock); - dict_mutex_enter_for_mysql(); - - trx = trx_allocate_for_background(); - trx->op_info = "get zip dict name and data by id"; - trx->dict_operation_lock_mode = RW_S_LATCH; - trx_start_if_not_started(trx); - - err = dict_create_get_zip_dict_info_by_id(dict_id, name, name_len, - data, data_len, trx); - - trx_commit_for_mysql(trx); - trx->dict_operation_lock_mode = 0; - trx_free_for_background(trx); - - dict_mutex_exit_for_mysql(); - rw_lock_s_unlock(&dict_operation_lock); - - return err; -} -/** Delete a record in SYS_ZIP_DICT with the given name. -@retval DB_SUCCESS if OK -@retval DB_RECORD_NOT_FOUND if not found -@retval DB_ROW_IS_REFERENCED if in use */ -UNIV_INTERN -dberr_t -dict_drop_zip_dict( - const char* name, /*!< in: zip_dict name */ - ulint name_len) /*!< in: zip_dict name length*/ -{ - dberr_t err = DB_SUCCESS; - trx_t* trx; - - ut_ad(name); - - rw_lock_x_lock(&dict_operation_lock); - dict_mutex_enter_for_mysql(); - - trx = trx_allocate_for_background(); - trx->op_info = "delete zip_dict"; - trx->dict_operation_lock_mode = RW_X_LATCH; - trx_start_if_not_started(trx); - - err = dict_create_remove_zip_dict(name, name_len, trx); - - if (err == DB_SUCCESS) { - trx_commit_for_mysql(trx); - } - else { - trx->op_info = "rollback of internal trx on zip_dict table"; - trx_rollback_to_savepoint(trx, NULL); - ut_a(trx->error_state == DB_SUCCESS); - } - trx->op_info = ""; - trx->dict_operation_lock_mode = 0; - trx_free_for_background(trx); - - dict_mutex_exit_for_mysql(); - rw_lock_x_unlock(&dict_operation_lock); - - return err; -} diff --git a/storage/xtradb/dict/dict0load.cc b/storage/xtradb/dict/dict0load.cc index b4ffb6ddf02..b843891f16c 100644 --- a/storage/xtradb/dict/dict0load.cc +++ b/storage/xtradb/dict/dict0load.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. +Copyright (c) 2016, 2017, MariaDB Corporation. This 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,9 +57,7 @@ static const char* SYSTEM_TABLE_NAME[] = { "SYS_FOREIGN", "SYS_FOREIGN_COLS", "SYS_TABLESPACES", - "SYS_DATAFILES", - "SYS_ZIP_DICT", - "SYS_ZIP_DICT_COLS" + "SYS_DATAFILES" }; /* If this flag is TRUE, then we will load the cluster index's (and tables') @@ -731,161 +729,6 @@ err_len: return(NULL); } -/** This function parses a SYS_ZIP_DICT record, extracts necessary -information from the record and returns to caller. -@return error message, or NULL on success */ -UNIV_INTERN -const char* -dict_process_sys_zip_dict( - mem_heap_t* heap, /*!< in/out: heap memory */ - ulint zip_size, /*!< in: nonzero=compressed BLOB page size */ - const rec_t* rec, /*!< in: current SYS_ZIP_DICT rec */ - ulint* id, /*!< out: dict id */ - const char** name, /*!< out: dict name */ - const char** data, /*!< out: dict data */ - ulint* data_len) /*!< out: dict data length */ -{ - ulint len; - const byte* field; - - /* Initialize the output values */ - *id = ULINT_UNDEFINED; - *name = NULL; - *data = NULL; - *data_len = 0; - - if (UNIV_UNLIKELY(rec_get_deleted_flag(rec, 0))) { - return("delete-marked record in SYS_ZIP_DICT"); - } - - if (UNIV_UNLIKELY( - rec_get_n_fields_old(rec)!= DICT_NUM_FIELDS__SYS_ZIP_DICT)) { - return("wrong number of columns in SYS_ZIP_DICT record"); - } - - field = rec_get_nth_field_old( - rec, DICT_FLD__SYS_ZIP_DICT__ID, &len); - if (UNIV_UNLIKELY(len != DICT_FLD_LEN_SPACE)) { - goto err_len; - } - *id = mach_read_from_4(field); - - rec_get_nth_field_offs_old( - rec, DICT_FLD__SYS_ZIP_DICT__DB_TRX_ID, &len); - if (UNIV_UNLIKELY(len != DATA_TRX_ID_LEN && len != UNIV_SQL_NULL)) { - goto err_len; - } - - rec_get_nth_field_offs_old( - rec, DICT_FLD__SYS_ZIP_DICT__DB_ROLL_PTR, &len); - if (UNIV_UNLIKELY(len != DATA_ROLL_PTR_LEN && len != UNIV_SQL_NULL)) { - goto err_len; - } - - field = rec_get_nth_field_old( - rec, DICT_FLD__SYS_ZIP_DICT__NAME, &len); - if (UNIV_UNLIKELY(len == 0 || len == UNIV_SQL_NULL)) { - goto err_len; - } - *name = mem_heap_strdupl(heap, (char*) field, len); - - field = rec_get_nth_field_old( - rec, DICT_FLD__SYS_ZIP_DICT__DATA, &len); - if (UNIV_UNLIKELY(len == UNIV_SQL_NULL)) { - goto err_len; - } - - if (rec_get_1byte_offs_flag(rec) == 0 && - rec_2_is_field_extern(rec, DICT_FLD__SYS_ZIP_DICT__DATA)) { - ut_a(len >= BTR_EXTERN_FIELD_REF_SIZE); - - if (UNIV_UNLIKELY - (!memcmp(field + len - BTR_EXTERN_FIELD_REF_SIZE, - field_ref_zero, - BTR_EXTERN_FIELD_REF_SIZE))) { - goto err_len; - } - *data = reinterpret_cast( - btr_copy_externally_stored_field(data_len, field, - zip_size, len, heap, 0)); - } - else { - *data_len = len; - *data = static_cast(mem_heap_dup(heap, field, len)); - } - - return(NULL); - -err_len: - return("incorrect column length in SYS_ZIP_DICT"); -} - -/** This function parses a SYS_ZIP_DICT_COLS record, extracts necessary -information from the record and returns to caller. -@return error message, or NULL on success */ -UNIV_INTERN -const char* -dict_process_sys_zip_dict_cols( - mem_heap_t* heap, /*!< in/out: heap memory */ - const rec_t* rec, /*!< in: current SYS_ZIP_DICT rec */ - ulint* table_id, /*!< out: table id */ - ulint* column_pos, /*!< out: column position */ - ulint* dict_id) /*!< out: dict id */ -{ - ulint len; - const byte* field; - - /* Initialize the output values */ - *table_id = ULINT_UNDEFINED; - *column_pos = ULINT_UNDEFINED; - *dict_id = ULINT_UNDEFINED; - - if (UNIV_UNLIKELY(rec_get_deleted_flag(rec, 0))) { - return("delete-marked record in SYS_ZIP_DICT_COLS"); - } - - if (UNIV_UNLIKELY(rec_get_n_fields_old(rec) != - DICT_NUM_FIELDS__SYS_ZIP_DICT_COLS)) { - return("wrong number of columns in SYS_ZIP_DICT_COLS" - " record"); - } - - field = rec_get_nth_field_old( - rec, DICT_FLD__SYS_ZIP_DICT_COLS__TABLE_ID, &len); - if (UNIV_UNLIKELY(len != DICT_FLD_LEN_SPACE)) { -err_len: - return("incorrect column length in SYS_ZIP_DICT_COLS"); - } - *table_id = mach_read_from_4(field); - - field = rec_get_nth_field_old( - rec, DICT_FLD__SYS_ZIP_DICT_COLS__COLUMN_POS, &len); - if (UNIV_UNLIKELY(len != DICT_FLD_LEN_SPACE)) { - goto err_len; - } - *column_pos = mach_read_from_4(field); - - rec_get_nth_field_offs_old( - rec, DICT_FLD__SYS_ZIP_DICT_COLS__DB_TRX_ID, &len); - if (UNIV_UNLIKELY(len != DATA_TRX_ID_LEN && len != UNIV_SQL_NULL)) { - goto err_len; - } - - rec_get_nth_field_offs_old( - rec, DICT_FLD__SYS_ZIP_DICT_COLS__DB_ROLL_PTR, &len); - if (UNIV_UNLIKELY(len != DATA_ROLL_PTR_LEN && len != UNIV_SQL_NULL)) { - goto err_len; - } - - field = rec_get_nth_field_old( - rec, DICT_FLD__SYS_ZIP_DICT_COLS__DICT_ID, &len); - if (UNIV_UNLIKELY(len != DICT_FLD_LEN_SPACE)) { - goto err_len; - } - *dict_id = mach_read_from_4(field); - - return(NULL); -} /********************************************************************//** Determine the flags of a table as stored in SYS_TABLES.TYPE and N_COLS. @return ULINT_UNDEFINED if error, else a valid dict_table_t::flags. */ @@ -1209,8 +1052,6 @@ loop: btr_pcur_store_position(&pcur, &mtr); - mtr_commit(&mtr); - /* For tables created with old versions of InnoDB, SYS_TABLES.MIX_LEN may contain garbage. Such tables would always be in ROW_FORMAT=REDUNDANT. Pretend that @@ -1244,16 +1085,19 @@ loop: if (space_id == 0) { /* The system tablespace always exists. */ ut_ad(!discarded); - goto next_tablespace; + mem_free(name); + goto loop; } + mtr_commit(&mtr); + switch (dict_check) { case DICT_CHECK_ALL_LOADED: /* All tablespaces should have been found in fil_load_single_table_tablespaces(). */ if (fil_space_for_table_exists_in_mem( - space_id, name, TRUE, !(is_temp || discarded), - false, NULL, 0) + space_id, name, !(is_temp || discarded), + false, NULL, 0, flags) && !(is_temp || discarded)) { /* If user changes the path of .ibd files in *.isl files before doing crash recovery , @@ -1285,8 +1129,8 @@ loop: /* 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)) { + space_id, name, false, + false, NULL, 0, flags)) { break; } /* fall through */ @@ -1348,7 +1192,6 @@ loop: max_space_id = space_id; } -next_tablespace: mem_free(name); mtr_start(&mtr); @@ -2540,8 +2383,8 @@ err_exit: table->ibd_file_missing = TRUE; } else if (!fil_space_for_table_exists_in_mem( - table->space, name, FALSE, FALSE, true, heap, - table->id)) { + table->space, name, false, true, heap, + table->id, table->flags)) { if (DICT_TF2_FLAG_IS_SET(table, DICT_TF2_TEMPORARY)) { /* Do not bother to retry opening temporary tables. */ diff --git a/storage/xtradb/dict/dict0stats_bg.cc b/storage/xtradb/dict/dict0stats_bg.cc index 5f24bb2b742..c2265d6abd6 100644 --- a/storage/xtradb/dict/dict0stats_bg.cc +++ b/storage/xtradb/dict/dict0stats_bg.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -526,15 +527,10 @@ statistics. @return this function does not return, it calls os_thread_exit() */ extern "C" UNIV_INTERN os_thread_ret_t -DECLARE_THREAD(dict_stats_thread)( -/*==============================*/ - void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter - required by os_thread_create */ +DECLARE_THREAD(dict_stats_thread)(void*) { ut_a(!srv_read_only_mode); - srv_dict_stats_thread_active = TRUE; - while (!SHUTTING_DOWN()) { /* Wake up periodically even if not signaled. This is @@ -557,7 +553,7 @@ DECLARE_THREAD(dict_stats_thread)( os_event_reset(dict_stats_event); } - srv_dict_stats_thread_active = FALSE; + srv_dict_stats_thread_active = false; /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit instead of return(). */ diff --git a/storage/xtradb/fil/fil0crypt.cc b/storage/xtradb/fil/fil0crypt.cc index 3670f0fac4f..131d03ea17a 100644 --- a/storage/xtradb/fil/fil0crypt.cc +++ b/storage/xtradb/fil/fil0crypt.cc @@ -1,6 +1,6 @@ /***************************************************************************** Copyright (C) 2013, 2015, Google Inc. All Rights Reserved. -Copyright (C) 2014, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2014, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -56,7 +56,7 @@ UNIV_INTERN ulong srv_encrypt_tables = 0; UNIV_INTERN uint srv_n_fil_crypt_threads = 0; /** No of key rotation threads started */ -static uint srv_n_fil_crypt_threads_started = 0; +UNIV_INTERN uint srv_n_fil_crypt_threads_started = 0; /** At this age or older a space/page will be rotated */ UNIV_INTERN uint srv_fil_crypt_rotate_key_age = 1; @@ -65,7 +65,7 @@ UNIV_INTERN uint srv_fil_crypt_rotate_key_age = 1; static os_event_t fil_crypt_event; /** Event to signal TO the key rotation threads. */ -static os_event_t fil_crypt_threads_event; +UNIV_INTERN os_event_t fil_crypt_threads_event; /** Event for waking up threads throttle */ static os_event_t fil_crypt_throttle_sleep_event; @@ -1303,10 +1303,20 @@ struct rotate_thread_t { btr_scrub_t scrub_data; /* thread local data used by btr_scrub-functions * when iterating pages of tablespace */ - /* check if this thread should shutdown */ + /** @return whether this thread should terminate */ bool should_shutdown() const { - return ! (srv_shutdown_state == SRV_SHUTDOWN_NONE && - thread_no < srv_n_fil_crypt_threads); + switch (srv_shutdown_state) { + case SRV_SHUTDOWN_NONE: + case SRV_SHUTDOWN_CLEANUP: + return thread_no >= srv_n_fil_crypt_threads; + case SRV_SHUTDOWN_FLUSH_PHASE: + return true; + case SRV_SHUTDOWN_LAST_PHASE: + case SRV_SHUTDOWN_EXIT_THREADS: + break; + } + ut_ad(0); + return true; } }; @@ -2458,17 +2468,6 @@ fil_crypt_threads_init() } } -/********************************************************************* -End threads for key rotation */ -UNIV_INTERN -void -fil_crypt_threads_end() -/*===================*/ -{ - /* stop threads */ - fil_crypt_set_thread_cnt(0); -} - /********************************************************************* Clean up key rotation threads resources */ UNIV_INTERN @@ -2476,6 +2475,10 @@ void fil_crypt_threads_cleanup() /*=======================*/ { + if (!fil_crypt_threads_inited) { + return; + } + ut_a(!srv_n_fil_crypt_threads_started); os_event_free(fil_crypt_event); os_event_free(fil_crypt_threads_event); mutex_free(&fil_crypt_threads_mutex); diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc index 133960ae8b4..f4301d47028 100644 --- a/storage/xtradb/fil/fil0fil.cc +++ b/storage/xtradb/fil/fil0fil.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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 @@ -601,10 +601,7 @@ fil_node_open_file( ibool success; byte* buf2; byte* page; - ulint space_id; - ulint flags=0; ulint page_size; - ulint atomic_writes=0; ut_ad(mutex_own(&(system->mutex))); ut_a(node->n_pending == 0); @@ -626,8 +623,6 @@ fil_node_open_file( /* The following call prints an error message */ os_file_get_last_error(true); - ut_print_timestamp(stderr); - ib_logf(IB_LOG_LEVEL_WARN, "InnoDB: Error: cannot " "open %s\n. InnoDB: Have you deleted .ibd " "files under a running mysqld server?\n", @@ -653,17 +648,13 @@ fil_node_open_file( ut_a(fil_is_user_tablespace_id(space->id)); if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { - fprintf(stderr, - "InnoDB: Error: the size of single-table" - " tablespace file %s\n" - "InnoDB: is only " UINT64PF "," - " should be at least %lu!\n", - node->name, - size_bytes, - (ulong) (FIL_IBD_FILE_INITIAL_SIZE - * UNIV_PAGE_SIZE)); - - ut_a(0); + ib_logf(IB_LOG_LEVEL_ERROR, + "The size of the file %s is only " UINT64PF + " bytes, should be at least " ULINTPF, + node->name, size_bytes, + FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE); + os_file_close(node->handle); + return(false); } /* Read the first page of the tablespace */ @@ -676,77 +667,34 @@ fil_node_open_file( success = os_file_read(node->handle, page, 0, UNIV_PAGE_SIZE); srv_stats.page0_read.add(1); - space_id = fsp_header_get_space_id(page); - flags = fsp_header_get_flags(page); - - page_size = fsp_flags_get_page_size(flags); - atomic_writes = fsp_flags_get_atomic_writes(flags); + const ulint space_id = fsp_header_get_space_id(page); + ulint flags = fsp_header_get_flags(page); ut_free(buf2); - - /* Close the file now that we have read the space id from it */ - os_file_close(node->handle); + if (!fsp_flags_is_valid(flags)) { + ulint cflags = fsp_flags_convert_from_101(flags); + if (cflags == ULINT_UNDEFINED) { + ib_logf(IB_LOG_LEVEL_ERROR, + "Expected tablespace flags 0x%x" + " but found 0x%x in the file %s", + int(space->flags), int(flags), + node->name); + return(false); + } + + flags = cflags; + } + + page_size = fsp_flags_get_page_size(flags); + if (UNIV_UNLIKELY(space_id != space->id)) { - fprintf(stderr, - "InnoDB: Error: tablespace id is %lu" - " in the data dictionary\n" - "InnoDB: but in file %s it is %lu!\n", + ib_logf(IB_LOG_LEVEL_ERROR, + "tablespace id is " ULINTPF " in the data dictionary" + " but in file %s it is " ULINTPF "!\n", space->id, node->name, space_id); - - ut_error; - } - - if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED - || space_id == 0)) { - fprintf(stderr, - "InnoDB: Error: tablespace id %lu" - " in file %s is not sensible\n", - (ulong) space_id, node->name); - - ut_error; - } - - if (UNIV_UNLIKELY(fsp_flags_get_page_size(space->flags) - != page_size)) { - fprintf(stderr, - "InnoDB: Error: tablespace file %s" - " has page size 0x%lx\n" - "InnoDB: but the data dictionary" - " expects page size 0x%lx!\n", - node->name, flags, - fsp_flags_get_page_size(space->flags)); - - ut_error; - } - - if (UNIV_UNLIKELY(space->flags != flags)) { - ulint sflags = (space->flags & ~FSP_FLAGS_MASK_DATA_DIR); - ulint fflags = (flags & ~FSP_FLAGS_MASK_DATA_DIR_ORACLE); - - /* DATA_DIR option is on different place on MariaDB - compared to MySQL. If this is the difference. Fix - it. */ - - if (sflags == fflags) { - fprintf(stderr, - "InnoDB: Warning: Table flags 0x%lx" - " in the data dictionary but in file %s are 0x%lx!\n" - " Temporally corrected because DATA_DIR option to 0x%lx.\n", - space->flags, node->name, flags, space->flags); - - flags = space->flags; - } - - if (!dict_tf_verify_flags(space->flags, flags)) { - fprintf(stderr, - "InnoDB: Error: table flags are 0x%lx" - " in the data dictionary\n" - "InnoDB: but the flags in file %s are 0x%lx!\n", - space->flags, node->name, flags); - ut_error; - } + return(false); } if (size_bytes >= (1024*1024)) { @@ -768,7 +716,7 @@ add_size: space->size += node->size; } - atomic_writes = fsp_flags_get_atomic_writes(space->flags); + ulint atomic_writes = fsp_flags_get_atomic_writes(space->flags); /* printf("Opening file %s\n", node->name); */ @@ -1572,7 +1520,6 @@ fil_space_create( fil_system->tablespace_version++; space->tablespace_version = fil_system->tablespace_version; - space->mark = FALSE; if (purpose == FIL_TABLESPACE && !recv_recovery_on && id > fil_system->max_assigned_id) { @@ -2324,27 +2271,21 @@ fil_write_flushed_lsn_to_data_files( return(DB_SUCCESS); } -/*******************************************************************//** -Checks the consistency of the first data page of a tablespace +/** Check the consistency of the first data page of a tablespace at database startup. +@param[in] page page frame +@param[in] space_id tablespace identifier +@param[in] flags tablespace flags @retval NULL on success, or if innodb_force_recovery is set @return pointer to an error message string */ static MY_ATTRIBUTE((warn_unused_result)) const char* -fil_check_first_page( -/*=================*/ - const page_t* page) /*!< in: data page */ +fil_check_first_page(const page_t* page, ulint space_id, ulint flags) { - 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)) { fprintf(stderr, "InnoDB: Error: Current page size %lu != " @@ -2393,7 +2334,7 @@ fil_read_first_page( ibool one_read_already, /*!< in: TRUE if min and max parameters below already contain sensible data */ - ulint* flags, /*!< out: tablespace flags */ + ulint* flags, /*!< out: FSP_SPACE_FLAGS */ ulint* space_id, /*!< out: tablespace ID */ lsn_t* min_flushed_lsn, /*!< out: min of flushed lsn values in data files */ @@ -2423,12 +2364,22 @@ fil_read_first_page( *flags and *space_id as they were read from the first file and do not validate the first page. */ if (!one_read_already) { - *flags = fsp_header_get_flags(page); *space_id = fsp_header_get_space_id(page); - } + *flags = fsp_header_get_flags(page); - if (!one_read_already) { - check_msg = fil_check_first_page(page); + if (!fsp_flags_is_valid(*flags)) { + ulint cflags = fsp_flags_convert_from_101(*flags); + if (cflags == ULINT_UNDEFINED) { + ib_logf(IB_LOG_LEVEL_ERROR, + "Invalid flags 0x%x in tablespace %u", + unsigned(*flags), unsigned(*space_id)); + return "invalid tablespace flags"; + } else { + *flags = cflags; + } + } + + check_msg = fil_check_first_page(page, *space_id, *flags); } flushed_lsn = mach_read_from_8(page + @@ -2612,6 +2563,7 @@ fil_op_write_log( ulint len; log_ptr = mlog_open(mtr, 11 + 2 + 1); + ut_ad(fsp_flags_is_valid(flags)); if (!log_ptr) { /* Logging in mtr is switched off during crash recovery: @@ -3823,7 +3775,7 @@ fil_create_new_single_table_tablespace( ibool success; /* TRUE if a table is created with CREATE TEMPORARY TABLE */ bool is_temp = !!(flags2 & DICT_TF2_TEMPORARY); - bool has_data_dir = FSP_FLAGS_HAS_DATA_DIR(flags); + bool has_data_dir = FSP_FLAGS_HAS_DATA_DIR(flags) != 0; ulint atomic_writes = FSP_FLAGS_GET_ATOMIC_WRITES(flags); fil_space_crypt_t *crypt_data = NULL; @@ -3831,7 +3783,7 @@ fil_create_new_single_table_tablespace( ut_ad(!srv_read_only_mode); ut_a(space_id < SRV_LOG_SPACE_FIRST_ID); ut_a(size >= FIL_IBD_FILE_INITIAL_SIZE); - ut_a(fsp_flags_is_valid(flags)); + ut_a(fsp_flags_is_valid(flags & ~FSP_FLAGS_MEM_MASK)); if (is_temp) { /* Temporary table filepath */ @@ -3924,12 +3876,9 @@ fil_create_new_single_table_tablespace( memset(page, '\0', UNIV_PAGE_SIZE); - /* Add the UNIV_PAGE_SIZE to the table flags and write them to the - tablespace header. */ - flags = fsp_flags_set_page_size(flags, UNIV_PAGE_SIZE); + flags |= FSP_FLAGS_PAGE_SSIZE(); fsp_header_init_fields(page, space_id, flags); mach_write_to_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, space_id); - ut_ad(fsp_flags_is_valid(flags)); if (!(fsp_flags_is_compressed(flags))) { buf_flush_init_for_writing(page, NULL, 0); @@ -4008,7 +3957,8 @@ fil_create_new_single_table_tablespace( fil_op_write_log(flags ? MLOG_FILE_CREATE2 : MLOG_FILE_CREATE, - space_id, mlog_file_flag, flags, + space_id, mlog_file_flag, + flags & ~FSP_FLAGS_MEM_MASK, tablename, NULL, &mtr); mtr_commit(&mtr); @@ -4072,6 +4022,39 @@ fil_report_bad_tablespace( (ulong) expected_id, (ulong) expected_flags); } +/** Try to adjust FSP_SPACE_FLAGS if they differ from the expectations. +(Typically when upgrading from MariaDB 10.1.0..10.1.20.) +@param[in] space_id tablespace ID +@param[in] flags desired tablespace flags */ +UNIV_INTERN +void +fsp_flags_try_adjust(ulint space_id, ulint flags) +{ + ut_ad(!srv_read_only_mode); + ut_ad(fsp_flags_is_valid(flags)); + + mtr_t mtr; + mtr_start(&mtr); + if (buf_block_t* b = buf_page_get( + space_id, fsp_flags_get_zip_size(flags), 0, RW_X_LATCH, + &mtr)) { + ulint f = fsp_header_get_flags(b->frame); + /* Suppress the message if only the DATA_DIR flag to differs. */ + if ((f ^ flags) & ~(1U << FSP_FLAGS_POS_RESERVED)) { + ib_logf(IB_LOG_LEVEL_WARN, + "adjusting FSP_SPACE_FLAGS of tablespace " + ULINTPF " from 0x%x to 0x%x", + space_id, int(f), int(flags)); + } + if (f != flags) { + mlog_write_ulint(FSP_HEADER_OFFSET + + FSP_SPACE_FLAGS + b->frame, + flags, MLOG_4BYTES, &mtr); + } + } + mtr_commit(&mtr); +} + /********************************************************************//** Tries to open a single-table tablespace and optionally checks that the space id in it is correct. If this does not succeed, print an error message @@ -4101,7 +4084,7 @@ fil_open_single_table_tablespace( bool validate, /*!< in: Do we validate tablespace? */ bool fix_dict, /*!< in: Can we fix the dictionary? */ ulint id, /*!< in: space id */ - ulint flags, /*!< in: tablespace flags */ + ulint flags, /*!< in: expected FSP_SPACE_FLAGS */ const char* tablename, /*!< in: table name in the databasename/tablename format */ const char* path_in, /*!< in: tablespace filepath */ @@ -4126,20 +4109,13 @@ fil_open_single_table_tablespace( /* Table flags can be ULINT_UNDEFINED if dict_tf_to_fsp_flags_failure is set. */ - if (flags != ULINT_UNDEFINED) { - if (!fsp_flags_is_valid(flags)) { - return(DB_CORRUPTION); - } - } else { + if (flags == ULINT_UNDEFINED) { return(DB_CORRUPTION); } + ut_ad(fsp_flags_is_valid(flags & ~FSP_FLAGS_MEM_MASK)); atomic_writes = fsp_flags_get_atomic_writes(flags); - /* If the tablespace was relocated, we do not - compare the DATA_DIR flag */ - ulint mod_flags = flags & ~FSP_FLAGS_MASK_DATA_DIR; - memset(&def, 0, sizeof(def)); memset(&dict, 0, sizeof(dict)); memset(&remote, 0, sizeof(remote)); @@ -4217,31 +4193,17 @@ fil_open_single_table_tablespace( def.check_msg = fil_read_first_page( def.file, FALSE, &def.flags, &def.id, &def.lsn, &def.lsn, &def.crypt_data); - def.valid = !def.check_msg; if (table) { table->crypt_data = def.crypt_data; table->page_0_read = true; } - /* Validate this single-table-tablespace with SYS_TABLES, - but do not compare the DATA_DIR flag, in case the - tablespace was relocated. */ - - ulint newf = def.flags; - if (newf != mod_flags) { - if (FSP_FLAGS_HAS_DATA_DIR(newf)) { - newf = (newf & ~FSP_FLAGS_MASK_DATA_DIR); - } else if(FSP_FLAGS_HAS_DATA_DIR_ORACLE(newf)) { - newf = (newf & ~FSP_FLAGS_MASK_DATA_DIR_ORACLE); - } - } - - if (def.valid && def.id == id - && newf == mod_flags) { + def.valid = !def.check_msg && def.id == id + && fsp_flags_match(flags, def.flags); + if (def.valid) { valid_tablespaces_found++; } else { - def.valid = false; /* Do not use this tablespace. */ fil_report_bad_tablespace( def.filepath, def.check_msg, def.id, @@ -4254,30 +4216,18 @@ fil_open_single_table_tablespace( remote.check_msg = fil_read_first_page( remote.file, FALSE, &remote.flags, &remote.id, &remote.lsn, &remote.lsn, &remote.crypt_data); - remote.valid = !remote.check_msg; if (table) { table->crypt_data = remote.crypt_data; table->page_0_read = true; } - /* Validate this single-table-tablespace with SYS_TABLES, - but do not compare the DATA_DIR flag, in case the - tablespace was relocated. */ - ulint newf = remote.flags; - if (newf != mod_flags) { - if (FSP_FLAGS_HAS_DATA_DIR(newf)) { - newf = (newf & ~FSP_FLAGS_MASK_DATA_DIR); - } else if(FSP_FLAGS_HAS_DATA_DIR_ORACLE(newf)) { - newf = (newf & ~FSP_FLAGS_MASK_DATA_DIR_ORACLE); - } - } - - if (remote.valid && remote.id == id - && newf == mod_flags) { + /* Validate this single-table-tablespace with SYS_TABLES. */ + remote.valid = !remote.check_msg && remote.id == id + && fsp_flags_match(flags, remote.flags); + if (remote.valid) { valid_tablespaces_found++; } else { - remote.valid = false; /* Do not use this linked tablespace. */ fil_report_bad_tablespace( remote.filepath, remote.check_msg, remote.id, @@ -4291,30 +4241,19 @@ fil_open_single_table_tablespace( dict.check_msg = fil_read_first_page( dict.file, FALSE, &dict.flags, &dict.id, &dict.lsn, &dict.lsn, &dict.crypt_data); - dict.valid = !dict.check_msg; if (table) { table->crypt_data = dict.crypt_data; table->page_0_read = true; } - /* Validate this single-table-tablespace with SYS_TABLES, - but do not compare the DATA_DIR flag, in case the - tablespace was relocated. */ - ulint newf = dict.flags; - if (newf != mod_flags) { - if (FSP_FLAGS_HAS_DATA_DIR(newf)) { - newf = (newf & ~FSP_FLAGS_MASK_DATA_DIR); - } else if(FSP_FLAGS_HAS_DATA_DIR_ORACLE(newf)) { - newf = (newf & ~FSP_FLAGS_MASK_DATA_DIR_ORACLE); - } - } + /* Validate this single-table-tablespace with SYS_TABLES. */ + dict.valid = !dict.check_msg && dict.id == id + && fsp_flags_match(flags, dict.flags); - if (dict.valid && dict.id == id - && newf == mod_flags) { + if (dict.valid) { valid_tablespaces_found++; } else { - dict.valid = false; /* Do not use this tablespace. */ fil_report_bad_tablespace( dict.filepath, dict.check_msg, dict.id, @@ -4512,6 +4451,10 @@ cleanup_and_exit: mem_free(def.filepath); + if (err == DB_SUCCESS && !srv_read_only_mode) { + fsp_flags_try_adjust(id, flags & ~FSP_FLAGS_MEM_MASK); + } + return(err); } #endif /* !UNIV_HOTBACKUP */ @@ -4693,7 +4636,23 @@ fil_user_tablespace_restore_page( goto out; } - flags = mach_read_from_4(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + page); + flags = mach_read_from_4(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + page); + + if (!fsp_flags_is_valid(flags)) { + ulint cflags = fsp_flags_convert_from_101(flags); + if (cflags == ULINT_UNDEFINED) { + ib_logf(IB_LOG_LEVEL_WARN, + "Ignoring a doublewrite copy of page " + ULINTPF ":" ULINTPF + " due to invalid flags 0x%x", + fsp->id, page_no, int(flags)); + err = false; + goto out; + } + flags = cflags; + /* The flags on the page should be converted later. */ + } + zip_size = fsp_flags_get_zip_size(flags); page_size = fsp_flags_get_page_size(flags); @@ -5071,6 +5030,16 @@ will_not_choose: } mutex_exit(&fil_system->mutex); #endif /* UNIV_HOTBACKUP */ + /* Adjust the memory-based flags that would normally be set by + dict_tf_to_fsp_flags(). In recovery, we have no data dictionary. */ + if (FSP_FLAGS_HAS_PAGE_COMPRESSION(fsp->flags)) { + fsp->flags |= page_zip_level + << FSP_FLAGS_MEM_COMPRESSION_LEVEL; + } + remote.flags |= 1U << FSP_FLAGS_MEM_DATA_DIR; + /* We will leave atomic_writes at ATOMIC_WRITES_DEFAULT. + That will be adjusted in fil_space_for_table_exists_in_mem(). */ + ibool file_space_create_success = fil_space_create( tablename, fsp->id, fsp->flags, FIL_TABLESPACE, fsp->crypt_data, false); @@ -5380,13 +5349,12 @@ fil_report_missing_tablespace( name, space_id); } -/*******************************************************************//** -Returns TRUE if a matching tablespace exists in the InnoDB tablespace memory +/** Check if a matching tablespace exists in the InnoDB tablespace memory cache. Note that if we have not done a crash recovery at the database startup, there may be many tablespaces which are not yet in the memory cache. -@return TRUE if a matching tablespace exists in the memory cache */ +@return whether a matching tablespace exists in the memory cache */ UNIV_INTERN -ibool +bool fil_space_for_table_exists_in_mem( /*==============================*/ ulint id, /*!< in: space id */ @@ -5394,13 +5362,7 @@ fil_space_for_table_exists_in_mem( fil_space_create(). Either the standard 'dbname/tablename' format or table->dir_path_of_temp_table */ - ibool mark_space, /*!< in: in crash recovery, at database - startup we mark all spaces which have - an associated table in the InnoDB - data dictionary, so that - we can print a warning about orphaned - tablespaces */ - ibool print_error_if_does_not_exist, + bool print_error_if_does_not_exist, /*!< in: print detailed error information to the .err log if a matching tablespace is not found from @@ -5408,12 +5370,13 @@ fil_space_for_table_exists_in_mem( bool adjust_space, /*!< in: whether to adjust space id when find table space mismatch */ mem_heap_t* heap, /*!< in: heap memory */ - table_id_t table_id) /*!< in: table id */ + table_id_t table_id, /*!< in: table id */ + ulint table_flags) /*!< in: table flags */ { fil_space_t* fnamespace; fil_space_t* space; - ut_ad(fil_system); + const ulint expected_flags = dict_tf_to_fsp_flags(table_flags); mutex_enter(&fil_system->mutex); @@ -5425,42 +5388,31 @@ fil_space_for_table_exists_in_mem( directory path from the datadir to the file */ fnamespace = fil_space_get_by_name(name); - if (space && space == fnamespace) { - /* Found */ - - if (mark_space) { - space->mark = TRUE; - } - - mutex_exit(&fil_system->mutex); - - return(TRUE); - } - - /* Info from "fnamespace" comes from the ibd file itself, it can - be different from data obtained from System tables since it is - not transactional. If adjust_space is set, and the mismatching - space are between a user table and its temp table, we shall - adjust the ibd file name according to system table info */ - if (adjust_space - && space != NULL - && row_is_mysql_tmp_table_name(space->name) - && !row_is_mysql_tmp_table_name(name)) { + bool valid = space && !((space->flags ^ expected_flags) + & ~FSP_FLAGS_MEM_MASK); + if (!space) { + } else if (!valid || space == fnamespace) { + /* Found with the same file name, or got a flag mismatch. */ + goto func_exit; + } else if (adjust_space + && row_is_mysql_tmp_table_name(space->name) + && !row_is_mysql_tmp_table_name(name)) { + /* Info from fnamespace comes from the ibd file + itself, it can be different from data obtained from + System tables since renaming files is not + transactional. We shall adjust the ibd file name + according to system table info. */ mutex_exit(&fil_system->mutex); DBUG_EXECUTE_IF("ib_crash_before_adjust_fil_space", DBUG_SUICIDE();); - if (fnamespace) { - char* tmp_name; + char* tmp_name = dict_mem_create_temporary_tablename( + heap, name, table_id); - tmp_name = dict_mem_create_temporary_tablename( - heap, name, table_id); - - fil_rename_tablespace(fnamespace->name, fnamespace->id, - tmp_name, NULL); - } + fil_rename_tablespace(fnamespace->name, fnamespace->id, + tmp_name, NULL); DBUG_EXECUTE_IF("ib_crash_after_adjust_one_fil_space", DBUG_SUICIDE();); @@ -5473,16 +5425,12 @@ fil_space_for_table_exists_in_mem( mutex_enter(&fil_system->mutex); fnamespace = fil_space_get_by_name(name); ut_ad(space == fnamespace); - mutex_exit(&fil_system->mutex); - - return(TRUE); + goto func_exit; } if (!print_error_if_does_not_exist) { - - mutex_exit(&fil_system->mutex); - - return(FALSE); + valid = false; + goto func_exit; } if (space == NULL) { @@ -5509,10 +5457,8 @@ error_exit: fputs("InnoDB: Please refer to\n" "InnoDB: " REFMAN "innodb-troubleshooting-datadict.html\n" "InnoDB: for how to resolve the issue.\n", stderr); - - mutex_exit(&fil_system->mutex); - - return(FALSE); + valid = false; + goto func_exit; } if (0 != strcmp(space->name, name)) { @@ -5539,9 +5485,19 @@ error_exit: goto error_exit; } +func_exit: + if (valid) { + /* Adjust the flags that are in FSP_FLAGS_MEM_MASK. + FSP_SPACE_FLAGS will not be written back here. */ + space->flags = expected_flags; + } mutex_exit(&fil_system->mutex); - return(FALSE); + if (valid && !srv_read_only_mode) { + fsp_flags_try_adjust(id, expected_flags & ~FSP_FLAGS_MEM_MASK); + } + + return(valid); } /*******************************************************************//** @@ -7444,9 +7400,8 @@ fil_space_get_crypt_data( byte *page = static_cast(ut_align(buf, UNIV_PAGE_SIZE)); fil_read(true, space_id, 0, 0, 0, UNIV_PAGE_SIZE, page, NULL, NULL); - ulint flags = fsp_header_get_flags(page); ulint offset = fsp_header_get_crypt_offset( - fsp_flags_get_zip_size(flags), NULL); + fsp_header_get_zip_size(page), NULL); space->crypt_data = fil_space_read_crypt_data(space_id, page, offset); ut_free(buf); diff --git a/storage/xtradb/fsp/fsp0fsp.cc b/storage/xtradb/fsp/fsp0fsp.cc index 4acfd134c1f..c32fddaabbe 100644 --- a/storage/xtradb/fsp/fsp0fsp.cc +++ b/storage/xtradb/fsp/fsp0fsp.cc @@ -663,6 +663,7 @@ fsp_header_init_fields( ulint space_id, /*!< in: space id */ ulint flags) /*!< in: tablespace flags (FSP_SPACE_FLAGS) */ { + flags &= ~FSP_FLAGS_MEM_MASK; ut_a(fsp_flags_is_valid(flags)); mach_write_to_4(FSP_HEADER_OFFSET + FSP_SPACE_ID + page, @@ -713,7 +714,7 @@ fsp_header_init( mlog_write_ulint(header + FSP_SIZE, size, MLOG_4BYTES, mtr); mlog_write_ulint(header + FSP_FREE_LIMIT, 0, MLOG_4BYTES, mtr); - mlog_write_ulint(header + FSP_SPACE_FLAGS, flags, + mlog_write_ulint(header + FSP_SPACE_FLAGS, flags & ~FSP_FLAGS_MEM_MASK, MLOG_4BYTES, mtr); mlog_write_ulint(header + FSP_FRAG_N_USED, 0, MLOG_4BYTES, mtr); diff --git a/storage/xtradb/fut/fut0lst.cc b/storage/xtradb/fut/fut0lst.cc index 8f96a6426d2..dd3fa1238d9 100644 --- a/storage/xtradb/fut/fut0lst.cc +++ b/storage/xtradb/fut/fut0lst.cc @@ -338,104 +338,6 @@ flst_remove( mlog_write_ulint(base + FLST_LEN, len - 1, MLOG_4BYTES, mtr); } -/********************************************************************//** -Cuts off the tail of the list, including the node given. The number of -nodes which will be removed must be provided by the caller, as this function -does not measure the length of the tail. */ -UNIV_INTERN -void -flst_cut_end( -/*=========*/ - flst_base_node_t* base, /*!< in: pointer to base node of list */ - flst_node_t* node2, /*!< in: first node to remove */ - ulint n_nodes,/*!< in: number of nodes to remove, - must be >= 1 */ - mtr_t* mtr) /*!< in: mini-transaction handle */ -{ - ulint space; - flst_node_t* node1; - fil_addr_t node1_addr; - fil_addr_t node2_addr; - ulint len; - - ut_ad(mtr && node2 && base); - ut_ad(mtr_memo_contains_page(mtr, base, MTR_MEMO_PAGE_X_FIX)); - ut_ad(mtr_memo_contains_page(mtr, node2, MTR_MEMO_PAGE_X_FIX)); - ut_ad(n_nodes > 0); - - buf_ptr_get_fsp_addr(node2, &space, &node2_addr); - - node1_addr = flst_get_prev_addr(node2, mtr); - - if (!fil_addr_is_null(node1_addr)) { - - /* Update next field of node1 */ - - if (node1_addr.page == node2_addr.page) { - - node1 = page_align(node2) + node1_addr.boffset; - } else { - node1 = fut_get_ptr(space, - fil_space_get_zip_size(space), - node1_addr, RW_X_LATCH, mtr); - } - - flst_write_addr(node1 + FLST_NEXT, fil_addr_null, mtr); - } else { - /* node2 was first in list: update the field in base */ - flst_write_addr(base + FLST_FIRST, fil_addr_null, mtr); - } - - flst_write_addr(base + FLST_LAST, node1_addr, mtr); - - /* Update len of base node */ - len = flst_get_len(base, mtr); - ut_ad(len >= n_nodes); - - mlog_write_ulint(base + FLST_LEN, len - n_nodes, MLOG_4BYTES, mtr); -} - -/********************************************************************//** -Cuts off the tail of the list, not including the given node. The number of -nodes which will be removed must be provided by the caller, as this function -does not measure the length of the tail. */ -UNIV_INTERN -void -flst_truncate_end( -/*==============*/ - flst_base_node_t* base, /*!< in: pointer to base node of list */ - flst_node_t* node2, /*!< in: first node not to remove */ - ulint n_nodes,/*!< in: number of nodes to remove */ - mtr_t* mtr) /*!< in: mini-transaction handle */ -{ - fil_addr_t node2_addr; - ulint len; - ulint space; - - ut_ad(mtr && node2 && base); - ut_ad(mtr_memo_contains_page(mtr, base, MTR_MEMO_PAGE_X_FIX)); - ut_ad(mtr_memo_contains_page(mtr, node2, MTR_MEMO_PAGE_X_FIX)); - if (n_nodes == 0) { - - ut_ad(fil_addr_is_null(flst_get_next_addr(node2, mtr))); - - return; - } - - buf_ptr_get_fsp_addr(node2, &space, &node2_addr); - - /* Update next field of node2 */ - flst_write_addr(node2 + FLST_NEXT, fil_addr_null, mtr); - - flst_write_addr(base + FLST_LAST, node2_addr, mtr); - - /* Update len of base node */ - len = flst_get_len(base, mtr); - ut_ad(len >= n_nodes); - - mlog_write_ulint(base + FLST_LEN, len - n_nodes, MLOG_4BYTES, mtr); -} - /********************************************************************//** Validates a file-based list. @return TRUE if ok */ diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 8d564df2bb3..00f13172db1 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2000, 2016, Oracle and/or its affiliates. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. Copyright (c) 2012, Facebook Inc. @@ -68,7 +68,6 @@ this program; if not, write to the Free Software Foundation, Inc., #include "srv0srv.h" #include "trx0roll.h" #include "trx0trx.h" - #include "trx0sys.h" #include "rem0types.h" #include "row0ins.h" @@ -113,14 +112,6 @@ this program; if not, write to the Free Software Foundation, Inc., #define thd_get_trx_isolation(X) ((enum_tx_isolation)thd_tx_isolation(X)) -#ifndef HAVE_PERCONA_COMPRESSED_COLUMNS -#define COLUMN_FORMAT_TYPE_COMPRESSED 0xBADF00D -#define SQLCOM_CREATE_COMPRESSION_DICTIONARY 0xDECAF -#define SQLCOM_DROP_COMPRESSION_DICTIONARY 0xC0FFEE -#define ER_COMPRESSION_DICTIONARY_DOES_NOT_EXIST 0xDEADFACE -const static LEX_CSTRING null_lex_cstr={0,0}; -#endif - #ifdef MYSQL_DYNAMIC_PLUGIN #define tc_size 400 #define tdc_size 400 @@ -230,6 +221,11 @@ set by user, however, it will be adjusted to the newer file format if a table of such format is created/opened. */ static char* innobase_file_format_max = NULL; +/** Default value of innodb_file_format */ +static const char* innodb_file_format_default = "Barracuda"; +/** Default value of innodb_file_format_max */ +static const char* innodb_file_format_max_default = "Antelope"; + static char* innobase_file_flush_method = NULL; /* This variable can be set in the server configure file, specifying @@ -260,7 +256,6 @@ static char* internal_innobase_data_file_path = NULL; static char* innodb_version_str = (char*) INNODB_VERSION_STR; -extern uint srv_n_fil_crypt_threads; extern uint srv_fil_crypt_rotate_key_age; extern uint srv_n_fil_crypt_iops; @@ -963,7 +958,7 @@ static MYSQL_THDVAR_BOOL(table_locks, PLUGIN_VAR_OPCMDARG, static MYSQL_THDVAR_BOOL(strict_mode, PLUGIN_VAR_OPCMDARG, "Use strict mode when evaluating create options.", - NULL, NULL, FALSE); + NULL, NULL, TRUE); static MYSQL_THDVAR_BOOL(ft_enable_stopword, PLUGIN_VAR_OPCMDARG, "Create FTS index with stopword.", @@ -1703,30 +1698,6 @@ normalize_table_name_low( ibool set_lower_case); /* in: TRUE if we want to set name to lower case */ -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS -/** Creates a new compression dictionary. */ -static -handler_create_zip_dict_result -innobase_create_zip_dict( - handlerton* hton, /*!< in: innobase handlerton */ - THD* thd, /*!< in: handle to the MySQL thread */ - const char* name, /*!< in: zip dictionary name */ - ulint* name_len, - /*!< in/out: zip dictionary name length */ - const char* data, /*!< in: zip dictionary data */ - ulint* data_len); - /*!< in/out: zip dictionary data length */ - -/** Drops a existing compression dictionary. */ -static -handler_drop_zip_dict_result -innobase_drop_zip_dict( - handlerton* hton, /*!< in: innobase handlerton */ - THD* thd, /*!< in: handle to the MySQL thread */ - const char* name, /*!< in: zip dictionary name */ - ulint* name_len); - /*!< in/out: zip dictionary name length */ -#endif /*************************************************************//** Checks if buffer pool is big enough to enable backoff algorithm. InnoDB empty free list algorithm backoff requires free pages @@ -3854,10 +3825,6 @@ innobase_init( innodb_remember_check_sysvar_funcs(); -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS - innobase_hton->create_zip_dict = innobase_create_zip_dict; - innobase_hton->drop_zip_dict = innobase_drop_zip_dict; -#endif ut_a(DATA_MYSQL_TRUE_VARCHAR == (ulint)MYSQL_TYPE_VARCHAR); #ifndef DBUG_OFF @@ -3903,23 +3870,16 @@ innobase_init( srv_log_block_size = 512; } - if (UNIV_PAGE_SIZE != UNIV_PAGE_SIZE_DEF) { + /* The buffer pool needs to be able to accommodate enough many + pages, even for larger pages */ + if (UNIV_PAGE_SIZE > UNIV_PAGE_SIZE_DEF + && innobase_buffer_pool_size < (24 * 1024 * 1024)) { ib_logf(IB_LOG_LEVEL_INFO, - "innodb_page_size has been " - "changed from default value %d to %ld.", - UNIV_PAGE_SIZE_DEF, UNIV_PAGE_SIZE); - - /* There is hang on buffer pool when trying to get a new - page if buffer pool size is too small for large page sizes */ - if (UNIV_PAGE_SIZE > UNIV_PAGE_SIZE_DEF - && innobase_buffer_pool_size < (24 * 1024 * 1024)) { - ib_logf(IB_LOG_LEVEL_ERROR, - "innodb_page_size=%lu requires " - "innodb_buffer_pool_size > 24M current %lld", - UNIV_PAGE_SIZE, innobase_buffer_pool_size); - - goto error; - } + "innodb_page_size= " ULINTPF " requires " + "innodb_buffer_pool_size > 24M current %lld. ", + UNIV_PAGE_SIZE, + innobase_buffer_pool_size); + goto error; } ut_ad (srv_log_block_size >= OS_MIN_LOG_BLOCK_SIZE); @@ -4242,11 +4202,11 @@ innobase_change_buffering_inited_ok: srv_page_size); goto mem_free_and_error; } + if (UNIV_PAGE_SIZE_DEF != srv_page_size) { - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: innodb-page-size has been changed" - " from the default value %d to %lu.\n", + ib_logf(IB_LOG_LEVEL_INFO, + " innodb-page-size has been changed" + " from the default value %d to " ULINTPF " .", UNIV_PAGE_SIZE_DEF, srv_page_size); } @@ -4631,90 +4591,6 @@ innobase_purge_changed_page_bitmaps( return (my_bool)log_online_purge_changed_page_bitmaps(lsn); } -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS -/** Creates a new compression dictionary. */ -static -handler_create_zip_dict_result -innobase_create_zip_dict( - handlerton* hton, /*!< in: innobase handlerton */ - THD* thd, /*!< in: handle to the MySQL thread */ - const char* name, /*!< in: zip dictionary name */ - ulint* name_len, - /*!< in/out: zip dictionary name length */ - const char* data, /*!< in: zip dictionary data */ - ulint* data_len) - /*!< in/out: zip dictionary data length */ -{ - handler_create_zip_dict_result result = - HA_CREATE_ZIP_DICT_UNKNOWN_ERROR; - - DBUG_ENTER("innobase_create_zip_dict"); - DBUG_ASSERT(hton == innodb_hton_ptr); - - if (UNIV_UNLIKELY(high_level_read_only)) { - DBUG_RETURN(HA_CREATE_ZIP_DICT_READ_ONLY); - } - - if (UNIV_UNLIKELY(*name_len > ZIP_DICT_MAX_NAME_LENGTH)) { - *name_len = ZIP_DICT_MAX_NAME_LENGTH; - DBUG_RETURN(HA_CREATE_ZIP_DICT_NAME_TOO_LONG); - } - - if (UNIV_UNLIKELY(*data_len > ZIP_DICT_MAX_DATA_LENGTH)) { - *data_len = ZIP_DICT_MAX_DATA_LENGTH; - DBUG_RETURN(HA_CREATE_ZIP_DICT_DATA_TOO_LONG); - } - - switch (dict_create_zip_dict(name, *name_len, data, *data_len)) { - case DB_SUCCESS: - result = HA_CREATE_ZIP_DICT_OK; - break; - case DB_DUPLICATE_KEY: - result = HA_CREATE_ZIP_DICT_ALREADY_EXISTS; - break; - default: - ut_ad(0); - result = HA_CREATE_ZIP_DICT_UNKNOWN_ERROR; - } - DBUG_RETURN(result); -} - -/** Drops a existing compression dictionary. */ -static -handler_drop_zip_dict_result -innobase_drop_zip_dict( - handlerton* hton, /*!< in: innobase handlerton */ - THD* thd, /*!< in: handle to the MySQL thread */ - const char* name, /*!< in: zip dictionary name */ - ulint* name_len) - /*!< in/out: zip dictionary name length */ -{ - handler_drop_zip_dict_result result = HA_DROP_ZIP_DICT_UNKNOWN_ERROR; - - DBUG_ENTER("innobase_drop_zip_dict"); - DBUG_ASSERT(hton == innodb_hton_ptr); - - if (UNIV_UNLIKELY(high_level_read_only)) { - DBUG_RETURN(HA_DROP_ZIP_DICT_READ_ONLY); - } - - switch (dict_drop_zip_dict(name, *name_len)) { - case DB_SUCCESS: - result = HA_DROP_ZIP_DICT_OK; - break; - case DB_RECORD_NOT_FOUND: - result = HA_DROP_ZIP_DICT_DOES_NOT_EXIST; - break; - case DB_ROW_IS_REFERENCED: - result = HA_DROP_ZIP_DICT_IS_REFERENCED; - break; - default: - ut_ad(0); - result = HA_DROP_ZIP_DICT_UNKNOWN_ERROR; - } - DBUG_RETURN(result); -} -#endif /*****************************************************************//** Check whether this is a fake change transaction. @return TRUE if a fake change transaction */ @@ -4742,7 +4618,7 @@ innobase_commit_low( #ifdef WITH_WSREP THD* thd = (THD*)trx->mysql_thd; const char* tmp = 0; - if (wsrep_on(thd)) { + if (thd && wsrep_on(thd)) { #ifdef WSREP_PROC_INFO char info[64]; info[sizeof(info) - 1] = '\0'; @@ -6252,88 +6128,6 @@ func_exit: DBUG_RETURN(ret); } -/** This function checks if all the compression dictionaries referenced -in table->fields exist in SYS_ZIP_DICT InnoDB system table. -@return true if all referenced dictionaries exist */ -UNIV_INTERN -bool -innobase_check_zip_dicts( - const TABLE* table, /*!< in: table in MySQL data - dictionary */ - ulint* dict_ids, /*!< out: identified zip dict ids - (at least n_fields long) */ - trx_t* trx, /*!< in: transaction */ - const char** err_dict_name) /*!< out: the name of the - zip_dict which does not exist. */ -{ - DBUG_ENTER("innobase_check_zip_dicts"); - - bool res = true; -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS - dberr_t err = DB_SUCCESS; - const size_t n_fields = table->s->fields; - - Field* field_ptr; - for (size_t field_idx = 0; err == DB_SUCCESS && field_idx < n_fields; - ++field_idx) - { - field_ptr = table->field[field_idx]; - if (field_ptr->has_associated_compression_dictionary()) { - err = dict_create_get_zip_dict_id_by_name( - field_ptr->zip_dict_name.str, - field_ptr->zip_dict_name.length, - &dict_ids[field_idx], - trx); - ut_a(err == DB_SUCCESS || err == DB_RECORD_NOT_FOUND); - } - else { - dict_ids[field_idx] = ULINT_UNDEFINED; - } - - } - - if (err != DB_SUCCESS) { - res = false; - *err_dict_name = field_ptr->zip_dict_name.str; - } - -#endif - DBUG_RETURN(res); -} - -/** This function creates compression dictionary references in -SYS_ZIP_DICT_COLS InnoDB system table for table_id based on info -in table->fields and provided zip dict ids. */ -UNIV_INTERN -void -innobase_create_zip_dict_references( - const TABLE* table, /*!< in: table in MySQL data - dictionary */ - table_id_t ib_table_id, /*!< in: table ID in Innodb data - dictionary */ - ulint* zip_dict_ids, /*!< in: zip dict ids - (at least n_fields long) */ - trx_t* trx) /*!< in: transaction */ -{ - DBUG_ENTER("innobase_create_zip_dict_references"); - - dberr_t err = DB_SUCCESS; - const size_t n_fields = table->s->fields; - - for (size_t field_idx = 0; err == DB_SUCCESS && field_idx < n_fields; - ++field_idx) - { - if (zip_dict_ids[field_idx] != ULINT_UNDEFINED) { - err = dict_create_add_zip_dict_reference(ib_table_id, - table->field[field_idx]->field_index, - zip_dict_ids[field_idx], trx); - ut_a(err == DB_SUCCESS); - } - } - - DBUG_VOID_RETURN; -} - /*******************************************************************//** This function uses index translation table to quickly locate the requested index structure. @@ -7762,16 +7556,7 @@ wsrep_store_key_val_for_row( blob_data = row_mysql_read_blob_ref(&blob_len, (byte*) (record + (ulint) get_field_offset(table, field)), - (ulint) field->pack_length(), -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS - field->column_format() == - COLUMN_FORMAT_TYPE_COMPRESSED, - reinterpret_cast( - field->zip_dict_data.str), - field->zip_dict_data.length, prebuilt); -#else - 0, 0, 0, prebuilt); -#endif + (ulint) field->pack_length()); true_len = blob_len; @@ -8066,16 +7851,7 @@ ha_innobase::store_key_val_for_row( blob_data = row_mysql_read_blob_ref(&blob_len, (byte*) (record + (ulint) get_field_offset(table, field)), - (ulint) field->pack_length(), -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS - field->column_format() == - COLUMN_FORMAT_TYPE_COMPRESSED, - reinterpret_cast( - field->zip_dict_data.str), - field->zip_dict_data.length, prebuilt); -#else - 0, 0, 0, prebuilt); -#endif + (ulint) field->pack_length()); true_len = blob_len; @@ -8399,14 +8175,6 @@ build_template_field( templ->mbminlen = dict_col_get_mbminlen(col); templ->mbmaxlen = dict_col_get_mbmaxlen(col); templ->is_unsigned = col->prtype & DATA_UNSIGNED; -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS - templ->compressed = (field->column_format() - == COLUMN_FORMAT_TYPE_COMPRESSED); - templ->zip_dict_data = field->zip_dict_data; -#else - templ->compressed = 0; - templ->zip_dict_data = null_lex_cstr; -#endif if (!dict_index_is_clust(index) && templ->rec_field_no == ULINT_UNDEFINED) { @@ -9317,10 +9085,8 @@ calc_row_difference( case DATA_BLOB: /* Do not compress blob column while comparing*/ - o_ptr = row_mysql_read_blob_ref(&o_len, o_ptr, o_len, - false, 0, 0, prebuilt); - n_ptr = row_mysql_read_blob_ref(&n_len, n_ptr, n_len, - false, 0, 0, prebuilt); + o_ptr = row_mysql_read_blob_ref(&o_len, o_ptr, o_len); + n_ptr = row_mysql_read_blob_ref(&n_len, n_ptr, n_len); break; @@ -9390,17 +9156,7 @@ calc_row_difference( TRUE, new_mysql_row_col, col_pack_len, - dict_table_is_comp(prebuilt->table), -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS - field->column_format() == - COLUMN_FORMAT_TYPE_COMPRESSED, - reinterpret_cast( - field->zip_dict_data.str), - field->zip_dict_data.length, -#else - 0, 0, 0, -#endif - prebuilt); + dict_table_is_comp(prebuilt->table)); dfield_copy(&ufield->new_val, &dfield); } else { dfield_set_null(&ufield->new_val); @@ -9572,9 +9328,7 @@ wsrep_calc_row_hash( switch (col_type) { case DATA_BLOB: - ptr = row_mysql_read_blob_ref(&len, ptr, len, - false, 0, 0, prebuilt); - + ptr = row_mysql_read_blob_ref(&len, ptr, len); break; case DATA_VARCHAR: @@ -11613,7 +11367,6 @@ create_table_def( ulint unsigned_type; ulint binary_type; ulint long_true_varchar; - ulint compressed; ulint charset_no; ulint i; ulint doc_id_col = 0; @@ -11763,13 +11516,6 @@ create_table_def( } } - /* Check if the the field has COMPRESSED attribute */ - compressed = 0; - if (field->column_format() == - COLUMN_FORMAT_TYPE_COMPRESSED) { - compressed = DATA_COMPRESSED; - } - /* First check whether the column to be added has a system reserved name. */ if (dict_col_name_is_reserved(field->field_name)){ @@ -11790,8 +11536,7 @@ err_col: dtype_form_prtype( (ulint) field->type() | nulls_allowed | unsigned_type - | binary_type | long_true_varchar - | compressed, + | binary_type | long_true_varchar, charset_no), col_len); } @@ -12841,9 +12586,6 @@ ha_innobase::create( fil_encryption_t encrypt = (fil_encryption_t)options->encryption; uint key_id = (uint)options->encryption_key_id; - mem_heap_t* heap = 0; - ulint* zip_dict_ids = 0; - DBUG_ENTER("ha_innobase::create"); DBUG_ASSERT(thd != NULL); @@ -12940,25 +12682,6 @@ ha_innobase::create( row_mysql_lock_data_dictionary(trx); - heap = mem_heap_create(form->s->fields * sizeof(ulint)); - zip_dict_ids = static_cast( - mem_heap_alloc(heap, form->s->fields * sizeof(ulint))); - - /* This is currently required for valgrind because MariaDB does - not currently support compressed columns. */ - for (size_t field_idx = 0; field_idx < form->s->fields; ++field_idx) { - zip_dict_ids[field_idx] = ULINT_UNDEFINED; - } - - const char* err_zip_dict_name = 0; - if (!innobase_check_zip_dicts(form, zip_dict_ids, - trx, &err_zip_dict_name)) { - error = -1; - my_error(ER_COMPRESSION_DICTIONARY_DOES_NOT_EXIST, - MYF(0), err_zip_dict_name); - goto cleanup; - } - error = create_table_def(trx, form, norm_name, temp_path, remote_path, flags, flags2, encrypt, key_id); if (error) { @@ -13066,22 +12789,6 @@ ha_innobase::create( dict_table_get_all_fts_indexes(innobase_table, fts->indexes); } - /* - Adding compression dictionary <-> compressed table column links - to the SYS_ZIP_DICT_COLS table. - */ - ut_a(zip_dict_ids != 0); - { - dict_table_t* local_table = dict_table_open_on_name( - norm_name, TRUE, FALSE, DICT_ERR_IGNORE_NONE); - - ut_a(local_table); - table_id_t table_id = local_table->id; - dict_table_close(local_table, TRUE, FALSE); - innobase_create_zip_dict_references(form, - table_id, zip_dict_ids, trx); - } - stmt = innobase_get_stmt(thd, &stmt_len); if (stmt) { @@ -13198,9 +12905,6 @@ ha_innobase::create( trx_free_for_mysql(trx); - if (heap != 0) - mem_heap_free(heap); - DBUG_RETURN(0); cleanup: @@ -13210,9 +12914,6 @@ cleanup: trx_free_for_mysql(trx); - if (heap != 0) - mem_heap_free(heap); - DBUG_RETURN(error); } @@ -15625,10 +15326,6 @@ ha_innobase::extra( row_mysql_prebuilt_free_blob_heap(prebuilt); } - if (prebuilt->compress_heap) { - row_mysql_prebuilt_free_compress_heap(prebuilt); - } - break; case HA_EXTRA_RESET_STATE: reset_template(); @@ -15680,10 +15377,6 @@ ha_innobase::reset() row_mysql_prebuilt_free_blob_heap(prebuilt); } - if (prebuilt->compress_heap) { - row_mysql_prebuilt_free_compress_heap(prebuilt); - } - reset_template(); ds_mrr.dsmrr_close(); @@ -15890,11 +15583,7 @@ ha_innobase::external_lock( && lock_type == F_WRLCK) || thd_sql_command(thd) == SQLCOM_CREATE_INDEX || thd_sql_command(thd) == SQLCOM_DROP_INDEX - || thd_sql_command(thd) == SQLCOM_DELETE - || thd_sql_command(thd) == - SQLCOM_CREATE_COMPRESSION_DICTIONARY - || thd_sql_command(thd) == - SQLCOM_DROP_COMPRESSION_DICTIONARY)) { + || thd_sql_command(thd) == SQLCOM_DELETE)) { if (thd_sql_command(thd) == SQLCOM_CREATE_TABLE) { @@ -16662,9 +16351,7 @@ ha_innobase::store_lock( && lock_type <= TL_WRITE)) || sql_command == SQLCOM_CREATE_INDEX || sql_command == SQLCOM_DROP_INDEX - || sql_command == SQLCOM_DELETE - || sql_command == SQLCOM_CREATE_COMPRESSION_DICTIONARY - || sql_command == SQLCOM_DROP_COMPRESSION_DICTIONARY)) { + || sql_command == SQLCOM_DELETE)) { ib_senderrf(trx->mysql_thd, IB_LOG_LEVEL_WARN, ER_READ_ONLY_MODE); @@ -17635,84 +17322,6 @@ ha_innobase::check_if_incompatible_data( return(COMPATIBLE_DATA_YES); } -/** This function reads zip dict-related info from SYS_ZIP_DICT -and SYS_ZIP_DICT_COLS for all columns marked with -COLUMN_FORMAT_TYPE_COMPRESSED flag and updates -zip_dict_name / zip_dict_data for those which have associated -compression dictionaries. -*/ -UNIV_INTERN -void -ha_innobase::update_field_defs_with_zip_dict_info() -{ - DBUG_ENTER("update_field_defs_with_zip_dict_info"); - ut_ad(!mutex_own(&dict_sys->mutex)); - - char norm_name[FN_REFLEN]; - normalize_table_name(norm_name, table_share->normalized_path.str); - - dict_table_t* ib_table = dict_table_open_on_name( - norm_name, FALSE, FALSE, DICT_ERR_IGNORE_NONE); - - /* if dict_table_open_on_name() returns NULL, then it means that - TABLE_SHARE is populated for a table being created and we can - skip filling zip dict info here */ - if (ib_table == 0) - DBUG_VOID_RETURN; - -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS - table_id_t ib_table_id = ib_table->id; - dict_table_close(ib_table, FALSE, FALSE); - Field* field; - for (uint i = 0; i < table_share->fields; ++i) { - field = table_share->field[i]; - if (field->column_format() == - COLUMN_FORMAT_TYPE_COMPRESSED) { - bool reference_found = false; - ulint dict_id = 0; - switch (dict_get_dictionary_id_by_key(ib_table_id, i, - &dict_id)) { - case DB_SUCCESS: - reference_found = true; - break; - case DB_RECORD_NOT_FOUND: - reference_found = false; - break; - default: - ut_error; - } - if (reference_found) { - char* local_name = 0; - ulint local_name_len = 0; - char* local_data = 0; - ulint local_data_len = 0; - if (dict_get_dictionary_info_by_id(dict_id, - &local_name, &local_name_len, - &local_data, &local_data_len) != - DB_SUCCESS) { - ut_error; - } - else { - field->zip_dict_name.str = - local_name; - field->zip_dict_name.length = - local_name_len; - field->zip_dict_data.str = - local_data; - field->zip_dict_data.length = - local_data_len; - } - } - else { - field->zip_dict_name = null_lex_cstr; - field->zip_dict_data = null_lex_cstr; - } - } - } -#endif - DBUG_VOID_RETURN; -} - /****************************************************************//** Update the system variable innodb_io_capacity_max using the "saved" value. This function is registered as a callback with MySQL. */ @@ -20410,7 +20019,7 @@ static MYSQL_SYSVAR_ENUM(checksum_algorithm, srv_checksum_algorithm, "magic number when reading; " "Files updated when this option is set to crc32 or strict_crc32 will " "not be readable by MySQL versions older than 5.6.3", - NULL, NULL, SRV_CHECKSUM_ALGORITHM_INNODB, + NULL, NULL, SRV_CHECKSUM_ALGORITHM_CRC32, &innodb_checksum_algorithm_typelib); @@ -20537,7 +20146,7 @@ static MYSQL_SYSVAR_ULONG(purge_threads, srv_n_purge_threads, PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, "Purge threads can be from 1 to 32. Default is 1.", NULL, NULL, - 1, /* Default setting */ + 4, /* Default setting */ 1, /* Minimum value */ SRV_MAX_N_PURGE_THREADS, 0); /* Maximum value */ @@ -20564,7 +20173,7 @@ static MYSQL_SYSVAR_STR(file_format, innobase_file_format_name, PLUGIN_VAR_RQCMDARG, "File format to use for new tables in .ibd files.", innodb_file_format_name_validate, - innodb_file_format_name_update, "Antelope"); + innodb_file_format_name_update, innodb_file_format_default); /* "innobase_file_format_check" decides whether we would continue booting the server if the file format stamped on the system @@ -20585,7 +20194,7 @@ static MYSQL_SYSVAR_STR(file_format_max, innobase_file_format_max, PLUGIN_VAR_OPCMDARG, "The highest file format in the tablespace.", innodb_file_format_max_validate, - innodb_file_format_max_update, "Antelope"); + innodb_file_format_max_update, innodb_file_format_max_default); static MYSQL_SYSVAR_STR(ft_server_stopword_table, innobase_server_stopword_table, PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_MEMALLOC, @@ -20619,7 +20228,7 @@ static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method, static MYSQL_SYSVAR_BOOL(large_prefix, innobase_large_prefix, PLUGIN_VAR_NOCMDARG, "Support large index prefix length of REC_VERSION_56_MAX_INDEX_COL_LEN (3072) bytes.", - NULL, NULL, FALSE); + NULL, NULL, TRUE); static MYSQL_SYSVAR_BOOL(force_load_corrupted, srv_load_corrupted, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, @@ -20790,7 +20399,7 @@ static MYSQL_SYSVAR_BOOL(log_compressed_pages, page_zip_log_pages, " the zlib compression algorithm changes." " When turned OFF, InnoDB will assume that the zlib" " compression algorithm doesn't change.", - NULL, NULL, FALSE); + NULL, NULL, TRUE); static MYSQL_SYSVAR_LONG(additional_mem_pool_size, innobase_additional_mem_pool_size, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, @@ -20971,12 +20580,12 @@ static MYSQL_SYSVAR_BOOL(buffer_pool_dump_now, innodb_buffer_pool_dump_now, static MYSQL_SYSVAR_BOOL(buffer_pool_dump_at_shutdown, srv_buffer_pool_dump_at_shutdown, PLUGIN_VAR_RQCMDARG, "Dump the buffer pool into a file named @@innodb_buffer_pool_filename", - NULL, NULL, FALSE); + NULL, NULL, TRUE); static MYSQL_SYSVAR_ULONG(buffer_pool_dump_pct, srv_buf_pool_dump_pct, PLUGIN_VAR_RQCMDARG, - "Dump only the hottest N% of each buffer pool, defaults to 100", - NULL, NULL, 100, 1, 100, 0); + "Dump only the hottest N% of each buffer pool, defaults to 25", + NULL, NULL, 25, 1, 100, 0); #ifdef UNIV_DEBUG static MYSQL_SYSVAR_STR(buffer_pool_evict, srv_buffer_pool_evict, @@ -20999,7 +20608,7 @@ static MYSQL_SYSVAR_BOOL(buffer_pool_load_abort, innodb_buffer_pool_load_abort, static MYSQL_SYSVAR_BOOL(buffer_pool_load_at_startup, srv_buffer_pool_load_at_startup, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "Load the buffer pool from a file named @@innodb_buffer_pool_filename", - NULL, NULL, FALSE); + NULL, NULL, TRUE); static MYSQL_SYSVAR_BOOL(defragment, srv_defragment, PLUGIN_VAR_RQCMDARG, @@ -21561,7 +21170,7 @@ static MYSQL_SYSVAR_BOOL(trx_purge_view_update_only_debug, "but the each purges were not done yet.", NULL, NULL, FALSE); -static MYSQL_SYSVAR_ULONG(data_file_size_debug, +static MYSQL_SYSVAR_UINT(data_file_size_debug, srv_sys_space_size_debug, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "InnoDB system tablespace size to be set in recovery.", @@ -21622,21 +21231,6 @@ static MYSQL_SYSVAR_BOOL(use_stacktrace, srv_use_stacktrace, "Print stacktrace on long semaphore wait (off by default supported only on linux)", NULL, NULL, FALSE); -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS -static MYSQL_SYSVAR_UINT(compressed_columns_zip_level, - srv_compressed_columns_zip_level, - PLUGIN_VAR_RQCMDARG, - "Compression level used for compressed columns. 0 is no compression" - ", 1 is fastest and 9 is best compression. Default is 6.", - NULL, NULL, DEFAULT_COMPRESSION_LEVEL, 0, 9, 0); - -static MYSQL_SYSVAR_ULONG(compressed_columns_threshold, - srv_compressed_columns_threshold, - PLUGIN_VAR_RQCMDARG, - "Compress column data if its length exceeds this value. Default is 96", - NULL, NULL, 96, 1, ~0UL, 0); -#endif - static MYSQL_SYSVAR_UINT(compression_level, page_zip_level, PLUGIN_VAR_RQCMDARG, "Compression level used for zlib compression. 0 is no compression" @@ -21661,7 +21255,7 @@ static MYSQL_SYSVAR_ENUM(compression_algorithm, innodb_compression_algorithm, /* We use here the largest number of supported compression method to enable all those methods that are available. Availability of compression method is verified on innodb_compression_algorithm_validate function. */ - PAGE_UNCOMPRESSED, + PAGE_ZLIB_ALGORITHM, &page_compression_algorithms_typelib); static MYSQL_SYSVAR_LONG(mtflush_threads, srv_mtflush_threads, @@ -22015,10 +21609,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(locking_fake_changes), MYSQL_SYSVAR(tmpdir), MYSQL_SYSVAR(use_stacktrace), -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS - MYSQL_SYSVAR(compressed_columns_zip_level), - MYSQL_SYSVAR(compressed_columns_threshold), -#endif MYSQL_SYSVAR(force_primary_key), MYSQL_SYSVAR(fatal_semaphore_wait_threshold), /* Table page compression feature */ @@ -22068,10 +21658,6 @@ maria_declare_plugin(xtradb) i_s_xtradb_read_view, i_s_xtradb_internal_hash_tables, i_s_xtradb_rseg, -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS -i_s_xtradb_zip_dict, -i_s_xtradb_zip_dict_cols, -#endif i_s_innodb_trx, i_s_innodb_locks, i_s_innodb_lock_waits, diff --git a/storage/xtradb/handler/ha_innodb.h b/storage/xtradb/handler/ha_innodb.h index e6026f81c99..783077ceaf1 100644 --- a/storage/xtradb/handler/ha_innodb.h +++ b/storage/xtradb/handler/ha_innodb.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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 @@ -318,14 +318,6 @@ class ha_innobase: public handler bool check_if_supported_virtual_columns(void) { return TRUE; } - /** This function reads zip dict-related info from SYS_ZIP_DICT - and SYS_ZIP_DICT_COLS for all columns marked with - COLUMN_FORMAT_TYPE_COMPRESSED flag and updates - zip_dict_name / zip_dict_data for those which have associated - compression dictionaries. - */ - virtual void update_field_defs_with_zip_dict_info(); - private: /** Builds a 'template' to the prebuilt struct. @@ -741,31 +733,3 @@ ib_push_frm_error( TABLE* table, /*!< in: MySQL table */ ulint n_keys, /*!< in: InnoDB #keys */ bool push_warning); /*!< in: print warning ? */ - -/** This function checks if all the compression dictionaries referenced -in table->fields exist in SYS_ZIP_DICT InnoDB system table. -@return true if all referenced dictionaries exist */ -UNIV_INTERN -bool -innobase_check_zip_dicts( - const TABLE* table, /*!< in: table in MySQL data - dictionary */ - ulint* dict_ids, /*!< out: identified zip dict ids - (at least n_fields long) */ - trx_t* trx, /*!< in: transaction */ - const char** err_dict_name); /*!< out: the name of the - zip_dict which does not exist. */ - -/** This function creates compression dictionary references in -SYS_ZIP_DICT_COLS InnoDB system table for table_id based on info -in table->fields and provided zip dict ids. */ -UNIV_INTERN -void -innobase_create_zip_dict_references( - const TABLE* table, /*!< in: table in MySQL data - dictionary */ - table_id_t ib_table_id, /*!< in: table ID in Innodb data - dictionary */ - ulint* zip_dict_ids, /*!< in: zip dict ids - (at least n_fields long) */ - trx_t* trx); /*!< in: transaction */ diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc index 9b46918a9d5..c62dc5bc837 100644 --- a/storage/xtradb/handler/handler0alter.cc +++ b/storage/xtradb/handler/handler0alter.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -22,11 +22,6 @@ this program; if not, write to the Free Software Foundation, Inc., Smart ALTER TABLE *******************************************************/ -#ifndef HAVE_PERCONA_COMPRESSED_COLUMNS -#define COLUMN_FORMAT_TYPE_COMPRESSED 0xBADF00D -#define ER_COMPRESSION_DICTIONARY_DOES_NOT_EXIST 0xDEADFACE -#endif - #include #include #include @@ -1213,15 +1208,6 @@ innobase_col_to_mysql( field->reset(); if (field->type() == MYSQL_TYPE_VARCHAR) { - if (field->column_format() == - COLUMN_FORMAT_TYPE_COMPRESSED) { - /* Skip compressed varchar column when - reporting an erroneous row - during index creation or table rebuild. */ - field->set_null(); - break; - } - /* This is a >= 5.0.3 type true VARCHAR. Store the length of the data to the first byte or the first two bytes of dest. */ @@ -2522,14 +2508,7 @@ innobase_build_col_map_add( byte* buf = static_cast(mem_heap_alloc(heap, size)); row_mysql_store_col_in_innobase_format( - dfield, buf, TRUE, field->ptr, size, comp, -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS - field->column_format() == COLUMN_FORMAT_TYPE_COMPRESSED, - reinterpret_cast(field->zip_dict_data.str), - field->zip_dict_data.length, prebuilt); -#else - 0,0,0, prebuilt); -#endif + dfield, buf, TRUE, field->ptr, size, comp); } /** Construct the translation table for reordering, dropping or @@ -2783,7 +2762,6 @@ prepare_inplace_alter_table_dict( ulint num_fts_index; ha_innobase_inplace_ctx*ctx; uint sql_idx; - ulint* zip_dict_ids = 0; DBUG_ENTER("prepare_inplace_alter_table_dict"); @@ -2930,26 +2908,6 @@ prepare_inplace_alter_table_dict( mode = crypt_data->encryption; } - zip_dict_ids = static_cast( - mem_heap_alloc(ctx->heap, - altered_table->s->fields * sizeof(ulint))); - - /* This is currently required for valgrind because MariaDB does - not currently support compressed columns. */ - for (size_t field_idx = 0; - field_idx < altered_table->s->fields; - ++field_idx) { - zip_dict_ids[field_idx] = ULINT_UNDEFINED; - } - - const char* err_zip_dict_name = 0; - if (!innobase_check_zip_dicts(altered_table, zip_dict_ids, - ctx->trx, &err_zip_dict_name)) { - my_error(ER_COMPRESSION_DICTIONARY_DOES_NOT_EXIST, - MYF(0), err_zip_dict_name); - goto new_clustered_failed; - } - if (innobase_check_foreigns( ha_alter_info, altered_table, old_table, user_table, ctx->drop_fk, ctx->num_to_drop_fk)) { @@ -3056,12 +3014,6 @@ prepare_inplace_alter_table_dict( } } - if (field->column_format() == - COLUMN_FORMAT_TYPE_COMPRESSED) { - field_type |= DATA_COMPRESSED; - } - - if (dict_col_name_is_reserved(field->field_name)) { dict_mem_table_free(ctx->new_table); my_error(ER_WRONG_COLUMN_NAME, MYF(0), @@ -3319,17 +3271,6 @@ op_ok: DBUG_ASSERT(error == DB_SUCCESS); -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS - /* - Adding compression dictionary <-> compressed table column links - to the SYS_ZIP_DICT_COLS table. - */ - if (zip_dict_ids != 0) { - innobase_create_zip_dict_references(altered_table, - ctx->trx->table_id, zip_dict_ids, ctx->trx); - } -#endif - /* 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 @@ -4018,7 +3959,7 @@ check_if_can_drop_indexes: index->name, TRUE); my_error(ER_INDEX_CORRUPT, MYF(0), index_name); - DBUG_RETURN(true); + goto err_exit; } } } diff --git a/storage/xtradb/handler/xtradb_i_s.cc b/storage/xtradb/handler/xtradb_i_s.cc index 39f2efb90db..eaf7da733bf 100644 --- a/storage/xtradb/handler/xtradb_i_s.cc +++ b/storage/xtradb/handler/xtradb_i_s.cc @@ -2,6 +2,7 @@ Copyright (c) 2007, 2012, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2010-2012, Percona Inc. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -37,7 +38,6 @@ this program; if not, write to the Free Software Foundation, Inc., #include /* btr_search_sys */ #include /* recv_sys */ #include -#include /* for ZIP_DICT_MAX_* constants */ /* for XTRADB_RSEG table */ #include "trx0trx.h" /* for TRX_QUE_STATE_STR_MAX_LEN */ @@ -542,331 +542,3 @@ UNIV_INTERN struct st_mysql_plugin i_s_xtradb_rseg = STRUCT_FLD(version_info, INNODB_VERSION_STR), STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE), }; - - -#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS -/************************************************************************/ -enum zip_dict_field_type -{ - zip_dict_field_id, - zip_dict_field_name, - zip_dict_field_zip_dict -}; - -static ST_FIELD_INFO xtradb_sys_zip_dict_fields_info[] = -{ - { STRUCT_FLD(field_name, "id"), - STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), - STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, MY_I_S_UNSIGNED), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE) }, - - { STRUCT_FLD(field_name, "name"), - STRUCT_FLD(field_length, ZIP_DICT_MAX_NAME_LENGTH), - STRUCT_FLD(field_type, MYSQL_TYPE_STRING), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, 0), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE) }, - - { STRUCT_FLD(field_name, "zip_dict"), - STRUCT_FLD(field_length, ZIP_DICT_MAX_DATA_LENGTH), - STRUCT_FLD(field_type, MYSQL_TYPE_BLOB), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, 0), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE) }, - - END_OF_ST_FIELD_INFO -}; - -/** Function to fill INFORMATION_SCHEMA.XTRADB_ZIP_DICT with information -collected by scanning SYS_ZIP_DICT table. -@return 0 on success */ -static -int -xtradb_i_s_dict_fill_sys_zip_dict( - THD* thd, /*!< in: thread */ - ulint id, /*!< in: dict ID */ - const char* name, /*!< in: dict name */ - const char* data, /*!< in: dict data */ - ulint data_len, /*!< in: dict data length */ - TABLE* table_to_fill) /*!< in/out: fill this table */ -{ - DBUG_ENTER("xtradb_i_s_dict_fill_sys_zip_dict"); - - Field** fields = table_to_fill->field; - - OK(field_store_ulint(fields[zip_dict_field_id], id)); - OK(field_store_string(fields[zip_dict_field_name], name)); - OK(field_store_blob(fields[zip_dict_field_zip_dict], data, - data_len)); - - OK(schema_table_store_record(thd, table_to_fill)); - - DBUG_RETURN(0); -} - -/** Function to populate INFORMATION_SCHEMA.XTRADB_ZIP_DICT table. -Loop through each record in SYS_ZIP_DICT, and extract the column -information and fill the INFORMATION_SCHEMA.XTRADB_ZIP_DICT table. -@return 0 on success */ -static -int -xtradb_i_s_sys_zip_dict_fill_table( - THD* thd, /*!< in: thread */ - TABLE_LIST* tables, /*!< in/out: tables to fill */ - Item* ) /*!< in: condition (not used) */ -{ - btr_pcur_t pcur; - const rec_t* rec; - mem_heap_t* heap; - mtr_t mtr; - - DBUG_ENTER("xtradb_i_s_sys_zip_dict_fill_table"); - RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); - - /* deny access to user without SUPER_ACL privilege */ - if (check_global_access(thd, SUPER_ACL)) { - DBUG_RETURN(0); - } - - heap = mem_heap_create(1000); - mutex_enter(&dict_sys->mutex); - mtr_start(&mtr); - - rec = dict_startscan_system(&pcur, &mtr, SYS_ZIP_DICT); - ulint zip_size = dict_table_zip_size(pcur.btr_cur.index->table); - - while (rec) { - const char* err_msg; - ulint id; - const char* name; - const char* data; - ulint data_len; - - /* Extract necessary information from a SYS_ZIP_DICT row */ - err_msg = dict_process_sys_zip_dict( - heap, zip_size, rec, &id, &name, &data, &data_len); - - mtr_commit(&mtr); - mutex_exit(&dict_sys->mutex); - - if (!err_msg) { - xtradb_i_s_dict_fill_sys_zip_dict( - thd, id, name, data, data_len, - tables->table); - } else { - push_warning_printf(thd, - Sql_condition::WARN_LEVEL_WARN, - ER_CANT_FIND_SYSTEM_REC, "%s", err_msg); - } - - mem_heap_empty(heap); - - /* Get the next record */ - mutex_enter(&dict_sys->mutex); - mtr_start(&mtr); - rec = dict_getnext_system(&pcur, &mtr); - } - - mtr_commit(&mtr); - mutex_exit(&dict_sys->mutex); - mem_heap_free(heap); - - DBUG_RETURN(0); -} - -static int i_s_xtradb_zip_dict_init(void* p) -{ - DBUG_ENTER("i_s_xtradb_zip_dict_init"); - - ST_SCHEMA_TABLE* schema = static_cast(p); - - schema->fields_info = xtradb_sys_zip_dict_fields_info; - schema->fill_table = xtradb_i_s_sys_zip_dict_fill_table; - - DBUG_RETURN(0); -} - -UNIV_INTERN struct st_mysql_plugin i_s_xtradb_zip_dict = -{ - STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN), - STRUCT_FLD(info, &i_s_info), - STRUCT_FLD(name, "XTRADB_ZIP_DICT"), - STRUCT_FLD(author, PLUGIN_AUTHOR), - STRUCT_FLD(descr, "InnoDB compression dictionaries information"), - STRUCT_FLD(license, PLUGIN_LICENSE_GPL), - STRUCT_FLD(init, i_s_xtradb_zip_dict_init), - STRUCT_FLD(deinit, i_s_common_deinit), - STRUCT_FLD(version, INNODB_VERSION_SHORT), - STRUCT_FLD(status_vars, NULL), - STRUCT_FLD(system_vars, NULL), - STRUCT_FLD(__reserved1, NULL), - STRUCT_FLD(flags, 0UL), -}; - -enum zip_dict_cols_field_type -{ - zip_dict_cols_field_table_id, - zip_dict_cols_field_column_pos, - zip_dict_cols_field_dict_id -}; - -static ST_FIELD_INFO xtradb_sys_zip_dict_cols_fields_info[] = -{ - { STRUCT_FLD(field_name, "table_id"), - STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), - STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, MY_I_S_UNSIGNED), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE) }, - - { STRUCT_FLD(field_name, "column_pos"), - STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), - STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, MY_I_S_UNSIGNED), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE) }, - - { STRUCT_FLD(field_name, "dict_id"), - STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), - STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, MY_I_S_UNSIGNED), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE) }, - - END_OF_ST_FIELD_INFO -}; - -/** Function to fill INFORMATION_SCHEMA.XTRADB_ZIP_DICT_COLS with information -collected by scanning SYS_ZIP_DICT_COLS table. -@return 0 on success */ -static -int -xtradb_i_s_dict_fill_sys_zip_dict_cols( - THD* thd, /*!< in: thread */ - ulint table_id, /*!< in: table ID */ - ulint column_pos, /*!< in: column position */ - ulint dict_id, /*!< in: dict ID */ - TABLE* table_to_fill) /*!< in/out: fill this table */ -{ - DBUG_ENTER("xtradb_i_s_dict_fill_sys_zip_dict_cols"); - - Field** fields = table_to_fill->field; - - OK(field_store_ulint(fields[zip_dict_cols_field_table_id], - table_id)); - OK(field_store_ulint(fields[zip_dict_cols_field_column_pos], - column_pos)); - OK(field_store_ulint(fields[zip_dict_cols_field_dict_id], - dict_id)); - - OK(schema_table_store_record(thd, table_to_fill)); - - DBUG_RETURN(0); -} - -/** Function to populate INFORMATION_SCHEMA.XTRADB_ZIP_DICT_COLS table. -Loop through each record in SYS_ZIP_DICT_COLS, and extract the column -information and fill the INFORMATION_SCHEMA.XTRADB_ZIP_DICT_COLS table. -@return 0 on success */ -static -int -xtradb_i_s_sys_zip_dict_cols_fill_table( - THD* thd, /*!< in: thread */ - TABLE_LIST* tables, /*!< in/out: tables to fill */ - Item* ) /*!< in: condition (not used) */ -{ - btr_pcur_t pcur; - const rec_t* rec; - mem_heap_t* heap; - mtr_t mtr; - - DBUG_ENTER("xtradb_i_s_sys_zip_dict_cols_fill_table"); - RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); - - /* deny access to user without SUPER_ACL privilege */ - if (check_global_access(thd, SUPER_ACL)) { - DBUG_RETURN(0); - } - - heap = mem_heap_create(1000); - mutex_enter(&dict_sys->mutex); - mtr_start(&mtr); - - rec = dict_startscan_system(&pcur, &mtr, SYS_ZIP_DICT_COLS); - - while (rec) { - const char* err_msg; - ulint table_id; - ulint column_pos; - ulint dict_id; - - /* Extract necessary information from a SYS_ZIP_DICT_COLS - row */ - err_msg = dict_process_sys_zip_dict_cols( - heap, rec, &table_id, &column_pos, &dict_id); - - mtr_commit(&mtr); - mutex_exit(&dict_sys->mutex); - - if (!err_msg) { - xtradb_i_s_dict_fill_sys_zip_dict_cols( - thd, table_id, column_pos, dict_id, - tables->table); - } else { - push_warning_printf(thd, - Sql_condition::WARN_LEVEL_WARN, - ER_CANT_FIND_SYSTEM_REC, "%s", err_msg); - } - - mem_heap_empty(heap); - - /* Get the next record */ - mutex_enter(&dict_sys->mutex); - mtr_start(&mtr); - rec = dict_getnext_system(&pcur, &mtr); - } - - mtr_commit(&mtr); - mutex_exit(&dict_sys->mutex); - mem_heap_free(heap); - - DBUG_RETURN(0); -} - -static int i_s_xtradb_zip_dict_cols_init(void* p) -{ - DBUG_ENTER("i_s_xtradb_zip_dict_cols_init"); - - ST_SCHEMA_TABLE* schema = static_cast(p); - - schema->fields_info = xtradb_sys_zip_dict_cols_fields_info; - schema->fill_table = xtradb_i_s_sys_zip_dict_cols_fill_table; - - DBUG_RETURN(0); -} - -UNIV_INTERN struct st_mysql_plugin i_s_xtradb_zip_dict_cols = -{ - STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN), - STRUCT_FLD(info, &i_s_info), - STRUCT_FLD(name, "XTRADB_ZIP_DICT_COLS"), - STRUCT_FLD(author, PLUGIN_AUTHOR), - STRUCT_FLD(descr, "InnoDB compressed columns information"), - STRUCT_FLD(license, PLUGIN_LICENSE_GPL), - STRUCT_FLD(init, i_s_xtradb_zip_dict_cols_init), - STRUCT_FLD(deinit, i_s_common_deinit), - STRUCT_FLD(version, INNODB_VERSION_SHORT), - STRUCT_FLD(status_vars, NULL), - STRUCT_FLD(system_vars, NULL), - STRUCT_FLD(__reserved1, NULL), - STRUCT_FLD(flags, 0UL), -}; -#endif diff --git a/storage/xtradb/handler/xtradb_i_s.h b/storage/xtradb/handler/xtradb_i_s.h index 905d84587af..994bc11c1b8 100644 --- a/storage/xtradb/handler/xtradb_i_s.h +++ b/storage/xtradb/handler/xtradb_i_s.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2010-2012, Percona Inc. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -22,7 +23,5 @@ this program; if not, write to the Free Software Foundation, Inc., extern struct st_mysql_plugin i_s_xtradb_read_view; extern struct st_mysql_plugin i_s_xtradb_internal_hash_tables; extern struct st_mysql_plugin i_s_xtradb_rseg; -extern struct st_mysql_plugin i_s_xtradb_zip_dict; -extern struct st_mysql_plugin i_s_xtradb_zip_dict_cols; #endif /* XTRADB_I_S_H */ diff --git a/storage/xtradb/include/data0type.h b/storage/xtradb/include/data0type.h index f269c266efb..df6b6a41c11 100644 --- a/storage/xtradb/include/data0type.h +++ b/storage/xtradb/include/data0type.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -170,9 +171,6 @@ be less than 256 */ type when the column is true VARCHAR where MySQL uses 2 bytes to store the data len; for shorter VARCHARs MySQL uses only 1 byte */ -#define DATA_COMPRESSED 16384 /* this is ORed to the precise data - type when the column has COLUMN_FORMAT = - COMPRESSED attribute*/ /*-------------------------------------------*/ /* This many bytes we need to store the type information affecting the @@ -503,17 +501,6 @@ dtype_print( /*========*/ const dtype_t* type); /*!< in: type */ -/** -Calculates the number of extra bytes needed for compression header -depending on precise column type. -@reval 0 if prtype does not include DATA_COMPRESSED flag -@reval ZIP_COLUMN_HEADER_LENGTH if prtype includes DATA_COMPRESSED flag -*/ -UNIV_INLINE -ulint -prtype_get_compression_extra( - ulint prtype); /*!< in: precise type */ - /* Structure for an SQL data type. If you add fields to this structure, be sure to initialize them everywhere. This structure is initialized in the following functions: diff --git a/storage/xtradb/include/data0type.ic b/storage/xtradb/include/data0type.ic index 29dc480a19c..555852474aa 100644 --- a/storage/xtradb/include/data0type.ic +++ b/storage/xtradb/include/data0type.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -710,18 +711,3 @@ dtype_get_sql_null_size( 0, 0)); #endif /* !UNIV_HOTBACKUP */ } - -/** -Calculates the number of extra bytes needed for compression header -depending on precise column type. -@reval 0 if prtype does not include DATA_COMPRESSED flag -@reval ZIP_COLUMN_HEADER_LENGTH if prtype includes DATA_COMPRESSED flag -*/ -UNIV_INLINE -ulint -prtype_get_compression_extra( - ulint prtype) /*!< in: precise type */ -{ - return (prtype & DATA_COMPRESSED) != 0 ? - ZIP_COLUMN_HEADER_LENGTH : 0; -} diff --git a/storage/xtradb/include/dict0boot.h b/storage/xtradb/include/dict0boot.h index d5bee886cbf..4fd9b0b7f98 100644 --- a/storage/xtradb/include/dict0boot.h +++ b/storage/xtradb/include/dict0boot.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -324,38 +325,6 @@ enum dict_fld_sys_datafiles_enum { DICT_FLD__SYS_DATAFILES__PATH = 3, DICT_NUM_FIELDS__SYS_DATAFILES = 4 }; -/* The columns in SYS_DICT */ -enum dict_col_sys_zip_dict_enum { - DICT_COL__SYS_ZIP_DICT__ID = 0, - DICT_COL__SYS_ZIP_DICT__NAME = 1, - DICT_COL__SYS_ZIP_DICT__DATA = 2, - DICT_NUM_COLS__SYS_ZIP_DICT = 3 -}; -/* The field numbers in the SYS_DICT clustered index */ -enum dict_fld_sys_zip_dict_enum { - DICT_FLD__SYS_ZIP_DICT__ID = 0, - DICT_FLD__SYS_ZIP_DICT__DB_TRX_ID = 1, - DICT_FLD__SYS_ZIP_DICT__DB_ROLL_PTR = 2, - DICT_FLD__SYS_ZIP_DICT__NAME = 3, - DICT_FLD__SYS_ZIP_DICT__DATA = 4, - DICT_NUM_FIELDS__SYS_ZIP_DICT = 5 -}; -/* The columns in SYS_DICT_COLS */ -enum dict_col_sys_zip_dict_cols_enum { - DICT_COL__SYS_ZIP_DICT_COLS__TABLE_ID = 0, - DICT_COL__SYS_ZIP_DICT_COLS__COLUMN_POS = 1, - DICT_COL__SYS_ZIP_DICT_COLS__DICT_ID = 2, - DICT_NUM_COLS__SYS_ZIP_DICT_COLS = 3 -}; -/* The field numbers in the SYS_DICT_COLS clustered index */ -enum dict_fld_sys_zip_dict_cols_enum { - DICT_FLD__SYS_ZIP_DICT_COLS__TABLE_ID = 0, - DICT_FLD__SYS_ZIP_DICT_COLS__COLUMN_POS = 1, - DICT_FLD__SYS_ZIP_DICT_COLS__DB_TRX_ID = 2, - DICT_FLD__SYS_ZIP_DICT_COLS__DB_ROLL_PTR = 3, - DICT_FLD__SYS_ZIP_DICT_COLS__DICT_ID = 4, - DICT_NUM_FIELDS__SYS_ZIP_DICT_COLS = 5 -}; /* A number of the columns above occur in multiple tables. These are the length of thos fields. */ diff --git a/storage/xtradb/include/dict0boot.ic b/storage/xtradb/include/dict0boot.ic index 2b156a4f672..42e91ee930e 100644 --- a/storage/xtradb/include/dict0boot.ic +++ b/storage/xtradb/include/dict0boot.ic @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -92,5 +93,3 @@ dict_is_sys_table( { return(id < DICT_HDR_FIRST_ID); } - - diff --git a/storage/xtradb/include/dict0crea.h b/storage/xtradb/include/dict0crea.h index 6ea71ada83e..082048b8bbd 100644 --- a/storage/xtradb/include/dict0crea.h +++ b/storage/xtradb/include/dict0crea.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -167,18 +168,6 @@ dberr_t dict_create_or_check_sys_tablespace(void); /*=====================================*/ -#define ZIP_DICT_MAX_NAME_LENGTH 64 -/* Max window size (2^15) minus 262 */ -#define ZIP_DICT_MAX_DATA_LENGTH 32506 - -/** Creates the zip_dict system table inside InnoDB -at server bootstrap or server start if it is not found or is -not of the right form. -@return DB_SUCCESS or error code */ -UNIV_INTERN -dberr_t -dict_create_or_check_sys_zip_dict(void); - /********************************************************************//** Add a single tablespace definition to the data dictionary tables in the database. @@ -195,83 +184,6 @@ dict_create_add_tablespace_to_dictionary( bool commit); /*!< in: if true then commit the transaction */ -/** Add a single compression dictionary definition to the SYS_ZIP_DICT -InnoDB system table. -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_add_zip_dict( - const char* name, /*!< in: dict name */ - ulint name_len, /*!< in: dict name length */ - const char* data, /*!< in: dict data */ - ulint data_len, /*!< in: dict data length */ - trx_t* trx); /*!< in/out: transaction */ - -/** Add a single compression dictionary reference to the SYS_ZIP_DICT_COLS -InnoDB system table. -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_add_zip_dict_reference( - ulint table_id, /*!< in: table id */ - ulint column_pos, /*!< in: column position */ - ulint dict_id, /*!< in: dict id */ - trx_t* trx); /*!< in/out: transaction */ - -/** Get a single compression dictionary id for the given -(table id, column pos) pair. -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_get_zip_dict_id_by_reference( - ulint table_id, /*!< in: table id */ - ulint column_pos, /*!< in: column position */ - ulint* dict_id, /*!< out: dict id */ - trx_t* trx); /*!< in/out: transaction */ - -/** Get compression dictionary id for the given name. -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_get_zip_dict_id_by_name( - const char* dict_name, /*!< in: dict name */ - ulint dict_name_len, /*!< in: dict name length */ - ulint* dict_id, /*!< out: dict id */ - trx_t* trx); /*!< in/out: transaction */ - -/** Get compression dictionary info (name and data) for the given id. -Allocates memory for name and data on success. -Must be freed with mem_free(). -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_get_zip_dict_info_by_id( - ulint dict_id, /*!< in: dict id */ - char** name, /*!< out: dict name */ - ulint* name_len, /*!< out: dict name length */ - char** data, /*!< out: dict data */ - ulint* data_len, /*!< out: dict data length */ - trx_t* trx); /*!< in/out: transaction */ - -/** Remove a single compression dictionary from the data dictionary -tables in the database. -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_remove_zip_dict( - const char* name, /*!< in: dict name */ - ulint name_len, /*!< in: dict name length */ - trx_t* trx); /*!< in/out: transaction */ - -/** Remove all compression dictionary references for the given table ID from -the data dictionary tables in the database. -@return error code or DB_SUCCESS */ -UNIV_INTERN -dberr_t -dict_create_remove_zip_dict_references_for_table( - ulint table_id, /*!< in: table id */ - trx_t* trx); /*!< in/out: transaction */ - /********************************************************************//** Add a foreign key definition to the data dictionary tables. @return error code or DB_SUCCESS */ diff --git a/storage/xtradb/include/dict0dict.h b/storage/xtradb/include/dict0dict.h index 5aab595302a..cfaf3e12e82 100644 --- a/storage/xtradb/include/dict0dict.h +++ b/storage/xtradb/include/dict0dict.h @@ -2,7 +2,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2015, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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 @@ -1910,52 +1910,6 @@ dict_table_set_corrupt_by_space( ulint space_id, ibool need_mutex); -/** Insert a records into SYS_ZIP_DICT. -@retval DB_SUCCESS if OK -@retval dberr_t if the insert failed */ -UNIV_INTERN -dberr_t -dict_create_zip_dict( - const char* name, /*!< in: zip_dict name */ - ulint name_len, /*!< in: zip_dict name length*/ - const char* data, /*!< in: zip_dict data */ - ulint data_len); /*!< in: zip_dict data length */ - -/** Get single compression dictionary id for the given -(table id, column pos) pair. -@retval DB_SUCCESS if OK -@retval DB_RECORD_NOT_FOUND if not found */ -UNIV_INTERN -dberr_t -dict_get_dictionary_id_by_key( - ulint table_id, /*!< in: table id */ - ulint column_pos, /*!< in: column position */ - ulint* dict_id); /*!< out: zip_dict id */ - -/** Get compression dictionary info (name and data) for the given id. -Allocates memory in name->str and data->str on success. -Must be freed with mem_free(). -@retval DB_SUCCESS if OK -@retval DB_RECORD_NOT_FOUND if not found */ -UNIV_INTERN -dberr_t -dict_get_dictionary_info_by_id( - ulint dict_id, /*!< in: table name */ - char** name, /*!< out: dictionary name */ - ulint* name_len, /*!< out: dictionary name length*/ - char** data, /*!< out: dictionary data */ - ulint* data_len); /*!< out: dictionary data length*/ - -/** Delete a record in SYS_ZIP_DICT with the given name. -@retval DB_SUCCESS if OK -@retval DB_RECORD_NOT_FOUND if not found -@retval DB_ROW_IS_REFERENCED if in use */ -UNIV_INTERN -dberr_t -dict_drop_zip_dict( - const char* name, /*!< in: zip_dict name */ - ulint name_len); /*!< in: zip_dict name length*/ - #ifndef UNIV_NONINL #include "dict0dict.ic" #endif diff --git a/storage/xtradb/include/dict0dict.ic b/storage/xtradb/include/dict0dict.ic index d9d40b809d1..2b63ddea51d 100644 --- a/storage/xtradb/include/dict0dict.ic +++ b/storage/xtradb/include/dict0dict.ic @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB +Copyright (c) 2013, 2017, MariaDB Corporation. This 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 @@ -918,10 +918,13 @@ dict_tf_to_fsp_flags( ulint table_flags) /*!< in: dict_table_t::flags */ { ulint fsp_flags; - ulint page_compression = DICT_TF_GET_PAGE_COMPRESSION(table_flags); - ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(table_flags); + ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL( + table_flags); ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(table_flags); + ut_ad((DICT_TF_GET_PAGE_COMPRESSION(table_flags) == 0) + == (page_compression_level == 0)); + DBUG_EXECUTE_IF("dict_tf_to_fsp_flags_failure", return(ULINT_UNDEFINED);); @@ -929,30 +932,23 @@ dict_tf_to_fsp_flags( fsp_flags = DICT_TF_HAS_ATOMIC_BLOBS(table_flags) ? 1 : 0; /* ZIP_SSIZE and ATOMIC_BLOBS are at the same position. */ - fsp_flags |= table_flags & DICT_TF_MASK_ZIP_SSIZE; - fsp_flags |= table_flags & DICT_TF_MASK_ATOMIC_BLOBS; + fsp_flags |= table_flags + & (DICT_TF_MASK_ZIP_SSIZE | DICT_TF_MASK_ATOMIC_BLOBS); - /* In addition, tablespace flags also contain the page size. */ - fsp_flags |= fsp_flags_set_page_size(fsp_flags, UNIV_PAGE_SIZE); + fsp_flags |= FSP_FLAGS_PAGE_SSIZE(); - /* The DATA_DIR flag is in a different position in fsp_flag */ - fsp_flags |= DICT_TF_HAS_DATA_DIR(table_flags) - ? FSP_FLAGS_MASK_DATA_DIR : 0; - - /* In addition, tablespace flags also contain if the page - compression is used for this table. */ - fsp_flags |= FSP_FLAGS_SET_PAGE_COMPRESSION(fsp_flags, page_compression); - - /* In addition, tablespace flags also contain page compression level - if page compression is used for this table. */ - fsp_flags |= FSP_FLAGS_SET_PAGE_COMPRESSION_LEVEL(fsp_flags, page_compression_level); - - /* In addition, tablespace flags also contain flag if atomic writes - is used for this table */ - fsp_flags |= FSP_FLAGS_SET_ATOMIC_WRITES(fsp_flags, atomic_writes); + if (page_compression_level) { + fsp_flags |= FSP_FLAGS_MASK_PAGE_COMPRESSION; + } ut_a(fsp_flags_is_valid(fsp_flags)); - ut_a(dict_tf_verify_flags(table_flags, fsp_flags)); + + if (DICT_TF_HAS_DATA_DIR(table_flags)) { + fsp_flags |= 1U << FSP_FLAGS_MEM_DATA_DIR; + } + + fsp_flags |= atomic_writes << FSP_FLAGS_MEM_ATOMIC_WRITES; + fsp_flags |= page_compression_level << FSP_FLAGS_MEM_COMPRESSION_LEVEL; return(fsp_flags); } diff --git a/storage/xtradb/include/dict0load.h b/storage/xtradb/include/dict0load.h index 85e3e565637..1a720de5bb6 100644 --- a/storage/xtradb/include/dict0load.h +++ b/storage/xtradb/include/dict0load.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -44,8 +45,6 @@ enum dict_system_id_t { SYS_FOREIGN_COLS, SYS_TABLESPACES, SYS_DATAFILES, - SYS_ZIP_DICT, - SYS_ZIP_DICT_COLS, /* This must be last item. Defines the number of system tables. */ SYS_NUM_SYSTEM_TABLES @@ -389,32 +388,6 @@ dict_process_sys_datafiles( ulint* space, /*!< out: pace id */ const char** path); /*!< out: datafile path */ -/** This function parses a SYS_ZIP_DICT record, extracts necessary -information from the record and returns to caller. -@return error message, or NULL on success */ -UNIV_INTERN -const char* -dict_process_sys_zip_dict( - mem_heap_t* heap, /*!< in/out: heap memory */ - ulint zip_size, /*!< in: nonzero=compressed BLOB page size */ - const rec_t* rec, /*!< in: current SYS_ZIP_DICT rec */ - ulint* id, /*!< out: dict id */ - const char** name, /*!< out: dict name */ - const char** data, /*!< out: dict data */ - ulint* data_len); /*!< out: dict data length */ - -/** This function parses a SYS_ZIP_DICT_COLS record, extracts necessary -information from the record and returns to caller. -@return error message, or NULL on success */ -UNIV_INTERN -const char* -dict_process_sys_zip_dict_cols( - mem_heap_t* heap, /*!< in/out: heap memory */ - const rec_t* rec, /*!< in: current SYS_ZIP_DICT rec */ - ulint* table_id, /*!< out: table id */ - ulint* column_pos, /*!< out: column position */ - ulint* dict_id); /*!< out: dict id */ - /********************************************************************//** Get the filepath for a spaceid from SYS_DATAFILES. This function provides a temporary heap which is used for the table lookup, but not for the path. diff --git a/storage/xtradb/include/dict0pagecompress.h b/storage/xtradb/include/dict0pagecompress.h index 19a2a6c52f3..6503c86ffa2 100644 --- a/storage/xtradb/include/dict0pagecompress.h +++ b/storage/xtradb/include/dict0pagecompress.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (C) 2013 SkySQL Ab. All Rights Reserved. +Copyright (C) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -56,17 +56,6 @@ dict_table_page_compression_level( const dict_table_t* table) /*!< in: table */ __attribute__((const)); -/********************************************************************//** -Verify that dictionary flags match tablespace flags -@return true if flags match, false if not */ -UNIV_INLINE -ibool -dict_tf_verify_flags( -/*=================*/ - ulint table_flags, /*!< in: dict_table_t::flags */ - ulint fsp_flags) /*!< in: fil_space_t::flags */ - __attribute__((const)); - /********************************************************************//** Extract the atomic writes flag from table flags. @return true if atomic writes are used, false if not used */ diff --git a/storage/xtradb/include/dict0pagecompress.ic b/storage/xtradb/include/dict0pagecompress.ic index 811976434a8..13c2b46c51c 100644 --- a/storage/xtradb/include/dict0pagecompress.ic +++ b/storage/xtradb/include/dict0pagecompress.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (C) 2013 SkySQL Ab. All Rights Reserved. +Copyright (C) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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,92 +24,6 @@ page compression and atomic writes information to dictionary. Created 11/12/2013 Jan Lindström jan.lindstrom@skysql.com ***********************************************************************/ -/********************************************************************//** -Verify that dictionary flags match tablespace flags -@return true if flags match, false if not */ -UNIV_INLINE -ibool -dict_tf_verify_flags( -/*=================*/ - ulint table_flags, /*!< in: dict_table_t::flags */ - ulint fsp_flags) /*!< in: fil_space_t::flags */ -{ - ulint table_unused = DICT_TF_GET_UNUSED(table_flags); - ulint compact = DICT_TF_GET_COMPACT(table_flags); - ulint ssize = DICT_TF_GET_ZIP_SSIZE(table_flags); - ulint atomic_blobs = DICT_TF_HAS_ATOMIC_BLOBS(table_flags); - ulint data_dir = DICT_TF_HAS_DATA_DIR(table_flags); - ulint page_compression = DICT_TF_GET_PAGE_COMPRESSION(table_flags); - ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(table_flags); - ulint atomic_writes = DICT_TF_GET_ATOMIC_WRITES(table_flags); - ulint post_antelope = FSP_FLAGS_GET_POST_ANTELOPE(fsp_flags); - ulint zip_ssize = FSP_FLAGS_GET_ZIP_SSIZE(fsp_flags); - ulint fsp_atomic_blobs = FSP_FLAGS_HAS_ATOMIC_BLOBS(fsp_flags); - ulint page_ssize = FSP_FLAGS_GET_PAGE_SSIZE(fsp_flags); - ulint fsp_unused = FSP_FLAGS_GET_UNUSED(fsp_flags); - ulint fsp_page_compression = FSP_FLAGS_GET_PAGE_COMPRESSION(fsp_flags); - ulint fsp_page_compression_level = FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL(fsp_flags); - ulint fsp_atomic_writes = FSP_FLAGS_GET_ATOMIC_WRITES(fsp_flags); - - DBUG_EXECUTE_IF("dict_tf_verify_flags_failure", - return(ULINT_UNDEFINED);); - - ut_a(!table_unused); - ut_a(!fsp_unused); - ut_a(page_ssize == 0 || page_ssize != 0); /* silence compiler */ - ut_a(compact == 0 || compact == 1); /* silence compiler */ - ut_a(data_dir == 0 || data_dir == 1); /* silence compiler */ - ut_a(post_antelope == 0 || post_antelope == 1); /* silence compiler */ - - if (ssize != zip_ssize) { - fprintf(stderr, - "InnoDB: Error: table flags has zip_ssize %ld" - " in the data dictionary\n" - "InnoDB: but the flags in file has zip_ssize %ld\n", - ssize, zip_ssize); - return (FALSE); - } - if (atomic_blobs != fsp_atomic_blobs) { - fprintf(stderr, - "InnoDB: Error: table flags has atomic_blobs %ld" - " in the data dictionary\n" - "InnoDB: but the flags in file has atomic_blobs %ld\n", - atomic_blobs, fsp_atomic_blobs); - - return (FALSE); - } - if (page_compression != fsp_page_compression) { - fprintf(stderr, - "InnoDB: Error: table flags has page_compression %ld" - " in the data dictionary\n" - "InnoDB: but the flags in file ahas page_compression %ld\n", - page_compression, fsp_page_compression); - - return (FALSE); - } - if (page_compression_level != fsp_page_compression_level) { - fprintf(stderr, - "InnoDB: Error: table flags has page_compression_level %ld" - " in the data dictionary\n" - "InnoDB: but the flags in file has page_compression_level %ld\n", - page_compression_level, fsp_page_compression_level); - - return (FALSE); - } - - if (atomic_writes != fsp_atomic_writes) { - fprintf(stderr, - "InnoDB: Error: table flags has atomic writes %ld" - " in the data dictionary\n" - "InnoDB: but the flags in file has atomic_writes %ld\n", - atomic_writes, fsp_atomic_writes); - - return (FALSE); - } - - return(TRUE); -} - /********************************************************************//** Extract the page compression level from dict_table_t::flags. These flags are in memory, so assert that they are valid. diff --git a/storage/xtradb/include/fil0crypt.h b/storage/xtradb/include/fil0crypt.h index 9a35f6591e7..42cdafde4d0 100644 --- a/storage/xtradb/include/fil0crypt.h +++ b/storage/xtradb/include/fil0crypt.h @@ -1,6 +1,6 @@ /***************************************************************************** Copyright (C) 2013, 2015, Google Inc. All Rights Reserved. -Copyright (c) 2015, 2016, MariaDB Corporation. +Copyright (c) 2015, 2017, MariaDB Corporation. This 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,8 @@ Created 04/01/2015 Jan Lindström #ifndef fil0crypt_h #define fil0crypt_h +#include "os0sync.h" + /** * Magic pattern in start of crypt data on page 0 */ @@ -45,6 +47,8 @@ typedef enum { FIL_SPACE_ENCRYPTION_OFF = 2 /* Tablespace is not encrypted */ } fil_encryption_t; +extern os_event_t fil_crypt_threads_event; + /** * CRYPT_SCHEME_UNENCRYPTED * @@ -391,12 +395,6 @@ fil_crypt_set_thread_cnt( /*=====================*/ uint new_cnt); /*!< in: requested #threads */ -/********************************************************************* -End threads for key rotation */ -UNIV_INTERN -void -fil_crypt_threads_end(); - /********************************************************************* Cleanup resources for threads for key rotation */ UNIV_INTERN diff --git a/storage/xtradb/include/fil0fil.h b/storage/xtradb/include/fil0fil.h index 38cc09bced3..41e38794ea9 100644 --- a/storage/xtradb/include/fil0fil.h +++ b/storage/xtradb/include/fil0fil.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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,6 @@ Created 10/25/1995 Heikki Tuuri // Forward declaration struct trx_t; -struct fil_space_t; typedef std::list space_name_list_t; @@ -264,10 +263,6 @@ struct fil_space_t { an insert buffer merge request for a page because it actually was for the previous incarnation of the space */ - ibool mark; /*!< this is set to TRUE at database startup if - the space corresponds to a table in the InnoDB - data dictionary; so we can print a warning of - orphaned tablespaces */ ibool stop_ios;/*!< TRUE if we want to rename the .ibd file of tablespace and want to stop temporarily posting of new i/o @@ -296,7 +291,8 @@ struct fil_space_t { /*!< recovered tablespace size in pages; 0 if no size change was read from the redo log, or if the size change was implemented */ - ulint flags; /*!< tablespace flags; see + ulint flags; /*!< FSP_SPACE_FLAGS and FSP_FLAGS_MEM_ flags; + see fsp0fsp.h, fsp_flags_is_valid(), fsp_flags_get_zip_size() */ ulint n_reserved_extents; @@ -449,6 +445,7 @@ fil_node_create( ibool is_raw) /*!< in: TRUE if a raw device or a raw disk partition */ MY_ATTRIBUTE((nonnull, warn_unused_result)); + #ifdef UNIV_LOG_ARCHIVE /****************************************************************//** Drops files from the start of a file space, so that its size is cut by @@ -620,7 +617,7 @@ fil_read_first_page( ibool one_read_already, /*!< in: TRUE if min and max parameters below already contain sensible data */ - ulint* flags, /*!< out: tablespace flags */ + ulint* flags, /*!< out: FSP_SPACE_FLAGS */ ulint* space_id, /*!< out: tablespace ID */ lsn_t* min_flushed_lsn, /*!< out: min of flushed lsn values in data files */ @@ -832,6 +829,14 @@ fil_create_new_single_table_tablespace( ulint key_id) /*!< in: encryption key_id */ __attribute__((nonnull, warn_unused_result)); #ifndef UNIV_HOTBACKUP +/** Try to adjust FSP_SPACE_FLAGS if they differ from the expectations. +(Typically when upgrading from MariaDB 10.1.0..10.1.20.) +@param[in] space_id tablespace ID +@param[in] flags desired tablespace flags */ +UNIV_INTERN +void +fsp_flags_try_adjust(ulint space_id, ulint flags); + /********************************************************************//** Tries to open a single-table tablespace and optionally checks the space id is right in it. If does not succeed, prints an error message to the .err log. This @@ -860,7 +865,7 @@ fil_open_single_table_tablespace( bool validate, /*!< in: Do we validate tablespace? */ bool fix_dict, /*!< in: Can we fix the dictionary? */ ulint id, /*!< in: space id */ - ulint flags, /*!< in: tablespace flags */ + ulint flags, /*!< in: expected FSP_SPACE_FLAGS */ const char* tablename, /*!< in: table name in the databasename/tablename format */ const char* filepath, /*!< in: tablespace filepath */ @@ -901,25 +906,18 @@ fil_tablespace_exists_in_mem( /*=========================*/ ulint id); /*!< in: space id */ #ifndef UNIV_HOTBACKUP -/*******************************************************************//** -Returns TRUE if a matching tablespace exists in the InnoDB tablespace memory +/** Check if a matching tablespace exists in the InnoDB tablespace memory cache. Note that if we have not done a crash recovery at the database startup, there may be many tablespaces which are not yet in the memory cache. -@return TRUE if a matching tablespace exists in the memory cache */ +@return whether a matching tablespace exists in the memory cache */ UNIV_INTERN -ibool +bool fil_space_for_table_exists_in_mem( /*==============================*/ ulint id, /*!< in: space id */ const char* name, /*!< in: table name in the standard 'databasename/tablename' format */ - ibool mark_space, /*!< in: in crash recovery, at database - startup we mark all spaces which have - an associated table in the InnoDB - data dictionary, so that - we can print a warning about orphaned - tablespaces */ - ibool print_error_if_does_not_exist, + bool print_error_if_does_not_exist, /*!< in: print detailed error information to the .err log if a matching tablespace is not found from @@ -927,7 +925,8 @@ fil_space_for_table_exists_in_mem( bool adjust_space, /*!< in: whether to adjust space id when find table space mismatch */ mem_heap_t* heap, /*!< in: heap memory */ - table_id_t table_id); /*!< in: table id */ + table_id_t table_id, /*!< in: table id */ + ulint table_flags); /*!< in: table flags */ #else /* !UNIV_HOTBACKUP */ /********************************************************************//** Extends all tablespaces to the size stored in the space header. During the diff --git a/storage/xtradb/include/fil0pagecompress.h b/storage/xtradb/include/fil0pagecompress.h index 10db59fb218..1fe5cb66bf6 100644 --- a/storage/xtradb/include/fil0pagecompress.h +++ b/storage/xtradb/include/fil0pagecompress.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (C) 2013, 2016 MariaDB Corporation. All Rights Reserved. +Copyright (C) 2013, 2017 MariaDB Corporation. All Rights Reserved. This 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 @@ -44,20 +44,11 @@ Returns the page compression flag of the space, or false if the space is not compressed. The tablespace must be cached in the memory cache. @return true if page compressed, false if not or space not found */ UNIV_INLINE -ibool +bool fil_space_is_page_compressed( /*=========================*/ ulint id); /*!< in: space id */ /*******************************************************************//** -Returns the page compression flag of the space, or false if the space -is not compressed. The tablespace must be cached in the memory cache. -@return true if page compressed, false if not or space not found */ -UNIV_INTERN -ibool -fil_space_get_page_compressed( -/*=========================*/ - fil_space_t* space); /*!< in: space id */ -/*******************************************************************//** Returns the atomic writes flag of the space, or false if the space is not using atomic writes. The tablespace must be cached in the memory cache. @return atomic write table option value */ diff --git a/storage/xtradb/include/fsp0fsp.h b/storage/xtradb/include/fsp0fsp.h index 551a8c9ef97..93f98eb0b0b 100644 --- a/storage/xtradb/include/fsp0fsp.h +++ b/storage/xtradb/include/fsp0fsp.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -51,28 +51,67 @@ to the two Barracuda row formats COMPRESSED and DYNAMIC. */ #define FSP_FLAGS_WIDTH_ATOMIC_BLOBS 1 /** Number of flag bits used to indicate the tablespace page size */ #define FSP_FLAGS_WIDTH_PAGE_SSIZE 4 -/** Width of the DATA_DIR flag. This flag indicates that the tablespace -is found in a remote location, not the default data directory. */ -#define FSP_FLAGS_WIDTH_DATA_DIR 1 -/** Number of flag bits used to indicate the page compression and compression level */ -#define FSP_FLAGS_WIDTH_PAGE_COMPRESSION 1 -#define FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL 4 +/** Number of reserved bits */ +#define FSP_FLAGS_WIDTH_RESERVED 6 +/** Number of flag bits used to indicate the page compression */ +#define FSP_FLAGS_WIDTH_PAGE_COMPRESSION 1 -/** Number of flag bits used to indicate atomic writes for this tablespace */ -#define FSP_FLAGS_WIDTH_ATOMIC_WRITES 2 - -/** Width of all the currently known tablespace flags */ +/** Width of all the currently known persistent tablespace flags */ #define FSP_FLAGS_WIDTH (FSP_FLAGS_WIDTH_POST_ANTELOPE \ + FSP_FLAGS_WIDTH_ZIP_SSIZE \ + FSP_FLAGS_WIDTH_ATOMIC_BLOBS \ + FSP_FLAGS_WIDTH_PAGE_SSIZE \ - + FSP_FLAGS_WIDTH_DATA_DIR \ - + FSP_FLAGS_WIDTH_PAGE_COMPRESSION \ - + FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL \ - + FSP_FLAGS_WIDTH_ATOMIC_WRITES ) + + FSP_FLAGS_WIDTH_RESERVED \ + + FSP_FLAGS_WIDTH_PAGE_COMPRESSION) -/** A mask of all the known/used bits in tablespace flags */ -#define FSP_FLAGS_MASK (~(~0 << FSP_FLAGS_WIDTH)) +/** A mask of all the known/used bits in FSP_SPACE_FLAGS */ +#define FSP_FLAGS_MASK (~(~0U << FSP_FLAGS_WIDTH)) + +/* FSP_SPACE_FLAGS position and name in MySQL 5.6/MariaDB 10.0 or older +and MariaDB 10.1.20 or older MariaDB 10.1 and in MariaDB 10.1.21 +or newer. +MySQL 5.6 MariaDB 10.1.x MariaDB 10.1.21 +==================================================================== +Below flags in same offset +==================================================================== +0: POST_ANTELOPE 0:POST_ANTELOPE 0: POST_ANTELOPE +1..4: ZIP_SSIZE(0..5) 1..4:ZIP_SSIZE(0..5) 1..4: ZIP_SSIZE(0..5) +(NOTE: bit 4 is always 0) +5: ATOMIC_BLOBS 5:ATOMIC_BLOBS 5: ATOMIC_BLOBS +===================================================================== +Below note the order difference: +===================================================================== +6..9: PAGE_SSIZE(3..7) 6: COMPRESSION 6..9: PAGE_SSIZE(3..7) +10: DATA_DIR 7..10: COMP_LEVEL(0..9) 10: RESERVED (5.6 DATA_DIR) +===================================================================== +The flags below were in incorrect position in MariaDB 10.1, +or have been introduced in MySQL 5.7 or 8.0: +===================================================================== +11: UNUSED 11..12:ATOMIC_WRITES 11: RESERVED (5.7 SHARED) + 12: RESERVED (5.7 TEMPORARY) + 13..15:PAGE_SSIZE(3..7) 13: RESERVED (5.7 ENCRYPTION) + 14: RESERVED (8.0 SDI) + 15: RESERVED + 16: PAGE_SSIZE_msb(0) 16: COMPRESSION + 17: DATA_DIR 17: UNUSED + 18: UNUSED +===================================================================== +The flags below only exist in fil_space_t::flags, not in FSP_SPACE_FLAGS: +===================================================================== + 25: DATA_DIR + 26..27: ATOMIC_WRITES + 28..31: COMPRESSION_LEVEL +*/ + +/** A mask of the memory-only flags in fil_space_t::flags */ +#define FSP_FLAGS_MEM_MASK (~0U << FSP_FLAGS_MEM_DATA_DIR) + +/** Zero relative shift position of the DATA_DIR flag */ +#define FSP_FLAGS_MEM_DATA_DIR 25 +/** Zero relative shift position of the ATOMIC_WRITES field */ +#define FSP_FLAGS_MEM_ATOMIC_WRITES 26 +/** Zero relative shift position of the COMPRESSION_LEVEL field */ +#define FSP_FLAGS_MEM_COMPRESSION_LEVEL 28 /** Zero relative shift position of the POST_ANTELOPE field */ #define FSP_FLAGS_POS_POST_ANTELOPE 0 @@ -82,29 +121,16 @@ is found in a remote location, not the default data directory. */ /** Zero relative shift position of the ATOMIC_BLOBS field */ #define FSP_FLAGS_POS_ATOMIC_BLOBS (FSP_FLAGS_POS_ZIP_SSIZE \ + FSP_FLAGS_WIDTH_ZIP_SSIZE) -/** Note that these need to be before the page size to be compatible with -dictionary */ +/** Zero relative shift position of the start of the PAGE_SSIZE bits */ +#define FSP_FLAGS_POS_PAGE_SSIZE (FSP_FLAGS_POS_ATOMIC_BLOBS \ + + FSP_FLAGS_WIDTH_ATOMIC_BLOBS) +/** Zero relative shift position of the start of the RESERVED bits +these are only used in MySQL 5.7 and used for compatibility. */ +#define FSP_FLAGS_POS_RESERVED (FSP_FLAGS_POS_PAGE_SSIZE \ + + FSP_FLAGS_WIDTH_PAGE_SSIZE) /** Zero relative shift position of the PAGE_COMPRESSION field */ -#define FSP_FLAGS_POS_PAGE_COMPRESSION (FSP_FLAGS_POS_ATOMIC_BLOBS \ - + FSP_FLAGS_WIDTH_ATOMIC_BLOBS) -/** Zero relative shift position of the PAGE_COMPRESSION_LEVEL field */ -#define FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL (FSP_FLAGS_POS_PAGE_COMPRESSION \ - + FSP_FLAGS_WIDTH_PAGE_COMPRESSION) -/** Zero relative shift position of the ATOMIC_WRITES field */ -#define FSP_FLAGS_POS_ATOMIC_WRITES (FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL \ - + FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL) -/** Zero relative shift position of the PAGE_SSIZE field */ -#define FSP_FLAGS_POS_PAGE_SSIZE (FSP_FLAGS_POS_ATOMIC_WRITES \ - + FSP_FLAGS_WIDTH_ATOMIC_WRITES) -/** Zero relative shift position of the start of the DATA DIR bits */ -#define FSP_FLAGS_POS_DATA_DIR (FSP_FLAGS_POS_PAGE_SSIZE \ - + FSP_FLAGS_WIDTH_PAGE_SSIZE) -#define FSP_FLAGS_POS_DATA_DIR_ORACLE (FSP_FLAGS_POS_ATOMIC_BLOBS \ - + FSP_FLAGS_WIDTH_ATOMIC_BLOBS \ - + FSP_FLAGS_WIDTH_PAGE_SSIZE) -/** Zero relative shift position of the start of the UNUSED bits */ -#define FSP_FLAGS_POS_UNUSED (FSP_FLAGS_POS_DATA_DIR\ - + FSP_FLAGS_WIDTH_DATA_DIR) +#define FSP_FLAGS_POS_PAGE_COMPRESSION (FSP_FLAGS_POS_RESERVED \ + + FSP_FLAGS_WIDTH_RESERVED) /** Bit mask of the POST_ANTELOPE field */ #define FSP_FLAGS_MASK_POST_ANTELOPE \ @@ -122,26 +148,23 @@ dictionary */ #define FSP_FLAGS_MASK_PAGE_SSIZE \ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_SSIZE)) \ << FSP_FLAGS_POS_PAGE_SSIZE) -/** Bit mask of the DATA_DIR field */ -#define FSP_FLAGS_MASK_DATA_DIR \ - ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR)) \ - << FSP_FLAGS_POS_DATA_DIR) -/** Bit mask of the DATA_DIR field */ -#define FSP_FLAGS_MASK_DATA_DIR_ORACLE \ - ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR)) \ - << FSP_FLAGS_POS_DATA_DIR_ORACLE) +/** Bit mask of the RESERVED1 field */ +#define FSP_FLAGS_MASK_RESERVED \ + ((~(~0U << FSP_FLAGS_WIDTH_RESERVED)) \ + << FSP_FLAGS_POS_RESERVED) /** Bit mask of the PAGE_COMPRESSION field */ -#define FSP_FLAGS_MASK_PAGE_COMPRESSION \ +#define FSP_FLAGS_MASK_PAGE_COMPRESSION \ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_COMPRESSION)) \ << FSP_FLAGS_POS_PAGE_COMPRESSION) -/** Bit mask of the PAGE_COMPRESSION_LEVEL field */ -#define FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL \ - ((~(~0U << FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL)) \ - << FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL) -/** Bit mask of the ATOMIC_WRITES field */ -#define FSP_FLAGS_MASK_ATOMIC_WRITES \ - ((~(~0U << FSP_FLAGS_WIDTH_ATOMIC_WRITES)) \ - << FSP_FLAGS_POS_ATOMIC_WRITES) + +/** Bit mask of the in-memory ATOMIC_WRITES field */ +#define FSP_FLAGS_MASK_MEM_ATOMIC_WRITES \ + (3U << FSP_FLAGS_MEM_ATOMIC_WRITES) + +/** Bit mask of the in-memory COMPRESSION_LEVEL field */ +#define FSP_FLAGS_MASK_MEM_COMPRESSION_LEVEL \ + (15U << FSP_FLAGS_MEM_COMPRESSION_LEVEL) + /** Return the value of the POST_ANTELOPE field */ #define FSP_FLAGS_GET_POST_ANTELOPE(flags) \ ((flags & FSP_FLAGS_MASK_POST_ANTELOPE) \ @@ -158,48 +181,78 @@ dictionary */ #define FSP_FLAGS_GET_PAGE_SSIZE(flags) \ ((flags & FSP_FLAGS_MASK_PAGE_SSIZE) \ >> FSP_FLAGS_POS_PAGE_SSIZE) -/** Return the value of the DATA_DIR field */ -#define FSP_FLAGS_HAS_DATA_DIR(flags) \ - ((flags & FSP_FLAGS_MASK_DATA_DIR) \ - >> FSP_FLAGS_POS_DATA_DIR) -#define FSP_FLAGS_HAS_DATA_DIR_ORACLE(flags) \ - ((flags & FSP_FLAGS_MASK_DATA_DIR_ORACLE) \ - >> FSP_FLAGS_POS_DATA_DIR_ORACLE) +/** @return the RESERVED flags */ +#define FSP_FLAGS_GET_RESERVED(flags) \ + ((flags & FSP_FLAGS_MASK_RESERVED) \ + >> FSP_FLAGS_POS_RESERVED) +/** @return the PAGE_COMPRESSION flag */ +#define FSP_FLAGS_HAS_PAGE_COMPRESSION(flags) \ + ((flags & FSP_FLAGS_MASK_PAGE_COMPRESSION) \ + >> FSP_FLAGS_POS_PAGE_COMPRESSION) + /** Return the contents of the UNUSED bits */ #define FSP_FLAGS_GET_UNUSED(flags) \ (flags >> FSP_FLAGS_POS_UNUSED) -/** Return the value of the PAGE_COMPRESSION field */ -#define FSP_FLAGS_GET_PAGE_COMPRESSION(flags) \ - ((flags & FSP_FLAGS_MASK_PAGE_COMPRESSION) \ - >> FSP_FLAGS_POS_PAGE_COMPRESSION) -/** Return the value of the PAGE_COMPRESSION_LEVEL field */ + +/** @return the PAGE_SSIZE flags for the current innodb_page_size */ +#define FSP_FLAGS_PAGE_SSIZE() \ + ((UNIV_PAGE_SIZE == UNIV_PAGE_SIZE_ORIG) ? \ + 0 : (UNIV_PAGE_SIZE_SHIFT - UNIV_ZIP_SIZE_SHIFT_MIN + 1) \ + << FSP_FLAGS_POS_PAGE_SSIZE) + +/** @return the value of the DATA_DIR field */ +#define FSP_FLAGS_HAS_DATA_DIR(flags) \ + (flags & 1U << FSP_FLAGS_MEM_DATA_DIR) +/** @return the COMPRESSION_LEVEL field */ #define FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL(flags) \ - ((flags & FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL) \ - >> FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL) -/** Return the value of the ATOMIC_WRITES field */ -#define FSP_FLAGS_GET_ATOMIC_WRITES(flags) \ - ((flags & FSP_FLAGS_MASK_ATOMIC_WRITES) \ - >> FSP_FLAGS_POS_ATOMIC_WRITES) + ((flags & FSP_FLAGS_MASK_MEM_COMPRESSION_LEVEL) \ + >> FSP_FLAGS_MEM_COMPRESSION_LEVEL) +/** @return the ATOMIC_WRITES field */ +#define FSP_FLAGS_GET_ATOMIC_WRITES(flags) \ + ((flags & FSP_FLAGS_MASK_MEM_ATOMIC_WRITES) \ + >> FSP_FLAGS_MEM_ATOMIC_WRITES) -/** Set a PAGE_SSIZE into the correct bits in a given -tablespace flags. */ -#define FSP_FLAGS_SET_PAGE_SSIZE(flags, ssize) \ - (flags | (ssize << FSP_FLAGS_POS_PAGE_SSIZE)) +/* Compatibility macros for MariaDB 10.1.20 or older 10.1 see +table above. */ +/** Zero relative shift position of the PAGE_COMPRESSION field */ +#define FSP_FLAGS_POS_PAGE_COMPRESSION_MARIADB101 \ + (FSP_FLAGS_POS_ATOMIC_BLOBS \ + + FSP_FLAGS_WIDTH_ATOMIC_BLOBS) +/** Zero relative shift position of the PAGE_COMPRESSION_LEVEL field */ +#define FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL_MARIADB101 \ + (FSP_FLAGS_POS_PAGE_COMPRESSION_MARIADB101 + 1) +/** Zero relative shift position of the ATOMIC_WRITES field */ +#define FSP_FLAGS_POS_ATOMIC_WRITES_MARIADB101 \ + (FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL_MARIADB101 + 4) +/** Zero relative shift position of the PAGE_SSIZE field */ +#define FSP_FLAGS_POS_PAGE_SSIZE_MARIADB101 \ + (FSP_FLAGS_POS_ATOMIC_WRITES_MARIADB101 + 2) -/** Set a PAGE_COMPRESSION into the correct bits in a given -tablespace flags. */ -#define FSP_FLAGS_SET_PAGE_COMPRESSION(flags, compression) \ - (flags | (compression << FSP_FLAGS_POS_PAGE_COMPRESSION)) +/** Bit mask of the PAGE_COMPRESSION field */ +#define FSP_FLAGS_MASK_PAGE_COMPRESSION_MARIADB101 \ + (1U << FSP_FLAGS_POS_PAGE_COMPRESSION_MARIADB101) +/** Bit mask of the PAGE_COMPRESSION_LEVEL field */ +#define FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL_MARIADB101 \ + (15U << FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL_MARIADB101) +/** Bit mask of the ATOMIC_WRITES field */ +#define FSP_FLAGS_MASK_ATOMIC_WRITES_MARIADB101 \ + (3U << FSP_FLAGS_POS_ATOMIC_WRITES_MARIADB101) +/** Bit mask of the PAGE_SSIZE field */ +#define FSP_FLAGS_MASK_PAGE_SSIZE_MARIADB101 \ + (15U << FSP_FLAGS_POS_PAGE_SSIZE_MARIADB101) -/** Set a PAGE_COMPRESSION_LEVEL into the correct bits in a given -tablespace flags. */ -#define FSP_FLAGS_SET_PAGE_COMPRESSION_LEVEL(flags, level) \ - (flags | (level << FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL)) - -/** Set a ATOMIC_WRITES into the correct bits in a given -tablespace flags. */ -#define FSP_FLAGS_SET_ATOMIC_WRITES(flags, atomics) \ - (flags | (atomics << FSP_FLAGS_POS_ATOMIC_WRITES)) +/** Return the value of the PAGE_COMPRESSION field */ +#define FSP_FLAGS_GET_PAGE_COMPRESSION_MARIADB101(flags) \ + ((flags & FSP_FLAGS_MASK_PAGE_COMPRESSION_MARIADB101) \ + >> FSP_FLAGS_POS_PAGE_COMPRESSION_MARIADB101) +/** Return the value of the PAGE_COMPRESSION_LEVEL field */ +#define FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL_MARIADB101(flags) \ + ((flags & FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL_MARIADB101) \ + >> FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL_MARIADB101) +/** Return the value of the PAGE_SSIZE field */ +#define FSP_FLAGS_GET_PAGE_SSIZE_MARIADB101(flags) \ + ((flags & FSP_FLAGS_MASK_PAGE_SSIZE_MARIADB101) \ + >> FSP_FLAGS_POS_PAGE_SSIZE_MARIADB101) /* @} */ @@ -733,19 +786,193 @@ fseg_print( mtr_t* mtr); /*!< in/out: mini-transaction */ #endif /* UNIV_BTR_PRINT */ -/********************************************************************//** -Validate and return the tablespace flags, which are stored in the -tablespace header at offset FSP_SPACE_FLAGS. They should be 0 for -ROW_FORMAT=COMPACT and ROW_FORMAT=REDUNDANT. The newer row formats, -COMPRESSED and DYNAMIC, use a file format > Antelope so they should -have a file format number plus the DICT_TF_COMPACT bit set. -@return true if check ok */ +/** Validate the tablespace flags, which are stored in the +tablespace header at offset FSP_SPACE_FLAGS. +@param[in] flags the contents of FSP_SPACE_FLAGS +@return whether the flags are correct (not in the buggy 10.1) format */ +MY_ATTRIBUTE((warn_unused_result, const)) UNIV_INLINE bool -fsp_flags_is_valid( -/*===============*/ - ulint flags) /*!< in: tablespace flags */ - MY_ATTRIBUTE((warn_unused_result, const)); +fsp_flags_is_valid(ulint flags) +{ + DBUG_EXECUTE_IF("fsp_flags_is_valid_failure", + return(false);); + if (flags == 0) { + return(true); + } + if (flags & ~FSP_FLAGS_MASK) { + return(false); + } + if ((flags & (FSP_FLAGS_MASK_POST_ANTELOPE | FSP_FLAGS_MASK_ATOMIC_BLOBS)) + == FSP_FLAGS_MASK_ATOMIC_BLOBS) { + /* If the "atomic blobs" flag (indicating + ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED) flag + is set, then the "post Antelope" (ROW_FORMAT!=REDUNDANT) flag + must also be set. */ + return(false); + } + /* Bits 10..14 should be 0b0000d where d is the DATA_DIR flag + of MySQL 5.6 and MariaDB 10.0, which we ignore. + In the buggy FSP_SPACE_FLAGS written by MariaDB 10.1.0 to 10.1.20, + bits 10..14 would be nonzero 0bsssaa where sss is + nonzero PAGE_SSIZE (3, 4, 6, or 7) + and aa is ATOMIC_WRITES (not 0b11). */ + if (FSP_FLAGS_GET_RESERVED(flags) & ~1) { + return(false); + } + + const ulint ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags); + if (ssize == 1 || ssize == 2 || ssize == 5 || ssize & 8) { + /* the page_size is not between 4k and 64k; + 16k should be encoded as 0, not 5 */ + return(false); + } + const ulint zssize = FSP_FLAGS_GET_ZIP_SSIZE(flags); + if (zssize == 0) { + /* not ROW_FORMAT=COMPRESSED */ + } else if (zssize > (ssize ? ssize : 5)) { + /* invalid KEY_BLOCK_SIZE */ + return(false); + } else if (~flags & (FSP_FLAGS_MASK_POST_ANTELOPE + | FSP_FLAGS_MASK_ATOMIC_BLOBS)) { + /* both these flags should be set for + ROW_FORMAT=COMPRESSED */ + return(false); + } + + return(true); +} + +/** Convert FSP_SPACE_FLAGS from the buggy MariaDB 10.1.0..10.1.20 format. +@param[in] flags the contents of FSP_SPACE_FLAGS +@return the flags corrected from the buggy MariaDB 10.1 format +@retval ULINT_UNDEFINED if the flags are not in the buggy 10.1 format */ +MY_ATTRIBUTE((warn_unused_result, const)) +UNIV_INLINE +ulint +fsp_flags_convert_from_101(ulint flags) +{ + DBUG_EXECUTE_IF("fsp_flags_is_valid_failure", + return(ULINT_UNDEFINED);); + if (flags == 0) { + return(flags); + } + + if (flags >> 18) { + /* The most significant FSP_SPACE_FLAGS bit that was ever set + by MariaDB 10.1.0 to 10.1.20 was bit 17 (misplaced DATA_DIR flag). + The flags must be less than 1<<18 in order to be valid. */ + return(ULINT_UNDEFINED); + } + + if ((flags & (FSP_FLAGS_MASK_POST_ANTELOPE | FSP_FLAGS_MASK_ATOMIC_BLOBS)) + == FSP_FLAGS_MASK_ATOMIC_BLOBS) { + /* If the "atomic blobs" flag (indicating + ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED) flag + is set, then the "post Antelope" (ROW_FORMAT!=REDUNDANT) flag + must also be set. */ + return(ULINT_UNDEFINED); + } + + /* Bits 6..10 denote compression in MariaDB 10.1.0 to 10.1.20. + They must be either 0b00000 or 0b00011 through 0b10011. + In correct versions, these bits would be + 0bd0sss where d is the DATA_DIR flag (garbage bit) and + sss is the PAGE_SSIZE (3, 4, 6, or 7). + + NOTE: MariaDB 10.1.0 to 10.1.20 can misinterpret + uncompressed data files with innodb_page_size=4k or 64k as + compressed innodb_page_size=16k files. Below is an exhaustive + state space analysis. + + -0by1zzz: impossible (the bit 4 must be clean; see above) + -0b101xx: DATA_DIR, innodb_page_size>4k: invalid (COMPRESSION_LEVEL>9) + +0bx0011: innodb_page_size=4k: + !!! Misinterpreted as COMPRESSION_LEVEL=9 or 1, COMPRESSION=1. + -0bx0010: impossible, because sss must be 0b011 or 0b1xx + -0bx0001: impossible, because sss must be 0b011 or 0b1xx + -0b10000: DATA_DIR, innodb_page_size=16: + invalid (COMPRESSION_LEVEL=8 but COMPRESSION=0) + +0b00111: no DATA_DIR, innodb_page_size=64k: + !!! Misinterpreted as COMPRESSION_LEVEL=3, COMPRESSION=1. + -0b00101: impossible, because sss must be 0 for 16k, not 0b101 + -0b001x0: no DATA_DIR, innodb_page_size=32k or 8k: + invalid (COMPRESSION_LEVEL=3 but COMPRESSION=0) + +0b00000: innodb_page_size=16k (looks like COMPRESSION=0) + ??? Could actually be compressed; see PAGE_SSIZE below */ + const ulint level = FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL_MARIADB101( + flags); + if (FSP_FLAGS_GET_PAGE_COMPRESSION_MARIADB101(flags) != (level != 0) + || level > 9) { + /* The compression flags are not in the buggy MariaDB + 10.1 format. */ + return(ULINT_UNDEFINED); + } + if (!(~flags & FSP_FLAGS_MASK_ATOMIC_WRITES_MARIADB101)) { + /* The ATOMIC_WRITES flags cannot be 0b11. + (The bits 11..12 should actually never be 0b11, + because in MySQL they would be SHARED|TEMPORARY.) */ + return(ULINT_UNDEFINED); + } + + /* Bits 13..16 are the wrong position for PAGE_SSIZE, and they + should contain one of the values 3,4,6,7, that is, be of the form + 0b0011 or 0b01xx (except 0b0110). + In correct versions, these bits should be 0bc0se + where c is the MariaDB COMPRESSED flag + and e is the MySQL 5.7 ENCRYPTION flag + and s is the MySQL 8.0 SDI flag. MariaDB can only support s=0, e=0. + + Compressed innodb_page_size=16k tables with correct FSP_SPACE_FLAGS + will be properly rejected by older MariaDB 10.1.x because they + would read as PAGE_SSIZE>=8 which is not valid. */ + + const ulint ssize = FSP_FLAGS_GET_PAGE_SSIZE_MARIADB101(flags); + if (ssize == 1 || ssize == 2 || ssize == 5 || ssize & 8) { + /* the page_size is not between 4k and 64k; + 16k should be encoded as 0, not 5 */ + return(ULINT_UNDEFINED); + } + const ulint zssize = FSP_FLAGS_GET_ZIP_SSIZE(flags); + if (zssize == 0) { + /* not ROW_FORMAT=COMPRESSED */ + } else if (zssize > (ssize ? ssize : 5)) { + /* invalid KEY_BLOCK_SIZE */ + return(ULINT_UNDEFINED); + } else if (~flags & (FSP_FLAGS_MASK_POST_ANTELOPE + | FSP_FLAGS_MASK_ATOMIC_BLOBS)) { + /* both these flags should be set for + ROW_FORMAT=COMPRESSED */ + return(ULINT_UNDEFINED); + } + + flags = ((flags & 0x3f) | ssize << FSP_FLAGS_POS_PAGE_SSIZE + | FSP_FLAGS_GET_PAGE_COMPRESSION_MARIADB101(flags) + << FSP_FLAGS_POS_PAGE_COMPRESSION); + ut_ad(fsp_flags_is_valid(flags)); + return(flags); +} + +/** Compare tablespace flags. +@param[in] expected expected flags from dict_tf_to_fsp_flags() +@param[in] actual flags read from FSP_SPACE_FLAGS +@return whether the flags match */ +MY_ATTRIBUTE((warn_unused_result)) +UNIV_INLINE +bool +fsp_flags_match(ulint expected, ulint actual) +{ + expected &= ~FSP_FLAGS_MEM_MASK; + ut_ad(fsp_flags_is_valid(expected)); + + if (actual == expected) { + return(true); + } + + actual = fsp_flags_convert_from_101(actual); + return(actual == expected); +} + /********************************************************************//** Determine if the tablespace is compressed from dict_table_t::flags. @return TRUE if compressed, FALSE if not compressed */ diff --git a/storage/xtradb/include/fsp0fsp.ic b/storage/xtradb/include/fsp0fsp.ic index ddcb87b0e57..ee4cb1f32c7 100644 --- a/storage/xtradb/include/fsp0fsp.ic +++ b/storage/xtradb/include/fsp0fsp.ic @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, SkySQL Ab. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. This 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,107 +46,6 @@ fsp_descr_page( return((page_no & (zip_size - 1)) == FSP_XDES_OFFSET); } -/********************************************************************//** -Validate and return the tablespace flags, which are stored in the -tablespace header at offset FSP_SPACE_FLAGS. They should be 0 for -ROW_FORMAT=COMPACT and ROW_FORMAT=REDUNDANT. The newer row formats, -COMPRESSED and DYNAMIC, use a file format > Antelope so they should -have a file format number plus the DICT_TF_COMPACT bit set. -@return true if check ok */ -UNIV_INLINE -bool -fsp_flags_is_valid( -/*===============*/ - ulint flags) /*!< in: tablespace flags */ -{ - ulint post_antelope = FSP_FLAGS_GET_POST_ANTELOPE(flags); - ulint zip_ssize = FSP_FLAGS_GET_ZIP_SSIZE(flags); - ulint atomic_blobs = FSP_FLAGS_HAS_ATOMIC_BLOBS(flags); - ulint page_ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags); - ulint unused = FSP_FLAGS_GET_UNUSED(flags); - ulint page_compression = FSP_FLAGS_GET_PAGE_COMPRESSION(flags); - ulint page_compression_level = FSP_FLAGS_GET_PAGE_COMPRESSION_LEVEL(flags); - ulint atomic_writes = FSP_FLAGS_GET_ATOMIC_WRITES(flags); - - DBUG_EXECUTE_IF("fsp_flags_is_valid_failure", return(false);); - - /* fsp_flags is zero unless atomic_blobs is set. */ - /* Make sure there are no bits that we do not know about. */ - if (unused != 0 || flags == 1) { - fprintf(stderr, "InnoDB: Error: Tablespace flags %lu corrupted unused %lu\n", - flags, unused); - return(false); - } else if (post_antelope) { - /* The Antelope row formats REDUNDANT and COMPACT did - not use tablespace flags, so this flag and the entire - 4-byte field is zero for Antelope row formats. */ - - if (!atomic_blobs) { - fprintf(stderr, "InnoDB: Error: Tablespace flags %lu corrupted atomic_blobs %lu\n", - flags, atomic_blobs); - return(false); - } - } - - if (!atomic_blobs) { - /* Barracuda row formats COMPRESSED and DYNAMIC build on - the page structure introduced for the COMPACT row format - by allowing long fields to be broken into prefix and - externally stored parts. */ - - if (post_antelope || zip_ssize != 0) { - fprintf(stderr, "InnoDB: Error: Tablespace flags %lu corrupted zip_ssize %lu atomic_blobs %lu\n", - flags, zip_ssize, atomic_blobs); - return(false); - } - - } else if (!post_antelope || zip_ssize > PAGE_ZIP_SSIZE_MAX) { - fprintf(stderr, "InnoDB: Error: Tablespace flags %lu corrupted zip_ssize %lu max %d\n", - flags, zip_ssize, PAGE_ZIP_SSIZE_MAX); - return(false); - } else if (page_ssize > UNIV_PAGE_SSIZE_MAX) { - - /* The page size field can be used for any row type, or it may - be zero for an original 16k page size. - Validate the page shift size is within allowed range. */ - - fprintf(stderr, "InnoDB: Error: Tablespace flags %lu corrupted page_ssize %lu max %lu\n", - flags, page_ssize, UNIV_PAGE_SSIZE_MAX); - return(false); - - } else if (UNIV_PAGE_SIZE != UNIV_PAGE_SIZE_ORIG && !page_ssize) { - fprintf(stderr, "InnoDB: Error: Tablespace flags %lu corrupted page_ssize %lu max %lu:%d\n", - flags, page_ssize, UNIV_PAGE_SIZE, UNIV_PAGE_SIZE_ORIG); - return(false); - } - -#if UNIV_FORMAT_MAX != UNIV_FORMAT_B -# error "UNIV_FORMAT_MAX != UNIV_FORMAT_B, Add more validations." -#endif - - /* Page compression level requires page compression and atomic blobs - to be set */ - if (page_compression_level || page_compression) { - if (!page_compression || !atomic_blobs) { - fprintf(stderr, "InnoDB: Error: Tablespace flags %lu corrupted page_compression %lu\n" - "InnoDB: Error: page_compression_level %lu atomic_blobs %lu\n", - flags, page_compression, page_compression_level, atomic_blobs); - return(false); - } - } - - if (atomic_writes > ATOMIC_WRITES_OFF) { - fprintf(stderr, "InnoDB: Error: Tablespace flags %lu corrupted atomic_writes %lu\n", - flags, atomic_writes); - return (false); - } - - /* The DATA_DIR field can be used for any row type so there is - nothing here to validate. */ - - return(true); -} - /********************************************************************//** Determine if the tablespace is compressed from dict_table_t::flags. @return TRUE if compressed, FALSE if not compressed */ @@ -191,10 +90,10 @@ UNIV_INLINE ulint fsp_flags_get_page_size( /*====================*/ - ulint flags) /*!< in: tablespace flags */ + ulint flags) /*!< in: tablespace flags */ { - ulint page_size = 0; - ulint ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags); + ulint page_size = 0; + ulint ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags); /* Convert from a 'log2 minus 9' to a page size in bytes. */ if (UNIV_UNLIKELY(ssize)) { @@ -211,50 +110,6 @@ fsp_flags_get_page_size( } #ifndef UNIV_INNOCHECKSUM - -/********************************************************************//** -Add the page size to the tablespace flags. -@return tablespace flags after page size is added */ -UNIV_INLINE -ulint -fsp_flags_set_page_size( -/*====================*/ - ulint flags, /*!< in: tablespace flags */ - ulint page_size) /*!< in: page size in bytes */ -{ - ulint ssize = 0; - ulint shift; - - /* Page size should be > UNIV_PAGE_SIZE_MIN */ - ut_ad(page_size >= UNIV_PAGE_SIZE_MIN); - ut_ad(page_size <= UNIV_PAGE_SIZE_MAX); - - if (page_size == UNIV_PAGE_SIZE_ORIG) { - ut_ad(0 == FSP_FLAGS_GET_PAGE_SSIZE(flags)); - return(flags); - } - - for (shift = UNIV_PAGE_SIZE_SHIFT_MAX; - shift >= UNIV_PAGE_SIZE_SHIFT_MIN; - shift--) { - ulint mask = (1 << shift); - if (page_size & mask) { - ut_ad(!(page_size & ~mask)); - ssize = shift - UNIV_ZIP_SIZE_SHIFT_MIN + 1; - break; - } - } - - ut_ad(ssize); - ut_ad(ssize <= UNIV_PAGE_SSIZE_MAX); - - flags = FSP_FLAGS_SET_PAGE_SSIZE(flags, ssize); - - ut_ad(fsp_flags_is_valid(flags)); - - return(flags); -} - /********************************************************************//** Calculates the descriptor index within a descriptor page. @return descriptor index */ diff --git a/storage/xtradb/include/fsp0pagecompress.h b/storage/xtradb/include/fsp0pagecompress.h index 5f943ee2b83..c623d11c326 100644 --- a/storage/xtradb/include/fsp0pagecompress.h +++ b/storage/xtradb/include/fsp0pagecompress.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (C) 2013, 2015, MariaDB Corporation. All Rights Reserved. +Copyright (C) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -47,15 +47,6 @@ fsp_header_get_compression_level( /*=============================*/ const page_t* page); /*!< in: first page of a tablespace */ -/********************************************************************//** -Determine if the tablespace is page compressed from dict_table_t::flags. -@return TRUE if page compressed, FALSE if not compressed */ -UNIV_INLINE -ibool -fsp_flags_is_page_compressed( -/*=========================*/ - ulint flags); /*!< in: tablespace flags */ - /********************************************************************//** Extract the page compression level from tablespace flags. A tablespace has only one physical page compression level diff --git a/storage/xtradb/include/fsp0pagecompress.ic b/storage/xtradb/include/fsp0pagecompress.ic index e879aa2c16e..48163277feb 100644 --- a/storage/xtradb/include/fsp0pagecompress.ic +++ b/storage/xtradb/include/fsp0pagecompress.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (C) 2013, 2015, MariaDB Corporation. All Rights Reserved. +Copyright (C) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -25,18 +25,6 @@ Created 11/12/2013 Jan Lindström jan.lindstrom@mariadb.com ***********************************************************************/ -/********************************************************************//** -Determine if the tablespace is page compressed from dict_table_t::flags. -@return TRUE if page compressed, FALSE if not page compressed */ -UNIV_INLINE -ibool -fsp_flags_is_page_compressed( -/*=========================*/ - ulint flags) /*!< in: tablespace flags */ -{ - return(FSP_FLAGS_GET_PAGE_COMPRESSION(flags)); -} - /********************************************************************//** Determine the tablespace is page compression level from dict_table_t::flags. @return page compression level or 0 if not compressed*/ @@ -125,21 +113,15 @@ Extract the page compression from space. @return true if space is page compressed, false if space is not found or space is not page compressed. */ UNIV_INLINE -ibool +bool fil_space_is_page_compressed( /*=========================*/ ulint id) /*!< in: space id */ { - ulint flags; + ulint flags = fil_space_get_flags(id); - flags = fil_space_get_flags(id); - - if (flags && flags != ULINT_UNDEFINED) { - - return(fsp_flags_is_page_compressed(flags)); - } - - return(0); + return(flags != ULINT_UNDEFINED + && FSP_FLAGS_HAS_PAGE_COMPRESSION(flags)); } #endif /* UNIV_INNOCHECKSUM */ diff --git a/storage/xtradb/include/fut0lst.h b/storage/xtradb/include/fut0lst.h index 90f9a65d4fa..8554cc60cdd 100644 --- a/storage/xtradb/include/fut0lst.h +++ b/storage/xtradb/include/fut0lst.h @@ -102,31 +102,6 @@ flst_remove( flst_node_t* node2, /*!< in: node to remove */ mtr_t* mtr); /*!< in: mini-transaction handle */ /********************************************************************//** -Cuts off the tail of the list, including the node given. The number of -nodes which will be removed must be provided by the caller, as this function -does not measure the length of the tail. */ -UNIV_INTERN -void -flst_cut_end( -/*=========*/ - flst_base_node_t* base, /*!< in: pointer to base node of list */ - flst_node_t* node2, /*!< in: first node to remove */ - ulint n_nodes,/*!< in: number of nodes to remove, - must be >= 1 */ - mtr_t* mtr); /*!< in: mini-transaction handle */ -/********************************************************************//** -Cuts off the tail of the list, not including the given node. The number of -nodes which will be removed must be provided by the caller, as this function -does not measure the length of the tail. */ -UNIV_INTERN -void -flst_truncate_end( -/*==============*/ - flst_base_node_t* base, /*!< in: pointer to base node of list */ - flst_node_t* node2, /*!< in: first node not to remove */ - ulint n_nodes,/*!< in: number of nodes to remove */ - mtr_t* mtr); /*!< in: mini-transaction handle */ -/********************************************************************//** Gets list length. @return length */ UNIV_INLINE diff --git a/storage/xtradb/include/log0log.h b/storage/xtradb/include/log0log.h index f5655e98a13..8bcee8b1919 100644 --- a/storage/xtradb/include/log0log.h +++ b/storage/xtradb/include/log0log.h @@ -2,6 +2,7 @@ Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2009, Google Inc. +Copyright (c) 2017, MariaDB Corporation Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -1070,22 +1071,9 @@ struct log_t{ /* @} */ #endif /* UNIV_LOG_ARCHIVE */ -extern os_event_t log_scrub_event; /* log scrubbing speed, in bytes/sec */ extern ulonglong innodb_scrub_log_speed; -/*****************************************************************//** -This is the main thread for log scrub. It waits for an event and -when waked up fills current log block with dummy records and -sleeps again. -@return this function does not return, it calls os_thread_exit() */ -extern "C" UNIV_INTERN -os_thread_ret_t -DECLARE_THREAD(log_scrub_thread)( -/*===============================*/ - void* arg); /*!< in: a dummy parameter - required by os_thread_create */ - #ifndef UNIV_NONINL #include "log0log.ic" #endif diff --git a/storage/xtradb/include/row0mysql.h b/storage/xtradb/include/row0mysql.h index b818791cf72..2bd17980896 100644 --- a/storage/xtradb/include/row0mysql.h +++ b/storage/xtradb/include/row0mysql.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 +43,6 @@ struct SysIndexCallback; extern ibool row_rollback_on_timeout; -extern uint srv_compressed_columns_zip_level; -extern ulong srv_compressed_columns_threshold; - struct row_prebuilt_t; /*******************************************************************//** @@ -56,48 +54,6 @@ row_mysql_prebuilt_free_blob_heap( row_prebuilt_t* prebuilt); /*!< in: prebuilt struct of a ha_innobase:: table handle */ -/** Frees the compress heap in prebuilt when no longer needed. */ -UNIV_INTERN -void -row_mysql_prebuilt_free_compress_heap( - row_prebuilt_t* prebuilt); /*!< in: prebuilt struct of a - ha_innobase:: table handle */ - -/** Uncompress blob/text/varchar column using zlib -@return pointer to the uncompressed data */ -const byte* -row_decompress_column( - const byte* data, /*!< in: data in innodb(compressed) format */ - ulint *len, /*!< in: data length; out: length of - decompressed data*/ - const byte* dict_data, - /*!< in: optional dictionary data used for - decompression */ - ulint dict_data_len, - /*!< in: optional dictionary data length */ - row_prebuilt_t* prebuilt); - /*!< in: use prebuilt->compress_heap only - here*/ - -/** Compress blob/text/varchar column using zlib -@return pointer to the compressed data */ -byte* -row_compress_column( - const byte* data, /*!< in: data in mysql(uncompressed) - format */ - ulint *len, /*!< in: data length; out: length of - compressed data*/ - ulint lenlen, /*!< in: bytes used to store the length of - data */ - const byte* dict_data, - /*!< in: optional dictionary data used for - compression */ - ulint dict_data_len, - /*!< in: optional dictionary data length */ - row_prebuilt_t* prebuilt); - /*!< in: use prebuilt->compress_heap only - here*/ - /*******************************************************************//** Stores a >= 5.0.3 format true VARCHAR length to dest, in the MySQL row format. @@ -136,21 +92,10 @@ row_mysql_store_blob_ref( to 4 bytes */ const void* data, /*!< in: BLOB data; if the value to store is SQL NULL this should be NULL pointer */ - ulint len, /*!< in: BLOB length; if the value to store + ulint len); /*!< in: BLOB length; if the value to store is SQL NULL this should be 0; remember also to set the NULL bit in the MySQL record header! */ - bool need_decompression, - /*!< in: if the data need to be compressed*/ - const byte* dict_data, - /*!< in: optional compression dictionary - data */ - ulint dict_data_len, - /*!< in: optional compression dictionary data - length */ - row_prebuilt_t* prebuilt); - /*compress_heap only - here */ /*******************************************************************//** Reads a reference to a BLOB in the MySQL format. @return pointer to BLOB data */ @@ -161,17 +106,8 @@ row_mysql_read_blob_ref( ulint* len, /*!< out: BLOB length */ const byte* ref, /*!< in: BLOB reference in the MySQL format */ - ulint col_len, /*!< in: BLOB reference length + ulint col_len); /*!< in: BLOB reference length (not BLOB length) */ - bool need_compression, - /*!< in: if the data need to be - compressed*/ - const byte* dict_data, /*!< in: optional compression - dictionary data */ - ulint dict_data_len, /*!< in: optional compression - dictionary data length */ - row_prebuilt_t* prebuilt); /*!< in: use prebuilt->compress_heap - only here */ /**************************************************************//** Pad a column with spaces. */ UNIV_INTERN @@ -219,16 +155,7 @@ row_mysql_store_col_in_innobase_format( necessarily the length of the actual payload data; if the column is a true VARCHAR then this is irrelevant */ - ulint comp, /*!< in: nonzero=compact format */ - bool need_compression, - /*!< in: if the data need to be - compressed */ - const byte* dict_data, /*!< in: optional compression - dictionary data */ - ulint dict_data_len, /*!< in: optional compression - dictionary data length */ - row_prebuilt_t* prebuilt); /*!< in: use prebuilt->compress_heap - only here */ + ulint comp); /*!< in: nonzero=compact format */ /****************************************************************//** Handles user errors and lock waits detected by the database engine. @return true if it was a lock wait and we should continue running the @@ -730,8 +657,6 @@ struct mysql_row_templ_t { ulint is_unsigned; /*!< if a column type is an integer type and this field is != 0, then it is an unsigned integer type */ - bool compressed; /*!< if column format is compressed */ - LEX_CSTRING zip_dict_data; /*!< associated compression dictionary */ }; #define MYSQL_FETCH_CACHE_SIZE 8 @@ -931,8 +856,6 @@ struct row_prebuilt_t { in fetch_cache */ mem_heap_t* blob_heap; /*!< in SELECTS BLOB fields are copied to this heap */ - mem_heap_t* compress_heap; /*!< memory heap used to compress - /decompress blob column*/ mem_heap_t* old_vers_heap; /*!< memory heap where a previous version is built in consistent read */ bool in_fts_query; /*!< Whether we are in a FTS query */ diff --git a/storage/xtradb/include/srv0srv.h b/storage/xtradb/include/srv0srv.h index a8b0608ccd4..4eb67a84cc1 100644 --- a/storage/xtradb/include/srv0srv.h +++ b/storage/xtradb/include/srv0srv.h @@ -3,7 +3,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, 2009, Google Inc. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2016, MariaDB Corporation +Copyright (c) 2013, 2017, MariaDB Corporation Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -346,7 +346,6 @@ extern char** srv_data_file_names; extern ulint* srv_data_file_sizes; extern ulint* srv_data_file_is_raw_partition; - /** Whether the redo log tracking is currently enabled. Note that it is possible for the log tracker thread to be running and the tracking to be disabled */ @@ -356,6 +355,9 @@ extern ulonglong srv_max_bitmap_file_size; extern ulonglong srv_max_changed_pages; +extern uint srv_n_fil_crypt_threads; +extern uint srv_n_fil_crypt_threads_started; + extern ibool srv_auto_extend_last_data_file; extern ulint srv_last_file_size_max; extern char* srv_log_group_home_dir; @@ -574,19 +576,17 @@ extern ibool srv_print_verbose_log; "tables instead, see " REFMAN "innodb-i_s-tables.html" extern ibool srv_print_innodb_table_monitor; -extern ibool srv_monitor_active; -extern ibool srv_error_monitor_active; +extern bool srv_monitor_active; +extern bool srv_error_monitor_active; /* TRUE during the lifetime of the buffer pool dump/load thread */ -extern ibool srv_buf_dump_thread_active; +extern bool srv_buf_dump_thread_active; /* TRUE during the lifetime of the stats thread */ -extern ibool srv_dict_stats_thread_active; +extern bool srv_dict_stats_thread_active; /* TRUE if enable log scrubbing */ extern my_bool srv_scrub_log; -/* TRUE during the lifetime of the log scrub thread */ -extern ibool srv_log_scrub_thread_active; extern ulong srv_n_spin_wait_rounds; extern ulong srv_n_free_tickets_to_enter; @@ -623,7 +623,7 @@ extern my_bool srv_ibuf_disable_background_merge; #ifdef UNIV_DEBUG extern my_bool srv_purge_view_update_only_debug; -extern ulong srv_sys_space_size_debug; +extern uint srv_sys_space_size_debug; #endif /* UNIV_DEBUG */ #define SRV_SEMAPHORE_WAIT_EXTENSION 7200 @@ -1082,15 +1082,6 @@ srv_release_threads( enum srv_thread_type type, /*!< in: thread type */ ulint n); /*!< in: number of threads to release */ -/**********************************************************************//** -Check whether any background thread are active. If so print which thread -is active. Send the threads wakeup signal. -@return name of thread that is active or NULL */ -UNIV_INTERN -const char* -srv_any_background_threads_are_active(void); -/*=======================================*/ - /**********************************************************************//** Wakeup the purge threads. */ UNIV_INTERN diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i index 08236889556..ad0565a0290 100644 --- a/storage/xtradb/include/univ.i +++ b/storage/xtradb/include/univ.i @@ -1,8 +1,8 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. Copyright (c) 2008, Google Inc. -Copyright (c) 2013, 2015, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -184,7 +184,7 @@ command. Not tested on Windows. */ #define UNIV_COMPILE_TEST_FUNCS */ -#if defined(HAVE_valgrind)&& defined(HAVE_VALGRIND_MEMCHECK_H) +#if defined HAVE_valgrind && defined HAVE_VALGRIND # define UNIV_DEBUG_VALGRIND #endif #if 0 diff --git a/storage/xtradb/lock/lock0wait.cc b/storage/xtradb/lock/lock0wait.cc index c7bd223c491..8f9ea7e10aa 100644 --- a/storage/xtradb/lock/lock0wait.cc +++ b/storage/xtradb/lock/lock0wait.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -510,11 +511,7 @@ A thread which wakes up threads whose lock wait may have lasted too long. @return a dummy parameter */ extern "C" UNIV_INTERN os_thread_ret_t -DECLARE_THREAD(lock_wait_timeout_thread)( -/*=====================================*/ - void* arg MY_ATTRIBUTE((unused))) - /* in: a dummy parameter required by - os_thread_create */ +DECLARE_THREAD(lock_wait_timeout_thread)(void*) { ib_int64_t sig_count = 0; os_event_t event = lock_sys->timeout_event; @@ -525,8 +522,6 @@ DECLARE_THREAD(lock_wait_timeout_thread)( pfs_register_thread(srv_lock_timeout_thread_key); #endif /* UNIV_PFS_THREAD */ - lock_sys->timeout_thread_active = true; - do { srv_slot_t* slot; diff --git a/storage/xtradb/log/log0log.cc b/storage/xtradb/log/log0log.cc index f3a3486017c..9245ae160e6 100644 --- a/storage/xtradb/log/log0log.cc +++ b/storage/xtradb/log/log0log.cc @@ -2,7 +2,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Google Inc. -Copyright (C) 2014, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2014, 2017, MariaDB Corporation. All Rights Reserved. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -52,9 +52,11 @@ Created 12/9/1995 Heikki Tuuri #include "buf0buf.h" #include "buf0flu.h" #include "srv0srv.h" +#include "lock0lock.h" #include "log0recv.h" #include "fil0fil.h" #include "dict0boot.h" +#include "dict0stats_bg.h" /* dict_stats_event */ #include "srv0srv.h" #include "srv0start.h" #include "trx0sys.h" @@ -95,6 +97,10 @@ UNIV_INTERN log_t* log_sys = NULL; UNIV_INTERN log_checksum_func_t log_checksum_algorithm_ptr = log_block_calc_checksum_innodb; +extern "C" UNIV_INTERN +os_thread_ret_t +DECLARE_THREAD(log_scrub_thread)(void*); + /* Next log block number to do dummy record filling if no log records written for a while */ static ulint next_lbn_to_pad = 0; @@ -167,6 +173,11 @@ the previous */ #define LOG_ARCHIVE_READ 1 #define LOG_ARCHIVE_WRITE 2 +/** Event to wake up the log scrub thread */ +static os_event_t log_scrub_event; + +static bool log_scrub_thread_active; + /******************************************************//** Completes a checkpoint write i/o to a log file. */ static @@ -1049,6 +1060,12 @@ log_init(void) mutex_exit(&(log_sys->mutex)); + log_scrub_thread_active = !srv_read_only_mode && srv_scrub_log; + if (log_scrub_thread_active) { + log_scrub_event = os_event_create(); + os_thread_create(log_scrub_thread, NULL, NULL); + } + #ifdef UNIV_LOG_DEBUG recv_sys_create(); recv_sys_init(buf_pool_get_curr_size()); @@ -3545,8 +3562,6 @@ logs_empty_and_mark_files_at_shutdown(void) ulint count = 0; ulint total_trx; ulint pending_io; - enum srv_thread_type active_thd; - const char* thread_name; ibool server_busy; ib_logf(IB_LOG_LEVEL_INFO, "Starting shutdown..."); @@ -3566,29 +3581,17 @@ logs_empty_and_mark_files_at_shutdown(void) srv_shutdown_state = SRV_SHUTDOWN_CLEANUP; loop: + if (!srv_read_only_mode) { + os_event_set(srv_error_event); + os_event_set(srv_monitor_event); + os_event_set(srv_buf_dump_event); + os_event_set(lock_sys->timeout_event); + os_event_set(dict_stats_event); + } os_thread_sleep(100000); count++; - /* We need the monitor threads to stop before we proceed with - a shutdown. */ - - thread_name = srv_any_background_threads_are_active(); - - if (thread_name != NULL) { - /* Print a message every 60 seconds if we are waiting - for the monitor thread to exit. Master and worker - threads check will be done later. */ - - if (srv_print_verbose_log && count > 600) { - ib_logf(IB_LOG_LEVEL_INFO, - "Waiting for %s to exit", thread_name); - count = 0; - } - - goto loop; - } - /* Check that there are no longer transactions, except for PREPARED ones. We need this wait even for the 'very fast' shutdown, because the InnoDB layer may have committed or @@ -3609,55 +3612,61 @@ loop: goto loop; } - /* Check that the background threads are suspended */ + /* We need these threads to stop early in shutdown. */ + const char* thread_name; - active_thd = srv_get_active_thread_type(); + if (srv_error_monitor_active) { + thread_name = "srv_error_monitor_thread"; + } else if (srv_monitor_active) { + thread_name = "srv_monitor_thread"; + } else if (srv_dict_stats_thread_active) { + thread_name = "dict_stats_thread"; + } else if (lock_sys->timeout_thread_active) { + thread_name = "lock_wait_timeout_thread"; + } else if (srv_buf_dump_thread_active) { + thread_name = "buf_dump_thread"; + } else { + thread_name = NULL; + } - if (active_thd != SRV_NONE) { - - if (active_thd == SRV_PURGE) { - srv_purge_wakeup(); - } - - /* The srv_lock_timeout_thread, srv_error_monitor_thread - and srv_monitor_thread should already exit by now. The - only threads to be suspended are the master threads - and worker threads (purge threads). Print the thread - type if any of such threads not in suspended mode */ + if (thread_name) { + ut_ad(!srv_read_only_mode); +wait_suspend_loop: if (srv_print_verbose_log && count > 600) { - const char* thread_type = ""; - - switch (active_thd) { - case SRV_NONE: - /* This shouldn't happen because we've - already checked for this case before - entering the if(). We handle it here - to avoid a compiler warning. */ - ut_error; - case SRV_WORKER: - thread_type = "worker threads"; - break; - case SRV_MASTER: - thread_type = "master thread"; - break; - case SRV_PURGE: - thread_type = "purge thread"; - break; - } - ib_logf(IB_LOG_LEVEL_INFO, - "Waiting for %s to be suspended", - thread_type); + "Waiting for %s to exit", thread_name); count = 0; } - goto loop; } + /* Check that the background threads are suspended */ + + switch (srv_get_active_thread_type()) { + case SRV_NONE: + srv_shutdown_state = SRV_SHUTDOWN_FLUSH_PHASE; + if (!srv_n_fil_crypt_threads_started) { + break; + } + os_event_set(fil_crypt_threads_event); + thread_name = "fil_crypt_thread"; + goto wait_suspend_loop; + case SRV_PURGE: + srv_purge_wakeup(); + thread_name = "purge thread"; + goto wait_suspend_loop; + case SRV_MASTER: + thread_name = "master thread"; + goto wait_suspend_loop; + case SRV_WORKER: + thread_name = "worker threads"; + goto wait_suspend_loop; + } + /* At this point only page_cleaner should be active. We wait here to let it complete the flushing of the buffer pools before proceeding further. */ - srv_shutdown_state = SRV_SHUTDOWN_FLUSH_PHASE; + count = 0; while (buf_page_cleaner_is_active || buf_lru_manager_is_active) { if (srv_print_verbose_log && count == 0) { @@ -3672,8 +3681,14 @@ loop: } } + if (log_scrub_thread_active) { + ut_ad(!srv_read_only_mode); + os_event_set(log_scrub_event); + } + mutex_enter(&log_sys->mutex); - server_busy = log_sys->n_pending_checkpoint_writes + server_busy = log_scrub_thread_active + || log_sys->n_pending_checkpoint_writes #ifdef UNIV_LOG_ARCHIVE || log_sys->n_pending_archive_ios #endif /* UNIV_LOG_ARCHIVE */ @@ -3692,6 +3707,8 @@ loop: goto loop; } + ut_ad(!log_scrub_thread_active); + pending_io = buf_pool_check_no_pending_io(); if (pending_io) { @@ -3727,16 +3744,6 @@ loop: from the stamps if the previous shutdown was clean. */ log_buffer_flush_to_disk(); - - /* Check that the background threads stay suspended */ - thread_name = srv_any_background_threads_are_active(); - - if (thread_name != NULL) { - ib_logf(IB_LOG_LEVEL_WARN, - "Background thread %s woke up " - "during shutdown", thread_name); - goto loop; - } } srv_shutdown_state = SRV_SHUTDOWN_LAST_PHASE; @@ -3749,74 +3756,57 @@ loop: } fil_close_all_files(); - - thread_name = srv_any_background_threads_are_active(); - - ut_a(!thread_name); - return; } if (!srv_read_only_mode) { log_make_checkpoint_at(LSN_MAX, TRUE); - } - mutex_enter(&log_sys->mutex); + mutex_enter(&log_sys->mutex); - tracked_lsn = log_get_tracked_lsn(); + tracked_lsn = log_get_tracked_lsn(); - lsn = log_sys->lsn; + lsn = log_sys->lsn; - if (lsn != log_sys->last_checkpoint_lsn - || (srv_track_changed_pages - && (tracked_lsn != log_sys->last_checkpoint_lsn)) + if (lsn != log_sys->last_checkpoint_lsn + || (srv_track_changed_pages + && (tracked_lsn != log_sys->last_checkpoint_lsn)) #ifdef UNIV_LOG_ARCHIVE - || (srv_log_archive_on - && lsn != log_sys->archived_lsn + LOG_BLOCK_HDR_SIZE) + || (srv_log_archive_on + && lsn != log_sys->archived_lsn + LOG_BLOCK_HDR_SIZE) +#endif /* UNIV_LOG_ARCHIVE */ + ) { + + mutex_exit(&log_sys->mutex); + + goto loop; + } + +#ifdef UNIV_LOG_ARCHIVE + log_archive_close_groups(TRUE); #endif /* UNIV_LOG_ARCHIVE */ - ) { mutex_exit(&log_sys->mutex); - goto loop; - } - -#ifdef UNIV_LOG_ARCHIVE - - log_archive_close_groups(TRUE); -#endif /* UNIV_LOG_ARCHIVE */ - - mutex_exit(&log_sys->mutex); - - /* Check that the background threads stay suspended */ - thread_name = srv_any_background_threads_are_active(); - if (thread_name != NULL) { - ib_logf(IB_LOG_LEVEL_WARN, - "Background thread %s woke up during shutdown", - thread_name); - - goto loop; - } - - if (!srv_read_only_mode) { fil_flush_file_spaces(FIL_TABLESPACE); fil_flush_file_spaces(FIL_LOG); - } - /* The call fil_write_flushed_lsn_to_data_files() will pass the buffer - pool: therefore it is essential that the buffer pool has been - completely flushed to disk! (We do not call fil_write... if the - 'very fast' shutdown is enabled.) */ + /* The call fil_write_flushed_lsn_to_data_files() will + bypass the buffer pool: therefore it is essential that + the buffer pool has been completely flushed to disk! */ - if (!buf_all_freed()) { + if (!buf_all_freed()) { + if (srv_print_verbose_log && count > 600) { + ib_logf(IB_LOG_LEVEL_INFO, + "Waiting for dirty buffer pages" + " to be flushed"); + count = 0; + } - if (srv_print_verbose_log && count > 600) { - ib_logf(IB_LOG_LEVEL_INFO, - "Waiting for dirty buffer pages to be flushed"); - count = 0; + goto loop; } - - goto loop; + } else { + lsn = srv_start_lsn; } srv_shutdown_state = SRV_SHUTDOWN_LAST_PHASE; @@ -4094,6 +4084,10 @@ log_shutdown(void) mutex_free(&log_sys->mutex); mutex_free(&log_sys->log_flush_order_mutex); + if (!srv_read_only_mode && srv_scrub_log) { + os_event_free(log_scrub_event); + } + #ifdef UNIV_LOG_ARCHIVE rw_lock_free(&log_sys->archive_lock); os_event_free(log_sys->archiving_on); @@ -4121,11 +4115,6 @@ log_mem_free(void) } } -/** Event to wake up the log scrub thread */ -UNIV_INTERN os_event_t log_scrub_event = NULL; - -UNIV_INTERN ibool srv_log_scrub_thread_active = FALSE; - /*****************************************************************//* If no log record has been written for a while, fill current log block with dummy records. */ @@ -4152,17 +4141,11 @@ sleeps again. @return this function does not return, it calls os_thread_exit() */ extern "C" UNIV_INTERN os_thread_ret_t -DECLARE_THREAD(log_scrub_thread)( -/*===============================*/ - void* arg __attribute__((unused))) /*!< in: a dummy parameter - required by os_thread_create */ +DECLARE_THREAD(log_scrub_thread)(void*) { ut_ad(!srv_read_only_mode); - srv_log_scrub_thread_active = TRUE; - - while(srv_shutdown_state == SRV_SHUTDOWN_NONE) - { + while (srv_shutdown_state < SRV_SHUTDOWN_FLUSH_PHASE) { /* log scrubbing interval in µs. */ ulonglong interval = 1000*1000*512/innodb_scrub_log_speed; @@ -4173,7 +4156,7 @@ DECLARE_THREAD(log_scrub_thread)( os_event_reset(log_scrub_event); } - srv_log_scrub_thread_active = FALSE; + log_scrub_thread_active = false; /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit and not use return() to exit. */ diff --git a/storage/xtradb/log/log0recv.cc b/storage/xtradb/log/log0recv.cc index 1777084e746..11c643afff1 100644 --- a/storage/xtradb/log/log0recv.cc +++ b/storage/xtradb/log/log0recv.cc @@ -2,7 +2,7 @@ Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved. This 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 @@ -2900,11 +2900,10 @@ recv_scan_log_recs( recv_init_crash_recovery(); } else { - - ib_logf(IB_LOG_LEVEL_WARN, - "Recovery skipped, " - "--innodb-read-only set!"); - + ib_logf(IB_LOG_LEVEL_ERROR, + "innodb_read_only prevents" + " crash recovery"); + recv_needed_recovery = TRUE; return(TRUE); } } @@ -3351,6 +3350,11 @@ recv_recovery_from_checkpoint_start_func( } /* Done with startup scan. Clear the flag. */ recv_log_scan_is_startup_type = FALSE; + + if (srv_read_only_mode && recv_needed_recovery) { + return(DB_READ_ONLY); + } + if (TYPE_CHECKPOINT) { /* NOTE: we always do a 'recovery' at startup, but only if there is something wrong we will print a message to the @@ -3505,15 +3509,6 @@ void recv_recovery_from_checkpoint_finish(void) /*======================================*/ { - /* Apply the hashed log records to the respective file pages */ - - if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { - - recv_apply_hashed_log_recs(TRUE); - } - - DBUG_PRINT("ib_log", ("apply completed")); - if (recv_needed_recovery) { trx_sys_print_mysql_master_log_pos(); trx_sys_print_mysql_binlog_offset(); diff --git a/storage/xtradb/rem/rem0rec.cc b/storage/xtradb/rem/rem0rec.cc index d1205608d47..b9496b7f620 100644 --- a/storage/xtradb/rem/rem0rec.cc +++ b/storage/xtradb/rem/rem0rec.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -323,8 +324,7 @@ rec_init_offsets_comp_ordinary( stored in one byte for 0..127. The length will be encoded in two bytes when it is 128 or more, or when the field is stored externally. */ - if (UNIV_UNLIKELY(col->len > 255 - - prtype_get_compression_extra(col->prtype)) + if (UNIV_UNLIKELY(col->len > 255) || UNIV_UNLIKELY(col->mtype == DATA_BLOB)) { if (len & 0x80) { @@ -849,8 +849,7 @@ rec_get_converted_size_comp_prefix_low( ((col->mtype == DATA_VARCHAR || col->mtype == DATA_BINARY || col->mtype == DATA_VARMYSQL) && (col->len == 0 - || len <= col->len + - prtype_get_compression_extra(col->prtype)))); + || len <= col->len))); fixed_len = field->fixed_len; if (temp && fixed_len @@ -882,8 +881,7 @@ rec_get_converted_size_comp_prefix_low( ut_ad(col->len >= 256 || col->mtype == DATA_BLOB); extra_size += 2; } else if (len < 128 - || (col->len < 256 - - prtype_get_compression_extra(col->prtype) + || (col->len < 256 && col->mtype != DATA_BLOB)) { extra_size++; } else { @@ -1279,16 +1277,12 @@ rec_convert_dtuple_to_rec_comp( *lens-- = (byte) (len >> 8) | 0xc0; *lens-- = (byte) len; } else { - ut_ad(len <= dtype_get_len(type) + - prtype_get_compression_extra( - dtype_get_prtype(type)) + ut_ad(len <= dtype_get_len(type) || dtype_get_mtype(type) == DATA_BLOB || !strcmp(index->name, FTS_INDEX_TABLE_IND_NAME)); if (len < 128 - || (dtype_get_len(type) < 256 - - prtype_get_compression_extra( - dtype_get_prtype(type)) + || (dtype_get_len(type) < 256 && dtype_get_mtype(type) != DATA_BLOB)) { *lens-- = (byte) len; diff --git a/storage/xtradb/row/row0import.cc b/storage/xtradb/row/row0import.cc index d45ce907304..6170eb66195 100644 --- a/storage/xtradb/row/row0import.cc +++ b/storage/xtradb/row/row0import.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. +Copyright (c) 2015, 2017, MariaDB Corporation. This 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 @@ -371,8 +371,7 @@ public: m_space(ULINT_UNDEFINED), m_xdes(), m_xdes_page_no(ULINT_UNDEFINED), - m_space_flags(ULINT_UNDEFINED), - m_table_flags(ULINT_UNDEFINED) UNIV_NOTHROW { } + m_space_flags(ULINT_UNDEFINED) UNIV_NOTHROW { } /** Free any extent descriptor instance */ @@ -535,10 +534,6 @@ protected: /** Flags value read from the header page */ ulint m_space_flags; - - /** Derived from m_space_flags and row format type, the row format - type is determined from the page header. */ - ulint m_table_flags; }; /** Determine the page size to use for traversing the tablespace @@ -553,6 +548,19 @@ AbstractCallback::init( const page_t* page = block->frame; m_space_flags = fsp_header_get_flags(page); + if (!fsp_flags_is_valid(m_space_flags)) { + ulint cflags = fsp_flags_convert_from_101(m_space_flags); + if (cflags == ULINT_UNDEFINED) { + ib_logf(IB_LOG_LEVEL_ERROR, + "Invalid FSP_SPACE_FLAGS=0x%x", + int(m_space_flags)); + return(DB_CORRUPTION); + } + m_space_flags = cflags; + } + + /* Clear the DATA_DIR flag, which is basically garbage. */ + m_space_flags &= ~(1U << FSP_FLAGS_POS_RESERVED); /* Since we don't know whether it is a compressed table or not, the data is always read into the block->frame. */ @@ -640,46 +648,6 @@ struct FetchIndexRootPages : public AbstractCallback { return(m_space); } - /** - Check if the .ibd file row format is the same as the table's. - @param ibd_table_flags - determined from space and page. - @return DB_SUCCESS or error code. */ - dberr_t check_row_format(ulint ibd_table_flags) UNIV_NOTHROW - { - dberr_t err; - rec_format_t ibd_rec_format; - rec_format_t table_rec_format; - - if (!dict_tf_is_valid(ibd_table_flags)) { - - ib_errf(m_trx->mysql_thd, IB_LOG_LEVEL_ERROR, - ER_TABLE_SCHEMA_MISMATCH, - ".ibd file has invlad table flags: %lx", - ibd_table_flags); - - return(DB_CORRUPTION); - } - - ibd_rec_format = dict_tf_get_rec_format(ibd_table_flags); - table_rec_format = dict_tf_get_rec_format(m_table->flags); - - if (table_rec_format != ibd_rec_format) { - - ib_errf(m_trx->mysql_thd, IB_LOG_LEVEL_ERROR, - ER_TABLE_SCHEMA_MISMATCH, - "Table has %s row format, .ibd " - "file has %s row format.", - dict_tf_to_row_format_string(m_table->flags), - dict_tf_to_row_format_string(ibd_table_flags)); - - err = DB_CORRUPTION; - } else { - err = DB_SUCCESS; - } - - return(err); - } - /** Called for each block as it is read from the file. @param offset - physical offset in the file @@ -743,12 +711,17 @@ FetchIndexRootPages::operator() ( m_indexes.push_back(Index(id, page_no)); if (m_indexes.size() == 1) { - - m_table_flags = dict_sys_tables_type_to_tf( - m_space_flags, - page_is_comp(page) ? DICT_N_COLS_COMPACT : 0); - - err = check_row_format(m_table_flags); + /* Check that the tablespace flags match the table flags. */ + ulint expected = dict_tf_to_fsp_flags(m_table->flags); + if (!fsp_flags_match(expected, m_space_flags)) { + ib_errf(m_trx->mysql_thd, IB_LOG_LEVEL_ERROR, + ER_TABLE_SCHEMA_MISMATCH, + "Expected FSP_SPACE_FLAGS=0x%x, .ibd " + "file contains 0x%x.", + unsigned(expected), + unsigned(m_space_flags)); + return(DB_CORRUPTION); + } } } @@ -1968,21 +1941,14 @@ PageConverter::update_header( "- ignored"); } - ulint space_flags = fsp_header_get_flags(get_frame(block)); - - if (!fsp_flags_is_valid(space_flags)) { - - ib_logf(IB_LOG_LEVEL_ERROR, - "Unsupported tablespace format %lu", - (ulong) space_flags); - - return(DB_UNSUPPORTED); - } - mach_write_to_8( get_frame(block) + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, m_current_lsn); + /* Write back the adjusted flags. */ + mach_write_to_4(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + + get_frame(block), m_space_flags); + /* Write space_id to the tablespace header, page 0. */ mach_write_to_4( get_frame(block) + FSP_HEADER_OFFSET + FSP_SPACE_ID, diff --git a/storage/xtradb/row/row0merge.cc b/storage/xtradb/row/row0merge.cc index 5daad1e0e4f..ed8ab600611 100644 --- a/storage/xtradb/row/row0merge.cc +++ b/storage/xtradb/row/row0merge.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -623,8 +624,7 @@ row_merge_buf_add( ((col->mtype == DATA_VARCHAR || col->mtype == DATA_BINARY || col->mtype == DATA_VARMYSQL) && (col->len == 0 - || len <= col->len + - prtype_get_compression_extra(col->prtype)))); + || len <= col->len))); fixed_len = ifield->fixed_len; if (fixed_len && !dict_table_is_comp(index->table) @@ -653,8 +653,7 @@ row_merge_buf_add( } else if (dfield_is_ext(field)) { extra_size += 2; } else if (len < 128 - || (col->len < 256 - - prtype_get_compression_extra(col->prtype) + || (col->len < 256 && col->mtype != DATA_BLOB)) { extra_size++; } else { diff --git a/storage/xtradb/row/row0mysql.cc b/storage/xtradb/row/row0mysql.cc index e53a0ea9586..c81b10b93f1 100644 --- a/storage/xtradb/row/row0mysql.cc +++ b/storage/xtradb/row/row0mysql.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This 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 @@ -71,48 +72,6 @@ Created 9/17/2000 Heikki Tuuri /** Provide optional 4.x backwards compatibility for 5.0 and above */ UNIV_INTERN ibool row_rollback_on_timeout = FALSE; -/** -Z_NO_COMPRESSION = 0 -Z_BEST_SPEED = 1 -Z_BEST_COMPRESSION = 9 -Z_DEFAULT_COMPRESSION = -1 -Compression level to be used by zlib for compressed-blob columns. -Settable by user. -*/ -UNIV_INTERN uint srv_compressed_columns_zip_level = DEFAULT_COMPRESSION_LEVEL; -/** -(Z_FILTERED | Z_HUFFMAN_ONLY | Z_RLE | Z_FIXED | Z_DEFAULT_STRATEGY) - -The strategy parameter is used to tune the compression algorithm. Use the -value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a -filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only -(no string match), or Z_RLE to limit match distances to one -(run-length encoding). Filtered data consists mostly of small values with a -somewhat random distribution. In this case, the compression algorithm is -tuned to compress them better. -The effect of Z_FILTERED is to force more Huffman coding and less string -matching; it is somewhat intermediate between Z_DEFAULT_STRATEGY and -Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as Z_HUFFMAN_ONLY, -but give better compression for PNG image data. The strategy parameter only -affects the compression ratio but not the correctness of the compressed -output even if it is not set appropriately. Z_FIXED prevents the use of -dynamic Huffman codes, allowing for a simpler decoder for special -applications. -*/ -const uint srv_compressed_columns_zlib_strategy = Z_DEFAULT_STRATEGY; -/** Compress the column if the data length exceeds this value. */ -UNIV_INTERN ulong srv_compressed_columns_threshold = 96; -/** -Determine if zlib needs to compute adler32 value for the compressed data. -This variables is similar to page_zip_zlib_wrap, but only used by -compressed blob columns. -*/ -const bool srv_compressed_columns_zlib_wrap = true; -/** -Determine if zlib will use custom memory allocation functions based on -InnoDB memory heap routines (mem_heap_t*). -*/ -const bool srv_compressed_columns_zlib_use_heap = false; /** Chain node of the list of tables to drop in the background. */ struct row_mysql_drop_t{ char* table_name; /*!< table name */ @@ -216,17 +175,6 @@ row_mysql_prebuilt_free_blob_heap( prebuilt->blob_heap = NULL; } -/** Frees the compress heap in prebuilt when no longer needed. */ -UNIV_INTERN -void -row_mysql_prebuilt_free_compress_heap( - row_prebuilt_t* prebuilt) /*!< in: prebuilt struct of a - ha_innobase:: table handle */ -{ - mem_heap_free(prebuilt->compress_heap); - prebuilt->compress_heap = NULL; -} - /*******************************************************************//** Stores a >= 5.0.3 format true VARCHAR length to dest, in the MySQL row format. @@ -283,425 +231,6 @@ row_mysql_read_true_varchar( return(field + 1); } -/** - Compressed BLOB header format: - --------------------------------------------------------------- - | reserved | wrap | algorithm | len-len | compressed | unused | - | [1] | [1] | [5] | [3] | [1] | [5] | - --------------------------------------------------------------- - | 0 0 | 1 1 | 2 6 | 7 9 | 10 10 | 11 15 | - --------------------------------------------------------------- - * 'reserved' bit is planned to be used in future versions of the BLOB - header. In this version it must always be - 'default_zip_column_reserved_value' (0). - * 'wrap' identifies if compression algorithm calculated a checksum - (adler32 in case of zlib) and appended it to the compressed data. - * 'algorithm' identifies which algoritm was used to compress this BLOB. - Currently, the only value 'default_zip_column_algorithm_value' (0) is - supported. - * 'len-len' field identifies the length of the column length data portion - followed by this header (see below). - * If 'compressed' bit is set to 1, then this header is immediately followed - by 1..8 bytes (depending on the value of 'len-len' bitfield) which - determine original (uncompressed) block size. These 'len-len' bytes are - followed by compressed representation of the original data. - * If 'compressed' bit is set to 0, every other bitfield ('wrap', - 'algorithm' and 'le-len') must be ignored. In this case the header is - immediately followed by uncompressed (original) data. -*/ - -/** - Currently the only supported value for the 'reserved' field is - false (0). -*/ -static const bool default_zip_column_reserved_value = false; - -/** - Currently the only supported value for the 'algorithm' field is 0, which - means 'zlib'. -*/ -static const uint default_zip_column_algorithm_value = 0; - -static const size_t zip_column_prefix_max_length = - ZIP_COLUMN_HEADER_LENGTH + 8; -static const size_t zip_column_header_length = ZIP_COLUMN_HEADER_LENGTH; - -/* 'reserved', bit 0 */ -static const uint zip_column_reserved = 0; -/* 0000 0000 0000 0001 */ -static const uint zip_column_reserved_mask = 0x0001; - -/* 'wrap', bit 1 */ -static const uint zip_column_wrap = 1; -/* 0000 0000 0000 0010 */ -static const uint zip_column_wrap_mask = 0x0002; - -/* 'algorithm', bit 2,3,4,5,6 */ -static const uint zip_column_algorithm = 2; -/* 0000 0000 0111 1100 */ -static const uint zip_column_algorithm_mask = 0x007C; - -/* 'len-len', bit 7,8,9 */ -static const uint zip_column_data_length = 7; -/* 0000 0011 1000 0000 */ -static const uint zip_column_data_length_mask = 0x0380; - -/* 'compressed', bit 10 */ -static const uint zip_column_compressed = 10; -/* 0000 0100 0000 0000 */ -static const uint zip_column_compressed_mask = 0x0400; - -/** Updates compressed block header with the given components */ -static void -column_set_compress_header( - byte* data, - bool compressed, - ulint lenlen, - uint alg, - bool wrap, - bool reserved) -{ - ulint header = 0; - header |= (compressed << zip_column_compressed); - header |= (lenlen << zip_column_data_length); - header |= (alg << zip_column_algorithm); - header |= (wrap << zip_column_wrap); - header |= (reserved << zip_column_reserved); - mach_write_to_2(data, header); -} - -/** Parse compressed block header into components */ -static void -column_get_compress_header( - const byte* data, - bool* compressed, - ulint* lenlen, - uint* alg, - bool* wrap, - bool* reserved -) -{ - ulint header = mach_read_from_2(data); - *compressed = ((header & zip_column_compressed_mask) >> - zip_column_compressed); - *lenlen = ((header & zip_column_data_length_mask) >> - zip_column_data_length); - *alg = ((header & zip_column_algorithm_mask) >> - zip_column_algorithm); - *wrap = ((header & zip_column_wrap_mask) >> - zip_column_wrap); - *reserved = ((header & zip_column_reserved_mask) >> - zip_column_reserved); -} - -/** Allocate memory for zlib. */ -static -void* -column_zip_zalloc( - void* opaque, /*!< in/out: memory heap */ - uInt items, /*!< in: number of items to allocate */ - uInt size) /*!< in: size of an item in bytes */ -{ - return(mem_heap_zalloc(static_cast(opaque), - items * size)); -} - -/** Deallocate memory for zlib. */ -static -void -column_zip_free( - void* opaque MY_ATTRIBUTE((unused)), /*!< in: memory heap */ - void* address MY_ATTRIBUTE((unused))) /*!< in: object to free */ -{ -} - -/** Configure the zlib allocator to use the given memory heap. */ -UNIV_INTERN -void -column_zip_set_alloc( - void* stream, /*!< in/out: zlib stream */ - mem_heap_t* heap) /*!< in: memory heap to use */ -{ - z_stream* strm = static_cast(stream); - - if (srv_compressed_columns_zlib_use_heap) { - strm->zalloc = column_zip_zalloc; - strm->zfree = column_zip_free; - strm->opaque = heap; - } else { - strm->zalloc = (alloc_func)0; - strm->zfree = (free_func)0; - strm->opaque = (voidpf)0; - } -} - -/** Compress blob/text/varchar column using zlib -@return pointer to the compressed data */ -byte* -row_compress_column( - const byte* data, /*!< in: data in mysql(uncompressed) - format */ - ulint *len, /*!< in: data length; out: length of - compressed data*/ - ulint lenlen, /*!< in: bytes used to store the length of - data */ - const byte* dict_data, - /*!< in: optional dictionary data used for - compression */ - ulint dict_data_len, - /*!< in: optional dictionary data length */ - row_prebuilt_t* prebuilt) - /*!< in: use prebuilt->compress_heap only - here*/ -{ - int err = 0; - ulint comp_len = *len; - ulint buf_len = *len + zip_column_prefix_max_length; - byte* buf; - byte* ptr; - z_stream c_stream; - bool wrap = srv_compressed_columns_zlib_wrap; - - int window_bits = wrap ? MAX_WBITS : -MAX_WBITS; - - if (!prebuilt->compress_heap) { - prebuilt->compress_heap = - mem_heap_create(max(UNIV_PAGE_SIZE, buf_len)); - } - - buf = static_cast(mem_heap_zalloc( - prebuilt->compress_heap,buf_len)); - - if (*len < srv_compressed_columns_threshold || - srv_compressed_columns_zip_level == Z_NO_COMPRESSION) - goto do_not_compress; - - ptr = buf + zip_column_header_length + lenlen; - - /*init deflate object*/ - c_stream.next_in = const_cast(data); - c_stream.avail_in = *len; - c_stream.next_out = ptr; - c_stream.avail_out = comp_len; - - column_zip_set_alloc(&c_stream, prebuilt->compress_heap); - - err = deflateInit2(&c_stream, srv_compressed_columns_zip_level, - Z_DEFLATED, window_bits, MAX_MEM_LEVEL, - srv_compressed_columns_zlib_strategy); - ut_a(err == Z_OK); - - if (dict_data != 0 && dict_data_len != 0) { - err = deflateSetDictionary(&c_stream, dict_data, - dict_data_len); - ut_a(err == Z_OK); - } - - err = deflate(&c_stream, Z_FINISH); - if (err != Z_STREAM_END) { - deflateEnd(&c_stream); - if (err == Z_OK) - err = Z_BUF_ERROR; - } else { - comp_len = c_stream.total_out; - err = deflateEnd(&c_stream); - } - - switch (err) { - case Z_OK: - break; - case Z_BUF_ERROR: - /* data after compress is larger than uncompressed data*/ - break; - default: - ib_logf(IB_LOG_LEVEL_ERROR, - "failed to compress the column, error: %d\n", err); - } - - /* make sure the compressed data size is smaller than - uncompressed data */ - if (err == Z_OK && - *len > (comp_len + zip_column_header_length + lenlen)) { - column_set_compress_header(buf, true, lenlen - 1, - default_zip_column_algorithm_value, wrap, - default_zip_column_reserved_value); - ptr = buf + zip_column_header_length; - /*store the uncompressed data length*/ - switch (lenlen) { - case 1: - mach_write_to_1(ptr, *len); - break; - case 2: - mach_write_to_2(ptr, *len); - break; - case 3: - mach_write_to_3(ptr, *len); - break; - case 4: - mach_write_to_4(ptr, *len); - break; - default: - ut_error; - } - - *len = comp_len + zip_column_header_length + lenlen; - return buf; - } - -do_not_compress: - ptr = buf; - column_set_compress_header(ptr, false, 0, - default_zip_column_algorithm_value, false, - default_zip_column_reserved_value); - ptr += zip_column_header_length; - memcpy(ptr, data, *len); - *len += zip_column_header_length; - return buf; -} - -/** Uncompress blob/text/varchar column using zlib -@return pointer to the uncompressed data */ -const byte* -row_decompress_column( - const byte* data, /*!< in: data in innodb(compressed) format */ - ulint *len, /*!< in: data length; out: length of - decompressed data*/ - const byte* dict_data, - /*!< in: optional dictionary data used for - decompression */ - ulint dict_data_len, - /*!< in: optional dictionary data length */ - row_prebuilt_t* prebuilt) - /*!< in: use prebuilt->compress_heap only - here*/ -{ - ulint buf_len = 0; - byte* buf; - int err = 0; - int window_bits = 0; - z_stream d_stream; - bool is_compressed = false; - bool wrap = false; - bool reserved = false; - ulint lenlen = 0; - uint alg = 0; - - ut_ad(*len != ULINT_UNDEFINED); - ut_ad(*len >= zip_column_header_length); - - column_get_compress_header(data, &is_compressed, &lenlen, &alg, - &wrap, &reserved); - - if (reserved != default_zip_column_reserved_value) { - ib_logf(IB_LOG_LEVEL_FATAL, - "unsupported compressed BLOB header format\n"); - } - - if (alg != default_zip_column_algorithm_value) { - ib_logf(IB_LOG_LEVEL_FATAL, - "unsupported 'algorithm' value in the" - " compressed BLOB header\n"); - } - - ut_a(lenlen < 4); - - data += zip_column_header_length; - if (!is_compressed) { /* column not compressed */ - *len -= zip_column_header_length; - return data; - } - - lenlen++; - - ulint comp_len = *len - zip_column_header_length - lenlen; - - ulint uncomp_len = 0; - switch (lenlen) { - case 1: - uncomp_len = mach_read_from_1(data); - break; - case 2: - uncomp_len = mach_read_from_2(data); - break; - case 3: - uncomp_len = mach_read_from_3(data); - break; - case 4: - uncomp_len = mach_read_from_4(data); - break; - default: - ut_error; - } - - data += lenlen; - - /* data is compressed, decompress it*/ - if (!prebuilt->compress_heap) { - prebuilt->compress_heap = - mem_heap_create(max(UNIV_PAGE_SIZE, uncomp_len)); - } - - buf_len = uncomp_len; - buf = static_cast(mem_heap_zalloc( - prebuilt->compress_heap, buf_len)); - - /* init d_stream */ - d_stream.next_in = const_cast(data); - d_stream.avail_in = comp_len; - d_stream.next_out = buf; - d_stream.avail_out = buf_len; - - column_zip_set_alloc(&d_stream, prebuilt->compress_heap); - - window_bits = wrap ? MAX_WBITS : -MAX_WBITS; - err = inflateInit2(&d_stream, window_bits); - ut_a(err == Z_OK); - - err = inflate(&d_stream, Z_FINISH); - if (err == Z_NEED_DICT) { - ut_a(dict_data != 0 && dict_data_len != 0); - err = inflateSetDictionary(&d_stream, dict_data, - dict_data_len); - ut_a(err == Z_OK); - err = inflate(&d_stream, Z_FINISH); - } - - if (err != Z_STREAM_END) { - inflateEnd(&d_stream); - if (err == Z_BUF_ERROR && d_stream.avail_in == 0) - err = Z_DATA_ERROR; - } else { - buf_len = d_stream.total_out; - err = inflateEnd(&d_stream); - } - - switch (err) { - case Z_OK: - break; - case Z_BUF_ERROR: - ib_logf(IB_LOG_LEVEL_FATAL, - "zlib buf error, this shouldn't happen\n"); - break; - default: - ib_logf(IB_LOG_LEVEL_FATAL, - "failed to decompress column, error: %d\n", err); - } - - if (err == Z_OK) { - if (buf_len != uncomp_len) { - ib_logf(IB_LOG_LEVEL_FATAL, - "failed to decompress blob column, may" - " be corrupted\n"); - } - *len = buf_len; - return buf; - } - - *len -= (zip_column_header_length + lenlen); - return data; -} - - /*******************************************************************//** Stores a reference to a BLOB in the MySQL format. */ UNIV_INTERN @@ -715,21 +244,10 @@ row_mysql_store_blob_ref( to 4 bytes */ const void* data, /*!< in: BLOB data; if the value to store is SQL NULL this should be NULL pointer */ - ulint len, /*!< in: BLOB length; if the value to store + ulint len) /*!< in: BLOB length; if the value to store is SQL NULL this should be 0; remember also to set the NULL bit in the MySQL record header! */ - bool need_decompression, - /*!< in: if the data need to be compressed*/ - const byte* dict_data, - /*!< in: optional compression dictionary - data */ - ulint dict_data_len, - /*!< in: optional compression dictionary data - length */ - row_prebuilt_t* prebuilt) - /*compress_heap only - here */ { /* MySQL might assume the field is set to zero except the length and the pointer fields */ @@ -741,27 +259,11 @@ row_mysql_store_blob_ref( In 32-bit architectures we only use the first 4 bytes of the pointer slot. */ - ut_a(col_len - 8 > 1 || - len < 256 + - (need_decompression ? ZIP_COLUMN_HEADER_LENGTH : 0)); - ut_a(col_len - 8 > 2 || - len < 256 * 256 + - (need_decompression ? ZIP_COLUMN_HEADER_LENGTH : 0)); - ut_a(col_len - 8 > 3 || - len < 256 * 256 * 256 + - (need_decompression ? ZIP_COLUMN_HEADER_LENGTH : 0)); - - const byte *ptr = NULL; - - if (need_decompression) - ptr = row_decompress_column((const byte*)data, &len, - dict_data, dict_data_len, prebuilt); - - if (ptr) - memcpy(dest + col_len - 8, &ptr, sizeof ptr); - else - memcpy(dest + col_len - 8, &data, sizeof data); + ut_a(col_len - 8 > 1 || len < 256); + ut_a(col_len - 8 > 2 || len < 256 * 256); + ut_a(col_len - 8 > 3 || len < 256 * 256 * 256); + memcpy(dest + col_len - 8, &data, sizeof data); mach_write_to_n_little_endian(dest, col_len - 8, len); } @@ -775,32 +277,15 @@ row_mysql_read_blob_ref( ulint* len, /*!< out: BLOB length */ const byte* ref, /*!< in: BLOB reference in the MySQL format */ - ulint col_len, /*!< in: BLOB reference length + ulint col_len) /*!< in: BLOB reference length (not BLOB length) */ - bool need_compression, - /*!< in: if the data need to be - compressed*/ - const byte* dict_data, /*!< in: optional compression - dictionary data */ - ulint dict_data_len, /*!< in: optional compression - dictionary data length */ - row_prebuilt_t* prebuilt) /*!< in: use prebuilt->compress_heap - only here */ { byte* data = NULL; - byte* ptr = NULL; *len = mach_read_from_n_little_endian(ref, col_len - 8); memcpy(&data, ref + col_len - 8, sizeof data); - if (need_compression) { - ptr = row_compress_column(data, len, col_len - 8, dict_data, - dict_data_len, prebuilt); - if (ptr) - data = ptr; - } - return(data); } @@ -883,16 +368,7 @@ row_mysql_store_col_in_innobase_format( necessarily the length of the actual payload data; if the column is a true VARCHAR then this is irrelevant */ - ulint comp, /*!< in: nonzero=compact format */ - bool need_compression, - /*!< in: if the data need to be - compressed*/ - const byte* dict_data, /*!< in: optional compression - dictionary data */ - ulint dict_data_len, /*!< in: optional compression - dictionary data length */ - row_prebuilt_t* prebuilt) /*!< in: use prebuilt->compress_heap - only here */ + ulint comp) /*!< in: nonzero=compact format */ { const byte* ptr = mysql_data; const dtype_t* dtype; @@ -945,14 +421,8 @@ row_mysql_store_col_in_innobase_format( lenlen = 2; } - const byte* tmp_ptr = row_mysql_read_true_varchar( + ptr = row_mysql_read_true_varchar( &col_len, mysql_data, lenlen); - if (need_compression) - ptr = row_compress_column(tmp_ptr, &col_len, - lenlen, dict_data, dict_data_len, - prebuilt); - else - ptr = tmp_ptr; } else { /* Remove trailing spaces from old style VARCHAR columns. */ @@ -1034,9 +504,7 @@ row_mysql_store_col_in_innobase_format( } } else if (type == DATA_BLOB && row_format_col) { - ptr = row_mysql_read_blob_ref(&col_len, mysql_data, col_len, - need_compression, dict_data, dict_data_len, - prebuilt); + ptr = row_mysql_read_blob_ref(&col_len, mysql_data, col_len); } dfield_set_data(dfield, ptr, col_len); @@ -1094,11 +562,7 @@ row_mysql_convert_row_to_innobase( TRUE, /* MySQL row format data */ mysql_rec + templ->mysql_col_offset, templ->mysql_col_len, - dict_table_is_comp(prebuilt->table), - templ->compressed, - reinterpret_cast( - templ->zip_dict_data.str), - templ->zip_dict_data.length, prebuilt); + dict_table_is_comp(prebuilt->table)); next_column: ; } @@ -1444,10 +908,6 @@ row_prebuilt_free( mem_heap_free(prebuilt->blob_heap); } - if (prebuilt->compress_heap) { - mem_heap_free(prebuilt->compress_heap); - } - if (prebuilt->old_vers_heap) { mem_heap_free(prebuilt->old_vers_heap); } @@ -1883,9 +1343,6 @@ row_insert_for_mysql( return(DB_READ_ONLY); } - if (UNIV_LIKELY_NULL(prebuilt->compress_heap)) - mem_heap_empty(prebuilt->compress_heap); - trx->op_info = "inserting"; row_mysql_delay_if_needed(); @@ -3460,8 +2917,6 @@ row_mysql_table_id_reassign( " WHERE TABLE_ID = :old_id;\n" "UPDATE SYS_INDEXES SET TABLE_ID = :new_id\n" " WHERE TABLE_ID = :old_id;\n" - "UPDATE SYS_ZIP_DICT_COLS SET TABLE_ID = :new_id_narrow\n" - " WHERE TABLE_ID = :old_id_narrow;\n" "END;\n", FALSE, trx); return(err); @@ -4294,9 +3749,6 @@ next_rec: "UPDATE SYS_INDEXES" " SET TABLE_ID = :new_id, SPACE = :new_space\n" " WHERE TABLE_ID = :old_id;\n" - "UPDATE SYS_ZIP_DICT_COLS\n" - " SET TABLE_ID = :new_id_narrow\n" - " WHERE TABLE_ID = :old_id_narrow;\n" "END;\n" , FALSE, trx); @@ -4910,6 +4362,7 @@ row_drop_table_for_mysql( switch (err) { ibool is_temp; + ulint table_flags; case DB_SUCCESS: /* Clone the name, in case it has been allocated @@ -4918,6 +4371,7 @@ row_drop_table_for_mysql( space_id = table->space; ibd_file_missing = table->ibd_file_missing; + table_flags = table->flags; is_temp = DICT_TF2_FLAG_IS_SET(table, DICT_TF2_TEMPORARY); /* If there is a temp path then the temp flag is set. @@ -4933,9 +4387,9 @@ row_drop_table_for_mysql( } /* We do not allow temporary tables with a remote path. */ - ut_a(!(is_temp && DICT_TF_HAS_DATA_DIR(table->flags))); + ut_a(!(is_temp && DICT_TF_HAS_DATA_DIR(table_flags))); - if (space_id && DICT_TF_HAS_DATA_DIR(table->flags)) { + if (space_id && DICT_TF_HAS_DATA_DIR(table_flags)) { dict_get_and_save_data_dir_path(table, true); ut_a(table->data_dir_path); @@ -4948,19 +4402,6 @@ row_drop_table_for_mysql( filepath = fil_make_ibd_name(tablename, false); } - /* Remove all compression dictionary references for the - table */ - err = dict_create_remove_zip_dict_references_for_table( - table->id, trx); - if (err != DB_SUCCESS) { - ib_logf(IB_LOG_LEVEL_ERROR, "Error: (%s) not " - "able to remove compression dictionary " - "references for table %s", ut_strerr(err), - tablename); - - goto funct_exit; - } - if (dict_table_has_fts_index(table) || DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_HAS_DOC_ID)) { ut_ad(table->n_ref_count == 0); @@ -5014,8 +4455,9 @@ row_drop_table_for_mysql( if (err == DB_SUCCESS && space_id > TRX_SYS_SPACE) { if (!is_temp && !fil_space_for_table_exists_in_mem( - space_id, tablename, FALSE, - print_msg, false, NULL, 0)) { + space_id, tablename, + print_msg, false, NULL, 0, + table_flags)) { /* This might happen if we are dropping a discarded tablespace */ err = DB_SUCCESS; diff --git a/storage/xtradb/row/row0sel.cc b/storage/xtradb/row/row0sel.cc index 9bdb8d1bb98..29569bb31e7 100644 --- a/storage/xtradb/row/row0sel.cc +++ b/storage/xtradb/row/row0sel.cc @@ -2,7 +2,7 @@ Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. -Copyright (c) 2015, MariaDB Corporation. +Copyright (c) 2015, 2017, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -2461,8 +2461,7 @@ row_sel_convert_mysql_key_to_innobase( /* MySQL key value format col */ FALSE, key_ptr + data_offset, data_len, - dict_table_is_comp(index->table), - false, 0, 0 ,0); + dict_table_is_comp(index->table)); ut_a(buf <= original_buf + buf_len); } @@ -2556,15 +2555,15 @@ row_sel_store_row_id_to_prebuilt( #ifdef UNIV_DEBUG /** Convert a non-SQL-NULL field from Innobase format to MySQL format. */ # define row_sel_field_store_in_mysql_format( \ - dest,templ,idx,field,src,len,prebuilt) \ + dest,templ,idx,field,src,len) \ row_sel_field_store_in_mysql_format_func \ - (dest,templ,idx,field,src,len, prebuilt) + (dest,templ,idx,field,src,len) #else /* UNIV_DEBUG */ /** Convert a non-SQL-NULL field from Innobase format to MySQL format. */ # define row_sel_field_store_in_mysql_format( \ - dest,templ,idx,field,src,len,prebuilt) \ + dest,templ,idx,field,src,len) \ row_sel_field_store_in_mysql_format_func \ - (dest,templ,src,len, prebuilt) + (dest,templ,src,len) #endif /* UNIV_DEBUG */ /**************************************************************//** @@ -2594,10 +2593,7 @@ row_sel_field_store_in_mysql_format_func( templ->icp_rec_field_no */ #endif /* UNIV_DEBUG */ const byte* data, /*!< in: data to store */ - ulint len, /*!< in: length of the data */ - row_prebuilt_t* prebuilt) - /*!< in: use prebuilt->compress_heap - only here */ + ulint len) /*!< in: length of the data */ { byte* ptr; #ifdef UNIV_DEBUG @@ -2641,15 +2637,6 @@ row_sel_field_store_in_mysql_format_func( field_end = dest + templ->mysql_col_len; if (templ->mysql_type == DATA_MYSQL_TRUE_VARCHAR) { - /* If this is a compressed column, - decompress it first */ - if (templ->compressed) - data = row_decompress_column(data, &len, - reinterpret_cast( - templ->zip_dict_data.str), - templ->zip_dict_data.length, - prebuilt); - /* This is a >= 5.0.3 type true VARCHAR. Store the length of the data to the first byte or the first two bytes of dest. */ @@ -2700,11 +2687,7 @@ row_sel_field_store_in_mysql_format_func( already copied to the buffer in row_sel_store_mysql_rec */ row_mysql_store_blob_ref(dest, templ->mysql_col_len, data, - len, templ->compressed, - reinterpret_cast( - templ->zip_dict_data.str), - templ->zip_dict_data.length, - prebuilt); + len); break; case DATA_MYSQL: @@ -2857,7 +2840,7 @@ row_sel_store_mysql_field_func( row_sel_field_store_in_mysql_format( mysql_rec + templ->mysql_col_offset, - templ, index, field_no, data, len, prebuilt); + templ, index, field_no, data, len); if (heap != prebuilt->blob_heap) { mem_heap_free(heap); @@ -2907,7 +2890,7 @@ row_sel_store_mysql_field_func( row_sel_field_store_in_mysql_format( mysql_rec + templ->mysql_col_offset, - templ, index, field_no, data, len, prebuilt); + templ, index, field_no, data, len); } ut_ad(len != UNIV_SQL_NULL); @@ -2955,9 +2938,6 @@ row_sel_store_mysql_rec( prebuilt->blob_heap = NULL; } - if (UNIV_LIKELY_NULL(prebuilt->compress_heap)) - mem_heap_empty(prebuilt->compress_heap); - for (i = 0; i < prebuilt->n_template; i++) { const mysql_row_templ_t*templ = &prebuilt->mysql_template[i]; const ulint field_no diff --git a/storage/xtradb/srv/srv0srv.cc b/storage/xtradb/srv/srv0srv.cc index 426a1c57e7c..42d667b111c 100644 --- a/storage/xtradb/srv/srv0srv.cc +++ b/storage/xtradb/srv/srv0srv.cc @@ -3,7 +3,7 @@ Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2016, MariaDB Corporation. +Copyright (c) 2013, 2017, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -61,7 +61,6 @@ Created 10/8/1995 Heikki Tuuri #include "btr0sea.h" #include "dict0load.h" #include "dict0boot.h" -#include "dict0stats_bg.h" /* dict_stats_event */ #include "srv0start.h" #include "row0mysql.h" #include "row0log.h" @@ -107,15 +106,14 @@ UNIV_INTERN long long srv_kill_idle_transaction = 0; in microseconds, in order to reduce the lagging of the purge thread. */ UNIV_INTERN ulint srv_dml_needed_delay = 0; -UNIV_INTERN ibool srv_monitor_active = FALSE; -UNIV_INTERN ibool srv_error_monitor_active = FALSE; +UNIV_INTERN bool srv_monitor_active; +UNIV_INTERN bool srv_error_monitor_active; -UNIV_INTERN ibool srv_buf_dump_thread_active = FALSE; +UNIV_INTERN bool srv_buf_dump_thread_active; -UNIV_INTERN ibool srv_dict_stats_thread_active = FALSE; +UNIV_INTERN bool srv_dict_stats_thread_active; -UNIV_INTERN ibool srv_log_scrub_active = FALSE; -UNIV_INTERN my_bool srv_scrub_log = FALSE; +UNIV_INTERN my_bool srv_scrub_log; UNIV_INTERN const char* srv_main_thread_op_info = ""; @@ -2095,11 +2093,7 @@ A thread which prints the info output by various InnoDB monitors. @return a dummy parameter */ extern "C" UNIV_INTERN os_thread_ret_t -DECLARE_THREAD(srv_monitor_thread)( -/*===============================*/ - void* arg MY_ATTRIBUTE((unused))) - /*!< in: a dummy parameter required by - os_thread_create */ +DECLARE_THREAD(srv_monitor_thread)(void*) { ib_int64_t sig_count; double time_elapsed; @@ -2120,9 +2114,7 @@ DECLARE_THREAD(srv_monitor_thread)( #ifdef UNIV_PFS_THREAD pfs_register_thread(srv_monitor_thread_key); #endif /* UNIV_PFS_THREAD */ - srv_monitor_active = TRUE; - UT_NOT_USED(arg); srv_last_monitor_time = ut_time(); last_table_monitor_time = ut_time(); last_tablespace_monitor_time = ut_time(); @@ -2254,7 +2246,7 @@ loop: goto loop; exit_func: - srv_monitor_active = FALSE; + srv_monitor_active = false; /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit and not use return() to exit. */ @@ -2272,11 +2264,7 @@ we should avoid waiting any mutexes in this function! @return a dummy parameter */ extern "C" UNIV_INTERN os_thread_ret_t -DECLARE_THREAD(srv_error_monitor_thread)( -/*=====================================*/ - void* arg MY_ATTRIBUTE((unused))) - /*!< in: a dummy parameter required by - os_thread_create */ +DECLARE_THREAD(srv_error_monitor_thread)(void*) { /* number of successive fatal timeouts observed */ ulint fatal_cnt = 0; @@ -2302,7 +2290,6 @@ DECLARE_THREAD(srv_error_monitor_thread)( #ifdef UNIV_PFS_THREAD pfs_register_thread(srv_error_monitor_thread_key); #endif /* UNIV_PFS_THREAD */ - srv_error_monitor_active = TRUE; loop: /* Try to track a strange bug reported by Harald Fuchs and others, @@ -2418,7 +2405,7 @@ rescan_idle: goto loop; } - srv_error_monitor_active = FALSE; + srv_error_monitor_active = false; /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit and not use return() to exit. */ @@ -2482,44 +2469,6 @@ srv_get_active_thread_type(void) return(ret); } -/**********************************************************************//** -Check whether any background thread are active. If so print which thread -is active. Send the threads wakeup signal. -@return name of thread that is active or NULL */ -UNIV_INTERN -const char* -srv_any_background_threads_are_active(void) -/*=======================================*/ -{ - const char* thread_active = NULL; - - if (srv_read_only_mode) { - return(NULL); - } else if (srv_error_monitor_active) { - thread_active = "srv_error_monitor_thread"; - } else if (lock_sys->timeout_thread_active) { - thread_active = "srv_lock_timeout thread"; - } else if (srv_monitor_active) { - thread_active = "srv_monitor_thread"; - } else if (srv_buf_dump_thread_active) { - thread_active = "buf_dump_thread"; - } else if (srv_dict_stats_thread_active) { - thread_active = "dict_stats_thread"; - } else if (srv_scrub_log && srv_log_scrub_thread_active) { - thread_active = "log_scrub_thread"; - } - - os_event_set(srv_error_event); - os_event_set(srv_monitor_event); - os_event_set(srv_buf_dump_event); - os_event_set(lock_sys->timeout_event); - os_event_set(dict_stats_event); - if (srv_scrub_log) - os_event_set(log_scrub_event); - - return(thread_active); -} - /******************************************************************//** A thread which follows the redo log and outputs the changed page bitmap. @return a dummy value */ diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc index ab7c3099154..4dd31ad43f6 100644 --- a/storage/xtradb/srv/srv0start.cc +++ b/storage/xtradb/srv/srv0start.cc @@ -3,7 +3,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2016, MariaDB Corporation +Copyright (c) 2013, 2017, MariaDB Corporation Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -132,7 +132,7 @@ UNIV_INTERN ibool srv_was_started = FALSE; static ibool srv_start_has_been_called = FALSE; #ifdef UNIV_DEBUG /** InnoDB system tablespace to set during recovery */ -UNIV_INTERN ulong srv_sys_space_size_debug; +UNIV_INTERN uint srv_sys_space_size_debug; #endif /* UNIV_DEBUG */ /** At a shutdown this value climbs from SRV_SHUTDOWN_NONE to @@ -631,7 +631,7 @@ create_log_file( fprintf(stderr, "innodb_force_recovery_crash=%lu\n", \ srv_force_recovery_crash); \ fflush(stderr); \ - abort(); \ + exit(3); \ } \ } while (0) #endif @@ -703,8 +703,7 @@ create_log_files( sprintf(logfilename + dirnamelen, "ib_logfile%u", INIT_LOG_FILE0); fil_space_create( - logfilename, SRV_LOG_SPACE_FIRST_ID, - fsp_flags_set_page_size(0, UNIV_PAGE_SIZE), + logfilename, SRV_LOG_SPACE_FIRST_ID, 0, FIL_LOG, NULL /* no encryption yet */, true /* this is create */); @@ -1193,7 +1192,7 @@ check_first_page: crypt_data = fil_space_create_crypt_data(FIL_SPACE_ENCRYPTION_DEFAULT, FIL_DEFAULT_ENCRYPTION_KEY); } - flags = fsp_flags_set_page_size(0, UNIV_PAGE_SIZE); + flags = FSP_FLAGS_PAGE_SSIZE(); fil_space_create(name, 0, flags, FIL_TABLESPACE, crypt_data, (*create_new_db) == true); @@ -1341,7 +1340,7 @@ srv_undo_tablespace_open( fil_set_max_space_id_if_bigger(space); /* Set the compressed page size to 0 (non-compressed) */ - flags = fsp_flags_set_page_size(0, UNIV_PAGE_SIZE); + flags = FSP_FLAGS_PAGE_SSIZE(); fil_space_create(name, space, flags, FIL_TABLESPACE, NULL /* no encryption */, true /* create */); @@ -1632,8 +1631,6 @@ innobase_start_or_create_for_mysql(void) lsn_t max_arch_log_no = LSN_MAX; #endif /* UNIV_LOG_ARCHIVE */ ulint sum_of_new_sizes; - ulint sum_of_data_file_sizes; - ulint tablespace_size_in_header; dberr_t err; unsigned i; ulint srv_n_log_files_found = srv_n_log_files; @@ -1646,6 +1643,19 @@ innobase_start_or_create_for_mysql(void) size_t dirnamelen; bool sys_datafiles_created = false; + /* Check that os_fast_mutexes work as expected */ + os_fast_mutex_init(PFS_NOT_INSTRUMENTED, &srv_os_test_mutex); + + ut_a(0 == os_fast_mutex_trylock(&srv_os_test_mutex)); + + os_fast_mutex_unlock(&srv_os_test_mutex); + + os_fast_mutex_lock(&srv_os_test_mutex); + + os_fast_mutex_unlock(&srv_os_test_mutex); + + os_fast_mutex_free(&srv_os_test_mutex); + /* This should be initialized early */ ut_init_timer(); @@ -1691,22 +1701,7 @@ innobase_start_or_create_for_mysql(void) #endif /* PAGE_ATOMIC_REF_COUNT */ ); - - if (sizeof(ulint) != sizeof(void*)) { - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Error: size of InnoDB's ulint is %lu, " - "but size of void*\n", (ulong) sizeof(ulint)); - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: is %lu. The sizes should be the same " - "so that on a 64-bit\n", - (ulong) sizeof(void*)); - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: platforms you can allocate more than 4 GB " - "of memory.\n"); - } + compile_time_assert(sizeof(ulint) == sizeof(void*)); /* If stacktrace is used we set up signal handler for SIGUSR2 signal here. If signal handler set fails we report that and disable @@ -2343,9 +2338,7 @@ innobase_start_or_create_for_mysql(void) sprintf(logfilename + dirnamelen, "ib_logfile%u", 0); fil_space_create(logfilename, - SRV_LOG_SPACE_FIRST_ID, - fsp_flags_set_page_size(0, UNIV_PAGE_SIZE), - FIL_LOG, + SRV_LOG_SPACE_FIRST_ID, 0, FIL_LOG, NULL /* no encryption yet */, true /* create */); @@ -2404,17 +2397,11 @@ files_checked: dict_stats_thread_init(); } - if (!srv_read_only_mode && srv_scrub_log) { - /* TODO(minliz): have/use log_scrub_thread_init() instead? */ - log_scrub_event = os_event_create(); - } - trx_sys_file_format_init(); trx_sys_create(); if (create_new_db) { - ut_a(!srv_read_only_mode); init_log_online(); @@ -2496,25 +2483,103 @@ files_checked: min_flushed_lsn, max_flushed_lsn); if (err != DB_SUCCESS) { - - return(DB_ERROR); + return(err); } init_log_online(); - /* Since the insert buffer init is in dict_boot, and the - insert buffer is needed in any disk i/o, first we call - dict_boot(). Note that trx_sys_init_at_db_start() only needs - to access space 0, and the insert buffer at this stage already - works for space 0. */ - + /* Initialize the change buffer. */ err = dict_boot(); if (err != DB_SUCCESS) { return(err); } + /* This must precede recv_apply_hashed_log_recs(TRUE). */ ib_bh = trx_sys_init_at_db_start(); + + if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) { + /* Apply the hashed log records to the + respective file pages, for the last batch of + recv_group_scan_log_recs(). */ + + err = recv_apply_hashed_log_recs(TRUE); + DBUG_PRINT("ib_log", ("apply completed")); + + if (err != DB_SUCCESS) { + return(err); + } + } + + if (!srv_read_only_mode) { + const ulint flags = FSP_FLAGS_PAGE_SSIZE(); + for (ulint id = 0; id <= srv_undo_tablespaces; id++) { + if (fil_space_get(id)) { + fsp_flags_try_adjust(id, flags); + } + } + + if (sum_of_new_sizes > 0) { + /* New data file(s) were added */ + mtr_start(&mtr); + fsp_header_inc_size(0, sum_of_new_sizes, &mtr); + mtr_commit(&mtr); + /* Immediately write the log record about + increased tablespace size to disk, so that it + is durable even if mysqld would crash + quickly */ + log_buffer_flush_to_disk(); + } + } + + const ulint tablespace_size_in_header + = fsp_header_get_tablespace_size(); + +#ifdef UNIV_DEBUG + /* buf_debug_prints = TRUE; */ +#endif /* UNIV_DEBUG */ + ulint sum_of_data_file_sizes = 0; + + for (ulint d = 0; d < srv_n_data_files; d++) { + sum_of_data_file_sizes += srv_data_file_sizes[d]; + } + + /* Compare the system tablespace file size to what is + stored in FSP_SIZE. In open_or_create_data_files() + we already checked that the file sizes match the + innodb_data_file_path specification. */ + if (srv_read_only_mode + || sum_of_data_file_sizes == tablespace_size_in_header) { + /* Do not complain about the size. */ + } else if (!srv_auto_extend_last_data_file + || sum_of_data_file_sizes + < tablespace_size_in_header) { + ib_logf(IB_LOG_LEVEL_ERROR, + "Tablespace size stored in header is " ULINTPF + " pages, but the sum of data file sizes is " + ULINTPF " pages", + tablespace_size_in_header, + sum_of_data_file_sizes); + + if (srv_force_recovery == 0 + && sum_of_data_file_sizes + < tablespace_size_in_header) { + ib_logf(IB_LOG_LEVEL_ERROR, + "Cannot start InnoDB. The tail of" + " the system tablespace is" + " missing. Have you edited" + " innodb_data_file_path in my.cnf" + " in an inappropriate way, removing" + " data files from there?" + " You can set innodb_force_recovery=1" + " in my.cnf to force" + " a startup if you are trying to" + " recover a badly corrupt database."); + + return(DB_ERROR); + } + } + n_recovered_trx = UT_LIST_GET_LEN(trx_sys->rw_trx_list); /* The purge system needs to create the purge view and @@ -2667,20 +2732,8 @@ files_checked: trx_sys_file_format_tag_init(); } - if (!create_new_db && sum_of_new_sizes > 0) { - /* New data file(s) were added */ - mtr_start(&mtr); - - fsp_header_inc_size(0, sum_of_new_sizes, &mtr); - - mtr_commit(&mtr); - - /* Immediately write the log record about increased tablespace - size to disk, so that it is durable even if mysqld would crash - quickly */ - - log_buffer_flush_to_disk(); - } + ut_ad(err == DB_SUCCESS); + ut_a(sum_of_new_sizes != ULINT_UNDEFINED); #ifdef UNIV_LOG_ARCHIVE if (!srv_read_only_mode) { @@ -2751,14 +2804,17 @@ files_checked: lock_wait_timeout_thread, NULL, thread_ids + 2 + SRV_MAX_N_IO_THREADS); thread_started[2 + SRV_MAX_N_IO_THREADS] = true; + lock_sys->timeout_thread_active = true; /* Create the thread which warns of long semaphore waits */ + srv_error_monitor_active = true; thread_handles[3 + SRV_MAX_N_IO_THREADS] = os_thread_create( srv_error_monitor_thread, NULL, thread_ids + 3 + SRV_MAX_N_IO_THREADS); thread_started[3 + SRV_MAX_N_IO_THREADS] = true; /* Create the thread which prints InnoDB monitor info */ + srv_monitor_active = true; thread_handles[4 + SRV_MAX_N_IO_THREADS] = os_thread_create( srv_monitor_thread, NULL, thread_ids + 4 + SRV_MAX_N_IO_THREADS); @@ -2780,12 +2836,6 @@ files_checked: } } - /* Create the SYS_ZIP_DICT system table */ - err = dict_create_or_check_sys_zip_dict(); - if (err != DB_SUCCESS) { - return(err); - } - srv_is_being_started = FALSE; ut_a(trx_purge_state() == PURGE_STATE_INIT); @@ -2850,116 +2900,6 @@ files_checked: buf_flush_lru_manager_thread_handle = os_thread_create(buf_flush_lru_manager_thread, NULL, NULL); buf_flush_lru_manager_thread_started = true; -#ifdef UNIV_DEBUG - /* buf_debug_prints = TRUE; */ -#endif /* UNIV_DEBUG */ - sum_of_data_file_sizes = 0; - - for (i = 0; i < srv_n_data_files; i++) { - sum_of_data_file_sizes += srv_data_file_sizes[i]; - } - - tablespace_size_in_header = fsp_header_get_tablespace_size(); - - if (!srv_read_only_mode - && !srv_auto_extend_last_data_file - && sum_of_data_file_sizes != tablespace_size_in_header) { - - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Error: tablespace size" - " stored in header is %lu pages, but\n", - (ulong) tablespace_size_in_header); - ut_print_timestamp(stderr); - fprintf(stderr, - "InnoDB: the sum of data file sizes is %lu pages\n", - (ulong) sum_of_data_file_sizes); - - if (srv_force_recovery == 0 - && sum_of_data_file_sizes < tablespace_size_in_header) { - /* This is a fatal error, the tail of a tablespace is - missing */ - - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Cannot start InnoDB." - " The tail of the system tablespace is\n"); - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: missing. Have you edited" - " innodb_data_file_path in my.cnf in an\n"); - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: inappropriate way, removing" - " ibdata files from there?\n"); - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: You can set innodb_force_recovery=1" - " in my.cnf to force\n"); - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: a startup if you are trying" - " to recover a badly corrupt database.\n"); - - return(DB_ERROR); - } - } - - if (!srv_read_only_mode - && srv_auto_extend_last_data_file - && sum_of_data_file_sizes < tablespace_size_in_header) { - - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Error: tablespace size stored in header" - " is %lu pages, but\n", - (ulong) tablespace_size_in_header); - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: the sum of data file sizes" - " is only %lu pages\n", - (ulong) sum_of_data_file_sizes); - - if (srv_force_recovery == 0) { - - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Cannot start InnoDB. The tail of" - " the system tablespace is\n"); - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: missing. Have you edited" - " innodb_data_file_path in my.cnf in an\n"); - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: inappropriate way, removing" - " ibdata files from there?\n"); - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: You can set innodb_force_recovery=1" - " in my.cnf to force\n"); - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: a startup if you are trying to" - " recover a badly corrupt database.\n"); - - return(DB_ERROR); - } - } - - /* Check that os_fast_mutexes work as expected */ - os_fast_mutex_init(PFS_NOT_INSTRUMENTED, &srv_os_test_mutex); - - ut_a(0 == os_fast_mutex_trylock(&srv_os_test_mutex)); - - os_fast_mutex_unlock(&srv_os_test_mutex); - - os_fast_mutex_lock(&srv_os_test_mutex); - - os_fast_mutex_unlock(&srv_os_test_mutex); - - os_fast_mutex_free(&srv_os_test_mutex); - if (!srv_file_per_table && srv_pass_corrupt_table) { fprintf(stderr, "InnoDB: Warning:" " The option innodb_file_per_table is disabled," @@ -3008,6 +2948,8 @@ files_checked: /* Create the buffer pool dump/load thread */ buf_dump_thread_handle= os_thread_create(buf_dump_thread, NULL, NULL); + + srv_buf_dump_thread_active = true; buf_dump_thread_started = true; #ifdef WITH_WSREP } else { @@ -3018,7 +2960,9 @@ files_checked: #endif /* WITH_WSREP */ /* Create the dict stats gathering thread */ - dict_stats_thread_handle = os_thread_create(dict_stats_thread, NULL, NULL); + dict_stats_thread_handle = os_thread_create( + dict_stats_thread, NULL, NULL); + srv_dict_stats_thread_active = true; dict_stats_thread_started = true; /* Create the thread that will optimize the FTS sub-system. */ @@ -3028,10 +2972,6 @@ files_checked: fil_system_enter(); fil_crypt_threads_init(); fil_system_exit(); - - /* Create the log scrub thread */ - if (srv_scrub_log) - os_thread_create(log_scrub_thread, NULL, NULL); } /* Init data for datafile scrub threads */ @@ -3100,9 +3040,6 @@ innobase_shutdown_for_mysql(void) fts_optimize_start_shutdown(); fts_optimize_end(); - - /* Shutdown key rotation threads */ - fil_crypt_threads_end(); } /* 1. Flush the buffer pool to disk, write the current lsn to @@ -3205,14 +3142,6 @@ innobase_shutdown_for_mysql(void) if (!srv_read_only_mode) { dict_stats_thread_deinit(); - if (srv_scrub_log) { - /* TODO(minliz): have/use log_scrub_thread_deinit() instead? */ - os_event_free(log_scrub_event); - log_scrub_event = NULL; - } - } - - if (!srv_read_only_mode) { fil_crypt_threads_cleanup(); } diff --git a/storage/xtradb/trx/trx0purge.cc b/storage/xtradb/trx/trx0purge.cc index d9e40c5d6f5..57338a73450 100644 --- a/storage/xtradb/trx/trx0purge.cc +++ b/storage/xtradb/trx/trx0purge.cc @@ -285,18 +285,33 @@ trx_purge_add_update_undo_to_history( } } -/**********************************************************************//** -Frees an undo log segment which is in the history list. Cuts the end of the -history list at the youngest undo log in this segment. */ +/** Remove undo log header from the history list. +@param[in,out] rseg_hdr rollback segment header +@param[in] log_hdr undo log segment header +@param[in,out] mtr mini transaction. */ +static +void +trx_purge_remove_log_hdr( + trx_rsegf_t* rseg_hdr, + trx_ulogf_t* log_hdr, + mtr_t* mtr) +{ + flst_remove(rseg_hdr + TRX_RSEG_HISTORY, + log_hdr + TRX_UNDO_HISTORY_NODE, mtr); + + os_atomic_decrement_ulint(&trx_sys->rseg_history_len, 1); +} + +/** Frees an undo log segment which is in the history list. Removes the +undo log hdr from the history list. +@param[in,out] rseg rollback segment +@param[in] hdr_addr file address of log_hdr +@param[in] noredo skip redo logging. */ static void trx_purge_free_segment( -/*===================*/ - trx_rseg_t* rseg, /*!< in: rollback segment */ - fil_addr_t hdr_addr, /*!< in: the file address of log_hdr */ - ulint n_removed_logs) /*!< in: count of how many undo logs we - will cut off from the end of the - history list */ + trx_rseg_t* rseg, + fil_addr_t hdr_addr) { mtr_t mtr; trx_rsegf_t* rseg_hdr; @@ -360,16 +375,7 @@ trx_purge_free_segment( history list: otherwise, in case of a database crash, the segment could become inaccessible garbage in the file space. */ - flst_cut_end(rseg_hdr + TRX_RSEG_HISTORY, - log_hdr + TRX_UNDO_HISTORY_NODE, n_removed_logs, &mtr); - -#ifdef HAVE_ATOMIC_BUILTINS - os_atomic_decrement_ulint(&trx_sys->rseg_history_len, n_removed_logs); -#else - mutex_enter(&trx_sys->mutex); - trx_sys->rseg_history_len -= n_removed_logs; - mutex_exit(&trx_sys->mutex); -#endif /* HAVE_ATOMIC_BUILTINS */ + trx_purge_remove_log_hdr(rseg_hdr, log_hdr, &mtr); do { @@ -411,7 +417,6 @@ trx_purge_truncate_rseg_history( page_t* undo_page; trx_ulogf_t* log_hdr; trx_usegf_t* seg_hdr; - ulint n_removed_logs = 0; mtr_t mtr; trx_id_t undo_trx_no; @@ -449,19 +454,6 @@ loop: hdr_addr.boffset, limit->undo_no); } -#ifdef HAVE_ATOMIC_BUILTINS - os_atomic_decrement_ulint( - &trx_sys->rseg_history_len, n_removed_logs); -#else - mutex_enter(&trx_sys->mutex); - trx_sys->rseg_history_len -= n_removed_logs; - mutex_exit(&trx_sys->mutex); -#endif /* HAVE_ATOMIC_BUILTINS */ - - flst_truncate_end(rseg_hdr + TRX_RSEG_HISTORY, - log_hdr + TRX_UNDO_HISTORY_NODE, - n_removed_logs, &mtr); - mutex_exit(&(rseg->mutex)); mtr_commit(&mtr); @@ -470,7 +462,6 @@ loop: prev_hdr_addr = trx_purge_get_log_from_hist( flst_get_prev_addr(log_hdr + TRX_UNDO_HISTORY_NODE, &mtr)); - n_removed_logs++; seg_hdr = undo_page + TRX_UNDO_SEG_HDR; @@ -482,10 +473,14 @@ loop: mutex_exit(&(rseg->mutex)); mtr_commit(&mtr); - trx_purge_free_segment(rseg, hdr_addr, n_removed_logs); + /* calls the trx_purge_remove_log_hdr() + inside trx_purge_free_segment(). */ + trx_purge_free_segment(rseg, hdr_addr); - n_removed_logs = 0; } else { + /* Remove the log hdr from the rseg history. */ + trx_purge_remove_log_hdr(rseg_hdr, log_hdr, &mtr); + mutex_exit(&(rseg->mutex)); mtr_commit(&mtr); } diff --git a/storage/xtradb/trx/trx0trx.cc b/storage/xtradb/trx/trx0trx.cc index ec57a8e5c54..bdf407ff7fb 100644 --- a/storage/xtradb/trx/trx0trx.cc +++ b/storage/xtradb/trx/trx0trx.cc @@ -1572,7 +1572,7 @@ trx_commit_in_memory( ut_ad(!trx->in_rw_trx_list); #ifdef WITH_WSREP - if (wsrep_on(trx->mysql_thd)) { + if (trx->mysql_thd && wsrep_on(trx->mysql_thd)) { trx->lock.was_chosen_as_deadlock_victim = FALSE; } #endif diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index 79ad8ca7302..e3ed531df93 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -31610,7 +31610,7 @@ my_uca_implicit_weight_put(uint16 *to, my_wc_t code, uint level) break; } /* Primary level */ - to[0]= (code >> 15) + my_uca_implicit_weight_base(code); + to[0]= (uint16)(code >> 15) + my_uca_implicit_weight_base(code); to[1]= (code & 0x7FFF) | 0x8000; to[2]= 0; } diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 6ab07d99e23..683c80f643d 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -4831,7 +4831,6 @@ my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { - my_wc_t UNINIT_VAR(wc); uchar *dst0= dst; uchar *de= dst + dstlen; @@ -4877,7 +4876,6 @@ my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { - my_wc_t UNINIT_VAR(wc); uchar *dst0= dst; uchar *de= dst + dstlen; diff --git a/strings/json_lib.c b/strings/json_lib.c index 47a3e37fa4c..2a5d71a2133 100644 --- a/strings/json_lib.c +++ b/strings/json_lib.c @@ -1,4 +1,5 @@ #include +#include #include @@ -126,9 +127,9 @@ static int syntax_error(json_engine_t *j) static int mark_object(json_engine_t *j) { j->state= JST_OBJ_START; - if ((++j->stack_p) - j->stack < JSON_DEPTH_LIMIT) + if (++j->stack_p < JSON_DEPTH_LIMIT) { - *j->stack_p= JST_OBJ_CONT; + j->stack[j->stack_p]= JST_OBJ_CONT; return 0; } j->s.error= JE_DEPTH; @@ -142,9 +143,9 @@ static int read_obj(json_engine_t *j) j->state= JST_OBJ_START; j->value_type= JSON_VALUE_OBJECT; j->value= j->value_begin; - if ((++j->stack_p) - j->stack < JSON_DEPTH_LIMIT) + if (++j->stack_p < JSON_DEPTH_LIMIT) { - *j->stack_p= JST_OBJ_CONT; + j->stack[j->stack_p]= JST_OBJ_CONT; return 0; } j->s.error= JE_DEPTH; @@ -156,9 +157,9 @@ static int read_obj(json_engine_t *j) static int mark_array(json_engine_t *j) { j->state= JST_ARRAY_START; - if ((++j->stack_p) - j->stack < JSON_DEPTH_LIMIT) + if (++j->stack_p < JSON_DEPTH_LIMIT) { - *j->stack_p= JST_ARRAY_CONT; + j->stack[j->stack_p]= JST_ARRAY_CONT; j->value= j->value_begin; return 0; } @@ -172,9 +173,9 @@ static int read_array(json_engine_t *j) j->state= JST_ARRAY_START; j->value_type= JSON_VALUE_ARRAY; j->value= j->value_begin; - if ((++j->stack_p) - j->stack < JSON_DEPTH_LIMIT) + if (++j->stack_p < JSON_DEPTH_LIMIT) { - *j->stack_p= JST_ARRAY_CONT; + j->stack[j->stack_p]= JST_ARRAY_CONT; return 0; } j->s.error= JE_DEPTH; @@ -376,7 +377,7 @@ static int skip_str_constant(json_engine_t *j) return j->s.error= json_eos(&j->s) ? JE_EOS : JE_BAD_CHR; } - j->state= *j->stack_p; + j->state= j->stack[j->stack_p]; return 0; } @@ -397,7 +398,7 @@ static int read_strn(json_engine_t *j) if (skip_str_constant(j)) return 1; - j->state= *j->stack_p; + j->state= j->stack[j->stack_p]; j->value_len= (j->s.c_str - j->value) - 1; return 0; } @@ -469,7 +470,7 @@ static int json_num_states[NS_NUM_STATES][N_NUM_CLASSES]= /*GO*/ { NS_GO1, JE_SYN, NS_Z, NS_INT, JE_SYN, JE_SYN, JE_SYN, JE_BAD_CHR }, /*GO1*/ { JE_SYN, JE_SYN, NS_Z1, NS_INT, JE_SYN, JE_SYN, JE_SYN, JE_BAD_CHR }, /*ZERO*/ { JE_SYN, JE_SYN, JE_SYN, JE_SYN, NS_FRAC, JE_SYN, NS_OK, JE_BAD_CHR }, -/*ZE1*/ { JE_SYN, JE_SYN, JE_SYN, JE_SYN, NS_FRAC, JE_SYN, JE_SYN, JE_BAD_CHR }, +/*ZE1*/ { JE_SYN, JE_SYN, JE_SYN, JE_SYN, NS_FRAC, JE_SYN, NS_OK, JE_BAD_CHR }, /*INT*/ { JE_SYN, JE_SYN, NS_INT, NS_INT, NS_FRAC, NS_EX, NS_OK, JE_BAD_CHR }, /*FRAC*/ { JE_SYN, JE_SYN, NS_FRAC, NS_FRAC,JE_SYN, NS_EX, NS_OK, JE_BAD_CHR }, /*EX*/ { NS_EX1, NS_EX1, NS_EX1, NS_EX1, JE_SYN, JE_SYN, JE_SYN, JE_BAD_CHR }, @@ -517,7 +518,7 @@ static int skip_num_constant(json_engine_t *j) break; } - j->state= *j->stack_p; + j->state= j->stack[j->stack_p]; return 0; } @@ -570,7 +571,7 @@ static int v_false(json_engine_t *j) { if (skip_string_verbatim(&j->s, "alse")) return 1; - j->state= *j->stack_p; + j->state= j->stack[j->stack_p]; return json_scan_next(j); } @@ -580,7 +581,7 @@ static int v_null(json_engine_t *j) { if (skip_string_verbatim(&j->s, "ull")) return 1; - j->state= *j->stack_p; + j->state= j->stack[j->stack_p]; return json_scan_next(j); } @@ -590,7 +591,7 @@ static int v_true(json_engine_t *j) { if (skip_string_verbatim(&j->s, "rue")) return 1; - j->state= *j->stack_p; + j->state= j->stack[j->stack_p]; return json_scan_next(j); } @@ -600,7 +601,7 @@ static int read_false(json_engine_t *j) { j->value_type= JSON_VALUE_FALSE; j->value= j->value_begin; - j->state= *j->stack_p; + j->state= j->stack[j->stack_p]; j->value_len= 5; return skip_string_verbatim(&j->s, "alse"); } @@ -611,7 +612,7 @@ static int read_null(json_engine_t *j) { j->value_type= JSON_VALUE_NULL; j->value= j->value_begin; - j->state= *j->stack_p; + j->state= j->stack[j->stack_p]; j->value_len= 4; return skip_string_verbatim(&j->s, "ull"); } @@ -622,7 +623,7 @@ static int read_true(json_engine_t *j) { j->value_type= JSON_VALUE_TRUE; j->value= j->value_begin; - j->state= *j->stack_p; + j->state= j->stack[j->stack_p]; j->value_len= 4; return skip_string_verbatim(&j->s, "rue"); } @@ -791,7 +792,7 @@ int json_scan_start(json_engine_t *je, { json_string_setup(&je->s, i_cs, str, end); je->stack[0]= JST_DONE; - je->stack_p= je->stack; + je->stack_p= 0; je->state= JST_VALUE; return 0; } @@ -839,7 +840,7 @@ static int skip_key(json_engine_t *j) run our 'state machine' accordingly. */ static int struct_end_eos(json_engine_t *j) -{ return json_actions[*j->stack_p][C_EOS](j); } +{ return json_actions[j->stack[j->stack_p]][C_EOS](j); } /* @@ -849,7 +850,7 @@ static int struct_end_eos(json_engine_t *j) run our 'state machine' accordingly. */ static int struct_end_cb(json_engine_t *j) -{ return json_actions[*j->stack_p][C_RCURB](j); } +{ return json_actions[j->stack[j->stack_p]][C_RCURB](j); } /* @@ -859,7 +860,7 @@ static int struct_end_cb(json_engine_t *j) run our 'state machine' accordingly. */ static int struct_end_qb(json_engine_t *j) -{ return json_actions[*j->stack_p][C_RSQRB](j); } +{ return json_actions[j->stack[j->stack_p]][C_RSQRB](j); } /* @@ -869,7 +870,7 @@ static int struct_end_qb(json_engine_t *j) run our 'state machine' accordingly. */ static int struct_end_cm(json_engine_t *j) -{ return json_actions[*j->stack_p][C_COMMA](j); } +{ return json_actions[j->stack[j->stack_p]][C_COMMA](j); } int json_read_keyname_chr(json_engine_t *j) @@ -964,6 +965,7 @@ enum json_path_chr_classes { P_S, /* s (for "strict") */ P_SPACE, /* space */ P_BKSL, /* \ */ + P_QUOTE, /* " */ P_ETC, /* everything else */ P_ERR, /* character disallowed in JSON*/ P_BAD, /* invalid character */ @@ -977,7 +979,7 @@ static enum json_path_chr_classes json_path_chr_map[128] = { P_ERR, P_ERR, P_ERR, P_ERR, P_ERR, P_ERR, P_ERR, P_ERR, P_ERR, P_ERR, P_ERR, P_ERR, P_ERR, P_ERR, P_ERR, P_ERR, - P_SPACE, P_ETC, P_ETC, P_ETC, P_USD, P_ETC, P_ETC, P_ETC, + P_SPACE, P_ETC, P_QUOTE, P_ETC, P_USD, P_ETC, P_ETC, P_ETC, P_ETC, P_ETC, P_ASTER, P_ETC, P_ETC, P_ETC, P_POINT, P_ETC, P_ZERO, P_DIGIT, P_DIGIT, P_DIGIT, P_DIGIT, P_DIGIT, P_DIGIT, P_DIGIT, P_DIGIT, P_DIGIT, P_ETC, P_ETC, P_ETC, P_ETC, P_ETC, P_ETC, @@ -999,6 +1001,7 @@ enum json_path_states { PS_LAX, /* Parse the 'lax' keyword. */ PS_PT, /* New path's step begins. */ PS_AR, /* Parse array step. */ + PS_SAR, /* space after the '['. */ PS_AWD, /* Array wildcard. */ PS_Z, /* '0' (as an array item number). */ PS_INT, /* Parse integer (as an array item number). */ @@ -1008,11 +1011,15 @@ enum json_path_states { PS_KWD, /* Key wildcard. */ PS_AST, /* Asterisk. */ PS_DWD, /* Double wildcard. */ + PS_KEYX, /* Key started with quote ("). */ + PS_KNMX, /* Parse quoted key name. */ N_PATH_STATES, /* Below are states that aren't in the transitions table. */ PS_SCT, /* Parse the 'strict' keyword. */ PS_EKY, /* '.' after the keyname so next step is the key. */ + PS_EKYX, /* Closing " for the quoted keyname. */ PS_EAR, /* '[' after the keyname so next step is the array. */ PS_ESC, /* Escaping in the keyname. */ + PS_ESCX, /* Escaping in the quoted keyname. */ PS_OK, /* Path normally ended. */ PS_KOK /* EOS after the keyname so end the path normally. */ }; @@ -1022,48 +1029,57 @@ static int json_path_transitions[N_PATH_STATES][N_PATH_CLASSES]= { /* EOS $, * [ ] . 0 - 1..9 L S SPACE \ ETC ERR - BAD + 1..9 L S SPACE \ " ETC + ERR BAD */ /* GO */ { JE_EOS, PS_PT, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, - JE_SYN, PS_LAX, PS_SCT, PS_GO, JE_SYN, JE_SYN, JE_NOT_JSON_CHR, - JE_BAD_CHR}, + JE_SYN, PS_LAX, PS_SCT, PS_GO, JE_SYN, JE_SYN, JE_SYN, + JE_NOT_JSON_CHR, JE_BAD_CHR}, /* LAX */ { JE_EOS, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, - JE_SYN, PS_LAX, JE_SYN, PS_GO, JE_SYN, JE_SYN, JE_NOT_JSON_CHR, - JE_BAD_CHR}, + JE_SYN, PS_LAX, JE_SYN, PS_GO, JE_SYN, JE_SYN, JE_SYN, + JE_NOT_JSON_CHR, JE_BAD_CHR}, /* PT */ { PS_OK, JE_SYN, PS_AST, PS_AR, JE_SYN, PS_KEY, JE_SYN, JE_SYN, - JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_NOT_JSON_CHR, - JE_BAD_CHR}, + JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, + JE_NOT_JSON_CHR, JE_BAD_CHR}, /* AR */ { JE_EOS, JE_SYN, PS_AWD, JE_SYN, PS_PT, JE_SYN, PS_Z, - PS_INT, JE_SYN, JE_SYN, PS_AR, JE_SYN, JE_SYN, JE_NOT_JSON_CHR, - JE_BAD_CHR}, + PS_INT, JE_SYN, JE_SYN, PS_SAR, JE_SYN, JE_SYN, JE_SYN, + JE_NOT_JSON_CHR, JE_BAD_CHR}, +/* SAR */ { JE_EOS, JE_SYN, PS_AWD, JE_SYN, PS_PT, JE_SYN, PS_Z, + PS_INT, JE_SYN, JE_SYN, PS_SAR, JE_SYN, JE_SYN, JE_SYN, + JE_NOT_JSON_CHR, JE_BAD_CHR}, /* AWD */ { JE_EOS, JE_SYN, JE_SYN, JE_SYN, PS_PT, JE_SYN, JE_SYN, - JE_SYN, JE_SYN, JE_SYN, PS_AS, JE_SYN, JE_SYN, JE_NOT_JSON_CHR, - JE_BAD_CHR}, + JE_SYN, JE_SYN, JE_SYN, PS_AS, JE_SYN, JE_SYN, JE_SYN, + JE_NOT_JSON_CHR, JE_BAD_CHR}, /* Z */ { JE_EOS, JE_SYN, JE_SYN, JE_SYN, PS_PT, JE_SYN, JE_SYN, - JE_SYN, JE_SYN, JE_SYN, PS_AS, JE_SYN, JE_SYN, JE_NOT_JSON_CHR, - JE_BAD_CHR}, + JE_SYN, JE_SYN, JE_SYN, PS_AS, JE_SYN, JE_SYN, JE_SYN, + JE_NOT_JSON_CHR, JE_BAD_CHR}, /* INT */ { JE_EOS, JE_SYN, JE_SYN, JE_SYN, PS_PT, JE_SYN, PS_INT, - PS_INT, JE_SYN, JE_SYN, PS_AS, JE_SYN, JE_SYN, JE_NOT_JSON_CHR, - JE_BAD_CHR}, + PS_INT, JE_SYN, JE_SYN, PS_AS, JE_SYN, JE_SYN, JE_SYN, + JE_NOT_JSON_CHR, JE_BAD_CHR}, /* AS */ { JE_EOS, JE_SYN, JE_SYN, JE_SYN, PS_PT, JE_SYN, JE_SYN, JE_SYN, - JE_SYN, JE_SYN, PS_AS, JE_SYN, JE_SYN, JE_NOT_JSON_CHR, - JE_BAD_CHR}, + JE_SYN, JE_SYN, PS_AS, JE_SYN, JE_SYN, JE_SYN, + JE_NOT_JSON_CHR, JE_BAD_CHR}, /* KEY */ { JE_EOS, PS_KNM, PS_KWD, JE_SYN, PS_KNM, JE_SYN, PS_KNM, - PS_KNM, PS_KNM, PS_KNM, PS_KNM, JE_SYN, PS_KNM, JE_NOT_JSON_CHR, - JE_BAD_CHR}, + PS_KNM, PS_KNM, PS_KNM, PS_KNM, JE_SYN, PS_KEYX, PS_KNM, + JE_NOT_JSON_CHR, JE_BAD_CHR}, /* KNM */ { PS_KOK, PS_KNM, PS_AST, PS_EAR, PS_KNM, PS_EKY, PS_KNM, - PS_KNM, PS_KNM, PS_KNM, PS_KNM, PS_ESC, PS_KNM, JE_NOT_JSON_CHR, - JE_BAD_CHR}, + PS_KNM, PS_KNM, PS_KNM, PS_KNM, PS_ESC, PS_KNM, PS_KNM, + JE_NOT_JSON_CHR, JE_BAD_CHR}, /* KWD */ { PS_OK, JE_SYN, JE_SYN, PS_AR, JE_SYN, PS_EKY, JE_SYN, - JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_NOT_JSON_CHR, - JE_BAD_CHR}, + JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, + JE_NOT_JSON_CHR, JE_BAD_CHR}, /* AST */ { JE_SYN, JE_SYN, PS_DWD, JE_SYN, JE_SYN, JE_SYN, JE_SYN, - JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_NOT_JSON_CHR, - JE_BAD_CHR}, + JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, + JE_NOT_JSON_CHR, JE_BAD_CHR}, /* DWD */ { JE_SYN, JE_SYN, PS_AST, PS_AR, JE_SYN, PS_KEY, JE_SYN, JE_SYN, - JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_NOT_JSON_CHR, - JE_BAD_CHR} + JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, JE_SYN, + JE_NOT_JSON_CHR, JE_BAD_CHR}, +/* KEYX*/ { JE_EOS, PS_KNMX, PS_KNMX, PS_KNMX, PS_KNMX, PS_KNMX, PS_KNMX, + PS_KNMX,PS_KNMX, PS_KNMX, PS_KNMX, PS_ESCX, PS_EKYX, PS_KNMX, + JE_NOT_JSON_CHR, JE_BAD_CHR}, +/* KNMX */{ JE_EOS, PS_KNMX, PS_KNMX, PS_KNMX, PS_KNMX, PS_KNMX, PS_KNMX, + PS_KNMX, PS_KNMX, PS_KNMX, PS_KNMX,PS_ESCX, PS_EKYX, PS_KNMX, + JE_NOT_JSON_CHR, JE_BAD_CHR}, }; @@ -1107,8 +1123,6 @@ int json_path_setup(json_path_t *p, continue; case PS_KWD: case PS_AWD: - if (p->last_step->type & JSON_PATH_DOUBLE_WILD) - return p->s.error= JE_SYN; p->last_step->type|= JSON_PATH_WILD; p->types_used|= JSON_PATH_WILD; continue; @@ -1116,6 +1130,10 @@ int json_path_setup(json_path_t *p, p->last_step->n_item*= 10; p->last_step->n_item+= p->s.c_next - '0'; continue; + case PS_EKYX: + p->last_step->key_end= p->s.c_str - c_len; + state= PS_PT; + continue; case PS_EKY: p->last_step->key_end= p->s.c_str - c_len; state= PS_KEY; @@ -1126,6 +1144,8 @@ int json_path_setup(json_path_t *p, return p->s.error= JE_DEPTH; p->types_used|= p->last_step->type= JSON_PATH_KEY | double_wildcard; double_wildcard= JSON_PATH_KEY_NULL; + /* Note no 'continue' here. */ + case PS_KEYX: p->last_step->key= p->s.c_str; continue; case PS_EAR: @@ -1143,6 +1163,12 @@ int json_path_setup(json_path_t *p, case PS_ESC: if (json_handle_esc(&p->s)) return 1; + state= PS_KNM; + continue; + case PS_ESCX: + if (json_handle_esc(&p->s)) + return 1; + state= PS_KNMX; continue; case PS_KOK: p->last_step->key_end= p->s.c_str - c_len; @@ -1158,7 +1184,7 @@ int json_path_setup(json_path_t *p, } -int json_skip_to_level(json_engine_t *j, json_level_t level) +int json_skip_to_level(json_engine_t *j, int level) { do { if (j->stack_p < level) @@ -1171,13 +1197,6 @@ int json_skip_to_level(json_engine_t *j, json_level_t level) int json_skip_key(json_engine_t *j) { - if (j->state == JST_KEY) - { - while (json_read_keyname_chr(j) == 0); - if (j->s.error) - return 1; - } - if (json_read_value(j)) return 1; @@ -1188,6 +1207,8 @@ int json_skip_key(json_engine_t *j) } +#define SKIPPED_STEP_MARK ((uint) ~0) + /* Current step of the patch matches the JSON construction. Now we should either stop the search or go to the next @@ -1196,24 +1217,48 @@ int json_skip_key(json_engine_t *j) static int handle_match(json_engine_t *je, json_path_t *p, json_path_step_t **p_cur_step, uint *array_counters) { + json_path_step_t *next_step= *p_cur_step + 1; + DBUG_ASSERT(*p_cur_step < p->last_step); if (json_read_value(je)) return 1; if (json_value_scalar(je)) - return 0; - - (*p_cur_step)++; - array_counters[*p_cur_step - p->steps]= 0; - - if ((int) je->value_type != - (int) ((*p_cur_step)->type & JSON_PATH_KEY_OR_ARRAY)) { - (*p_cur_step)--; - return json_skip_level(je); + while (next_step->type == JSON_PATH_ARRAY && next_step->n_item == 0) + { + if (++next_step > p->last_step) + { + je->s.c_str= je->value_begin; + return 1; + } + } + return 0; } + if (next_step->type == JSON_PATH_ARRAY && next_step->n_item == 0 && + je->value_type & JSON_VALUE_OBJECT) + { + do + { + array_counters[next_step - p->steps]= SKIPPED_STEP_MARK; + if (++next_step > p->last_step) + { + je->s.c_str= je->value_begin; + return 1; + } + } while (next_step->type == JSON_PATH_ARRAY && next_step->n_item == 0); + } + + + array_counters[next_step - p->steps]= 0; + + if ((int) je->value_type != + (int) (next_step->type & JSON_PATH_KEY_OR_ARRAY)) + return json_skip_level(je); + + *p_cur_step= next_step; return 0; } @@ -1231,10 +1276,7 @@ int json_key_matches(json_engine_t *je, json_string_t *k) return 0; } - if (json_read_string_const_chr(k)) - return 1; - - return 0; + return json_read_string_const_chr(k); } @@ -1281,6 +1323,12 @@ int json_find_path(json_engine_t *je, json_skip_array_item(je); break; case JST_OBJ_END: + do + { + (*p_cur_step)--; + } while (*p_cur_step > p->steps && + array_counters[*p_cur_step - p->steps] == SKIPPED_STEP_MARK); + break; case JST_ARRAY_END: (*p_cur_step)--; break; @@ -1598,3 +1646,178 @@ int json_escape(CHARSET_INFO *str_cs, return json - json_start; } + + +int json_get_path_start(json_engine_t *je, CHARSET_INFO *i_cs, + const uchar *str, const uchar *end, + json_path_t *p) +{ + json_scan_start(je, i_cs, str, end); + p->last_step= p->steps - 1; + return 0; +} + + +int json_get_path_next(json_engine_t *je, json_path_t *p) +{ + if (p->last_step < p->steps) + { + if (json_read_value(je)) + return 1; + + p->last_step= p->steps; + p->steps[0].type= JSON_PATH_ARRAY_WILD; + p->steps[0].n_item= 0; + return 0; + } + else + { + if (json_value_scalar(je)) + { + if (p->last_step->type & JSON_PATH_ARRAY) + p->last_step->n_item++; + } + else + { + p->last_step++; + p->last_step->type= (enum json_path_step_types) je->value_type; + p->last_step->n_item= 0; + } + + if (json_scan_next(je)) + return 1; + } + + do + { + switch (je->state) + { + case JST_KEY: + p->last_step->key= je->s.c_str; + do + { + p->last_step->key_end= je->s.c_str; + } while (json_read_keyname_chr(je) == 0); + if (je->s.error) + return 1; + /* Now we have je.state == JST_VALUE, so let's handle it. */ + + case JST_VALUE: + if (json_read_value(je)) + return 1; + return 0; + case JST_OBJ_END: + case JST_ARRAY_END: + p->last_step--; + if (p->last_step->type & JSON_PATH_ARRAY) + p->last_step->n_item++; + break; + default: + break; + } + } while (json_scan_next(je) == 0); + + return 1; +} + + +int json_path_parts_compare( + const json_path_step_t *a, const json_path_step_t *a_end, + const json_path_step_t *b, const json_path_step_t *b_end, + enum json_value_types vt) +{ + int res, res2; + + while (a <= a_end) + { + if (b > b_end) + { + while (vt != JSON_VALUE_ARRAY && + (a->type & JSON_PATH_ARRAY_WILD) == JSON_PATH_ARRAY && + a->n_item == 0) + { + if (++a > a_end) + return 0; + } + return -2; + } + + DBUG_ASSERT((b->type & (JSON_PATH_WILD | JSON_PATH_DOUBLE_WILD)) == 0); + + + if (a->type & JSON_PATH_ARRAY) + { + if (b->type & JSON_PATH_ARRAY) + { + if ((a->type & JSON_PATH_WILD) || a->n_item == b->n_item) + goto step_fits; + goto step_failed; + } + if (a->n_item == 0) + goto step_fits_autowrap; + goto step_failed; + } + else /* JSON_PATH_KEY */ + { + if (!(b->type & JSON_PATH_KEY)) + goto step_failed; + + if (!(a->type & JSON_PATH_WILD) && + (a->key_end - a->key != b->key_end - b->key || + memcmp(a->key, b->key, a->key_end - a->key) != 0)) + goto step_failed; + + goto step_fits; + } +step_failed: + if (!(a->type & JSON_PATH_DOUBLE_WILD)) + return -1; + b++; + continue; + +step_fits: + b++; + if (!(a->type & JSON_PATH_DOUBLE_WILD)) + { + a++; + continue; + } + + /* Double wild handling needs recursions. */ + res= json_path_parts_compare(a+1, a_end, b, b_end, vt); + if (res == 0) + return 0; + + res2= json_path_parts_compare(a, a_end, b, b_end, vt); + + return (res2 >= 0) ? res2 : res; + +step_fits_autowrap: + if (!(a->type & JSON_PATH_DOUBLE_WILD)) + { + a++; + continue; + } + + /* Double wild handling needs recursions. */ + res= json_path_parts_compare(a+1, a_end, b+1, b_end, vt); + if (res == 0) + return 0; + + res2= json_path_parts_compare(a, a_end, b+1, b_end, vt); + + return (res2 >= 0) ? res2 : res; + + } + + return b <= b_end; +} + + +int json_path_compare(const json_path_t *a, const json_path_t *b, + enum json_value_types vt) +{ + return json_path_parts_compare(a->steps+1, a->last_step, + b->steps+1, b->last_step, vt); +} + diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index eceff5fcf18..c80de04d069 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -56,9 +56,28 @@ IF(UNIX) INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script} DESTINATION ${inst_location} COMPONENT Server_Scripts) ENDFOREACH() + IF(INSTALL_SUPPORTFILESDIR) INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles) INSTALL(DIRECTORY policy DESTINATION ${inst_location} COMPONENT SupportFiles) + FIND_PROGRAM(CHECKMODULE checkmodule) + FIND_PROGRAM(SEMODULE_PACKAGE semodule_package) + MARK_AS_ADVANCED(CHECKMODULE SEMODULE_PACKAGE) + + # Build pp files in policy/selinux + IF(CHECKMODULE AND SEMODULE_PACKAGE) + FOREACH(pol mariadb) + SET(src ${CMAKE_CURRENT_SOURCE_DIR}/policy/selinux/${pol}.te) + SET(tmp ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${pol}-pp.dir/${pol}.mod) + SET(out ${CMAKE_CURRENT_BINARY_DIR}/${pol}.pp) + ADD_CUSTOM_COMMAND(OUTPUT ${out} + COMMAND ${CHECKMODULE} -M -m ${src} -o ${tmp} + COMMAND ${SEMODULE_PACKAGE} -m ${tmp} -o ${out} + DEPENDS ${src}) + ADD_CUSTOM_TARGET(${pol}-pp ALL DEPENDS ${out}) + INSTALL(FILES ${out} DESTINATION ${inst_location}/policy/selinux COMPONENT SupportFiles) + ENDFOREACH() + ENDIF() ENDIF() CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY) diff --git a/support-files/build-tags b/support-files/build-tags index 87f320ba5f5..03b243ee8cc 100755 --- a/support-files/build-tags +++ b/support-files/build-tags @@ -8,9 +8,9 @@ then echo client storage dbug libmysql sql-common \ sql extra mysys mysys_ssl strings regex pcre vio include \ tools unittest plugin libmysqld | \ - xargs -n1 git ls-files | \ + xargs -n1 git ls-files | grep -v '\.jar$' | \ xargs etags -o TAGS --append else - find . -type f | + find . -type f ! -name "*.jar" | xargs etags -o TAGS --append fi diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index c934f7a47a5..9162cf7d716 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -156,15 +156,9 @@ parse_server_arguments() { # Get arguments from the my.cnf file, # the only group, which is read from now on is [mysqld] -if test -x ./bin/my_print_defaults -then - print_defaults="./bin/my_print_defaults" -elif test -x $bindir/my_print_defaults +if test -x $bindir/my_print_defaults then print_defaults="$bindir/my_print_defaults" -elif test -x $bindir/mysql_print_defaults -then - print_defaults="$bindir/mysql_print_defaults" else # Try to find basedir in /etc/my.cnf conf=/etc/my.cnf diff --git a/support-files/policy/selinux/mariadb.te b/support-files/policy/selinux/mariadb.te new file mode 100644 index 00000000000..1d3de52c700 --- /dev/null +++ b/support-files/policy/selinux/mariadb.te @@ -0,0 +1,9 @@ +module mariadb 1.0; + +require { + type mysqld_safe_t; + class capability { setuid setgid }; +} + +#============= mysqld_safe_t ============== +allow mysqld_safe_t self:capability { setuid setgid }; diff --git a/support-files/rpm/server-postin.sh b/support-files/rpm/server-postin.sh index 5b95b751212..9ef9bec3e0d 100644 --- a/support-files/rpm/server-postin.sh +++ b/support-files/rpm/server-postin.sh @@ -93,7 +93,12 @@ if [ -f /etc/redhat-release ] ; then echo ' make load' echo echo - fi + fi + if grep 'CentOS release 6' /etc/redhat-release >/dev/null 2>&1; then + if [ -x /usr/sbin/semodule ] ; then + /usr/sbin/semodule -i /usr/share/mysql/policy/selinux/mariadb.pp + fi + fi fi if [ -x sbin/restorecon ] ; then diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 58e3dda2b0d..5525a20271b 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -19460,6 +19460,33 @@ static void test_big_packet() } +static void test_prepare_analyze() +{ + MYSQL_STMT *stmt; + const char *query= "ANALYZE SELECT 1"; + int rc; + myheader("test_prepare_analyze"); + + stmt= mysql_stmt_init(mysql); + check_stmt(stmt); + rc= mysql_stmt_prepare(stmt, query, strlen(query)); + check_execute(stmt, rc); + + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + rc= mysql_stmt_store_result(stmt); + check_execute(stmt, rc); + + while (!(rc= mysql_stmt_fetch(stmt))) + ; + + DIE_UNLESS(rc == MYSQL_NO_DATA); + + rc= mysql_stmt_close(stmt); + check_execute(stmt, rc); +} + static struct my_tests_st my_tests[]= { { "disable_query_logs", disable_query_logs }, { "test_view_sp_list_fields", test_view_sp_list_fields }, @@ -19733,6 +19760,7 @@ static struct my_tests_st my_tests[]= { { "test_ps_sp_out_params", test_ps_sp_out_params }, { "test_compressed_protocol", test_compressed_protocol }, { "test_big_packet", test_big_packet }, + { "test_prepare_analyze", test_prepare_analyze }, { 0, 0 } }; diff --git a/win/packaging/CPackWixConfig.cmake b/win/packaging/CPackWixConfig.cmake index 6df49678d52..be07ff7d561 100644 --- a/win/packaging/CPackWixConfig.cmake +++ b/win/packaging/CPackWixConfig.cmake @@ -9,7 +9,7 @@ IF(ESSENTIALS) ENDIF() ELSE() SET(CPACK_COMPONENTS_USED - "Server;Client;Development;SharedLibraries;Embedded;Documentation;IniFiles;Readme;Debuginfo;Common;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management") + "Server;Client;Development;SharedLibraries;Documentation;Readme;Debuginfo;Common;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management") ENDIF() SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents") diff --git a/win/packaging/create_msi.cmake.in b/win/packaging/create_msi.cmake.in index 1f847a39695..4b05e61decd 100644 --- a/win/packaging/create_msi.cmake.in +++ b/win/packaging/create_msi.cmake.in @@ -425,7 +425,7 @@ EXECUTE_PROCESS( ) EXECUTE_PROCESS( - COMMAND ${LIGHT_EXECUTABLE} -ext WixUIExtension -ext WixUtilExtension + COMMAND ${LIGHT_EXECUTABLE} -v -ext WixUIExtension -ext WixUtilExtension -ext WixFirewallExtension -sice:ICE61 mysql_server.wixobj extra.wixobj -out ${CPACK_PACKAGE_FILE_NAME}.msi ${EXTRA_LIGHT_ARGS}